source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMV8PST.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 6.2 KB
Line 
1GMV8PST ;HIOFO/FT-POST-INSTALLATION FOR GMRV*5*8 ;5/3/05 11:48
2 ;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #1157 - ^XPDMENU calls (supported)
6 ; #4639 - ^HDISVCMR calls (supported)
7 ; #4651 - ^HDISVF09 calls (supported)
8 ;
9 ;
10EN ; Driver subroutine
11 D AHDRN,AHDRE
12 D MENU,DEL,FIELD9,XREF1,XREF2,XREF3,ACCESS,KILL,HDIS
13 Q
14 ;
15MENU ; Place vitals options out-of-order so they can no longer be used.
16 N GMVOPT,GMVTXT
17 S GMVOPT="GMRV VMSITE"
18 S GMVTXT="Use the 'New Term Rapid Turnaround' process"
19 D OUT^XPDMENU(GMVOPT,GMVTXT)
20 Q
21DEL ; Delete File 120.52, Field 999
22 ; Get rid of data first
23 N DA,DIE,DR
24 S DA=0,DIE="^GMRD(120.52,",DR="999///@"
25 F S DA=$O(^GMRD(120.52,DA)) Q:'DA D
26 .D ^DIE
27 .K ^GMRD(120.52,DA,"CONV")
28 .Q
29 ;get rid of field definition
30 N DA,DIK
31 S DIK="^DD(120.52,",DA=999,DA(1)=DA
32 D ^DIK
33 Q
34FIELD9 ; Delete File 120.51, Field 9 (VITAL/MEASUREMENT) if it exists.
35 ; Get rid of data first.
36 N DA
37 I $D(^DD(120.51,9,0)) D
38 .S DA=0
39 .F S DA=$O(^GMRD(120.51,DA)) Q:'DA D
40 ..S $P(^GMRD(120.51,DA,0),U,8)=""
41 ..Q
42 .Q
43 ;get rid of field definition
44 N DA,DIK
45 S DA=9 D
46 .Q:'$D(^DD(120.51,DA,0))
47 .S DIK="^DD(120.51,",DA(1)=DA
48 .D ^DIK
49 .Q
50 Q
51XREF1 ; Adds the AMASTERVUID index to file 120.51
52 N GMVXR,GMVRES,GMVOUT
53 S GMVXR("FILE")=120.51
54 S GMVXR("NAME")="AMASTERVUID"
55 S GMVXR("TYPE")="R"
56 S GMVXR("USE")="S"
57 S GMVXR("EXECUTION")="R"
58 S GMVXR("ACTIVITY")="IR"
59 S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
60 S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
61 S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
62 S GMVXR("DESCR",3)="Term/Concept."
63 S GMVXR("VAL",1)=99.99
64 S GMVXR("VAL",1,"SUBSCRIPT")=1
65 S GMVXR("VAL",1,"LENGTH")=30
66 S GMVXR("VAL",1,"COLLATION")="F"
67 S GMVXR("VAL",2)=99.98
68 S GMVXR("VAL",2,"SUBSCRIPT")=2
69 S GMVXR("VAL",2,"COLLATION")="F"
70 D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
71 Q
72XREF2 ; Adds the AMASTERVUID index to file 120.52
73 N GMVXR,GMVRES,GMVOUT
74 S GMVXR("FILE")=120.52
75 S GMVXR("NAME")="AMASTERVUID"
76 S GMVXR("TYPE")="R"
77 S GMVXR("USE")="S"
78 S GMVXR("EXECUTION")="R"
79 S GMVXR("ACTIVITY")="IR"
80 S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
81 S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
82 S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
83 S GMVXR("DESCR",3)="Term/Concept."
84 S GMVXR("VAL",1)=99.99
85 S GMVXR("VAL",1,"SUBSCRIPT")=1
86 S GMVXR("VAL",1,"LENGTH")=30
87 S GMVXR("VAL",1,"COLLATION")="F"
88 S GMVXR("VAL",2)=99.98
89 S GMVXR("VAL",2,"SUBSCRIPT")=2
90 S GMVXR("VAL",2,"COLLATION")="F"
91 D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
92 Q
93XREF3 ; Adds the AMASTERVUID index to file 120.53
94 N GMVXR,GMVRES,GMVOUT
95 S GMVXR("FILE")=120.53
96 S GMVXR("NAME")="AMASTERVUID"
97 S GMVXR("TYPE")="R"
98 S GMVXR("USE")="S"
99 S GMVXR("EXECUTION")="R"
100 S GMVXR("ACTIVITY")="IR"
101 S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
102 S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
103 S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
104 S GMVXR("DESCR",3)="Term/Concept."
105 S GMVXR("VAL",1)=99.99
106 S GMVXR("VAL",1,"SUBSCRIPT")=1
107 S GMVXR("VAL",1,"LENGTH")=30
108 S GMVXR("VAL",1,"COLLATION")="F"
109 S GMVXR("VAL",2)=99.98
110 S GMVXR("VAL",2,"SUBSCRIPT")=2
111 S GMVXR("VAL",2,"COLLATION")="F"
112 D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
113 Q
114ACCESS ; Set file access
115 N GMVFILE,GMVNODE
116 F GMVFILE=120.51,120.52,120.53 D
117 .F GMVNODE="AUDIT","DD","DEL","LAYGO","WR" D
118 ..S ^DIC(GMVFILE,0,GMVNODE)="@"
119 ..Q
120 .Q
121 Q
122KILL ; Kill left over x-ref node
123 K ^DD(120.52,"IX",999)
124 Q
125HDIS ; Call HDIS to begin the 'seeding' process
126 N DOMPTR,TMP
127 S TMP=$$GETIEN^HDISVF09("VITALS",.DOMPTR)
128 D EN^HDISVCMR(DOMPTR,"")
129 Q
130AHDRN ; Create AHDRNEW Index on GMRV Vital Measurement file (#120.5) for use
131 ; by Health Data Repository (HDR)
132 ; Calls HDR API whenever a new entry is made in FILE 120.5
133 N GMVXR,GMVRES,GMVOUT
134 S GMVXR("ACTIVITY")=""
135 S GMVXR("FILE")=120.5
136 S GMVXR("NAME")="AHDRNEW"
137 S GMVXR("TYPE")="MU"
138 S GMVXR("USE")="A"
139 S GMVXR("EXECUTION")="F"
140 S GMVXR("SHORT DESCR")="INDEX for HDR"
141 S GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
142 S GMVXR("DESCR",2)="new entry is created."
143 S GMVXR("DESCR",3)=" "
144 S GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
145 S GMVXR("DESCR",5)=" "
146 S GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
147 S GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
148 S GMVXR("KILL")="Q"
149 S GMVXR("WHOLE KILL")="Q"
150 S GMVXR("SET CONDITION")="I X1(1)="""",X2(1)'="""" S X=1"
151 S GMVXR("VAL",1)=.02
152 D CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
153 I GMVRES="" D
154 .D BMES^XPDUTL("The AHDRNEW Index was not added to FILE 120.5. Please enter a Remedy ticket.")
155 .Q
156 Q
157 ;
158AHDRE ; Create AHDRERR Index on GMRV Vital Measurement file (#120.5) for use
159 ; by Health Data Repository (HDR)
160 ; Calls HDR API whenever a FILE 120.5 entry is marked as an error
161 N GMVXR,GMVRES,GMVOUT
162 S GMVXR("ACTIVITY")=""
163 S GMVXR("FILE")=120.5
164 S GMVXR("NAME")="AHDRERR"
165 S GMVXR("TYPE")="MU"
166 S GMVXR("USE")="A"
167 S GMVXR("EXECUTION")="F"
168 S GMVXR("SHORT DESCR")="INDEX for HDR"
169 S GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
170 S GMVXR("DESCR",2)="FILE 120.5 entry is marked as entered-in-error."
171 S GMVXR("DESCR",3)=" "
172 S GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
173 S GMVXR("DESCR",5)=" "
174 S GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
175 S GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
176 S GMVXR("KILL")="Q"
177 S GMVXR("WHOLE KILL")="Q"
178 S GMVXR("SET CONDITION")="I X1(1)="""",X2(1)]"""" S X=1"
179 S GMVXR("VAL",1)=2
180 D CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
181 I GMVRES="" D
182 .D BMES^XPDUTL("The AHDRERR Index was not added to FILE 120.5. Please enter a Remedy ticket.")
183 .Q
184 Q
Note: See TracBrowser for help on using the repository browser.