source: FOIAVistA/trunk/r/HEALTH_DATA_AND_INFORMATICS-HDI/HDISVF10.m@ 632

Last change on this file since 632 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1HDISVF10 ;BPFO/JRP - FILE UTILITIES/API;2/3/2005
2 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
3 ;
4 ;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
5 ;
6PARAMINI(SYSPTR,FACNUM,DOMAIN,SYSTYPE,USESYS) ;Initialize parameters for system
7 ; Input : SYSPTR - Pointer to HDIS System file (optional)
8 ; FACNUM - Facility number (defaults to local number)
9 ; DOMAIN - Domain/IP address (defaults to local system)
10 ; SYSTYPE - Flag indicating type of system
11 ; 1 = Production 0 = Test
12 ; Defaults to current system type
13 ; USESYS - Flag indicating if information from HDIS System
14 ; file should be used instead of default values
15 ; 0 = No (default) 1 = Yes
16 ;Output : Pointer to HDIS Parameter file
17 ; Notes : 0 is returned if an entry can not be initialized
18 N FAC,HDISFDA,HDISMSG,IENS,PRMDOM,OK
19 S SYSPTR=$G(SYSPTR)
20 S FAC=$$GETPTR(.SYSPTR,$G(FACNUM),$G(DOMAIN),$G(SYSTYPE),1)
21 I 'FAC Q 0
22 S PRMDOM="FORUM.VA.GOV"
23 ;Get info from system
24 S OK=1
25 I $G(USESYS) D
26 .K PRMDOM
27 .S OK=$$GETDIP^HDISVF07(SYSPTR,.PRMDOM)
28 ;Problem pulling from system
29 I 'OK Q 0
30 S IENS=FAC_","
31 K HDISFDA,HDISMSG
32 S HDISFDA(7118.29,IENS,.02)="CLIENT"
33 S HDISFDA(7118.29,IENS,11)="NO"
34 S HDISFDA(7118.29,IENS,12)=PRMDOM
35 S HDISFDA(7118.29,IENS,13)="MAILMAN"
36 S HDISFDA(7118.29,IENS,21)="HDIS-FACILITY-DATA-SERVER"
37 S HDISFDA(7118.29,IENS,31)="NO"
38 S HDISFDA(7118.29,IENS,32)=PRMDOM
39 S HDISFDA(7118.29,IENS,33)="MAILMAN"
40 S HDISFDA(7118.29,IENS,41)="HDIS-STATUS-UPDATE-SERVER"
41 D FILE^DIE("E","HDISFDA","HDISMSG")
42 Q FAC
43 ;
44GETPTR(SYSPTR,FACNUM,DOMAIN,SYSTYPE,LAYGO) ;Get pointer to HDIS Parameter file
45 ; Input : SYSPTR - Pointer to HDIS System file (optional)
46 ; FACNUM - Facility number (defaults to local number)
47 ; DOMAIN - Domain/IP address (defaults to local system)
48 ; SYSTYPE - Flag indicating type of system
49 ; 1 = Production 0 = Test
50 ; Defaults to current system type
51 ; LAYGO - Flag indicating if an entry for the system should
52 ; be created if one is not found
53 ; 0 = No (don't create) (default) 1 = Yes
54 ;Output : Pointer to HDIS PARAMETER file
55 ; Notes : 0 is returned if an entry is not found
56 ; : If SYSPTR is not passed, then FACNUM, DOMAIN, and TESTSYS
57 ; will be used to find the HDIS System file entry
58 N X,PTR,HDISMSG,HDISIEN,HDISFDA
59 S SYSPTR=+$G(SYSPTR)
60 S LAYGO=+$G(LAYGO)
61 ;Find entry in HDIS System file
62 I 'SYSPTR D
63 .K SYSPTR
64 .S FACNUM=$G(FACNUM)
65 .I 'FACNUM S FACNUM=$$FACNUM^HDISVF01()
66 .S DOMAIN=$G(DOMAIN)
67 .I DOMAIN="" S DOMAIN=$G(^XMB("NETNAME"))
68 .S SYSTYPE=$G(SYSTYPE)
69 .I SYSTYPE="" S SYSTYPE=$$PROD^XUPROD()
70 .S X=$$FINDSYS^HDISVF07(DOMAIN,FACNUM,SYSTYPE,LAYGO,.SYSPTR)
71 I '$G(SYSPTR) Q 0
72 ;Find entry in HDIS Parameter file
73 S PTR=$$FIND1^DIC(7118.29,,"QX",SYSPTR,"B",,"HDISMSG")
74 I PTR Q PTR
75 I 'LAYGO Q 0
76 ;Create entry
77 S HDISFDA(7118.29,"+1,",.01)=SYSPTR
78 S HDISIEN(1)=SYSPTR
79 D UPDATE^DIE("","HDISFDA","HDISIEN","HDISMSG")
80 I $D(HDISMSG) Q 0
81 S PTR=HDISIEN(1)
82 Q PTR
83 ;
84 ;---------- End HDIS PARAMETER file APIs ----------
Note: See TracBrowser for help on using the repository browser.