source: WorldVistAEHR/trunk/r/HEALTH_DATA_AND_INFORMATICS-HDI/HDISVF03.m@ 862

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

initial load of WorldVistAEHR

File size: 5.0 KB
Line 
1HDISVF03 ;BPFO/JRP - FILE UTILITIES/API;12/20/2004
2 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
3 ;
4 ;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
5 ;
6GETSDIS(SYSPTR) ;Get value of DISABLE STATUS UPDATES field (#31)
7 ; Input : SYSPTR - Pointer to HDIS System file
8 ; (default to current system)
9 ;Output : Internal Value ^ External Value
10 ; Notes : If no value found, values for OFF are returned
11 N FAC,ARR,NTRNL,XTRNL
12 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
13 I 'FAC Q "0^OFF"
14 S XTRNL=$$GET^HDISVF02(7118.29,31,(FAC_","),"B",.ARR)
15 I XTRNL="" Q "0^NO"
16 Q ARR("I")_"^"_XTRNL
17 ;
18SETSDIS(VALUE,SYSPTR) ;Set value of DISABLE STATUS UPDATES field (#31)
19 ; Input : VALUE - New value (internal or external)
20 ; : SYSPTR - Pointer to HDIS System file
21 ; (default to current system)
22 ;Output : None
23 N FAC,X
24 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
25 I 'FAC Q
26 S X=$$SET^HDISVF02(7118.29,31,(FAC_","),$G(VALUE),1)
27 Q
28 ;
29GETSLOC(SYSPTR) ;Get value of STATUS SERVER LOCATION field (#32)
30 ; Input : SYSPTR - Pointer to HDIS System file
31 ; (default to current system)
32 ;Output : Value of field
33 ; Notes : If no value found, domain for FORUM returned
34 N FAC,XTRNL
35 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
36 I 'FAC Q "FORUM.VA.GOV"
37 S XTRNL=$$GET^HDISVF02(7118.29,32,(FAC_","),"E")
38 I XTRNL="" Q "FORUM.VA.GOV"
39 Q XTRNL
40 ;
41SETSLOC(VALUE,SYSPTR) ;Set value of STATUS SERVER LOCATION field (#32)
42 ; Input : VALUE - New value (internal or external)
43 ; : SYSPTR - Pointer to HDIS System file
44 ; (default to current system)
45 ;Output : None
46 N FAC,X
47 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
48 I 'FAC Q
49 S X=$$SET^HDISVF02(7118.29,32,(FAC_","),$G(VALUE),1)
50 Q
51 ;
52GETSCON(SYSPTR) ;Get value of STATUS SERVER CONNECTION TYPE field (#33)
53 ; Input : SYSPTR - Pointer to HDIS System file
54 ; (default to current system)
55 ;Output : Internal Value ^ External Value
56 ; Notes : If no value found, values for MailMan connection returned
57 N FAC,ARR,NTRNL,XTRNL
58 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
59 I 'FAC Q "1^MAILMAN"
60 S XTRNL=$$GET^HDISVF02(7118.29,33,(FAC_","),"B",.ARR)
61 I XTRNL="" Q "1^MAILMAN"
62 Q ARR("I")_"^"_XTRNL
63 ;
64SETSCON(VALUE,SYSPTR) ;Set value of STATUS SERVER CONNECTION TYPE field (#33)
65 ; Input : VALUE - New value (internal or external)
66 ; : SYSPTR - Pointer to HDIS System file
67 ; (default to current system)
68 ;Output : None
69 N FAC,X
70 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
71 I 'FAC Q
72 S X=$$SET^HDISVF02(7118.29,33,(FAC_","),$G(VALUE),1)
73 Q
74 ;
75GETSSRV(SYSPTR) ;Get value of STATUS SERVER OPTION field (#41)
76 ; Input : SYSPTR - Pointer to HDIS System file
77 ; (default to current system)
78 ;Output : Value of field
79 ; Notes : If no value found, HDIS-STATUS-UPDATE-SERVER returned
80 N FAC,XTRNL
81 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
82 I 'FAC Q "HDIS-STATUS-UPDATE-SERVER"
83 S XTRNL=$$GET^HDISVF02(7118.29,41,(FAC_","),"E")
84 I XTRNL="" Q "HDIS-STATUS-UPDATE-SERVER"
85 Q XTRNL
86 ;
87SETSSRV(VALUE,SYSPTR) ;Set value of STATUS SERVER OPTION field (#41)
88 ; Input : VALUE - New value (internal or external)
89 ; : SYSPTR - Pointer to HDIS System file
90 ; (default to current system)
91 ;Output : None
92 N FAC,X
93 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
94 I 'FAC Q
95 S X=$$SET^HDISVF02(7118.29,41,(FAC_","),$G(VALUE),1)
96 Q
97 ;
98GETNSVL(SYSPTR) ;Get value of LAST NON-STANDARD VUID field (#51)
99 ; Input : SYSPTR - Pointer to HDIS System file
100 ; (default to current system)
101 ;Output : Value of field
102 ; Notes : If no value found, null ("") returned
103 N FAC,XTRNL
104 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
105 I 'FAC Q ""
106 S XTRNL=$$GET^HDISVF02(7118.29,51,(FAC_","),"E")
107 Q XTRNL
108 ;
109GETNSVE(SYSPTR) ;Get value of ENDING NON-STANDARD VUID field (#52)
110 ; Input : SYSPTR - Pointer to HDIS System file
111 ; (default to current system)
112 ;Output : Value of field
113 ; Notes : If no value found, null ("") returned
114 N FAC,XTRNL
115 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
116 I 'FAC Q ""
117 S XTRNL=$$GET^HDISVF02(7118.29,52,(FAC_","),"E")
118 Q XTRNL
119 ;
120CALCNSV(SYSPTR) ;Calculate next non-standard VUID
121 ; Input : SYSPTR - Pointer to HDIS System file
122 ; (default to current system)
123 ;Output : Next non-standard VUID centralized VUID server should
124 ; use when assigning non-standard VUIDs.
125 ; Notes : LAST NON-STANDARD VUID field (#51) updated with
126 ; calculated value
127 ; : Locking implemented to prevent simultaneous calculations
128 ; : Null ("") returned on error OR if calculated value exceeds
129 ; allowed ending value (ENDING NON-STANDARD VUID field, #52)
130 N FAC,CVUID,NVUID,EVUID,OK,X
131 S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
132 I 'FAC Q ""
133 S OK=0
134 F X=1:1:10 Q:OK L +^HDISF(7118.29,"CALCULATE NEXT VUID"):1 S:$T OK=1 I 'OK H 1
135 I 'OK Q ""
136 S CVUID=$$GETNSVL($G(SYSPTR))
137 S EVUID=$$GETNSVE($G(SYSPTR))
138 I (CVUID="")!(EVUID="") L -^HDISF(7118.29,"CALCULATE NEXT VUID") Q ""
139 S NVUID=CVUID+1
140 I NVUID>EVUID L -^HDISF(7118.29,"CALCULATE NEXT VUID") Q ""
141 S X=$$SET^HDISVF02(7118.29,51,(FAC_","),NVUID,1)
142 L -^HDISF(7118.29,"CALCULATE NEXT VUID")
143 Q NVUID
144 ;
145 ;---------- End HDIS PARAMETER file APIs ----------
Note: See TracBrowser for help on using the repository browser.