source: qrda/C0Q/branches/ohum/kids/C0Q_1_0_0_T10.KID@ 1292

Last change on this file since 1292 was 1292, checked in by George Lilly, 13 years ago

reorganizing the project for ohum contributions

File size: 155.0 KB
Line 
1KIDS Distribution saved on Sep 02, 2011@14:13:43
2added Smoking status and CPOE calculation
3**KIDS**:C0Q*1.0*0^
4
5**INSTALL NAME**
6C0Q*1.0*0
7"BLD",7812,0)
8C0Q*1.0*0^^0^3110902^n
9"BLD",7812,4,0)
10^9.64PA^1130580001.301^4
11"BLD",7812,4,178.301,0)
12178.301
13"BLD",7812,4,178.301,222)
14y^y^f^^n^^y^o^n
15"BLD",7812,4,1130580001.101,0)
161130580001.101
17"BLD",7812,4,1130580001.101,222)
18y^y^f^^^^n^^
19"BLD",7812,4,1130580001.101,224)
20
21"BLD",7812,4,1130580001.201,0)
221130580001.201
23"BLD",7812,4,1130580001.201,222)
24y^y^f^^^^n^^
25"BLD",7812,4,1130580001.201,224)
26
27"BLD",7812,4,1130580001.301,0)
281130580001.301
29"BLD",7812,4,1130580001.301,222)
30y^y^f^^^^n^^
31"BLD",7812,4,1130580001.301,224)
32
33"BLD",7812,4,"B",178.301,178.301)
34
35"BLD",7812,4,"B",1130580001.101,1130580001.101)
36
37"BLD",7812,4,"B",1130580001.201,1130580001.201)
38
39"BLD",7812,4,"B",1130580001.301,1130580001.301)
40
41"BLD",7812,6.3)
4219
43"BLD",7812,"KRN",0)
44^9.67PA^779.2^20
45"BLD",7812,"KRN",.4,0)
46.4
47"BLD",7812,"KRN",.4,"NM",0)
48^9.68A^6^6
49"BLD",7812,"KRN",.4,"NM",1,0)
50C0Q PRINT BY PATIENT FILE #1130580001.201^1130580001.201^0
51"BLD",7812,"KRN",.4,"NM",2,0)
52C0Q PRINT MEASUREMENT SET FILE #1130580001.201^1130580001.201^0
53"BLD",7812,"KRN",.4,"NM",3,0)
54C0Q PRINT QUALITY MEASURES FILE #1130580001.101^1130580001.101^0
55"BLD",7812,"KRN",.4,"NM",4,0)
56C0Q EP SETUP FILE #1130580001.201^1130580001.201^0
57"BLD",7812,"KRN",.4,"NM",5,0)
58C0Q HOS MEASURES FILE #1130580001.201^1130580001.201^0
59"BLD",7812,"KRN",.4,"NM",6,0)
60C0Q MEASUREMENT REPORT FILE #1130580001.201^1130580001.201^0
61"BLD",7812,"KRN",.4,"NM","B","C0Q EP SETUP FILE #1130580001.201",4)
62
63"BLD",7812,"KRN",.4,"NM","B","C0Q HOS MEASURES FILE #1130580001.201",5)
64
65"BLD",7812,"KRN",.4,"NM","B","C0Q MEASUREMENT REPORT FILE #1130580001.201",6)
66
67"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT BY PATIENT FILE #1130580001.201",1)
68
69"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT MEASUREMENT SET FILE #1130580001.201",2)
70
71"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT QUALITY MEASURES FILE #1130580001.101",3)
72
73"BLD",7812,"KRN",.401,0)
74.401
75"BLD",7812,"KRN",.402,0)
76.402
77"BLD",7812,"KRN",.402,"NM",0)
78^9.68A^2^2
79"BLD",7812,"KRN",.402,"NM",1,0)
80C0Q MEASUREMENT SET DEFINE FILE #1130580001.201^1130580001.201^0
81"BLD",7812,"KRN",.402,"NM",2,0)
82C0Q QUALITY MEASURE DEFINITION FILE #1130580001.101^1130580001.101^0
83"BLD",7812,"KRN",.402,"NM","B","C0Q MEASUREMENT SET DEFINE FILE #1130580001.201",1)
84
85"BLD",7812,"KRN",.402,"NM","B","C0Q QUALITY MEASURE DEFINITION FILE #1130580001.101",2)
86
87"BLD",7812,"KRN",.403,0)
88.403
89"BLD",7812,"KRN",.5,0)
90.5
91"BLD",7812,"KRN",.84,0)
92.84
93"BLD",7812,"KRN",3.6,0)
943.6
95"BLD",7812,"KRN",3.8,0)
963.8
97"BLD",7812,"KRN",9.2,0)
989.2
99"BLD",7812,"KRN",9.8,0)
1009.8
101"BLD",7812,"KRN",9.8,"NM",0)
102^9.68A^11^11
103"BLD",7812,"KRN",9.8,"NM",1,0)
104C0QMAIN^^0^B115162981
105"BLD",7812,"KRN",9.8,"NM",2,0)
106C0QGMRAD^^0^B18802718
107"BLD",7812,"KRN",9.8,"NM",3,0)
108C0QGMTSA^^0^B2175692
109"BLD",7812,"KRN",9.8,"NM",4,0)
110C0QGMTSG^^0^B29331917
111"BLD",7812,"KRN",9.8,"NM",5,0)
112C0QERTIM^^0^B7596326
113"BLD",7812,"KRN",9.8,"NM",6,0)
114C0QIMMUN^^0^B6463760
115"BLD",7812,"KRN",9.8,"NM",7,0)
116C0QPQRI^^0^B41579607
117"BLD",7812,"KRN",9.8,"NM",8,0)
118C0QPRML^^0^B51124381
119"BLD",7812,"KRN",9.8,"NM",9,0)
120C0QSET^^0^B8586809
121"BLD",7812,"KRN",9.8,"NM",10,0)
122C0QUPDT^^0^B39929946
123"BLD",7812,"KRN",9.8,"NM",11,0)
124C0QHF^^0^B3166240
125"BLD",7812,"KRN",9.8,"NM","B","C0QERTIM",5)
126
127"BLD",7812,"KRN",9.8,"NM","B","C0QGMRAD",2)
128
129"BLD",7812,"KRN",9.8,"NM","B","C0QGMTSA",3)
130
131"BLD",7812,"KRN",9.8,"NM","B","C0QGMTSG",4)
132
133"BLD",7812,"KRN",9.8,"NM","B","C0QHF",11)
134
135"BLD",7812,"KRN",9.8,"NM","B","C0QIMMUN",6)
136
137"BLD",7812,"KRN",9.8,"NM","B","C0QMAIN",1)
138
139"BLD",7812,"KRN",9.8,"NM","B","C0QPQRI",7)
140
141"BLD",7812,"KRN",9.8,"NM","B","C0QPRML",8)
142
143"BLD",7812,"KRN",9.8,"NM","B","C0QSET",9)
144
145"BLD",7812,"KRN",9.8,"NM","B","C0QUPDT",10)
146
147"BLD",7812,"KRN",19,0)
14819
149"BLD",7812,"KRN",19,"NM",0)
150^9.68A^17^16
151"BLD",7812,"KRN",19,"NM",1,0)
152C0Q BY PATIENT NUMERATOR^^0
153"BLD",7812,"KRN",19,"NM",2,0)
154C0Q DENOMINATOR PATIENT LIST^^0
155"BLD",7812,"KRN",19,"NM",3,0)
156C0Q DISPLAY MEASURE SET^^0
157"BLD",7812,"KRN",19,"NM",4,0)
158C0Q DISPLAY QUALITY MEASURES^^0
159"BLD",7812,"KRN",19,"NM",5,0)
160C0Q EXPORT CCR BY MEASURE^^0
161"BLD",7812,"KRN",19,"NM",6,0)
162C0Q EXPORT MEASURE SET^^0
163"BLD",7812,"KRN",19,"NM",7,0)
164C0Q LIST MEASURE SET^^0
165"BLD",7812,"KRN",19,"NM",8,0)
166C0Q MEASURE SET DEFINITION^^0
167"BLD",7812,"KRN",19,"NM",9,0)
168C0Q QUALITY MEASURE DEFINITION^^0
169"BLD",7812,"KRN",19,"NM",10,0)
170C0Q QUALITY MEASUREMENT MENU^^0
171"BLD",7812,"KRN",19,"NM",12,0)
172C0Q COPY PATIENT LISTS^^0
173"BLD",7812,"KRN",19,"NM",13,0)
174C0Q PQRI MENU^^0
175"BLD",7812,"KRN",19,"NM",14,0)
176C0Q PRINT MEASURES^^0
177"BLD",7812,"KRN",19,"NM",15,0)
178C0Q UPDATE QUALITY MEASUREMENT^^0
179"BLD",7812,"KRN",19,"NM",16,0)
180C0Q PRINT PQRI XML^^0
181"BLD",7812,"KRN",19,"NM",17,0)
182C0Q UPDATE MU MEASURES^^0
183"BLD",7812,"KRN",19,"NM","B","C0Q BY PATIENT NUMERATOR",1)
184
185"BLD",7812,"KRN",19,"NM","B","C0Q COPY PATIENT LISTS",12)
186
187"BLD",7812,"KRN",19,"NM","B","C0Q DENOMINATOR PATIENT LIST",2)
188
189"BLD",7812,"KRN",19,"NM","B","C0Q DISPLAY MEASURE SET",3)
190
191"BLD",7812,"KRN",19,"NM","B","C0Q DISPLAY QUALITY MEASURES",4)
192
193"BLD",7812,"KRN",19,"NM","B","C0Q EXPORT CCR BY MEASURE",5)
194
195"BLD",7812,"KRN",19,"NM","B","C0Q EXPORT MEASURE SET",6)
196
197"BLD",7812,"KRN",19,"NM","B","C0Q LIST MEASURE SET",7)
198
199"BLD",7812,"KRN",19,"NM","B","C0Q MEASURE SET DEFINITION",8)
200
201"BLD",7812,"KRN",19,"NM","B","C0Q PQRI MENU",13)
202
203"BLD",7812,"KRN",19,"NM","B","C0Q PRINT MEASURES",14)
204
205"BLD",7812,"KRN",19,"NM","B","C0Q PRINT PQRI XML",16)
206
207"BLD",7812,"KRN",19,"NM","B","C0Q QUALITY MEASURE DEFINITION",9)
208
209"BLD",7812,"KRN",19,"NM","B","C0Q QUALITY MEASUREMENT MENU",10)
210
211"BLD",7812,"KRN",19,"NM","B","C0Q UPDATE MU MEASURES",17)
212
213"BLD",7812,"KRN",19,"NM","B","C0Q UPDATE QUALITY MEASUREMENT",15)
214
215"BLD",7812,"KRN",19.1,0)
21619.1
217"BLD",7812,"KRN",101,0)
218101
219"BLD",7812,"KRN",409.61,0)
220409.61
221"BLD",7812,"KRN",771,0)
222771
223"BLD",7812,"KRN",779.2,0)
224779.2
225"BLD",7812,"KRN",870,0)
226870
227"BLD",7812,"KRN",8989.51,0)
2288989.51
229"BLD",7812,"KRN",8989.52,0)
2308989.52
231"BLD",7812,"KRN",8994,0)
2328994
233"BLD",7812,"KRN","B",.4,.4)
234
235"BLD",7812,"KRN","B",.401,.401)
236
237"BLD",7812,"KRN","B",.402,.402)
238
239"BLD",7812,"KRN","B",.403,.403)
240
241"BLD",7812,"KRN","B",.5,.5)
242
243"BLD",7812,"KRN","B",.84,.84)
244
245"BLD",7812,"KRN","B",3.6,3.6)
246
247"BLD",7812,"KRN","B",3.8,3.8)
248
249"BLD",7812,"KRN","B",9.2,9.2)
250
251"BLD",7812,"KRN","B",9.8,9.8)
252
253"BLD",7812,"KRN","B",19,19)
254
255"BLD",7812,"KRN","B",19.1,19.1)
256
257"BLD",7812,"KRN","B",101,101)
258
259"BLD",7812,"KRN","B",409.61,409.61)
260
261"BLD",7812,"KRN","B",771,771)
262
263"BLD",7812,"KRN","B",779.2,779.2)
264
265"BLD",7812,"KRN","B",870,870)
266
267"BLD",7812,"KRN","B",8989.51,8989.51)
268
269"BLD",7812,"KRN","B",8989.52,8989.52)
270
271"BLD",7812,"KRN","B",8994,8994)
272
273"BLD",7812,"QUES",0)
274^9.62^^
275"DATA",178.301,1,0)
276TEST
277"DATA",178.301,1,9,0)
278^178.3014^2^2
279"DATA",178.301,1,9,1,0)
280//TEST/ONE
281"DATA",178.301,1,9,1,2)
282TESTONE
283"DATA",178.301,1,9,2,0)
284//TEST/TWO
285"DATA",178.301,1,9,2,1)
286DFN
287"DATA",178.301,1,9,2,2)
288TESTTWO
289"DATA",178.301,2,0)
290ICD9
291"DATA",178.301,2,1)
292http://www.webservicemart.com/icd9code.asmx/ICD9Codes
293"DATA",178.301,2,2)
294http://www.webservicemart.com/icd9code.asmx?op=ICD9Codes
295"DATA",178.301,2,3,0)
296^178.311^11^11^3100225^^^^
297"DATA",178.301,2,3,1,0)
298<?xml version="1.0" encoding="utf-8"?>
299"DATA",178.301,2,3,2,0)
300<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
301"DATA",178.301,2,3,3,0)
302xmlns:xsd="http://www.w3.org/2001/XMLSchema"
303"DATA",178.301,2,3,4,0)
304xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
305"DATA",178.301,2,3,5,0)
306 <soap:Body>
307"DATA",178.301,2,3,6,0)
308 <ICD9Codes xmlns="http://webservicemart.com/ws/">
309"DATA",178.301,2,3,7,0)
310 <Code>string</Code>
311"DATA",178.301,2,3,8,0)
312 <CodeLenght>string</CodeLenght>
313"DATA",178.301,2,3,9,0)
314 </ICD9Codes>
315"DATA",178.301,2,3,10,0)
316 </soap:Body>
317"DATA",178.301,2,3,11,0)
318</soap:Envelope>
319"DATA",178.301,2,6)
320http://76.110.216.135/icd9code.asmx/ICD9Codes
321"DATA",178.301,2,8,0)
322^178.3013^11^11^3100225^^
323"DATA",178.301,2,8,1,0)
324<?xml version="1.0" encoding="utf-8" ?>
325"DATA",178.301,2,8,2,0)
326<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
327"DATA",178.301,2,8,3,0)
328xmlns:xsd="http://www.w3.org/2001/XMLSchema"
329"DATA",178.301,2,8,4,0)
330xmlns:soap="http://schemas.xmls>
331"DATA",178.301,2,8,5,0)
332<soap:Body>
333"DATA",178.301,2,8,6,0)
334<ICD9Codes xmlns="http://webservicemart.com/ws/">
335"DATA",178.301,2,8,7,0)
336<Code>@@//soap:Envelope/soap:Body/ICD9Codes/Code@@</Code>
337"DATA",178.301,2,8,8,0)
338<CodeLenght>@@//soap:Envelope/soap:Body/ICD9Codes/CodeLenght@@</CodeLenght>
339"DATA",178.301,2,8,9,0)
340</ICD9Codes>
341"DATA",178.301,2,8,10,0)
342</soap:Body>
343"DATA",178.301,2,8,11,0)
344</soap:Envelope>
345"DATA",178.301,2,9,0)
346^178.3014^5^5
347"DATA",178.301,2,9,1,0)
348//soap:Envelope
349"DATA",178.301,2,9,2,0)
350//soap:Envelope/soap:Body
351"DATA",178.301,2,9,3,0)
352//soap:Envelope/soap:Body/ICD9Codes
353"DATA",178.301,2,9,4,0)
354//soap:Envelope/soap:Body/ICD9Codes/Code
355"DATA",178.301,2,9,4,2)
356CODE
357"DATA",178.301,2,9,5,0)
358//soap:Envelope/soap:Body/ICD9Codes/CodeLenght
359"DATA",178.301,2,9,5,2)
360CODELN
361"DATA",178.301,2,10,0)
362^^4^4^3100226^
363"DATA",178.301,2,10,1,0)
364User-Agent: Mozilla/4.0
365"DATA",178.301,2,10,2,0)
366SOAPAction: "http://webservicemart.com/ws/ICD9Codes"
367"DATA",178.301,2,10,3,0)
368Expect: 100-continue
369"DATA",178.301,2,10,4,0)
370Connection: Keep-Alive
371"DATA",178.301,3,0)
372ICD9RESULT
373"DATA",178.301,3,3,0)
374^^31^31^3100227^
375"DATA",178.301,3,3,1,0)
376<?xml version="1.0" encoding="utf-8"?>
377"DATA",178.301,3,3,2,0)
378<items>
379"DATA",178.301,3,3,3,0)
380<item code="E01" description="*HIGH REFRACTIVE ERROR (+/-8 DIOPTRE OR MORE)"/>
381"DATA",178.301,3,3,4,0)
382<item code="E02" description="*CHANGE OF 0.5 DIOPTRES OR &gt; TO SPHERICAL OR CYLINDER LENS."/>
383"DATA",178.301,3,3,5,0)
384<item code="E03" description="*0.5 DIOPTRES OR GREATER CHANGE TO CYLINDER LENS"/>
385"DATA",178.301,3,3,6,0)
386<item code="E04" description="*CHANGE IN AXIS = &gt; CYLINDER LENS OF .5 DIOPTRES AND &lt;20 DEGREE"/>
387"DATA",178.301,3,3,7,0)
388<item code="E05" description="*CHANGE IN AXIS OF =/&gt; 20 DEGREES FOR A CYLINDER LENS OF 0.5 DIOPTRE OR &lt;"/>
389"DATA",178.301,3,3,8,0)
390<item code="E06" description="*10 DEGREES FOR A CYLINDER LENS OF &gt;0.5 DIOPTRE BUT NOT &gt;1.0 DIOPTRE"/>
391"DATA",178.301,3,3,9,0)
392<item code="E07" description="*INTRAOCULAR SURGERY"/>
393"DATA",178.301,3,3,10,0)
394<item code="E08" description="MEDICATIONS"/>
395"DATA",178.301,3,3,11,0)
396<item code="E09" description="*3 DEGREES FOR A CYLINDER LENS OF MORE THAN 1.0 DIOPTRE"/>
397"DATA",178.301,3,3,12,0)
398<item code="E01" description="*HIGH REFRACTIVE ERROR (+/-8 DIOPTRE OR MORE)"/>
399"DATA",178.301,3,3,13,0)
400<item code="E02" description="*CHANGE OF 0.5 DIOPTRES OR &gt; TO SPHERICAL OR CYLINDER LENS."/>
401"DATA",178.301,3,3,14,0)
402<item code="E03" description="*0.5 DIOPTRES OR GREATER CHANGE TO CYLINDER LENS"/>
403"DATA",178.301,3,3,15,0)
404<item code="E04" description="*CHANGE IN AXIS = &gt; CYLINDER LENS OF .5 DIOPTRES AND &lt;20 DEGREE"/>
405"DATA",178.301,3,3,16,0)
406<item code="E05" description="*CHANGE IN AXIS OF =/&gt; 20 DEGREES FOR A CYLINDER LENS OF 0.5 DIOPTRE OR &lt;"/>
407"DATA",178.301,3,3,17,0)
408<item code="E06" description="*10 DEGREES FOR A CYLINDER LENS OF &gt;0.5 DIOPTRE BUT NOT &gt;1.0 DIOPTRE"/>
409"DATA",178.301,3,3,18,0)
410<item code="E07" description="*INTRAOCULAR SURGERY"/>
411"DATA",178.301,3,3,19,0)
412<item code="E08" description="MEDICATIONS"/>
413"DATA",178.301,3,3,20,0)
414<item code="E09" description="*3 DEGREES FOR A CYLINDER LENS OF MORE THAN 1.0 DIOPTRE"/>
415"DATA",178.301,3,3,21,0)
416<item code="E10" description="*PREVIOUSLY +/- 8 D OR GREATER, AT RISK OF RETINAL DETACHMENT"/>
417"DATA",178.301,3,3,22,0)
418<item code="E91" description="*NO INDICATOR PRESENT"/>
419"DATA",178.301,3,3,23,0)
420<item code="E92" description="*INDICATOR OF OCULAR PATHOLOGY: EXTERNAL"/>
421"DATA",178.301,3,3,24,0)
422<item code="E93" description="*INDICATOR OF OCULAR PATHOLOGY: INTERNAL"/>
423"DATA",178.301,3,3,25,0)
424<item code="E94" description="*INDICATOR OF BINOCULARITY: PHORIA"/>
425"DATA",178.301,3,3,26,0)
426<item code="E95" description="*INDICATOR OF BINOCULARITY: STRABISMUS"/>
427"DATA",178.301,3,3,27,0)
428<item code="E96" description="*INDICATOR OF VISION: AMBLYOPIA"/>
429"DATA",178.301,3,3,28,0)
430<item code="E97" description="*INDICATOR OF REFRACTIVE ERROR: ASTIGMATISM"/>
431"DATA",178.301,3,3,29,0)
432<item code="E98" description="*INDICATOR OF REFRACTIVE ERROR: HYPEROPIA"/>
433"DATA",178.301,3,3,30,0)
434<item code="E99" description="*INDICATOR OF REFRACTIVE ERROR: MYOPIA"/>
435"DATA",178.301,3,3,31,0)
436</items>
437"DATA",178.301,4,0)
438PQRIXML
439"DATA",178.301,4,3,0)
440^^42^42^3110620^
441"DATA",178.301,4,3,1,0)
442<?xml version="1.0" encoding="UTF-8"?>
443"DATA",178.301,4,3,2,0)
444<submission type="PQRI-REGISTRY" option="PAYMENT" version="2.0"
445"DATA",178.301,4,3,3,0)
446xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
447"DATA",178.301,4,3,4,0)
448xsi:noNamespaceSchemaLocation="Registry_Payment.xsd">
449"DATA",178.301,4,3,5,0)
450<file-audit-data>
451"DATA",178.301,4,3,6,0)
452<create-date>12-10-2010</create-date>
453"DATA",178.301,4,3,7,0)
454<create-time>14:27</create-time>
455"DATA",178.301,4,3,8,0)
456<create-by>RegistryA</create-by>
457"DATA",178.301,4,3,9,0)
458<version>1.0</version>
459"DATA",178.301,4,3,10,0)
460<file-number>1</file-number>
461"DATA",178.301,4,3,11,0)
462<number-of-files>9</number-of-files>
463"DATA",178.301,4,3,12,0)
464</file-audit-data>
465"DATA",178.301,4,3,13,0)
466<registry>
467"DATA",178.301,4,3,14,0)
468<registry-name>Model Registry</registry-name>
469"DATA",178.301,4,3,15,0)
470<registry-id>125789123</registry-id>
471"DATA",178.301,4,3,16,0)
472<submission-method>C</submission-method>
473"DATA",178.301,4,3,17,0)
474</registry>
475"DATA",178.301,4,3,18,0)
476<measure-group ID="C">
477"DATA",178.301,4,3,19,0)
478<provider>
479"DATA",178.301,4,3,20,0)
480<npi>12011989</npi>
481"DATA",178.301,4,3,21,0)
482<tin>387682321</tin>
483"DATA",178.301,4,3,22,0)
484<waiver-signed>Y</waiver-signed>
485"DATA",178.301,4,3,23,0)
486<encounter-from-date>06-13-2010</encounter-from-date>
487"DATA",178.301,4,3,24,0)
488<encounter-to-date>12-10-2010</encounter-to-date>
489"DATA",178.301,4,3,25,0)
490<measure-group-stat>
491"DATA",178.301,4,3,26,0)
492<ffs-patient-count>2</ffs-patient-count>
493"DATA",178.301,4,3,27,0)
494<group-reporting-rate-numerator>20</group-reporting-rate-numerator>
495"DATA",178.301,4,3,28,0)
496<group-eligible-instances>30</group-eligible-instances>
497"DATA",178.301,4,3,29,0)
498<group-reporting-rate>66.67</group-reporting-rate>
499"DATA",178.301,4,3,30,0)
500</measure-group-stat>
501"DATA",178.301,4,3,31,0)
502<pqri-measure>
503"DATA",178.301,4,3,32,0)
504<pqri-measure-number>128</pqri-measure-number>
505"DATA",178.301,4,3,33,0)
506<eligible-instances>100</eligible-instances>
507"DATA",178.301,4,3,34,0)
508<meets-performance-instances>18</meets-performance-instances>
509"DATA",178.301,4,3,35,0)
510<performance-exclusion-instances>0</performance-exclusion-instances>
511"DATA",178.301,4,3,36,0)
512<performance-not-met-instances>10</performance-not-met-instances>
513"DATA",178.301,4,3,37,0)
514<reporting-rate>28.00</reporting-rate>
515"DATA",178.301,4,3,38,0)
516<performance-rate>90.00</performance-rate>
517"DATA",178.301,4,3,39,0)
518</pqri-measure>
519"DATA",178.301,4,3,40,0)
520</provider>
521"DATA",178.301,4,3,41,0)
522</measure-group>
523"DATA",178.301,4,3,42,0)
524</submission>
525"DATA",178.301,4,8,0)
526^^42^42^3110614^
527"DATA",178.301,4,8,1,0)
528<?xml version="1.0" encoding="utf-8" ?>
529"DATA",178.301,4,8,2,0)
530<submission type="PQRI-REGISTRY" option="PAYMENT" version="2.0"
531"DATA",178.301,4,8,3,0)
532xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
533"DATA",178.301,4,8,4,0)
534xsi:noNamespaceSchemaLocation="Registry_Payment.xsd">
535"DATA",178.301,4,8,5,0)
536<file-audit-data>
537"DATA",178.301,4,8,6,0)
538<create-date>@@//submission/file-audit-data/create-date@@</create-date>
539"DATA",178.301,4,8,7,0)
540<create-time>@@//submission/file-audit-data/create-time@@</create-time>
541"DATA",178.301,4,8,8,0)
542<create-by>@@//submission/file-audit-data/create-by@@</create-by>
543"DATA",178.301,4,8,9,0)
544<version>@@//submission/file-audit-data/version@@</version>
545"DATA",178.301,4,8,10,0)
546<file-number>@@//submission/file-audit-data/file-number@@</file-number>
547"DATA",178.301,4,8,11,0)
548<number-of-files>@@//submission/file-audit-data/number-of-files@@</number-of-files>
549"DATA",178.301,4,8,12,0)
550</file-audit-data>
551"DATA",178.301,4,8,13,0)
552<registry>
553"DATA",178.301,4,8,14,0)
554<registry-name>@@//submission/registry/registry-name@@</registry-name>
555"DATA",178.301,4,8,15,0)
556<registry-id>@@//submission/registry/registry-id@@</registry-id>
557"DATA",178.301,4,8,16,0)
558<submission-method>@@//submission/registry/submission-method@@</submission-method>
559"DATA",178.301,4,8,17,0)
560</registry>
561"DATA",178.301,4,8,18,0)
562<measure-group ID='C'>
563"DATA",178.301,4,8,19,0)
564<provider>
565"DATA",178.301,4,8,20,0)
566<npi>@@//submission/measure-group/provider/npi@@</npi>
567"DATA",178.301,4,8,21,0)
568<tin>@@//submission/measure-group/provider/tin@@</tin>
569"DATA",178.301,4,8,22,0)
570<waiver-signed>@@//submission/measure-group/provider/waiver-signed@@</waiver-signed>
571"DATA",178.301,4,8,23,0)
572<encounter-from-date>@@//submission/measure-group/provider/encounter-from-date@@</encounter-from-date>
573"DATA",178.301,4,8,24,0)
574<encounter-to-date>@@//submission/measure-group/provider/encounter-to-date@@</encounter-to-date>
575"DATA",178.301,4,8,25,0)
576<measure-group-stat>
577"DATA",178.301,4,8,26,0)
578<ffs-patient-count>@@//submission/measure-group/provider/measure-group-stat/ffs-patient-count@@</ffs-patient-count>
579"DATA",178.301,4,8,27,0)
580<group-reporting-rate-numerator>@@//submission/measure-group/provider/measure-group-stat/group-reporting-rate-numerator@@</group-reporting-rate-numerator>
581"DATA",178.301,4,8,28,0)
582<group-eligible-instances>@@//submission/measure-group/provider/measure-group-stat/group-eligible-instances@@</group-eligible-instances>
583"DATA",178.301,4,8,29,0)
584<group-reporting-rate>@@//submission/measure-group/provider/measure-group-stat/group-reporting-rate@@</group-reporting-rate>
585"DATA",178.301,4,8,30,0)
586</measure-group-stat>
587"DATA",178.301,4,8,31,0)
588<pqri-measure>
589"DATA",178.301,4,8,32,0)
590<pqri-measure-number>@@//submission/measure-group/provider/pqri-measure/pqri-measure-number@@</pqri-measure-number>
591"DATA",178.301,4,8,33,0)
592<eligible-instances>@@//submission/measure-group/provider/pqri-measure/eligible-instances@@</eligible-instances>
593"DATA",178.301,4,8,34,0)
594<meets-performance-instances>@@//submission/measure-group/provider/pqri-measure/meets-performance-instances@@</meets-performance-instances>
595"DATA",178.301,4,8,35,0)
596<performance-exclusion-instances>@@//submission/measure-group/provider/pqri-measure/performance-exclusion-instances@@</performance-exclusion-instances>
597"DATA",178.301,4,8,36,0)
598<performance-not-met-instances>@@//submission/measure-group/provider/pqri-measure/performance-not-met-instances@@</performance-not-met-instances>
599"DATA",178.301,4,8,37,0)
600<reporting-rate>@@//submission/measure-group/provider/pqri-measure/reporting-rate@@</reporting-rate>
601"DATA",178.301,4,8,38,0)
602<performance-rate>@@//submission/measure-group/provider/pqri-measure/performance-rate@@</performance-rate>
603"DATA",178.301,4,8,39,0)
604</pqri-measure>
605"DATA",178.301,4,8,40,0)
606</provider>
607"DATA",178.301,4,8,41,0)
608</measure-group>
609"DATA",178.301,4,8,42,0)
610</submission>
611"DATA",178.301,4,9,0)
612^178.3014^25^25
613"DATA",178.301,4,9,1,0)
614//submission/file-audit-data/create-by
615"DATA",178.301,4,9,1,1)
616a
617"DATA",178.301,4,9,1,2)
618create-by
619"DATA",178.301,4,9,2,0)
620//submission/file-audit-data/create-date
621"DATA",178.301,4,9,2,2)
622create-date
623"DATA",178.301,4,9,3,0)
624//submission/file-audit-data/create-time
625"DATA",178.301,4,9,3,2)
626create-time
627"DATA",178.301,4,9,4,0)
628//submission/file-audit-data/file-number
629"DATA",178.301,4,9,4,2)
630file-number
631"DATA",178.301,4,9,5,0)
632//submission/file-audit-data/number-of-files
633"DATA",178.301,4,9,5,2)
634number-of-files
635"DATA",178.301,4,9,6,0)
636//submission/file-audit-data/version
637"DATA",178.301,4,9,6,2)
638version
639"DATA",178.301,4,9,7,0)
640//submission/measure-group/provider/encounter-from-date
641"DATA",178.301,4,9,7,2)
642encounter-from-date
643"DATA",178.301,4,9,8,0)
644//submission/measure-group/provider/encounter-to-date
645"DATA",178.301,4,9,8,2)
646encounter-to-date
647"DATA",178.301,4,9,9,0)
648//submission/measure-group/provider/measure-group-stat/ffs-patient-count
649"DATA",178.301,4,9,9,2)
650ffs-patient-count
651"DATA",178.301,4,9,10,0)
652//submission/measure-group/provider/measure-group-stat/group-eligible-instances
653"DATA",178.301,4,9,10,2)
654group-eligible-instances
655"DATA",178.301,4,9,11,0)
656//submission/measure-group/provider/measure-group-stat/group-reporting-rate
657"DATA",178.301,4,9,11,2)
658group-reporting-rate
659"DATA",178.301,4,9,12,0)
660//submission/measure-group/provider/measure-group-stat/group-reporting-rate-numerator
661"DATA",178.301,4,9,12,2)
662group-reporting-rate-numerator
663"DATA",178.301,4,9,13,0)
664//submission/measure-group/provider/npi
665"DATA",178.301,4,9,13,2)
666npi
667"DATA",178.301,4,9,14,0)
668//submission/measure-group/provider/pqri-measure/eligible-instances
669"DATA",178.301,4,9,14,2)
670eligible-instances
671"DATA",178.301,4,9,15,0)
672//submission/measure-group/provider/pqri-measure/meets-performance-instances
673"DATA",178.301,4,9,15,2)
674meets-performance-instances
675"DATA",178.301,4,9,16,0)
676//submission/measure-group/provider/pqri-measure/performance-exclusion-instances
677"DATA",178.301,4,9,16,2)
678performance-exclusion-instances
679"DATA",178.301,4,9,17,0)
680//submission/measure-group/provider/pqri-measure/performance-not-met-instances
681"DATA",178.301,4,9,17,2)
682performance-not-met-instances
683"DATA",178.301,4,9,18,0)
684//submission/measure-group/provider/pqri-measure/performance-rate
685"DATA",178.301,4,9,18,2)
686performance-rate
687"DATA",178.301,4,9,19,0)
688//submission/measure-group/provider/pqri-measure/pqri-measure-number
689"DATA",178.301,4,9,19,2)
690pqri-measure-number
691"DATA",178.301,4,9,20,0)
692//submission/measure-group/provider/pqri-measure/reporting-rate
693"DATA",178.301,4,9,20,2)
694reporting-rate
695"DATA",178.301,4,9,21,0)
696//submission/measure-group/provider/tin
697"DATA",178.301,4,9,21,2)
698tin
699"DATA",178.301,4,9,22,0)
700//submission/measure-group/provider/waiver-signed
701"DATA",178.301,4,9,22,2)
702waiver-signed
703"DATA",178.301,4,9,23,0)
704//submission/registry/registry-id
705"DATA",178.301,4,9,23,2)
706registry-id
707"DATA",178.301,4,9,24,0)
708//submission/registry/registry-name
709"DATA",178.301,4,9,24,2)
710registry-name
711"DATA",178.301,4,9,25,0)
712//submission/registry/submission-method
713"DATA",178.301,4,9,25,2)
714submission-method
715"DATA",178.301,5,0)
716PQRI ONE MEASURE
717"DATA",178.301,5,3,0)
718^^12^12^3110620^
719"DATA",178.301,5,3,1,0)
720<?xml version="1.0" encoding="UTF-8"?>
721"DATA",178.301,5,3,2,0)
722<root>
723"DATA",178.301,5,3,3,0)
724<pqri-measure>
725"DATA",178.301,5,3,4,0)
726<pqri-measure-number>@@pqri-measure-number@@</pqri-measure-number>
727"DATA",178.301,5,3,5,0)
728<eligible-instances>@@eligible-instances@@</eligible-instances>
729"DATA",178.301,5,3,6,0)
730<meets-performance-instances>@@meets-performance-instances@@</meets-performance-instances>
731"DATA",178.301,5,3,7,0)
732<performance-exclusion-instances>@@performance-exclusion-instances@@</performance-exclusion-instances>
733"DATA",178.301,5,3,8,0)
734<performance-not-met-instances>@@performance-not-met-instances@@</performance-not-met-instances>
735"DATA",178.301,5,3,9,0)
736<reporting-rate>@@reporting-rate@@</reporting-rate>
737"DATA",178.301,5,3,10,0)
738<performance-rate>@@performance-rate@@</performance-rate>
739"DATA",178.301,5,3,11,0)
740</pqri-measure>
741"DATA",178.301,5,3,12,0)
742</root>
743"FIA",178.301)
744C0C XML MISC
745"FIA",178.301,0)
746^C0CX(178.301,
747"FIA",178.301,0,0)
748178.301
749"FIA",178.301,0,1)
750y^y^f^^n^^y^o^n
751"FIA",178.301,0,10)
752
753"FIA",178.301,0,11)
754
755"FIA",178.301,0,"RLRO")
756
757"FIA",178.301,178.301)
7580
759"FIA",178.301,178.3013)
7600
761"FIA",178.301,178.3014)
7620
763"FIA",178.301,178.311)
7640
765"FIA",178.301,178.321)
7660
767"FIA",1130580001.101)
768C0Q QUALITY MEASURE
769"FIA",1130580001.101,0)
770^C0Q(101,
771"FIA",1130580001.101,0,0)
7721130580001.101I
773"FIA",1130580001.101,0,1)
774y^y^f^^^^n^^
775"FIA",1130580001.101,0,10)
776
777"FIA",1130580001.101,0,11)
778
779"FIA",1130580001.101,0,"RLRO")
780
781"FIA",1130580001.101,1130580001.101)
7820
783"FIA",1130580001.101,1130580001.111)
7840
785"FIA",1130580001.201)
786C0Q MEASUREMENTS
787"FIA",1130580001.201,0)
788^C0Q(201,
789"FIA",1130580001.201,0,0)
7901130580001.201
791"FIA",1130580001.201,0,1)
792y^y^f^^^^n^^
793"FIA",1130580001.201,0,10)
794
795"FIA",1130580001.201,0,11)
796
797"FIA",1130580001.201,0,"RLRO")
798
799"FIA",1130580001.201,1130580001.201)
8000
801"FIA",1130580001.201,1130580001.2011)
8020
803"FIA",1130580001.201,1130580001.20111)
8040
805"FIA",1130580001.201,1130580001.20112)
8060
807"FIA",1130580001.301)
808C0Q PATIENT LIST
809"FIA",1130580001.301,0)
810^C0Q(301,
811"FIA",1130580001.301,0,0)
8121130580001.301I
813"FIA",1130580001.301,0,1)
814y^y^f^^^^n^^
815"FIA",1130580001.301,0,10)
816
817"FIA",1130580001.301,0,11)
818
819"FIA",1130580001.301,0,"RLRO")
820
821"FIA",1130580001.301,1130580001.301)
8220
823"FIA",1130580001.301,1130580001.311)
8240
825"FIA",1130580001.301,1130580001.3111)
8260
827"FIA",1130580001.301,1130580001.321)
8280
829"IX",178.301,178.301,"XPATH",0)
830178.301^XPATH^REGULAR WHOLE FILE INDEX ON XPATH BY TEMPLATE^R^^F^IR^W^178.3014^^^^^LS
831"IX",178.301,178.301,"XPATH",1)
832S ^C0CX(178.301,"XPATH",X(2),$E(X(1),1,240),DA(1),DA)=""
833"IX",178.301,178.301,"XPATH",2)
834K ^C0CX(178.301,"XPATH",X(2),$E(X(1),1,240),DA(1),DA)
835"IX",178.301,178.301,"XPATH",2.5)
836K ^C0CX(178.301,"XPATH")
837"IX",178.301,178.301,"XPATH",11.1,0)
838^.114IA^2^2
839"IX",178.301,178.301,"XPATH",11.1,1,0)
8401^F^178.3014^.01^240^2^F
841"IX",178.301,178.301,"XPATH",11.1,1,3)
842
843"IX",178.301,178.301,"XPATH",11.1,2,0)
8442^C^^^^1
845"IX",178.301,178.301,"XPATH",11.1,2,1.5)
846S X=DA(1)
847"IX",1130580001.301,1130580001.301,"CATTR",0)
8481130580001.301^CATTR^ATTRIBUTE TO TIE PATIENT LIST RECORD TO INTERNAL ARRAYS^R^^F^IR^I^1130580001.301^^^^^LS
849"IX",1130580001.301,1130580001.301,"CATTR",1)
850S ^C0Q(301,"CATTR",$E(X,1,64),DA)=""
851"IX",1130580001.301,1130580001.301,"CATTR",2)
852K ^C0Q(301,"CATTR",$E(X,1,64),DA)
853"IX",1130580001.301,1130580001.301,"CATTR",2.5)
854K ^C0Q(301,"CATTR")
855"IX",1130580001.301,1130580001.301,"CATTR",11.1,0)
856^.114IA^1^1
857"IX",1130580001.301,1130580001.301,"CATTR",11.1,1,0)
8581^F^1130580001.301^999^64^1^F
859"KRN",.4,1589,-1)
8600^3
861"KRN",.4,1589,0)
862C0Q PRINT QUALITY MEASURES^3101012.2017^@^1130580001.101^^@^3110502
863"KRN",.4,1589,"F",2)
864.01~.5~1~2~
865"KRN",.4,1589,"H")
866C0Q QUAILITY MEASURE LIST
867"KRN",.4,1590,-1)
8680^2
869"KRN",.4,1590,0)
870C0Q PRINT MEASUREMENT SET^3101012.2337^@^1130580001.201^^@^3110502
871"KRN",.4,1590,"F",2)
872.01~.02~.03~.05~.2~1,.01~1,1,.01~1,1.1~1,2,.01~1,2.1~1,3~
873"KRN",.4,1590,"H")
874C0Q MEASUREMENTS LIST
875"KRN",.4,1591,-1)
8760^1
877"KRN",.4,1591,0)
878C0Q PRINT BY PATIENT^3101014.2342^@^1130580001.201^^@^3101014
879"KRN",.4,1591,"F",2)
880.01~1,.01~1,2,.01~
881"KRN",.4,1591,"H")
882C0Q MEASUREMENTS LIST
883"KRN",.4,1592,-1)
8840^5
885"KRN",.4,1592,0)
886C0Q HOS MEASURES^3110430.1539^@^1130580001.201^^@^3110430
887"KRN",.4,1592,"DXS",1,9.2)
888S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,1)):^(1),1:"")
889"KRN",.4,1592,"DXS",2,9.2)
890S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"")
891"KRN",.4,1592,"DXS",3,9.2)
892S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"")
893"KRN",.4,1592,"F",1)
894.01~1,.01~1,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:TITLE"~
895"KRN",.4,1592,"F",2)
8961,X DXS(2,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,2),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:NUMERATOR"~
897"KRN",.4,1592,"F",3)
8981,X DXS(3,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,3),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:DENOMINATOR"~
899"KRN",.4,1592,"H")
900C0Q MEASUREMENTS LIST
901"KRN",.4,1593,-1)
9020^4
903"KRN",.4,1593,0)
904C0Q EP SETUP^3110430.1927^@^1130580001.201^^@^3110502
905"KRN",.4,1593,"DXS",1,9.2)
906S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,1)):^(1),1:"")
907"KRN",.4,1593,"DXS",2,9.2)
908S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"")
909"KRN",.4,1593,"DXS",3,9.2)
910S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"")
911"KRN",.4,1593,"F",1)
912.01~1,.01~1,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:TITLE"~
913"KRN",.4,1593,"F",2)
9141,X DXS(2,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,2),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:NUMERATOR"~
915"KRN",.4,1593,"F",3)
9161,X DXS(3,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,3),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:DENOMINATOR"~
917"KRN",.4,1593,"H")
918C0Q MEASUREMENTS LIST
919"KRN",.4,1594,-1)
9200^6
921"KRN",.4,1594,0)
922C0Q MEASUREMENT REPORT^3110512.1707^@^1130580001.201^^@^3110902
923"KRN",.4,1594,"DXS",1,9.2)
924S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,5)):^(5),1:"")
925"KRN",.4,1594,"F",2)
9261,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) K DIP;W25;S;Z;"MEASURE:DISPLAY NAME"~1,2.1;"DENOMINATOR";C27~1,1.1;"NUMERATOR"~1,3;C62~
927"KRN",.4,1594,"H")
928C0Q MEASUREMENTS LIST
929"KRN",.402,1778,-1)
9300^2
931"KRN",.402,1778,0)
932C0Q QUALITY MEASURE DEFINITION^3101012.1927^@^1130580001.101^^@^3110809
933"KRN",.402,1778,"DR",1,1130580001.101)
934.01;.5;1;2;
935"KRN",.402,1779,-1)
9360^1
937"KRN",.402,1779,0)
938C0Q MEASUREMENT SET DEFINE^3101012.1929^@^1130580001.201^^@^3110621
939"KRN",.402,1779,"DR",1,1130580001.201)
940.01;1;
941"KRN",.402,1779,"DR",2,1130580001.2011)
942.01;
943"KRN",19,11104,-1)
9440^9
945"KRN",19,11104,0)
946C0Q QUALITY MEASURE DEFINITION^QUALITY MEASURE DEFINITION^^E^^^^^^^^
947"KRN",19,11104,30)
948C0Q(101,
949"KRN",19,11104,31)
950AEMQL
951"KRN",19,11104,50)
952C0Q(101,
953"KRN",19,11104,51)
954[C0Q QUALITY MEASURE DEFINITION]
955"KRN",19,11104,"U")
956QUALITY MEASURE DEFINITION
957"KRN",19,11105,-1)
9580^8
959"KRN",19,11105,0)
960C0Q MEASURE SET DEFINITION^MEASURE SET DEFINITION^^E^^^^^^^^
961"KRN",19,11105,30)
962C0Q(201,
963"KRN",19,11105,31)
964AEMQL
965"KRN",19,11105,50)
966C0Q(201,
967"KRN",19,11105,51)
968[C0Q MEASUREMENT SET DEFINE]
969"KRN",19,11105,"U")
970MEASURE SET DEFINITION
971"KRN",19,11106,-1)
9720^10
973"KRN",19,11106,0)
974C0Q QUALITY MEASUREMENT MENU^QUALITY MEASUREMENT MENU^^M^^^^^^^^
975"KRN",19,11106,10,0)
976^19.01IP^15^15
977"KRN",19,11106,10,1,0)
97811105
979"KRN",19,11106,10,1,"^")
980C0Q MEASURE SET DEFINITION
981"KRN",19,11106,10,2,0)
98211104
983"KRN",19,11106,10,2,"^")
984C0Q QUALITY MEASURE DEFINITION
985"KRN",19,11106,10,6,0)
98611110
987"KRN",19,11106,10,6,"^")
988C0Q BY PATIENT NUMERATOR
989"KRN",19,11106,10,7,0)
99011111
991"KRN",19,11106,10,7,"^")
992C0Q DENOMINATOR PATIENT LIST
993"KRN",19,11106,10,9,0)
99411113
995"KRN",19,11106,10,9,"^")
996C0Q COPY PATIENT LISTS
997"KRN",19,11106,10,11,0)
99811115
999"KRN",19,11106,10,11,"^")
1000C0Q UPDATE QUALITY MEASUREMENT
1001"KRN",19,11106,10,12,0)
100211116
1003"KRN",19,11106,10,12,"^")
1004C0Q PQRI MENU
1005"KRN",19,11106,10,13,0)
100611117
1007"KRN",19,11106,10,13,"^")
1008C0Q PRINT MEASURES
1009"KRN",19,11106,10,14,0)
101011118
1011"KRN",19,11106,10,14,"^")
1012C0Q PRINT PQRI XML
1013"KRN",19,11106,10,15,0)
101411124
1015"KRN",19,11106,10,15,"^")
1016C0Q UPDATE MU MEASURES
1017"KRN",19,11106,99)
101862333,41065
1019"KRN",19,11106,"U")
1020QUALITY MEASUREMENT MENU
1021"KRN",19,11107,-1)
10220^4
1023"KRN",19,11107,0)
1024C0Q DISPLAY QUALITY MEASURES^DISPLAY QUALITY MEASURES^^P^^^^^^^^
1025"KRN",19,11107,60)
1026C0Q(101,
1027"KRN",19,11107,62)
10280
1029"KRN",19,11107,63)
1030[C0Q PRINT QUALITY MEASURES]
1031"KRN",19,11107,64)
1032
1033"KRN",19,11107,65)
1034
1035"KRN",19,11107,66)
1036
1037"KRN",19,11107,"U")
1038DISPLAY QUALITY MEASURES
1039"KRN",19,11108,-1)
10400^3
1041"KRN",19,11108,0)
1042C0Q DISPLAY MEASURE SET^DISPLAY MEASURE SET^^P^^^^^^^^
1043"KRN",19,11108,60)
1044C0Q(201,
1045"KRN",19,11108,62)
10460
1047"KRN",19,11108,63)
1048[C0Q PRINT MEASUREMENT SET]
1049"KRN",19,11108,64)
1050
1051"KRN",19,11108,65)
1052
1053"KRN",19,11108,66)
1054
1055"KRN",19,11108,"U")
1056DISPLAY MEASURE SET
1057"KRN",19,11109,-1)
10580^7
1059"KRN",19,11109,0)
1060C0Q LIST MEASURE SET^LIST MEASURE SET^^R^^^^^^^^
1061"KRN",19,11109,25)
1062EN^C0QMAIN
1063"KRN",19,11109,"U")
1064LIST MEASURE SET
1065"KRN",19,11110,-1)
10660^1
1067"KRN",19,11110,0)
1068C0Q BY PATIENT NUMERATOR^BY PATIENT NUMERATOR^^R^^^^^^^^
1069"KRN",19,11110,25)
1070NBYP^C0QMAIN
1071"KRN",19,11110,"U")
1072BY PATIENT NUMERATOR
1073"KRN",19,11111,-1)
10740^2
1075"KRN",19,11111,0)
1076C0Q DENOMINATOR PATIENT LIST^DENOMINATOR PATIENT LIST^^R^^^^^^^^
1077"KRN",19,11111,25)
1078DBYP^C0QMAIN
1079"KRN",19,11111,"U")
1080DENOMINATOR PATIENT LIST
1081"KRN",19,11112,-1)
10820^5
1083"KRN",19,11112,0)
1084C0Q EXPORT CCR BY MEASURE^EXPORT CCR BY MEASURE^^R^^^^^^^^
1085"KRN",19,11112,25)
1086EXPORT^C0QMAIN
1087"KRN",19,11112,"U")
1088EXPORT CCR BY MEASURE
1089"KRN",19,11113,-1)
10900^12
1091"KRN",19,11113,0)
1092C0Q COPY PATIENT LISTS^COPY OVER PATIENT LISTS^^R^^^^^^^^
1093"KRN",19,11113,25)
1094EN2^C0QMAIN
1095"KRN",19,11113,"U")
1096COPY OVER PATIENT LISTS
1097"KRN",19,11114,-1)
10980^6
1099"KRN",19,11114,0)
1100C0Q EXPORT MEASURE SET^ALL MEASURES EXPORT^^R^^^^^^^^
1101"KRN",19,11114,25)
1102ENEXP^C0QMAIN
1103"KRN",19,11114,"U")
1104ALL MEASURES EXPORT
1105"KRN",19,11115,-1)
11060^15
1107"KRN",19,11115,0)
1108C0Q UPDATE QUALITY MEASUREMENT^RERUN ALL CURRENT REMINDERS^^R^^^^^^^^^^^1
1109"KRN",19,11115,1,0)
1110^19.06^3^3^3110430^^
1111"KRN",19,11115,1,1,0)
1112Picks up the C0Q MEASUREMENST file entry to use from the Parameter C0Q
1113"KRN",19,11115,1,2,0)
1114MEASUREMENT TO USE, then runs and updates all associated Patient Lists and
1115"KRN",19,11115,1,3,0)
1116populates the C0Q QUALITY MEASURE and C0Q MEASUREMENTS files.
1117"KRN",19,11115,15)
1118W !,"Quality Measures Update Queued" H 2
1119"KRN",19,11115,25)
1120QUE^C0QMAIN
1121"KRN",19,11115,"U")
1122RERUN ALL CURRENT REMINDERS
1123"KRN",19,11116,-1)
11240^13
1125"KRN",19,11116,0)
1126C0Q PQRI MENU^PQRI MENU^^M^^^^^^^^
1127"KRN",19,11116,10,0)
1128^19.01IP^3^3
1129"KRN",19,11116,10,1,0)
113011114
1131"KRN",19,11116,10,1,"^")
1132C0Q EXPORT MEASURE SET
1133"KRN",19,11116,10,2,0)
113411112
1135"KRN",19,11116,10,2,"^")
1136C0Q EXPORT CCR BY MEASURE
1137"KRN",19,11116,10,3,0)
113811109
1139"KRN",19,11116,10,3,"^")
1140C0Q LIST MEASURE SET
1141"KRN",19,11116,99)
114262333,41065
1143"KRN",19,11116,"U")
1144PQRI MENU
1145"KRN",19,11117,-1)
11460^14
1147"KRN",19,11117,0)
1148C0Q PRINT MEASURES^PRINT C0Q MEASURES^^I^^^^^^^^
1149"KRN",19,11117,30)
1150C0Q(201,
1151"KRN",19,11117,31)
1152AEMQ
1153"KRN",19,11117,63)
1154[C0Q MEASUREMENT REPORT
1155"KRN",19,11117,80)
1156C0Q(201,
1157"KRN",19,11117,"U")
1158PRINT C0Q MEASURES
1159"KRN",19,11118,-1)
11600^16
1161"KRN",19,11118,0)
1162C0Q PRINT PQRI XML^PQRI PRINT XML^^R^^^^^^^^
1163"KRN",19,11118,25)
1164EN^C0QPQRI
1165"KRN",19,11118,"U")
1166PQRI PRINT XML
1167"KRN",19,11124,-1)
11680^17
1169"KRN",19,11124,0)
1170C0Q UPDATE MU MEASURES^UPDATE MU MEASURES^^R^^^^^^^^
1171"KRN",19,11124,25)
1172BUILD^C0QPRML
1173"KRN",19,11124,"U")
1174UPDATE MU MEASURES
1175"MBREQ")
11760
1177"ORD",5,.4)
1178.4;5;;;EDEOUT^DIFROMSO(.4,DA,"",XPDA);FPRE^DIFROMSI(.4,"",XPDA);EPRE^DIFROMSI(.4,DA,$E("N",$G(XPDNEW)),XPDA,"",OLDA);;EPOST^DIFROMSI(.4,DA,"",XPDA);DEL^DIFROMSK(.4,"",%)
1179"ORD",5,.4,0)
1180PRINT TEMPLATE
1181"ORD",7,.402)
1182.402;7;;;EDEOUT^DIFROMSO(.402,DA,"",XPDA);FPRE^DIFROMSI(.402,"",XPDA);EPRE^DIFROMSI(.402,DA,$E("N",$G(XPDNEW)),XPDA,"",OLDA);;EPOST^DIFROMSI(.402,DA,"",XPDA);DEL^DIFROMSK(.402,"",%)
1183"ORD",7,.402,0)
1184INPUT TEMPLATE
1185"ORD",18,19)
118619;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA
1187"ORD",18,19,0)
1188OPTION
1189"QUES","XPF1",0)
1190Y
1191"QUES","XPF1","??")
1192^D REP^XPDH
1193"QUES","XPF1","A")
1194Shall I write over your |FLAG| File
1195"QUES","XPF1","B")
1196YES
1197"QUES","XPF1","M")
1198D XPF1^XPDIQ
1199"QUES","XPF2",0)
1200Y
1201"QUES","XPF2","??")
1202^D DTA^XPDH
1203"QUES","XPF2","A")
1204Want my data |FLAG| yours
1205"QUES","XPF2","B")
1206YES
1207"QUES","XPF2","M")
1208D XPF2^XPDIQ
1209"QUES","XPI1",0)
1210YO
1211"QUES","XPI1","??")
1212^D INHIBIT^XPDH
1213"QUES","XPI1","A")
1214Want KIDS to INHIBIT LOGONs during the install
1215"QUES","XPI1","B")
1216NO
1217"QUES","XPI1","M")
1218D XPI1^XPDIQ
1219"QUES","XPM1",0)
1220PO^VA(200,:EM
1221"QUES","XPM1","??")
1222^D MG^XPDH
1223"QUES","XPM1","A")
1224Enter the Coordinator for Mail Group '|FLAG|'
1225"QUES","XPM1","B")
1226
1227"QUES","XPM1","M")
1228D XPM1^XPDIQ
1229"QUES","XPO1",0)
1230Y
1231"QUES","XPO1","??")
1232^D MENU^XPDH
1233"QUES","XPO1","A")
1234Want KIDS to Rebuild Menu Trees Upon Completion of Install
1235"QUES","XPO1","B")
1236NO
1237"QUES","XPO1","M")
1238D XPO1^XPDIQ
1239"QUES","XPZ1",0)
1240Y
1241"QUES","XPZ1","??")
1242^D OPT^XPDH
1243"QUES","XPZ1","A")
1244Want to DISABLE Scheduled Options, Menu Options, and Protocols
1245"QUES","XPZ1","B")
1246NO
1247"QUES","XPZ1","M")
1248D XPZ1^XPDIQ
1249"QUES","XPZ2",0)
1250Y
1251"QUES","XPZ2","??")
1252^D RTN^XPDH
1253"QUES","XPZ2","A")
1254Want to MOVE routines to other CPUs
1255"QUES","XPZ2","B")
1256NO
1257"QUES","XPZ2","M")
1258D XPZ2^XPDIQ
1259"RTN")
126011
1261"RTN","C0QERTIM")
12620^5^B7596326
1263"RTN","C0QERTIM",1,0)
1264C0QERTIM ; Time from admission to leaving a hospital location ;
1265"RTN","C0QERTIM",2,0)
1266 ;;0.1;C0Q;;;Build 19
1267"RTN","C0QERTIM",3,0)
1268EN ;Get Location
1269"RTN","C0QERTIM",4,0)
1270 S DIC=42,DIC(0)="AEMQ" D ^DIC I Y<1 G EXIT
1271"RTN","C0QERTIM",5,0)
1272 S LOCATION=+Y
1273"RTN","C0QERTIM",6,0)
1274 ;Start date
1275"RTN","C0QERTIM",7,0)
1276 S %DT="AE",%DT("A")="Start DATE: " D ^%DT G:Y=-1 EXIT S START=Y
1277"RTN","C0QERTIM",8,0)
1278 ;End date
1279"RTN","C0QERTIM",9,0)
1280 S %DT="AE",%DT("A")="Stop DATE: " D ^%DT G:Y=-1 EXIT S STOP=Y
1281"RTN","C0QERTIM",10,0)
1282 ;select device:
1283"RTN","C0QERTIM",11,0)
1284 S %ZIS="Q" D ^%ZIS G EXIT:POP
1285"RTN","C0QERTIM",12,0)
1286 I $D(IO("Q")) D G EXIT
1287"RTN","C0QERTIM",13,0)
1288 . S ZTRTN="DQ^C0QERTIM",ZTDESC="Time from admission to leaving a hospital location"
1289"RTN","C0QERTIM",14,0)
1290 . S ZTSAVE("LOCATION")="",ZTSAVE("START")="",ZTSAVE("STOP")=""
1291"RTN","C0QERTIM",15,0)
1292 . D ^%ZTLOAD D HOME^%ZIS K IO("Q")
1293"RTN","C0QERTIM",16,0)
1294 . Q
1295"RTN","C0QERTIM",17,0)
1296DQ ; Get down to business
1297"RTN","C0QERTIM",18,0)
1298 ;sort on admit date/time in file 45, screen on LOSING WARD in sub-file 535.
1299"RTN","C0QERTIM",19,0)
1300 ;^DGPT("AF",date/time,DA)
1301"RTN","C0QERTIM",20,0)
1302 S PATCOUNT=0,ADMITIME=START
1303"RTN","C0QERTIM",21,0)
1304 F S ADMITIME=$O(^DGPT("AF",ADMITIME)) Q:ADMITIME'>0 D
1305"RTN","C0QERTIM",22,0)
1306 . Q:ADMITIME>STOP
1307"RTN","C0QERTIM",23,0)
1308 . ;FMIN from ADMISSION DATE piece 2
1309"RTN","C0QERTIM",24,0)
1310 . S X=ADMITIME D H^%DTC S FMINDAY=%H,FMINSEC=%T
1311"RTN","C0QERTIM",25,0)
1312 . S D0="" F S D0=$O(^DGPT("AF",ADMITIME,D0)) Q:D0'>0 D
1313"RTN","C0QERTIM",26,0)
1314 . . S D1=0 F S D1=$O(^DGPT(D0,535,D1)) Q:D1'>0 D
1315"RTN","C0QERTIM",27,0)
1316 . . . ;Losing ward in piece 6 of ^DGPT(D0,535,D1,0)
1317"RTN","C0QERTIM",28,0)
1318 . . . Q:$P($G(^DGPT(D0,535,D1,0)),U,6)'=LOCATION
1319"RTN","C0QERTIM",29,0)
1320 . . . ;FMOUT from MOVEMENT DATE on leaving in piece 10
1321"RTN","C0QERTIM",30,0)
1322 . . . S X=$P($G(^DGPT(D0,535,D1,0)),U,10) D H^%DTC S FMOUTDAY=%H,FMOUTSEC=%T
1323"RTN","C0QERTIM",31,0)
1324 . . . I FMINDAY=FMOUTDAY S MINUTES=$P((FMOUTSEC-FMINSEC)/60,".")
1325"RTN","C0QERTIM",32,0)
1326 . . . I FMINDAY'=FMOUTDAY D
1327"RTN","C0QERTIM",33,0)
1328 . . . . S DIFFDAY=FMOUTDAY-FMINDAY
1329"RTN","C0QERTIM",34,0)
1330 . . . . S MINUTES=1440*(DIFFDAY-1)+$P((FMOUTSEC+86400-FMINSEC)/60,".")
1331"RTN","C0QERTIM",35,0)
1332 . . . . Q
1333"RTN","C0QERTIM",36,0)
1334 . . . S PATCOUNT=PATCOUNT+1
1335"RTN","C0QERTIM",37,0)
1336 . . . S ^TMP($J,"PATIENTS",$P(^DPT(+^DGPT(D0,0),0),U))=MINUTES
1337"RTN","C0QERTIM",38,0)
1338 . . . S ^TMP($J,"MINUTES",MINUTES)=1+$G(^TMP($J,"MINUTES",MINUTES))
1339"RTN","C0QERTIM",39,0)
1340 . . . Q
1341"RTN","C0QERTIM",40,0)
1342 . . Q
1343"RTN","C0QERTIM",41,0)
1344 . Q
1345"RTN","C0QERTIM",42,0)
1346 U IO W @IOF
1347"RTN","C0QERTIM",43,0)
1348 ;list median time from Admission to leaving hospital LOCATION
1349"RTN","C0QERTIM",44,0)
1350 S MID=$P(PATCOUNT/2,"."),SUM=0
1351"RTN","C0QERTIM",45,0)
1352 S MEDIAN=0 F S MEDIAN=$O(^TMP($J,"MINUTES",MEDIAN)) Q:MEDIAN'>0 D
1353"RTN","C0QERTIM",46,0)
1354 . S SUM=SUM+^TMP($J,"MINUTES",MEDIAN) Q:SUM>MID
1355"RTN","C0QERTIM",47,0)
1356 . Q
1357"RTN","C0QERTIM",48,0)
1358 W "The median time spent in ",$P(^DIC(42,LOCATION,0),U)," is ",MEDIAN," minutes.",!
1359"RTN","C0QERTIM",49,0)
1360 W !,"Patient",?40,"Minutes in ",$P(^DIC(42,LOCATION,0),U)
1361"RTN","C0QERTIM",50,0)
1362 ;list patient and time from admission to leaving the location
1363"RTN","C0QERTIM",51,0)
1364 S PATIENT="" F S PATIENT=$O(^TMP($J,"PATIENTS",PATIENT)) Q:PATIENT="" D
1365"RTN","C0QERTIM",52,0)
1366 . W !,PATIENT,?40," ",^TMP($J,"PATIENTS",PATIENT)
1367"RTN","C0QERTIM",53,0)
1368EXIT ; DO CLEANUP
1369"RTN","C0QERTIM",54,0)
1370 S:$D(ZTQUEUED) ZTREQ="@"
1371"RTN","C0QERTIM",55,0)
1372 K DIC,START,STOP,LOCATION,PATCOUNT,ADMITIME,FMINDAY,FMINSEC,FMOUTDAY,FMOUTSEC
1373"RTN","C0QERTIM",56,0)
1374 K POP,D0,D1,DIFFDAY,MINUTES,MID,MEDIAN,PATIENT,^TMP($J)
1375"RTN","C0QERTIM",57,0)
1376 Q
1377"RTN","C0QERTIM",58,0)
1378
1379"RTN","C0QGMRAD")
13800^2^B18802718
1381"RTN","C0QGMRAD",1,0)
1382C0QGMRAD ;HIRMFO/RM,WAA-UTILITY TO GATHER PATIENT DATA ;1/15/98 13:47
1383"RTN","C0QGMRAD",2,0)
1384 ;;4.0;Adverse Reaction Tracking;**2,10**;Mar 29, 1996;Build 19
1385"RTN","C0QGMRAD",3,0)
1386EN1 ; ENTRY TO GATHER PATIENT A/AR DATA
1387"RTN","C0QGMRAD",4,0)
1388 ;INPUT VARIABLES:
1389"RTN","C0QGMRAD",5,0)
1390 ;
1391"RTN","C0QGMRAD",6,0)
1392 ; DFN Pointer to Patient file.
1393"RTN","C0QGMRAD",7,0)
1394 ; GMRA (OPTIONAL) A^B^C DEFAULT="0^0^111^0" **LOCAL
1395"RTN","C0QGMRAD",8,0)
1396 ; where A = 0 return all reactions (allergic/non-allergic).
1397"RTN","C0QGMRAD",9,0)
1398 ; 1 return allergies only.
1399"RTN","C0QGMRAD",10,0)
1400 ; 2 return non-allergies only.
1401"RTN","C0QGMRAD",11,0)
1402 ; B = 0 return all data (verified or non-verified).
1403"RTN","C0QGMRAD",12,0)
1404 ; 1 return only verified data.
1405"RTN","C0QGMRAD",13,0)
1406 ; 2 return only non-verified data.
1407"RTN","C0QGMRAD",14,0)
1408 ; C = X_Y_Z
1409"RTN","C0QGMRAD",15,0)
1410 ; where X, Y, and Z are either 0 or 1. 1 would mean to
1411"RTN","C0QGMRAD",16,0)
1412 ; return an Adverse Reaction of that particular type,
1413"RTN","C0QGMRAD",17,0)
1414 ; and zero means do not return an Adverse Reaction of
1415"RTN","C0QGMRAD",18,0)
1416 ; that type.
1417"RTN","C0QGMRAD",19,0)
1418 ; X is for TYPE=OTHER
1419"RTN","C0QGMRAD",20,0)
1420 ; Y is for TYPE=FOOD
1421"RTN","C0QGMRAD",21,0)
1422 ; Z is for TYPE=DRUG.
1423"RTN","C0QGMRAD",22,0)
1424 ; E.g., 001 (return drug only), 111 (returns all types),
1425"RTN","C0QGMRAD",23,0)
1426 ; and 010 (returns food only).
1427"RTN","C0QGMRAD",24,0)
1428 ; **LOCAL
1429"RTN","C0QGMRAD",25,0)
1430 ; D = 0 return both Observed and Historical
1431"RTN","C0QGMRAD",26,0)
1432 ; 1 return only Observed
1433"RTN","C0QGMRAD",27,0)
1434 ; **LOCAL
1435"RTN","C0QGMRAD",28,0)
1436 ;OUTPUT VARIABLES:
1437"RTN","C0QGMRAD",29,0)
1438 ; GMRAL = 1 if patient has Adverse Reaction
1439"RTN","C0QGMRAD",30,0)
1440 ; 0 if patient has no known Adverse Reaction
1441"RTN","C0QGMRAD",31,0)
1442 ; null if patient has not been asked about Adverse Reaction
1443"RTN","C0QGMRAD",32,0)
1444 ; GMRAL(PTR TO 120.8) = A^B^C^D^E^F^G^H^I
1445"RTN","C0QGMRAD",33,0)
1446 ; where A = Pointer to Patient file.
1447"RTN","C0QGMRAD",34,0)
1448 ; B = Free text of causative agent.
1449"RTN","C0QGMRAD",35,0)
1450 ; *C = Type of reaction, where D is drug, F is food, and O is
1451"RTN","C0QGMRAD",36,0)
1452 ; other.
1453"RTN","C0QGMRAD",37,0)
1454 ; D = 1 if Adverse Reaction has been verified
1455"RTN","C0QGMRAD",38,0)
1456 ; 0 if Adverse Reaction has not been verified
1457"RTN","C0QGMRAD",39,0)
1458 ; E = 0 if this is an allergic reaction
1459"RTN","C0QGMRAD",40,0)
1460 ; 1 if this is not an allergic reaction
1461"RTN","C0QGMRAD",41,0)
1462 ; **F = the mechanism of reaction in the format:
1463"RTN","C0QGMRAD",42,0)
1464 ; External format;Internal format
1465"RTN","C0QGMRAD",43,0)
1466 ; (ALLERGY;0, PHARMACOLOGIC;2, UNKNOWN;U).
1467"RTN","C0QGMRAD",44,0)
1468 ; G = Type of reaction.
1469"RTN","C0QGMRAD",45,0)
1470 ; where D = drug
1471"RTN","C0QGMRAD",46,0)
1472 ; DF = drug/food
1473"RTN","C0QGMRAD",47,0)
1474 ; DFO = drug/food/other
1475"RTN","C0QGMRAD",48,0)
1476 ; DO = drug/other
1477"RTN","C0QGMRAD",49,0)
1478 ; F = food
1479"RTN","C0QGMRAD",50,0)
1480 ; FO = food/other
1481"RTN","C0QGMRAD",51,0)
1482 ; O = other
1483"RTN","C0QGMRAD",52,0)
1484 ; H = the mechanism of reaction in the format:
1485"RTN","C0QGMRAD",53,0)
1486 ; External format;Internal format
1487"RTN","C0QGMRAD",54,0)
1488 ; (ALLERGY;A, PHARMACOLOGIC;P, UNKNOWN;U)
1489"RTN","C0QGMRAD",55,0)
1490 ; I = IEN and Global root of reactant (stored in piece B above)
1491"RTN","C0QGMRAD",56,0)
1492 ; set equal to the GMR ALLERGY field (#1) of the PATIENT
1493"RTN","C0QGMRAD",57,0)
1494 ; ALLERGY file (#120.8)
1495"RTN","C0QGMRAD",58,0)
1496 ; GMRAL(PTR TO 120.8,"S",COUNT) = S
1497"RTN","C0QGMRAD",59,0)
1498 ; where COUNT = number 1 to number of signs/symptoms for this
1499"RTN","C0QGMRAD",60,0)
1500 ; reaction.
1501"RTN","C0QGMRAD",61,0)
1502 ; S = a sign/symptom for this reaction in the format:
1503"RTN","C0QGMRAD",62,0)
1504 ; External format;Internal format
1505"RTN","C0QGMRAD",63,0)
1506 ;
1507"RTN","C0QGMRAD",64,0)
1508 ;* NOTE: This piece will no longer be supported after 9/1/97,
1509"RTN","C0QGMRAD",65,0)
1510 ; Please use piece G.
1511"RTN","C0QGMRAD",66,0)
1512 ;** NOTE: This piece will no longer be supported after 9/1/97,
1513"RTN","C0QGMRAD",67,0)
1514 ; Please use piece H.
1515"RTN","C0QGMRAD",68,0)
1516 ;
1517"RTN","C0QGMRAD",69,0)
1518 N GMRAOTH
1519"RTN","C0QGMRAD",70,0)
1520 Q:'$D(DFN) S:'$D(GMRA)#2 GMRA="0^0^111^1" K GMRAL
1521"RTN","C0QGMRAD",71,0)
1522DPT ;
1523"RTN","C0QGMRAD",72,0)
1524 ;Read NKA Node in file 120.86
1525"RTN","C0QGMRAD",73,0)
1526 S GMRAL=$P($G(^GMR(120.86,DFN,0)),U,2)
1527"RTN","C0QGMRAD",74,0)
1528 ;Do not set GMRAL array if patient is unassessed or NKA.
1529"RTN","C0QGMRAD",75,0)
1530 I GMRAL=0 Q ;PATIENT HAS NO KNOWN ALLERGIES
1531"RTN","C0QGMRAD",76,0)
1532 F GMRAREC=0:0 S GMRAREC=$O(^GMR(120.8,"B",DFN,GMRAREC)) Q:GMRAREC'>0 S GMRANODE=$S($D(^GMR(120.8,GMRAREC,0)):^(0),1:"") D:GMRANODE SETAL
1533"RTN","C0QGMRAD",77,0)
1534 I GMRAL=1,+$O(GMRAL(0))'>0 S GMRAL=0 ;if flag is set to 1 (reactions exist), then make certain the reactions are passed in the GMRAL array
1535"RTN","C0QGMRAD",78,0)
1536 K GMRA,GMRANODE,GMRAOSOF,GMRAREC,GMRATCNT
1537"RTN","C0QGMRAD",79,0)
1538 Q
1539"RTN","C0QGMRAD",80,0)
1540SETAL ;
1541"RTN","C0QGMRAD",81,0)
1542 N %,GMRAI,GMRASIGN
1543"RTN","C0QGMRAD",82,0)
1544 ;Q:'$P(GMRANODE,"^",12)&'$D(GMRAOSOF) ;IF NOT SIGNED OFF MARK IT
1545"RTN","C0QGMRAD",83,0)
1546 Q:+$G(^GMR(120.8,GMRAREC,"ER"))&'$D(GMRAERR) ;IF ENTERED IN ERROR QUIT
1547"RTN","C0QGMRAD",84,0)
1548 I GMRAL'=1 S GMRAL=1 ; PATIENT HAS ALLERGIES
1549"RTN","C0QGMRAD",85,0)
1550 S GMRAI=0 ; BEGIN CHECK FOR ADR/ALL CRITERIA
1551"RTN","C0QGMRAD",86,0)
1552 I $P(GMRA,"^",4),$P(GMRANODE,"^",6)="h" Q ;QUIT IF HISTORICAL EXCLUDED **LOCAL
1553"RTN","C0QGMRAD",87,0)
1554 I '$P(GMRA,"^") S GMRAI=1
1555"RTN","C0QGMRAD",88,0)
1556 E I $P(GMRA,"^")=1 S:$F("AU",$P(GMRANODE,"^",14))>1 GMRAI=1
1557"RTN","C0QGMRAD",89,0)
1558 E S:$F("P",$P(GMRANODE,"^",14))>1 GMRAI=1
1559"RTN","C0QGMRAD",90,0)
1560 Q:'GMRAI ; QUIT IF ADR/ALL CRITERIA NOT MET
1561"RTN","C0QGMRAD",91,0)
1562 Q:2-$P(GMRA,"^",2)=(1-$P(GMRANODE,"^",16)) ;QUIT IF VER/NON VER CRITERIA NOT MET
1563"RTN","C0QGMRAD",92,0)
1564 S GMRAI=0 ; BEGIN CHECK FOR ALLERGY TYPE CRITERIA
1565"RTN","C0QGMRAD",93,0)
1566 F %=1:1:3 I $E($P(GMRA,"^",3),%),$P(GMRANODE,"^",20)[$E("OFD",%) S GMRAI=1 Q
1567"RTN","C0QGMRAD",94,0)
1568 Q:'GMRAI ; QUIT IF ALLERGY TYPE CRITERIA NOT MET
1569"RTN","C0QGMRAD",95,0)
1570 D PASS(GMRAREC,.GMRAL)
1571"RTN","C0QGMRAD",96,0)
1572 Q
1573"RTN","C0QGMRAD",97,0)
1574PASS(GMRAREC,GMRAL) ; Data filer
1575"RTN","C0QGMRAD",98,0)
1576 ; This subroutine will store all the patient date for a reaction is an
1577"RTN","C0QGMRAD",99,0)
1578 ; array.
1579"RTN","C0QGMRAD",100,0)
1580 ; Input:
1581"RTN","C0QGMRAD",101,0)
1582 ; GMRAREC = The IEN for the entry in 120.8
1583"RTN","C0QGMRAD",102,0)
1584 ;Output:
1585"RTN","C0QGMRAD",103,0)
1586 ; GMRAL(GMRAREC) the array entry for the record
1587"RTN","C0QGMRAD",104,0)
1588 ;
1589"RTN","C0QGMRAD",105,0)
1590 N GMRANODE
1591"RTN","C0QGMRAD",106,0)
1592 S GMRANODE=$G(^GMR(120.8,GMRAREC,0)) Q:GMRANODE=""
1593"RTN","C0QGMRAD",107,0)
1594 S %=$P(GMRANODE,"^",14)
1595"RTN","C0QGMRAD",108,0)
1596 S GMRAL(GMRAREC)=$P(GMRANODE,"^",1,2)_"^"_$E($P(GMRANODE,"^",20))_"^"_+$P(GMRANODE,"^",16)_"^"_$S(%="A"!(%="U"):0,1:1)
1597"RTN","C0QGMRAD",109,0)
1598 S GMRAL(GMRAREC)=GMRAL(GMRAREC)_"^"_$S(%="A":"ALLERGY;0",%="P":"PHARMACOLOGIC;2",%="U":"UNKNOWN;U",1:"")_"^"_$P(GMRANODE,"^",20)_"^"_$S(%="A":"ALLERGY;A",%="P":"PHARMACOLOGIC;P",%="U":"UNKNOWN;U",1:"")
1599"RTN","C0QGMRAD",110,0)
1600 S GMRAL(GMRAREC)=GMRAL(GMRAREC)_"^"_$P(GMRANODE,"^",3)
1601"RTN","C0QGMRAD",111,0)
1602 Q:'$O(^GMR(120.8,GMRAREC,10,0)) ;QUIT IF NO SIGNS/SYMPTOMS
1603"RTN","C0QGMRAD",112,0)
1604 S:'$D(GMRAOTH) GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0))
1605"RTN","C0QGMRAD",113,0)
1606 S GMRAX=0,GMRAY=1 F S GMRAX=$O(^GMR(120.8,GMRAREC,10,GMRAX)) Q:GMRAX<1 D I GMRAZ'="" S GMRAL(GMRAREC,"S",GMRAY)=GMRAZ(1),GMRAY=GMRAY+1
1607"RTN","C0QGMRAD",114,0)
1608 .S GMRAZ=$G(^GMR(120.8,GMRAREC,10,GMRAX,0))
1609"RTN","C0QGMRAD",115,0)
1610 .S GMRAZ(1)=$S(+GMRAZ'=GMRAOTH:$P($G(^GMRD(120.83,+GMRAZ,0)),U)_";"_+GMRAZ,1:$P(GMRAZ,U,2)_";"_+GMRAZ)
1611"RTN","C0QGMRAD",116,0)
1612 .Q
1613"RTN","C0QGMRAD",117,0)
1614 K GMRAX,GMRAY,GMRAZ
1615"RTN","C0QGMRAD",118,0)
1616 Q
1617"RTN","C0QGMTSA")
16180^3^B2175692
1619"RTN","C0QGMTSA",1,0)
1620C0QGMTSA ; SLC/DLT,KER - Brief Adverse Reaction/Allergy ; 02/27/2002
1621"RTN","C0QGMTSA",2,0)
1622 ;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 19
1623"RTN","C0QGMTSA",3,0)
1624 ;
1625"RTN","C0QGMTSA",4,0)
1626 ; External References
1627"RTN","C0QGMTSA",5,0)
1628 ; DBIA 10096 ^%ZOSF("TEST"
1629"RTN","C0QGMTSA",6,0)
1630 ; DBIA 10099 EN1^GMRADPT **LOCAL NOW EN1^C0QGMRAD
1631"RTN","C0QGMTSA",7,0)
1632 ;
1633"RTN","C0QGMTSA",8,0)
1634ALLRG ; Allergies
1635"RTN","C0QGMTSA",9,0)
1636 N I,Z,X,SEQ,GMTSA,ALLRG K GMTSA S (SEQ,ALLRG)=0 S X="C0QGMRAD" X ^%ZOSF("TEST")
1637"RTN","C0QGMTSA",10,0)
1638 I $T D Q:$D(GMTSQIT)
1639"RTN","C0QGMTSA",11,0)
1640 . D GETALLRG I ALLRG D
1641"RTN","C0QGMTSA",12,0)
1642 . . D CKP^GMTSUP Q:$D(GMTSQIT) W ?3,"Allergy/Reaction: " D ALLRGP
1643"RTN","C0QGMTSA",13,0)
1644 Q
1645"RTN","C0QGMTSA",14,0)
1646ALLRGP ; Allergy Print
1647"RTN","C0QGMTSA",15,0)
1648 D CKP^GMTSUP Q:$D(GMTSQIT) W ?21 S X=0
1649"RTN","C0QGMTSA",16,0)
1650 F I=0:0 S I=$O(GMTSA(I)) Q:I="" D Q:$D(GMTSQIT)
1651"RTN","C0QGMTSA",17,0)
1652 . S X=X+1 W:X>1 ", " W:(77)'>($X+$L(GMTSA(I))) !
1653"RTN","C0QGMTSA",18,0)
1654 . D CKP^GMTSUP Q:$D(GMTSQIT) W GMTSA(I)
1655"RTN","C0QGMTSA",19,0)
1656 Q:$D(GMTSQIT) D CKP^GMTSUP Q:$D(GMTSQIT) W ! Q
1657"RTN","C0QGMTSA",20,0)
1658GETALLRG ; Get Allergies
1659"RTN","C0QGMTSA",21,0)
1660 N GMI,GMJ,GMRAL D EN1^C0QGMRAD I GMRAL="" S ALLRG=0 Q
1661"RTN","C0QGMTSA",22,0)
1662 I GMRAL="0" S ALLRG=1,GMTSA(1)="No Known Allergies" Q
1663"RTN","C0QGMTSA",23,0)
1664 S ALLRG=1,GMI=0 F S GMI=$O(GMRAL(GMI)) Q:GMI'>0 D
1665"RTN","C0QGMTSA",24,0)
1666 . S GMTSA(GMI)=$P(GMRAL(GMI),U,2)
1667"RTN","C0QGMTSA",25,0)
1668 . S GMJ=0 F S GMJ=$O(GMTSA(GMJ)) Q:GMJ'>0 I GMI'=GMJ,(GMTSA(GMI)=$G(GMTSA(GMJ))) K GMTSA(GMI) Q
1669"RTN","C0QGMTSA",26,0)
1670 Q
1671"RTN","C0QGMTSG")
16720^4^B29331917
1673"RTN","C0QGMTSG",1,0)
1674C0QGMTSG ; SLC/DLT,KER - Allergies ; 01/06/2003
1675"RTN","C0QGMTSG",2,0)
1676 ;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 19
1677"RTN","C0QGMTSG",3,0)
1678 ;
1679"RTN","C0QGMTSG",4,0)
1680 ; External References
1681"RTN","C0QGMTSG",5,0)
1682 ; DBIA 10096 ^%ZOSF("TEST"
1683"RTN","C0QGMTSG",6,0)
1684 ; DBIA 10035 ^DPT(
1685"RTN","C0QGMTSG",7,0)
1686 ; DBIA 905 ^GMR(120.8
1687"RTN","C0QGMTSG",8,0)
1688 ; DBIA 2056 $$GET1^DIQ (file #120.86 and #200)
1689"RTN","C0QGMTSG",9,0)
1690 ; DBIA 10011 ^DIWP
1691"RTN","C0QGMTSG",10,0)
1692 ; DBIA 10099 EN1^GMRADPT **LOCAL changed to C0QGMRAD
1693"RTN","C0QGMTSG",11,0)
1694 ; DBIA 10060 ^VA(200,
1695"RTN","C0QGMTSG",12,0)
1696 ; DBIA 3449 ^GMR(120.86,
1697"RTN","C0QGMTSG",13,0)
1698 ;
1699"RTN","C0QGMTSG",14,0)
1700ALLRG ; Allergies
1701"RTN","C0QGMTSG",15,0)
1702 N X,GMTSALAS,GMTSALAD,GMTSALAW,GMTSALAT,GMTSAV,GMTSAFN,GMRAL,GMTSAL
1703"RTN","C0QGMTSG",16,0)
1704 N GMTSALNM,GMTSCNT,GMTSEACT,GMTSLN,GMTSMECH,GMTSPRT,GMTSTY,CC,C,KK
1705"RTN","C0QGMTSG",17,0)
1706 N ALLRG,TITLE,JJ K GMTSA S (SEQ,ALLRG)=0,TITLE="ALLERGY/ADVERSE REACTION (AR)"
1707"RTN","C0QGMTSG",18,0)
1708 S X="C0QGMRAD" X ^%ZOSF("TEST")
1709"RTN","C0QGMTSG",19,0)
1710 I $T D Q:$D(GMTSQIT)
1711"RTN","C0QGMTSG",20,0)
1712 . D GETALLRG D:ALLRG TITLE,ALLRGP D:'ALLRG&($L($G(GMTSALAS))) TITLE,NKA
1713"RTN","C0QGMTSG",21,0)
1714 I 'ALLRG,'$L($G(GMTSALAS)) D
1715"RTN","C0QGMTSG",22,0)
1716 . I $D(GMTSPNF)&('ALLRG) D CKP^GMTSUP Q:$D(GMTSQIT) W "Unknown, please evaluate",!
1717"RTN","C0QGMTSG",23,0)
1718 K ALL,CC,CCC,CD,DIWF,DIWL,DIWR,GMTSALF,GMTSALNM,GMTSNODE,GMTSPRT,I,II,JJ,KK,L,M,MX,N,Z,X,SEQ,GMTSA,ALLRG,TITLE,GMRA,GMRAL,GMTSEACT,GMTSMECH,GMTSTY,GMTSPFN,GMTSAL,GMTSCNT,GMTSLN,ODT
1719"RTN","C0QGMTSG",24,0)
1720 Q
1721"RTN","C0QGMTSG",25,0)
1722ALLRGP ; Allergy Print
1723"RTN","C0QGMTSG",26,0)
1724 S II="" F S II=$O(GMTSAL(II)) Q:II']"" I $O(GMTSAL(II,""))]"" D
1725"RTN","C0QGMTSG",27,0)
1726 . D CKP^GMTSUP Q:$D(GMTSQIT) W !?2,$S(II="D":"Drug:",II="DF":"Drug/Food:",II="DFO":"Drug/Food/Other:",II="DO":"Drug/Other:",II="F":"Food:",II="FO":"Food/Other:",II="O":"Other:",1:II_":")
1727"RTN","C0QGMTSG",28,0)
1728 . S JJ="" F S JJ=$O(GMTSAL(II,JJ)) Q:JJ="" D
1729"RTN","C0QGMTSG",29,0)
1730 .. N WKK S KK="" F S KK=$O(GMTSAL(II,JJ,KK)) Q:KK="" D
1731"RTN","C0QGMTSG",30,0)
1732 ... S L=0 F S L=$O(GMTSAL(II,JJ,KK,L)) Q:'L D CKP^GMTSUP Q:$D(GMTSQIT) D AUTOV W !?5,JJ_": " S:$L(KK)>30 WKK=KK,WKK=$$WRAP^GMTSORC(WKK,30) W ?24,$S($L(KK)>30:$P(WKK,"|"),1:KK) D
1733"RTN","C0QGMTSG",31,0)
1734 .... I GMTSAV=1 W " (AV"
1735"RTN","C0QGMTSG",32,0)
1736 .... E W $S($P(GMTSAL(II,JJ,KK,L),U,5)=1:" (V",$P(GMTSAL(II,JJ,KK,L),U,5)=0:" (NV",1:"")
1737"RTN","C0QGMTSG",33,0)
1738 .... W $S($P($G(^GMR(120.8,GMTSALNM,0)),U,6)="h":"/Historical)",$P($G(^(0)),U,6)="o":"/Observed)",1:")")
1739"RTN","C0QGMTSG",34,0)
1740 .... I $L($P($G(WKK),"|",2)) D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,$P(WKK,"|",2)
1741"RTN","C0QGMTSG",35,0)
1742 .... S (M,MX,ALL)=0 F S M=$O(GMTSAL(II,JJ,KK,L,"S",M)) Q:M="" D Q:$D(GMTSQIT)
1743"RTN","C0QGMTSG",36,0)
1744 ..... I ALL=0 D CKP^GMTSUP Q:$D(GMTSQIT) W !?27
1745"RTN","C0QGMTSG",37,0)
1746 ..... S MX=MX+1
1747"RTN","C0QGMTSG",38,0)
1748 ..... W:MX>1 ", "
1749"RTN","C0QGMTSG",39,0)
1750 ..... S N=$P(GMTSAL(II,JJ,KK,L,"S",M),";")
1751"RTN","C0QGMTSG",40,0)
1752 ..... S ALL=1 I (74)'>($X+$L(N)) D CKP^GMTSUP Q:$D(GMTSQIT) W !,?27,N Q
1753"RTN","C0QGMTSG",41,0)
1754 ..... S ALL=1 W N
1755"RTN","C0QGMTSG",42,0)
1756 .... D SIGBLK($P(GMTSAFN,U,5))
1757"RTN","C0QGMTSG",43,0)
1758 .... D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,"Date/Time: " S ODT=$P(GMTSAFN,U,4) S X=ODT D REGDTM4^GMTSU W X,!
1759"RTN","C0QGMTSG",44,0)
1760 ....S CC="" F S CC=$O(^GMR(120.8,GMTSALNM,26,"B",CC)) Q:CC="" D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,"Comments at: " S X=CC D REGDTM4^GMTSU S CD=X S CCC=0 F S CCC=$O(^GMR(120.8,GMTSALNM,26,"B",CC,CCC)) Q:'CCC D TEXT
1761"RTN","C0QGMTSG",45,0)
1762 Q
1763"RTN","C0QGMTSG",46,0)
1764NKA ; No known allergies
1765"RTN","C0QGMTSG",47,0)
1766 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS))!($L($G(GMTSALAD))) !
1767"RTN","C0QGMTSG",48,0)
1768 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS)) ?22,$G(GMTSALAS),!
1769"RTN","C0QGMTSG",49,0)
1770 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS))!($L($G(GMTSALAD)))!($L($G(GMTSALAW))) ?24,"Assessment date: ",$G(GMTSALAD),!
1771"RTN","C0QGMTSG",50,0)
1772 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAW)) ?28,"Assessed by: ",GMTSALAW,!
1773"RTN","C0QGMTSG",51,0)
1774 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAW))&($L($G(GMTSALAT))) ?34,"Title: ",GMTSALAT,!
1775"RTN","C0QGMTSG",52,0)
1776 Q
1777"RTN","C0QGMTSG",53,0)
1778GETALLRG ; Get Allergies
1779"RTN","C0QGMTSG",54,0)
1780 S GMRA="0^0^111^1" D EN1^C0QGMRAD I GMRAL="" S ALLRG=0 Q
1781"RTN","C0QGMTSG",55,0)
1782 I +($G(DFN))>0,+($G(GMRAL))=0 D ALLAS S ALLRG=0 Q
1783"RTN","C0QGMTSG",56,0)
1784 I $D(GMRAL)>9 D
1785"RTN","C0QGMTSG",57,0)
1786 . S I=0 F GMTSCNT=1:1 S I=$O(GMRAL(I)) Q:'I D
1787"RTN","C0QGMTSG",58,0)
1788 .. S GMTSTY=$P(GMRAL(I),U,7) Q:GMTSTY']""
1789"RTN","C0QGMTSG",59,0)
1790 .. S GMTSEACT=$P(GMRAL(I),U,2) Q:GMTSEACT']""
1791"RTN","C0QGMTSG",60,0)
1792 .. S GMTSMECH=$P($P(GMRAL(I),U,8),";")
1793"RTN","C0QGMTSG",61,0)
1794 .. S:GMTSMECH']"" GMTSMECH="UNKNOWN"
1795"RTN","C0QGMTSG",62,0)
1796 .. S GMTSAL(GMTSTY,GMTSMECH,GMTSEACT,GMTSCNT)=I_"^"_GMRAL(I)
1797"RTN","C0QGMTSG",63,0)
1798 .. S JJ=0 F S JJ=$O(GMRAL(I,"S",JJ)) Q:'JJ S GMTSAL(GMTSTY,GMTSMECH,GMTSEACT,GMTSCNT,"S",JJ)=GMRAL(I,"S",JJ)
1799"RTN","C0QGMTSG",64,0)
1800 .. S ALLRG=1
1801"RTN","C0QGMTSG",65,0)
1802 Q
1803"RTN","C0QGMTSG",66,0)
1804ALLAS ; Allergy Assessment
1805"RTN","C0QGMTSG",67,0)
1806 N X,GMTSALG1,GMTSALG2,GMTSALG3,GMTSAU S (GMTSALAS,GMTSALAD,GMTSALAW)="" S GMTSALAS="No known allergies"
1807"RTN","C0QGMTSG",68,0)
1808 S GMTSALAD=$$GET1^DIQ(120.86,+($G(DFN)),3,"I",,"GMTSALG2") S:$D(GMTSALG2) GMTSALAD="" S:+GMTSALAD=0 GMTSALAD=""
1809"RTN","C0QGMTSG",69,0)
1810 I +GMTSALAD>0 S X=GMTSALAD D REGDT4^GMTSU S GMTSALAD=X
1811"RTN","C0QGMTSG",70,0)
1812 S GMTSAU=$$GET1^DIQ(120.86,+($G(DFN)),2,"I")
1813"RTN","C0QGMTSG",71,0)
1814 S GMTSALAW=$$GET1^DIQ(200,(+GMTSAU_","),.01,"E",,"GMTSALG3")
1815"RTN","C0QGMTSG",72,0)
1816 S GMTSALAT=$$GET1^DIQ(200,(+GMTSAU_","),20.3)
1817"RTN","C0QGMTSG",73,0)
1818 S:$D(GMTSALG3) (GMTSALAW,GMTSALAT)=""
1819"RTN","C0QGMTSG",74,0)
1820 Q
1821"RTN","C0QGMTSG",75,0)
1822AUTOV ; Autoverify
1823"RTN","C0QGMTSG",76,0)
1824 S GMTSAV=0,GMTSALNM=$P(GMTSAL(II,JJ,KK,L),U),GMTSAFN=$G(^GMR(120.8,GMTSALNM,0))
1825"RTN","C0QGMTSG",77,0)
1826 I $P(GMTSAFN,U,18)="",$P(GMTSAFN,U,16)=1 S GMTSAV=1
1827"RTN","C0QGMTSG",78,0)
1828 Q
1829"RTN","C0QGMTSG",79,0)
1830TITLE ; Print title
1831"RTN","C0QGMTSG",80,0)
1832 D CKP^GMTSUP Q:$D(GMTSQIT)
1833"RTN","C0QGMTSG",81,0)
1834 I $D(GMTSPNF) W ?21,TITLE,!
1835"RTN","C0QGMTSG",82,0)
1836 E W ?21,"Title: ",TITLE,!
1837"RTN","C0QGMTSG",83,0)
1838 Q
1839"RTN","C0QGMTSG",84,0)
1840TEXT ; Setup for print of allergy comments
1841"RTN","C0QGMTSG",85,0)
1842 W ?31,CD D CKP^GMTSUP Q:$D(GMTSQIT)
1843"RTN","C0QGMTSG",86,0)
1844 K ^UTILITY($J,"W") S GMTSLN=0 F S GMTSLN=$O(^GMR(120.8,GMTSALNM,26,CCC,2,GMTSLN)) Q:'GMTSLN S GMTSPRT=^GMR(120.8,GMTSALNM,26,CCC,2,GMTSLN,0) D FORMAT
1845"RTN","C0QGMTSG",87,0)
1846 I $D(^UTILITY($J,"W")) F GMTSLN=1:1:^UTILITY($J,"W",DIWL) D LINE Q:$D(GMTSQIT)
1847"RTN","C0QGMTSG",88,0)
1848 K ^UTILITY($J,"W")
1849"RTN","C0QGMTSG",89,0)
1850 Q:'GMTSLN
1851"RTN","C0QGMTSG",90,0)
1852 W ! Q
1853"RTN","C0QGMTSG",91,0)
1854FORMAT ; Formats each line
1855"RTN","C0QGMTSG",92,0)
1856 S DIWL=3,DIWR=80,DIWF="C58",X=GMTSPRT D ^DIWP
1857"RTN","C0QGMTSG",93,0)
1858 Q
1859"RTN","C0QGMTSG",94,0)
1860LINE ; Writes formatted lines of text
1861"RTN","C0QGMTSG",95,0)
1862 D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,^UTILITY($J,"W",DIWL,GMTSLN,0)
1863"RTN","C0QGMTSG",96,0)
1864 Q
1865"RTN","C0QGMTSG",97,0)
1866SIGBLK(GMTSALF) ; Signature block
1867"RTN","C0QGMTSG",98,0)
1868 Q:+GMTSALF'>0 N GMTSSB,GMTSST,GMTSSN S GMTSSB=$$GET1^DIQ(200,(+GMTSALF_","),20.2),GMTSST=$$GET1^DIQ(200,(+GMTSALF_","),20.3),GMTSSN=$$GET1^DIQ(200,(+GMTSALF_","),.01)
1869"RTN","C0QGMTSG",99,0)
1870 D CKP^GMTSUP Q:$D(GMTSQIT) W !!,?24,"Originator: ",$S(GMTSSB'="":GMTSSB,1:GMTSSN)
1871"RTN","C0QGMTSG",100,0)
1872 D CKP^GMTSUP Q:$D(GMTSQIT) W:$L(GMTSST) !,?24,"Title: ",GMTSST
1873"RTN","C0QGMTSG",101,0)
1874 Q
1875"RTN","C0QHF")
18760^11^B3166240
1877"RTN","C0QHF",1,0)
1878C0QHF ; GPL - Health Factor Utility Routines ;9/02/11 17:05
1879"RTN","C0QHF",2,0)
1880 ;;0.1;C0Q;nopatch;noreleasedate;Build 19
1881"RTN","C0QHF",3,0)
1882 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU
1883"RTN","C0QHF",4,0)
1884 ;General Public License See attached copy of the License.
1885"RTN","C0QHF",5,0)
1886 ;
1887"RTN","C0QHF",6,0)
1888 ;This program is free software; you can redistribute it and/or modify
1889"RTN","C0QHF",7,0)
1890 ;it under the terms of the GNU General Public License as published by
1891"RTN","C0QHF",8,0)
1892 ;the Free Software Foundation; either version 2 of the License, or
1893"RTN","C0QHF",9,0)
1894 ;(at your option) any later version.
1895"RTN","C0QHF",10,0)
1896 ;
1897"RTN","C0QHF",11,0)
1898 ;This program is distributed in the hope that it will be useful,
1899"RTN","C0QHF",12,0)
1900 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
1901"RTN","C0QHF",13,0)
1902 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1903"RTN","C0QHF",14,0)
1904 ;GNU General Public License for more details.
1905"RTN","C0QHF",15,0)
1906 ;
1907"RTN","C0QHF",16,0)
1908 ;You should have received a copy of the GNU General Public License along
1909"RTN","C0QHF",17,0)
1910 ;with this program; if not, write to the Free Software Foundation, Inc.,
1911"RTN","C0QHF",18,0)
1912 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1913"RTN","C0QHF",19,0)
1914 ;
1915"RTN","C0QHF",20,0)
1916 Q
1917"RTN","C0QHF",21,0)
1918 ;
1919"RTN","C0QHF",22,0)
1920 ; these routines are for quick lookups on HEALTH FACTOR and V HEALTH FACTOR
1921"RTN","C0QHF",23,0)
1922 ; files...
1923"RTN","C0QHF",24,0)
1924 ;
1925"RTN","C0QHF",25,0)
1926 ; from the DD:
1927"RTN","C0QHF",26,0)
1928 ;STANDARD DATA DICTIONARY #9000010.23 -- V HEALTH FACTORS FILE
1929"RTN","C0QHF",27,0)
1930 ;STORED IN ^AUPNVHF( (6744 ENTRIES)
1931"RTN","C0QHF",28,0)
1932 ;CROSS REFERENCED BY: PATIENT NAME(AATOO), HEALTH FACTOR(AATOO1), VISIT(AD),
1933"RTN","C0QHF",29,0)
1934 ; VISIT(AV10), HEALTH FACTOR(B), PATIENT NAME(C)
1935"RTN","C0QHF",30,0)
1936 ;
1937"RTN","C0QHF",31,0)
1938 ;STANDARD DATA DICTIONARY #9999999.64 -- HEALTH FACTORS FILE
1939"RTN","C0QHF",32,0)
1940 ;STORED IN ^AUTTHF( (8656 ENTRIES)
1941"RTN","C0QHF",33,0)
1942 ;CROSS REFERENCED BY: CATEGORY(AC), ENTRY TYPE(AD), FACTOR(B), SYNONYM(D)
1943"RTN","C0QHF",34,0)
1944 ;
1945"RTN","C0QHF",35,0)
1946HFYN(DFN,C0QHF) ; EXTRINSIC RETURNS 1 (YES) OR 0 (NO) IF A PATIENT
1947"RTN","C0QHF",36,0)
1948 ; HAS A HEALTH FACTOR
1949"RTN","C0QHF",37,0)
1950 N ZI,ZJ,ZR
1951"RTN","C0QHF",38,0)
1952 S ZI=$O(^AUTTHF("B",C0QHF,"")) ; HEALTH FACTOR IEN
1953"RTN","C0QHF",39,0)
1954 I $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1
1955"RTN","C0QHF",40,0)
1956 E S ZR=0
1957"RTN","C0QHF",41,0)
1958 Q ZR
1959"RTN","C0QHF",42,0)
1960 ;
1961"RTN","C0QHF",43,0)
1962HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY
1963"RTN","C0QHF",44,0)
1964 ; RTN IS PASSED BY REFERENCE AND RETURNS AN ARRAY OF HEALTH FACTORS
1965"RTN","C0QHF",45,0)
1966 ; THAT THE PATIENT HAS IN THE CATEGORY. RETURNS NULL IF NONE
1967"RTN","C0QHF",46,0)
1968 ; FORMAT RNT(HEALTH FACTOR IEN,HEALTH FACTOR NAME)=""
1969"RTN","C0QHF",47,0)
1970 N ZI
1971"RTN","C0QHF",48,0)
1972 S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN
1973"RTN","C0QHF",49,0)
1974 N C0QN,C0QO
1975"RTN","C0QHF",50,0)
1976 S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS
1977"RTN","C0QHF",51,0)
1978 S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY
1979"RTN","C0QHF",52,0)
1980 D UNITY^C0QSET("C0QR",C0QN,C0QO) ; THE DIFFERENCE
1981"RTN","C0QHF",53,0)
1982 K RTN ; CLEAR THE RETURN ARRAY
1983"RTN","C0QHF",54,0)
1984 N ZJ S ZJ=""
1985"RTN","C0QHF",55,0)
1986 F S ZJ=$O(C0QR(1,ZJ)) Q:ZJ="" D ; FOR ALL HEALTH FACTOR MATCHES
1987"RTN","C0QHF",56,0)
1988 . S RTN(ZJ,$P(^AUTTHF(ZJ,0),"^",1))=""
1989"RTN","C0QHF",57,0)
1990 Q
1991"RTN","C0QHF",58,0)
1992 ;
1993"RTN","C0QHF",59,0)
1994HFLCAT(RTN,C0QHFCAT) ; RETURNS A LIST OF PATIENTS WHO HAVE A HEALTH FACTOR
1995"RTN","C0QHF",60,0)
1996 ; IN THE C0QHFCAT CATEGORY. RTN IS PASSED BY REFERENCE
1997"RTN","C0QHF",61,0)
1998 ; THIS WILL BE HARD TO DO WITHOUT SOME NEW INDEXES
1999"RTN","C0QHF",62,0)
2000 Q
2001"RTN","C0QHF",63,0)
2002 ;
2003"RTN","C0QHF",64,0)
2004HFLPAT(RTN,C0QHF) ; RETURNS A LIST OF PATIENTS WHO HAVE A SPECIFIC HEALTH
2005"RTN","C0QHF",65,0)
2006 ; FACTOR. RTN IS PASSED BY REFERENCE
2007"RTN","C0QHF",66,0)
2008 ; THIS ONE ALSO WILL BE HARD TO DO QUICKLY WITHOUT A NEW INDEX
2009"RTN","C0QHF",67,0)
2010 Q
2011"RTN","C0QHF",68,0)
2012 ;
2013"RTN","C0QHF",69,0)
2014INDEXES(DDREF) ;PRINT THE INDEXES ACTUALLY ON FILE DDREF
2015"RTN","C0QHF",70,0)
2016 ; IE D INDEXES($NA(^DD))
2017"RTN","C0QHF",71,0)
2018 N ZI
2019"RTN","C0QHF",72,0)
2020 S ZI="A"
2021"RTN","C0QHF",73,0)
2022 F S ZI=$O(@DDREF@(ZI)) Q:ZI="" W !,ZI
2023"RTN","C0QHF",74,0)
2024 Q
2025"RTN","C0QHF",75,0)
2026 ;
2027"RTN","C0QIMMUN")
20280^6^B6463760
2029"RTN","C0QIMMUN",1,0)
2030C0QIMMUN ;Prep Immunization Order data for HL7 Message creation ;
2031"RTN","C0QIMMUN",2,0)
2032 ;;0.1;C0Q;nopatch;noreleasedate;Build 19
2033"RTN","C0QIMMUN",3,0)
2034 ; ^XTMP("C0QIMMUN",0)=purge date^create date
2035"RTN","C0QIMMUN",4,0)
2036 ; ^XTMP("C0QIMMUN",order_date,order#,item_name)=item_value
2037"RTN","C0QIMMUN",5,0)
2038 ; ^XTMP("C0QIMMUN","LASTORDR")=last order processed
2039"RTN","C0QIMMUN",6,0)
2040FIND ; Find the next set of immunization orders
2041"RTN","C0QIMMUN",7,0)
2042 N X1,X2,X,%,%DT,%H,%T,NOW,ORDER,LASTORDR,SUBSC,DIR
2043"RTN","C0QIMMUN",8,0)
2044 S LASTORDR=+$G(^XTMP("C0QIMMUN","LASTORDR"))
2045"RTN","C0QIMMUN",9,0)
2046 W !,"The ""Last Order"" from which to begin checking for Immunization orders is: ",LASTORDR
2047"RTN","C0QIMMUN",10,0)
2048 S DIR("A")="Do you want to reset that value"
2049"RTN","C0QIMMUN",11,0)
2050 S DIR(0)="Y",DIR("B")="NO" D ^DIR D:Y=1
2051"RTN","C0QIMMUN",12,0)
2052 . S DIR("A")="What value shall be used?"
2053"RTN","C0QIMMUN",13,0)
2054 . S DIR(0)="NO",DIR("B")=LASTORDR D ^DIR
2055"RTN","C0QIMMUN",14,0)
2056 . W:Y'>0 !,"We'll skip reseting it then."
2057"RTN","C0QIMMUN",15,0)
2058 . D:Y>0
2059"RTN","C0QIMMUN",16,0)
2060 . . S LASTORDR=+Y
2061"RTN","C0QIMMUN",17,0)
2062 . . L +^XTMP("C0QIMMUN")
2063"RTN","C0QIMMUN",18,0)
2064 . . S X1=DT,X2=365 D C^%DTC
2065"RTN","C0QIMMUN",19,0)
2066 . . S ^XTMP("C0QIMMUN",0)=X_U_DT
2067"RTN","C0QIMMUN",20,0)
2068 . . S ^XTMP("C0QIMMUN","LASTORDR")=LASTORDR
2069"RTN","C0QIMMUN",21,0)
2070 . . L -^XTMP("C0QIMMUN")
2071"RTN","C0QIMMUN",22,0)
2072 . . Q
2073"RTN","C0QIMMUN",23,0)
2074 . Q
2075"RTN","C0QIMMUN",24,0)
2076 S DIR("A")="Ready to prep more immunization orders for HL7 messages"
2077"RTN","C0QIMMUN",25,0)
2078 S DIR(0)="Y",DIR("B")="YES" D ^DIR Q:Y'=1
2079"RTN","C0QIMMUN",26,0)
2080 L +^XTMP("C0QIMMUN")
2081"RTN","C0QIMMUN",27,0)
2082 I '$D(^XTMP("C0QIMMUN",0)) D
2083"RTN","C0QIMMUN",28,0)
2084 . S X1=DT,X2=365 D C^%DTC
2085"RTN","C0QIMMUN",29,0)
2086 . S ^XTMP("C0QIMMUN",0)=X_U_DT
2087"RTN","C0QIMMUN",30,0)
2088 . S ^XTMP("C0QIMMUN","LASTORDR")=0
2089"RTN","C0QIMMUN",31,0)
2090 S ORDER=^XTMP("C0QIMMUN","LASTORDR")
2091"RTN","C0QIMMUN",32,0)
2092 F S ORDER=$O(^OR(100,ORDER)) Q:ORDER'>0 D
2093"RTN","C0QIMMUN",33,0)
2094 . S LASTORDR=ORDER
2095"RTN","C0QIMMUN",34,0)
2096 . D:$D(^OR(100,ORDER,4.5,"ID","ORZ HL7")) GOTONE
2097"RTN","C0QIMMUN",35,0)
2098 . Q
2099"RTN","C0QIMMUN",36,0)
2100 S ^XTMP("C0QIMMUN","LASTORDR")=LASTORDR
2101"RTN","C0QIMMUN",37,0)
2102 W !,"Done",!,"Last Order processed: ",LASTORDR,!
2103"RTN","C0QIMMUN",38,0)
2104 L -^XTMP("C0QIMMUN")
2105"RTN","C0QIMMUN",39,0)
2106 Q
2107"RTN","C0QIMMUN",40,0)
2108GOTONE ; Take the order number and move the relevant HL7 information into ^XTMP
2109"RTN","C0QIMMUN",41,0)
2110 S NOW=$P(^OR(100,ORDER,0),U,7)
2111"RTN","C0QIMMUN",42,0)
2112 S ^XTMP("C0QIMMUN",NOW,ORDER,"PATIENT")=$P(^OR(100,ORDER,0),U,2)
2113"RTN","C0QIMMUN",43,0)
2114 S ^XTMP("C0QIMMUN",NOW,ORDER,"LOCATION")=$P(^OR(100,ORDER,0),U,10)
2115"RTN","C0QIMMUN",44,0)
2116 S ^XTMP("C0QIMMUN",NOW,ORDER,"ORDEREDBY")=$P(^OR(100,ORDER,0),U,6)
2117"RTN","C0QIMMUN",45,0)
2118 S ENTRY=0 F S ENTRY=$O(^OR(100,ORDER,4.5,ENTRY)) Q:ENTRY'>0 D
2119"RTN","C0QIMMUN",46,0)
2120 . S SUBSC=$P($G(^OR(100,ORDER,4.5,ENTRY,0)),U,4)
2121"RTN","C0QIMMUN",47,0)
2122 . Q:'$L(SUBSC)
2123"RTN","C0QIMMUN",48,0)
2124 . I SUBSC'="TIME" S ^XTMP("C0QIMMUN",NOW,ORDER,SUBSC)=^OR(100,ORDER,4.5,ENTRY,1)
2125"RTN","C0QIMMUN",49,0)
2126 . E S X=^OR(100,ORDER,4.5,ENTRY,1),%DT="TS" D ^%DT S ^XTMP("C0QIMMUN",NOW,ORDER,SUBSC)=Y
2127"RTN","C0QIMMUN",50,0)
2128 . Q
2129"RTN","C0QIMMUN",51,0)
2130 S ^XTMP("C0QIMMUN",NOW,ORDER,"ORDERTEXT")=$G(^OR(100,ORDER,8,1,.1,1,0))
2131"RTN","C0QIMMUN",52,0)
2132 Q
2133"RTN","C0QMAIN")
21340^1^B115162981
2135"RTN","C0QMAIN",1,0)
2136C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10 17:05
2137"RTN","C0QMAIN",2,0)
2138 ;;0.1;C0Q;nopatch;noreleasedate;Build 19
2139"RTN","C0QMAIN",3,0)
2140 ;Copyright 2009 George Lilly. Licensed under the terms of the GNU
2141"RTN","C0QMAIN",4,0)
2142 ;General Public License See attached copy of the License.
2143"RTN","C0QMAIN",5,0)
2144 ;
2145"RTN","C0QMAIN",6,0)
2146 ;This program is free software; you can redistribute it and/or modify
2147"RTN","C0QMAIN",7,0)
2148 ;it under the terms of the GNU General Public License as published by
2149"RTN","C0QMAIN",8,0)
2150 ;the Free Software Foundation; either version 2 of the License, or
2151"RTN","C0QMAIN",9,0)
2152 ;(at your option) any later version.
2153"RTN","C0QMAIN",10,0)
2154 ;
2155"RTN","C0QMAIN",11,0)
2156 ;This program is distributed in the hope that it will be useful,
2157"RTN","C0QMAIN",12,0)
2158 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
2159"RTN","C0QMAIN",13,0)
2160 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2161"RTN","C0QMAIN",14,0)
2162 ;GNU General Public License for more details.
2163"RTN","C0QMAIN",15,0)
2164 ;
2165"RTN","C0QMAIN",16,0)
2166 ;You should have received a copy of the GNU General Public License along
2167"RTN","C0QMAIN",17,0)
2168 ;with this program; if not, write to the Free Software Foundation, Inc.,
2169"RTN","C0QMAIN",18,0)
2170 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2171"RTN","C0QMAIN",19,0)
2172 ;
2173"RTN","C0QMAIN",20,0)
2174 Q
2175"RTN","C0QMAIN",21,0)
2176 ;
2177"RTN","C0QMAIN",22,0)
2178C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE
2179"RTN","C0QMAIN",23,0)
2180C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
2181"RTN","C0QMAIN",24,0)
2182C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
2183"RTN","C0QMAIN",25,0)
2184C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE
2185"RTN","C0QMAIN",26,0)
2186C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE
2187"RTN","C0QMAIN",27,0)
2188RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE
2189"RTN","C0QMAIN",28,0)
2190RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE
2191"RTN","C0QMAIN",29,0)
2192C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ;
2193"RTN","C0QMAIN",30,0)
2194EXPORT ; EXPORT ENTRY POINT FOR CCR
2195"RTN","C0QMAIN",31,0)
2196 ; Select a patient.
2197"RTN","C0QMAIN",32,0)
2198 N C0QMS,C0QM,C0QMIEN,C0QNA,C0QNORD
2199"RTN","C0QMAIN",33,0)
2200 S C0QNORD=3 ; WE WANT DENOMINATORS USE 1 FOR NUMERATORS
2201"RTN","C0QMAIN",34,0)
2202 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2203"RTN","C0QMAIN",35,0)
2204 I Y<1 Q ; EXIT
2205"RTN","C0QMAIN",36,0)
2206 S C0QMS=$P(Y,U,1) ; SET THE MEASURE SET
2207"RTN","C0QMAIN",37,0)
2208 S DIC=$$C0QQFN,DIC(0)="AEMQ" D ^DIC
2209"RTN","C0QMAIN",38,0)
2210 I Y<1 Q ; EXIT
2211"RTN","C0QMAIN",39,0)
2212 S C0QM=$P(Y,U,1) ; SET THE MEASURE IEN
2213"RTN","C0QMAIN",40,0)
2214 N C0QMN S C0QMN=$P(Y,U,2) ; SET THE MEASURE NAME
2215"RTN","C0QMAIN",41,0)
2216 S C0QMIEN=$O(^C0Q(201,C0QMS,5,"B",C0QM,""))
2217"RTN","C0QMAIN",42,0)
2218 S C0QNA=$NA(^C0Q(201,C0QMS,5,C0QMIEN,C0QNORD,"B"))
2219"RTN","C0QMAIN",43,0)
2220 N ZI S ZI=""
2221"RTN","C0QMAIN",44,0)
2222 F S ZI=$O(@C0QNA@(ZI)) Q:ZI="" D ;
2223"RTN","C0QMAIN",45,0)
2224 . W !,ZI
2225"RTN","C0QMAIN",46,0)
2226 . N ONAME S ONAME=C0QMN_"_"_ZI_"_CCR_V1_0_0.xml"
2227"RTN","C0QMAIN",47,0)
2228 . D XPAT^C0CCCR(ZI,,,ONAME) ; EXPORT TO A FILE
2229"RTN","C0QMAIN",48,0)
2230 Q
2231"RTN","C0QMAIN",49,0)
2232 ;
2233"RTN","C0QMAIN",50,0)
2234NBYP ; ENTRY POINT FOR COMMAND LINE BY PATIENT MEASURE LISTING
2235"RTN","C0QMAIN",51,0)
2236 ;
2237"RTN","C0QMAIN",52,0)
2238 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2239"RTN","C0QMAIN",53,0)
2240 I Y<1 Q ; EXIT
2241"RTN","C0QMAIN",54,0)
2242 N MSIEN S MSIEN=+Y
2243"RTN","C0QMAIN",55,0)
2244 W !,"NUMERATOR PATIENT LIST",!
2245"RTN","C0QMAIN",56,0)
2246 N C0QPAT
2247"RTN","C0QMAIN",57,0)
2248 D PATS(.C0QPAT,MSIEN,"N") ; GET THE NUMERATOR PATIENT LIST
2249"RTN","C0QMAIN",58,0)
2250 I $D(C0QPAT) D ; LIST RETURNED
2251"RTN","C0QMAIN",59,0)
2252 . ;
2253"RTN","C0QMAIN",60,0)
2254 Q
2255"RTN","C0QMAIN",61,0)
2256 ;
2257"RTN","C0QMAIN",62,0)
2258DBYP ; ENTRY POINT FOR COMMAND LINE BY PATIENT MEASURE LISTING
2259"RTN","C0QMAIN",63,0)
2260 ;
2261"RTN","C0QMAIN",64,0)
2262 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2263"RTN","C0QMAIN",65,0)
2264 I Y<1 Q ; EXIT
2265"RTN","C0QMAIN",66,0)
2266 N MSIEN S MSIEN=+Y
2267"RTN","C0QMAIN",67,0)
2268 N C0QPAT
2269"RTN","C0QMAIN",68,0)
2270 W !,"DENOMINATOR PATIENT LIST",!
2271"RTN","C0QMAIN",69,0)
2272 D PATS(.C0QPAT,MSIEN,"D") ; GET THE NUMERATOR PATIENT LIST
2273"RTN","C0QMAIN",70,0)
2274 I $D(C0QPAT) D ; LIST RETURNED
2275"RTN","C0QMAIN",71,0)
2276 . ;
2277"RTN","C0QMAIN",72,0)
2278 . ;
2279"RTN","C0QMAIN",73,0)
2280 Q
2281"RTN","C0QMAIN",74,0)
2282 ;
2283"RTN","C0QMAIN",75,0)
2284ENEXP ; EXTERNAL MENU ENTRY POINT FOR EXP
2285"RTN","C0QMAIN",76,0)
2286 ;
2287"RTN","C0QMAIN",77,0)
2288 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2289"RTN","C0QMAIN",78,0)
2290 I Y<1 Q ; EXIT
2291"RTN","C0QMAIN",79,0)
2292 N MSIEN S MSIEN=+Y
2293"RTN","C0QMAIN",80,0)
2294 D EXP(MSIEN)
2295"RTN","C0QMAIN",81,0)
2296 Q
2297"RTN","C0QMAIN",82,0)
2298 ;
2299"RTN","C0QMAIN",83,0)
2300EXP(MSET,NOEX) ; EXPORT ALL PATIENTS FOR MEASURE SET IEN MSET
2301"RTN","C0QMAIN",84,0)
2302 ; ALSO, WRITE OUT THE BY PATIENT MEASURE TEXT FILE
2303"RTN","C0QMAIN",85,0)
2304 ; IF NOEX=1, THEN ONLY THE MEASURE TEXT FILE GETS WRITTEN, NO EXPORTS ARE
2305"RTN","C0QMAIN",86,0)
2306 ; DONE
2307"RTN","C0QMAIN",87,0)
2308 I '$D(NOEX) S NOEX=0
2309"RTN","C0QMAIN",88,0)
2310 N ZQI,ZARY,ZFN,ODIR
2311"RTN","C0QMAIN",89,0)
2312 S ZQI=""
2313"RTN","C0QMAIN",90,0)
2314 D PATS(.ZARY,MSET,"D",1)
2315"RTN","C0QMAIN",91,0)
2316 S ZFN="MEASURES-BY-PATIENT.txt"
2317"RTN","C0QMAIN",92,0)
2318 S ODIR=^TMP("C0CCCR","ODIR") ; OUTPUT DIRECTORY
2319"RTN","C0QMAIN",93,0)
2320 S GARY=$NA(^TMP("C0Q",$J))
2321"RTN","C0QMAIN",94,0)
2322 K @GARY
2323"RTN","C0QMAIN",95,0)
2324 M @GARY=ZARY
2325"RTN","C0QMAIN",96,0)
2326 S GARY1=$NA(@GARY@(1))
2327"RTN","C0QMAIN",97,0)
2328 N ZY
2329"RTN","C0QMAIN",98,0)
2330 S ZY=$$OUTPUT^C0CXPATH(GARY1,ZFN,ODIR)
2331"RTN","C0QMAIN",99,0)
2332 W !,ZY
2333"RTN","C0QMAIN",100,0)
2334 I NOEX=1 Q ; DO NOT EXPORT
2335"RTN","C0QMAIN",101,0)
2336 F S ZQI=$O(ZARY(ZQI)) Q:ZQI="" D ; FOR EACH PATIENT
2337"RTN","C0QMAIN",102,0)
2338 . D XPAT^C0CCCR(+ZARY(ZQI)) ;
2339"RTN","C0QMAIN",103,0)
2340 Q
2341"RTN","C0QMAIN",104,0)
2342 ;
2343"RTN","C0QMAIN",105,0)
2344PATS(ZRTN,MSIEN,NORD,QT) ; BUILDS A LIST OF PATIENTS AND THEIR MEASURES
2345"RTN","C0QMAIN",106,0)
2346 ; FOR MEASURE SET MSET. NORD="N" (DEFAULT) MEANS NUMERATOR PATIENTS
2347"RTN","C0QMAIN",107,0)
2348 ; NORD="D" MEANS DENOMINATOR PATIENTS
2349"RTN","C0QMAIN",108,0)
2350 ; QT=1 MEANS QUIET
2351"RTN","C0QMAIN",109,0)
2352 I $G(QT)'=1 S QT=0
2353"RTN","C0QMAIN",110,0)
2354 N ZI,ZJ,ZK,ZIDX,ZN,ZM
2355"RTN","C0QMAIN",111,0)
2356 S ZN=0 ; COUNT OF PATIENTS
2357"RTN","C0QMAIN",112,0)
2358 S ZI=""
2359"RTN","C0QMAIN",113,0)
2360 ; GOING TO USE THE NUMERATOR BY PATIENT INDEX
2361"RTN","C0QMAIN",114,0)
2362 I '$D(NORD) S NORD="N"
2363"RTN","C0QMAIN",115,0)
2364 I '((NORD="N")!(NORD="D")) S NORD="N"
2365"RTN","C0QMAIN",116,0)
2366 I NORD="N" S ZIDX=$NA(^C0Q(201,"ANBYP"))
2367"RTN","C0QMAIN",117,0)
2368 E S ZIDX=$NA(^C0Q(201,"ADBYP"))
2369"RTN","C0QMAIN",118,0)
2370 F S ZI=$O(@ZIDX@(ZI)) Q:ZI="" D ; FOR EACH PATIENT
2371"RTN","C0QMAIN",119,0)
2372 . I $O(@ZIDX@(ZI,MSIEN,""))'="" D ; IF PATIENT IS IN THIS SET
2373"RTN","C0QMAIN",120,0)
2374 . . I 'QT W !,$$GET1^DIQ(2,ZI_",",.01) ;PATIENT NAME
2375"RTN","C0QMAIN",121,0)
2376 . . S ZN=ZN+1 ; INCREMENT PATIENT COUNT
2377"RTN","C0QMAIN",122,0)
2378 . . S ZRTN(ZN)=ZI
2379"RTN","C0QMAIN",123,0)
2380 . E Q ; NEXT PATIENT
2381"RTN","C0QMAIN",124,0)
2382 . S (ZJ,ZK)=""
2383"RTN","C0QMAIN",125,0)
2384 . F S ZJ=$O(@ZIDX@(ZI,MSIEN,ZJ)) Q:ZJ="" D ; FOR EACH MEASURE
2385"RTN","C0QMAIN",126,0)
2386 . . ;S ZL=$O(@ZIDX@(ZI,MSIEN,ZJ,"")) ; MEASURE IS FOURTH
2387"RTN","C0QMAIN",127,0)
2388 . . S ZK=""
2389"RTN","C0QMAIN",128,0)
2390 . . S ZK=$$GET1^DIQ($$C0QMMFN,ZJ_","_MSIEN_",",.01,"I")
2391"RTN","C0QMAIN",129,0)
2392 . . ;W !,"ZK:",ZK," ZJ:",ZJ," ZI",ZI,!
2393"RTN","C0QMAIN",130,0)
2394 . . S ZM=$$GET1^DIQ($$C0QQFN,ZK_",",.01) ; MEASURE NAME
2395"RTN","C0QMAIN",131,0)
2396 . . I 'QT W " ",ZM
2397"RTN","C0QMAIN",132,0)
2398 . . S ZRTN(ZN)=ZRTN(ZN)_" "_ZM
2399"RTN","C0QMAIN",133,0)
2400 Q
2401"RTN","C0QMAIN",134,0)
2402 ;
2403"RTN","C0QMAIN",135,0)
2404EN ; ENTRY POINT FOR COMMAND LINE AND MENU ACCESS TO C0QRPC
2405"RTN","C0QMAIN",136,0)
2406 ;
2407"RTN","C0QMAIN",137,0)
2408 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2409"RTN","C0QMAIN",138,0)
2410 I Y<1 Q ; EXIT
2411"RTN","C0QMAIN",139,0)
2412 N MSIEN S MSIEN=+Y
2413"RTN","C0QMAIN",140,0)
2414 ;D C0QRPC(.G,MSIEN)
2415"RTN","C0QMAIN",141,0)
2416 D UPDATE^C0QUPDT(.G,MSIEN)
2417"RTN","C0QMAIN",142,0)
2418 Q
2419"RTN","C0QMAIN",143,0)
2420 ;
2421"RTN","C0QMAIN",144,0)
2422EN2 ; SUMMARY ENTRY POINT FOR COMMAND LINE AND MENU ACCESS TO C0QRPC
2423"RTN","C0QMAIN",145,0)
2424 ;
2425"RTN","C0QMAIN",146,0)
2426 S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC
2427"RTN","C0QMAIN",147,0)
2428 I Y<1 Q ; EXIT
2429"RTN","C0QMAIN",148,0)
2430 N MSIEN S MSIEN=+Y
2431"RTN","C0QMAIN",149,0)
2432 S C0QSUM=1
2433"RTN","C0QMAIN",150,0)
2434 D C0QRPC(.G,MSIEN)
2435"RTN","C0QMAIN",151,0)
2436 ; iterate over the measures
2437"RTN","C0QMAIN",152,0)
2438 S MEASURE=0
2439"RTN","C0QMAIN",153,0)
2440 F S MEASURE=$O(^C0Q(201,MSIEN,5,MEASURE)) Q:MEASURE'>0 D
2441"RTN","C0QMAIN",154,0)
2442 . S NUMER=0,DENOM=0
2443"RTN","C0QMAIN",155,0)
2444 . ; now count the numerator patients
2445"RTN","C0QMAIN",156,0)
2446 . S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,1,P)) Q:P'>0 S NUMER=NUMER+1
2447"RTN","C0QMAIN",157,0)
2448 . S $P(^C0Q(201,MSIEN,5,MEASURE,2),U)=NUMER
2449"RTN","C0QMAIN",158,0)
2450 . ; and count the denominator patients
2451"RTN","C0QMAIN",159,0)
2452 . S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,3,P)) Q:P'>0 S DENOM=DENOM+1
2453"RTN","C0QMAIN",160,0)
2454 . Q:DENOM=0
2455"RTN","C0QMAIN",161,0)
2456 . ; and stuff the values
2457"RTN","C0QMAIN",162,0)
2458 . S $P(^C0Q(201,MSIEN,5,MEASURE,4),U,1,2)=DENOM_U_$J(100*NUMER/DENOM,0,0)
2459"RTN","C0QMAIN",163,0)
2460 . Q
2461"RTN","C0QMAIN",164,0)
2462 Q
2463"RTN","C0QMAIN",165,0)
2464 ;
2465"RTN","C0QMAIN",166,0)
2466C0QRPC(RTN,MSET,FMT,NOPURGE) ; RPC FORMAT
2467"RTN","C0QMAIN",167,0)
2468 ; MSET IS THE NAME OR IEN OF THE MEASURE SET
2469"RTN","C0QMAIN",168,0)
2470 ; RTN IS THE RETURN ARRAY OF THE RESULTS PASSED BY REFERENCE
2471"RTN","C0QMAIN",169,0)
2472 ; FMT IS THE FORMAT OF THE OUTPUT - "ARRAY" OR "HTML" OR "XML"
2473"RTN","C0QMAIN",170,0)
2474 ; NOTE: ARRAY IS DEFAULT AND THE OTHERS ARE NOT IMPLEMENTED YET
2475"RTN","C0QMAIN",171,0)
2476 ; IF NOPURGE IS 1, PATIENT LISTS WILL NOT BE DELETED BEFORE ADDING
2477"RTN","C0QMAIN",172,0)
2478 ; IF NOPURGE IS 0 OR OMITTED, PATIENT LISTS WILL BE DELETED THEN ADDED
2479"RTN","C0QMAIN",173,0)
2480 ;W !,"LOOKING FOR MEASURE SET ",MSET,!
2481"RTN","C0QMAIN",174,0)
2482 N ZI S ZI=""
2483"RTN","C0QMAIN",175,0)
2484 N C0QM ; FOR HOLDING THE MEASURES IN THE SET
2485"RTN","C0QMAIN",176,0)
2486 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES
2487"RTN","C0QMAIN",177,0)
2488 D DELIST("C0QM")
2489"RTN","C0QMAIN",178,0)
2490 N ZII S ZII=0
2491"RTN","C0QMAIN",179,0)
2492 F S ZII=$O(C0QM(ZII)) Q:+ZII=0 D ; FOR EACH MEASURE
2493"RTN","C0QMAIN",180,0)
2494 . D CLEARMEA(MSET,ZII) ; FIRST CLEAR OUT THE MEASURE
2495"RTN","C0QMAIN",181,0)
2496 K C0QM
2497"RTN","C0QMAIN",182,0)
2498 D CLEAN^DILF
2499"RTN","C0QMAIN",183,0)
2500 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES AGAIN
2501"RTN","C0QMAIN",184,0)
2502 D DELIST("C0QM")
2503"RTN","C0QMAIN",185,0)
2504 F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE
2505"RTN","C0QMAIN",186,0)
2506 . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
2507"RTN","C0QMAIN",187,0)
2508 . ;W $$GET1^DIQ($$C0QQFN,ZI_",","DISPLAY NAME"),!
2509"RTN","C0QMAIN",188,0)
2510 . ;N C0QNL,C0QDL ;NUMERATOR AND DENOMINATOR LIST POINTERS
2511"RTN","C0QMAIN",189,0)
2512 . ;W !,"MEASURE: ",$$GET1^DIQ($$C0QQFN,ZI_",",.01),! ; PRINT THE MEASURE NAME
2513"RTN","C0QMAIN",190,0)
2514 . ; FOLLOW THE POINTERS TO THE C0Q QUALITYM MEASURE FILE AND GET LIST PTRS
2515"RTN","C0QMAIN",191,0)
2516 . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
2517"RTN","C0QMAIN",192,0)
2518 . I C0QNL="" D ; CHECK ALTERNATE LIST
2519"RTN","C0QMAIN",193,0)
2520 . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER
2521"RTN","C0QMAIN",194,0)
2522 . . I C0QNL'="" S C0QNALT=1
2523"RTN","C0QMAIN",195,0)
2524 . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER
2525"RTN","C0QMAIN",196,0)
2526 . I C0QDL="" D ; CHECK ALTERNATE LIST
2527"RTN","C0QMAIN",197,0)
2528 . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER
2529"RTN","C0QMAIN",198,0)
2530 . . I C0QDL'="" S C0QDALT=1
2531"RTN","C0QMAIN",199,0)
2532 . ; NOW FOLLOW THE LIST POINTERS TO THE REMINDER PATIENT LIST FILE
2533"RTN","C0QMAIN",200,0)
2534 . ;W "NUMERATOR: ",$$GET1^DIQ($$RLSTFN,C0QNL_",","NAME"),!
2535"RTN","C0QMAIN",201,0)
2536 . ; FIRST PROCESS THE NUMERATOR
2537"RTN","C0QMAIN",202,0)
2538 . K ^TMP("DILIST",$J)
2539"RTN","C0QMAIN",203,0)
2540 . N C0QUFN ; FILE NUMBER TO USE
2541"RTN","C0QMAIN",204,0)
2542 . I $G(C0QNALT)=1 S C0QUFN=$$C0QALFN()
2543"RTN","C0QMAIN",205,0)
2544 . E S C0QUFN=$$RLSTPFN
2545"RTN","C0QMAIN",206,0)
2546 . D LIST^DIC(C0QUFN,","_C0QNL_",",".01I") ; GET THE LIST OF PATIENTS
2547"RTN","C0QMAIN",207,0)
2548 . ;D DELIST("G") ;
2549"RTN","C0QMAIN",208,0)
2550 . ;I $D(G) ZWR G
2551"RTN","C0QMAIN",209,0)
2552 . K C0QNUMP
2553"RTN","C0QMAIN",210,0)
2554 . S NCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; NUMERATOR COUNT
2555"RTN","C0QMAIN",211,0)
2556 . N ZJ S ZJ=""
2557"RTN","C0QMAIN",212,0)
2558 . F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ;
2559"RTN","C0QMAIN",213,0)
2560 . . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01)
2561"RTN","C0QMAIN",214,0)
2562 . . S C0QNUMP("N",ZJ,ZDFN)=""
2563"RTN","C0QMAIN",215,0)
2564 . ;I '$G(C0QSUM) ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES
2565"RTN","C0QMAIN",216,0)
2566 . D ADDPATS(MSET,ZII,"C0QNUMP")
2567"RTN","C0QMAIN",217,0)
2568 . ; NEXT PROCESS THE DENOMINATOR
2569"RTN","C0QMAIN",218,0)
2570 . ;W "DENOMINATOR: ",$$GET1^DIQ($$RLSTFN,C0QDL_",","NAME"),!
2571"RTN","C0QMAIN",219,0)
2572 . K ^TMP("DILIST",$J)
2573"RTN","C0QMAIN",220,0)
2574 . I $G(C0QDALT)=1 S C0QUFN=$$C0QALFN()
2575"RTN","C0QMAIN",221,0)
2576 . E S C0QUFN=$$RLSTPFN
2577"RTN","C0QMAIN",222,0)
2578 . D LIST^DIC(C0QUFN,","_C0QDL_",",".01I") ; GET THE LIST OF PATIENTS
2579"RTN","C0QMAIN",223,0)
2580 . ;D DELIST("G")
2581"RTN","C0QMAIN",224,0)
2582 . ;I $D(G) ZWR G
2583"RTN","C0QMAIN",225,0)
2584 . ;S ZJ=""
2585"RTN","C0QMAIN",226,0)
2586 . S DCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; DENOMONIATOR COUNT
2587"RTN","C0QMAIN",227,0)
2588 . K C0QDEMP
2589"RTN","C0QMAIN",228,0)
2590 . F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ;
2591"RTN","C0QMAIN",229,0)
2592 . . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01)
2593"RTN","C0QMAIN",230,0)
2594 . . S C0QDEMP("D",ZJ,ZDFN)=""
2595"RTN","C0QMAIN",231,0)
2596 . D ADDPATS(MSET,ZII,"C0QDEMP")
2597"RTN","C0QMAIN",232,0)
2598 . ;I $G(C0QSUM)'=1 ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES
2599"RTN","C0QMAIN",233,0)
2600 . ;E D ;
2601"RTN","C0QMAIN",234,0)
2602 . ;. W "NUM CNT: ",NCNT
2603"RTN","C0QMAIN",235,0)
2604 . ;. W " DEN CNT: ",DCNT,!
2605"RTN","C0QMAIN",236,0)
2606 Q
2607"RTN","C0QMAIN",237,0)
2608 ;
2609"RTN","C0QMAIN",238,0)
2610CLEARMEA(MSET,MEAS) ; DELETE AND THEN RECREATE AS EMPTY THE
2611"RTN","C0QMAIN",239,0)
2612 ; MEASURE MEAS IN MEASURE SET IEN MSET
2613"RTN","C0QMAIN",240,0)
2614 ;
2615"RTN","C0QMAIN",241,0)
2616 N C0QFDA,MFN,MEASURE
2617"RTN","C0QMAIN",242,0)
2618 S MFN=$$C0QMMFN() ; FILE NUMBER FOR MEASURE SUBFILE
2619"RTN","C0QMAIN",243,0)
2620 D CLEAN^DILF
2621"RTN","C0QMAIN",244,0)
2622 S MEASURE=$$GET1^DIQ(MFN,MEAS_","_MSET_",",.01,"I") ; MEASURE POINTER
2623"RTN","C0QMAIN",245,0)
2624 D CLEAN^DILF
2625"RTN","C0QMAIN",246,0)
2626 K ZERR
2627"RTN","C0QMAIN",247,0)
2628 S C0QFDA(MFN,MEAS_","_MSET_",",.01)="@" ; GET READY TO DELETE THE MEASURE
2629"RTN","C0QMAIN",248,0)
2630 D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE
2631"RTN","C0QMAIN",249,0)
2632 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
2633"RTN","C0QMAIN",250,0)
2634 ;. W "ERROR",!
2635"RTN","C0QMAIN",251,0)
2636 ;. ZWR ZERR
2637"RTN","C0QMAIN",252,0)
2638 ;. B
2639"RTN","C0QMAIN",253,0)
2640 K C0QFDA
2641"RTN","C0QMAIN",254,0)
2642 S C0QFDA(MFN,"+1,"_MSET_",",.01)=MEASURE ; GET READY TO RECREATE THE SUBFILE
2643"RTN","C0QMAIN",255,0)
2644 D UPDIE ; CREATE THE SUBFILE
2645"RTN","C0QMAIN",256,0)
2646 Q
2647"RTN","C0QMAIN",257,0)
2648 ;
2649"RTN","C0QMAIN",258,0)
2650ADDPATS(MSET,MEAS,PATS) ;ADD PATIENTS TO NUMERATOR AND DENOMINATOR
2651"RTN","C0QMAIN",259,0)
2652 ; OF MEASURE SET IEN MSET MEASURE IEN MEAS
2653"RTN","C0QMAIN",260,0)
2654 ; PATS IS OF THE FORM @PATS@("N",X,DFN)="" AND @PATS@("D",X,DFN)=""
2655"RTN","C0QMAIN",261,0)
2656 ; WHERE N IS FOR NUMERATOR AND D IS FOR DENOMINATOR AND X 1..N
2657"RTN","C0QMAIN",262,0)
2658 ; IF PATIENTS ARE ALREADY THERE, THEY WILL NOT BE ADDED AGAIN
2659"RTN","C0QMAIN",263,0)
2660 N C0QI,C0QJ
2661"RTN","C0QMAIN",264,0)
2662 N C0QFDA
2663"RTN","C0QMAIN",265,0)
2664 S C0QI=""
2665"RTN","C0QMAIN",266,0)
2666 F S C0QI=$O(@PATS@("N",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT
2667"RTN","C0QMAIN",267,0)
2668 . S C0QFDA($$C0QMMNFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("N",C0QI,""))
2669"RTN","C0QMAIN",268,0)
2670 ;W "ADDING NUMERATOR",!
2671"RTN","C0QMAIN",269,0)
2672 ;I $D(C0QFDA) ZWR C0QFDA
2673"RTN","C0QMAIN",270,0)
2674 I $D(C0QFDA) D UPDIE
2675"RTN","C0QMAIN",271,0)
2676 K C0QFDA
2677"RTN","C0QMAIN",272,0)
2678 S C0QI=""
2679"RTN","C0QMAIN",273,0)
2680 F S C0QI=$O(@PATS@("D",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT
2681"RTN","C0QMAIN",274,0)
2682 . S C0QFDA($$C0QMMDFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("D",C0QI,""))
2683"RTN","C0QMAIN",275,0)
2684 ;W "ADDING DENOMINATOR",!
2685"RTN","C0QMAIN",276,0)
2686 ;I $D(C0QFDA) ZWR C0QFDA
2687"RTN","C0QMAIN",277,0)
2688 I $D(C0QFDA) D UPDIE
2689"RTN","C0QMAIN",278,0)
2690 Q
2691"RTN","C0QMAIN",279,0)
2692 ;
2693"RTN","C0QMAIN",280,0)
2694DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO
2695"RTN","C0QMAIN",281,0)
2696 ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
2697"RTN","C0QMAIN",282,0)
2698 N ZI,IV,EV,ZDI,ZIEN
2699"RTN","C0QMAIN",283,0)
2700 S ZI=""
2701"RTN","C0QMAIN",284,0)
2702 S ZDI=$NA(^TMP("DILIST",$J))
2703"RTN","C0QMAIN",285,0)
2704 K @RTN
2705"RTN","C0QMAIN",286,0)
2706 F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ;
2707"RTN","C0QMAIN",287,0)
2708 . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
2709"RTN","C0QMAIN",288,0)
2710 . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE
2711"RTN","C0QMAIN",289,0)
2712 . S ZIEN=@ZDI@(2,ZI) ; IEN
2713"RTN","C0QMAIN",290,0)
2714 . S @RTN@(ZIEN)=IV_"^"_EV
2715"RTN","C0QMAIN",291,0)
2716 Q
2717"RTN","C0QMAIN",292,0)
2718 ;
2719"RTN","C0QMAIN",293,0)
2720DELPATS(MSET,MEAS,NDEL) ; DELETE PATIENTS FROM NUMERATOR AND DENOMINATOR
2721"RTN","C0QMAIN",294,0)
2722 ; FOR A MEASURE (ONLY AFFECTS THE C0Q MEASURES FILE)
2723"RTN","C0QMAIN",295,0)
2724 ; MSET IS THE IEN OF THE MEASURE SET
2725"RTN","C0QMAIN",296,0)
2726 ; MEAS IS THE IEN OF THE MEASURE
2727"RTN","C0QMAIN",297,0)
2728 ; NDEL IS A LIST OF PATIENTS TO NOT DELETE (NOT IMPLEMENTED YET)
2729"RTN","C0QMAIN",298,0)
2730 ; IN THE FORM @NDEL@("N",IEN,DFN)="" FOR NUMERATOR PATIENTS
2731"RTN","C0QMAIN",299,0)
2732 ; AND @NDEL@("D",IEN,DFN)="" FOR DENOMINATOR PATIENTS WHERE IEN IS
2733"RTN","C0QMAIN",300,0)
2734 ; THE IEN OF THE PATIENT RECORD IN THE SUBFILE
2735"RTN","C0QMAIN",301,0)
2736 ; THIS FEATURE WILL ALLOW EFFICIENCIES FOR LONG PATIENT LISTS
2737"RTN","C0QMAIN",302,0)
2738 ; IN THAT PATIENTS THAT ARE GOING TO BE ADDED ARE NOT FIRST DELETED
2739"RTN","C0QMAIN",303,0)
2740 N C0QI,C0QJ
2741"RTN","C0QMAIN",304,0)
2742 D LIST^DIC($$C0QMMFN,","_MSET_",")
2743"RTN","C0QMAIN",305,0)
2744 K C0QFDA
2745"RTN","C0QMAIN",306,0)
2746 ;ZWR ^TMP("DILIST",$J,*)
2747"RTN","C0QMAIN",307,0)
2748 ;ZWR ^TMP("DIERR",$J,*)
2749"RTN","C0QMAIN",308,0)
2750 ;D
2751"RTN","C0QMAIN",309,0)
2752 Q
2753"RTN","C0QMAIN",310,0)
2754 ;
2755"RTN","C0QMAIN",311,0)
2756UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
2757"RTN","C0QMAIN",312,0)
2758 K ZERR
2759"RTN","C0QMAIN",313,0)
2760 D CLEAN^DILF
2761"RTN","C0QMAIN",314,0)
2762 D UPDATE^DIE("","C0QFDA","","ZERR")
2763"RTN","C0QMAIN",315,0)
2764 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
2765"RTN","C0QMAIN",316,0)
2766 ;. W "ERROR",!
2767"RTN","C0QMAIN",317,0)
2768 ;. ZWR ZERR
2769"RTN","C0QMAIN",318,0)
2770 ;. B
2771"RTN","C0QMAIN",319,0)
2772 K C0QFDA
2773"RTN","C0QMAIN",320,0)
2774 Q
2775"RTN","C0QMAIN",321,0)
2776 ;
2777"RTN","C0QMAIN",322,0)
2778QUE ;QUE THE RUN OF THE PATIENT LISTS AND THE BUILD THE LISTS OF THE PATIENTS
2779"RTN","C0QMAIN",323,0)
2780 ;AND THEIR MEASURES
2781"RTN","C0QMAIN",324,0)
2782 S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE")
2783"RTN","C0QMAIN",325,0)
2784 N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
2785"RTN","C0QMAIN",326,0)
2786 S ZTDESC="CREATE PATIENT LIST"
2787"RTN","C0QMAIN",327,0)
2788 S ZTRTN="RUN^C0QMAIN"
2789"RTN","C0QMAIN",328,0)
2790 S ZTSAVE("MSIEN")=""
2791"RTN","C0QMAIN",329,0)
2792 S ZTIO=""
2793"RTN","C0QMAIN",330,0)
2794 S ZTDTH=$$NOW^XLFDT
2795"RTN","C0QMAIN",331,0)
2796 D ^%ZTLOAD
2797"RTN","C0QMAIN",332,0)
2798 Q
2799"RTN","C0QMAIN",333,0)
2800 ;
2801"RTN","C0QMAIN",334,0)
2802RUN ; DO THE REAL WORK
2803"RTN","C0QMAIN",335,0)
2804 I '$D(MSIEN) S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE")
2805"RTN","C0QMAIN",336,0)
2806 S BEG=$P(^C0Q(201,MSIEN,4),U,3) ;Begin date
2807"RTN","C0QMAIN",337,0)
2808 S END=$P(^C0Q(201,MSIEN,4),U,4) ;End date
2809"RTN","C0QMAIN",338,0)
2810 S PATCREAT="N" ;Secure list - N=No
2811"RTN","C0QMAIN",339,0)
2812 S PLISTPUG="N" ;Purge list after 5 years - N=No
2813"RTN","C0QMAIN",340,0)
2814 S PXRMDPAT=0 ;Include deceased patients - N=No
2815"RTN","C0QMAIN",341,0)
2816 S PXRMTPAT=0 ;Include test patients - N=No
2817"RTN","C0QMAIN",342,0)
2818 S PXRMNODE="PXRMRULE" ;Node in ^TMP($J,"PXRMRULE"
2819"RTN","C0QMAIN",343,0)
2820 N ZI S ZI=""
2821"RTN","C0QMAIN",344,0)
2822 F S ZI=$O(^C0Q(201,MSIEN,5,"B",ZI)) Q:ZI'>0 D ; LOOP THROUGH EACH QM
2823"RTN","C0QMAIN",345,0)
2824 . S PXRMLSTN=+$P(^C0Q(101,ZI,0),U,2) ; NUMERATOR MEASURE
2825"RTN","C0QMAIN",346,0)
2826 . S PXRMLSTD=+$P(^C0Q(101,ZI,0),U,3) ; DENOMINATOR MEASURE
2827"RTN","C0QMAIN",347,0)
2828 . S PXRMRULN=+$P(^PXRMXP(810.5,PXRMLSTN,0),U,6) ; RULES FOR THE LIST
2829"RTN","C0QMAIN",348,0)
2830 . S PXRMRULD=+$P(^PXRMXP(810.5,PXRMLSTD,0),U,6)
2831"RTN","C0QMAIN",349,0)
2832 . D RUN^PXRMLCR(PXRMRULD,PXRMLSTD,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT)
2833"RTN","C0QMAIN",350,0)
2834 . D RUN^PXRMLCR(PXRMRULN,PXRMLSTN,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT)
2835"RTN","C0QMAIN",351,0)
2836 D C0QRPC(.G,MSIEN)
2837"RTN","C0QMAIN",352,0)
2838 Q
2839"RTN","C0QPQRI")
28400^7^B41579607
2841"RTN","C0QPQRI",1,0)
2842C0QPQRI ; GPL - GENERATES A PQRI XML FILE ;6/14/11 17:05
2843"RTN","C0QPQRI",2,0)
2844 ;;0.1;C0C;nopatch;noreleasedate;Build 19
2845"RTN","C0QPQRI",3,0)
2846 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU
2847"RTN","C0QPQRI",4,0)
2848 ;General Public License See attached copy of the License.
2849"RTN","C0QPQRI",5,0)
2850 ;
2851"RTN","C0QPQRI",6,0)
2852 ;This program is free software; you can redistribute it and/or modify
2853"RTN","C0QPQRI",7,0)
2854 ;it under the terms of the GNU General Public License as published by
2855"RTN","C0QPQRI",8,0)
2856 ;the Free Software Foundation; either version 2 of the License, or
2857"RTN","C0QPQRI",9,0)
2858 ;(at your option) any later version.
2859"RTN","C0QPQRI",10,0)
2860 ;
2861"RTN","C0QPQRI",11,0)
2862 ;This program is distributed in the hope that it will be useful,
2863"RTN","C0QPQRI",12,0)
2864 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
2865"RTN","C0QPQRI",13,0)
2866 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2867"RTN","C0QPQRI",14,0)
2868 ;GNU General Public License for more details.
2869"RTN","C0QPQRI",15,0)
2870 ;
2871"RTN","C0QPQRI",16,0)
2872 ;You should have received a copy of the GNU General Public License along
2873"RTN","C0QPQRI",17,0)
2874 ;with this program; if not, write to the Free Software Foundation, Inc.,
2875"RTN","C0QPQRI",18,0)
2876 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2877"RTN","C0QPQRI",19,0)
2878 ;
2879"RTN","C0QPQRI",20,0)
2880 Q
2881"RTN","C0QPQRI",21,0)
2882 ;
2883"RTN","C0QPQRI",22,0)
2884C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE
2885"RTN","C0QPQRI",23,0)
2886C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
2887"RTN","C0QPQRI",24,0)
2888C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
2889"RTN","C0QPQRI",25,0)
2890C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE
2891"RTN","C0QPQRI",26,0)
2892C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE
2893"RTN","C0QPQRI",27,0)
2894RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE
2895"RTN","C0QPQRI",28,0)
2896RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE
2897"RTN","C0QPQRI",29,0)
2898 ;
2899"RTN","C0QPQRI",30,0)
2900EN ;
2901"RTN","C0QPQRI",31,0)
2902 ; lets try some hard coded values for now
2903"RTN","C0QPQRI",32,0)
2904 N C0QVAR
2905"RTN","C0QPQRI",33,0)
2906 ;
2907"RTN","C0QPQRI",34,0)
2908 ; first, the values that occur only once for the file
2909"RTN","C0QPQRI",35,0)
2910 ;
2911"RTN","C0QPQRI",36,0)
2912 S C0QVAR("create-by")="RegistryA"
2913"RTN","C0QPQRI",37,0)
2914 S C0QVAR("create-date")="12-10-2010"
2915"RTN","C0QPQRI",38,0)
2916 S C0QVAR("create-time")="14:27"
2917"RTN","C0QPQRI",39,0)
2918 S C0QVAR("file-number")=1
2919"RTN","C0QPQRI",40,0)
2920 S C0QVAR("number-of-files")=9
2921"RTN","C0QPQRI",41,0)
2922 S C0QVAR("version")="1.0"
2923"RTN","C0QPQRI",42,0)
2924 ;
2925"RTN","C0QPQRI",43,0)
2926 ; registry values
2927"RTN","C0QPQRI",44,0)
2928 ;
2929"RTN","C0QPQRI",45,0)
2930 S C0QVAR("registry-id")=125789123
2931"RTN","C0QPQRI",46,0)
2932 S C0QVAR("registry-name")="Model Registry"
2933"RTN","C0QPQRI",47,0)
2934 S C0QVAR("submission-method")="C"
2935"RTN","C0QPQRI",48,0)
2936 ;
2937"RTN","C0QPQRI",49,0)
2938 ; values for each provider
2939"RTN","C0QPQRI",50,0)
2940 ;
2941"RTN","C0QPQRI",51,0)
2942 S C0QVAR("npi")=12011989
2943"RTN","C0QPQRI",52,0)
2944 S C0QVAR("tin")=387682321
2945"RTN","C0QPQRI",53,0)
2946 S C0QVAR("waiver-signed")="Y"
2947"RTN","C0QPQRI",54,0)
2948 S C0QVAR("encounter-from-date")="06-13-2010"
2949"RTN","C0QPQRI",55,0)
2950 S C0QVAR("encounter-to-date")="12-10-2010"
2951"RTN","C0QPQRI",56,0)
2952 ;
2953"RTN","C0QPQRI",57,0)
2954 ; values for each measure group
2955"RTN","C0QPQRI",58,0)
2956 ;
2957"RTN","C0QPQRI",59,0)
2958 S C0QVAR("ffs-patient-count")=2
2959"RTN","C0QPQRI",60,0)
2960 S C0QVAR("group-eligible-instances")=30
2961"RTN","C0QPQRI",61,0)
2962 S C0QVAR("group-reporting-rate")=66.67
2963"RTN","C0QPQRI",62,0)
2964 S C0QVAR("group-reporting-rate-numerator")=20
2965"RTN","C0QPQRI",63,0)
2966 ;
2967"RTN","C0QPQRI",64,0)
2968 ; for each measure
2969"RTN","C0QPQRI",65,0)
2970 ;
2971"RTN","C0QPQRI",66,0)
2972 S C0QVAR("pqri-measure-number")=128
2973"RTN","C0QPQRI",67,0)
2974 S C0QVAR("eligible-instances")=100
2975"RTN","C0QPQRI",68,0)
2976 S C0QVAR("meets-performance-instances")=18
2977"RTN","C0QPQRI",69,0)
2978 S C0QVAR("performance-exclusion-instances")=0
2979"RTN","C0QPQRI",70,0)
2980 S C0QVAR("performance-not-met-instances")=10
2981"RTN","C0QPQRI",71,0)
2982 S C0QVAR("performance-rate")="90.00"
2983"RTN","C0QPQRI",72,0)
2984 S C0QVAR("reporting-rate")="28.00"
2985"RTN","C0QPQRI",73,0)
2986 ;
2987"RTN","C0QPQRI",74,0)
2988 ;
2989"RTN","C0QPQRI",75,0)
2990 N ZG,ZV
2991"RTN","C0QPQRI",76,0)
2992 D GETTEMP^C0CMXP("ZG","PQRIXML") ; GET THE TEMPLATE
2993"RTN","C0QPQRI",77,0)
2994 D BIND^C0CSOAP("ZV","C0QVAR","PQRIXML") ; GET BINDING VALUES
2995"RTN","C0QPQRI",78,0)
2996 D MAP^C0CXPATH("ZG","ZV","ZO") ; MAP THE XML
2997"RTN","C0QPQRI",79,0)
2998 D MEA("GG","GGG") ; GET THE MEASURES
2999"RTN","C0QPQRI",80,0)
3000 N GB ; BUILD LIST
3001"RTN","C0QPQRI",81,0)
3002 D QUEUE^C0CXPATH("GB","ZO",1,30) ; first part of pqri.xml
3003"RTN","C0QPQRI",82,0)
3004 D QUEUE^C0CXPATH("GB","GG",2,$O(GG(""),-1)-1) ; the measures
3005"RTN","C0QPQRI",83,0)
3006 D QUEUE^C0CXPATH("GB","ZO",$O(ZO(""),-1)-2,$O(ZO(""),-1)) ; LAST LINES
3007"RTN","C0QPQRI",84,0)
3008 D BUILD^C0CXPATH("GB","GZO") ; BUILD THE XML
3009"RTN","C0QPQRI",85,0)
3010 N ZI S ZI=0
3011"RTN","C0QPQRI",86,0)
3012 F S ZI=$O(ZO(ZI)) Q:ZI="" D ; FOR EACH LINE OF XML
3013"RTN","C0QPQRI",87,0)
3014 . W !,GZO(ZI) ; WRITE OUT THE XML
3015"RTN","C0QPQRI",88,0)
3016 N GN,GN1,GD S GN=$NA(^TMP("C0QXML",$J))
3017"RTN","C0QPQRI",89,0)
3018 K @GN
3019"RTN","C0QPQRI",90,0)
3020 K ZO(0) ; GET RID OF LINE COUNT
3021"RTN","C0QPQRI",91,0)
3022 M @GN=GZO
3023"RTN","C0QPQRI",92,0)
3024 S GN1=$NA(@GN@(1))
3025"RTN","C0QPQRI",93,0)
3026 S GD=$G(^TMP("C0CCCR","ODIR")) ; CONVENIENT OUTPUT DIRECTORY
3027"RTN","C0QPQRI",94,0)
3028 W $$OUTPUT^C0CXPATH(GN1,"pqri.xml",GD)
3029"RTN","C0QPQRI",95,0)
3030 K @GN ; DONT NEED IT ANYMORE
3031"RTN","C0QPQRI",96,0)
3032 Q
3033"RTN","C0QPQRI",97,0)
3034 ;
3035"RTN","C0QPQRI",98,0)
3036INSERT(ZARY,ZONE) ; INSERT ONE MEASURE INTO THE ARRAY
3037"RTN","C0QPQRI",99,0)
3038 ;
3039"RTN","C0QPQRI",100,0)
3040 ;N GGG
3041"RTN","C0QPQRI",101,0)
3042 S GGG="//submission/measure-group ID='C'/provider/pqri-measure" ;XPATH
3043"RTN","C0QPQRI",102,0)
3044 D INSINNER^COCXPATH(ZARY,GGG,ZONE) ; INSERT XML
3045"RTN","C0QPQRI",103,0)
3046 Q
3047"RTN","C0QPQRI",104,0)
3048 ;
3049"RTN","C0QPQRI",105,0)
3050PQRI(ZOUT,KEEP) ; RETURN THE NHIN ARRAY FOR THE PQRI XML TEMPLATE
3051"RTN","C0QPQRI",106,0)
3052 ;
3053"RTN","C0QPQRI",107,0)
3054 N ZG
3055"RTN","C0QPQRI",108,0)
3056 S ZG=$NA(^TMP("PQRIXML",$J))
3057"RTN","C0QPQRI",109,0)
3058 K @ZG
3059"RTN","C0QPQRI",110,0)
3060 D GETXML^C0CMXP(ZG,"PQRIXML") ; GET THE XML FROM C0C MISC XML
3061"RTN","C0QPQRI",111,0)
3062 N C0CDOCID
3063"RTN","C0QPQRI",112,0)
3064 S C0CDOCID=$$PARSE^C0CDOM(ZG,"PQRIXML") ; PARSE THE XML
3065"RTN","C0QPQRI",113,0)
3066 D DOMO^C0CDOM(C0CDOCID,"/","ZOUT","GIDX","GARY",,"//submission") ; BLD ARRAYS
3067"RTN","C0QPQRI",114,0)
3068 I '$G(KEEP) K GIDX,GARY ; GET RID OF THE ARRAYS UNLESS KEEP=1
3069"RTN","C0QPQRI",115,0)
3070 Q
3071"RTN","C0QPQRI",116,0)
3072 ;
3073"RTN","C0QPQRI",117,0)
3074PROCESS(ZRSLT,ZXML,ZREDUCE,KEEP) ; PARSE AND RUN DOMO ON XML
3075"RTN","C0QPQRI",118,0)
3076 ; ZRTN IS PASSED BY REFERENCE
3077"RTN","C0QPQRI",119,0)
3078 ; ZXML IS PASSED BY NAME
3079"RTN","C0QPQRI",120,0)
3080 ; IF KEEP IS 1, GARY AND GIDX ARE NOT KILLED
3081"RTN","C0QPQRI",121,0)
3082 ;
3083"RTN","C0QPQRI",122,0)
3084 N ZG
3085"RTN","C0QPQRI",123,0)
3086 S ZG=$NA(^TMP("C0CXML",$J))
3087"RTN","C0QPQRI",124,0)
3088 K @ZG
3089"RTN","C0QPQRI",125,0)
3090 M @ZG=@ZXML
3091"RTN","C0QPQRI",126,0)
3092 S C0CDOCID=$$PARSE^C0CDOM(ZG,"NHINARRAY") ; PARSE WITH MXML
3093"RTN","C0QPQRI",127,0)
3094 D DOMO^C0CDOM(C0CDOCID,"/","ZRSLT","GIDX","GARY",,$G(ZREDUCE)) ; BLD ARRAYS
3095"RTN","C0QPQRI",128,0)
3096 I '$G(KEEP) K GIDX,GARY,@ZG ; GET RID OF THE ARRAYS UNLESS KEEP=1
3097"RTN","C0QPQRI",129,0)
3098 Q
3099"RTN","C0QPQRI",130,0)
3100 ;
3101"RTN","C0QPQRI",131,0)
3102GETFM(RTN,ZREC) ; GET THE QUALITY MEASURES ARRAY
3103"RTN","C0QPQRI",132,0)
3104 ;
3105"RTN","C0QPQRI",133,0)
3106 I '$D(ZREC) S ZREC=7 ; OUTPATIENT CERTIFICATION SET
3107"RTN","C0QPQRI",134,0)
3108 ;N GPL
3109"RTN","C0QPQRI",135,0)
3110 D LIST^DIC($$C0QMMFN(),","_ZREC_",",".01;1.1;2.1;3;",,,,,,,,"GPL")
3111"RTN","C0QPQRI",136,0)
3112 N ZI S ZI=""
3113"RTN","C0QPQRI",137,0)
3114 F S ZI=$O(GPL("DILIST","ID",ZI)) Q:ZI="" D ;
3115"RTN","C0QPQRI",138,0)
3116 . S @RTN@(ZI,"measure")=GPL("DILIST","ID",ZI,.01)
3117"RTN","C0QPQRI",139,0)
3118 . N ZMIEN,ZMEAIEN,ZRNAME
3119"RTN","C0QPQRI",140,0)
3120 . S ZMIEN=GPL("DILIST",2,ZI) ; IEN OF MEASURE IN MEASURE FILE
3121"RTN","C0QPQRI",141,0)
3122 . ;S ZMEAIEN=$$GET1^DIQ($$C0QMMFN(),ZMIEN_","_ZREC_",",.01,"I") ; MEASURE
3123"RTN","C0QPQRI",142,0)
3124 . S ZRNAME=$$GET1^DIQ($$C0QMMFN(),ZMIEN_","_ZREC_",",".01:.8") ; MEASURE
3125"RTN","C0QPQRI",143,0)
3126 . ;S @RTN@(ZI,"reportingName")=$$GET1^DIQ($$C0QQFN(),ZMEAIEN_",",.8) ; RNAME
3127"RTN","C0QPQRI",144,0)
3128 . S @RTN@(ZI,"reportingName")=ZRNAME ; A SHORTCUT TO THE REPORTING NAME
3129"RTN","C0QPQRI",145,0)
3130 . S @RTN@(ZI,"reportingNumber")=$P(ZRNAME,"NQF",2) ; NQF0001 -> 0001
3131"RTN","C0QPQRI",146,0)
3132 . S @RTN@(ZI,"denominator")=+GPL("DILIST","ID",ZI,2.1)
3133"RTN","C0QPQRI",147,0)
3134 . S @RTN@(ZI,"numerator")=+GPL("DILIST","ID",ZI,1.1)
3135"RTN","C0QPQRI",148,0)
3136 . N ZNUM,ZDEM,ZPCT
3137"RTN","C0QPQRI",149,0)
3138 . S (ZNUM,ZDEM,ZPCT)=0
3139"RTN","C0QPQRI",150,0)
3140 . S ZDEM=+GPL("DILIST","ID",ZI,2.1)
3141"RTN","C0QPQRI",151,0)
3142 . S ZNUM=+GPL("DILIST","ID",ZI,1.1)
3143"RTN","C0QPQRI",152,0)
3144 . I ZDEM>0 S ZPCT=((ZNUM*100)/ZDEM)
3145"RTN","C0QPQRI",153,0)
3146 . S @RTN@(ZI,"percent")=$P(ZPCT,".",1)
3147"RTN","C0QPQRI",154,0)
3148 . S @RTN@(ZI,"ien")=ZI
3149"RTN","C0QPQRI",155,0)
3150 ;ZWR GPL
3151"RTN","C0QPQRI",156,0)
3152 Q
3153"RTN","C0QPQRI",157,0)
3154 ;
3155"RTN","C0QPQRI",158,0)
3156MEA(ZOUT,ZIN) ; CREATE XML FROM THE MEASURES ARRAY
3157"RTN","C0QPQRI",159,0)
3158 ;
3159"RTN","C0QPQRI",160,0)
3160 D GETFM(ZIN) ; GET THE MEASURES
3161"RTN","C0QPQRI",161,0)
3162 ;N G
3163"RTN","C0QPQRI",162,0)
3164 ;N ZI,ZJ
3165"RTN","C0QPQRI",163,0)
3166 S ZI=""
3167"RTN","C0QPQRI",164,0)
3168 F S ZI=$O(@ZIN@(ZI)) Q:ZI="" D ;
3169"RTN","C0QPQRI",165,0)
3170 . N ZDEN,ZNUM,ZPCT
3171"RTN","C0QPQRI",166,0)
3172 . S ZDEN=$G(@ZIN@(ZI,"denominator"))
3173"RTN","C0QPQRI",167,0)
3174 . S ZNUM=$G(@ZIN@(ZI,"numerator"))
3175"RTN","C0QPQRI",168,0)
3176 . S ZPCT=$G(@ZIN@(ZI,"percent"))
3177"RTN","C0QPQRI",169,0)
3178 . S G("pqri-measure",ZI,"eligible-instances")=ZDEN
3179"RTN","C0QPQRI",170,0)
3180 . S G("pqri-measure",ZI,"meets-performance-instances")=ZNUM
3181"RTN","C0QPQRI",171,0)
3182 . S G("pqri-measure",ZI,"performance-exclusion-instances")=0
3183"RTN","C0QPQRI",172,0)
3184 . S G("pqri-measure",ZI,"performance-not-met-instances")=ZDEN-ZNUM
3185"RTN","C0QPQRI",173,0)
3186 . S G("pqri-measure",ZI,"performance-rate")=ZPCT
3187"RTN","C0QPQRI",174,0)
3188 . S G("pqri-measure",ZI,"pqri-measure-number")="NQF "_@ZIN@(ZI,"reportingNumber")
3189"RTN","C0QPQRI",175,0)
3190 . S G("pqri-measure",ZI,"reporting-rate")=ZPCT
3191"RTN","C0QPQRI",176,0)
3192 K ^TMP("MXMLDOM",$J)
3193"RTN","C0QPQRI",177,0)
3194 S C0CDOCID=$$DOMI^C0CDOM("G",1,"root")
3195"RTN","C0QPQRI",178,0)
3196 D OUTXML^C0CDOM(ZOUT,C0CDOCID,1)
3197"RTN","C0QPQRI",179,0)
3198 Q
3199"RTN","C0QPQRI",180,0)
3200 ;
3201"RTN","C0QPRML")
32020^8^B51124381
3203"RTN","C0QPRML",1,0)
3204C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm
3205"RTN","C0QPRML",2,0)
3206 ;;1.0;MU PACKAGE;;;Build 19
3207"RTN","C0QPRML",3,0)
3208 ;
3209"RTN","C0QPRML",4,0)
3210 ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU
3211"RTN","C0QPRML",5,0)
3212 ;General Public License See attached copy of the License.
3213"RTN","C0QPRML",6,0)
3214 ;
3215"RTN","C0QPRML",7,0)
3216 ;This program is free software; you can redistribute it and/or modify
3217"RTN","C0QPRML",8,0)
3218 ;it under the terms of the GNU General Public License as published by
3219"RTN","C0QPRML",9,0)
3220 ;the Free Software Foundation; either version 2 of the License, or
3221"RTN","C0QPRML",10,0)
3222 ;(at your option) any later version.
3223"RTN","C0QPRML",11,0)
3224 ;
3225"RTN","C0QPRML",12,0)
3226 ;This program is distributed in the hope that it will be useful,
3227"RTN","C0QPRML",13,0)
3228 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
3229"RTN","C0QPRML",14,0)
3230 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3231"RTN","C0QPRML",15,0)
3232 ;GNU General Public License for more details.
3233"RTN","C0QPRML",16,0)
3234 ;
3235"RTN","C0QPRML",17,0)
3236 ;You should have received a copy of the GNU General Public License along
3237"RTN","C0QPRML",18,0)
3238 ;with this program; if not, write to the Free Software Foundation, Inc.,
3239"RTN","C0QPRML",19,0)
3240 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3241"RTN","C0QPRML",20,0)
3242 ;
3243"RTN","C0QPRML",21,0)
3244BUILD ; CALL ALL AND DIS AND BUILD THE GRSLT ARRAY or print or create
3245"RTN","C0QPRML",22,0)
3246 ; patient lists
3247"RTN","C0QPRML",23,0)
3248 ;N GRSLT ; ARRAY FOR RESULTS
3249"RTN","C0QPRML",24,0)
3250 I '$D(C0QSS) S C0QSS=0 ;default don't build spreadsheet array
3251"RTN","C0QPRML",25,0)
3252 I '$D(C0QPR) S C0QPR=0 ;default don't print out results
3253"RTN","C0QPRML",26,0)
3254 I '$D(C0QPL) S C0QPL=1 ;default do create patient lists
3255"RTN","C0QPRML",27,0)
3256 N G1 ; ONE SET OF VALUES - RNF1 FORMAT
3257"RTN","C0QPRML",28,0)
3258 ; INITIALIZE LISTS
3259"RTN","C0QPRML",29,0)
3260 ; this is done so that if there are no matching patients, the patient list
3261"RTN","C0QPRML",30,0)
3262 ; will be zeroed out
3263"RTN","C0QPRML",31,0)
3264 S C0QLIST("HasDemographics")=""
3265"RTN","C0QPRML",32,0)
3266 S C0QLIST("Patient")=""
3267"RTN","C0QPRML",33,0)
3268 S C0QLIST("HasProblem")=""
3269"RTN","C0QPRML",34,0)
3270 S C0QLIST("HasAllergy")=""
3271"RTN","C0QPRML",35,0)
3272 S C0QLIST("HasMed")=""
3273"RTN","C0QPRML",36,0)
3274 S C0QLIST("HasVitalSigns")=""
3275"RTN","C0QPRML",37,0)
3276 S C0QLIST("HasMedOrders")=""
3277"RTN","C0QPRML",38,0)
3278 S C0QLIST("HasSmokingStatus")=""
3279"RTN","C0QPRML",39,0)
3280 D ALL ; all currently admitted patients in the hospital
3281"RTN","C0QPRML",40,0)
3282 D DIS ; all patients discharged since the reporting period began
3283"RTN","C0QPRML",41,0)
3284 I C0QSS ZWR GRSLT
3285"RTN","C0QPRML",42,0)
3286 I C0QPL D ;
3287"RTN","C0QPRML",43,0)
3288 . D FILE ; FILE THE PATIENT LISTS
3289"RTN","C0QPRML",44,0)
3290 . D UPDATE^C0QUPDT(.G,8) ; UPDATE THE MU MEASUREMENT SET
3291"RTN","C0QPRML",45,0)
3292 Q
3293"RTN","C0QPRML",46,0)
3294 ;
3295"RTN","C0QPRML",47,0)
3296ALL ;retrieve active inpatients
3297"RTN","C0QPRML",48,0)
3298 N WARD S WARD=""
3299"RTN","C0QPRML",49,0)
3300 F D Q:WARD=""
3301"RTN","C0QPRML",50,0)
3302 . S WARD=$O(^DIC(42,"B",WARD)) ;ward name
3303"RTN","C0QPRML",51,0)
3304 . Q:WARD=""
3305"RTN","C0QPRML",52,0)
3306 . N WIEN S WIEN=""
3307"RTN","C0QPRML",53,0)
3308 . F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN
3309"RTN","C0QPRML",54,0)
3310 . . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name
3311"RTN","C0QPRML",55,0)
3312 . . N DFN,RB S DFN=""
3313"RTN","C0QPRML",56,0)
3314 . . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward
3315"RTN","C0QPRML",57,0)
3316 . . . D DEMO
3317"RTN","C0QPRML",58,0)
3318 . . . D PROBLEM
3319"RTN","C0QPRML",59,0)
3320 . . . D ALLERGY
3321"RTN","C0QPRML",60,0)
3322 . . . D MEDS
3323"RTN","C0QPRML",61,0)
3324 . . . D SMOKING
3325"RTN","C0QPRML",62,0)
3326 . . . D VITALS
3327"RTN","C0QPRML",63,0)
3328 . . . I C0QPR D PRINT
3329"RTN","C0QPRML",64,0)
3330 . . . I C0QSS D SS
3331"RTN","C0QPRML",65,0)
3332 . . . I C0QPL D PATLIST
3333"RTN","C0QPRML",66,0)
3334 Q
3335"RTN","C0QPRML",67,0)
3336 ;
3337"RTN","C0QPRML",68,0)
3338DEMO ; patient demographics
3339"RTN","C0QPRML",69,0)
3340 S PTNAME=$P(^DPT(DFN,0),U) ;patient name
3341"RTN","C0QPRML",70,0)
3342 S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth
3343"RTN","C0QPRML",71,0)
3344 S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex
3345"RTN","C0QPRML",72,0)
3346 D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility
3347"RTN","C0QPRML",73,0)
3348 S PTHRN=$P($G(VA("PID")),U) ;health record number
3349"RTN","C0QPRML",74,0)
3350 S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file
3351"RTN","C0QPRML",75,0)
3352 I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl
3353"RTN","C0QPRML",76,0)
3354 S RACE=""
3355"RTN","C0QPRML",77,0)
3356 F D Q:RACE=""
3357"RTN","C0QPRML",78,0)
3358 . S RACE=$O(^DPT(DFN,.02,"B",RACE)) ;race code IEN
3359"RTN","C0QPRML",79,0)
3360 . Q:'RACE
3361"RTN","C0QPRML",80,0)
3362 . S RACEDSC=$P($G(^DIC(10,RACE,0)),U) ;race description
3363"RTN","C0QPRML",81,0)
3364 S ETHN=""
3365"RTN","C0QPRML",82,0)
3366 F D Q:ETHN=""
3367"RTN","C0QPRML",83,0)
3368 . S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) ;ethnicity IEN
3369"RTN","C0QPRML",84,0)
3370 . Q:'ETHN
3371"RTN","C0QPRML",85,0)
3372 . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description
3373"RTN","C0QPRML",86,0)
3374 S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed
3375"RTN","C0QPRML",87,0)
3376 Q
3377"RTN","C0QPRML",88,0)
3378 ;
3379"RTN","C0QPRML",89,0)
3380PROBLEM ; PATIENT PROBLEMS
3381"RTN","C0QPRML",90,0)
3382 D LIST^ORQQPL(.PROBL,DFN,"A")
3383"RTN","C0QPRML",91,0)
3384 S PBCNT=""
3385"RTN","C0QPRML",92,0)
3386 F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D
3387"RTN","C0QPRML",93,0)
3388 . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description
3389"RTN","C0QPRML",94,0)
3390 K PROBL
3391"RTN","C0QPRML",95,0)
3392 Q
3393"RTN","C0QPRML",96,0)
3394 ;
3395"RTN","C0QPRML",97,0)
3396ALLERGY ; ALLERGY LIST
3397"RTN","C0QPRML",98,0)
3398 D LIST^ORQQAL(.ALRGYL,DFN)
3399"RTN","C0QPRML",99,0)
3400 S ALCNT=""
3401"RTN","C0QPRML",100,0)
3402 F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D
3403"RTN","C0QPRML",101,0)
3404 . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description
3405"RTN","C0QPRML",102,0)
3406 K ALRGYL
3407"RTN","C0QPRML",103,0)
3408 Q
3409"RTN","C0QPRML",104,0)
3410 ;
3411"RTN","C0QPRML",105,0)
3412MEDS ; MEDICATIONS
3413"RTN","C0QPRML",106,0)
3414 ;
3415"RTN","C0QPRML",107,0)
3416 I DFN=97 D Q ;
3417"RTN","C0QPRML",108,0)
3418 . S MDCNT=271
3419"RTN","C0QPRML",109,0)
3420 K MEDSL
3421"RTN","C0QPRML",110,0)
3422 D EN^C0CNHIN(.MEDSL,DFN,"MED;") ; GET THE MEDS FROM THE NHIN API
3423"RTN","C0QPRML",111,0)
3424 ; can't use COVER^ORWPS even though it's fast.. we need to detect
3425"RTN","C0QPRML",112,0)
3426 ; if the medications are Inpatient to compute the CPOE measure
3427"RTN","C0QPRML",113,0)
3428 ; we will use the NHINV routines for this purpose
3429"RTN","C0QPRML",114,0)
3430 ;D COVER^ORWPS(.MEDSL,DFN)
3431"RTN","C0QPRML",115,0)
3432 S MDCNT="" S HASINP=0
3433"RTN","C0QPRML",116,0)
3434 F S MDCNT=$O(MEDSL("med",MDCNT)) Q:MDCNT="" D
3435"RTN","C0QPRML",117,0)
3436 . ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only
3437"RTN","C0QPRML",118,0)
3438 . Q:MEDSL("med",MDCNT,"status@value")'="active"
3439"RTN","C0QPRML",119,0)
3440 . ;S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
3441"RTN","C0QPRML",120,0)
3442 . S MDDESC=$G(MEDSL("med",MDCNT,"products.product@name"))
3443"RTN","C0QPRML",121,0)
3444 . ;S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
3445"RTN","C0QPRML",122,0)
3446 . S MDITEM=$G(MEDSL("med",MDCNT,"sig")) ; i think this is what meditem is
3447"RTN","C0QPRML",123,0)
3448 . I MEDSL("med",MDCNT,"vaType@value")="I" S HASINP=1
3449"RTN","C0QPRML",124,0)
3450 I HASINP D ; THE PATIENT HAS AN INPATIENT MED
3451"RTN","C0QPRML",125,0)
3452 . S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE
3453"RTN","C0QPRML",126,0)
3454 E S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient
3455"RTN","C0QPRML",127,0)
3456 K MEDSL
3457"RTN","C0QPRML",128,0)
3458 Q
3459"RTN","C0QPRML",129,0)
3460 ;
3461"RTN","C0QPRML",130,0)
3462SMOKING ;
3463"RTN","C0QPRML",131,0)
3464 N C0QSMOKE
3465"RTN","C0QPRML",132,0)
3466 D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE
3467"RTN","C0QPRML",133,0)
3468 ; PATIENT IN THE CATEGORY OF TOBACCO
3469"RTN","C0QPRML",134,0)
3470 I $D(C0QSMOKE) S C0QLIST("HasSmokingStatus",DFN)=""
3471"RTN","C0QPRML",135,0)
3472 E S C0QLIST("NoSmokingStatus",DFN)=""
3473"RTN","C0QPRML",136,0)
3474 Q
3475"RTN","C0QPRML",137,0)
3476 ;
3477"RTN","C0QPRML",138,0)
3478VITALS ;
3479"RTN","C0QPRML",139,0)
3480 ;
3481"RTN","C0QPRML",140,0)
3482 N C0QSDT,C0QEDT
3483"RTN","C0QPRML",141,0)
3484 D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE
3485"RTN","C0QPRML",142,0)
3486 D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY
3487"RTN","C0QPRML",143,0)
3488 D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS
3489"RTN","C0QPRML",144,0)
3490 I $D(VITRSLT) D ;ZWR VITRSLT B ;
3491"RTN","C0QPRML",145,0)
3492 . I VITRSLT(1)["No vitals found." S C0QLIST("NoVitalSigns",DFN)=""
3493"RTN","C0QPRML",146,0)
3494 . E S C0QLIST("HasVitalSigns",DFN)=""
3495"RTN","C0QPRML",147,0)
3496 Q
3497"RTN","C0QPRML",148,0)
3498 ;
3499"RTN","C0QPRML",149,0)
3500PRINT ; PRINT TO SCREEN
3501"RTN","C0QPRML",150,0)
3502
3503"RTN","C0QPRML",151,0)
3504 I $D(WARD) W !!,WARD_"-"_WARDNAME_" "_RB_": "_PTNAME_"("_PTSEX_") "
3505"RTN","C0QPRML",152,0)
3506 I $D(EXDTE) D ;
3507"RTN","C0QPRML",153,0)
3508 . W !,"Discharge Date: ",EXDTE
3509"RTN","C0QPRML",154,0)
3510 . W !,DFN," ",PTNAME
3511"RTN","C0QPRML",155,0)
3512 W !,"DOB: ",PTDOB," HRN: ",PTHRN
3513"RTN","C0QPRML",156,0)
3514 W !,"Language Spoken: ",$G(PTLANG)
3515"RTN","C0QPRML",157,0)
3516 W !,"Race: ",RACEDSC
3517"RTN","C0QPRML",158,0)
3518 W !,"Ethnicity: ",$G(ETHNDSC)
3519"RTN","C0QPRML",159,0)
3520 W !,"Problems: "
3521"RTN","C0QPRML",160,0)
3522 W !,PBDESC
3523"RTN","C0QPRML",161,0)
3524 W !,"Allergies: "
3525"RTN","C0QPRML",162,0)
3526 W !,ALDESC
3527"RTN","C0QPRML",163,0)
3528 W !,"Medications: "
3529"RTN","C0QPRML",164,0)
3530 W !
3531"RTN","C0QPRML",165,0)
3532 Q
3533"RTN","C0QPRML",166,0)
3534 ;
3535"RTN","C0QPRML",167,0)
3536SS ; CREATE SPREADSHEET ARRAY
3537"RTN","C0QPRML",168,0)
3538 S G1("Patient")=DFN
3539"RTN","C0QPRML",169,0)
3540 I $D(WARD) D ;
3541"RTN","C0QPRML",170,0)
3542 . S G1("WardName")=WARDNAME
3543"RTN","C0QPRML",171,0)
3544 . S G1("RoomAndBed")=RB
3545"RTN","C0QPRML",172,0)
3546 I $D(EXDTE) D ;
3547"RTN","C0QPRML",173,0)
3548 . S G1("DischargeDate")=EXDTE
3549"RTN","C0QPRML",174,0)
3550 S G1("PatientName")=PTNAME
3551"RTN","C0QPRML",175,0)
3552 S G1("Gender")=PTSEX
3553"RTN","C0QPRML",176,0)
3554 S G1("DateOfBirth")=PTDOB
3555"RTN","C0QPRML",177,0)
3556 S G1("HealthRecordNumber")=PTHRN
3557"RTN","C0QPRML",178,0)
3558 S G1("LanguageSpoken")=$G(PTLANG)
3559"RTN","C0QPRML",179,0)
3560 S G1("Race")=RACEDSC
3561"RTN","C0QPRML",180,0)
3562 S G1("Ehtnicity")=$G(ETHNDSC)
3563"RTN","C0QPRML",181,0)
3564 S G1("Problem")=PBDESC
3565"RTN","C0QPRML",182,0)
3566 I PBDESC["No problems found" S G1("HasProblem")=0
3567"RTN","C0QPRML",183,0)
3568 E S G1("HasProblem")=1
3569"RTN","C0QPRML",184,0)
3570 S G1("Allergies")=ALDESC
3571"RTN","C0QPRML",185,0)
3572 I ALDESC["No Allergy" S G1("HasAllergy")=0
3573"RTN","C0QPRML",186,0)
3574 E S G1("HasAllergy")=1
3575"RTN","C0QPRML",187,0)
3576 I $D(MDITEM) D ;
3577"RTN","C0QPRML",188,0)
3578 . S G1("HasMed")=1
3579"RTN","C0QPRML",189,0)
3580 E S G1("HasMed")=0
3581"RTN","C0QPRML",190,0)
3582 S G1("MedDescription")=$G(MDDESC)
3583"RTN","C0QPRML",191,0)
3584 I $D(MDITEM) W !,"("_MDITEM_")"_MDDESC E W !,MDDESC
3585"RTN","C0QPRML",192,0)
3586 D RNF1TO2B^C0CRNF("GRSLT","G1")
3587"RTN","C0QPRML",193,0)
3588 K G1
3589"RTN","C0QPRML",194,0)
3590 Q ; DON'T WANT TO DO THE NHIN STUFF NOW
3591"RTN","C0QPRML",195,0)
3592 ;
3593"RTN","C0QPRML",196,0)
3594PATLIST ; CREATE PATIENT LISTS
3595"RTN","C0QPRML",197,0)
3596 S C0QLIST("Patient",DFN)="" ; THE PATIENT LIST
3597"RTN","C0QPRML",198,0)
3598 N DEMOYN S DEMOYN=1
3599"RTN","C0QPRML",199,0)
3600 I $G(PTSEX)="" S DEMOYN=0
3601"RTN","C0QPRML",200,0)
3602 I $G(PTDOB)="" S DEMOYN=0
3603"RTN","C0QPRML",201,0)
3604 I $G(PTHRN)="" S DEMOYN=0
3605"RTN","C0QPRML",202,0)
3606 I $G(PTLANG)="" S DEMOYN=0
3607"RTN","C0QPRML",203,0)
3608 I $G(RACEDSC)="" S DEMOYN=0
3609"RTN","C0QPRML",204,0)
3610 I $G(ETHNDSC)="" S DEMOYN=0
3611"RTN","C0QPRML",205,0)
3612 I DEMOYN S C0QLIST("HasDemographics",DFN)=""
3613"RTN","C0QPRML",206,0)
3614 E S C0QLIST("FailedDemographics",DFN)=""
3615"RTN","C0QPRML",207,0)
3616 ;S G1("Gender")=PTSEX
3617"RTN","C0QPRML",208,0)
3618 ;S G1("DateOfBirth")=PTDOB
3619"RTN","C0QPRML",209,0)
3620 ;S G1("HealthRecordNumber")=PTHRN
3621"RTN","C0QPRML",210,0)
3622 ;S G1("LanguageSpoken")=$G(PTLANG)
3623"RTN","C0QPRML",211,0)
3624 ;S G1("Race")=RACEDSC
3625"RTN","C0QPRML",212,0)
3626 ;S G1("Ehtnicity")=$G(ETHNDSC)
3627"RTN","C0QPRML",213,0)
3628 S G1("Problem")=PBDESC
3629"RTN","C0QPRML",214,0)
3630 I PBDESC["No problems found" S C0QLIST("NoProblem",DFN)=""
3631"RTN","C0QPRML",215,0)
3632 E S C0QLIST("HasProblem",DFN)=""
3633"RTN","C0QPRML",216,0)
3634 ;S G1("Allergies")=ALDESC
3635"RTN","C0QPRML",217,0)
3636 I ALDESC["No Allergy" S C0QLIST("NoAllergy",DFN)=""
3637"RTN","C0QPRML",218,0)
3638 E S C0QLIST("HasAllergy",DFN)=""
3639"RTN","C0QPRML",219,0)
3640 I $D(MDITEM) D ;
3641"RTN","C0QPRML",220,0)
3642 . S C0QLIST("HasMed",DFN)=""
3643"RTN","C0QPRML",221,0)
3644 E S G1("NoMed",DFN)=""
3645"RTN","C0QPRML",222,0)
3646 ;S G1("MedDescription")=$G(MDDESC)
3647"RTN","C0QPRML",223,0)
3648 Q
3649"RTN","C0QPRML",224,0)
3650 ;
3651"RTN","C0QPRML",225,0)
3652NHIN ; SHOW THE NHIN ARRAY FOR THIS PATIENT
3653"RTN","C0QPRML",226,0)
3654 Q:DFN=137!14
3655"RTN","C0QPRML",227,0)
3656 D EN^C0CNHIN(.G,DFN,"")
3657"RTN","C0QPRML",228,0)
3658 ZWR G
3659"RTN","C0QPRML",229,0)
3660 K G
3661"RTN","C0QPRML",230,0)
3662 ;
3663"RTN","C0QPRML",231,0)
3664 QUIT ;end of WARD
3665"RTN","C0QPRML",232,0)
3666 ;
3667"RTN","C0QPRML",233,0)
3668 ;
3669"RTN","C0QPRML",234,0)
3670DIS;
3671"RTN","C0QPRML",235,0)
3672 N DFN,DTE,EXDTE S DTE=""
3673"RTN","C0QPRML",236,0)
3674 F D Q:DTE=""
3675"RTN","C0QPRML",237,0)
3676 . S DTE=$O(^DGPM("B",DTE))
3677"RTN","C0QPRML",238,0)
3678 . Q:'DTE
3679"RTN","C0QPRML",239,0)
3680 . Q:DTE<3110703
3681"RTN","C0QPRML",240,0)
3682 . S EXDTE=$$FMTE^XLFDT(DTE)
3683"RTN","C0QPRML",241,0)
3684 . N PTFM S PTFM=""
3685"RTN","C0QPRML",242,0)
3686 . D
3687"RTN","C0QPRML",243,0)
3688 . . S PTFM=$O(^DGPM("B",DTE,PTFM))
3689"RTN","C0QPRML",244,0)
3690 . . Q:'PTFM
3691"RTN","C0QPRML",245,0)
3692 . . S DFN=$P(^DGPM(PTFM,0),U,3)
3693"RTN","C0QPRML",246,0)
3694 . . D DEMO
3695"RTN","C0QPRML",247,0)
3696 . . D PROBLEM
3697"RTN","C0QPRML",248,0)
3698 . . D ALLERGY
3699"RTN","C0QPRML",249,0)
3700 . . D MEDS
3701"RTN","C0QPRML",250,0)
3702 . . D SMOKING
3703"RTN","C0QPRML",251,0)
3704 . . D VITALS
3705"RTN","C0QPRML",252,0)
3706 . . I C0QPR D PRINT
3707"RTN","C0QPRML",253,0)
3708 . . I C0QSS D SS
3709"RTN","C0QPRML",254,0)
3710 . . I C0QPL D PATLIST
3711"RTN","C0QPRML",255,0)
3712 Q
3713"RTN","C0QPRML",256,0)
3714 ;
3715"RTN","C0QPRML",257,0)
3716C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE
3717"RTN","C0QPRML",258,0)
3718C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE
3719"RTN","C0QPRML",259,0)
3720FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST
3721"RTN","C0QPRML",260,0)
3722 ;
3723"RTN","C0QPRML",261,0)
3724 I '$D(C0QLIST) Q ;
3725"RTN","C0QPRML",262,0)
3726 N LFN S LFN=$$C0QALFN()
3727"RTN","C0QPRML",263,0)
3728 N ZI,ZN
3729"RTN","C0QPRML",264,0)
3730 S ZI=""
3731"RTN","C0QPRML",265,0)
3732 F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ;
3733"RTN","C0QPRML",266,0)
3734 . S ZN=$O(^C0Q(301,"CATTR",ZI,""))
3735"RTN","C0QPRML",267,0)
3736 . I ZN="" D Q ; OOPS
3737"RTN","C0QPRML",268,0)
3738 . . W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI
3739"RTN","C0QPRML",269,0)
3740 . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN
3741"RTN","C0QPRML",270,0)
3742 . N C0QNEW,C0QOLD,C0QRSLT
3743"RTN","C0QPRML",271,0)
3744 . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST
3745"RTN","C0QPRML",272,0)
3746 . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST
3747"RTN","C0QPRML",273,0)
3748 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW
3749"RTN","C0QPRML",274,0)
3750 . N ZJ,ZK
3751"RTN","C0QPRML",275,0)
3752 . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST
3753"RTN","C0QPRML",276,0)
3754 . K C0QFDA
3755"RTN","C0QPRML",277,0)
3756 . S ZJ=""
3757"RTN","C0QPRML",278,0)
3758 . F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY
3759"RTN","C0QPRML",279,0)
3760 . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE
3761"RTN","C0QPRML",280,0)
3762 . . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN
3763"RTN","C0QPRML",281,0)
3764 . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE"
3765"RTN","C0QPRML",282,0)
3766 . . . B
3767"RTN","C0QPRML",283,0)
3768 . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@"
3769"RTN","C0QPRML",284,0)
3770 . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS
3771"RTN","C0QPRML",285,0)
3772 . ; SECOND, PROCESS THE ADDITIONS
3773"RTN","C0QPRML",286,0)
3774 . K C0QFDA
3775"RTN","C0QPRML",287,0)
3776 . S ZJ="" S ZK=1
3777"RTN","C0QPRML",288,0)
3778 . F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0
3779"RTN","C0QPRML",289,0)
3780 . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ
3781"RTN","C0QPRML",290,0)
3782 . . S ZK=ZK+1
3783"RTN","C0QPRML",291,0)
3784 . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS
3785"RTN","C0QPRML",292,0)
3786 ;. Q
3787"RTN","C0QPRML",293,0)
3788 ;. K C0QFDA
3789"RTN","C0QPRML",294,0)
3790 ;. N ZJ,ZC
3791"RTN","C0QPRML",295,0)
3792 ;. S ZJ="" S ZC=1
3793"RTN","C0QPRML",296,0)
3794 ;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST
3795"RTN","C0QPRML",297,0)
3796 ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ
3797"RTN","C0QPRML",298,0)
3798 ;. . S ZC=ZC+1
3799"RTN","C0QPRML",299,0)
3800 ;. D UPDIE
3801"RTN","C0QPRML",300,0)
3802 ;. W !,"FOUND:"_ZI
3803"RTN","C0QPRML",301,0)
3804 Q
3805"RTN","C0QPRML",302,0)
3806 ;
3807"RTN","C0QPRML",303,0)
3808KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE
3809"RTN","C0QPRML",304,0)
3810 ;
3811"RTN","C0QPRML",305,0)
3812 N C0QFDA,ZFN,LIST,ATTR
3813"RTN","C0QPRML",306,0)
3814 S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE
3815"RTN","C0QPRML",307,0)
3816 D CLEAN^DILF
3817"RTN","C0QPRML",308,0)
3818 S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME
3819"RTN","C0QPRML",309,0)
3820 S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE
3821"RTN","C0QPRML",310,0)
3822 D CLEAN^DILF
3823"RTN","C0QPRML",311,0)
3824 K ZERR
3825"RTN","C0QPRML",312,0)
3826 S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE
3827"RTN","C0QPRML",313,0)
3828 D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE
3829"RTN","C0QPRML",314,0)
3830 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
3831"RTN","C0QPRML",315,0)
3832 ;. W "ERROR",!
3833"RTN","C0QPRML",316,0)
3834 ;. ZWR ZERR
3835"RTN","C0QPRML",317,0)
3836 ;. B
3837"RTN","C0QPRML",318,0)
3838 K C0QFDA
3839"RTN","C0QPRML",319,0)
3840 S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD
3841"RTN","C0QPRML",320,0)
3842 S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE
3843"RTN","C0QPRML",321,0)
3844 D UPDIE ; CREATE THE SUBFILE
3845"RTN","C0QPRML",322,0)
3846 N ZR ; NEW IEN FOR THE RECORD
3847"RTN","C0QPRML",323,0)
3848 S ZR=$O(^C0Q(301,"CATTR",ATTR,""))
3849"RTN","C0QPRML",324,0)
3850 ;
3851"RTN","C0QPRML",325,0)
3852 Q ZR
3853"RTN","C0QPRML",326,0)
3854 ;
3855"RTN","C0QPRML",327,0)
3856UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
3857"RTN","C0QPRML",328,0)
3858 K ZERR
3859"RTN","C0QPRML",329,0)
3860 D CLEAN^DILF
3861"RTN","C0QPRML",330,0)
3862 D UPDATE^DIE("","C0QFDA","","ZERR")
3863"RTN","C0QPRML",331,0)
3864 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
3865"RTN","C0QPRML",332,0)
3866 ;. W "ERROR",!
3867"RTN","C0QPRML",333,0)
3868 ;. ZWR ZERR
3869"RTN","C0QPRML",334,0)
3870 ;. B
3871"RTN","C0QPRML",335,0)
3872 K C0QFDA
3873"RTN","C0QPRML",336,0)
3874 Q
3875"RTN","C0QPRML",337,0)
3876 ;
3877"RTN","C0QPRML",338,0)
3878 ; WHAT FOLLOWS IS OLD CODE - DELETE WHEN THIS WORKS
3879"RTN","C0QPRML",339,0)
3880 ;. . N PTNAME S PTNAME=$P(^DPT(DFN,0),U,1)
3881"RTN","C0QPRML",340,0)
3882 ;. . S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth
3883"RTN","C0QPRML",341,0)
3884 ;. . S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex
3885"RTN","C0QPRML",342,0)
3886 ;. . D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility
3887"RTN","C0QPRML",343,0)
3888 ;. . S PTHRN=$P($G(VA("PID")),U) ;health record number
3889"RTN","C0QPRML",344,0)
3890 ;. . S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file
3891"RTN","C0QPRML",345,0)
3892 ;. . I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl
3893"RTN","C0QPRML",346,0)
3894 ;. . S RACE=""
3895"RTN","C0QPRML",347,0)
3896 ;. . F D Q:RACE=""
3897"RTN","C0QPRML",348,0)
3898 ;. . . S RACE=$O(^DPT(DFN,.02,"B",RACE))
3899"RTN","C0QPRML",349,0)
3900 ;. . . Q:'RACE
3901"RTN","C0QPRML",350,0)
3902 ;. . . S RACEDSC=$P($G(^DIC(10,RACE,0)),U)
3903"RTN","C0QPRML",351,0)
3904 ;. . N ETHNDSC
3905"RTN","C0QPRML",352,0)
3906 ;. . N ETHNDSC S ETHNDSC=""
3907"RTN","C0QPRML",353,0)
3908 ;. . S ETHN=""
3909"RTN","C0QPRML",354,0)
3910 ;. . F D Q:ETHN=""
3911"RTN","C0QPRML",355,0)
3912 ;. . . S ETHN=$O(^DPT(DFN,.06,"B",ETHN))
3913"RTN","C0QPRML",356,0)
3914 ;. . . Q:'ETHN
3915"RTN","C0QPRML",357,0)
3916 ;. . . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U)
3917"RTN","C0QPRML",358,0)
3918 ;. . D LIST^ORQQPL(.PROBL,DFN,"A")
3919"RTN","C0QPRML",359,0)
3920 ;. . S PBCNT=""
3921"RTN","C0QPRML",360,0)
3922 ;. . F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D
3923"RTN","C0QPRML",361,0)
3924 ;. . . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description
3925"RTN","C0QPRML",362,0)
3926 ;. . K PROBL
3927"RTN","C0QPRML",363,0)
3928 ;. . D LIST^ORQQAL(.ALRGYL,DFN)
3929"RTN","C0QPRML",364,0)
3930 ;. . S ALCNT=""
3931"RTN","C0QPRML",365,0)
3932 ;. . F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D
3933"RTN","C0QPRML",366,0)
3934 ;. . . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description
3935"RTN","C0QPRML",367,0)
3936 ;. . K ALRGYL
3937"RTN","C0QPRML",368,0)
3938 ;. . D COVER^ORWPS(.MEDSL,DFN)
3939"RTN","C0QPRML",369,0)
3940 ;. . S MDCNT=""
3941"RTN","C0QPRML",370,0)
3942 ;. . F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D
3943"RTN","C0QPRML",371,0)
3944 ;. . . Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only
3945"RTN","C0QPRML",372,0)
3946 ;. . . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
3947"RTN","C0QPRML",373,0)
3948 ;. . . S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
3949"RTN","C0QPRML",374,0)
3950 ;. . K MEDSL
3951"RTN","C0QPRML",375,0)
3952 ;. . W !,"Discharge Date: ",EXDTE
3953"RTN","C0QPRML",376,0)
3954 ;. . W !,DFN," ",PTNAME
3955"RTN","C0QPRML",377,0)
3956 ;. . W !,"DOB: ",PTDOB," HRN: ",PTHRN
3957"RTN","C0QPRML",378,0)
3958 ;. . W !,"Language Spoken: ",$G(PTLANG)
3959"RTN","C0QPRML",379,0)
3960 ;. . W !,"Race: ",RACEDSC
3961"RTN","C0QPRML",380,0)
3962 ;. . W !,"Ethnicity: ",ETHNDSC
3963"RTN","C0QPRML",381,0)
3964 ;. . W !,"Problems: "
3965"RTN","C0QPRML",382,0)
3966 ;. . W !,PBDESC
3967"RTN","C0QPRML",383,0)
3968 ;. . W !,"Allergies: "
3969"RTN","C0QPRML",384,0)
3970 ;. . W !,ALDESC
3971"RTN","C0QPRML",385,0)
3972 ;. . W !,"Medications: "
3973"RTN","C0QPRML",386,0)
3974 ;. . I $D(MDITEM) W !,"(",MDITEM,")",MDDESC E W !,MDDESC
3975"RTN","C0QPRML",387,0)
3976 ;. . W !
3977"RTN","C0QPRML",388,0)
3978 ;Q
3979"RTN","C0QPRML",389,0)
3980 ;
3981"RTN","C0QPRML",390,0)
3982 ;
3983"RTN","C0QPRML",391,0)
3984 ;
3985"RTN","C0QPRML",392,0)
3986 ;
3987"RTN","C0QPRML",393,0)
3988END ;end of C0QPRML;
3989"RTN","C0QSET")
39900^9^B8586809
3991"RTN","C0QSET",1,0)
3992C0QSET ;GPL - SET OPERATIONS ON LISTS ;818/11 8:50pm
3993"RTN","C0QSET",2,0)
3994 ;;1.0;MU PACKAGE;;;Build 19
3995"RTN","C0QSET",3,0)
3996 ;
3997"RTN","C0QSET",4,0)
3998 ;2011 George Lilly glilly@glilly.net - Licensed under the terms of the GNU
3999"RTN","C0QSET",5,0)
4000 ;General Public License See attached copy of the License.
4001"RTN","C0QSET",6,0)
4002 ;
4003"RTN","C0QSET",7,0)
4004 ;This program is free software; you can redistribute it and/or modify
4005"RTN","C0QSET",8,0)
4006 ;it under the terms of the GNU General Public License as published by
4007"RTN","C0QSET",9,0)
4008 ;the Free Software Foundation; either version 2 of the License, or
4009"RTN","C0QSET",10,0)
4010 ;(at your option) any later version.
4011"RTN","C0QSET",11,0)
4012 ;
4013"RTN","C0QSET",12,0)
4014 ;This program is distributed in the hope that it will be useful,
4015"RTN","C0QSET",13,0)
4016 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
4017"RTN","C0QSET",14,0)
4018 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4019"RTN","C0QSET",15,0)
4020 ;GNU General Public License for more details.
4021"RTN","C0QSET",16,0)
4022 ;
4023"RTN","C0QSET",17,0)
4024 ;You should have received a copy of the GNU General Public License along
4025"RTN","C0QSET",18,0)
4026 ;with this program; if not, write to the Free Software Foundation, Inc.,
4027"RTN","C0QSET",19,0)
4028 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
4029"RTN","C0QSET",20,0)
4030 ;
4031"RTN","C0QSET",21,0)
4032 Q
4033"RTN","C0QSET",22,0)
4034 ;
4035"RTN","C0QSET",23,0)
4036TEST ; TEST OF UNITY ROUTINE
4037"RTN","C0QSET",24,0)
4038 ;
4039"RTN","C0QSET",25,0)
4040 S A(1)=""
4041"RTN","C0QSET",26,0)
4042 S A(2)=""
4043"RTN","C0QSET",27,0)
4044 S A(3)=""
4045"RTN","C0QSET",28,0)
4046 S B(3)=""
4047"RTN","C0QSET",29,0)
4048 S B(4)=""
4049"RTN","C0QSET",30,0)
4050 D UNITY("C","A","B")
4051"RTN","C0QSET",31,0)
4052 ZWR C
4053"RTN","C0QSET",32,0)
4054 Q
4055"RTN","C0QSET",33,0)
4056 ;
4057"RTN","C0QSET",34,0)
4058TEST2 ; WHICH PATIENTS HAVE MEDICATIONS? WHICH DON'T?
4059"RTN","C0QSET",35,0)
4060 ; WHAT BAD PATIENT POINTERS ARE IN THE MEDICATIONS FILE?
4061"RTN","C0QSET",36,0)
4062 S PATS=$NA(^DPT)
4063"RTN","C0QSET",37,0)
4064 S MEDS=$NA(^PS(55))
4065"RTN","C0QSET",38,0)
4066 D UNITY("DELTA",PATS,MEDS)
4067"RTN","C0QSET",39,0)
4068 W !,"PATIENTS WITH NO MEDS",!
4069"RTN","C0QSET",40,0)
4070 ZWR DELTA(0,*)
4071"RTN","C0QSET",41,0)
4072 W !,"BAD POINTERS IN THE MEDS FILE",!
4073"RTN","C0QSET",42,0)
4074 ZWR DELTA(2,*)
4075"RTN","C0QSET",43,0)
4076 Q
4077"RTN","C0QSET",44,0)
4078 ;
4079"RTN","C0QSET",45,0)
4080UNITY(ZRTN,ZNEW,ZOLD) ; RETURNS THE DELTA BETWEEN THE NEW AND OLD LISTS
4081"RTN","C0QSET",46,0)
4082 ; ONLY NUMERIC LISTS SUPPORTED. FOR LIST WITH STRINGS SEE UNITYS
4083"RTN","C0QSET",47,0)
4084 ; ZRTN,ZNEW AND ZOLD ARE ALL PASSED BY NAME
4085"RTN","C0QSET",48,0)
4086 ; FORMAT OF RETURN ARRAY:
4087"RTN","C0QSET",49,0)
4088 ; @ZRTN@(0,X)="" ; X IS MISSING FROM OLD
4089"RTN","C0QSET",50,0)
4090 ; @ZRTN@(1,Y)="" ; Y IS IN BOTH NEW AND OLD - NOT MISSING
4091"RTN","C0QSET",51,0)
4092 ; @ZRTN@(2,Z)="" ; Z IS EXTRA IN OLD - WOULD BEED TO BE DELETED FOR UNITY
4093"RTN","C0QSET",52,0)
4094 N C0QD ; TEMP WORK ARRAY
4095"RTN","C0QSET",53,0)
4096 N ZN S ZN=0 ; COUNT
4097"RTN","C0QSET",54,0)
4098 N ZI S ZI=0
4099"RTN","C0QSET",55,0)
4100 F S ZI=$O(@ZNEW@(ZI)) Q:+ZI=0 D ; FOR EACH ITEM IN NEW
4101"RTN","C0QSET",56,0)
4102 . S C0QD(ZI)=0 ; SET THEM ALL AS 0 MEANING NEW
4103"RTN","C0QSET",57,0)
4104 . S ZN=ZN+1
4105"RTN","C0QSET",58,0)
4106 S @ZRTN@("COUNT")=ZN ; NEW FILE COUNT
4107"RTN","C0QSET",59,0)
4108 S ZI=0
4109"RTN","C0QSET",60,0)
4110 F S ZI=$O(@ZOLD@(ZI)) Q:+ZI=0 D ; FOR EACH ITEM IN OLD
4111"RTN","C0QSET",61,0)
4112 . I $D(C0QD(ZI)) S C0QD(ZI)=1 ; NOT NEW - PRESENT IN NEW AND OLD
4113"RTN","C0QSET",62,0)
4114 . E S C0QD(ZI)=2 ; EXTRA IN OLD - WOULD NEED TO BE DELETED
4115"RTN","C0QSET",63,0)
4116 S ZI=0
4117"RTN","C0QSET",64,0)
4118 F S ZI=$O(C0QD(ZI)) Q:+ZI=0 D ; FOR EACH ITEM
4119"RTN","C0QSET",65,0)
4120 . S @ZRTN@(C0QD(ZI),ZI)="" ; SET RESULTS IN RETURN ARRAY
4121"RTN","C0QSET",66,0)
4122 Q
4123"RTN","C0QSET",67,0)
4124 ;
4125"RTN","C0QSET",68,0)
4126UNITYS(ZRTN,ZNEW,ZOLD) ; RETURNS THE DELTA BETWEEN THE NEW AND OLD LISTS
4127"RTN","C0QSET",69,0)
4128 ; THIS VERSION HAS SUPPORT FOR NUMBERS AND STRINGS IN A LIST
4129"RTN","C0QSET",70,0)
4130 ; ZRTN,ZNEW AND ZOLD ARE ALL PASSED BY NAME
4131"RTN","C0QSET",71,0)
4132 ; FORMAT OF RETURN ARRAY:
4133"RTN","C0QSET",72,0)
4134 ; @ZRTN@(0,X)="" ; X IS MISSING FROM OLD
4135"RTN","C0QSET",73,0)
4136 ; @ZRTN@(1,Y)="" ; Y IS IN BOTH NEW AND OLD - NOT MISSING
4137"RTN","C0QSET",74,0)
4138 ; @ZRTN@(2,Z)="" ; Z IS EXTRA IN OLD - WOULD BEED TO BE DELETED FOR UNITY
4139"RTN","C0QSET",75,0)
4140 N C0QD ; TEMP WORK ARRAY
4141"RTN","C0QSET",76,0)
4142 N ZI S ZI=""
4143"RTN","C0QSET",77,0)
4144 F S ZI=$O(@ZNEW@(ZI)) Q:ZI="" D ; FOR EACH ITEM IN NEW
4145"RTN","C0QSET",78,0)
4146 . S C0QD(ZI)=0 ; SET THEM ALL AS 0 MEANING NEW
4147"RTN","C0QSET",79,0)
4148 S ZI=""
4149"RTN","C0QSET",80,0)
4150 F S ZI=$O(@ZOLD@(ZI)) Q:ZI="" D ; FOR EACH ITEM IN OLD
4151"RTN","C0QSET",81,0)
4152 . I $D(C0QD(ZI)) S C0QD(ZI)=1 ; NOT NEW - PRESENT IN NEW AND OLD
4153"RTN","C0QSET",82,0)
4154 . E S C0QD(ZI)=2 ; EXTRA IN OLD - WOULD NEED TO BE DELETED
4155"RTN","C0QSET",83,0)
4156 S ZI=""
4157"RTN","C0QSET",84,0)
4158 F S ZI=$O(C0QD(ZI)) Q:ZI="" D ; FOR EACH ITEM
4159"RTN","C0QSET",85,0)
4160 . S @ZRTN@(C0QD(ZI),ZI)="" ; SET RESULTS IN RETURN ARRAY
4161"RTN","C0QSET",86,0)
4162 Q
4163"RTN","C0QSET",87,0)
4164 ;
4165"RTN","C0QSET",88,0)
4166AND(ZRTN,ZNEW,ZOLD) ; RETURNS A LIST OF WHAT IS COMMON TO BOTH NEW AND OLD
4167"RTN","C0QSET",89,0)
4168 N ZD
4169"RTN","C0QSET",90,0)
4170 D UNITY("ZD",ZNEW,ZOLD)
4171"RTN","C0QSET",91,0)
4172 M @ZRTN=ZD(1)
4173"RTN","C0QSET",92,0)
4174 Q
4175"RTN","C0QSET",93,0)
4176 ;
4177"RTN","C0QSET",94,0)
4178NAND(ZRTN,ZNEW,ZOLD) ; RETURNS WHAT IS IN A OR B BUT NOT BOTH
4179"RTN","C0QSET",95,0)
4180 N ZD
4181"RTN","C0QSET",96,0)
4182 D UNITY("ZD",ZNEW,ZOLD)
4183"RTN","C0QSET",97,0)
4184 M @ZRTN=ZD(0)
4185"RTN","C0QSET",98,0)
4186 M @ZRTN=ZD(2)
4187"RTN","C0QSET",99,0)
4188 Q
4189"RTN","C0QSET",100,0)
4190 ;
4191"RTN","C0QSET",101,0)
4192AMINUSB(ZRTN,ZA,ZB) ; WHAT'S LEFT IN A AFTER REMOVING B FROM IT
4193"RTN","C0QSET",102,0)
4194 N ZD
4195"RTN","C0QSET",103,0)
4196 D UNITY("ZD",ZA,ZB)
4197"RTN","C0QSET",104,0)
4198 M @ZRTN=ZD(0)
4199"RTN","C0QSET",105,0)
4200 Q
4201"RTN","C0QSET",106,0)
4202 ;
4203"RTN","C0QSET",107,0)
4204OR(ZRTN,ZA,ZB) ; WHAT'S IN A OR B OR BOTH
4205"RTN","C0QSET",108,0)
4206 N ZD
4207"RTN","C0QSET",109,0)
4208 D UNITY("ZD",ZA,ZB)
4209"RTN","C0QSET",110,0)
4210 M @ZRTN=ZD(0)
4211"RTN","C0QSET",111,0)
4212 M @ZRTN=ZD(1)
4213"RTN","C0QSET",112,0)
4214 M @ZRTN=ZD(2)
4215"RTN","C0QSET",113,0)
4216 Q
4217"RTN","C0QSET",114,0)
4218 ;
4219"RTN","C0QSET",115,0)
4220END ;end of C0QSET;
4221"RTN","C0QUPDT")
42220^10^B39929946
4223"RTN","C0QUPDT",1,0)
4224C0QUPDT ; GPL - Quality Reporting List Update Routines ;8/29/11 17:05
4225"RTN","C0QUPDT",2,0)
4226 ;;0.1;C0Q;nopatch;noreleasedate;Build 19
4227"RTN","C0QUPDT",3,0)
4228 ;Copyright 2009 George Lilly. Licensed under the terms of the GNU
4229"RTN","C0QUPDT",4,0)
4230 ;General Public License See attached copy of the License.
4231"RTN","C0QUPDT",5,0)
4232 ;
4233"RTN","C0QUPDT",6,0)
4234 ;This program is free software; you can redistribute it and/or modify
4235"RTN","C0QUPDT",7,0)
4236 ;it under the terms of the GNU General Public License as published by
4237"RTN","C0QUPDT",8,0)
4238 ;the Free Software Foundation; either version 2 of the License, or
4239"RTN","C0QUPDT",9,0)
4240 ;(at your option) any later version.
4241"RTN","C0QUPDT",10,0)
4242 ;
4243"RTN","C0QUPDT",11,0)
4244 ;This program is distributed in the hope that it will be useful,
4245"RTN","C0QUPDT",12,0)
4246 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
4247"RTN","C0QUPDT",13,0)
4248 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4249"RTN","C0QUPDT",14,0)
4250 ;GNU General Public License for more details.
4251"RTN","C0QUPDT",15,0)
4252 ;
4253"RTN","C0QUPDT",16,0)
4254 ;You should have received a copy of the GNU General Public License along
4255"RTN","C0QUPDT",17,0)
4256 ;with this program; if not, write to the Free Software Foundation, Inc.,
4257"RTN","C0QUPDT",18,0)
4258 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
4259"RTN","C0QUPDT",19,0)
4260 ;
4261"RTN","C0QUPDT",20,0)
4262 Q
4263"RTN","C0QUPDT",21,0)
4264 ;
4265"RTN","C0QUPDT",22,0)
4266C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE
4267"RTN","C0QUPDT",23,0)
4268C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
4269"RTN","C0QUPDT",24,0)
4270C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
4271"RTN","C0QUPDT",25,0)
4272C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE
4273"RTN","C0QUPDT",26,0)
4274C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE
4275"RTN","C0QUPDT",27,0)
4276RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE
4277"RTN","C0QUPDT",28,0)
4278RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE
4279"RTN","C0QUPDT",29,0)
4280C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ;
4281"RTN","C0QUPDT",30,0)
4282 ;
4283"RTN","C0QUPDT",31,0)
4284UPDATE(RNT,MSET) ; UPDATE A MEASURE SET BY ADDING NEW ENTRIES TO PATIENT
4285"RTN","C0QUPDT",32,0)
4286 ; LISTS AND DELETING ENTRIES THAT ARE NO LONGER VALID. ALSO UPDATE
4287"RTN","C0QUPDT",33,0)
4288 ; NUMERATOR AND DENOMINATOR COUNTS
4289"RTN","C0QUPDT",34,0)
4290 ; MAKES HEAVY USE OF UNITY^C0QSET TO DETERMINE WHAT TO ADD AND DELETE
4291"RTN","C0QUPDT",35,0)
4292 ;
4293"RTN","C0QUPDT",36,0)
4294 ; THIS IS A REPLACEMENT FOR C0QRPC^C0QMAIN WHICH DELETES THE PATIENT
4295"RTN","C0QUPDT",37,0)
4296 ; LISTS AND RECREATES THEM, WHICH IS A LOT OF UNNECESSARY PROCESSING
4297"RTN","C0QUPDT",38,0)
4298 ;
4299"RTN","C0QUPDT",39,0)
4300 N ZI S ZI=""
4301"RTN","C0QUPDT",40,0)
4302 N C0QM ; FOR HOLDING THE MEASURES IN THE SET
4303"RTN","C0QUPDT",41,0)
4304 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES
4305"RTN","C0QUPDT",42,0)
4306 D DELIST("C0QM")
4307"RTN","C0QUPDT",43,0)
4308 N ZII S ZII=""
4309"RTN","C0QUPDT",44,0)
4310 F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE
4311"RTN","C0QUPDT",45,0)
4312 . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
4313"RTN","C0QUPDT",46,0)
4314 . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
4315"RTN","C0QUPDT",47,0)
4316 . I C0QNL="" D ; CHECK ALTERNATE LIST
4317"RTN","C0QUPDT",48,0)
4318 . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER
4319"RTN","C0QUPDT",49,0)
4320 . . I C0QNL'="" S C0QNALT=1
4321"RTN","C0QUPDT",50,0)
4322 . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER
4323"RTN","C0QUPDT",51,0)
4324 . I C0QDL="" D ; CHECK ALTERNATE LIST
4325"RTN","C0QUPDT",52,0)
4326 . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER
4327"RTN","C0QUPDT",53,0)
4328 . . I C0QDL'="" S C0QDALT=1
4329"RTN","C0QUPDT",54,0)
4330 . ;
4331"RTN","C0QUPDT",55,0)
4332 . ; FIRST PROCESS THE NUMERATOR
4333"RTN","C0QUPDT",56,0)
4334 . ;
4335"RTN","C0QUPDT",57,0)
4336 . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
4337"RTN","C0QUPDT",58,0)
4338 . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
4339"RTN","C0QUPDT",59,0)
4340 . . S C0QNEW=$NA(^C0Q(301,C0QNL,1,"B")) ; B INDEX FOR THIS LIST
4341"RTN","C0QUPDT",60,0)
4342 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS
4343"RTN","C0QUPDT",61,0)
4344 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS
4345"RTN","C0QUPDT",62,0)
4346 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
4347"RTN","C0QUPDT",63,0)
4348 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET
4349"RTN","C0QUPDT",64,0)
4350 . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
4351"RTN","C0QUPDT",65,0)
4352 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
4353"RTN","C0QUPDT",66,0)
4354 . N C0QCNT
4355"RTN","C0QUPDT",67,0)
4356 . S C0QNCNT=$G(C0QRSLT("COUNT"))
4357"RTN","C0QUPDT",68,0)
4358 . I C0QNCNT="" D ;
4359"RTN","C0QUPDT",69,0)
4360 . . S C0QNCNT=0 ; DEFAULT COUNT IS ZERO
4361"RTN","C0QUPDT",70,0)
4362 . . N GZZ S GZZ=""
4363"RTN","C0QUPDT",71,0)
4364 . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
4365"RTN","C0QUPDT",72,0)
4366 . . . S C0QNCNT=C0QNCNT+1
4367"RTN","C0QUPDT",73,0)
4368 . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
4369"RTN","C0QUPDT",74,0)
4370 . . . S C0QNCNT=C0QNCNT+1
4371"RTN","C0QUPDT",75,0)
4372 . K C0QFDA ; CLEAR THE FDA
4373"RTN","C0QUPDT",76,0)
4374 . N C0QONCNT ; OLD COUNT
4375"RTN","C0QUPDT",77,0)
4376 . S C0QONCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",1.1)
4377"RTN","C0QUPDT",78,0)
4378 . I C0QNCNT'=C0QONCNT D ; COUNT HAS CHANGED
4379"RTN","C0QUPDT",79,0)
4380 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",1.1)=C0QNCNT ; NUMERATOR COUNT
4381"RTN","C0QUPDT",80,0)
4382 . . D UPDIE ; UPDATE THE NUMERATOR COUNT
4383"RTN","C0QUPDT",81,0)
4384 . I $D(C0QRSLT) D ;B ;
4385"RTN","C0QUPDT",82,0)
4386 . . ;ZWR C0QRSLT
4387"RTN","C0QUPDT",83,0)
4388 . ; FIRST PROCESS DELETIONS
4389"RTN","C0QUPDT",84,0)
4390 . K C0QFDA ; CLEAR OUT THE FDA
4391"RTN","C0QUPDT",85,0)
4392 . N ZG,ZIEN S ZG=""
4393"RTN","C0QUPDT",86,0)
4394 . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
4395"RTN","C0QUPDT",87,0)
4396 . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
4397"RTN","C0QUPDT",88,0)
4398 . . I ZIEN="" D Q ; OOPS
4399"RTN","C0QUPDT",89,0)
4400 . . . W !,"ERROR DELETING ENTRY!! ",ZG
4401"RTN","C0QUPDT",90,0)
4402 . . S C0QFDA($$C0QMMNFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
4403"RTN","C0QUPDT",91,0)
4404 . I $D(C0QFDA) D UPDIE ; PROCESS
4405"RTN","C0QUPDT",92,0)
4406 . ; SECOND, PROCESS ADDITIONS
4407"RTN","C0QUPDT",93,0)
4408 . K C0QFDA ; CLEAR OUT THE FDA
4409"RTN","C0QUPDT",94,0)
4410 . N ZG,ZC S ZG="" S ZC=1
4411"RTN","C0QUPDT",95,0)
4412 . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
4413"RTN","C0QUPDT",96,0)
4414 . . S C0QFDA($$C0QMMNFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
4415"RTN","C0QUPDT",97,0)
4416 . . S ZC=ZC+1
4417"RTN","C0QUPDT",98,0)
4418 . I $D(C0QFDA) D UPDIE ; PROCESS
4419"RTN","C0QUPDT",99,0)
4420 . ;
4421"RTN","C0QUPDT",100,0)
4422 . ; PROCESS THE DENOMINATOR
4423"RTN","C0QUPDT",101,0)
4424 . ;
4425"RTN","C0QUPDT",102,0)
4426 . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
4427"RTN","C0QUPDT",103,0)
4428 . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
4429"RTN","C0QUPDT",104,0)
4430 . . S C0QNEW=$NA(^C0Q(301,C0QDL,1,"B")) ; B INDEX FOR THIS LIST
4431"RTN","C0QUPDT",105,0)
4432 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS
4433"RTN","C0QUPDT",106,0)
4434 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS
4435"RTN","C0QUPDT",107,0)
4436 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
4437"RTN","C0QUPDT",108,0)
4438 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET
4439"RTN","C0QUPDT",109,0)
4440 . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
4441"RTN","C0QUPDT",110,0)
4442 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
4443"RTN","C0QUPDT",111,0)
4444 . N C0QDCNT
4445"RTN","C0QUPDT",112,0)
4446 . S C0QDCNT=$G(C0QRSLT("COUNT"))
4447"RTN","C0QUPDT",113,0)
4448 . I C0QDCNT="" D ;
4449"RTN","C0QUPDT",114,0)
4450 . . S C0QDCNT=0 ; DEFAULT COUNT IS ZERO
4451"RTN","C0QUPDT",115,0)
4452 . . N GZZ S GZZ=""
4453"RTN","C0QUPDT",116,0)
4454 . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
4455"RTN","C0QUPDT",117,0)
4456 . . . S C0QDCNT=C0QDCNT+1
4457"RTN","C0QUPDT",118,0)
4458 . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
4459"RTN","C0QUPDT",119,0)
4460 . . . S C0QDCNT=C0QDCNT+1
4461"RTN","C0QUPDT",120,0)
4462 . K C0QFDA ; CLEAR THE FDA
4463"RTN","C0QUPDT",121,0)
4464 . N C0QODCNT ; OLD COUNT
4465"RTN","C0QUPDT",122,0)
4466 . S C0QODCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",2.1)
4467"RTN","C0QUPDT",123,0)
4468 . I C0QDCNT'=C0QODCNT D ; COUNT HAS CHANGED
4469"RTN","C0QUPDT",124,0)
4470 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",2.1)=C0QDCNT ; DENOMINATOR COUNT
4471"RTN","C0QUPDT",125,0)
4472 . . D UPDIE ; UPDATE THE DENOMINATOR COUNT
4473"RTN","C0QUPDT",126,0)
4474 . I $D(C0QRSLT) D ;B ;
4475"RTN","C0QUPDT",127,0)
4476 . . ;ZWR C0QRSLT
4477"RTN","C0QUPDT",128,0)
4478 . I '$D(C0QRSLT) Q ; NO RESULTS TO USE
4479"RTN","C0QUPDT",129,0)
4480 . ; FIRST PROCESS DELETIONS
4481"RTN","C0QUPDT",130,0)
4482 . K C0QFDA ; CLEAR OUT THE FDA
4483"RTN","C0QUPDT",131,0)
4484 . N ZG,ZIEN S ZG=""
4485"RTN","C0QUPDT",132,0)
4486 . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
4487"RTN","C0QUPDT",133,0)
4488 . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
4489"RTN","C0QUPDT",134,0)
4490 . . I ZIEN="" D Q ; OOPS
4491"RTN","C0QUPDT",135,0)
4492 . . . W !,"ERROR DELETING ENTRY!! ",ZG
4493"RTN","C0QUPDT",136,0)
4494 . . S C0QFDA($$C0QMMDFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
4495"RTN","C0QUPDT",137,0)
4496 . I $D(C0QFDA) D UPDIE ; PROCESS
4497"RTN","C0QUPDT",138,0)
4498 . ; SECOND, PROCESS ADDITIONS
4499"RTN","C0QUPDT",139,0)
4500 . K C0QFDA ; CLEAR OUT THE FDA
4501"RTN","C0QUPDT",140,0)
4502 . N ZG,ZC S ZG="" S ZC=1
4503"RTN","C0QUPDT",141,0)
4504 . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
4505"RTN","C0QUPDT",142,0)
4506 . . S C0QFDA($$C0QMMDFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
4507"RTN","C0QUPDT",143,0)
4508 . . S ZC=ZC+1
4509"RTN","C0QUPDT",144,0)
4510 . I $D(C0QFDA) D UPDIE ; PROCESS
4511"RTN","C0QUPDT",145,0)
4512 . N C0QPCT ; PERCENT
4513"RTN","C0QUPDT",146,0)
4514 . I C0QDCNT>0 D ;
4515"RTN","C0QUPDT",147,0)
4516 . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0)
4517"RTN","C0QUPDT",148,0)
4518 . . K C0QFDA
4519"RTN","C0QUPDT",149,0)
4520 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT
4521"RTN","C0QUPDT",150,0)
4522 . . D UPDIE
4523"RTN","C0QUPDT",151,0)
4524 Q
4525"RTN","C0QUPDT",152,0)
4526 ;
4527"RTN","C0QUPDT",153,0)
4528DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO
4529"RTN","C0QUPDT",154,0)
4530 ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
4531"RTN","C0QUPDT",155,0)
4532 ; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE
4533"RTN","C0QUPDT",156,0)
4534 N ZI,IV,EV,ZDI,ZIEN
4535"RTN","C0QUPDT",157,0)
4536 S ZI=""
4537"RTN","C0QUPDT",158,0)
4538 S ZDI=$NA(^TMP("DILIST",$J))
4539"RTN","C0QUPDT",159,0)
4540 K @RTN
4541"RTN","C0QUPDT",160,0)
4542 F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ;
4543"RTN","C0QUPDT",161,0)
4544 . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
4545"RTN","C0QUPDT",162,0)
4546 . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE
4547"RTN","C0QUPDT",163,0)
4548 . S ZIEN=@ZDI@(2,ZI) ; IEN
4549"RTN","C0QUPDT",164,0)
4550 . S @RTN@(ZIEN)=IV_"^"_EV
4551"RTN","C0QUPDT",165,0)
4552 . ;S @RTN@("B",IV,ZIEN)=EV
4553"RTN","C0QUPDT",166,0)
4554 Q
4555"RTN","C0QUPDT",167,0)
4556 ;
4557"RTN","C0QUPDT",168,0)
4558UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
4559"RTN","C0QUPDT",169,0)
4560 K ZERR
4561"RTN","C0QUPDT",170,0)
4562 D CLEAN^DILF
4563"RTN","C0QUPDT",171,0)
4564 ZWR C0QFDA
4565"RTN","C0QUPDT",172,0)
4566 D UPDATE^DIE("","C0QFDA","","ZERR")
4567"RTN","C0QUPDT",173,0)
4568 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
4569"RTN","C0QUPDT",174,0)
4570 ;. W "ERROR",!
4571"RTN","C0QUPDT",175,0)
4572 ;. ZWR ZERR
4573"RTN","C0QUPDT",176,0)
4574 ;. B
4575"RTN","C0QUPDT",177,0)
4576 K C0QFDA
4577"RTN","C0QUPDT",178,0)
4578 Q
4579"RTN","C0QUPDT",179,0)
4580 ;
4581"SEC","^DD",1130580001.101,1130580001.101,3.1,9)
4582
4583"SEC","^DIC",178.301,178.301,0,"AUDIT")
4584@
4585"SEC","^DIC",178.301,178.301,0,"DD")
4586@
4587"SEC","^DIC",178.301,178.301,0,"DEL")
4588@
4589"SEC","^DIC",178.301,178.301,0,"LAYGO")
4590@
4591"SEC","^DIC",178.301,178.301,0,"RD")
4592@
4593"SEC","^DIC",178.301,178.301,0,"WR")
4594@
4595"SEC","^DIC",1130580001.101,1130580001.101,0,"AUDIT")
4596@
4597"SEC","^DIC",1130580001.101,1130580001.101,0,"DD")
4598@
4599"SEC","^DIC",1130580001.101,1130580001.101,0,"DEL")
4600@
4601"SEC","^DIC",1130580001.101,1130580001.101,0,"LAYGO")
4602@
4603"SEC","^DIC",1130580001.101,1130580001.101,0,"RD")
4604@
4605"SEC","^DIC",1130580001.101,1130580001.101,0,"WR")
4606@
4607"SEC","^DIC",1130580001.201,1130580001.201,0,"AUDIT")
4608@
4609"SEC","^DIC",1130580001.201,1130580001.201,0,"DD")
4610@
4611"SEC","^DIC",1130580001.201,1130580001.201,0,"DEL")
4612@
4613"SEC","^DIC",1130580001.201,1130580001.201,0,"LAYGO")
4614@
4615"SEC","^DIC",1130580001.201,1130580001.201,0,"RD")
4616@
4617"SEC","^DIC",1130580001.201,1130580001.201,0,"WR")
4618@
4619"SEC","^DIC",1130580001.301,1130580001.301,0,"AUDIT")
4620@
4621"SEC","^DIC",1130580001.301,1130580001.301,0,"DD")
4622@
4623"SEC","^DIC",1130580001.301,1130580001.301,0,"DEL")
4624@
4625"SEC","^DIC",1130580001.301,1130580001.301,0,"LAYGO")
4626@
4627"SEC","^DIC",1130580001.301,1130580001.301,0,"RD")
4628@
4629"SEC","^DIC",1130580001.301,1130580001.301,0,"WR")
4630@
4631"VER")
46328.0^22.0
4633"^DD",178.301,178.301,0)
4634FIELD^^2.2^11
4635"^DD",178.301,178.301,0,"DDA")
4636N
4637"^DD",178.301,178.301,0,"DT")
46383100226
4639"^DD",178.301,178.301,0,"IX","B",178.301,.01)
4640
4641"^DD",178.301,178.301,0,"NM","C0C XML MISC")
4642
4643"^DD",178.301,178.301,0,"PT",178.301,.03)
4644
4645"^DD",178.301,178.301,.01,0)
4646TEMPLATE NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X
4647"^DD",178.301,178.301,.01,.1)
4648NAME OF THE XML TEMPLATE
4649"^DD",178.301,178.301,.01,1,0)
4650^.1
4651"^DD",178.301,178.301,.01,1,1,0)
4652178.301^B
4653"^DD",178.301,178.301,.01,1,1,1)
4654S ^C0CX(178.301,"B",$E(X,1,30),DA)=""
4655"^DD",178.301,178.301,.01,1,1,2)
4656K ^C0CX(178.301,"B",$E(X,1,30),DA)
4657"^DD",178.301,178.301,.01,3)
4658NAME OF THE XML TEMPLATE
4659"^DD",178.301,178.301,.01,"DT")
46603100224
4661"^DD",178.301,178.301,.03,0)
4662REPLY TEMPLATE^P178.301^C0CX(178.301,^0;2^Q
4663"^DD",178.301,178.301,.03,.1)
4664TEMPLATE TO USE FOR WEB SERVICE REPLY
4665"^DD",178.301,178.301,.03,3)
4666TEMPLATE TO USE FOR WEB SERVICE REPLY
4667"^DD",178.301,178.301,.03,"DT")
46683100224
4669"^DD",178.301,178.301,1,0)
4670URL^F^^1;1^K:$L(X)>240!($L(X)<3) X
4671"^DD",178.301,178.301,1,.1)
4672WEB SERVICE URL
4673"^DD",178.301,178.301,1,3)
4674WEB SERVICE URL
4675"^DD",178.301,178.301,1,"DT")
46763100224
4677"^DD",178.301,178.301,2,0)
4678WSDL URL^F^^2;1^K:$L(X)>240!($L(X)<3) X
4679"^DD",178.301,178.301,2,.1)
4680TEMPLATE DEFINITION URL - COULD BE WSDL
4681"^DD",178.301,178.301,2,3)
4682TEMPLATE DEFINITION URL - COULD BE WSDL
4683"^DD",178.301,178.301,2,"DT")
46843100224
4685"^DD",178.301,178.301,2.1,0)
4686XML^178.311^^3;0
4687"^DD",178.301,178.301,2.2,0)
4688XML HEADER^178.321^^10;0
4689"^DD",178.301,178.301,2.3,0)
4690MIME TYPE^F^^5;1^K:$L(X)>240!($L(X)<3) X
4691"^DD",178.301,178.301,2.3,.1)
4692SOAP MIME TYPE
4693"^DD",178.301,178.301,2.3,3)
4694SOAP MIME TYPE
4695"^DD",178.301,178.301,2.3,"DT")
46963100224
4697"^DD",178.301,178.301,2.4,0)
4698PROXY SERVER^F^^6;1^K:$L(X)>240!($L(X)<3) X
4699"^DD",178.301,178.301,2.4,.1)
4700OPTIONAL PROXY SERVER URL
4701"^DD",178.301,178.301,2.4,3)
4702OPTIONAL PROXY SERVER URL
4703"^DD",178.301,178.301,2.4,"DT")
47043100224
4705"^DD",178.301,178.301,2.5,0)
4706XPATH REDUCTION STRING^F^^7;1^K:$L(X)>240!($L(X)<3) X
4707"^DD",178.301,178.301,2.5,.1)
4708PARTIAL XPATH TO BE REDACTED FROM GENERATED XPATHS
4709"^DD",178.301,178.301,2.5,3)
4710XPATH REDUCTION STRING
4711"^DD",178.301,178.301,2.5,"DT")
47123100224
4713"^DD",178.301,178.301,3,0)
4714TEMPLATE XML^178.3013^^8;0
4715"^DD",178.301,178.301,4,0)
4716BINDING^178.3014^^9;0
4717"^DD",178.301,178.3013,0)
4718TEMPLATE XML SUB-FIELD^^.01^1
4719"^DD",178.301,178.3013,0,"DT")
47203100224
4721"^DD",178.301,178.3013,0,"NM","TEMPLATE XML")
4722
4723"^DD",178.301,178.3013,0,"UP")
4724178.301
4725"^DD",178.301,178.3013,.01,0)
4726TEMPLATE XML^WLx^^0;1
4727"^DD",178.301,178.3013,.01,.1)
4728XML TEMPLATE - USUALLY GENERATED
4729"^DD",178.301,178.3013,.01,3)
4730XML TEMPLATE - USUALLY PROGRAM GENERATED
4731"^DD",178.301,178.3013,.01,"DT")
47323100224
4733"^DD",178.301,178.3014,0)
4734BINDING SUB-FIELD^^4^8
4735"^DD",178.301,178.3014,0,"DT")
47363100224
4737"^DD",178.301,178.3014,0,"IX","B",178.3014,.01)
4738
4739"^DD",178.301,178.3014,0,"NM","BINDING")
4740
4741"^DD",178.301,178.3014,0,"UP")
4742178.301
4743"^DD",178.301,178.3014,.01,0)
4744XPATH^MF^^0;1^K:$L(X)>240!($L(X)<3) X
4745"^DD",178.301,178.3014,.01,.1)
4746XPATH BINDINGS
4747"^DD",178.301,178.3014,.01,1,0)
4748^.1
4749"^DD",178.301,178.3014,.01,1,1,0)
4750178.3014^B
4751"^DD",178.301,178.3014,.01,1,1,1)
4752S ^C0CX(178.301,DA(1),9,"B",$E(X,1,30),DA)=""
4753"^DD",178.301,178.3014,.01,1,1,2)
4754K ^C0CX(178.301,DA(1),9,"B",$E(X,1,30),DA)
4755"^DD",178.301,178.3014,.01,3)
4756XPATH BINDINGS
4757"^DD",178.301,178.3014,.01,"DT")
47583100225
4759"^DD",178.301,178.3014,.05,0)
4760INDEXED BY^F^^1;1^K:$L(X)>80!($L(X)<1) X
4761"^DD",178.301,178.3014,.05,.1)
4762IEN VARIABLE FOR FILEMAN MAPPING
4763"^DD",178.301,178.3014,.05,3)
4764IEN VARIABLE FOR FILEMAN MAPPING
4765"^DD",178.301,178.3014,.05,"DT")
47663100224
4767"^DD",178.301,178.3014,1,0)
4768FILEMAN FIELD NAME^F^^1;2^K:$L(X)>60!($L(X)<3) X
4769"^DD",178.301,178.3014,1,.1)
4770NAME OF FILEMAN FIELD - OPTIONAL
4771"^DD",178.301,178.3014,1,3)
4772NAME OF FILEMAN FIELD - OPTIONAL
4773"^DD",178.301,178.3014,1,"DT")
47743100224
4775"^DD",178.301,178.3014,1.1,0)
4776FILEMAN FILE POINTER^P1'^DIC(^1;3^Q
4777"^DD",178.301,178.3014,1.1,.1)
4778POINTER TO THE FILEMAN FILE
4779"^DD",178.301,178.3014,1.1,3)
4780POINTER TO THE FILEMAN FILE
4781"^DD",178.301,178.3014,1.1,"DT")
47823100224
4783"^DD",178.301,178.3014,1.2,0)
4784FILEMAN FIELD NUMBER^NJ22,9^^1;4^K:+X'=X!(X>999999999999)!(X<.000000001)!(X?.E1"."10.N) X
4785"^DD",178.301,178.3014,1.2,.1)
4786FIELD NUMBER IN FILEMAN
4787"^DD",178.301,178.3014,1.2,3)
4788Type a number between .000000001 and 999999999999, 9 Decimal Digits
4789"^DD",178.301,178.3014,1.2,"DT")
47903100224
4791"^DD",178.301,178.3014,2,0)
4792VARIABLE NAME^F^^2;1^K:$L(X)>240!($L(X)<1) X
4793"^DD",178.301,178.3014,2,.1)
4794NAME OF VARIABLE FOR BINDING
4795"^DD",178.301,178.3014,2,3)
4796NAME OF VARIABLE FOR BINDING
4797"^DD",178.301,178.3014,2,"DT")
47983100224
4799"^DD",178.301,178.3014,3,0)
4800SQLI FIELD NAME^F^^3;1^K:$L(X)>240!($L(X)<3) X
4801"^DD",178.301,178.3014,3,.1)
4802SQLI NAME FOR THIS FIELD
4803"^DD",178.301,178.3014,3,3)
4804SQLI NAME FOR THIS FIELD
4805"^DD",178.301,178.3014,3,"DT")
48063100224
4807"^DD",178.301,178.3014,4,0)
4808CCR VARIABLE^P170^C0CDIC(170,^3;2^Q
4809"^DD",178.301,178.3014,4,.1)
4810CCR DICTIONARY POINTER
4811"^DD",178.301,178.3014,4,3)
4812CCR DICTIONARY POINTER
4813"^DD",178.301,178.3014,4,"DT")
48143100224
4815"^DD",178.301,178.311,0)
4816XML SUB-FIELD^^.01^1
4817"^DD",178.301,178.311,0,"DT")
48183100224
4819"^DD",178.301,178.311,0,"NM","XML")
4820
4821"^DD",178.301,178.311,0,"UP")
4822178.301
4823"^DD",178.301,178.311,.01,0)
4824XML^WLx^^0;1
4825"^DD",178.301,178.311,.01,.1)
4826DEFINING XML
4827"^DD",178.301,178.311,.01,3)
4828DEFINING XML
4829"^DD",178.301,178.311,.01,"DT")
48303100224
4831"^DD",178.301,178.321,0)
4832XML HEADER SUB-FIELD^^.01^1
4833"^DD",178.301,178.321,0,"DT")
48343100226
4835"^DD",178.301,178.321,0,"NM","XML HEADER")
4836
4837"^DD",178.301,178.321,0,"UP")
4838178.301
4839"^DD",178.301,178.321,.01,0)
4840XML HEADER^WLx^^0;1
4841"^DD",178.301,178.321,.01,.1)
4842XML SOAP HEADER
4843"^DD",178.301,178.321,.01,3)
4844XML SOAP HEADER
4845"^DD",178.301,178.321,.01,"DT")
48463100226
4847"^DD",1130580001.101,1130580001.101,0)
4848FIELD^^1.51^14
4849"^DD",1130580001.101,1130580001.101,0,"DDA")
4850N
4851"^DD",1130580001.101,1130580001.101,0,"DT")
48523110809
4853"^DD",1130580001.101,1130580001.101,0,"ID",.7)
4854W:$D(^(5)) " ",$P(^(5),U,1)
4855"^DD",1130580001.101,1130580001.101,0,"IX","B",1130580001.101,.01)
4856
4857"^DD",1130580001.101,1130580001.101,0,"NM","C0Q QUALITY MEASURE")
4858
4859"^DD",1130580001.101,1130580001.101,0,"PT",1130580001.2011,.01)
4860
4861"^DD",1130580001.101,1130580001.101,.01,0)
4862NAME^RF^^0;1^K:$L(X)>30!($L(X)<1)!'(X'?1P.E) X
4863"^DD",1130580001.101,1130580001.101,.01,.1)
4864MEASURE NAME
4865"^DD",1130580001.101,1130580001.101,.01,1,0)
4866^.1
4867"^DD",1130580001.101,1130580001.101,.01,1,1,0)
48681130580001.101^B
4869"^DD",1130580001.101,1130580001.101,.01,1,1,1)
4870S ^C0Q(101,"B",$E(X,1,30),DA)=""
4871"^DD",1130580001.101,1130580001.101,.01,1,1,2)
4872K ^C0Q(101,"B",$E(X,1,30),DA)
4873"^DD",1130580001.101,1130580001.101,.01,3)
4874Answer must be 1-30 characters in length
4875"^DD",1130580001.101,1130580001.101,.01,"DT")
48763101012
4877"^DD",1130580001.101,1130580001.101,.5,0)
4878TITLE^F^^1;1^K:$L(X)>240!($L(X)<3) X
4879"^DD",1130580001.101,1130580001.101,.5,.1)
4880MEASURE TITLE
4881"^DD",1130580001.101,1130580001.101,.5,3)
4882Answer must be 3-240 characters in length
4883"^DD",1130580001.101,1130580001.101,.5,"DT")
48843110430
4885"^DD",1130580001.101,1130580001.101,.61,0)
4886VERY LONG DESCRIPTION^1130580001.111^^6;0
4887"^DD",1130580001.101,1130580001.101,.7,0)
4888DISPLAY NAME^F^^5;1^K:$L(X)>240!($L(X)<3) X
4889"^DD",1130580001.101,1130580001.101,.7,.1)
4890QRDA DISPLAY NAME
4891"^DD",1130580001.101,1130580001.101,.7,3)
4892Answer must be 3-240 characters in length
4893"^DD",1130580001.101,1130580001.101,.7,"DT")
48943101012
4895"^DD",1130580001.101,1130580001.101,.8,0)
4896REPORTING NAME^F^^7;1^K:$L(X)>30!($L(X)<3) X
4897"^DD",1130580001.101,1130580001.101,.8,.1)
4898REPORTING MEASURE NAME
4899"^DD",1130580001.101,1130580001.101,.8,3)
4900Answer must be 3-30 characters in length
4901"^DD",1130580001.101,1130580001.101,.8,"DT")
49023110615
4903"^DD",1130580001.101,1130580001.101,1,0)
4904NUMERATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;2^Q
4905"^DD",1130580001.101,1130580001.101,1,.1)
4906MEASURE NUMERATOR PATIENT LIST
4907"^DD",1130580001.101,1130580001.101,1,"DT")
49083101012
4909"^DD",1130580001.101,1130580001.101,1.1,0)
4910ALTERNATIVE NUMERATOR LIST^P1130580001.301'^C0Q(301,^7;2^Q
4911"^DD",1130580001.101,1130580001.101,1.1,"DT")
49123110805
4913"^DD",1130580001.101,1130580001.101,1.5,0)
4914NEGATIVE NUMERATOR LIST^P810.5'^PXRMXP(810.5,^7;4^Q
4915"^DD",1130580001.101,1130580001.101,1.5,.1)
4916LIST OF PATIENTS THAT DO NOT MEET THE REQUIREMENTS
4917"^DD",1130580001.101,1130580001.101,1.5,"DT")
49183110809
4919"^DD",1130580001.101,1130580001.101,1.51,0)
4920ALTERNATE NEGATIVE NUM LIST^P1130580001.301'^C0Q(301,^7;5^Q
4921"^DD",1130580001.101,1130580001.101,1.51,.1)
4922NEGATIVE NUMERATOR LIST IN C0Q PATIENT LIST FILE
4923"^DD",1130580001.101,1130580001.101,1.51,"DT")
49243110809
4925"^DD",1130580001.101,1130580001.101,2,0)
4926DENOMINATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;3^Q
4927"^DD",1130580001.101,1130580001.101,2,.1)
4928MEASURE DENOMINATOR PATIENT LIST
4929"^DD",1130580001.101,1130580001.101,2,"DT")
49303101012
4931"^DD",1130580001.101,1130580001.101,2.1,0)
4932ALTERNATIVE DENOMINATOR LIST^P1130580001.301'^C0Q(301,^7;3^Q
4933"^DD",1130580001.101,1130580001.101,2.1,"DT")
49343110805
4935"^DD",1130580001.101,1130580001.101,3,0)
4936QRDA TEMPLATE ROOT^F^^0;4^K:$L(X)>120!($L(X)<3) X
4937"^DD",1130580001.101,1130580001.101,3,.1)
4938MEASURE TEMPLATE ROOT FOR QRDA DOCUMENT
4939"^DD",1130580001.101,1130580001.101,3,3)
4940Answer must be 3-120 characters in length
4941"^DD",1130580001.101,1130580001.101,3,"DT")
49423101012
4943"^DD",1130580001.101,1130580001.101,3.1,0)
4944QRDA MEASURE SYSTEM OID^CJ^^ ; ^S X="2.16.840.1.113883.3.249.12"
4945"^DD",1130580001.101,1130580001.101,3.1,.1)
4946QRDA SYSTEM OID (FIXED)
4947"^DD",1130580001.101,1130580001.101,3.1,9.01)
4948
4949"^DD",1130580001.101,1130580001.101,3.1,9.1)
4950S X="2.16.840.1.113883.3.249.12"
4951"^DD",1130580001.101,1130580001.101,3.1,"DT")
49523101012
4953"^DD",1130580001.101,1130580001.101,3.2,0)
4954QRDA CODE^F^^4;1^K:$L(X)>80!($L(X)<1) X
4955"^DD",1130580001.101,1130580001.101,3.2,.1)
4956QRDA MEASURE CODE
4957"^DD",1130580001.101,1130580001.101,3.2,3)
4958Answer must be 1-80 characters in length
4959"^DD",1130580001.101,1130580001.101,3.2,"DT")
49603101012
4961"^DD",1130580001.101,1130580001.111,0)
4962VERY LONG DESCRIPTION SUB-FIELD^^.01^1
4963"^DD",1130580001.101,1130580001.111,0,"DT")
49643101013
4965"^DD",1130580001.101,1130580001.111,0,"NM","VERY LONG DESCRIPTION")
4966
4967"^DD",1130580001.101,1130580001.111,0,"UP")
49681130580001.101
4969"^DD",1130580001.101,1130580001.111,.01,0)
4970VERY LONG DESCRIPTION^Wx^^0;1
4971"^DD",1130580001.101,1130580001.111,.01,.1)
4972LONGER DESCRIPTION - IF IT DOESN'T FIT IN .6
4973"^DD",1130580001.101,1130580001.111,.01,3)
4974LONGER DESCRIPTION - INSTEAD OF LONG DESCRIPTION
4975"^DD",1130580001.101,1130580001.111,.01,"DT")
49763101013
4977"^DD",1130580001.201,1130580001.201,0)
4978FIELD^^.2^7
4979"^DD",1130580001.201,1130580001.201,0,"DDA")
4980N
4981"^DD",1130580001.201,1130580001.201,0,"DT")
49823110621
4983"^DD",1130580001.201,1130580001.201,0,"IX","ADBYP",1130580001.20112,.01)
4984
4985"^DD",1130580001.201,1130580001.201,0,"IX","ANBYP",1130580001.20111,.01)
4986
4987"^DD",1130580001.201,1130580001.201,0,"IX","B",1130580001.201,.01)
4988
4989"^DD",1130580001.201,1130580001.201,0,"NM","C0Q MEASUREMENTS")
4990
4991"^DD",1130580001.201,1130580001.201,.01,0)
4992SET NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X
4993"^DD",1130580001.201,1130580001.201,.01,.1)
4994MEASUREMENT SET NAME
4995"^DD",1130580001.201,1130580001.201,.01,1,0)
4996^.1
4997"^DD",1130580001.201,1130580001.201,.01,1,1,0)
49981130580001.201^B
4999"^DD",1130580001.201,1130580001.201,.01,1,1,1)
5000S ^C0Q(201,"B",$E(X,1,30),DA)=""
5001"^DD",1130580001.201,1130580001.201,.01,1,1,2)
5002K ^C0Q(201,"B",$E(X,1,30),DA)
5003"^DD",1130580001.201,1130580001.201,.01,3)
5004NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION
5005"^DD",1130580001.201,1130580001.201,.01,"DT")
50063101012
5007"^DD",1130580001.201,1130580001.201,.02,0)
5008BEGIN DATE^D^^4;3^S %DT="E" D ^%DT S X=Y K:X<1 X
5009"^DD",1130580001.201,1130580001.201,.02,.1)
5010MEASUREMENT BEGIN DATE
5011"^DD",1130580001.201,1130580001.201,.02,3)
5012MEASUREMENT BEGIN DATE
5013"^DD",1130580001.201,1130580001.201,.02,"DT")
50143101012
5015"^DD",1130580001.201,1130580001.201,.03,0)
5016END DATE^D^^4;4^S %DT="E" D ^%DT S X=Y K:X<1 X
5017"^DD",1130580001.201,1130580001.201,.03,.1)
5018MEASUREMENT END DATE
5019"^DD",1130580001.201,1130580001.201,.03,3)
5020MEASUREMENT END DATE
5021"^DD",1130580001.201,1130580001.201,.03,"DT")
50223101012
5023"^DD",1130580001.201,1130580001.201,.04,0)
5024DATE LAST CALCULATED^D^^6;1^S %DT="E" D ^%DT S X=Y K:X<1 X
5025"^DD",1130580001.201,1130580001.201,.04,.1)
5026DATE LAST PROCESSED
5027"^DD",1130580001.201,1130580001.201,.04,3)
5028DATE LAST PROCESSED
5029"^DD",1130580001.201,1130580001.201,.04,"DT")
50303101012
5031"^DD",1130580001.201,1130580001.201,.05,0)
5032LOCKED^S^Y:YES;N:NO;^6;2^Q
5033"^DD",1130580001.201,1130580001.201,.05,.1)
5034Y/N IS THIS RECORD SET LOCKED
5035"^DD",1130580001.201,1130580001.201,.05,3)
5036Y/N IS THIS RECORD SET LOCKED
5037"^DD",1130580001.201,1130580001.201,.05,"DT")
50383101012
5039"^DD",1130580001.201,1130580001.201,.2,0)
5040USE ALL MEASURES^S^Y:YES;N:NO;^6;3^Q
5041"^DD",1130580001.201,1130580001.201,.2,.1)
5042INCLUDE ALL MEASURES IN THIS SET?
5043"^DD",1130580001.201,1130580001.201,.2,3)
5044INCLUDE ALL MEASURES IN THIS SET?
5045"^DD",1130580001.201,1130580001.201,.2,"DT")
50463101012
5047"^DD",1130580001.201,1130580001.201,1,0)
5048MEASURE^1130580001.2011P^^5;0
5049"^DD",1130580001.201,1130580001.2011,0)
5050MEASURE SUB-FIELD^^3^6
5051"^DD",1130580001.201,1130580001.2011,0,"DT")
50523110621
5053"^DD",1130580001.201,1130580001.2011,0,"IX","B",1130580001.2011,.01)
5054
5055"^DD",1130580001.201,1130580001.2011,0,"NM","MEASURE")
5056
5057"^DD",1130580001.201,1130580001.2011,0,"UP")
50581130580001.201
5059"^DD",1130580001.201,1130580001.2011,.01,0)
5060MEASURE^MP1130580001.101^C0Q(101,^0;1^Q
5061"^DD",1130580001.201,1130580001.2011,.01,.1)
5062INCLUDED QUALITY MEASURES
5063"^DD",1130580001.201,1130580001.2011,.01,1,0)
5064^.1
5065"^DD",1130580001.201,1130580001.2011,.01,1,1,0)
50661130580001.2011^B
5067"^DD",1130580001.201,1130580001.2011,.01,1,1,1)
5068S ^C0Q(201,DA(1),5,"B",$E(X,1,30),DA)=""
5069"^DD",1130580001.201,1130580001.2011,.01,1,1,2)
5070K ^C0Q(201,DA(1),5,"B",$E(X,1,30),DA)
5071"^DD",1130580001.201,1130580001.2011,.01,3)
5072INCLUDED QUALITY MEASURES
5073"^DD",1130580001.201,1130580001.2011,.01,"DT")
50743101012
5075"^DD",1130580001.201,1130580001.2011,1,0)
5076NUMERATOR^1130580001.20111P^^1;0
5077"^DD",1130580001.201,1130580001.2011,1.1,0)
5078NUMERATOR COUNT^NJ10,0^^2;1^K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"."1.N) X
5079"^DD",1130580001.201,1130580001.2011,1.1,.1)
5080NUMBER OF PATIENTS IN NUMERATOR
5081"^DD",1130580001.201,1130580001.2011,1.1,3)
5082NUMBER OF PATIENTS IN NUMERATOR
5083"^DD",1130580001.201,1130580001.2011,1.1,"DT")
50843101012
5085"^DD",1130580001.201,1130580001.2011,2,0)
5086DENOMINATOR^1130580001.20112P^^3;0
5087"^DD",1130580001.201,1130580001.2011,2.1,0)
5088DENOMINATOR COUNT^NJ9,0^^4;1^K:+X'=X!(X>999999999)!(X<0)!(X?.E1"."1.N) X
5089"^DD",1130580001.201,1130580001.2011,2.1,.1)
5090NUMBER OF PATIENTS IN DENOMINATOR
5091"^DD",1130580001.201,1130580001.2011,2.1,3)
5092NUMBER OF PATIENTS IN DENOMINATOR
5093"^DD",1130580001.201,1130580001.2011,2.1,"DT")
50943101012
5095"^DD",1130580001.201,1130580001.2011,3,0)
5096PERCENTAGE^NJ6,2^^4;2^K:+X'=X!(X>100)!(X<0)!(X?.E1"."3.N) X
5097"^DD",1130580001.201,1130580001.2011,3,.1)
5098MEASURE PERCENTAGE
5099"^DD",1130580001.201,1130580001.2011,3,3)
5100Type a number between 0 and 100, 2 Decimal Digits
5101"^DD",1130580001.201,1130580001.2011,3,"DT")
51023110621
5103"^DD",1130580001.201,1130580001.20111,0)
5104NUMERATOR SUB-FIELD^^.01^1
5105"^DD",1130580001.201,1130580001.20111,0,"DT")
51063101012
5107"^DD",1130580001.201,1130580001.20111,0,"IX","B",1130580001.20111,.01)
5108
5109"^DD",1130580001.201,1130580001.20111,0,"NM","NUMERATOR")
5110
5111"^DD",1130580001.201,1130580001.20111,0,"UP")
51121130580001.2011
5113"^DD",1130580001.201,1130580001.20111,.01,0)
5114NUMERATOR^MP2'^DPT(^0;1^Q
5115"^DD",1130580001.201,1130580001.20111,.01,.1)
5116NUMERATOR PATIENTS
5117"^DD",1130580001.201,1130580001.20111,.01,1,0)
5118^.1
5119"^DD",1130580001.201,1130580001.20111,.01,1,1,0)
51201130580001.20111^B
5121"^DD",1130580001.201,1130580001.20111,.01,1,1,1)
5122S ^C0Q(201,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)=""
5123"^DD",1130580001.201,1130580001.20111,.01,1,1,2)
5124K ^C0Q(201,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)
5125"^DD",1130580001.201,1130580001.20111,.01,1,2,0)
51261130580001.201^ANBYP
5127"^DD",1130580001.201,1130580001.20111,.01,1,2,1)
5128S ^C0Q(201,"ANBYP",$E(X,1,30),DA(2),DA(1),DA)=""
5129"^DD",1130580001.201,1130580001.20111,.01,1,2,2)
5130K ^C0Q(201,"ANBYP",$E(X,1,30),DA(2),DA(1),DA)
5131"^DD",1130580001.201,1130580001.20111,.01,1,2,"DT")
51323101014
5133"^DD",1130580001.201,1130580001.20111,.01,3)
5134NUMERATOR PATIENTS
5135"^DD",1130580001.201,1130580001.20111,.01,"DT")
51363101014
5137"^DD",1130580001.201,1130580001.20112,0)
5138DENOMINATOR SUB-FIELD^^.01^1
5139"^DD",1130580001.201,1130580001.20112,0,"DT")
51403101012
5141"^DD",1130580001.201,1130580001.20112,0,"IX","B",1130580001.20112,.01)
5142
5143"^DD",1130580001.201,1130580001.20112,0,"NM","DENOMINATOR")
5144
5145"^DD",1130580001.201,1130580001.20112,0,"UP")
51461130580001.2011
5147"^DD",1130580001.201,1130580001.20112,.01,0)
5148DENOMINATOR^MP2'^DPT(^0;1^Q
5149"^DD",1130580001.201,1130580001.20112,.01,.1)
5150DENOMINATOR PATIENTS
5151"^DD",1130580001.201,1130580001.20112,.01,1,0)
5152^.1
5153"^DD",1130580001.201,1130580001.20112,.01,1,1,0)
51541130580001.20112^B
5155"^DD",1130580001.201,1130580001.20112,.01,1,1,1)
5156S ^C0Q(201,DA(2),5,DA(1),3,"B",$E(X,1,30),DA)=""
5157"^DD",1130580001.201,1130580001.20112,.01,1,1,2)
5158K ^C0Q(201,DA(2),5,DA(1),3,"B",$E(X,1,30),DA)
5159"^DD",1130580001.201,1130580001.20112,.01,1,2,0)
51601130580001.201^ADBYP
5161"^DD",1130580001.201,1130580001.20112,.01,1,2,1)
5162S ^C0Q(201,"ADBYP",$E(X,1,30),DA(2),DA(1),DA)=""
5163"^DD",1130580001.201,1130580001.20112,.01,1,2,2)
5164K ^C0Q(201,"ADBYP",$E(X,1,30),DA(2),DA(1),DA)
5165"^DD",1130580001.201,1130580001.20112,.01,1,2,"DT")
51663101014
5167"^DD",1130580001.201,1130580001.20112,.01,3)
5168DENOMINATOR PATIENTS
5169"^DD",1130580001.201,1130580001.20112,.01,"DT")
51703101014
5171"^DD",1130580001.301,1130580001.301,0)
5172FIELD^^999^8
5173"^DD",1130580001.301,1130580001.301,0,"DDA")
5174N
5175"^DD",1130580001.301,1130580001.301,0,"DT")
51763110805
5177"^DD",1130580001.301,1130580001.301,0,"ID",999)
5178W:$D(^(3)) " ",$P(^(3),U,1)
5179"^DD",1130580001.301,1130580001.301,0,"IX","B",1130580001.301,.01)
5180
5181"^DD",1130580001.301,1130580001.301,0,"NM","C0Q PATIENT LIST")
5182
5183"^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,1.1)
5184
5185"^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,1.51)
5186
5187"^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,2.1)
5188
5189"^DD",1130580001.301,1130580001.301,.01,0)
5190NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X
5191"^DD",1130580001.301,1130580001.301,.01,1,0)
5192^.1
5193"^DD",1130580001.301,1130580001.301,.01,1,1,0)
51941130580001.301^B
5195"^DD",1130580001.301,1130580001.301,.01,1,1,1)
5196S ^C0Q(301,"B",$E(X,1,30),DA)=""
5197"^DD",1130580001.301,1130580001.301,.01,1,1,2)
5198K ^C0Q(301,"B",$E(X,1,30),DA)
5199"^DD",1130580001.301,1130580001.301,.01,3)
5200NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION
5201"^DD",1130580001.301,1130580001.301,.02,0)
5202REPORT YEAR^NJ4,0^^0;2^K:+X'=X!(X>2050)!(X<2011)!(X?.E1"."1.N) X
5203"^DD",1130580001.301,1130580001.301,.02,3)
5204Type a number between 2011 and 2050, 0 decimal digits.
5205"^DD",1130580001.301,1130580001.301,.02,"DT")
52063110805
5207"^DD",1130580001.301,1130580001.301,.03,0)
5208REPORT PERIOD^NJ2,0^^0;3^K:+X'=X!(X>12)!(X<1)!(X?.E1"."1.N) X
5209"^DD",1130580001.301,1130580001.301,.03,3)
5210Type a number between 1 and 12, 0 decimal digits.
5211"^DD",1130580001.301,1130580001.301,.03,"DT")
52123110805
5213"^DD",1130580001.301,1130580001.301,.04,0)
5214ORIGINAL DATE CREATED^D^^0;4^S %DT="ESTR" D ^%DT S X=Y K:X<1 X
5215"^DD",1130580001.301,1130580001.301,.04,3)
5216(No range limit on date)
5217"^DD",1130580001.301,1130580001.301,.04,"DT")
52183110805
5219"^DD",1130580001.301,1130580001.301,.07,0)
5220CREATOR^P200'^VA(200,^0;5^Q
5221"^DD",1130580001.301,1130580001.301,.07,"DT")
52223110805
5223"^DD",1130580001.301,1130580001.301,30,0)
5224PATIENTS^1130580001.311P^^1;0
5225"^DD",1130580001.301,1130580001.301,200,0)
5226CREATION DOCUMENTATION^1130580001.321^^2;0
5227"^DD",1130580001.301,1130580001.301,999,0)
5228ATTRIBUTE^F^^3;1^K:$L(X)>64!($L(X)<1) X
5229"^DD",1130580001.301,1130580001.301,999,3)
5230PATIENT LIST ATTRIBUTE
5231"^DD",1130580001.301,1130580001.301,999,"DT")
52323110805
5233"^DD",1130580001.301,1130580001.311,0)
5234PATIENTS SUB-FIELD^^.05^4
5235"^DD",1130580001.301,1130580001.311,0,"DT")
52363110805
5237"^DD",1130580001.301,1130580001.311,0,"IX","B",1130580001.311,.01)
5238
5239"^DD",1130580001.301,1130580001.311,0,"NM","PATIENTS")
5240
5241"^DD",1130580001.301,1130580001.311,0,"UP")
52421130580001.301
5243"^DD",1130580001.301,1130580001.311,.01,0)
5244PATIENTS^MP2'^DPT(^0;1^Q
5245"^DD",1130580001.301,1130580001.311,.01,1,0)
5246^.1
5247"^DD",1130580001.301,1130580001.311,.01,1,1,0)
52481130580001.311^B
5249"^DD",1130580001.301,1130580001.311,.01,1,1,1)
5250S ^C0Q(301,DA(1),1,"B",$E(X,1,30),DA)=""
5251"^DD",1130580001.301,1130580001.311,.01,1,1,2)
5252K ^C0Q(301,DA(1),1,"B",$E(X,1,30),DA)
5253"^DD",1130580001.301,1130580001.311,.01,3)
5254PATIENTS IN THE LIST
5255"^DD",1130580001.301,1130580001.311,.01,"DT")
52563110805
5257"^DD",1130580001.301,1130580001.311,.04,0)
5258DESEASED^S^0:NO;1:YES;^2;1^Q
5259"^DD",1130580001.301,1130580001.311,.04,"DT")
52603110805
5261"^DD",1130580001.301,1130580001.311,.05,0)
5262TEST PATIENT^S^0:NO;1:YES;^2;2^Q
5263"^DD",1130580001.301,1130580001.311,.05,"DT")
52643110805
5265"^DD",1130580001.301,1130580001.311,1,0)
5266DATA^1130580001.3111^^1;0
5267"^DD",1130580001.301,1130580001.3111,0)
5268DATA SUB-FIELD^^.02^2
5269"^DD",1130580001.301,1130580001.3111,0,"DT")
52703110805
5271"^DD",1130580001.301,1130580001.3111,0,"IX","B",1130580001.3111,.01)
5272
5273"^DD",1130580001.301,1130580001.3111,0,"NM","DATA")
5274
5275"^DD",1130580001.301,1130580001.3111,0,"UP")
52761130580001.311
5277"^DD",1130580001.301,1130580001.3111,.01,0)
5278DATA TYPE^MF^^0;1^K:$L(X)>64!($L(X)<1) X
5279"^DD",1130580001.301,1130580001.3111,.01,1,0)
5280^.1
5281"^DD",1130580001.301,1130580001.3111,.01,1,1,0)
52821130580001.3111^B
5283"^DD",1130580001.301,1130580001.3111,.01,1,1,1)
5284S ^C0Q(301,DA(2),1,DA(1),1,"B",$E(X,1,30),DA)=""
5285"^DD",1130580001.301,1130580001.3111,.01,1,1,2)
5286K ^C0Q(301,DA(2),1,DA(1),1,"B",$E(X,1,30),DA)
5287"^DD",1130580001.301,1130580001.3111,.01,3)
5288Answer must be 1-64 characters in length.
5289"^DD",1130580001.301,1130580001.3111,.01,"DT")
52903110805
5291"^DD",1130580001.301,1130580001.3111,.02,0)
5292VALUE^F^^0;2^K:$L(X)>64!($L(X)<1) X
5293"^DD",1130580001.301,1130580001.3111,.02,3)
5294Answer must be 1-64 characters in length.
5295"^DD",1130580001.301,1130580001.3111,.02,"DT")
52963110805
5297"^DD",1130580001.301,1130580001.321,0)
5298CREATION DOCUMENTATION SUB-FIELD^^.01^1
5299"^DD",1130580001.301,1130580001.321,0,"DT")
53003110805
5301"^DD",1130580001.301,1130580001.321,0,"NM","CREATION DOCUMENTATION")
5302
5303"^DD",1130580001.301,1130580001.321,0,"UP")
53041130580001.301
5305"^DD",1130580001.301,1130580001.321,.01,0)
5306CREATION DOCUMENTATION^W^^0;1
5307"^DD",1130580001.301,1130580001.321,.01,3)
5308DOCUMENTATION
5309"^DD",1130580001.301,1130580001.321,.01,"DT")
53103110805
5311"^DIC",178.301,178.301,0)
5312C0C XML MISC^178.301
5313"^DIC",178.301,178.301,0,"GL")
5314^C0CX(178.301,
5315"^DIC",178.301,"B","C0C XML MISC",178.301)
5316
5317"^DIC",1130580001.101,1130580001.101,0)
5318C0Q QUALITY MEASURE^1130580001.101
5319"^DIC",1130580001.101,1130580001.101,0,"GL")
5320^C0Q(101,
5321"^DIC",1130580001.101,"B","C0Q QUALITY MEASURE",1130580001.101)
5322
5323"^DIC",1130580001.201,1130580001.201,0)
5324C0Q MEASUREMENTS^1130580001.201
5325"^DIC",1130580001.201,1130580001.201,0,"GL")
5326^C0Q(201,
5327"^DIC",1130580001.201,"B","C0Q MEASUREMENTS",1130580001.201)
5328
5329"^DIC",1130580001.301,1130580001.301,0)
5330C0Q PATIENT LIST^1130580001.301
5331"^DIC",1130580001.301,1130580001.301,0,"GL")
5332^C0Q(301,
5333"^DIC",1130580001.301,1130580001.301,"%",0)
5334^1.005^^0
5335"^DIC",1130580001.301,"B","C0Q PATIENT LIST",1130580001.301)
5336
5337**END**
5338**END**
Note: See TracBrowser for help on using the repository browser.