- HDISVF10 ;BPFO/JRP - FILE UTILITIES/API;2/3/2005
- ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
- ;
- ;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
- ;
- PARAMINI(SYSPTR,FACNUM,DOMAIN,SYSTYPE,USESYS) ;Initialize parameters for system
- ; Input : SYSPTR - Pointer to HDIS System file (optional)
- ; FACNUM - Facility number (defaults to local number)
- ; DOMAIN - Domain/IP address (defaults to local system)
- ; SYSTYPE - Flag indicating type of system
- ; 1 = Production 0 = Test
- ; Defaults to current system type
- ; USESYS - Flag indicating if information from HDIS System
- ; file should be used instead of default values
- ; 0 = No (default) 1 = Yes
- ;Output : Pointer to HDIS Parameter file
- ; Notes : 0 is returned if an entry can not be initialized
- N FAC,HDISFDA,HDISMSG,IENS,PRMDOM,OK
- S SYSPTR=$G(SYSPTR)
- S FAC=$$GETPTR(.SYSPTR,$G(FACNUM),$G(DOMAIN),$G(SYSTYPE),1)
- I 'FAC Q 0
- S PRMDOM="FORUM.VA.GOV"
- ;Get info from system
- S OK=1
- I $G(USESYS) D
- .K PRMDOM
- .S OK=$$GETDIP^HDISVF07(SYSPTR,.PRMDOM)
- ;Problem pulling from system
- I 'OK Q 0
- S IENS=FAC_","
- K HDISFDA,HDISMSG
- S HDISFDA(7118.29,IENS,.02)="CLIENT"
- S HDISFDA(7118.29,IENS,11)="NO"
- S HDISFDA(7118.29,IENS,12)=PRMDOM
- S HDISFDA(7118.29,IENS,13)="MAILMAN"
- S HDISFDA(7118.29,IENS,21)="HDIS-FACILITY-DATA-SERVER"
- S HDISFDA(7118.29,IENS,31)="NO"
- S HDISFDA(7118.29,IENS,32)=PRMDOM
- S HDISFDA(7118.29,IENS,33)="MAILMAN"
- S HDISFDA(7118.29,IENS,41)="HDIS-STATUS-UPDATE-SERVER"
- D FILE^DIE("E","HDISFDA","HDISMSG")
- Q FAC
- ;
- GETPTR(SYSPTR,FACNUM,DOMAIN,SYSTYPE,LAYGO) ;Get pointer to HDIS Parameter file
- ; Input : SYSPTR - Pointer to HDIS System file (optional)
- ; FACNUM - Facility number (defaults to local number)
- ; DOMAIN - Domain/IP address (defaults to local system)
- ; SYSTYPE - Flag indicating type of system
- ; 1 = Production 0 = Test
- ; Defaults to current system type
- ; LAYGO - Flag indicating if an entry for the system should
- ; be created if one is not found
- ; 0 = No (don't create) (default) 1 = Yes
- ;Output : Pointer to HDIS PARAMETER file
- ; Notes : 0 is returned if an entry is not found
- ; : If SYSPTR is not passed, then FACNUM, DOMAIN, and TESTSYS
- ; will be used to find the HDIS System file entry
- N X,PTR,HDISMSG,HDISIEN,HDISFDA
- S SYSPTR=+$G(SYSPTR)
- S LAYGO=+$G(LAYGO)
- ;Find entry in HDIS System file
- I 'SYSPTR D
- .K SYSPTR
- .S FACNUM=$G(FACNUM)
- .I 'FACNUM S FACNUM=$$FACNUM^HDISVF01()
- .S DOMAIN=$G(DOMAIN)
- .I DOMAIN="" S DOMAIN=$G(^XMB("NETNAME"))
- .S SYSTYPE=$G(SYSTYPE)
- .I SYSTYPE="" S SYSTYPE=$$PROD^XUPROD()
- .S X=$$FINDSYS^HDISVF07(DOMAIN,FACNUM,SYSTYPE,LAYGO,.SYSPTR)
- I '$G(SYSPTR) Q 0
- ;Find entry in HDIS Parameter file
- S PTR=$$FIND1^DIC(7118.29,,"QX",SYSPTR,"B",,"HDISMSG")
- I PTR Q PTR
- I 'LAYGO Q 0
- ;Create entry
- S HDISFDA(7118.29,"+1,",.01)=SYSPTR
- S HDISIEN(1)=SYSPTR
- D UPDATE^DIE("","HDISFDA","HDISIEN","HDISMSG")
- I $D(HDISMSG) Q 0
- S PTR=HDISIEN(1)
- Q PTR
- ;
- ;---------- End HDIS PARAMETER file APIs ----------
- HDISVF10 ;BPFO/JRP - FILE UTILITIES/API;2/3/2005
- +1 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
- +2 ;
- +3 ;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
- +4 ;
- PARAMINI(SYSPTR,FACNUM,DOMAIN,SYSTYPE,USESYS) ;Initialize parameters for system
- +1 ; Input : SYSPTR - Pointer to HDIS System file (optional)
- +2 ; FACNUM - Facility number (defaults to local number)
- +3 ; DOMAIN - Domain/IP address (defaults to local system)
- +4 ; SYSTYPE - Flag indicating type of system
- +5 ; 1 = Production 0 = Test
- +6 ; Defaults to current system type
- +7 ; USESYS - Flag indicating if information from HDIS System
- +8 ; file should be used instead of default values
- +9 ; 0 = No (default) 1 = Yes
- +10 ;Output : Pointer to HDIS Parameter file
- +11 ; Notes : 0 is returned if an entry can not be initialized
- +12 NEW FAC,HDISFDA,HDISMSG,IENS,PRMDOM,OK
- +13 SET SYSPTR=$GET(SYSPTR)
- +14 SET FAC=$$GETPTR(.SYSPTR,$GET(FACNUM),$GET(DOMAIN),$GET(SYSTYPE),1)
- +15 IF 'FAC
- QUIT 0
- +16 SET PRMDOM="FORUM.VA.GOV"
- +17 ;Get info from system
- +18 SET OK=1
- +19 IF $GET(USESYS)
- Begin DoDot:1
- +20 KILL PRMDOM
- +21 SET OK=$$GETDIP^HDISVF07(SYSPTR,.PRMDOM)
- End DoDot:1
- +22 ;Problem pulling from system
- +23 IF 'OK
- QUIT 0
- +24 SET IENS=FAC_","
- +25 KILL HDISFDA,HDISMSG
- +26 SET HDISFDA(7118.29,IENS,.02)="CLIENT"
- +27 SET HDISFDA(7118.29,IENS,11)="NO"
- +28 SET HDISFDA(7118.29,IENS,12)=PRMDOM
- +29 SET HDISFDA(7118.29,IENS,13)="MAILMAN"
- +30 SET HDISFDA(7118.29,IENS,21)="HDIS-FACILITY-DATA-SERVER"
- +31 SET HDISFDA(7118.29,IENS,31)="NO"
- +32 SET HDISFDA(7118.29,IENS,32)=PRMDOM
- +33 SET HDISFDA(7118.29,IENS,33)="MAILMAN"
- +34 SET HDISFDA(7118.29,IENS,41)="HDIS-STATUS-UPDATE-SERVER"
- +35 DO FILE^DIE("E","HDISFDA","HDISMSG")
- +36 QUIT FAC
- +37 ;
- GETPTR(SYSPTR,FACNUM,DOMAIN,SYSTYPE,LAYGO) ;Get pointer to HDIS Parameter file
- +1 ; Input : SYSPTR - Pointer to HDIS System file (optional)
- +2 ; FACNUM - Facility number (defaults to local number)
- +3 ; DOMAIN - Domain/IP address (defaults to local system)
- +4 ; SYSTYPE - Flag indicating type of system
- +5 ; 1 = Production 0 = Test
- +6 ; Defaults to current system type
- +7 ; LAYGO - Flag indicating if an entry for the system should
- +8 ; be created if one is not found
- +9 ; 0 = No (don't create) (default) 1 = Yes
- +10 ;Output : Pointer to HDIS PARAMETER file
- +11 ; Notes : 0 is returned if an entry is not found
- +12 ; : If SYSPTR is not passed, then FACNUM, DOMAIN, and TESTSYS
- +13 ; will be used to find the HDIS System file entry
- +14 NEW X,PTR,HDISMSG,HDISIEN,HDISFDA
- +15 SET SYSPTR=+$GET(SYSPTR)
- +16 SET LAYGO=+$GET(LAYGO)
- +17 ;Find entry in HDIS System file
- +18 IF 'SYSPTR
- Begin DoDot:1
- +19 KILL SYSPTR
- +20 SET FACNUM=$GET(FACNUM)
- +21 IF 'FACNUM
- SET FACNUM=$$FACNUM^HDISVF01()
- +22 SET DOMAIN=$GET(DOMAIN)
- +23 IF DOMAIN=""
- SET DOMAIN=$GET(^XMB("NETNAME"))
- +24 SET SYSTYPE=$GET(SYSTYPE)
- +25 IF SYSTYPE=""
- SET SYSTYPE=$$PROD^XUPROD()
- +26 SET X=$$FINDSYS^HDISVF07(DOMAIN,FACNUM,SYSTYPE,LAYGO,.SYSPTR)
- End DoDot:1
- +27 IF '$GET(SYSPTR)
- QUIT 0
- +28 ;Find entry in HDIS Parameter file
- +29 SET PTR=$$FIND1^DIC(7118.29,,"QX",SYSPTR,"B",,"HDISMSG")
- +30 IF PTR
- QUIT PTR
- +31 IF 'LAYGO
- QUIT 0
- +32 ;Create entry
- +33 SET HDISFDA(7118.29,"+1,",.01)=SYSPTR
- +34 SET HDISIEN(1)=SYSPTR
- +35 DO UPDATE^DIE("","HDISFDA","HDISIEN","HDISMSG")
- +36 IF $DATA(HDISMSG)
- QUIT 0
- +37 SET PTR=HDISIEN(1)
- +38 QUIT PTR
- +39 ;
- +40 ;---------- End HDIS PARAMETER file APIs ----------