Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: HDISVF10

HDISVF10.m

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