source: qrda/C0Q/trunk/kids/C0Q-1_SEQ-004_PAT-001.KID@ 1546

Last change on this file since 1546 was 1530, checked in by Sam Habiel, 12 years ago

Update of patch 1 to include all changes made from 2-4; release as well; delete old patch

File size: 121.0 KB
Line 
1KIDS Distribution saved on Sep 17, 2012@16:13:14
2ERX MU MEASURE SUPPORT
3**KIDS**:C0Q*1.0*1^
4
5**INSTALL NAME**
6C0Q*1.0*1
7"BLD",7937,0)
8C0Q*1.0*1^QUALITY MEASURES^0^3120917^y
9"BLD",7937,1,0)
10^^291^291^3120917^
11"BLD",7937,1,1,0)
12ePrescribing MU measure in this package.
13"BLD",7937,1,2,0)
14
15"BLD",7937,1,3,0)
16Dependencies:
17"BLD",7937,1,4,0)
18This build requires C0P*1*4 for the new WebService entry that gets MU
19"BLD",7937,1,5,0)
20data from New Crop.
21"BLD",7937,1,6,0)
22This build requires the base C0Q 1.0 to be installed.
23"BLD",7937,1,7,0)
24
25"BLD",7937,1,8,0)
26This build performs the following:
27"BLD",7937,1,9,0)
28Routines:
29"BLD",7937,1,10,0)
301. Adds routine C0QMUERX for calculation of ePrescribing stats.
31"BLD",7937,1,11,0)
322. Mods routine C0QMU12 to call C0QMUERX for the ERX measure for
33"BLD",7937,1,12,0)
34Outpatients.
35"BLD",7937,1,13,0)
363. Mods routine C0QUPDT to handle the special case of ePrescribing stats.
37"BLD",7937,1,14,0)
38Also, some checks and quits so that we won't crash if no patient lists
39"BLD",7937,1,15,0)
40are associated with the measure.
41"BLD",7937,1,16,0)
42
43"BLD",7937,1,17,0)
44Data Dictionary:
45"BLD",7937,1,18,0)
461. File C0Q PARAMETER has two new indexes:
47"BLD",7937,1,19,0)
48 AMMS REGULAR
49"BLD",7937,1,20,0)
50 Field: EP MU MEASUREMENT SET (1130580001.401,2)
51"BLD",7937,1,21,0)
52 Description: Indexes the IEN of the Measurement Set. Used so that we can
53"BLD",7937,1,22,0)
54 walk back to a parameter when processing a specific IEN.
55"BLD",7937,1,23,0)
56
57"BLD",7937,1,24,0)
58 You can get the IEN of the measurement set using
59"BLD",7937,1,25,0)
60 $O(^C0Q(401,"AMMS",MSIEN,"")).
61"BLD",7937,1,26,0)
62 1)= S ^C0Q(401,"AMMS",$E(X,1,30),DA)=""
63"BLD",7937,1,27,0)
64 2)= K ^C0Q(401,"AMMS",$E(X,1,30),DA)
65"BLD",7937,1,28,0)
66 3)= USED BY THE CODE. SEE DESCRIPTION.
67"BLD",7937,1,29,0)
68
69"BLD",7937,1,30,0)
70 AQMS REGULAR
71"BLD",7937,1,31,0)
72 Field: EP QUALITY MEASUREMENT SET (1130580001.401,2.1)
73"BLD",7937,1,32,0)
74 Description: Indexes the IEN of the Measurement Set. Used so that we can
75"BLD",7937,1,33,0)
76 walk back to a parameter when processing a specific IEN.
77"BLD",7937,1,34,0)
78
79"BLD",7937,1,35,0)
80 You can get the IEN of the measurement set using
81"BLD",7937,1,36,0)
82 $O(^C0Q(401,"AQMS",MSIEN,"")).
83"BLD",7937,1,37,0)
84 1)= S ^C0Q(401,"AQMS",$E(X,1,30),DA)=""
85"BLD",7937,1,38,0)
86 2)= K ^C0Q(401,"AQMS",$E(X,1,30),DA)
87"BLD",7937,1,39,0)
88 3)= USED BY THE CODE. SEE DESCRIPTION.
89"BLD",7937,1,40,0)
90
91"BLD",7937,1,41,0)
922. File C0Q QUALITY MEASURE has a new field, MEASURE TYPE (#4):
93"BLD",7937,1,42,0)
94
95"BLD",7937,1,43,0)
961130580001.101,4MEASURE TYPE 0;5 SET
97"BLD",7937,1,44,0)
98
99"BLD",7937,1,45,0)
100 'P' FOR Performance;
101"BLD",7937,1,46,0)
102 'Q' FOR Quality;
103"BLD",7937,1,47,0)
104 'E' FOR Electronic Prescribing Performance;
105"BLD",7937,1,48,0)
106 LAST EDITED: MAY 30, 2012
107"BLD",7937,1,49,0)
108 HELP-PROMPT: Enter a code P, Q or E
109"BLD",7937,1,50,0)
110 DESCRIPTION: This field designates the measure type. It can
111"BLD",7937,1,51,0)
112 be P, Q or M.
113"BLD",7937,1,52,0)
114
115"BLD",7937,1,53,0)
116 P is for Performance. Performance measures are
117"BLD",7937,1,54,0)
118 MU measures to measure how meaningfully used an
119"BLD",7937,1,55,0)
120 EMR is. An example of a performance measure is
121"BLD",7937,1,56,0)
122 whether allergies are documented in the EMR.
123"BLD",7937,1,57,0)
124 Performance measures reference a Patient List
125"BLD",7937,1,58,0)
126 created by this package.
127"BLD",7937,1,59,0)
128
129"BLD",7937,1,60,0)
130 Q is for Quality Measures. Quality measures are
131"BLD",7937,1,61,0)
132 MU measures to assess how well the patients are
133"BLD",7937,1,62,0)
134 cared for. An example of a quality measure is
135"BLD",7937,1,63,0)
136 whether Hemoglobin A1c Poor Control. Quality
137"BLD",7937,1,64,0)
138 measures reference Patient Lists in the
139"BLD",7937,1,65,0)
140 Reminders package.
141"BLD",7937,1,66,0)
142
143"BLD",7937,1,67,0)
144 E is for Electronic Prescribing. This is a
145"BLD",7937,1,68,0)
146 Performance measure, except that it is handled
147"BLD",7937,1,69,0)
148 differently than the rest. Instead of the
149"BLD",7937,1,70,0)
150 numerators and denominators being lists of
151"BLD",7937,1,71,0)
152 patients as with all the other measurements,
153"BLD",7937,1,72,0)
154 they are a number of prescriptions. That's why
155"BLD",7937,1,73,0)
156 we have a special flag for it. It references a
157"BLD",7937,1,74,0)
158 Patient List created by this package. The
159"BLD",7937,1,75,0)
160 numerator and denominators are stored in
161"BLD",7937,1,76,0)
162 subfiles for each patient.
163"BLD",7937,1,77,0)
164
165"BLD",7937,1,78,0)
166 TECHNICAL DESCR: As of version C0P*1.0*1, the software doesn't
167"BLD",7937,1,79,0)
168 use this field except to check for an
169"BLD",7937,1,80,0)
170 electronic prescribing type (code E).
171"BLD",7937,1,81,0)
172
173"BLD",7937,1,82,0)
174 I anticipate using this field for other
175"BLD",7937,1,83,0)
176 purposes in the future.
177"BLD",7937,1,84,0)
178
179"BLD",7937,1,85,0)
180INPUT TEMPLATE:
181"BLD",7937,1,86,0)
182C0Q EDIT MU MEASURE adds the new field MEASURE TYPE mentioned above.
183"BLD",7937,1,87,0)
184
185"BLD",7937,1,88,0)
186DATA:
187"BLD",7937,1,89,0)
188The entry MU EP ERX for processing ePrescribing stats in C0Q QUALITY
189"BLD",7937,1,90,0)
190MEASURE is sent to destination sites.
191"BLD",7937,1,91,0)
192
193"BLD",7937,1,92,0)
194Implementation Steps:
195"BLD",7937,1,93,0)
1961. If you don't have New Crop eRx installed, there won't be any effects.
197"BLD",7937,1,94,0)
198The C0Q code will behave like before.
199"BLD",7937,1,95,0)
2002. If you don't have C0P*1.0*4 installed, again, the C0Q code will behave
201"BLD",7937,1,96,0)
202as before the patch.
203"BLD",7937,1,97,0)
2043. Once you install C0P*1.0*4 with this patch (C0Q*1.0*1), the code will
205"BLD",7937,1,98,0)
206loop through all Outpatients who have an ERx. The actual patients are
207"BLD",7937,1,99,0)
208determined via your outpatient parameters. If your parameters reference a
209"BLD",7937,1,100,0)
210clinic location that already has patients with ERxs, you don't need to do
211"BLD",7937,1,101,0)
212anything to make the code run. It will run automatically; and it's time
213"BLD",7937,1,102,0)
214consuming; before you run it though, make sure to do #4.
215"BLD",7937,1,103,0)
2164. In order for you to see a print out of the eRx measures, you
217"BLD",7937,1,104,0)
218need to add the Measure MU EP ERX to the Measure Set used in the EP MU
219"BLD",7937,1,105,0)
220MEASUREMENT SET field in your Outpatient Parameters. You must do this
221"BLD",7937,1,106,0)
222before you run this for the first time.
223"BLD",7937,1,107,0)
224
225"BLD",7937,1,108,0)
226Example of Set-up:
227"BLD",7937,1,109,0)
228
229"BLD",7937,1,110,0)
230Select QUALITY MEASUREMENT MENU Option: ?
231"BLD",7937,1,111,0)
232
233"BLD",7937,1,112,0)
234 COPY OVER PATIENT LISTS
235"BLD",7937,1,113,0)
236 ED-1 COMPUTATION
237"BLD",7937,1,114,0)
238 ED-2 COMPUTATION
239"BLD",7937,1,115,0)
240 EP UPDATE MU MEASURES
241"BLD",7937,1,116,0)
242 INP UPDATE MU MEASURES
243"BLD",7937,1,117,0)
244 PQRI MENU ...
245"BLD",7937,1,118,0)
246 PQRI PRINT XML
247"BLD",7937,1,119,0)
248 PRINT C0Q MEASURES
249"BLD",7937,1,120,0)
250 QRDA MENU ...
251"BLD",7937,1,121,0)
252 SETUP QUALITY REPORTING ...
253"BLD",7937,1,122,0)
254
255"BLD",7937,1,123,0)
256Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
257"BLD",7937,1,124,0)
258text.
259"BLD",7937,1,125,0)
260
261"BLD",7937,1,126,0)
262Select QUALITY MEASUREMENT MENU Option: setUP QUALITY REPORTING
263"BLD",7937,1,127,0)
264
265"BLD",7937,1,128,0)
266Select SETUP QUALITY REPORTING Option: ?
267"BLD",7937,1,129,0)
268
269"BLD",7937,1,130,0)
270 DISPLAY QUALITY MEASURES
271"BLD",7937,1,131,0)
272 EDIT SUPERUSERS
273"BLD",7937,1,132,0)
274 EP EDIT PARMS
275"BLD",7937,1,133,0)
276 INP EDIT PARMS
277"BLD",7937,1,134,0)
278 MEASURE SET EDIT
279"BLD",7937,1,135,0)
280 MU MEASURE EDIT
281"BLD",7937,1,136,0)
282 QUALITY MEASURE EDIT
283"BLD",7937,1,137,0)
284
285"BLD",7937,1,138,0)
286Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
287"BLD",7937,1,139,0)
288text.
289"BLD",7937,1,140,0)
290
291"BLD",7937,1,141,0)
292Select SETUP QUALITY REPORTING Option: ep edit PARMS
293"BLD",7937,1,142,0)
294
295"BLD",7937,1,143,0)
296Select C0Q PARAMETER NAME: OUTPATIENT
297"BLD",7937,1,144,0)
298NAME: OUTPATIENT//
299"BLD",7937,1,145,0)
300MEASUREMENT PERIOD KEY: MU12//
301"BLD",7937,1,146,0)
302PARAMETER TYPE: OUTPATIENT//
303"BLD",7937,1,147,0)
304EP MU MEASUREMENT SET: OUTPATIENT MEASURE SET//
305"BLD",7937,1,148,0)
306EP QUALITY MEASUREMENT SET:
307"BLD",7937,1,149,0)
308Select CLINIC: DR OFFICE//
309"BLD",7937,1,150,0)
310PATIENT LIST LABEL:
311"BLD",7937,1,151,0)
312Select SUBSCRIBER:
313"BLD",7937,1,152,0)
314
315"BLD",7937,1,153,0)
316Select C0Q PARAMETER NAME:
317"BLD",7937,1,154,0)
318
319"BLD",7937,1,155,0)
320Select SETUP QUALITY REPORTING Option: measure set EDIT
321"BLD",7937,1,156,0)
322
323"BLD",7937,1,157,0)
324Select C0Q MEASUREMENT SET NAME: outpaTIENT MEASURE SET
325"BLD",7937,1,158,0)
326NAME: OUTPATIENT MEASURE SET Replace
327"BLD",7937,1,159,0)
328BEGIN DATE: JUN 12,2001//
329"BLD",7937,1,160,0)
330END DATE: MAY 25,2012//
331"BLD",7937,1,161,0)
332LOCKED:
333"BLD",7937,1,162,0)
334MU YEAR KEY: MU12//
335"BLD",7937,1,163,0)
336QRDA TEMPLATE ROOT:
337"BLD",7937,1,164,0)
338Select MEASURE: MU EP ERX//
339"BLD",7937,1,165,0)
340 MEASURE: MU EP ERX//
341"BLD",7937,1,166,0)
342 NUMERATOR FILTER LIST:
343"BLD",7937,1,167,0)
344 DENOMINATOR FILTER LIST:
345"BLD",7937,1,168,0)
346Select MEASURE:
347"BLD",7937,1,169,0)
348
349"BLD",7937,1,170,0)
350Select C0Q MEASUREMENT SET NAME:
351"BLD",7937,1,171,0)
352
353"BLD",7937,1,172,0)
354Select SETUP QUALITY REPORTING Option:
355"BLD",7937,1,173,0)
356
357"BLD",7937,1,174,0)
358Select QUALITY MEASUREMENT MENU Option: ?
359"BLD",7937,1,175,0)
360
361"BLD",7937,1,176,0)
362 COPY OVER PATIENT LISTS
363"BLD",7937,1,177,0)
364 ED-1 COMPUTATION
365"BLD",7937,1,178,0)
366 ED-2 COMPUTATION
367"BLD",7937,1,179,0)
368 EP UPDATE MU MEASURES
369"BLD",7937,1,180,0)
370 INP UPDATE MU MEASURES
371"BLD",7937,1,181,0)
372 PQRI MENU ...
373"BLD",7937,1,182,0)
374 PQRI PRINT XML
375"BLD",7937,1,183,0)
376 PRINT C0Q MEASURES
377"BLD",7937,1,184,0)
378 QRDA MENU ...
379"BLD",7937,1,185,0)
380 SETUP QUALITY REPORTING ...
381"BLD",7937,1,186,0)
382
383"BLD",7937,1,187,0)
384Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
385"BLD",7937,1,188,0)
386text.
387"BLD",7937,1,189,0)
388
389"BLD",7937,1,190,0)
390Select QUALITY MEASUREMENT MENU Option: ep updATE MU MEASURES
391"BLD",7937,1,191,0)
392Sep 16, 2012@86:54:61
393"BLD",7937,1,192,0)
394Jan 03, 2008@80:85:41
395"BLD",7937,1,193,0)
396Jan 01, 2008@81:59:42
397"BLD",7937,1,194,0)
398Nov 25, 2005@86:89:76
399"BLD",7937,1,195,0)
400Nov 25, 2005@85:87:58
401"BLD",7937,1,196,0)
402Nov 24, 2005@79:68:87
403"BLD",7937,1,197,0)
404Aug 01, 2005@91:59:64
405"BLD",7937,1,198,0)
406Aug 2005@84:91:51
407"BLD",7937,1,199,0)
408Aug 2005@84:78:82
409"BLD",7937,1,200,0)
410Jul 28, 2005@88:55:64
411"BLD",7937,1,201,0)
412Jul 28, 2005@88:46:85
413"BLD",7937,1,202,0)
414Jul 28, 2005@87:95:55
415"BLD",7937,1,203,0)
416Jul 27, 2005@87:79:80
417"BLD",7937,1,204,0)
418Jul 27, 2005@83:83:97
419"BLD",7937,1,205,0)
420Jul 26, 2005@88:78:96
421"BLD",7937,1,206,0)
422Jul 26, 2005@88:75:45
423"BLD",7937,1,207,0)
424Jul 26, 2005@88:58:60
425"BLD",7937,1,208,0)
426Jul 26, 2005@88:52:62
427"BLD",7937,1,209,0)
428Jul 26, 2005@88:50:59
429"BLD",7937,1,210,0)
430Jul 26, 2005@88:49:74
431"BLD",7937,1,211,0)
432Jul 26, 2005@84:54:55
433"BLD",7937,1,212,0)
434Jul 24, 2005@91:62:76
435"BLD",7937,1,213,0)
436Jul 23, 2005@88:98:45
437"BLD",7937,1,214,0)
438Jul 23, 2005@85:77:89
439"BLD",7937,1,215,0)
440Jul 23, 2005@83:77:71
441"BLD",7937,1,216,0)
442Jul 23, 2005@82:82:99
443"BLD",7937,1,217,0)
444Jul 23, 2005@82:66:61
445"BLD",7937,1,218,0)
446Jul 22, 2005@83:85:46
447"BLD",7937,1,219,0)
448Jul 22, 2005@82:82:92
449"BLD",7937,1,220,0)
450Jul 22, 2005@82:75:99
451"BLD",7937,1,221,0)
452Jul 21, 2005@89:50:71
453"BLD",7937,1,222,0)
454Jul 21, 2005@83:53:48
455"BLD",7937,1,223,0)
456Jul 20, 2005@91:43:44
457"BLD",7937,1,224,0)
458Jul 20, 2005@87:89:46
459"BLD",7937,1,225,0)
460Jul 20, 2005@84:60:78
461"BLD",7937,1,226,0)
462Jul 20, 2005@84:60:71
463"BLD",7937,1,227,0)
464Jul 19, 2005@89:92:54
465"BLD",7937,1,228,0)
466Jul 19, 2005@89:55:97
467"BLD",7937,1,229,0)
468Jul 18, 2005@92:58:51
469"BLD",7937,1,230,0)
470Jul 18, 2005@91:47:87
471"BLD",7937,1,231,0)
472Jul 18, 2005@88:67:86
473"BLD",7937,1,232,0)
474Jul 18, 2005@88:63:92
475"BLD",7937,1,233,0)
476Jul 18, 2005@86:64:88
477"BLD",7937,1,234,0)
478Jul 18, 2005@84:56:82
479"BLD",7937,1,235,0)
480Jul 18, 2005@84:45:52
481"BLD",7937,1,236,0)
482Jul 17, 2005@82:42:51
483"BLD",7937,1,237,0)
484Jul 14, 2005@84:00
485"BLD",7937,1,238,0)
486Jul 07, 2005@86:97
487"BLD",7937,1,239,0)
488Jul 2005@85:62:77B index passed
489"BLD",7937,1,240,0)
4904
491"BLD",7937,1,241,0)
492Calling GETMEDS6 SOAP Web Service Call for 4
493"BLD",7937,1,242,0)
494Patient 4 Rx 1
495"BLD",7937,1,243,0)
496DeaClassCode: 0
497"BLD",7937,1,244,0)
498PharmacyType: 1
499"BLD",7937,1,245,0)
500PharmacyDetailType: 1
501"BLD",7937,1,246,0)
502FinalDestinationType: 2
503"BLD",7937,1,247,0)
504FinalStatusType: 2
505"BLD",7937,1,248,0)
506Patient 4 Rx 2
507"BLD",7937,1,249,0)
508DeaClassCode: 0
509"BLD",7937,1,250,0)
510PharmacyType: 0
511"BLD",7937,1,251,0)
512Patient 4 Rx 3
513"BLD",7937,1,252,0)
514DeaClassCode: 0
515"BLD",7937,1,253,0)
516PharmacyType: 1
517"BLD",7937,1,254,0)
518PharmacyDetailType: 1
519"BLD",7937,1,255,0)
520FinalDestinationType: 2
521"BLD",7937,1,256,0)
522FinalStatusType: 2
523"BLD",7937,1,257,0)
524Patient 4 Rx 4
525"BLD",7937,1,258,0)
526DeaClassCode: 0
527"BLD",7937,1,259,0)
528PharmacyType: 0
529"BLD",7937,1,260,0)
530IENs ?+14,1,17, ready to file
531"BLD",7937,1,261,0)
532Saving ERXDEN of 0 for Patient MOUSE,MICKEY (4)
533"BLD",7937,1,262,0)
534Fileman Data Array
535"BLD",7937,1,263,0)
536C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXDEN
537"BLD",7937,1,264,0)
538C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0
539"BLD",7937,1,265,0)
540Patient 4 Rx 1
541"BLD",7937,1,266,0)
542DeaClassCode: 0
543"BLD",7937,1,267,0)
544PharmacyType: 1
545"BLD",7937,1,268,0)
546PharmacyDetailType: 1
547"BLD",7937,1,269,0)
548FinalDestinationType: 2
549"BLD",7937,1,270,0)
550Patient 4 Rx 2
551"BLD",7937,1,271,0)
552DeaClassCode: 0
553"BLD",7937,1,272,0)
554PharmacyType: 0
555"BLD",7937,1,273,0)
556Patient 4 Rx 3
557"BLD",7937,1,274,0)
558DeaClassCode: 0
559"BLD",7937,1,275,0)
560PharmacyType: 1
561"BLD",7937,1,276,0)
562PharmacyDetailType: 1
563"BLD",7937,1,277,0)
564FinalDestinationType: 2
565"BLD",7937,1,278,0)
566Patient 4 Rx 4
567"BLD",7937,1,279,0)
568DeaClassCode: 0
569"BLD",7937,1,280,0)
570PharmacyType: 0
571"BLD",7937,1,281,0)
572IENs ?+14,1,17, ready to file
573"BLD",7937,1,282,0)
574Saving ERXNUM of 0 for Patient MOUSE,MICKEY (4)
575"BLD",7937,1,283,0)
576Fileman Data Array
577"BLD",7937,1,284,0)
578C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXNUM
579"BLD",7937,1,285,0)
580C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0
581"BLD",7937,1,286,0)
582C0QFDA(1130580001.2011,"1,7,",3)=100
583"BLD",7937,1,287,0)
584Processing E-Prescribing Counts
585"BLD",7937,1,288,0)
586DFN Denominator Numerator
587"BLD",7937,1,289,0)
5884 0 0
589"BLD",7937,1,290,0)
590 === ===
591"BLD",7937,1,291,0)
592 0 0
593"BLD",7937,4,0)
594^9.64PA^1130580001.101^2
595"BLD",7937,4,1130580001.101,0)
5961130580001.101
597"BLD",7937,4,1130580001.101,222)
598y^y^f^^n^^y^o^n
599"BLD",7937,4,1130580001.101,224)
600I $P(^(0),U)="MU EP ERX"
601"BLD",7937,4,1130580001.401,0)
6021130580001.401
603"BLD",7937,4,1130580001.401,2,0)
604^9.641^1130580001.401^1
605"BLD",7937,4,1130580001.401,2,1130580001.401,0)
606C0Q PARAMETER (File-top level)
607"BLD",7937,4,1130580001.401,2,1130580001.401,1,0)
608^9.6411^2.1^2
609"BLD",7937,4,1130580001.401,2,1130580001.401,1,2,0)
610EP MU MEASUREMENT SET
611"BLD",7937,4,1130580001.401,2,1130580001.401,1,2.1,0)
612EP QUALITY MEASUREMENT SET
613"BLD",7937,4,1130580001.401,222)
614y^n^p^^^^n^^n
615"BLD",7937,4,1130580001.401,224)
616
617"BLD",7937,4,"APDD",1130580001.401,1130580001.401)
618
619"BLD",7937,4,"APDD",1130580001.401,1130580001.401,2)
620
621"BLD",7937,4,"APDD",1130580001.401,1130580001.401,2.1)
622
623"BLD",7937,4,"B",1130580001.101,1130580001.101)
624
625"BLD",7937,4,"B",1130580001.401,1130580001.401)
626
627"BLD",7937,6.3)
62832
629"BLD",7937,"ABPKG")
630n
631"BLD",7937,"INIT")
632POST^C0Q1P1
633"BLD",7937,"KRN",0)
634^9.67PA^779.2^20
635"BLD",7937,"KRN",.4,0)
636.4
637"BLD",7937,"KRN",.4,"NM",0)
638^9.68A^^0
639"BLD",7937,"KRN",.401,0)
640.401
641"BLD",7937,"KRN",.401,"NM",0)
642^9.68A^^
643"BLD",7937,"KRN",.402,0)
644.402
645"BLD",7937,"KRN",.402,"NM",0)
646^9.68A^1^1
647"BLD",7937,"KRN",.402,"NM",1,0)
648C0Q EDIT MU MEASURE FILE #1130580001.101^1130580001.101^0
649"BLD",7937,"KRN",.402,"NM","B","C0Q EDIT MU MEASURE FILE #1130580001.101",1)
650
651"BLD",7937,"KRN",.403,0)
652.403
653"BLD",7937,"KRN",.5,0)
654.5
655"BLD",7937,"KRN",.84,0)
656.84
657"BLD",7937,"KRN",3.6,0)
6583.6
659"BLD",7937,"KRN",3.8,0)
6603.8
661"BLD",7937,"KRN",9.2,0)
6629.2
663"BLD",7937,"KRN",9.8,0)
6649.8
665"BLD",7937,"KRN",9.8,"NM",0)
666^9.68A^3^3
667"BLD",7937,"KRN",9.8,"NM",1,0)
668C0QMUERX^^0^B83723794
669"BLD",7937,"KRN",9.8,"NM",2,0)
670C0QUPDT^^0^B78393601
671"BLD",7937,"KRN",9.8,"NM",3,0)
672C0QMU12^^0^B266254568
673"BLD",7937,"KRN",9.8,"NM","B","C0QMU12",3)
674
675"BLD",7937,"KRN",9.8,"NM","B","C0QMUERX",1)
676
677"BLD",7937,"KRN",9.8,"NM","B","C0QUPDT",2)
678
679"BLD",7937,"KRN",19,0)
68019
681"BLD",7937,"KRN",19,"NM",0)
682^9.68A^^0
683"BLD",7937,"KRN",19.1,0)
68419.1
685"BLD",7937,"KRN",101,0)
686101
687"BLD",7937,"KRN",409.61,0)
688409.61
689"BLD",7937,"KRN",771,0)
690771
691"BLD",7937,"KRN",779.2,0)
692779.2
693"BLD",7937,"KRN",870,0)
694870
695"BLD",7937,"KRN",8989.51,0)
6968989.51
697"BLD",7937,"KRN",8989.52,0)
6988989.52
699"BLD",7937,"KRN",8994,0)
7008994
701"BLD",7937,"KRN","B",.4,.4)
702
703"BLD",7937,"KRN","B",.401,.401)
704
705"BLD",7937,"KRN","B",.402,.402)
706
707"BLD",7937,"KRN","B",.403,.403)
708
709"BLD",7937,"KRN","B",.5,.5)
710
711"BLD",7937,"KRN","B",.84,.84)
712
713"BLD",7937,"KRN","B",3.6,3.6)
714
715"BLD",7937,"KRN","B",3.8,3.8)
716
717"BLD",7937,"KRN","B",9.2,9.2)
718
719"BLD",7937,"KRN","B",9.8,9.8)
720
721"BLD",7937,"KRN","B",19,19)
722
723"BLD",7937,"KRN","B",19.1,19.1)
724
725"BLD",7937,"KRN","B",101,101)
726
727"BLD",7937,"KRN","B",409.61,409.61)
728
729"BLD",7937,"KRN","B",771,771)
730
731"BLD",7937,"KRN","B",779.2,779.2)
732
733"BLD",7937,"KRN","B",870,870)
734
735"BLD",7937,"KRN","B",8989.51,8989.51)
736
737"BLD",7937,"KRN","B",8989.52,8989.52)
738
739"BLD",7937,"KRN","B",8994,8994)
740
741"BLD",7937,"QDEF")
742^^^^NO^^^^NO^^NO
743"BLD",7937,"QUES",0)
744^9.62^^
745"BLD",7937,"REQB",0)
746^9.611^1^1
747"BLD",7937,"REQB",1,0)
748QUALITY MEASURES 1.0^2
749"BLD",7937,"REQB","B","QUALITY MEASURES 1.0",1)
750
751"DATA",1130580001.101,104,0)
752MU EP ERX^^^^E
753"DATA",1130580001.101,104,1)
754More than 40% of all permissible prescriptions written by the EP are transmitted electronically using certified EHR technology.
755"DATA",1130580001.101,104,5)
756Eligibile Prescriptions transmitted electronically
757"DATA",1130580001.101,104,6,0)
758^1130580001.111^6^6^3120614^^^
759"DATA",1130580001.101,104,6,1,0)
760Final Rule Text: § 170.304(b).
761"DATA",1130580001.101,104,6,2,0)
762Electronic prescribing. Enable a user to electronically generate
763"DATA",1130580001.101,104,6,3,0)
764and transmit prescriptions and prescription-related information
765"DATA",1130580001.101,104,6,4,0)
766in accordance with:
767"DATA",1130580001.101,104,6,5,0)
768(1) The standard specified in § 170.205(b)(1) or § 170.205(b)(2); and
769"DATA",1130580001.101,104,6,6,0)
770(2) The standard specified in 170.207(d).
771"DATA",1130580001.101,104,7)
772^^^^^MU12
773"FIA",1130580001.101)
774C0Q QUALITY MEASURE
775"FIA",1130580001.101,0)
776^C0Q(101,
777"FIA",1130580001.101,0,0)
7781130580001.101I
779"FIA",1130580001.101,0,1)
780y^y^f^^n^^y^o^n
781"FIA",1130580001.101,0,10)
782
783"FIA",1130580001.101,0,11)
784I $P(^(0),U)="MU EP ERX"
785"FIA",1130580001.101,0,"RLRO")
786
787"FIA",1130580001.101,0,"VR")
7881.0^C0Q
789"FIA",1130580001.101,1130580001.101)
7900
791"FIA",1130580001.101,1130580001.111)
7920
793"FIA",1130580001.401)
794C0Q PARAMETER
795"FIA",1130580001.401,0)
796^C0Q(401,
797"FIA",1130580001.401,0,0)
7981130580001.401
799"FIA",1130580001.401,0,1)
800y^n^p^^^^n^^n
801"FIA",1130580001.401,0,10)
802
803"FIA",1130580001.401,0,11)
804
805"FIA",1130580001.401,0,"RLRO")
806
807"FIA",1130580001.401,0,"VR")
8081.0^C0Q
809"FIA",1130580001.401,1130580001.401)
8101
811"FIA",1130580001.401,1130580001.401,2)
812
813"FIA",1130580001.401,1130580001.401,2.1)
814
815"INIT")
816POST^C0Q1P1
817"IX",1130580001.101,1130580001.101,"B",0)
8181130580001.101^B^New-Style B Index. Will be used as part of the key.^R^^F^IR^I^1130580001.101^^^^^LS
819"IX",1130580001.101,1130580001.101,"B",1)
820S ^C0Q(101,"B",$E(X,1,30),DA)=""
821"IX",1130580001.101,1130580001.101,"B",2)
822K ^C0Q(101,"B",$E(X,1,30),DA)
823"IX",1130580001.101,1130580001.101,"B",2.5)
824K ^C0Q(101,"B")
825"IX",1130580001.101,1130580001.101,"B",11.1,0)
826^.114IA^1^1
827"IX",1130580001.101,1130580001.101,"B",11.1,1,0)
8281^F^1130580001.101^.01^30^1^F
829"IX",1130580001.101,1130580001.101,"MU",0)
8301130580001.101^MU^MEANINGFUL USE YEAR KEY^R^^F^IR^I^1130580001.101^^^^^LS
831"IX",1130580001.101,1130580001.101,"MU",1)
832S ^C0Q(101,"MU",$E(X,1,30),DA)=""
833"IX",1130580001.101,1130580001.101,"MU",2)
834K ^C0Q(101,"MU",$E(X,1,30),DA)
835"IX",1130580001.101,1130580001.101,"MU",2.5)
836K ^C0Q(101,"MU")
837"IX",1130580001.101,1130580001.101,"MU",11.1,0)
838^.114IA^1^1
839"IX",1130580001.101,1130580001.101,"MU",11.1,1,0)
8401^F^1130580001.101^.3^30^1^F
841"KEY",1130580001.101,1130580001.101,"A",0)
8421130580001.101^A^P^739
843"KEY",1130580001.101,1130580001.101,"A",2,0)
844^.312IA^1^1
845"KEY",1130580001.101,1130580001.101,"A",2,1,0)
846.01^1130580001.101^1
847"KEYPTR",1130580001.101,1130580001.101,"A")
8481130580001.101^B
849"KRN",.402,1746,-1)
8500^1
851"KRN",.402,1746,0)
852C0Q EDIT MU MEASURE^3120917.1335^@^1130580001.101^^@^3120614
853"KRN",.402,1746,"DR",1,1130580001.101)
854.01;4;.3;.5;.61;.7;.8;1.1;2.1;
855"MBREQ")
8560
857"ORD",7,.402)
858.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,"",%)
859"ORD",7,.402,0)
860INPUT TEMPLATE
861"PKG",213,-1)
8621^1
863"PKG",213,0)
864QUALITY MEASURES^C0Q^Tracks and Prints Quality Measures
865"PKG",213,20,0)
866^9.402P^^
867"PKG",213,22,0)
868^9.49I^1^1
869"PKG",213,22,1,0)
8701.0^3120731^3120614^8
871"PKG",213,22,1,"PAH",1,0)
8721^3120917
873"PKG",213,22,1,"PAH",1,1,0)
874^^291^291^3120917
875"PKG",213,22,1,"PAH",1,1,1,0)
876ePrescribing MU measure in this package.
877"PKG",213,22,1,"PAH",1,1,2,0)
878
879"PKG",213,22,1,"PAH",1,1,3,0)
880Dependencies:
881"PKG",213,22,1,"PAH",1,1,4,0)
882This build requires C0P*1*4 for the new WebService entry that gets MU
883"PKG",213,22,1,"PAH",1,1,5,0)
884data from New Crop.
885"PKG",213,22,1,"PAH",1,1,6,0)
886This build requires the base C0Q 1.0 to be installed.
887"PKG",213,22,1,"PAH",1,1,7,0)
888
889"PKG",213,22,1,"PAH",1,1,8,0)
890This build performs the following:
891"PKG",213,22,1,"PAH",1,1,9,0)
892Routines:
893"PKG",213,22,1,"PAH",1,1,10,0)
8941. Adds routine C0QMUERX for calculation of ePrescribing stats.
895"PKG",213,22,1,"PAH",1,1,11,0)
8962. Mods routine C0QMU12 to call C0QMUERX for the ERX measure for
897"PKG",213,22,1,"PAH",1,1,12,0)
898Outpatients.
899"PKG",213,22,1,"PAH",1,1,13,0)
9003. Mods routine C0QUPDT to handle the special case of ePrescribing stats.
901"PKG",213,22,1,"PAH",1,1,14,0)
902Also, some checks and quits so that we won't crash if no patient lists
903"PKG",213,22,1,"PAH",1,1,15,0)
904are associated with the measure.
905"PKG",213,22,1,"PAH",1,1,16,0)
906
907"PKG",213,22,1,"PAH",1,1,17,0)
908Data Dictionary:
909"PKG",213,22,1,"PAH",1,1,18,0)
9101. File C0Q PARAMETER has two new indexes:
911"PKG",213,22,1,"PAH",1,1,19,0)
912 AMMS REGULAR
913"PKG",213,22,1,"PAH",1,1,20,0)
914 Field: EP MU MEASUREMENT SET (1130580001.401,2)
915"PKG",213,22,1,"PAH",1,1,21,0)
916 Description: Indexes the IEN of the Measurement Set. Used so that we can
917"PKG",213,22,1,"PAH",1,1,22,0)
918 walk back to a parameter when processing a specific IEN.
919"PKG",213,22,1,"PAH",1,1,23,0)
920
921"PKG",213,22,1,"PAH",1,1,24,0)
922 You can get the IEN of the measurement set using
923"PKG",213,22,1,"PAH",1,1,25,0)
924 $O(^C0Q(401,"AMMS",MSIEN,"")).
925"PKG",213,22,1,"PAH",1,1,26,0)
926 1)= S ^C0Q(401,"AMMS",$E(X,1,30),DA)=""
927"PKG",213,22,1,"PAH",1,1,27,0)
928 2)= K ^C0Q(401,"AMMS",$E(X,1,30),DA)
929"PKG",213,22,1,"PAH",1,1,28,0)
930 3)= USED BY THE CODE. SEE DESCRIPTION.
931"PKG",213,22,1,"PAH",1,1,29,0)
932
933"PKG",213,22,1,"PAH",1,1,30,0)
934 AQMS REGULAR
935"PKG",213,22,1,"PAH",1,1,31,0)
936 Field: EP QUALITY MEASUREMENT SET (1130580001.401,2.1)
937"PKG",213,22,1,"PAH",1,1,32,0)
938 Description: Indexes the IEN of the Measurement Set. Used so that we can
939"PKG",213,22,1,"PAH",1,1,33,0)
940 walk back to a parameter when processing a specific IEN.
941"PKG",213,22,1,"PAH",1,1,34,0)
942
943"PKG",213,22,1,"PAH",1,1,35,0)
944 You can get the IEN of the measurement set using
945"PKG",213,22,1,"PAH",1,1,36,0)
946 $O(^C0Q(401,"AQMS",MSIEN,"")).
947"PKG",213,22,1,"PAH",1,1,37,0)
948 1)= S ^C0Q(401,"AQMS",$E(X,1,30),DA)=""
949"PKG",213,22,1,"PAH",1,1,38,0)
950 2)= K ^C0Q(401,"AQMS",$E(X,1,30),DA)
951"PKG",213,22,1,"PAH",1,1,39,0)
952 3)= USED BY THE CODE. SEE DESCRIPTION.
953"PKG",213,22,1,"PAH",1,1,40,0)
954
955"PKG",213,22,1,"PAH",1,1,41,0)
9562. File C0Q QUALITY MEASURE has a new field, MEASURE TYPE (#4):
957"PKG",213,22,1,"PAH",1,1,42,0)
958
959"PKG",213,22,1,"PAH",1,1,43,0)
9601130580001.101,4MEASURE TYPE 0;5 SET
961"PKG",213,22,1,"PAH",1,1,44,0)
962
963"PKG",213,22,1,"PAH",1,1,45,0)
964 'P' FOR Performance;
965"PKG",213,22,1,"PAH",1,1,46,0)
966 'Q' FOR Quality;
967"PKG",213,22,1,"PAH",1,1,47,0)
968 'E' FOR Electronic Prescribing Performance;
969"PKG",213,22,1,"PAH",1,1,48,0)
970 LAST EDITED: MAY 30, 2012
971"PKG",213,22,1,"PAH",1,1,49,0)
972 HELP-PROMPT: Enter a code P, Q or E
973"PKG",213,22,1,"PAH",1,1,50,0)
974 DESCRIPTION: This field designates the measure type. It can
975"PKG",213,22,1,"PAH",1,1,51,0)
976 be P, Q or M.
977"PKG",213,22,1,"PAH",1,1,52,0)
978
979"PKG",213,22,1,"PAH",1,1,53,0)
980 P is for Performance. Performance measures are
981"PKG",213,22,1,"PAH",1,1,54,0)
982 MU measures to measure how meaningfully used an
983"PKG",213,22,1,"PAH",1,1,55,0)
984 EMR is. An example of a performance measure is
985"PKG",213,22,1,"PAH",1,1,56,0)
986 whether allergies are documented in the EMR.
987"PKG",213,22,1,"PAH",1,1,57,0)
988 Performance measures reference a Patient List
989"PKG",213,22,1,"PAH",1,1,58,0)
990 created by this package.
991"PKG",213,22,1,"PAH",1,1,59,0)
992
993"PKG",213,22,1,"PAH",1,1,60,0)
994 Q is for Quality Measures. Quality measures are
995"PKG",213,22,1,"PAH",1,1,61,0)
996 MU measures to assess how well the patients are
997"PKG",213,22,1,"PAH",1,1,62,0)
998 cared for. An example of a quality measure is
999"PKG",213,22,1,"PAH",1,1,63,0)
1000 whether Hemoglobin A1c Poor Control. Quality
1001"PKG",213,22,1,"PAH",1,1,64,0)
1002 measures reference Patient Lists in the
1003"PKG",213,22,1,"PAH",1,1,65,0)
1004 Reminders package.
1005"PKG",213,22,1,"PAH",1,1,66,0)
1006
1007"PKG",213,22,1,"PAH",1,1,67,0)
1008 E is for Electronic Prescribing. This is a
1009"PKG",213,22,1,"PAH",1,1,68,0)
1010 Performance measure, except that it is handled
1011"PKG",213,22,1,"PAH",1,1,69,0)
1012 differently than the rest. Instead of the
1013"PKG",213,22,1,"PAH",1,1,70,0)
1014 numerators and denominators being lists of
1015"PKG",213,22,1,"PAH",1,1,71,0)
1016 patients as with all the other measurements,
1017"PKG",213,22,1,"PAH",1,1,72,0)
1018 they are a number of prescriptions. That's why
1019"PKG",213,22,1,"PAH",1,1,73,0)
1020 we have a special flag for it. It references a
1021"PKG",213,22,1,"PAH",1,1,74,0)
1022 Patient List created by this package. The
1023"PKG",213,22,1,"PAH",1,1,75,0)
1024 numerator and denominators are stored in
1025"PKG",213,22,1,"PAH",1,1,76,0)
1026 subfiles for each patient.
1027"PKG",213,22,1,"PAH",1,1,77,0)
1028
1029"PKG",213,22,1,"PAH",1,1,78,0)
1030 TECHNICAL DESCR: As of version C0P*1.0*1, the software doesn't
1031"PKG",213,22,1,"PAH",1,1,79,0)
1032 use this field except to check for an
1033"PKG",213,22,1,"PAH",1,1,80,0)
1034 electronic prescribing type (code E).
1035"PKG",213,22,1,"PAH",1,1,81,0)
1036
1037"PKG",213,22,1,"PAH",1,1,82,0)
1038 I anticipate using this field for other
1039"PKG",213,22,1,"PAH",1,1,83,0)
1040 purposes in the future.
1041"PKG",213,22,1,"PAH",1,1,84,0)
1042
1043"PKG",213,22,1,"PAH",1,1,85,0)
1044INPUT TEMPLATE:
1045"PKG",213,22,1,"PAH",1,1,86,0)
1046C0Q EDIT MU MEASURE adds the new field MEASURE TYPE mentioned above.
1047"PKG",213,22,1,"PAH",1,1,87,0)
1048
1049"PKG",213,22,1,"PAH",1,1,88,0)
1050DATA:
1051"PKG",213,22,1,"PAH",1,1,89,0)
1052The entry MU EP ERX for processing ePrescribing stats in C0Q QUALITY
1053"PKG",213,22,1,"PAH",1,1,90,0)
1054MEASURE is sent to destination sites.
1055"PKG",213,22,1,"PAH",1,1,91,0)
1056
1057"PKG",213,22,1,"PAH",1,1,92,0)
1058Implementation Steps:
1059"PKG",213,22,1,"PAH",1,1,93,0)
10601. If you don't have New Crop eRx installed, there won't be any effects.
1061"PKG",213,22,1,"PAH",1,1,94,0)
1062The C0Q code will behave like before.
1063"PKG",213,22,1,"PAH",1,1,95,0)
10642. If you don't have C0P*1.0*4 installed, again, the C0Q code will behave
1065"PKG",213,22,1,"PAH",1,1,96,0)
1066as before the patch.
1067"PKG",213,22,1,"PAH",1,1,97,0)
10683. Once you install C0P*1.0*4 with this patch (C0Q*1.0*1), the code will
1069"PKG",213,22,1,"PAH",1,1,98,0)
1070loop through all Outpatients who have an ERx. The actual patients are
1071"PKG",213,22,1,"PAH",1,1,99,0)
1072determined via your outpatient parameters. If your parameters reference a
1073"PKG",213,22,1,"PAH",1,1,100,0)
1074clinic location that already has patients with ERxs, you don't need to do
1075"PKG",213,22,1,"PAH",1,1,101,0)
1076anything to make the code run. It will run automatically; and it's time
1077"PKG",213,22,1,"PAH",1,1,102,0)
1078consuming; before you run it though, make sure to do #4.
1079"PKG",213,22,1,"PAH",1,1,103,0)
10804. In order for you to see a print out of the eRx measures, you
1081"PKG",213,22,1,"PAH",1,1,104,0)
1082need to add the Measure MU EP ERX to the Measure Set used in the EP MU
1083"PKG",213,22,1,"PAH",1,1,105,0)
1084MEASUREMENT SET field in your Outpatient Parameters. You must do this
1085"PKG",213,22,1,"PAH",1,1,106,0)
1086before you run this for the first time.
1087"PKG",213,22,1,"PAH",1,1,107,0)
1088
1089"PKG",213,22,1,"PAH",1,1,108,0)
1090Example of Set-up:
1091"PKG",213,22,1,"PAH",1,1,109,0)
1092
1093"PKG",213,22,1,"PAH",1,1,110,0)
1094Select QUALITY MEASUREMENT MENU Option: ?
1095"PKG",213,22,1,"PAH",1,1,111,0)
1096
1097"PKG",213,22,1,"PAH",1,1,112,0)
1098 COPY OVER PATIENT LISTS
1099"PKG",213,22,1,"PAH",1,1,113,0)
1100 ED-1 COMPUTATION
1101"PKG",213,22,1,"PAH",1,1,114,0)
1102 ED-2 COMPUTATION
1103"PKG",213,22,1,"PAH",1,1,115,0)
1104 EP UPDATE MU MEASURES
1105"PKG",213,22,1,"PAH",1,1,116,0)
1106 INP UPDATE MU MEASURES
1107"PKG",213,22,1,"PAH",1,1,117,0)
1108 PQRI MENU ...
1109"PKG",213,22,1,"PAH",1,1,118,0)
1110 PQRI PRINT XML
1111"PKG",213,22,1,"PAH",1,1,119,0)
1112 PRINT C0Q MEASURES
1113"PKG",213,22,1,"PAH",1,1,120,0)
1114 QRDA MENU ...
1115"PKG",213,22,1,"PAH",1,1,121,0)
1116 SETUP QUALITY REPORTING ...
1117"PKG",213,22,1,"PAH",1,1,122,0)
1118
1119"PKG",213,22,1,"PAH",1,1,123,0)
1120Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
1121"PKG",213,22,1,"PAH",1,1,124,0)
1122text.
1123"PKG",213,22,1,"PAH",1,1,125,0)
1124
1125"PKG",213,22,1,"PAH",1,1,126,0)
1126Select QUALITY MEASUREMENT MENU Option: setUP QUALITY REPORTING
1127"PKG",213,22,1,"PAH",1,1,127,0)
1128
1129"PKG",213,22,1,"PAH",1,1,128,0)
1130Select SETUP QUALITY REPORTING Option: ?
1131"PKG",213,22,1,"PAH",1,1,129,0)
1132
1133"PKG",213,22,1,"PAH",1,1,130,0)
1134 DISPLAY QUALITY MEASURES
1135"PKG",213,22,1,"PAH",1,1,131,0)
1136 EDIT SUPERUSERS
1137"PKG",213,22,1,"PAH",1,1,132,0)
1138 EP EDIT PARMS
1139"PKG",213,22,1,"PAH",1,1,133,0)
1140 INP EDIT PARMS
1141"PKG",213,22,1,"PAH",1,1,134,0)
1142 MEASURE SET EDIT
1143"PKG",213,22,1,"PAH",1,1,135,0)
1144 MU MEASURE EDIT
1145"PKG",213,22,1,"PAH",1,1,136,0)
1146 QUALITY MEASURE EDIT
1147"PKG",213,22,1,"PAH",1,1,137,0)
1148
1149"PKG",213,22,1,"PAH",1,1,138,0)
1150Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
1151"PKG",213,22,1,"PAH",1,1,139,0)
1152text.
1153"PKG",213,22,1,"PAH",1,1,140,0)
1154
1155"PKG",213,22,1,"PAH",1,1,141,0)
1156Select SETUP QUALITY REPORTING Option: ep edit PARMS
1157"PKG",213,22,1,"PAH",1,1,142,0)
1158
1159"PKG",213,22,1,"PAH",1,1,143,0)
1160Select C0Q PARAMETER NAME: OUTPATIENT
1161"PKG",213,22,1,"PAH",1,1,144,0)
1162NAME: OUTPATIENT//
1163"PKG",213,22,1,"PAH",1,1,145,0)
1164MEASUREMENT PERIOD KEY: MU12//
1165"PKG",213,22,1,"PAH",1,1,146,0)
1166PARAMETER TYPE: OUTPATIENT//
1167"PKG",213,22,1,"PAH",1,1,147,0)
1168EP MU MEASUREMENT SET: OUTPATIENT MEASURE SET//
1169"PKG",213,22,1,"PAH",1,1,148,0)
1170EP QUALITY MEASUREMENT SET:
1171"PKG",213,22,1,"PAH",1,1,149,0)
1172Select CLINIC: DR OFFICE//
1173"PKG",213,22,1,"PAH",1,1,150,0)
1174PATIENT LIST LABEL:
1175"PKG",213,22,1,"PAH",1,1,151,0)
1176Select SUBSCRIBER:
1177"PKG",213,22,1,"PAH",1,1,152,0)
1178
1179"PKG",213,22,1,"PAH",1,1,153,0)
1180Select C0Q PARAMETER NAME:
1181"PKG",213,22,1,"PAH",1,1,154,0)
1182
1183"PKG",213,22,1,"PAH",1,1,155,0)
1184Select SETUP QUALITY REPORTING Option: measure set EDIT
1185"PKG",213,22,1,"PAH",1,1,156,0)
1186
1187"PKG",213,22,1,"PAH",1,1,157,0)
1188Select C0Q MEASUREMENT SET NAME: outpaTIENT MEASURE SET
1189"PKG",213,22,1,"PAH",1,1,158,0)
1190NAME: OUTPATIENT MEASURE SET Replace
1191"PKG",213,22,1,"PAH",1,1,159,0)
1192BEGIN DATE: JUN 12,2001//
1193"PKG",213,22,1,"PAH",1,1,160,0)
1194END DATE: MAY 25,2012//
1195"PKG",213,22,1,"PAH",1,1,161,0)
1196LOCKED:
1197"PKG",213,22,1,"PAH",1,1,162,0)
1198MU YEAR KEY: MU12//
1199"PKG",213,22,1,"PAH",1,1,163,0)
1200QRDA TEMPLATE ROOT:
1201"PKG",213,22,1,"PAH",1,1,164,0)
1202Select MEASURE: MU EP ERX//
1203"PKG",213,22,1,"PAH",1,1,165,0)
1204 MEASURE: MU EP ERX//
1205"PKG",213,22,1,"PAH",1,1,166,0)
1206 NUMERATOR FILTER LIST:
1207"PKG",213,22,1,"PAH",1,1,167,0)
1208 DENOMINATOR FILTER LIST:
1209"PKG",213,22,1,"PAH",1,1,168,0)
1210Select MEASURE:
1211"PKG",213,22,1,"PAH",1,1,169,0)
1212
1213"PKG",213,22,1,"PAH",1,1,170,0)
1214Select C0Q MEASUREMENT SET NAME:
1215"PKG",213,22,1,"PAH",1,1,171,0)
1216
1217"PKG",213,22,1,"PAH",1,1,172,0)
1218Select SETUP QUALITY REPORTING Option:
1219"PKG",213,22,1,"PAH",1,1,173,0)
1220
1221"PKG",213,22,1,"PAH",1,1,174,0)
1222Select QUALITY MEASUREMENT MENU Option: ?
1223"PKG",213,22,1,"PAH",1,1,175,0)
1224
1225"PKG",213,22,1,"PAH",1,1,176,0)
1226 COPY OVER PATIENT LISTS
1227"PKG",213,22,1,"PAH",1,1,177,0)
1228 ED-1 COMPUTATION
1229"PKG",213,22,1,"PAH",1,1,178,0)
1230 ED-2 COMPUTATION
1231"PKG",213,22,1,"PAH",1,1,179,0)
1232 EP UPDATE MU MEASURES
1233"PKG",213,22,1,"PAH",1,1,180,0)
1234 INP UPDATE MU MEASURES
1235"PKG",213,22,1,"PAH",1,1,181,0)
1236 PQRI MENU ...
1237"PKG",213,22,1,"PAH",1,1,182,0)
1238 PQRI PRINT XML
1239"PKG",213,22,1,"PAH",1,1,183,0)
1240 PRINT C0Q MEASURES
1241"PKG",213,22,1,"PAH",1,1,184,0)
1242 QRDA MENU ...
1243"PKG",213,22,1,"PAH",1,1,185,0)
1244 SETUP QUALITY REPORTING ...
1245"PKG",213,22,1,"PAH",1,1,186,0)
1246
1247"PKG",213,22,1,"PAH",1,1,187,0)
1248Enter ?? for more options, ??? for brief descriptions, ?OPTION for help
1249"PKG",213,22,1,"PAH",1,1,188,0)
1250text.
1251"PKG",213,22,1,"PAH",1,1,189,0)
1252
1253"PKG",213,22,1,"PAH",1,1,190,0)
1254Select QUALITY MEASUREMENT MENU Option: ep updATE MU MEASURES
1255"PKG",213,22,1,"PAH",1,1,191,0)
1256Sep 16, 2012@86:54:61
1257"PKG",213,22,1,"PAH",1,1,192,0)
1258Jan 03, 2008@80:85:41
1259"PKG",213,22,1,"PAH",1,1,193,0)
1260Jan 01, 2008@81:59:42
1261"PKG",213,22,1,"PAH",1,1,194,0)
1262Nov 25, 2005@86:89:76
1263"PKG",213,22,1,"PAH",1,1,195,0)
1264Nov 25, 2005@85:87:58
1265"PKG",213,22,1,"PAH",1,1,196,0)
1266Nov 24, 2005@79:68:87
1267"PKG",213,22,1,"PAH",1,1,197,0)
1268Aug 01, 2005@91:59:64
1269"PKG",213,22,1,"PAH",1,1,198,0)
1270Aug 2005@84:91:51
1271"PKG",213,22,1,"PAH",1,1,199,0)
1272Aug 2005@84:78:82
1273"PKG",213,22,1,"PAH",1,1,200,0)
1274Jul 28, 2005@88:55:64
1275"PKG",213,22,1,"PAH",1,1,201,0)
1276Jul 28, 2005@88:46:85
1277"PKG",213,22,1,"PAH",1,1,202,0)
1278Jul 28, 2005@87:95:55
1279"PKG",213,22,1,"PAH",1,1,203,0)
1280Jul 27, 2005@87:79:80
1281"PKG",213,22,1,"PAH",1,1,204,0)
1282Jul 27, 2005@83:83:97
1283"PKG",213,22,1,"PAH",1,1,205,0)
1284Jul 26, 2005@88:78:96
1285"PKG",213,22,1,"PAH",1,1,206,0)
1286Jul 26, 2005@88:75:45
1287"PKG",213,22,1,"PAH",1,1,207,0)
1288Jul 26, 2005@88:58:60
1289"PKG",213,22,1,"PAH",1,1,208,0)
1290Jul 26, 2005@88:52:62
1291"PKG",213,22,1,"PAH",1,1,209,0)
1292Jul 26, 2005@88:50:59
1293"PKG",213,22,1,"PAH",1,1,210,0)
1294Jul 26, 2005@88:49:74
1295"PKG",213,22,1,"PAH",1,1,211,0)
1296Jul 26, 2005@84:54:55
1297"PKG",213,22,1,"PAH",1,1,212,0)
1298Jul 24, 2005@91:62:76
1299"PKG",213,22,1,"PAH",1,1,213,0)
1300Jul 23, 2005@88:98:45
1301"PKG",213,22,1,"PAH",1,1,214,0)
1302Jul 23, 2005@85:77:89
1303"PKG",213,22,1,"PAH",1,1,215,0)
1304Jul 23, 2005@83:77:71
1305"PKG",213,22,1,"PAH",1,1,216,0)
1306Jul 23, 2005@82:82:99
1307"PKG",213,22,1,"PAH",1,1,217,0)
1308Jul 23, 2005@82:66:61
1309"PKG",213,22,1,"PAH",1,1,218,0)
1310Jul 22, 2005@83:85:46
1311"PKG",213,22,1,"PAH",1,1,219,0)
1312Jul 22, 2005@82:82:92
1313"PKG",213,22,1,"PAH",1,1,220,0)
1314Jul 22, 2005@82:75:99
1315"PKG",213,22,1,"PAH",1,1,221,0)
1316Jul 21, 2005@89:50:71
1317"PKG",213,22,1,"PAH",1,1,222,0)
1318Jul 21, 2005@83:53:48
1319"PKG",213,22,1,"PAH",1,1,223,0)
1320Jul 20, 2005@91:43:44
1321"PKG",213,22,1,"PAH",1,1,224,0)
1322Jul 20, 2005@87:89:46
1323"PKG",213,22,1,"PAH",1,1,225,0)
1324Jul 20, 2005@84:60:78
1325"PKG",213,22,1,"PAH",1,1,226,0)
1326Jul 20, 2005@84:60:71
1327"PKG",213,22,1,"PAH",1,1,227,0)
1328Jul 19, 2005@89:92:54
1329"PKG",213,22,1,"PAH",1,1,228,0)
1330Jul 19, 2005@89:55:97
1331"PKG",213,22,1,"PAH",1,1,229,0)
1332Jul 18, 2005@92:58:51
1333"PKG",213,22,1,"PAH",1,1,230,0)
1334Jul 18, 2005@91:47:87
1335"PKG",213,22,1,"PAH",1,1,231,0)
1336Jul 18, 2005@88:67:86
1337"PKG",213,22,1,"PAH",1,1,232,0)
1338Jul 18, 2005@88:63:92
1339"PKG",213,22,1,"PAH",1,1,233,0)
1340Jul 18, 2005@86:64:88
1341"PKG",213,22,1,"PAH",1,1,234,0)
1342Jul 18, 2005@84:56:82
1343"PKG",213,22,1,"PAH",1,1,235,0)
1344Jul 18, 2005@84:45:52
1345"PKG",213,22,1,"PAH",1,1,236,0)
1346Jul 17, 2005@82:42:51
1347"PKG",213,22,1,"PAH",1,1,237,0)
1348Jul 14, 2005@84:00
1349"PKG",213,22,1,"PAH",1,1,238,0)
1350Jul 07, 2005@86:97
1351"PKG",213,22,1,"PAH",1,1,239,0)
1352Jul 2005@85:62:77B index passed
1353"PKG",213,22,1,"PAH",1,1,240,0)
13544
1355"PKG",213,22,1,"PAH",1,1,241,0)
1356Calling GETMEDS6 SOAP Web Service Call for 4
1357"PKG",213,22,1,"PAH",1,1,242,0)
1358Patient 4 Rx 1
1359"PKG",213,22,1,"PAH",1,1,243,0)
1360DeaClassCode: 0
1361"PKG",213,22,1,"PAH",1,1,244,0)
1362PharmacyType: 1
1363"PKG",213,22,1,"PAH",1,1,245,0)
1364PharmacyDetailType: 1
1365"PKG",213,22,1,"PAH",1,1,246,0)
1366FinalDestinationType: 2
1367"PKG",213,22,1,"PAH",1,1,247,0)
1368FinalStatusType: 2
1369"PKG",213,22,1,"PAH",1,1,248,0)
1370Patient 4 Rx 2
1371"PKG",213,22,1,"PAH",1,1,249,0)
1372DeaClassCode: 0
1373"PKG",213,22,1,"PAH",1,1,250,0)
1374PharmacyType: 0
1375"PKG",213,22,1,"PAH",1,1,251,0)
1376Patient 4 Rx 3
1377"PKG",213,22,1,"PAH",1,1,252,0)
1378DeaClassCode: 0
1379"PKG",213,22,1,"PAH",1,1,253,0)
1380PharmacyType: 1
1381"PKG",213,22,1,"PAH",1,1,254,0)
1382PharmacyDetailType: 1
1383"PKG",213,22,1,"PAH",1,1,255,0)
1384FinalDestinationType: 2
1385"PKG",213,22,1,"PAH",1,1,256,0)
1386FinalStatusType: 2
1387"PKG",213,22,1,"PAH",1,1,257,0)
1388Patient 4 Rx 4
1389"PKG",213,22,1,"PAH",1,1,258,0)
1390DeaClassCode: 0
1391"PKG",213,22,1,"PAH",1,1,259,0)
1392PharmacyType: 0
1393"PKG",213,22,1,"PAH",1,1,260,0)
1394IENs ?+14,1,17, ready to file
1395"PKG",213,22,1,"PAH",1,1,261,0)
1396Saving ERXDEN of 0 for Patient MOUSE,MICKEY (4)
1397"PKG",213,22,1,"PAH",1,1,262,0)
1398Fileman Data Array
1399"PKG",213,22,1,"PAH",1,1,263,0)
1400C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXDEN
1401"PKG",213,22,1,"PAH",1,1,264,0)
1402C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0
1403"PKG",213,22,1,"PAH",1,1,265,0)
1404Patient 4 Rx 1
1405"PKG",213,22,1,"PAH",1,1,266,0)
1406DeaClassCode: 0
1407"PKG",213,22,1,"PAH",1,1,267,0)
1408PharmacyType: 1
1409"PKG",213,22,1,"PAH",1,1,268,0)
1410PharmacyDetailType: 1
1411"PKG",213,22,1,"PAH",1,1,269,0)
1412FinalDestinationType: 2
1413"PKG",213,22,1,"PAH",1,1,270,0)
1414Patient 4 Rx 2
1415"PKG",213,22,1,"PAH",1,1,271,0)
1416DeaClassCode: 0
1417"PKG",213,22,1,"PAH",1,1,272,0)
1418PharmacyType: 0
1419"PKG",213,22,1,"PAH",1,1,273,0)
1420Patient 4 Rx 3
1421"PKG",213,22,1,"PAH",1,1,274,0)
1422DeaClassCode: 0
1423"PKG",213,22,1,"PAH",1,1,275,0)
1424PharmacyType: 1
1425"PKG",213,22,1,"PAH",1,1,276,0)
1426PharmacyDetailType: 1
1427"PKG",213,22,1,"PAH",1,1,277,0)
1428FinalDestinationType: 2
1429"PKG",213,22,1,"PAH",1,1,278,0)
1430Patient 4 Rx 4
1431"PKG",213,22,1,"PAH",1,1,279,0)
1432DeaClassCode: 0
1433"PKG",213,22,1,"PAH",1,1,280,0)
1434PharmacyType: 0
1435"PKG",213,22,1,"PAH",1,1,281,0)
1436IENs ?+14,1,17, ready to file
1437"PKG",213,22,1,"PAH",1,1,282,0)
1438Saving ERXNUM of 0 for Patient MOUSE,MICKEY (4)
1439"PKG",213,22,1,"PAH",1,1,283,0)
1440Fileman Data Array
1441"PKG",213,22,1,"PAH",1,1,284,0)
1442C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXNUM
1443"PKG",213,22,1,"PAH",1,1,285,0)
1444C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0
1445"PKG",213,22,1,"PAH",1,1,286,0)
1446C0QFDA(1130580001.2011,"1,7,",3)=100
1447"PKG",213,22,1,"PAH",1,1,287,0)
1448Processing E-Prescribing Counts
1449"PKG",213,22,1,"PAH",1,1,288,0)
1450DFN Denominator Numerator
1451"PKG",213,22,1,"PAH",1,1,289,0)
14524 0 0
1453"PKG",213,22,1,"PAH",1,1,290,0)
1454 === ===
1455"PKG",213,22,1,"PAH",1,1,291,0)
1456 0 0
1457"QUES","XPF1",0)
1458Y
1459"QUES","XPF1","??")
1460^D REP^XPDH
1461"QUES","XPF1","A")
1462Shall I write over your |FLAG| File
1463"QUES","XPF1","B")
1464YES
1465"QUES","XPF1","M")
1466D XPF1^XPDIQ
1467"QUES","XPF2",0)
1468Y
1469"QUES","XPF2","??")
1470^D DTA^XPDH
1471"QUES","XPF2","A")
1472Want my data |FLAG| yours
1473"QUES","XPF2","B")
1474YES
1475"QUES","XPF2","M")
1476D XPF2^XPDIQ
1477"QUES","XPI1",0)
1478YO
1479"QUES","XPI1","??")
1480^D INHIBIT^XPDH
1481"QUES","XPI1","A")
1482Want KIDS to INHIBIT LOGONs during the install
1483"QUES","XPI1","B")
1484NO
1485"QUES","XPI1","M")
1486D XPI1^XPDIQ
1487"QUES","XPM1",0)
1488PO^VA(200,:EM
1489"QUES","XPM1","??")
1490^D MG^XPDH
1491"QUES","XPM1","A")
1492Enter the Coordinator for Mail Group '|FLAG|'
1493"QUES","XPM1","B")
1494
1495"QUES","XPM1","M")
1496D XPM1^XPDIQ
1497"QUES","XPO1",0)
1498Y
1499"QUES","XPO1","??")
1500^D MENU^XPDH
1501"QUES","XPO1","A")
1502Want KIDS to Rebuild Menu Trees Upon Completion of Install
1503"QUES","XPO1","B")
1504NO
1505"QUES","XPO1","M")
1506D XPO1^XPDIQ
1507"QUES","XPZ1",0)
1508Y
1509"QUES","XPZ1","??")
1510^D OPT^XPDH
1511"QUES","XPZ1","A")
1512Want to DISABLE Scheduled Options, Menu Options, and Protocols
1513"QUES","XPZ1","B")
1514NO
1515"QUES","XPZ1","M")
1516D XPZ1^XPDIQ
1517"QUES","XPZ2",0)
1518Y
1519"QUES","XPZ2","??")
1520^D RTN^XPDH
1521"QUES","XPZ2","A")
1522Want to MOVE routines to other CPUs
1523"QUES","XPZ2","B")
1524NO
1525"QUES","XPZ2","M")
1526D XPZ2^XPDIQ
1527"RTN")
15284
1529"RTN","C0Q1P1")
15300^^B541473
1531"RTN","C0Q1P1",1,0)
1532C0Q1P1 ; VEN/SMH - Inits for Patch 1 ; 9/17/12 1:15pm
1533"RTN","C0Q1P1",2,0)
1534 ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32
1535"RTN","C0Q1P1",3,0)
1536 ;
1537"RTN","C0Q1P1",4,0)
1538POST ; Post-Install hook for Patch 1; PEP
1539"RTN","C0Q1P1",5,0)
1540 ; Fire off the new x-refs for entries in the parameter file
1541"RTN","C0Q1P1",6,0)
1542 N C0QI S C0QI=0 ; Walk through starting with number 1
1543"RTN","C0Q1P1",7,0)
1544 F S C0QI=$O(^C0Q(401,C0QI)) Q:'C0QI D
1545"RTN","C0Q1P1",8,0)
1546 . N DA,DIK S DIK="^C0Q(401,",DIK(1)="2^AMMS",DA=C0QI D EN^DIK
1547"RTN","C0Q1P1",9,0)
1548 . N DA,DIK S DIK="^C0Q(401,",DIK(1)="2.1^AQMS",DA=C0QI D EN^DIK
1549"RTN","C0Q1P1",10,0)
1550 QUIT
1551"RTN","C0QMU12")
15520^3^B266254568
1553"RTN","C0QMU12",1,0)
1554C0QMU12 ;JJOH/ZAG/GPL - Patient Reminder List ; 9/17/12 1:19pm
1555"RTN","C0QMU12",2,0)
1556 ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32
1557"RTN","C0QMU12",3,0)
1558 ;
1559"RTN","C0QMU12",4,0)
1560 ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU
1561"RTN","C0QMU12",5,0)
1562 ;General Public License See attached copy of the License.
1563"RTN","C0QMU12",6,0)
1564 ;
1565"RTN","C0QMU12",7,0)
1566 ; GPL - THIS ROUTINE IS A COPY OF JJOHMU11 THAT HAS BEEN MODIFIED
1567"RTN","C0QMU12",8,0)
1568 ; FOR MEANINGFUL USE CALCULATION FOR FISCAL YEAR 2012 AT OROVILLE HOSPITAL
1569"RTN","C0QMU12",9,0)
1570 ;
1571"RTN","C0QMU12",10,0)
1572C0QPFN() Q 1130580001.401 ; PARAMETER FILE
1573"RTN","C0QMU12",11,0)
1574C0QPCFN() Q 1130580001.411 ; CLINIC SUBFILE
1575"RTN","C0QMU12",12,0)
1576C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
1577"RTN","C0QMU12",13,0)
1578C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
1579"RTN","C0QMU12",14,0)
1580INIT(ZARY,ZTYP) ; INITIALIZE THE PARAMETERS FOR BUILDING PATIENT LISTS
1581"RTN","C0QMU12",15,0)
1582 ; ZARY IS PASSED BY NAME
1583"RTN","C0QMU12",16,0)
1584 ; ZTYP IS "INP" OR "EP"
1585"RTN","C0QMU12",17,0)
1586 N ZMU S ZMU="MU12" ; THIS IS THE ONLY HARD CODED VALUE LEFT
1587"RTN","C0QMU12",18,0)
1588 ; TBD - CHANGE IT TO A READ FROM SYSTEM PARAMETERS
1589"RTN","C0QMU12",19,0)
1590 K @ZARY ; CLEAR RETURN ARRAY
1591"RTN","C0QMU12",20,0)
1592 N ZIEN,ZCNT,ZX
1593"RTN","C0QMU12",21,0)
1594 I $O(^C0Q(401,"MUTYP",ZMU,ZTYP,""))="" D Q ; OOPS NO RECORD THERE
1595"RTN","C0QMU12",22,0)
1596 . W !,"ERROR, NO PARAMETERS AVAILABLE"
1597"RTN","C0QMU12",23,0)
1598 S ZIEN=""
1599"RTN","C0QMU12",24,0)
1600 S ZCNT=0
1601"RTN","C0QMU12",25,0)
1602 F S ZIEN=$O(^C0Q(401,"MUTYP",ZMU,ZTYP,ZIEN)) Q:ZIEN="" D ;
1603"RTN","C0QMU12",26,0)
1604 . S ZCNT=ZCNT+1
1605"RTN","C0QMU12",27,0)
1606 . S @ZARY@(ZCNT,"MU")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.02)
1607"RTN","C0QMU12",28,0)
1608 . S @ZARY@(ZCNT,"TYPE")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.03)
1609"RTN","C0QMU12",29,0)
1610 . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",1,"I")
1611"RTN","C0QMU12",30,0)
1612 . S @ZARY@(ZCNT,"InpatientMeasurementSet")=ZX
1613"RTN","C0QMU12",31,0)
1614 . S @ZARY@(ZCNT,"InpatientBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I")
1615"RTN","C0QMU12",32,0)
1616 . S @ZARY@(ZCNT,"InpatientEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I")
1617"RTN","C0QMU12",33,0)
1618 . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I")
1619"RTN","C0QMU12",34,0)
1620 . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",2,"I")
1621"RTN","C0QMU12",35,0)
1622 . S @ZARY@(ZCNT,"EPMeasurementSet")=ZX
1623"RTN","C0QMU12",36,0)
1624 . S @ZARY@(ZCNT,"EPBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I")
1625"RTN","C0QMU12",37,0)
1626 . S @ZARY@(ZCNT,"EPEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I")
1627"RTN","C0QMU12",38,0)
1628 . S @ZARY@(ZCNT,"EPQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",2.1,"I")
1629"RTN","C0QMU12",39,0)
1630 . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I")
1631"RTN","C0QMU12",40,0)
1632 . D CLEAN^DILF
1633"RTN","C0QMU12",41,0)
1634 . D LIST^DIC($$C0QPCFN,","_ZIEN_",",".01I")
1635"RTN","C0QMU12",42,0)
1636 . I $D(^TMP("DIERR",$J)) D Q ; ERROR READING CLINIC LIST
1637"RTN","C0QMU12",43,0)
1638 . . W !,"ERROR READING CLINIC PARAMETER LIST"
1639"RTN","C0QMU12",44,0)
1640 . M @ZARY@(ZCNT,"CLINICS")=^TMP("DILIST",$J)
1641"RTN","C0QMU12",45,0)
1642 ;
1643"RTN","C0QMU12",46,0)
1644 Q
1645"RTN","C0QMU12",47,0)
1646 ;
1647"RTN","C0QMU12",48,0)
1648BUILD ; CALL ALL AND DIS AND BUILD THE GRSLT ARRAY or print or create
1649"RTN","C0QMU12",49,0)
1650 ; patient lists
1651"RTN","C0QMU12",50,0)
1652 ;N GRSLT ; ARRAY FOR RESULTS
1653"RTN","C0QMU12",51,0)
1654 I '$D(C0QSS) S C0QSS=0 ;default don't build spreadsheet array
1655"RTN","C0QMU12",52,0)
1656 I '$D(C0QPR) S C0QPR=0 ;default don't print out results
1657"RTN","C0QMU12",53,0)
1658 I '$D(C0QPL) S C0QPL=1 ;default do create patient lists
1659"RTN","C0QMU12",54,0)
1660 S ZYR="MU12-"
1661"RTN","C0QMU12",55,0)
1662 D INITCLST ; initialize C0QLIST
1663"RTN","C0QMU12",56,0)
1664 N G1 ; ONE SET OF VALUES - RNF1 FORMAT
1665"RTN","C0QMU12",57,0)
1666 N C0QPARM
1667"RTN","C0QMU12",58,0)
1668 D INIT("C0QPARM","INP") ; initialize inpatient parms
1669"RTN","C0QMU12",59,0)
1670 I $O(C0QPARM(""))="" D Q ; no parms for inpatient
1671"RTN","C0QMU12",60,0)
1672 . W !,"No inpatient parameters"
1673"RTN","C0QMU12",61,0)
1674 N ZDIV S ZDIV=""
1675"RTN","C0QMU12",62,0)
1676 F S ZDIV=$O(C0QPARM(ZDIV)) Q:ZDIV="" D ; for each inpatient division
1677"RTN","C0QMU12",63,0)
1678 . D ALL ; all currently admitted patients in the hospital
1679"RTN","C0QMU12",64,0)
1680 . D DIS ; all patients discharged since the reporting period began
1681"RTN","C0QMU12",65,0)
1682 . I C0QSS D ZWRITE^C0QUTIL("GRSLT")
1683"RTN","C0QMU12",66,0)
1684 . ;D ICUPAT ; GENERATE ICU PATIENT LIST
1685"RTN","C0QMU12",67,0)
1686 . I C0QPL D ;
1687"RTN","C0QMU12",68,0)
1688 . . D FILE ; FILE THE PATIENT LISTS
1689"RTN","C0QMU12",69,0)
1690 . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientMeasurementSet")) ;
1691"RTN","C0QMU12",70,0)
1692 . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientQualitySet")) ;
1693"RTN","C0QMU12",71,0)
1694 . K C0QLIST
1695"RTN","C0QMU12",72,0)
1696 Q
1697"RTN","C0QMU12",73,0)
1698 ;
1699"RTN","C0QMU12",74,0)
1700INITCLST ; initialize C0QLIST
1701"RTN","C0QMU12",75,0)
1702 ; INITIALIZE LISTS
1703"RTN","C0QMU12",76,0)
1704 ; this is done so that if there are no matching patients, the patient list
1705"RTN","C0QMU12",77,0)
1706 ; will be zeroed out
1707"RTN","C0QMU12",78,0)
1708 K C0QLIST
1709"RTN","C0QMU12",79,0)
1710 S C0QLIST(ZYR_"HasDemographics")=""
1711"RTN","C0QMU12",80,0)
1712 S C0QLIST(ZYR_"Patient")=""
1713"RTN","C0QMU12",81,0)
1714 S C0QLIST(ZYR_"HasProblem")=""
1715"RTN","C0QMU12",82,0)
1716 S C0QLIST(ZYR_"HasAllergy")=""
1717"RTN","C0QMU12",83,0)
1718 S C0QLIST(ZYR_"HasMed")=""
1719"RTN","C0QMU12",84,0)
1720 S C0QLIST(ZYR_"HasVitalSigns")=""
1721"RTN","C0QMU12",85,0)
1722 S C0QLIST(ZYR_"HasMedOrders")=""
1723"RTN","C0QMU12",86,0)
1724 S C0QLIST(ZYR_"HasSmokingStatus")=""
1725"RTN","C0QMU12",87,0)
1726 Q
1727"RTN","C0QMU12",88,0)
1728 ;
1729"RTN","C0QMU12",89,0)
1730ALL ;retrieve active inpatients
1731"RTN","C0QMU12",90,0)
1732 N WARD S WARD=""
1733"RTN","C0QMU12",91,0)
1734 F D Q:WARD=""
1735"RTN","C0QMU12",92,0)
1736 . S WARD=$O(^DIC(42,"B",WARD)) ;ward name
1737"RTN","C0QMU12",93,0)
1738 . Q:WARD=""
1739"RTN","C0QMU12",94,0)
1740 . N WIEN S WIEN=""
1741"RTN","C0QMU12",95,0)
1742 . F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN
1743"RTN","C0QMU12",96,0)
1744 . . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name
1745"RTN","C0QMU12",97,0)
1746 . . N DFN,RB S DFN=""
1747"RTN","C0QMU12",98,0)
1748 . . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward
1749"RTN","C0QMU12",99,0)
1750 . . . D DEMO^C0QMU122
1751"RTN","C0QMU12",100,0)
1752 . . . D PROBLEM
1753"RTN","C0QMU12",101,0)
1754 . . . D ALLERGY
1755"RTN","C0QMU12",102,0)
1756 . . . D MEDS4
1757"RTN","C0QMU12",103,0)
1758 . . . D RECON2
1759"RTN","C0QMU12",104,0)
1760 . . . D ADVDIR
1761"RTN","C0QMU12",105,0)
1762 . . . D SMOKING
1763"RTN","C0QMU12",106,0)
1764 . . . D VITALS
1765"RTN","C0QMU12",107,0)
1766 . . . D VTE1
1767"RTN","C0QMU12",108,0)
1768 . . . D COD
1769"RTN","C0QMU12",109,0)
1770 . . . D EDTIME
1771"RTN","C0QMU12",110,0)
1772 . . . I C0QPR D PRINT^C0QMU121
1773"RTN","C0QMU12",111,0)
1774 . . . I C0QSS D SS^C0QMU121
1775"RTN","C0QMU12",112,0)
1776 . . . I C0QPL D PATLIST^C0QMU121
1777"RTN","C0QMU12",113,0)
1778 Q
1779"RTN","C0QMU12",114,0)
1780 ;
1781"RTN","C0QMU12",115,0)
1782PROBLEM ; PATIENT PROBLEMS
1783"RTN","C0QMU12",116,0)
1784 D LIST^ORQQPL(.PROBL,DFN,"A")
1785"RTN","C0QMU12",117,0)
1786 S PBCNT=""
1787"RTN","C0QMU12",118,0)
1788 F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D
1789"RTN","C0QMU12",119,0)
1790 . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description
1791"RTN","C0QMU12",120,0)
1792 I PBDESC["No problems found" S C0QLIST(ZYR_"NoProblem",DFN)=""
1793"RTN","C0QMU12",121,0)
1794 E S C0QLIST(ZYR_"HasProblem",DFN)=""
1795"RTN","C0QMU12",122,0)
1796 K PROBL
1797"RTN","C0QMU12",123,0)
1798 Q
1799"RTN","C0QMU12",124,0)
1800 ;
1801"RTN","C0QMU12",125,0)
1802ALLERGY ; ALLERGY LIST
1803"RTN","C0QMU12",126,0)
1804 ; WANT TO CHANGE ALLERGIES FOR 2012 TO POPULATE THE C0QLIST DIRECTLY. GPL
1805"RTN","C0QMU12",127,0)
1806 D LIST^ORQQAL(.ALRGYL,DFN)
1807"RTN","C0QMU12",128,0)
1808 S ALCNT=""
1809"RTN","C0QMU12",129,0)
1810 F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D
1811"RTN","C0QMU12",130,0)
1812 . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description
1813"RTN","C0QMU12",131,0)
1814 I ALDESC["No Allergy" S C0QLIST(ZYR_"NoAllergy",DFN)=""
1815"RTN","C0QMU12",132,0)
1816 E S C0QLIST(ZYR_"HasAllergy",DFN)=""
1817"RTN","C0QMU12",133,0)
1818 K ALRGYL
1819"RTN","C0QMU12",134,0)
1820 Q
1821"RTN","C0QMU12",135,0)
1822 ;
1823"RTN","C0QMU12",136,0)
1824MEDS4 ; USE OCL^PSOORRL TO GET ALL MEDS
1825"RTN","C0QMU12",137,0)
1826 ; DELETED MEDS, MEDS2, AND MEDS3 FOR 2012 TO USE ONLY MEDS4
1827"RTN","C0QMU12",138,0)
1828 N BEG,END
1829"RTN","C0QMU12",139,0)
1830 S BEG=$$DT^C0QUTIL("JULY 3,2011")
1831"RTN","C0QMU12",140,0)
1832 S END=$$DT^C0QUTIL("NOW")
1833"RTN","C0QMU12",141,0)
1834 D OCL^PSOORRL(DFN,BEG,END) ;DBIA #2400
1835"RTN","C0QMU12",142,0)
1836 N C0QMEDS
1837"RTN","C0QMU12",143,0)
1838 M C0QMEDS=^TMP("PS",$J) ; MEDS RETURNED FROM CALL
1839"RTN","C0QMU12",144,0)
1840 N FOUND
1841"RTN","C0QMU12",145,0)
1842 N ZI
1843"RTN","C0QMU12",146,0)
1844 I '$D(C0QMEDS(1)) D Q ; QUIT IF NO MEDS
1845"RTN","C0QMU12",147,0)
1846 . S C0QLIST(ZYR_"NoMed",DFN)=""
1847"RTN","C0QMU12",148,0)
1848 E D ; HAS MEDS
1849"RTN","C0QMU12",149,0)
1850 . S C0QLIST(ZYR_"HasMed",DFN)=""
1851"RTN","C0QMU12",150,0)
1852 S ZI="" S FOUND=0
1853"RTN","C0QMU12",151,0)
1854 F S ZI=$O(C0QMEDS(ZI)) Q:ZI="" D ; FOR EACH MED
1855"RTN","C0QMU12",152,0)
1856 . N ZM
1857"RTN","C0QMU12",153,0)
1858 . S ZM=$G(C0QMEDS(ZI,0)) ;THE MEDICATION
1859"RTN","C0QMU12",154,0)
1860 . I $P($P(ZM,"^",1),";",2)="I" D ; IE 1U;I FOR AN INPATIENT UNIT DOSE
1861"RTN","C0QMU12",155,0)
1862 . . S FOUND=1
1863"RTN","C0QMU12",156,0)
1864 I FOUND S C0QLIST(ZYR_"HasMedOrders",DFN)="" ; MET CPOE MEASURE
1865"RTN","C0QMU12",157,0)
1866 E S C0QLIST(ZYR_"NoMedOrders",DFN)=""
1867"RTN","C0QMU12",158,0)
1868 Q
1869"RTN","C0QMU12",159,0)
1870 ;
1871"RTN","C0QMU12",160,0)
1872RECON ; MEDICATIONS RECONCILIATION
1873"RTN","C0QMU12",161,0)
1874 ; WANT TO SIMPLIFY MEDS RECON FOR 2012. GPL
1875"RTN","C0QMU12",162,0)
1876 ;
1877"RTN","C0QMU12",163,0)
1878 I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ;
1879"RTN","C0QMU12",164,0)
1880 . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient
1881"RTN","C0QMU12",165,0)
1882 N HASRECON S HASRECON=0
1883"RTN","C0QMU12",166,0)
1884 N GT,G
1885"RTN","C0QMU12",167,0)
1886 S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")=""
1887"RTN","C0QMU12",168,0)
1888 S GT(5,"HasMedRecon","Medication Reconcilation Complete")=""
1889"RTN","C0QMU12",169,0)
1890 I $$TXTALL^C0QNOTES(.G,.GT,DFN) D ; SEARCH ALL NOTES FOR MED RECON
1891"RTN","C0QMU12",170,0)
1892 . S HASRECON=1
1893"RTN","C0QMU12",171,0)
1894 ;N ZT
1895"RTN","C0QMU12",172,0)
1896 ;S ZT="MEDICATION RECONCILIATION COMPLET"
1897"RTN","C0QMU12",173,0)
1898 ;I $$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) D ;
1899"RTN","C0QMU12",174,0)
1900 ;. S HASRECON=1
1901"RTN","C0QMU12",175,0)
1902 ;E D ;
1903"RTN","C0QMU12",176,0)
1904 ;. S ZT="Medication Reconcilation Complete"
1905"RTN","C0QMU12",177,0)
1906 ;. I $$NTTXT^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",ZT,DFN) D ;
1907"RTN","C0QMU12",178,0)
1908 ;. . S HASRECON=1
1909"RTN","C0QMU12",179,0)
1910 ;I $$HFYN^C0QHF("MEDS HAVE BEEN REVIEWED",DFN) S HASRECON=1
1911"RTN","C0QMU12",180,0)
1912 I HASRECON D ;
1913"RTN","C0QMU12",181,0)
1914 . S C0QLIST(ZYR_"HasMedRecon",DFN)=""
1915"RTN","C0QMU12",182,0)
1916 E S C0QLIST(ZYR_"NoMedRecon",DFN)=""
1917"RTN","C0QMU12",183,0)
1918 Q
1919"RTN","C0QMU12",184,0)
1920 ;
1921"RTN","C0QMU12",185,0)
1922RECON2 ; USE HEALTH FACTORS FOR MEDICATION RECONCILIATION
1923"RTN","C0QMU12",186,0)
1924 I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ;
1925"RTN","C0QMU12",187,0)
1926 . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient
1927"RTN","C0QMU12",188,0)
1928 I $$HFYN^C0QHF(DFN,"Medication Reconciliation Completed: Yes") D ;
1929"RTN","C0QMU12",189,0)
1930 . S C0QLIST(ZYR_"HasMedRecon",DFN)=""
1931"RTN","C0QMU12",190,0)
1932 E S C0QLIST(ZYR_"NoMedRecon",DFN)=""
1933"RTN","C0QMU12",191,0)
1934 Q
1935"RTN","C0QMU12",192,0)
1936 ;
1937"RTN","C0QMU12",193,0)
1938ERX ; FOR EP, WE LOOK AT ERX MEDS
1939"RTN","C0QMU12",194,0)
1940 N ZI S ZI=""
1941"RTN","C0QMU12",195,0)
1942 N ZERX S ZERX=$NA(^PS(55,DFN,"NVA"))
1943"RTN","C0QMU12",196,0)
1944 F S ZI=$O(@ZERX@(ZI)) Q:ZI="" D ;
1945"RTN","C0QMU12",197,0)
1946 . ;B
1947"RTN","C0QMU12",198,0)
1948 . I $G(@ZERX@(ZI,1,1,0))["E-Rx Web" D ;
1949"RTN","C0QMU12",199,0)
1950 . . S C0QLIST(ZYR_"HasMed",DFN)=""
1951"RTN","C0QMU12",200,0)
1952 . . S C0QLIST(ZYR_"HasMedOrders",DFN)=""
1953"RTN","C0QMU12",201,0)
1954 . . S C0QLIST(ZYR_"HasERX",DFN)=""
1955"RTN","C0QMU12",202,0)
1956 . . S C0QLIST(ZYR_"HasMedRecon",DFN)=""
1957"RTN","C0QMU12",203,0)
1958 . E D ;
1959"RTN","C0QMU12",204,0)
1960 . . S C0QLIST(ZYR_"NoMed",DFN)=""
1961"RTN","C0QMU12",205,0)
1962 . . S C0QLIST(ZYR_"NoMedOrders",DFN)=""
1963"RTN","C0QMU12",206,0)
1964 . . S C0QLIST(ZYR_"NoERX",DFN)=""
1965"RTN","C0QMU12",207,0)
1966 . . S C0QLIST(ZYR_"NoMedRecon",DFN)=""
1967"RTN","C0QMU12",208,0)
1968 Q
1969"RTN","C0QMU12",209,0)
1970 ;
1971"RTN","C0QMU12",210,0)
1972ADVDIR ; ADVANCE DIRECTIVE
1973"RTN","C0QMU12",211,0)
1974 ;
1975"RTN","C0QMU12",212,0)
1976 I $$AGE^C0QUTIL(DFN)>64 D ; ONLY FOR PATIENTS 65 AND OLDER
1977"RTN","C0QMU12",213,0)
1978 . S C0QLIST(ZYR_"Over65",DFN)=""
1979"RTN","C0QMU12",214,0)
1980 . I $$HASNTYN^C0QNOTES("ADVANCE DIRECTIVE",DFN) D ;
1981"RTN","C0QMU12",215,0)
1982 . . S C0QLIST(ZYR_"HasAdvanceDirective",DFN)=""
1983"RTN","C0QMU12",216,0)
1984 . E D ;
1985"RTN","C0QMU12",217,0)
1986 . . S C0QLIST(ZYR_"NoAdvanceDirective",DFN)=""
1987"RTN","C0QMU12",218,0)
1988 Q
1989"RTN","C0QMU12",219,0)
1990 ;
1991"RTN","C0QMU12",220,0)
1992SMOKING G SMOKING^C0QMU121
1993"RTN","C0QMU12",221,0)
1994VITALS ;
1995"RTN","C0QMU12",222,0)
1996 ;
1997"RTN","C0QMU12",223,0)
1998 N C0QSDT,C0QEDT
1999"RTN","C0QMU12",224,0)
2000 D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE
2001"RTN","C0QMU12",225,0)
2002 D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY
2003"RTN","C0QMU12",226,0)
2004 D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS
2005"RTN","C0QMU12",227,0)
2006 I $D(VITRSLT) D ;ZWR VITRSLT B ;
2007"RTN","C0QMU12",228,0)
2008 . I VITRSLT(1)["No vitals found." S C0QLIST(ZYR_"NoVitalSigns",DFN)=""
2009"RTN","C0QMU12",229,0)
2010 . E S C0QLIST(ZYR_"HasVitalSigns",DFN)=""
2011"RTN","C0QMU12",230,0)
2012 Q
2013"RTN","C0QMU12",231,0)
2014 ;
2015"RTN","C0QMU12",232,0)
2016VTE1 ; VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL
2017"RTN","C0QMU12",233,0)
2018 ;
2019"RTN","C0QMU12",234,0)
2020 I $$HFYN^C0QHF(DFN,"VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL") D ;
2021"RTN","C0QMU12",235,0)
2022 . S C0QLIST(ZYR_"HasVTE24",DFN)=""
2023"RTN","C0QMU12",236,0)
2024 E S C0QLIST(ZYR_"NoVTE24",DFN)=""
2025"RTN","C0QMU12",237,0)
2026 Q
2027"RTN","C0QMU12",238,0)
2028 ;
2029"RTN","C0QMU12",239,0)
2030COD ; TEST FOR PRELIMINARY CAUSE OF DEATH NOTE
2031"RTN","C0QMU12",240,0)
2032 I $$HASNTYN^C0QNOTES("PRELIMINARY CAUSE OF DEATH",DFN) D ;
2033"RTN","C0QMU12",241,0)
2034 . S C0QLIST(ZYR_"CauseOfDeath",DFN)=""
2035"RTN","C0QMU12",242,0)
2036 Q
2037"RTN","C0QMU12",243,0)
2038 ;
2039"RTN","C0QMU12",244,0)
2040EDTIME ; CHECK FOR EMERGENCY DEPT TIME FACTORS
2041"RTN","C0QMU12",245,0)
2042 N FOUND
2043"RTN","C0QMU12",246,0)
2044 S FOUND=0
2045"RTN","C0QMU12",247,0)
2046 I $$HFYN^C0QHF(DFN,"ED ARRIVAL TIME") S FOUND=1
2047"RTN","C0QMU12",248,0)
2048 I '$$HFYN^C0QHF(DFN,"ED DEPARTURE TIME") S FOUND=0
2049"RTN","C0QMU12",249,0)
2050 I '$$HFYN^C0QHF(DFN,"TIME DECISION TO ADMIT MADE") S FOUND=0
2051"RTN","C0QMU12",250,0)
2052 I FOUND D ;
2053"RTN","C0QMU12",251,0)
2054 . S C0QLIST(ZYR_"HasEDtime",DFN)=""
2055"RTN","C0QMU12",252,0)
2056 E S C0QLIST(ZYR_"NoEDtime",DFN)=""
2057"RTN","C0QMU12",253,0)
2058 Q
2059"RTN","C0QMU12",254,0)
2060 ;
2061"RTN","C0QMU12",255,0)
2062ICUPAT ; CREATE LIST OF ICU PATIENTS
2063"RTN","C0QMU12",256,0)
2064 N ZICU
2065"RTN","C0QMU12",257,0)
2066 S ZICU=$O(^SC("B","IC","")) ; IEN OF ICU HOSPITAL LOCATION
2067"RTN","C0QMU12",258,0)
2068 N ZI,ZJ,ZP
2069"RTN","C0QMU12",259,0)
2070 S ZI=""
2071"RTN","C0QMU12",260,0)
2072 F S ZI=$O(^AUPNVSIT("AHL",ZICU,ZI)) Q:ZI="" D ; EACH DATE
2073"RTN","C0QMU12",261,0)
2074 . S ZJ=""
2075"RTN","C0QMU12",262,0)
2076 . F S ZJ=$O(^AUPNVSIT("AHL",ZICU,ZI,ZJ)) Q:ZJ="" D ; EACH VISIT
2077"RTN","C0QMU12",263,0)
2078 . . S ZP=$P(^AUPNVSIT(ZJ,0),"^",5) ; DFN
2079"RTN","C0QMU12",264,0)
2080 . . S C0QLIST(ZYR_"ICUPatient",ZP)=""
2081"RTN","C0QMU12",265,0)
2082 Q
2083"RTN","C0QMU12",266,0)
2084 ;
2085"RTN","C0QMU12",267,0)
2086FILTER ; CALLED AFTER ALL THE PATIENT LISTS HAVE BEEN FILED
2087"RTN","C0QMU12",268,0)
2088 ; WILL KILL C0QLIST AND CREATE DERIVATIVE PATIENT LISTS BY FILTERING
2089"RTN","C0QMU12",269,0)
2090 K C0QLIST
2091"RTN","C0QMU12",270,0)
2092 N ZPAT
2093"RTN","C0QMU12",271,0)
2094 S ZPAT=$$PATLN(ZYR_"Patient") ; name of patient list of all patients admitted
2095"RTN","C0QMU12",272,0)
2096 ; during the reporting period. used to filter other lists
2097"RTN","C0QMU12",273,0)
2098 ;
2099"RTN","C0QMU12",274,0)
2100 ; filter ICU patients against ZPAT
2101"RTN","C0QMU12",275,0)
2102 N GN,GO,GF
2103"RTN","C0QMU12",276,0)
2104 S GN=ZPAT
2105"RTN","C0QMU12",277,0)
2106 S GO=$$PATLN(ZYR_"ICUPatient") ; all ICU patient
2107"RTN","C0QMU12",278,0)
2108 S GF=$NA(C0QLIST(ZYR_"ICUReporting")) ; the filtered list destination
2109"RTN","C0QMU12",279,0)
2110 D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation
2111"RTN","C0QMU12",280,0)
2112 ;
2113"RTN","C0QMU12",281,0)
2114 ; FILTER VTE-2 DENOMINATOR FOR QUALITY MEASURE
2115"RTN","C0QMU12",282,0)
2116 ;
2117"RTN","C0QMU12",283,0)
2118 S GN=$NA(C0QLIST(ZYR_"ICUReporting")) ; ICU patients admitted inside rpt period
2119"RTN","C0QMU12",284,0)
2120 S GO=$$RPATLN("MU VTE-2 DENOM PL") ; TAXONOMY BASED DENOMENATOR
2121"RTN","C0QMU12",285,0)
2122 S GF=$NA(C0QLIST(ZYR_"VTE2DEN")) ; NEW DENOMINATOR PL
2123"RTN","C0QMU12",286,0)
2124 D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation
2125"RTN","C0QMU12",287,0)
2126 ;
2127"RTN","C0QMU12",288,0)
2128 S GN=ZPAT
2129"RTN","C0QMU12",289,0)
2130 S GO=$$RPATLN("MU VTE-3 DENOM PL") ; TAXONOMY BASED DENOMENATOR
2131"RTN","C0QMU12",290,0)
2132 S GF=$NA(C0QLIST(ZYR_"VTE3DEN")) ; NEW DENOMINATOR PL
2133"RTN","C0QMU12",291,0)
2134 D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation
2135"RTN","C0QMU12",292,0)
2136 ;
2137"RTN","C0QMU12",293,0)
2138 S GN=ZPAT
2139"RTN","C0QMU12",294,0)
2140 S GO=$$RPATLN("MU VTE-4 DENOM PL") ; TAXONOMY BASED DENOMENATOR
2141"RTN","C0QMU12",295,0)
2142 S GF=$NA(C0QLIST(ZYR_"VTE4DEN")) ; NEW DENOMINATOR PL
2143"RTN","C0QMU12",296,0)
2144 D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation
2145"RTN","C0QMU12",297,0)
2146 ;
2147"RTN","C0QMU12",298,0)
2148 S GN=ZPAT
2149"RTN","C0QMU12",299,0)
2150 S GO=$$RPATLN("MU VTE-5 DENOM PL") ; TAXONOMY BASED DENOMENATOR
2151"RTN","C0QMU12",300,0)
2152 S GF=$NA(C0QLIST(ZYR_"VTE5DEN")) ; NEW DENOMINATOR PL
2153"RTN","C0QMU12",301,0)
2154 D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation
2155"RTN","C0QMU12",302,0)
2156 ;
2157"RTN","C0QMU12",303,0)
2158 D FILE ; FILE ALL THE PATIENT LISTS
2159"RTN","C0QMU12",304,0)
2160 D UPDATE^C0QUPDT(.G,5) ; UPDATE THE HOS 2011 MEANINGFUL USE measure set
2161"RTN","C0QMU12",305,0)
2162 Q
2163"RTN","C0QMU12",306,0)
2164 ;
2165"RTN","C0QMU12",307,0)
2166ED1 ;
2167"RTN","C0QMU12",308,0)
2168 S ZYR="MU12-"
2169"RTN","C0QMU12",309,0)
2170 D DOTIME^C0QMU121("ED DEPARTURE TIME")
2171"RTN","C0QMU12",310,0)
2172 Q
2173"RTN","C0QMU12",311,0)
2174 ;
2175"RTN","C0QMU12",312,0)
2176ED2 ;
2177"RTN","C0QMU12",313,0)
2178 S ZYR="MU12-"
2179"RTN","C0QMU12",314,0)
2180 D DOTIME2^C0QMU121("TIME DECISION TO ADMIT MADE")
2181"RTN","C0QMU12",315,0)
2182 Q
2183"RTN","C0QMU12",316,0)
2184 ;
2185"RTN","C0QMU12",317,0)
2186RPATLN(ZLST) ; EXTRINSIC RETURNS THE GLOBAL NAME OF THE REMINDER PATIENT LIST
2187"RTN","C0QMU12",318,0)
2188 ; WHOSE NAME IS ZLST
2189"RTN","C0QMU12",319,0)
2190 N ZIEN,ZN
2191"RTN","C0QMU12",320,0)
2192 S ZIEN=$O(^PXRMXP(810.5,"B",ZLST,"")) ; ien of patient list
2193"RTN","C0QMU12",321,0)
2194 S ZN=$NA(^PXRMXP(810.5,ZIEN,30,"B")) ; GLOBAL NAME IN REMINDER PATIENT LIST
2195"RTN","C0QMU12",322,0)
2196 Q ZN
2197"RTN","C0QMU12",323,0)
2198 ;
2199"RTN","C0QMU12",324,0)
2200PATLN(ZATTR) ; EXTRINSIC RETURNS THE NAME OF THE PATIENT LIST WITH
2201"RTN","C0QMU12",325,0)
2202 ; THE ATTRIBUTE ZATTR
2203"RTN","C0QMU12",326,0)
2204 N ZIEN,ZN
2205"RTN","C0QMU12",327,0)
2206 S ZIEN=$O(^C0Q(301,"CATTR",ZATTR,"")) ; ien of patient list
2207"RTN","C0QMU12",328,0)
2208 S ZN=$NA(^C0Q(301,ZIEN,1,"B")) ; NAME OF PATIENT LIST IN C0Q PATIENT LIST
2209"RTN","C0QMU12",329,0)
2210 Q ZN
2211"RTN","C0QMU12",330,0)
2212 ;
2213"RTN","C0QMU12",331,0)
2214INLIST(ZLIST,DFN) ; EXTRINSIC FOR IS PATIENT ALREADY IN LIST ZLIST
2215"RTN","C0QMU12",332,0)
2216 N ZL,ZR
2217"RTN","C0QMU12",333,0)
2218 S ZL=$O(^C0Q(301,"CATTR",ZLIST,"")) ; IEN OF LIST IN C0Q PATIENT LIST FILE
2219"RTN","C0QMU12",334,0)
2220 I ZL="" Q 0 ; LIST DOES NOT EXIST
2221"RTN","C0QMU12",335,0)
2222 S ZR=0 ; ASSUME NOT IN LIST
2223"RTN","C0QMU12",336,0)
2224 I $D(^C0Q(301,ZL,1,"B",DFN)) S ZR=1 ; PATIENT IS IN LIST
2225"RTN","C0QMU12",337,0)
2226 Q ZR
2227"RTN","C0QMU12",338,0)
2228 ;
2229"RTN","C0QMU12",339,0)
2230LOCPAT(PREFIX,LOC) ;retrieve active outpatients
2231"RTN","C0QMU12",340,0)
2232 ; PREFIX WILL GO IN C0XLIST(PREFIX_"-PATIENT",DFN)=""
2233"RTN","C0QMU12",341,0)
2234 ; LOC IS HOSPITAL LOCATION
2235"RTN","C0QMU12",342,0)
2236 S ULOC=$O(^SC("B",LOC,"")) ; IEN OF HOSPITAL LOCATION
2237"RTN","C0QMU12",343,0)
2238 I ULOC="" D Q ; OOPS
2239"RTN","C0QMU12",344,0)
2240 . W !,"HOSPITAL LOCATION NOT FOUND: ",LOC
2241"RTN","C0QMU12",345,0)
2242 S IDTE=9999999-DTE ; INVERSE DATE
2243"RTN","C0QMU12",346,0)
2244 N ZI
2245"RTN","C0QMU12",347,0)
2246 S ZI="" ; BEGIN AT LATEST DATE FOR THIS LOC IN VISIT FILE
2247"RTN","C0QMU12",348,0)
2248 F S ZI=$O(^AUPNVSIT("AHL",ULOC,ZI)) Q:(ZI="")!(ZI>IDTE) D ; FOR EACH DATE
2249"RTN","C0QMU12",349,0)
2250 . W !,$$FMTE^XLFDT(9999999-ZI) ;B ;
2251"RTN","C0QMU12",350,0)
2252 . I ZI="" Q ;
2253"RTN","C0QMU12",351,0)
2254 . N ZJ S ZJ=""
2255"RTN","C0QMU12",352,0)
2256 . F S ZJ=$O(^AUPNVSIT("AHL",ULOC,ZI,ZJ)) Q:ZJ="" D ; FOR EACH VISIT
2257"RTN","C0QMU12",353,0)
2258 . . S DFN=$$GET1^DIQ(9000010,ZJ,.05,"I") ; PATIENT
2259"RTN","C0QMU12",354,0)
2260 . . S C0QLIST(PREFIX_"Patient",DFN)=""
2261"RTN","C0QMU12",355,0)
2262 Q
2263"RTN","C0QMU12",356,0)
2264 ;
2265"RTN","C0QMU12",357,0)
2266EPPAT(ZYR) ; BUILD ALL PATIENT LISTS FOR CLINICS
2267"RTN","C0QMU12",358,0)
2268 ;
2269"RTN","C0QMU12",359,0)
2270 S DTE=3111000
2271"RTN","C0QMU12",360,0)
2272 S MUYR=ZYR
2273"RTN","C0QMU12",361,0)
2274 N ZC,ZN
2275"RTN","C0QMU12",362,0)
2276 S ZN=0
2277"RTN","C0QMU12",363,0)
2278 N ZI S ZI=0
2279"RTN","C0QMU12",364,0)
2280 F S ZI=$O(^SC(ZI)) Q:+ZI=0 D ; FOR EVERY HOSPITAL LOCATION
2281"RTN","C0QMU12",365,0)
2282 . I $$GET1^DIQ(44,ZI_",",2,"I")'="C" Q ; NOT A CLINIC
2283"RTN","C0QMU12",366,0)
2284 . S ZC=$$GET1^DIQ(44,ZI_",",.01) ; NAME OF CLINIC
2285"RTN","C0QMU12",367,0)
2286 . S ZCIEN=ZI ; IEN OF CLINIC
2287"RTN","C0QMU12",368,0)
2288 . S ZN=ZN+1 ; COUNT OF CLINICS
2289"RTN","C0QMU12",369,0)
2290 . S PRE=MUYR_"-EP-"_ZC_"-"
2291"RTN","C0QMU12",370,0)
2292 . D LOCPAT(PRE,ZC)
2293"RTN","C0QMU12",371,0)
2294 W !,"NUMBER OF CLINICS: ",ZN
2295"RTN","C0QMU12",372,0)
2296 D FILE ; CREATE ALL THE EP PATIENT LISTS
2297"RTN","C0QMU12",373,0)
2298 Q
2299"RTN","C0QMU12",374,0)
2300 ;
2301"RTN","C0QMU12",375,0)
2302DOEP ; DO EP COMPUTATIONS
2303"RTN","C0QMU12",376,0)
2304 S ZYR="MU12-"
2305"RTN","C0QMU12",377,0)
2306 N C0QPARM,C0QCLNC
2307"RTN","C0QMU12",378,0)
2308 D INIT("C0QPARM","EP") ; INITIALIZE PARAMETERS
2309"RTN","C0QMU12",379,0)
2310 K C0QLIST ; CLEAR THE LIST
2311"RTN","C0QMU12",380,0)
2312 N ZI S ZI=""
2313"RTN","C0QMU12",381,0)
2314 F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ; FOR EACH EP
2315"RTN","C0QMU12",382,0)
2316 . S DTE=C0QPARM(ZI,"EPBeginDate") ; beginning of measurement period
2317"RTN","C0QMU12",383,0)
2318 . S EDTE=C0QPARM(ZI,"EPEndDate") ; end of measurement period -- tbd use this
2319"RTN","C0QMU12",384,0)
2320 . S C0QCLNC=C0QPARM(ZI,"CLINICS",1,1) ; only one clinic for now
2321"RTN","C0QMU12",385,0)
2322 . S PRE=ZYR_"EP-"_C0QCLNC_"-"
2323"RTN","C0QMU12",386,0)
2324 . D LOCPAT(PRE,C0QCLNC) ; GET THE PATIENTS
2325"RTN","C0QMU12",387,0)
2326 . I $D(DEBUG) D ZWRITE^C0QUTIL("C0QLIST")
2327"RTN","C0QMU12",388,0)
2328 . M C0QLIST(ZYR_"EP-ALL-PATIENTS")=C0QLIST(PRE_"Patient")
2329"RTN","C0QMU12",389,0)
2330 S DFN=""
2331"RTN","C0QMU12",390,0)
2332 S ZYR=ZYR_"EP-"
2333"RTN","C0QMU12",391,0)
2334 F S DFN=$O(C0QLIST(ZYR_"ALL-PATIENTS",DFN)) Q:DFN="" D ; EACH PATIENT
2335"RTN","C0QMU12",392,0)
2336 . D DEMO^C0QMU122
2337"RTN","C0QMU12",393,0)
2338 . D PROBLEM
2339"RTN","C0QMU12",394,0)
2340 . D ALLERGY
2341"RTN","C0QMU12",395,0)
2342 . ;D MEDS
2343"RTN","C0QMU12",396,0)
2344 . D ERX
2345"RTN","C0QMU12",397,0)
2346 . D SMOKING
2347"RTN","C0QMU12",398,0)
2348 . D VITALS
2349"RTN","C0QMU12",399,0)
2350 D FILE ; FILE THE PATIENT LISTS
2351"RTN","C0QMU12",400,0)
2352 ;
2353"RTN","C0QMU12",401,0)
2354 ; Now process eRx MU measures for these patients
2355"RTN","C0QMU12",402,0)
2356 ; Check for eRx template and code first; if they exist, run the code
2357"RTN","C0QMU12",403,0)
2358 I $D(^C0PX("B","GETMEDS6")),$L($T(SOAP^C0PWS2)) DO
2359"RTN","C0QMU12",404,0)
2360 . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data;
2361"RTN","C0QMU12",405,0)
2362 . D EN^C0QMUERX($$PATLN^C0QMU12(ZYR_"HasERX")) ; Pass the eRx patient list
2363"RTN","C0QMU12",406,0)
2364 ;
2365"RTN","C0QMU12",407,0)
2366 N C0QCIEN
2367"RTN","C0QMU12",408,0)
2368 S ZI=""
2369"RTN","C0QMU12",409,0)
2370 F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ;
2371"RTN","C0QMU12",410,0)
2372 . S C0QCIEN=C0QPARM(ZI,"EPMeasurementSet") ; ien of measurement set
2373"RTN","C0QMU12",411,0)
2374 . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data;
2375"RTN","C0QMU12",412,0)
2376 . D UPDATE^C0QUPDT(.G,C0QCIEN) ; UPDATE THE MU MEASUREMENT SET
2377"RTN","C0QMU12",413,0)
2378 Q
2379"RTN","C0QMU12",414,0)
2380 ;
2381"RTN","C0QMU12",415,0)
2382DIS ;
2383"RTN","C0QMU12",416,0)
2384 N DFN,DTE,EXDTE S DTE=""
2385"RTN","C0QMU12",417,0)
2386 F D Q:DTE=""
2387"RTN","C0QMU12",418,0)
2388 . S DTE=$O(^DGPM("B",DTE))
2389"RTN","C0QMU12",419,0)
2390 . Q:'DTE
2391"RTN","C0QMU12",420,0)
2392 . ;Q:$P(DTE,".")<3110703
2393"RTN","C0QMU12",421,0)
2394 . Q:$P(DTE,".")<3111000 ; NEW BEGIN DATE FOR FISCAL YEAR 2012
2395"RTN","C0QMU12",422,0)
2396 . S EXDTE=$$FMTE^XLFDT(DTE)
2397"RTN","C0QMU12",423,0)
2398 . N PTFM S PTFM=""
2399"RTN","C0QMU12",424,0)
2400 . D
2401"RTN","C0QMU12",425,0)
2402 . . S PTFM=$O(^DGPM("B",DTE,PTFM))
2403"RTN","C0QMU12",426,0)
2404 . . Q:'PTFM
2405"RTN","C0QMU12",427,0)
2406 . . S DFN=$P(^DGPM(PTFM,0),U,3)
2407"RTN","C0QMU12",428,0)
2408 . . S C0QLIST(ZYR_"Patient",DFN)=""
2409"RTN","C0QMU12",429,0)
2410 . . D DEMO^C0QMU122
2411"RTN","C0QMU12",430,0)
2412 . . D PROBLEM
2413"RTN","C0QMU12",431,0)
2414 . . D ALLERGY
2415"RTN","C0QMU12",432,0)
2416 . . D MEDS4
2417"RTN","C0QMU12",433,0)
2418 . . D RECON2
2419"RTN","C0QMU12",434,0)
2420 . . D ADVDIR
2421"RTN","C0QMU12",435,0)
2422 . . D SMOKING
2423"RTN","C0QMU12",436,0)
2424 . . D VITALS
2425"RTN","C0QMU12",437,0)
2426 . . ;D:$P(DTE,".")>3110912 VTE1
2427"RTN","C0QMU12",438,0)
2428 . . D VTE1
2429"RTN","C0QMU12",439,0)
2430 . . D COD
2431"RTN","C0QMU12",440,0)
2432 . . D EDTIME
2433"RTN","C0QMU12",441,0)
2434 . . I C0QPR D PRINT^C0QMU121
2435"RTN","C0QMU12",442,0)
2436 . . I C0QSS D SS^C0QMU121
2437"RTN","C0QMU12",443,0)
2438 . . I C0QPL D PATLIST^C0QMU121
2439"RTN","C0QMU12",444,0)
2440 Q
2441"RTN","C0QMU12",445,0)
2442 ;
2443"RTN","C0QMU12",446,0)
2444C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE
2445"RTN","C0QMU12",447,0)
2446C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE
2447"RTN","C0QMU12",448,0)
2448FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST
2449"RTN","C0QMU12",449,0)
2450 ;
2451"RTN","C0QMU12",450,0)
2452 I '$D(C0QLIST) Q ;
2453"RTN","C0QMU12",451,0)
2454 N LFN S LFN=$$C0QALFN()
2455"RTN","C0QMU12",452,0)
2456 N ZI,ZN
2457"RTN","C0QMU12",453,0)
2458 S ZI=""
2459"RTN","C0QMU12",454,0)
2460 F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ;
2461"RTN","C0QMU12",455,0)
2462 . S ZN=$O(^C0Q(301,"CATTR",ZI,""))
2463"RTN","C0QMU12",456,0)
2464 . I ZN="" D ; LIST NOT FOUND, CREATE IT
2465"RTN","C0QMU12",457,0)
2466 . . K C0QFDA
2467"RTN","C0QMU12",458,0)
2468 . . S FN=$$C0QPLF ; C0Q PATIENT LIST FILE
2469"RTN","C0QMU12",459,0)
2470 . . S C0QFDA(FN,"+1,",.01)=ZI
2471"RTN","C0QMU12",460,0)
2472 . . S C0QFDA(FN,"+1,",999)=ZI ; ATTRIBUTE
2473"RTN","C0QMU12",461,0)
2474 . . W !,"CREATING ",ZI
2475"RTN","C0QMU12",462,0)
2476 . . D UPDIE ; ADD THE RECORD
2477"RTN","C0QMU12",463,0)
2478 . . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) ; THE NEW IEN
2479"RTN","C0QMU12",464,0)
2480 . ;I ZN="" D Q ; OOPS
2481"RTN","C0QMU12",465,0)
2482 . ;. W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI
2483"RTN","C0QMU12",466,0)
2484 . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN
2485"RTN","C0QMU12",467,0)
2486 . N C0QNEW,C0QOLD,C0QRSLT
2487"RTN","C0QMU12",468,0)
2488 . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST
2489"RTN","C0QMU12",469,0)
2490 . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST
2491"RTN","C0QMU12",470,0)
2492 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW
2493"RTN","C0QMU12",471,0)
2494 . N ZJ,ZK
2495"RTN","C0QMU12",472,0)
2496 . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST
2497"RTN","C0QMU12",473,0)
2498 . K C0QFDA
2499"RTN","C0QMU12",474,0)
2500 . S ZJ=""
2501"RTN","C0QMU12",475,0)
2502 . F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY
2503"RTN","C0QMU12",476,0)
2504 . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE
2505"RTN","C0QMU12",477,0)
2506 . . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN
2507"RTN","C0QMU12",478,0)
2508 . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE"
2509"RTN","C0QMU12",479,0)
2510 . . . S $EC=",U1130580001," ; smh - instead of a BREAK
2511"RTN","C0QMU12",480,0)
2512 . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@"
2513"RTN","C0QMU12",481,0)
2514 . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS
2515"RTN","C0QMU12",482,0)
2516 . ; SECOND, PROCESS THE ADDITIONS
2517"RTN","C0QMU12",483,0)
2518 . K C0QFDA
2519"RTN","C0QMU12",484,0)
2520 . S ZJ="" S ZK=1
2521"RTN","C0QMU12",485,0)
2522 . F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0
2523"RTN","C0QMU12",486,0)
2524 . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ
2525"RTN","C0QMU12",487,0)
2526 . . S ZK=ZK+1
2527"RTN","C0QMU12",488,0)
2528 . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS
2529"RTN","C0QMU12",489,0)
2530 ;. Q
2531"RTN","C0QMU12",490,0)
2532 ;. K C0QFDA
2533"RTN","C0QMU12",491,0)
2534 ;. N ZJ,ZC
2535"RTN","C0QMU12",492,0)
2536 ;. S ZJ="" S ZC=1
2537"RTN","C0QMU12",493,0)
2538 ;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST
2539"RTN","C0QMU12",494,0)
2540 ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ
2541"RTN","C0QMU12",495,0)
2542 ;. . S ZC=ZC+1
2543"RTN","C0QMU12",496,0)
2544 ;. D UPDIE
2545"RTN","C0QMU12",497,0)
2546 ;. W !,"FOUND:"_ZI
2547"RTN","C0QMU12",498,0)
2548 Q
2549"RTN","C0QMU12",499,0)
2550 ;
2551"RTN","C0QMU12",500,0)
2552KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE
2553"RTN","C0QMU12",501,0)
2554 ;
2555"RTN","C0QMU12",502,0)
2556 N C0QFDA,ZFN,LIST,ATTR
2557"RTN","C0QMU12",503,0)
2558 S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE
2559"RTN","C0QMU12",504,0)
2560 D CLEAN^DILF
2561"RTN","C0QMU12",505,0)
2562 S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME
2563"RTN","C0QMU12",506,0)
2564 S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE
2565"RTN","C0QMU12",507,0)
2566 D CLEAN^DILF
2567"RTN","C0QMU12",508,0)
2568 K ZERR
2569"RTN","C0QMU12",509,0)
2570 S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE
2571"RTN","C0QMU12",510,0)
2572 D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE
2573"RTN","C0QMU12",511,0)
2574 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
2575"RTN","C0QMU12",512,0)
2576 ;. W "ERROR",!
2577"RTN","C0QMU12",513,0)
2578 ;. ZWR ZERR
2579"RTN","C0QMU12",514,0)
2580 ;. B
2581"RTN","C0QMU12",515,0)
2582 K C0QFDA
2583"RTN","C0QMU12",516,0)
2584 S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD
2585"RTN","C0QMU12",517,0)
2586 S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE
2587"RTN","C0QMU12",518,0)
2588 D UPDIE ; CREATE THE SUBFILE
2589"RTN","C0QMU12",519,0)
2590 N ZR ; NEW IEN FOR THE RECORD
2591"RTN","C0QMU12",520,0)
2592 S ZR=$O(^C0Q(301,"CATTR",ATTR,""))
2593"RTN","C0QMU12",521,0)
2594 ;
2595"RTN","C0QMU12",522,0)
2596 Q ZR
2597"RTN","C0QMU12",523,0)
2598 ;
2599"RTN","C0QMU12",524,0)
2600UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
2601"RTN","C0QMU12",525,0)
2602 K ZERR
2603"RTN","C0QMU12",526,0)
2604 D CLEAN^DILF
2605"RTN","C0QMU12",527,0)
2606 D UPDATE^DIE("","C0QFDA","","ZERR")
2607"RTN","C0QMU12",528,0)
2608 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
2609"RTN","C0QMU12",529,0)
2610 K C0QFDA
2611"RTN","C0QMU12",530,0)
2612 Q
2613"RTN","C0QMU12",531,0)
2614 ;
2615"RTN","C0QMU12",532,0)
2616END ;end of C0QPRML;
2617"RTN","C0QMUERX")
26180^1^B83723794
2619"RTN","C0QMUERX",1,0)
2620C0QMUERX ; VEN - Analyze ERx Data for Patients ; 9/17/12 1:16pm
2621"RTN","C0QMUERX",2,0)
2622 ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32
2623"RTN","C0QMUERX",3,0)
2624 QUIT ; No Entry from the top
2625"RTN","C0QMUERX",4,0)
2626 ;
2627"RTN","C0QMUERX",5,0)
2628UT ; Unit Tests
2629"RTN","C0QMUERX",6,0)
2630 N C0QDEBUG S C0QDEBUG=1
2631"RTN","C0QMUERX",7,0)
2632 W "Testing ^DPT B Index",!
2633"RTN","C0QMUERX",8,0)
2634 D EN("^DPT(""B"")")
2635"RTN","C0QMUERX",9,0)
2636 W !,"Testing B Index on a C0Q Patient List",!
2637"RTN","C0QMUERX",10,0)
2638 D EN("^C0Q(301,4,1,""B"")")
2639"RTN","C0QMUERX",11,0)
2640 W !,"Testing ^AUPNPAT B Index",!
2641"RTN","C0QMUERX",12,0)
2642 D EN("^AUPNPAT(""B"")")
2643"RTN","C0QMUERX",13,0)
2644 W !,"Testing Reminder Patient List B Index",!
2645"RTN","C0QMUERX",14,0)
2646 D EN("^PXRMXP(810.5,80,30,""B"")")
2647"RTN","C0QMUERX",15,0)
2648 W !,"Testing upright file ^DPT",!
2649"RTN","C0QMUERX",16,0)
2650 D EN("^DPT")
2651"RTN","C0QMUERX",17,0)
2652 W !,"Testing a file with no data",!
2653"RTN","C0QMUERX",18,0)
2654 D EN("^ALKJSDF")
2655"RTN","C0QMUERX",19,0)
2656 W !,"Testing a no valid parameters",!
2657"RTN","C0QMUERX",20,0)
2658 D EN("")
2659"RTN","C0QMUERX",21,0)
2660UT2 ; Units Tests 2
2661"RTN","C0QMUERX",22,0)
2662 N C0QDEBUG S C0QDEBUG=1
2663"RTN","C0QMUERX",23,0)
2664 D EN("^C0Q(301,4,1,""B"")")
2665"RTN","C0QMUERX",24,0)
2666 QUIT
2667"RTN","C0QMUERX",25,0)
2668UT3 ; More Unit Tests
2669"RTN","C0QMUERX",26,0)
2670 N C0QDEBUG S C0QDEBUG=1
2671"RTN","C0QMUERX",27,0)
2672 D EN($$PATLN^C0QMU12("MU12-EP-HasERX"))
2673"RTN","C0QMUERX",28,0)
2674 W $$COUNT($$PATLN^C0QMU12("MU12-EP-HasERX"))
2675"RTN","C0QMUERX",29,0)
2676 QUIT
2677"RTN","C0QMUERX",30,0)
2678EN(C0QLIST) ; PEP - Analyze ERx Data and store
2679"RTN","C0QMUERX",31,0)
2680 ; Parameters:
2681"RTN","C0QMUERX",32,0)
2682 ; C0QLIST - Pass by Name. Global or Local Reference.
2683"RTN","C0QMUERX",33,0)
2684 ; Can be: ^DPT("B") for all patients or ^C0Q(301,2,1,"B") for a specific patient list
2685"RTN","C0QMUERX",34,0)
2686 ; Future: Can be a search template on file 2 or 9000001
2687"RTN","C0QMUERX",35,0)
2688 ;
2689"RTN","C0QMUERX",36,0)
2690 ; Check if XML Soap Message is installed
2691"RTN","C0QMUERX",37,0)
2692 I '$D(^C0PX("B","GETMEDS6")) WRITE "GETMEDS6 Soap Message not installed",! QUIT
2693"RTN","C0QMUERX",38,0)
2694 ;
2695"RTN","C0QMUERX",39,0)
2696 ; Check if SOAP^C0PWS2 exists
2697"RTN","C0QMUERX",40,0)
2698 I '$L($T(SOAP^C0PWS2)) WRITE "C0PWS2 Doesn't exist",! QUIT
2699"RTN","C0QMUERX",41,0)
2700 ;
2701"RTN","C0QMUERX",42,0)
2702 ; Check C0QLIST for sanity. Must be a single node.
2703"RTN","C0QMUERX",43,0)
2704 IF '($DATA(C0QLIST)#2)!(C0QLIST="") WRITE "You didn't pass the list",! QUIT
2705"RTN","C0QMUERX",44,0)
2706 ;
2707"RTN","C0QMUERX",45,0)
2708 ; Contents must be a Reference with Data
2709"RTN","C0QMUERX",46,0)
2710 IF '$DATA(@C0QLIST) WRITE "Destination doesn't contain any data",! QUIT
2711"RTN","C0QMUERX",47,0)
2712 ;
2713"RTN","C0QMUERX",48,0)
2714 ; Is this a B index?
2715"RTN","C0QMUERX",49,0)
2716 NEW C0QB
2717"RTN","C0QMUERX",50,0)
2718 IF $QSUBSCRIPT(C0QLIST,$QLENGTH(C0QLIST))="B" DO
2719"RTN","C0QMUERX",51,0)
2720 . SET C0QB=1
2721"RTN","C0QMUERX",52,0)
2722 . ; DEBUG
2723"RTN","C0QMUERX",53,0)
2724 . W:$G(C0QDEBUG) "B index passed",!
2725"RTN","C0QMUERX",54,0)
2726 . ; DEBUG
2727"RTN","C0QMUERX",55,0)
2728 ELSE SET C0QB=0
2729"RTN","C0QMUERX",56,0)
2730 ;
2731"RTN","C0QMUERX",57,0)
2732 ; Make sure our TMP is empty
2733"RTN","C0QMUERX",58,0)
2734 K ^TMP($J)
2735"RTN","C0QMUERX",59,0)
2736 ;
2737"RTN","C0QMUERX",60,0)
2738 ; Walk the global
2739"RTN","C0QMUERX",61,0)
2740 N C0QWALK S C0QWALK=$SELECT(C0QB:"",'C0QB:0) ; Walker, start of $ORDER?
2741"RTN","C0QMUERX",62,0)
2742 N C0QDONE S C0QDONE=0 ; Finish Flag
2743"RTN","C0QMUERX",63,0)
2744 FOR SET C0QWALK=$O(@C0QLIST@(C0QWALK)) QUIT:C0QDONE DO
2745"RTN","C0QMUERX",64,0)
2746 . ; Are we done?
2747"RTN","C0QMUERX",65,0)
2748 . I C0QB,C0QWALK="" S C0QDONE=1 QUIT ; If in index and we are out, done
2749"RTN","C0QMUERX",66,0)
2750 . I 'C0QB,'+C0QWALK S C0QDONE=1 QUIT ; If not in index and we are not numeric, done
2751"RTN","C0QMUERX",67,0)
2752 . ;
2753"RTN","C0QMUERX",68,0)
2754 . N C0QDFN ; DFN of Patient
2755"RTN","C0QMUERX",69,0)
2756 . ; If Walking B Index and Index not numeric, grab DFN (assuming ^DPT or ^AUPNPAT)
2757"RTN","C0QMUERX",70,0)
2758 . ; TODO: Should I check that the global is ^DPT or ^AUPNPAT?
2759"RTN","C0QMUERX",71,0)
2760 . I C0QB,'+C0QWALK S C0QDFN=$O(@C0QLIST@(C0QWALK,""))
2761"RTN","C0QMUERX",72,0)
2762 . ; Otherwise, we will assume the contents of the index are the DFNs
2763"RTN","C0QMUERX",73,0)
2764 . E S C0QDFN=C0QWALK
2765"RTN","C0QMUERX",74,0)
2766 . I $G(C0QDEBUG) W C0QDFN," "
2767"RTN","C0QMUERX",75,0)
2768 . ;
2769"RTN","C0QMUERX",76,0)
2770 . ; Now, check to see if the patient has e-Rx's
2771"RTN","C0QMUERX",77,0)
2772 . I $$HASERX(C0QDFN) S ^TMP($J,C0QDFN)=""
2773"RTN","C0QMUERX",78,0)
2774 ;
2775"RTN","C0QMUERX",79,0)
2776 W:$G(C0QDEBUG) ! ;
2777"RTN","C0QMUERX",80,0)
2778 ;
2779"RTN","C0QMUERX",81,0)
2780 ; Loop through collected DFNs, send to WS, and get data back, store in ^TMP($J,DFN)
2781"RTN","C0QMUERX",82,0)
2782 N C0QDFN S C0QDFN=0
2783"RTN","C0QMUERX",83,0)
2784 F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO
2785"RTN","C0QMUERX",84,0)
2786 . N C0POUT
2787"RTN","C0QMUERX",85,0)
2788 . W:$G(C0QDEBUG) "Calling GETMEDS6 SOAP Web Service Call for "_C0QDFN,!
2789"RTN","C0QMUERX",86,0)
2790 . D SOAP^C0PWS2("C0POUT","GETMEDS6",DUZ,C0QDFN)
2791"RTN","C0QMUERX",87,0)
2792 . Q:$G(C0POUT(1,"RowCount"))=0 ; WS says no data
2793"RTN","C0QMUERX",88,0)
2794 . M ^TMP($J,C0QDFN)=C0POUT
2795"RTN","C0QMUERX",89,0)
2796 ;
2797"RTN","C0QMUERX",90,0)
2798 ; From the New Crop Meaningful Use documentation:
2799"RTN","C0QMUERX",91,0)
2800 ; Appendix G: Meaningful Use Certification FAQ Question 10
2801"RTN","C0QMUERX",92,0)
2802 ;
2803"RTN","C0QMUERX",93,0)
2804 ; DENOMINATOR NUMERATOR
2805"RTN","C0QMUERX",94,0)
2806 ; DeaClassCode = 0, 9 DeaClassCode = 0, 9
2807"RTN","C0QMUERX",95,0)
2808 ; PharmacyType = 1 PharmacyType = 1
2809"RTN","C0QMUERX",96,0)
2810 ; PharmacyDetailType = 1, 2 PharmacyDetailType = 1, 2
2811"RTN","C0QMUERX",97,0)
2812 ; FinalDestinationType = 1, 2, 3, 4 FinalDestinationType = 3, 4
2813"RTN","C0QMUERX",98,0)
2814 ; FinalStatusType = 1, 4, 5 FinalStatusType = 1, 5
2815"RTN","C0QMUERX",99,0)
2816 ;
2817"RTN","C0QMUERX",100,0)
2818 ; DeMorgan's Law
2819"RTN","C0QMUERX",101,0)
2820 ; NOT(A or B) = NOT(A) and NOT(B)
2821"RTN","C0QMUERX",102,0)
2822 ; So to collect prescriptions for which DeaClassCode is 0 or 9
2823"RTN","C0QMUERX",103,0)
2824 ; We exclude all those who are not 0 AND not 9.
2825"RTN","C0QMUERX",104,0)
2826 ; See: http://en.wikipedia.org/wiki/De_Morgan%27s_laws#Negation_of_a_disjunction
2827"RTN","C0QMUERX",105,0)
2828 ;
2829"RTN","C0QMUERX",106,0)
2830 ; The algorithms below use an Onion Peeling method. Any prescription which
2831"RTN","C0QMUERX",107,0)
2832 ; fails makes you jump to the next prescription.
2833"RTN","C0QMUERX",108,0)
2834 ; The "Onion levels" are:
2835"RTN","C0QMUERX",109,0)
2836 ; DeaClassCode, PharamcyType, PharmacyDetailType, FinalDestinationType, FinalStatusType
2837"RTN","C0QMUERX",110,0)
2838 ;
2839"RTN","C0QMUERX",111,0)
2840 ; Now walk through collected DFNs and accumulate MU stats
2841"RTN","C0QMUERX",112,0)
2842 ;
2843"RTN","C0QMUERX",113,0)
2844 ; WARNING: Naked References below
2845"RTN","C0QMUERX",114,0)
2846 ;
2847"RTN","C0QMUERX",115,0)
2848 N C0QDFN,C0QRXNO S (C0QDFN,C0QRXNO)=0
2849"RTN","C0QMUERX",116,0)
2850 N C0QD S C0QD=0 ; Denominator - Overall (cf C0QDP below)
2851"RTN","C0QMUERX",117,0)
2852 ;
2853"RTN","C0QMUERX",118,0)
2854 ; Calculate Denominator below
2855"RTN","C0QMUERX",119,0)
2856 F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO
2857"RTN","C0QMUERX",120,0)
2858 . N C0QDP S C0QDP=0 ; Denominator - Patient Specific
2859"RTN","C0QMUERX",121,0)
2860 . F S C0QRXNO=$O(^TMP($J,C0QDFN,C0QRXNO)) Q:C0QRXNO="" DO
2861"RTN","C0QMUERX",122,0)
2862 .. W:$G(C0QDEBUG) "Patient "_C0QDFN_" Rx "_C0QRXNO,!
2863"RTN","C0QMUERX",123,0)
2864 .. ;
2865"RTN","C0QMUERX",124,0)
2866 .. I ^(C0QRXNO,"DeaClassCode") ; Change $REFERENCE
2867"RTN","C0QMUERX",125,0)
2868 .. ;
2869"RTN","C0QMUERX",126,0)
2870 .. N DEA S DEA=^("DeaClassCode")
2871"RTN","C0QMUERX",127,0)
2872 .. W:$G(C0QDEBUG) "DeaClassCode: "_DEA,!
2873"RTN","C0QMUERX",128,0)
2874 .. Q:((DEA'=0)&(DEA'=9))
2875"RTN","C0QMUERX",129,0)
2876 .. ;
2877"RTN","C0QMUERX",130,0)
2878 .. N PT S PT=^("PharmacyType")
2879"RTN","C0QMUERX",131,0)
2880 .. W:$G(C0QDEBUG) "PharmacyType: "_PT,!
2881"RTN","C0QMUERX",132,0)
2882 .. Q:(PT'=1)
2883"RTN","C0QMUERX",133,0)
2884 .. ;
2885"RTN","C0QMUERX",134,0)
2886 .. N PDT S PDT=^("PharmacyDetailType")
2887"RTN","C0QMUERX",135,0)
2888 .. W:$G(C0QDEBUG) "PharmacyDetailType: "_PDT,!
2889"RTN","C0QMUERX",136,0)
2890 .. Q:((PDT'=1)&(PDT'=2))
2891"RTN","C0QMUERX",137,0)
2892 .. ;
2893"RTN","C0QMUERX",138,0)
2894 .. N FDT S FDT=^("FinalDestinationType")
2895"RTN","C0QMUERX",139,0)
2896 .. W:$G(C0QDEBUG) "FinalDestinationType: "_FDT,!
2897"RTN","C0QMUERX",140,0)
2898 .. Q:((FDT'=1)&(FDT'=2)&(FDT'=3)&(FDT'=4))
2899"RTN","C0QMUERX",141,0)
2900 .. ;
2901"RTN","C0QMUERX",142,0)
2902 .. N FST S FST=^("FinalStatusType")
2903"RTN","C0QMUERX",143,0)
2904 .. W:$G(C0QDEBUG) "FinalStatusType: "_FST,!
2905"RTN","C0QMUERX",144,0)
2906 .. Q:((FST'=1)&(FST'=4)&(FST'=5))
2907"RTN","C0QMUERX",145,0)
2908 .. ;
2909"RTN","C0QMUERX",146,0)
2910 .. W:$G(C0QDEBUG) "Adding to Denominator",!
2911"RTN","C0QMUERX",147,0)
2912 .. S C0QDP=C0QDP+1
2913"RTN","C0QMUERX",148,0)
2914 .. S C0QD=C0QD+1
2915"RTN","C0QMUERX",149,0)
2916 . ;
2917"RTN","C0QMUERX",150,0)
2918 . ; SAVE C0QDP - while it lasts!
2919"RTN","C0QMUERX",151,0)
2920 . D SAVE(C0QLIST,C0QDFN,"ERXDEN",C0QDP)
2921"RTN","C0QMUERX",152,0)
2922 ;
2923"RTN","C0QMUERX",153,0)
2924 ; Calculate Numerator below
2925"RTN","C0QMUERX",154,0)
2926 N C0QDFN,C0QRXNO S (C0QDFN,C0QRXNO)=0
2927"RTN","C0QMUERX",155,0)
2928 N C0QN S C0QN=0 ; Numerator - Overall (cf C0QNP below)
2929"RTN","C0QMUERX",156,0)
2930 F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO
2931"RTN","C0QMUERX",157,0)
2932 . N C0QNP S C0QNP=0 ; Numerator - Patient Specific
2933"RTN","C0QMUERX",158,0)
2934 . F S C0QRXNO=$O(^TMP($J,C0QDFN,C0QRXNO)) Q:C0QRXNO="" DO
2935"RTN","C0QMUERX",159,0)
2936 .. W:$G(C0QDEBUG) "Patient "_C0QDFN_" Rx "_C0QRXNO,!
2937"RTN","C0QMUERX",160,0)
2938 .. ;
2939"RTN","C0QMUERX",161,0)
2940 .. I ^(C0QRXNO,"DeaClassCode") ; Change $REFERENCE
2941"RTN","C0QMUERX",162,0)
2942 .. ;
2943"RTN","C0QMUERX",163,0)
2944 .. N DEA S DEA=^("DeaClassCode")
2945"RTN","C0QMUERX",164,0)
2946 .. W:$G(C0QDEBUG) "DeaClassCode: "_DEA,!
2947"RTN","C0QMUERX",165,0)
2948 .. Q:((DEA'=0)&(DEA'=9))
2949"RTN","C0QMUERX",166,0)
2950 .. ;
2951"RTN","C0QMUERX",167,0)
2952 .. N PT S PT=^("PharmacyType")
2953"RTN","C0QMUERX",168,0)
2954 .. W:$G(C0QDEBUG) "PharmacyType: "_PT,!
2955"RTN","C0QMUERX",169,0)
2956 .. Q:(PT'=1)
2957"RTN","C0QMUERX",170,0)
2958 .. ;
2959"RTN","C0QMUERX",171,0)
2960 .. N PDT S PDT=^("PharmacyDetailType")
2961"RTN","C0QMUERX",172,0)
2962 .. W:$G(C0QDEBUG) "PharmacyDetailType: "_PDT,!
2963"RTN","C0QMUERX",173,0)
2964 .. Q:((PDT'=1)&(PDT'=2))
2965"RTN","C0QMUERX",174,0)
2966 .. ;
2967"RTN","C0QMUERX",175,0)
2968 .. N FDT S FDT=^("FinalDestinationType")
2969"RTN","C0QMUERX",176,0)
2970 .. W:$G(C0QDEBUG) "FinalDestinationType: "_FDT,!
2971"RTN","C0QMUERX",177,0)
2972 .. Q:((FDT'=3)&(FDT'=4))
2973"RTN","C0QMUERX",178,0)
2974 .. ;
2975"RTN","C0QMUERX",179,0)
2976 .. N FST S FST=^("FinalStatusType")
2977"RTN","C0QMUERX",180,0)
2978 .. W:$G(C0QDEBUG) "FinalStatusType: "_FST,!
2979"RTN","C0QMUERX",181,0)
2980 .. Q:((FST'=1)&(FST'=5))
2981"RTN","C0QMUERX",182,0)
2982 .. ;
2983"RTN","C0QMUERX",183,0)
2984 .. W:$G(C0QDEBUG) "Adding to Numerator",!
2985"RTN","C0QMUERX",184,0)
2986 .. S C0QNP=C0QNP+1
2987"RTN","C0QMUERX",185,0)
2988 .. S C0QN=C0QN+1
2989"RTN","C0QMUERX",186,0)
2990 . ;
2991"RTN","C0QMUERX",187,0)
2992 . ; Save C0QNP while it lasts
2993"RTN","C0QMUERX",188,0)
2994 . D SAVE(C0QLIST,C0QDFN,"ERXNUM",C0QNP)
2995"RTN","C0QMUERX",189,0)
2996 ;
2997"RTN","C0QMUERX",190,0)
2998 S ^TMP($J)=C0QN_U_C0QD
2999"RTN","C0QMUERX",191,0)
3000 ;
3001"RTN","C0QMUERX",192,0)
3002 ; TODO: Over here, do something with the numerator and denominator..
3003"RTN","C0QMUERX",193,0)
3004 ; Probably store them somewhere.
3005"RTN","C0QMUERX",194,0)
3006 ;
3007"RTN","C0QMUERX",195,0)
3008 I '$G(C0QDEBUG) K ^TMP($J) ; Empty out in production not testing
3009"RTN","C0QMUERX",196,0)
3010 QUIT
3011"RTN","C0QMUERX",197,0)
3012 ;
3013"RTN","C0QMUERX",198,0)
3014HASERX(DFN) ; $$ - Private; Has E-Prescriptions?
3015"RTN","C0QMUERX",199,0)
3016 ; Parameters
3017"RTN","C0QMUERX",200,0)
3018 ; - DFN by Value
3019"RTN","C0QMUERX",201,0)
3020 ; Output
3021"RTN","C0QMUERX",202,0)
3022 ; 0 or 1 (false or true)
3023"RTN","C0QMUERX",203,0)
3024 N ZI S ZI=""
3025"RTN","C0QMUERX",204,0)
3026 N ZERX S ZERX=$NA(^PS(55,DFN,"NVA"))
3027"RTN","C0QMUERX",205,0)
3028 N DONE,HASERX
3029"RTN","C0QMUERX",206,0)
3030 F S ZI=$O(@ZERX@(ZI)) Q:ZI="" Q:$G(DONE) D
3031"RTN","C0QMUERX",207,0)
3032 . I $G(@ZERX@(ZI,1,1,0))["E-Rx Web" S (DONE,HASERX)=1
3033"RTN","C0QMUERX",208,0)
3034 Q +$G(HASERX)
3035"RTN","C0QMUERX",209,0)
3036 ;
3037"RTN","C0QMUERX",210,0)
3038SAVE(C0QLIST,C0QDFN,TYPE,COUNT) ; Proc - Private; Save Count in C0Q(301, file
3039"RTN","C0QMUERX",211,0)
3040 ; Layman's Explanation: Save the denominator or numerator for ePrescribing for
3041"RTN","C0QMUERX",212,0)
3042 ; each of the patients in the Subfile for that patient in ^C0Q(301,
3043"RTN","C0QMUERX",213,0)
3044 ; Still hard to understand though! Here's a demo:
3045"RTN","C0QMUERX",214,0)
3046 ; ^C0Q(301,IEN has a subfile under node 1 which stores the patients. E.g.
3047"RTN","C0QMUERX",215,0)
3048 ; ^C0Q(301,48,1,15,0)=91$
3049"RTN","C0QMUERX",216,0)
3050 ; ^C0Q(301,48,1,16,0)=93$
3051"RTN","C0QMUERX",217,0)
3052 ; ^C0Q(301,48,1,17,0)=173$
3053"RTN","C0QMUERX",218,0)
3054 ;
3055"RTN","C0QMUERX",219,0)
3056 ; I store the numerator and denominator under each of the patients. The numerator
3057"RTN","C0QMUERX",220,0)
3058 ; stands for the number of prescriptions that were electronically transmitted;
3059"RTN","C0QMUERX",221,0)
3060 ; the denominator stands for the numbers of prescriptions that COULD HAVE BEEN
3061"RTN","C0QMUERX",222,0)
3062 ; electronically transmitted. End result for Patient 173 is as follows:
3063"RTN","C0QMUERX",223,0)
3064 ; ^C0Q(301,48,1,17,0)=173
3065"RTN","C0QMUERX",224,0)
3066 ; ^C0Q(301,48,1,17,1,0)="^1130580001.3111^2^2"
3067"RTN","C0QMUERX",225,0)
3068 ; ^C0Q(301,48,1,17,1,1,0)="ERXDEN^0"
3069"RTN","C0QMUERX",226,0)
3070 ; ^C0Q(301,48,1,17,1,2,0)="ERXNUM^0"
3071"RTN","C0QMUERX",227,0)
3072 ; ^C0Q(301,48,1,17,1,"B","ERXDEN",1)=""
3073"RTN","C0QMUERX",228,0)
3074 ; ^C0Q(301,48,1,17,1,"B","ERXNUM",2)=""
3075"RTN","C0QMUERX",229,0)
3076 ;
3077"RTN","C0QMUERX",230,0)
3078 ; Subroutine COUNT (below) goes and counts the data
3079"RTN","C0QMUERX",231,0)
3080 ;
3081"RTN","C0QMUERX",232,0)
3082 ; Params:
3083"RTN","C0QMUERX",233,0)
3084 ; C0QLIST (by val): "B" x-ref where patients are located. Only supports ^C0Q(301, file.
3085"RTN","C0QMUERX",234,0)
3086 ; C0QDFN (by val): Patient DFN for whom to file data.
3087"RTN","C0QMUERX",235,0)
3088 ; TYPE (by val): Either ERXDEN or ERXNUM for eRx Denominator or eRx Numerator
3089"RTN","C0QMUERX",236,0)
3090 ; COUNT (by val): The number to save
3091"RTN","C0QMUERX",237,0)
3092 ;
3093"RTN","C0QMUERX",238,0)
3094 ; First, QUIT if this isn't a Quality Measures List?
3095"RTN","C0QMUERX",239,0)
3096 ; $QS(x,0) gets you the global name
3097"RTN","C0QMUERX",240,0)
3098 ;
3099"RTN","C0QMUERX",241,0)
3100 ; This should give you an idea of what I am dealing with!
3101"RTN","C0QMUERX",242,0)
3102 ;
3103"RTN","C0QMUERX",243,0)
3104 ; ^C0Q(301,48,1,15,0)=91
3105"RTN","C0QMUERX",244,0)
3106 ; ^C0Q(301,48,1,16,0)=93
3107"RTN","C0QMUERX",245,0)
3108 ; ^C0Q(301,48,1,17,0)=173
3109"RTN","C0QMUERX",246,0)
3110 ; ^C0Q(301,48,1,18,0)=174
3111"RTN","C0QMUERX",247,0)
3112 ; ^C0Q(301,48,1,"B",5,1)=""
3113"RTN","C0QMUERX",248,0)
3114 ; ^C0Q(301,48,1,"B",10,2)=""
3115"RTN","C0QMUERX",249,0)
3116 ; ^C0Q(301,48,1,"B",11,3)=""
3117"RTN","C0QMUERX",250,0)
3118 ; ^C0Q(301,48,1,"B",14,4)=""
3119"RTN","C0QMUERX",251,0)
3120 ;
3121"RTN","C0QMUERX",252,0)
3122 I $QS(C0QLIST,0)'="^C0Q" W:$G(C0QDEBUG) "Not Saving Patient "_C0QDFN,! QUIT
3123"RTN","C0QMUERX",253,0)
3124 ;
3125"RTN","C0QMUERX",254,0)
3126 ; Otherwise, prepare to save
3127"RTN","C0QMUERX",255,0)
3128 N C0QFDA ; Fileman Data Array
3129"RTN","C0QMUERX",256,0)
3130 N C0QIENS ; IENS
3131"RTN","C0QMUERX",257,0)
3132 N L1,L2 ; Top Level, Level 2
3133"RTN","C0QMUERX",258,0)
3134 S L1=$QS(C0QLIST,2) ; Top Level IEN
3135"RTN","C0QMUERX",259,0)
3136 S L2=$O(^C0Q(301,L1,1,"B",C0QDFN,"")) ; Patient IEN
3137"RTN","C0QMUERX",260,0)
3138 S C0QIENS="?+1"_C0QDFN_","_L2_","_L1_"," ; TODO: Here C0QDFN is a dummy for uniqueness in FDA, not meaningful! - DO BETTER!
3139"RTN","C0QMUERX",261,0)
3140 W:$G(C0QDEBUG) "IENs "_C0QIENS_" ready to file",!
3141"RTN","C0QMUERX",262,0)
3142 W:$G(C0QDEBUG) "Saving "_TYPE_" of "_COUNT_" for Patient "_$P(^DPT(C0QDFN,0),U)_" ("_C0QDFN_")",!
3143"RTN","C0QMUERX",263,0)
3144 S C0QFDA(1130580001.3111,C0QIENS,.01)=TYPE
3145"RTN","C0QMUERX",264,0)
3146 S C0QFDA(1130580001.3111,C0QIENS,.02)=COUNT
3147"RTN","C0QMUERX",265,0)
3148 ;
3149"RTN","C0QMUERX",266,0)
3150 W:$G(C0QDEBUG) "Fileman Data Array",!
3151"RTN","C0QMUERX",267,0)
3152 I $G(C0QDEBUG) N % S %=$NA(C0QFDA) F S %=$Q(@%) Q:%="" W %_": "_@%,!
3153"RTN","C0QMUERX",268,0)
3154 ;
3155"RTN","C0QMUERX",269,0)
3156 N C0QERR ; Errors
3157"RTN","C0QMUERX",270,0)
3158 D UPDATE^DIE("","C0QFDA","","C0QERR")
3159"RTN","C0QMUERX",271,0)
3160 ;
3161"RTN","C0QMUERX",272,0)
3162 I $D(C0QERR) DO
3163"RTN","C0QMUERX",273,0)
3164 . W "Error in filing data",!
3165"RTN","C0QMUERX",274,0)
3166 . N % S %=$NAME(C0QERR) F S %=$Q(@%) Q:%="" W %_": "_@%,!
3167"RTN","C0QMUERX",275,0)
3168 ;
3169"RTN","C0QMUERX",276,0)
3170 QUIT
3171"RTN","C0QMUERX",277,0)
3172 ;
3173"RTN","C0QMUERX",278,0)
3174COUNT(C0QLIST) ; $$ - Private; Count Numerator and Denominator for a Patient List
3175"RTN","C0QMUERX",279,0)
3176 ; Input: C0QLIST - Pass by Value - Patient Listing B index (only C0Q(301,IEN,1,"B", listing is supported)
3177"RTN","C0QMUERX",280,0)
3178 ; Output: (as string) NUMERATOR/DENOMINATOR
3179"RTN","C0QMUERX",281,0)
3180 ; Optional Symtab input: C0QDEBUG to print out debug messages to STDOUT.
3181"RTN","C0QMUERX",282,0)
3182 ;
3183"RTN","C0QMUERX",283,0)
3184 I $QS(C0QLIST,0)'="^C0Q" W:$G(C0QDEBUG) "Counting for files other than C0Q(301, not supported ",! QUIT "0/0"
3185"RTN","C0QMUERX",284,0)
3186 ; MEASURE -----------
3187"RTN","C0QMUERX",285,0)
3188 ; IEN ----------- |
3189"RTN","C0QMUERX",286,0)
3190 ; L1 ------| | |
3191"RTN","C0QMUERX",287,0)
3192 ; V V V
3193"RTN","C0QMUERX",288,0)
3194 ; ^C0Q(301,48,1,2,1,1,0)="ERXDEN^0"
3195"RTN","C0QMUERX",289,0)
3196 ; ^C0Q(301,48,1,2,1,2,0)="ERXNUM^0"
3197"RTN","C0QMUERX",290,0)
3198 ; ^C0Q(301,48,1,2,1,"B","ERXDEN",1)=""
3199"RTN","C0QMUERX",291,0)
3200 ; ^C0Q(301,48,1,2,1,"B","ERXNUM",2)=""
3201"RTN","C0QMUERX",292,0)
3202 ; ^C0Q(301,48,1,2,1,"B"
3203"RTN","C0QMUERX",293,0)
3204 W:$G(C0QDEBUG) "DFN",?20,"Denominator",?40,"Numerator",!
3205"RTN","C0QMUERX",294,0)
3206 ;
3207"RTN","C0QMUERX",295,0)
3208 N L1 S L1=$QS(C0QLIST,2) ; Top Level IEN
3209"RTN","C0QMUERX",296,0)
3210 ;
3211"RTN","C0QMUERX",297,0)
3212 N DENTOT,NUMTOT S (DENTOT,NUMTOT)=0 ; Denominator Total, Numerator Total
3213"RTN","C0QMUERX",298,0)
3214 ;
3215"RTN","C0QMUERX",299,0)
3216 N C0QDFN S C0QDFN=0 ; Walker through B index
3217"RTN","C0QMUERX",300,0)
3218 F S C0QDFN=$O(^C0Q(301,L1,1,"B",C0QDFN)) Q:C0QDFN="" DO
3219"RTN","C0QMUERX",301,0)
3220 . N IEN S IEN=$O(^(C0QDFN,"")) ; naked naked - get IEN from B index
3221"RTN","C0QMUERX",302,0)
3222 . W:$G(C0QDEBUG) C0QDFN
3223"RTN","C0QMUERX",303,0)
3224 . ;
3225"RTN","C0QMUERX",304,0)
3226 . ; Denom Processing
3227"RTN","C0QMUERX",305,0)
3228 . N DENIEN S DENIEN=$O(^C0Q(301,L1,1,IEN,1,"B","ERXDEN","")) ; Denom IEN
3229"RTN","C0QMUERX",306,0)
3230 . N DEN S DEN=$S(DENIEN:$P(^C0Q(301,L1,1,IEN,1,DENIEN,0),U,2),1:"N/A") ; Denominator
3231"RTN","C0QMUERX",307,0)
3232 . W:$G(C0QDEBUG) ?20,DEN
3233"RTN","C0QMUERX",308,0)
3234 . S DENTOT=DENTOT+DEN ; Total it up (N/A becomes zero)
3235"RTN","C0QMUERX",309,0)
3236 . ;
3237"RTN","C0QMUERX",310,0)
3238 . N NUMIEN S NUMIEN=$O(^C0Q(301,L1,1,IEN,1,"B","ERXNUM","")) ; Numerator IEN
3239"RTN","C0QMUERX",311,0)
3240 . N NUM S NUM=$S(NUMIEN:$P(^C0Q(301,L1,1,IEN,1,NUMIEN,0),U,2),1:"N/A") ; Numerator
3241"RTN","C0QMUERX",312,0)
3242 . W:$G(C0QDEBUG) ?40,NUM
3243"RTN","C0QMUERX",313,0)
3244 . S NUMTOT=NUMTOT+NUM ; Total it up (N/A becomes zero)
3245"RTN","C0QMUERX",314,0)
3246 . ;
3247"RTN","C0QMUERX",315,0)
3248 . w:$G(C0QDEBUG) !
3249"RTN","C0QMUERX",316,0)
3250 ;
3251"RTN","C0QMUERX",317,0)
3252 ; Write the totals
3253"RTN","C0QMUERX",318,0)
3254 D:$G(C0QDEBUG)
3255"RTN","C0QMUERX",319,0)
3256 . W ?20,"==="
3257"RTN","C0QMUERX",320,0)
3258 . W ?40,"==="
3259"RTN","C0QMUERX",321,0)
3260 . W !
3261"RTN","C0QMUERX",322,0)
3262 . ;
3263"RTN","C0QMUERX",323,0)
3264 . W ?20,DENTOT
3265"RTN","C0QMUERX",324,0)
3266 . W ?40,NUMTOT
3267"RTN","C0QMUERX",325,0)
3268 . W !
3269"RTN","C0QMUERX",326,0)
3270 ;
3271"RTN","C0QMUERX",327,0)
3272 ; Quit with Numeartor/Denominator
3273"RTN","C0QMUERX",328,0)
3274 QUIT NUMTOT_"/"_DENTOT
3275"RTN","C0QUPDT")
32760^2^B78393601
3277"RTN","C0QUPDT",1,0)
3278C0QUPDT ; GPL - Quality Reporting List Update Routines ; 9/17/12 1:12pm
3279"RTN","C0QUPDT",2,0)
3280 ;;1.0;C0Q;**1**;May 21, 2012;Build 32
3281"RTN","C0QUPDT",3,0)
3282 ;Copyright 2009 George Lilly. Licensed under the terms of the GNU
3283"RTN","C0QUPDT",4,0)
3284 ;General Public License See attached copy of the License.
3285"RTN","C0QUPDT",5,0)
3286 ;
3287"RTN","C0QUPDT",6,0)
3288 ;This program is free software; you can redistribute it and/or modify
3289"RTN","C0QUPDT",7,0)
3290 ;it under the terms of the GNU General Public License as published by
3291"RTN","C0QUPDT",8,0)
3292 ;the Free Software Foundation; either version 2 of the License, or
3293"RTN","C0QUPDT",9,0)
3294 ;(at your option) any later version.
3295"RTN","C0QUPDT",10,0)
3296 ;
3297"RTN","C0QUPDT",11,0)
3298 ;This program is distributed in the hope that it will be useful,
3299"RTN","C0QUPDT",12,0)
3300 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
3301"RTN","C0QUPDT",13,0)
3302 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3303"RTN","C0QUPDT",14,0)
3304 ;GNU General Public License for more details.
3305"RTN","C0QUPDT",15,0)
3306 ;
3307"RTN","C0QUPDT",16,0)
3308 ;You should have received a copy of the GNU General Public License along
3309"RTN","C0QUPDT",17,0)
3310 ;with this program; if not, write to the Free Software Foundation, Inc.,
3311"RTN","C0QUPDT",18,0)
3312 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3313"RTN","C0QUPDT",19,0)
3314 ;
3315"RTN","C0QUPDT",20,0)
3316 Q
3317"RTN","C0QUPDT",21,0)
3318 ;
3319"RTN","C0QUPDT",22,0)
3320C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE
3321"RTN","C0QUPDT",23,0)
3322C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
3323"RTN","C0QUPDT",24,0)
3324C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
3325"RTN","C0QUPDT",25,0)
3326C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE
3327"RTN","C0QUPDT",26,0)
3328C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE
3329"RTN","C0QUPDT",27,0)
3330RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE
3331"RTN","C0QUPDT",28,0)
3332RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE
3333"RTN","C0QUPDT",29,0)
3334C0QPLF() Q 1130580001.301 ; C0Q PATIENT LIST FILE
3335"RTN","C0QUPDT",30,0)
3336C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ;
3337"RTN","C0QUPDT",31,0)
3338 ;
3339"RTN","C0QUPDT",32,0)
3340UPDATE(RNT,MSET) ; UPDATE A MEASURE SET BY ADDING NEW ENTRIES TO PATIENT
3341"RTN","C0QUPDT",33,0)
3342 ; LISTS AND DELETING ENTRIES THAT ARE NO LONGER VALID. ALSO UPDATE
3343"RTN","C0QUPDT",34,0)
3344 ; NUMERATOR AND DENOMINATOR COUNTS
3345"RTN","C0QUPDT",35,0)
3346 ; MAKES HEAVY USE OF UNITY^C0QSET TO DETERMINE WHAT TO ADD AND DELETE
3347"RTN","C0QUPDT",36,0)
3348 ;
3349"RTN","C0QUPDT",37,0)
3350 ; THIS IS A REPLACEMENT FOR C0QRPC^C0QMAIN WHICH DELETES THE PATIENT
3351"RTN","C0QUPDT",38,0)
3352 ; LISTS AND RECREATES THEM, WHICH IS A LOT OF UNNECESSARY PROCESSING
3353"RTN","C0QUPDT",39,0)
3354 ;
3355"RTN","C0QUPDT",40,0)
3356 N ZI S ZI=""
3357"RTN","C0QUPDT",41,0)
3358 N C0QM ; FOR HOLDING THE MEASURES IN THE SET
3359"RTN","C0QUPDT",42,0)
3360 I $$GET1^DIQ($$C0QMFN,MSET_",",.05,"I")="Y" D Q ; IS IT LOCKED?
3361"RTN","C0QUPDT",43,0)
3362 . W !,"ERROR MEASURE SET IS LOCKED, EXITING"
3363"RTN","C0QUPDT",44,0)
3364 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I;1.2I;2.2I") ; GET ALL THE MEASURES
3365"RTN","C0QUPDT",45,0)
3366 D DELIST("C0QM")
3367"RTN","C0QUPDT",46,0)
3368 N ZII S ZII=""
3369"RTN","C0QUPDT",47,0)
3370 F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE
3371"RTN","C0QUPDT",48,0)
3372 . ;
3373"RTN","C0QUPDT",49,0)
3374 . ; Special processing for eRx measure.
3375"RTN","C0QUPDT",50,0)
3376 . I $$GET1^DIQ(1130580001.101,+C0QM(ZII)_",",4,"I")="E" D ERXCOUNT(MSET,ZII) Q
3377"RTN","C0QUPDT",51,0)
3378 . ;
3379"RTN","C0QUPDT",52,0)
3380 . ; Otherwise, we go on
3381"RTN","C0QUPDT",53,0)
3382 . N C0QNL,C0QDL,C0QFLTN,C0QFLTD
3383"RTN","C0QUPDT",54,0)
3384 . S C0QFLTN=$P(C0QM(ZII),U,3) ;IEN OF NUMERATOR FILTER LIST
3385"RTN","C0QUPDT",55,0)
3386 . S C0QFLTD=$P(C0QM(ZII),U,4) ; IEN OF DENOMINATOR FILTER LIST
3387"RTN","C0QUPDT",56,0)
3388 . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
3389"RTN","C0QUPDT",57,0)
3390 . ;
3391"RTN","C0QUPDT",58,0)
3392 . ; Numerator
3393"RTN","C0QUPDT",59,0)
3394 . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
3395"RTN","C0QUPDT",60,0)
3396 . I C0QNL="" D ; CHECK ALTERNATE LIST
3397"RTN","C0QUPDT",61,0)
3398 . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER
3399"RTN","C0QUPDT",62,0)
3400 . . I C0QNL'="" S C0QNALT=1
3401"RTN","C0QUPDT",63,0)
3402 . I C0QNL="" QUIT ; No Numerator. Can't perform calculation.--smh
3403"RTN","C0QUPDT",64,0)
3404 . ;
3405"RTN","C0QUPDT",65,0)
3406 . ; Denominator
3407"RTN","C0QUPDT",66,0)
3408 . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER
3409"RTN","C0QUPDT",67,0)
3410 . I C0QDL="" D ; CHECK ALTERNATE LIST
3411"RTN","C0QUPDT",68,0)
3412 . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER
3413"RTN","C0QUPDT",69,0)
3414 . . I C0QDL'="" S C0QDALT=1
3415"RTN","C0QUPDT",70,0)
3416 . I C0QDL="" QUIT ; No Denominator. Can't perform calcuation.--smh
3417"RTN","C0QUPDT",71,0)
3418 . ;
3419"RTN","C0QUPDT",72,0)
3420 . ; FIRST PROCESS THE NUMERATOR
3421"RTN","C0QUPDT",73,0)
3422 . ;
3423"RTN","C0QUPDT",74,0)
3424 . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
3425"RTN","C0QUPDT",75,0)
3426 . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
3427"RTN","C0QUPDT",76,0)
3428 . . S C0QNEW=$NA(^C0Q(301,C0QNL,1,"B")) ; B INDEX FOR THIS LIST
3429"RTN","C0QUPDT",77,0)
3430 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS
3431"RTN","C0QUPDT",78,0)
3432 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS
3433"RTN","C0QUPDT",79,0)
3434 . I C0QFLTN'="" D ; USE A NUMERATOR FILTER LIST
3435"RTN","C0QUPDT",80,0)
3436 . . N ZNEW
3437"RTN","C0QUPDT",81,0)
3438 . . S ZNEW=$NA(^C0Q(301,C0QFLTN,1,"B")) ; B INDEX OF FILTER LIST
3439"RTN","C0QUPDT",82,0)
3440 . . K C0QFLTRD
3441"RTN","C0QUPDT",83,0)
3442 . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW)
3443"RTN","C0QUPDT",84,0)
3444 . . S C0QNEW="C0QFLTRD"
3445"RTN","C0QUPDT",85,0)
3446 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
3447"RTN","C0QUPDT",86,0)
3448 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET
3449"RTN","C0QUPDT",87,0)
3450 . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
3451"RTN","C0QUPDT",88,0)
3452 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
3453"RTN","C0QUPDT",89,0)
3454 . N C0QCNT
3455"RTN","C0QUPDT",90,0)
3456 . S C0QNCNT=$G(C0QRSLT("COUNT"))
3457"RTN","C0QUPDT",91,0)
3458 . I C0QNCNT="" D ;
3459"RTN","C0QUPDT",92,0)
3460 . . S C0QNCNT=0 ; DEFAULT COUNT IS ZERO
3461"RTN","C0QUPDT",93,0)
3462 . . N GZZ S GZZ=""
3463"RTN","C0QUPDT",94,0)
3464 . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
3465"RTN","C0QUPDT",95,0)
3466 . . . S C0QNCNT=C0QNCNT+1
3467"RTN","C0QUPDT",96,0)
3468 . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
3469"RTN","C0QUPDT",97,0)
3470 . . . S C0QNCNT=C0QNCNT+1
3471"RTN","C0QUPDT",98,0)
3472 . K C0QFDA ; CLEAR THE FDA
3473"RTN","C0QUPDT",99,0)
3474 . N C0QONCNT ; OLD COUNT
3475"RTN","C0QUPDT",100,0)
3476 . S C0QONCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",1.1)
3477"RTN","C0QUPDT",101,0)
3478 . I C0QNCNT'=C0QONCNT D ; COUNT HAS CHANGED
3479"RTN","C0QUPDT",102,0)
3480 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",1.1)=C0QNCNT ; NUMERATOR COUNT
3481"RTN","C0QUPDT",103,0)
3482 . . D UPDIE ; UPDATE THE NUMERATOR COUNT
3483"RTN","C0QUPDT",104,0)
3484 . I $D(C0QRSLT) D ;B ;
3485"RTN","C0QUPDT",105,0)
3486 . . ;ZWR C0QRSLT
3487"RTN","C0QUPDT",106,0)
3488 . ; FIRST PROCESS DELETIONS
3489"RTN","C0QUPDT",107,0)
3490 . K C0QFDA ; CLEAR OUT THE FDA
3491"RTN","C0QUPDT",108,0)
3492 . N ZG,ZIEN S ZG=""
3493"RTN","C0QUPDT",109,0)
3494 . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
3495"RTN","C0QUPDT",110,0)
3496 . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
3497"RTN","C0QUPDT",111,0)
3498 . . I ZIEN="" D Q ; OOPS
3499"RTN","C0QUPDT",112,0)
3500 . . . W !,"ERROR DELETING ENTRY!! ",ZG
3501"RTN","C0QUPDT",113,0)
3502 . . S C0QFDA($$C0QMMNFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
3503"RTN","C0QUPDT",114,0)
3504 . I $D(C0QFDA) D UPDIE ; PROCESS
3505"RTN","C0QUPDT",115,0)
3506 . ; SECOND, PROCESS ADDITIONS
3507"RTN","C0QUPDT",116,0)
3508 . K C0QFDA ; CLEAR OUT THE FDA
3509"RTN","C0QUPDT",117,0)
3510 . N ZG,ZC S ZG="" S ZC=1
3511"RTN","C0QUPDT",118,0)
3512 . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
3513"RTN","C0QUPDT",119,0)
3514 . . S C0QFDA($$C0QMMNFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
3515"RTN","C0QUPDT",120,0)
3516 . . S ZC=ZC+1
3517"RTN","C0QUPDT",121,0)
3518 . I $D(C0QFDA) D UPDIE ; PROCESS
3519"RTN","C0QUPDT",122,0)
3520 . ;
3521"RTN","C0QUPDT",123,0)
3522 . ; PROCESS THE DENOMINATOR
3523"RTN","C0QUPDT",124,0)
3524 . ;
3525"RTN","C0QUPDT",125,0)
3526 . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
3527"RTN","C0QUPDT",126,0)
3528 . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
3529"RTN","C0QUPDT",127,0)
3530 . . S C0QNEW=$NA(^C0Q(301,C0QDL,1,"B")) ; B INDEX FOR THIS LIST
3531"RTN","C0QUPDT",128,0)
3532 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS
3533"RTN","C0QUPDT",129,0)
3534 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS
3535"RTN","C0QUPDT",130,0)
3536 . I C0QFLTD'="" D ; USE A DENOMINATOR FILTER LIST
3537"RTN","C0QUPDT",131,0)
3538 . . N ZNEW
3539"RTN","C0QUPDT",132,0)
3540 . . S ZNEW=$NA(^C0Q(301,C0QFLTD,1,"B")) ; B INDEX OF FILTER LIST
3541"RTN","C0QUPDT",133,0)
3542 . . K C0QFLTRD
3543"RTN","C0QUPDT",134,0)
3544 . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW)
3545"RTN","C0QUPDT",135,0)
3546 . . S C0QNEW="C0QFLTRD"
3547"RTN","C0QUPDT",136,0)
3548 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
3549"RTN","C0QUPDT",137,0)
3550 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET
3551"RTN","C0QUPDT",138,0)
3552 . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
3553"RTN","C0QUPDT",139,0)
3554 . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
3555"RTN","C0QUPDT",140,0)
3556 . N C0QDCNT
3557"RTN","C0QUPDT",141,0)
3558 . S C0QDCNT=$G(C0QRSLT("COUNT"))
3559"RTN","C0QUPDT",142,0)
3560 . I C0QDCNT="" D ;
3561"RTN","C0QUPDT",143,0)
3562 . . S C0QDCNT=0 ; DEFAULT COUNT IS ZERO
3563"RTN","C0QUPDT",144,0)
3564 . . N GZZ S GZZ=""
3565"RTN","C0QUPDT",145,0)
3566 . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
3567"RTN","C0QUPDT",146,0)
3568 . . . S C0QDCNT=C0QDCNT+1
3569"RTN","C0QUPDT",147,0)
3570 . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
3571"RTN","C0QUPDT",148,0)
3572 . . . S C0QDCNT=C0QDCNT+1
3573"RTN","C0QUPDT",149,0)
3574 . K C0QFDA ; CLEAR THE FDA
3575"RTN","C0QUPDT",150,0)
3576 . N C0QODCNT ; OLD COUNT
3577"RTN","C0QUPDT",151,0)
3578 . S C0QODCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",2.1)
3579"RTN","C0QUPDT",152,0)
3580 . I C0QDCNT'=C0QODCNT D ; COUNT HAS CHANGED
3581"RTN","C0QUPDT",153,0)
3582 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",2.1)=C0QDCNT ; DENOMINATOR COUNT
3583"RTN","C0QUPDT",154,0)
3584 . . D UPDIE ; UPDATE THE DENOMINATOR COUNT
3585"RTN","C0QUPDT",155,0)
3586 . I $D(C0QRSLT) D ;B ;
3587"RTN","C0QUPDT",156,0)
3588 . . ;ZWR C0QRSLT
3589"RTN","C0QUPDT",157,0)
3590 . I '$D(C0QRSLT) Q ; NO RESULTS TO USE
3591"RTN","C0QUPDT",158,0)
3592 . ; FIRST PROCESS DELETIONS
3593"RTN","C0QUPDT",159,0)
3594 . K C0QFDA ; CLEAR OUT THE FDA
3595"RTN","C0QUPDT",160,0)
3596 . N ZG,ZIEN S ZG=""
3597"RTN","C0QUPDT",161,0)
3598 . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
3599"RTN","C0QUPDT",162,0)
3600 . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
3601"RTN","C0QUPDT",163,0)
3602 . . I ZIEN="" D Q ; OOPS
3603"RTN","C0QUPDT",164,0)
3604 . . . W !,"ERROR DELETING ENTRY!! ",ZG
3605"RTN","C0QUPDT",165,0)
3606 . . S C0QFDA($$C0QMMDFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
3607"RTN","C0QUPDT",166,0)
3608 . I $D(C0QFDA) D UPDIE ; PROCESS
3609"RTN","C0QUPDT",167,0)
3610 . ; SECOND, PROCESS ADDITIONS
3611"RTN","C0QUPDT",168,0)
3612 . K C0QFDA ; CLEAR OUT THE FDA
3613"RTN","C0QUPDT",169,0)
3614 . N ZG,ZC S ZG="" S ZC=1
3615"RTN","C0QUPDT",170,0)
3616 . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
3617"RTN","C0QUPDT",171,0)
3618 . . S C0QFDA($$C0QMMDFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
3619"RTN","C0QUPDT",172,0)
3620 . . S ZC=ZC+1
3621"RTN","C0QUPDT",173,0)
3622 . I $D(C0QFDA) D UPDIE ; PROCESS
3623"RTN","C0QUPDT",174,0)
3624 . ;
3625"RTN","C0QUPDT",175,0)
3626 . ; File Percentage
3627"RTN","C0QUPDT",176,0)
3628 . N C0QPCT ; PERCENT
3629"RTN","C0QUPDT",177,0)
3630 . D ;
3631"RTN","C0QUPDT",178,0)
3632 . . I C0QDCNT>0 D ;
3633"RTN","C0QUPDT",179,0)
3634 . . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0)
3635"RTN","C0QUPDT",180,0)
3636 . . E S C0QPCT=0
3637"RTN","C0QUPDT",181,0)
3638 . . K C0QFDA
3639"RTN","C0QUPDT",182,0)
3640 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT
3641"RTN","C0QUPDT",183,0)
3642 . . D UPDIE
3643"RTN","C0QUPDT",184,0)
3644 Q
3645"RTN","C0QUPDT",185,0)
3646 ;
3647"RTN","C0QUPDT",186,0)
3648DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO
3649"RTN","C0QUPDT",187,0)
3650 ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
3651"RTN","C0QUPDT",188,0)
3652 ; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE
3653"RTN","C0QUPDT",189,0)
3654 N ZI,IV,EV,ZDI,ZIEN,FLTN,FLTD
3655"RTN","C0QUPDT",190,0)
3656 S ZI=""
3657"RTN","C0QUPDT",191,0)
3658 S ZDI=$NA(^TMP("DILIST",$J))
3659"RTN","C0QUPDT",192,0)
3660 K @RTN
3661"RTN","C0QUPDT",193,0)
3662 F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ;
3663"RTN","C0QUPDT",194,0)
3664 . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
3665"RTN","C0QUPDT",195,0)
3666 . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE
3667"RTN","C0QUPDT",196,0)
3668 . S FLTN=$G(@ZDI@("ID",ZI,1.2)) ; NUMERATOR FILTER LIST
3669"RTN","C0QUPDT",197,0)
3670 . S FLTD=$G(@ZDI@("ID",ZI,2.2)) ; DENOMINATOR FILTER LIST
3671"RTN","C0QUPDT",198,0)
3672 . S ZIEN=@ZDI@(2,ZI) ; IEN
3673"RTN","C0QUPDT",199,0)
3674 . S @RTN@(ZIEN)=IV_"^"_EV_"^"_FLTN_"^"_FLTD
3675"RTN","C0QUPDT",200,0)
3676 . ;S @RTN@("B",IV,ZIEN)=EV
3677"RTN","C0QUPDT",201,0)
3678 Q
3679"RTN","C0QUPDT",202,0)
3680 ;
3681"RTN","C0QUPDT",203,0)
3682UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
3683"RTN","C0QUPDT",204,0)
3684 K ZERR
3685"RTN","C0QUPDT",205,0)
3686 D CLEAN^DILF
3687"RTN","C0QUPDT",206,0)
3688 D ZWRITE^C0QUTIL("C0QFDA")
3689"RTN","C0QUPDT",207,0)
3690 D UPDATE^DIE("","C0QFDA","","ZERR")
3691"RTN","C0QUPDT",208,0)
3692 I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
3693"RTN","C0QUPDT",209,0)
3694 ;. W "ERROR",!
3695"RTN","C0QUPDT",210,0)
3696 ;. ZWR ZERR
3697"RTN","C0QUPDT",211,0)
3698 ;. B
3699"RTN","C0QUPDT",212,0)
3700 K C0QFDA
3701"RTN","C0QUPDT",213,0)
3702 Q
3703"RTN","C0QUPDT",214,0)
3704 ;
3705"RTN","C0QUPDT",215,0)
3706ERXCOUNT(MSETIEN,MIEN) ; Private Proc; Get eRx and file as Numerator, Denominator, and %
3707"RTN","C0QUPDT",216,0)
3708 ; Inputs:
3709"RTN","C0QUPDT",217,0)
3710 ; MSETIEN - Measurement Set IEN - By Value
3711"RTN","C0QUPDT",218,0)
3712 ; MIEN - Measurement IEN inside the Measurement Set - By Value
3713"RTN","C0QUPDT",219,0)
3714 ;
3715"RTN","C0QUPDT",220,0)
3716 ; Optional Symtab input: C0QDEBUG to print out debug messages to STDOUT.
3717"RTN","C0QUPDT",221,0)
3718 ;
3719"RTN","C0QUPDT",222,0)
3720 ; No check is done to see if the caller is sending bad data. Measurement must be
3721"RTN","C0QUPDT",223,0)
3722 ; in a subfile under Measurement Set.
3723"RTN","C0QUPDT",224,0)
3724 ;
3725"RTN","C0QUPDT",225,0)
3726 W:$G(C0QDEBUG) "Processing E-Prescribing Counts",!
3727"RTN","C0QUPDT",226,0)
3728 ; Example of Data we go through in the C0Q Parameter File, so the code below
3729"RTN","C0QUPDT",227,0)
3730 ; will make sense.
3731"RTN","C0QUPDT",228,0)
3732 ; ^C0Q(401,"AMMS",2,1)=""
3733"RTN","C0QUPDT",229,0)
3734 ; ^C0Q(401,"AMMS",2,2)=""
3735"RTN","C0QUPDT",230,0)
3736 ; ^C0Q(401,"AQMS",6,2)=""
3737"RTN","C0QUPDT",231,0)
3738 ; ^C0Q(401,"B","INPATIENT",2)=""
3739"RTN","C0QUPDT",232,0)
3740 ; ^C0Q(401,"B","OUTPATIENT",1)=""
3741"RTN","C0QUPDT",233,0)
3742 ; ^C0Q(401,"MU","MU12",1)=""
3743"RTN","C0QUPDT",234,0)
3744 ; ^C0Q(401,"MU","MU12",2)=""
3745"RTN","C0QUPDT",235,0)
3746 ; ^C0Q(401,"MUTYP","MU12","EP",1)=""
3747"RTN","C0QUPDT",236,0)
3748 ; ^C0Q(401,"MUTYP","MU12","INP",2)=""
3749"RTN","C0QUPDT",237,0)
3750 ;
3751"RTN","C0QUPDT",238,0)
3752 ; Get Parameter year from the Parameters file.
3753"RTN","C0QUPDT",239,0)
3754 ; 1. Get parameter associated with this measurement set from AMMS x-ref (new in C0Q*1*1).
3755"RTN","C0QUPDT",240,0)
3756 N C0QPARAM
3757"RTN","C0QUPDT",241,0)
3758 N % S %="" F S %=$O(^C0Q(401,"AMMS",MSETIEN,%)) Q:%="" S C0QPARAM(%)=""
3759"RTN","C0QUPDT",242,0)
3760 ;
3761"RTN","C0QUPDT",243,0)
3762 ; 2. Find the year for each of those--store as value of node; IEN still subscript.
3763"RTN","C0QUPDT",244,0)
3764 N % S %="" F S %=$O(C0QPARAM(%)) Q:%="" S C0QPARAM(%)=$$GET1^DIQ(1130580001.401,%_",",.02)
3765"RTN","C0QUPDT",245,0)
3766 ;
3767"RTN","C0QUPDT",246,0)
3768 ; 3. Now make sure that this parameter that point to an Outpatient Parameters
3769"RTN","C0QUPDT",247,0)
3770 ; WARNING: CONFUSING CODE WRITTEN BY ME AHEAD
3771"RTN","C0QUPDT",248,0)
3772 ; The % loop will stop with a valid value if found; % is used in the lines immediately below
3773"RTN","C0QUPDT",249,0)
3774 N % S %="" F S %=$O(C0QPARAM(%)) Q:%="" Q:$D(^C0Q(401,"MUTYP",C0QPARAM(%),"EP",%))
3775"RTN","C0QUPDT",250,0)
3776 ;
3777"RTN","C0QUPDT",251,0)
3778 ; 4. If % has a valid IEN (there can be multiple, we take the first), then off we go.
3779"RTN","C0QUPDT",252,0)
3780 ; Otherwise, if it is back to "", we quit.
3781"RTN","C0QUPDT",253,0)
3782 N MUYEAR
3783"RTN","C0QUPDT",254,0)
3784 IF '% W "No suitable parameter found. Cannot determine Measurement Year.",! QUIT
3785"RTN","C0QUPDT",255,0)
3786 ELSE S MUYEAR=C0QPARAM(%)
3787"RTN","C0QUPDT",256,0)
3788 ;
3789"RTN","C0QUPDT",257,0)
3790 ; Now, based on the MU year, construct the patient list name that has the eRx data.
3791"RTN","C0QUPDT",258,0)
3792 N LISTNAME S LISTNAME=MUYEAR_"-"_"EP"_"-"_"HasERX"
3793"RTN","C0QUPDT",259,0)
3794 ;
3795"RTN","C0QUPDT",260,0)
3796 ; Call the API in C0QMUERX to get the counts already calculated
3797"RTN","C0QUPDT",261,0)
3798 ; Data is returned NUM/DEN
3799"RTN","C0QUPDT",262,0)
3800 N COUNTS S COUNTS=$$COUNT^C0QMUERX($$PATLN^C0QMU12(LISTNAME))
3801"RTN","C0QUPDT",263,0)
3802 ;
3803"RTN","C0QUPDT",264,0)
3804 ; File the count
3805"RTN","C0QUPDT",265,0)
3806 N NUM S NUM=$P(COUNTS,"/") ; Numerator
3807"RTN","C0QUPDT",266,0)
3808 N DEN S DEN=$P(COUNTS,"/",2) ; Denominator
3809"RTN","C0QUPDT",267,0)
3810 ;
3811"RTN","C0QUPDT",268,0)
3812 ; Prepare FDA
3813"RTN","C0QUPDT",269,0)
3814 N C0QFDA,C0QERR
3815"RTN","C0QUPDT",270,0)
3816 S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",1.1)=NUM ; Numerator
3817"RTN","C0QUPDT",271,0)
3818 S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",2.1)=DEN ; Denominator
3819"RTN","C0QUPDT",272,0)
3820 S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",3)=$S(DEN=0:0,1:$J(100*NUM/DEN,0,0)) ; Percentage; avoid dividing by zero!
3821"RTN","C0QUPDT",273,0)
3822 ;
3823"RTN","C0QUPDT",274,0)
3824 ; File FDA using Filer not updater (editing existing entry only)
3825"RTN","C0QUPDT",275,0)
3826 D FILE^DIE("ET",$NAME(C0QFDA),$NAME(C0QERR)) ; Flags: External, Transaction
3827"RTN","C0QUPDT",276,0)
3828 ;
3829"RTN","C0QUPDT",277,0)
3830 ; If error, print it out
3831"RTN","C0QUPDT",278,0)
3832 I $D(C0QERR) DO
3833"RTN","C0QUPDT",279,0)
3834 . W "Error filing data",!
3835"RTN","C0QUPDT",280,0)
3836 . N % S %=$NAME(C0QERR) F S %=$Q(@%) Q:%="" W %_": "_@%,!
3837"RTN","C0QUPDT",281,0)
3838 ;
3839"RTN","C0QUPDT",282,0)
3840 QUIT
3841"SEC","^DD",1130580001.101,1130580001.101,3.1,9)
3842
3843"SEC","^DIC",1130580001.101,1130580001.101,0,"AUDIT")
3844@
3845"SEC","^DIC",1130580001.101,1130580001.101,0,"DD")
3846@
3847"SEC","^DIC",1130580001.101,1130580001.101,0,"DEL")
3848@
3849"SEC","^DIC",1130580001.101,1130580001.101,0,"LAYGO")
3850@
3851"SEC","^DIC",1130580001.101,1130580001.101,0,"RD")
3852@
3853"SEC","^DIC",1130580001.101,1130580001.101,0,"WR")
3854@
3855"VER")
38568.0^22.0
3857"^DD",1130580001.101,1130580001.101,0)
3858FIELD^^.3^19
3859"^DD",1130580001.101,1130580001.101,0,"DDA")
3860N
3861"^DD",1130580001.101,1130580001.101,0,"DT")
38623120731
3863"^DD",1130580001.101,1130580001.101,0,"ID",.7)
3864W:$D(^(5)) " ",$P(^(5),U,1)
3865"^DD",1130580001.101,1130580001.101,0,"IX","B",1130580001.101,.01)
3866
3867"^DD",1130580001.101,1130580001.101,0,"NM","C0Q QUALITY MEASURE")
3868
3869"^DD",1130580001.101,1130580001.101,0,"PT",1130580001.2011,.01)
3870
3871"^DD",1130580001.101,1130580001.101,0,"VRPK")
3872C0Q
3873"^DD",1130580001.101,1130580001.101,.01,0)
3874NAME^RF^^0;1^K:$L(X)>30!($L(X)<1)!'(X'?1P.E) X
3875"^DD",1130580001.101,1130580001.101,.01,.1)
3876MEASURE NAME
3877"^DD",1130580001.101,1130580001.101,.01,1,0)
3878^.1
3879"^DD",1130580001.101,1130580001.101,.01,1,1,0)
38801130580001.101^B
3881"^DD",1130580001.101,1130580001.101,.01,1,1,1)
3882S ^C0Q(101,"B",$E(X,1,30),DA)=""
3883"^DD",1130580001.101,1130580001.101,.01,1,1,2)
3884K ^C0Q(101,"B",$E(X,1,30),DA)
3885"^DD",1130580001.101,1130580001.101,.01,3)
3886Answer must be 1-30 characters in length
3887"^DD",1130580001.101,1130580001.101,.01,"DT")
38883101012
3889"^DD",1130580001.101,1130580001.101,.3,0)
3890MU YEAR KEY^F^^7;6^K:$L(X)>30!($L(X)<1) X
3891"^DD",1130580001.101,1130580001.101,.3,.1)
3892MEANINGFUL USE YEAR KEY
3893"^DD",1130580001.101,1130580001.101,.3,3)
3894Answer must be 1-30 characters in length.
3895"^DD",1130580001.101,1130580001.101,.3,"DT")
38963111201
3897"^DD",1130580001.101,1130580001.101,.5,0)
3898TITLE^F^^1;1^K:$L(X)>240!($L(X)<3) X
3899"^DD",1130580001.101,1130580001.101,.5,.1)
3900MEASURE TITLE
3901"^DD",1130580001.101,1130580001.101,.5,3)
3902Answer must be 3-240 characters in length
3903"^DD",1130580001.101,1130580001.101,.5,"DT")
39043110430
3905"^DD",1130580001.101,1130580001.101,.61,0)
3906VERY LONG DESCRIPTION^1130580001.111^^6;0
3907"^DD",1130580001.101,1130580001.101,.7,0)
3908DISPLAY NAME^F^^5;1^K:$L(X)>240!($L(X)<3) X
3909"^DD",1130580001.101,1130580001.101,.7,.1)
3910QRDA DISPLAY NAME
3911"^DD",1130580001.101,1130580001.101,.7,3)
3912Answer must be 3-240 characters in length
3913"^DD",1130580001.101,1130580001.101,.7,"DT")
39143101012
3915"^DD",1130580001.101,1130580001.101,.8,0)
3916REPORTING NAME^F^^7;1^K:$L(X)>30!($L(X)<3) X
3917"^DD",1130580001.101,1130580001.101,.8,.1)
3918REPORTING MEASURE NAME
3919"^DD",1130580001.101,1130580001.101,.8,3)
3920Answer must be 3-30 characters in length
3921"^DD",1130580001.101,1130580001.101,.8,"DT")
39223110615
3923"^DD",1130580001.101,1130580001.101,1,0)
3924NUMERATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;2^Q
3925"^DD",1130580001.101,1130580001.101,1,.1)
3926MEASURE NUMERATOR PATIENT LIST
3927"^DD",1130580001.101,1130580001.101,1,"DT")
39283101012
3929"^DD",1130580001.101,1130580001.101,1.1,0)
3930ALTERNATIVE NUMERATOR LIST^P1130580001.301'^C0Q(301,^7;2^Q
3931"^DD",1130580001.101,1130580001.101,1.1,"DT")
39323110805
3933"^DD",1130580001.101,1130580001.101,1.2,0)
3934NUMERATOR RULE SET^*P810.4'^PXRM(810.4,^7;7^S DIC("S")="I $P(^(0),U,3)=3" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X
3935"^DD",1130580001.101,1130580001.101,1.2,3)
3936Enter the reminder rule set to use for this measure.
3937"^DD",1130580001.101,1130580001.101,1.2,12)
3938If the type of the reminder list rule is a Rule Set.
3939"^DD",1130580001.101,1130580001.101,1.2,12.1)
3940S DIC("S")="I $P(^(0),U,3)=3"
3941"^DD",1130580001.101,1130580001.101,1.2,21,0)
3942^^5^5^3120716^
3943"^DD",1130580001.101,1130580001.101,1.2,21,1,0)
3944This is the numerator reminder rule set to use for the quality measure.
3945"^DD",1130580001.101,1130580001.101,1.2,21,2,0)
3946
3947"^DD",1130580001.101,1130580001.101,1.2,21,3,0)
3948The rule set is used to generate a patient list, which this package
3949"^DD",1130580001.101,1130580001.101,1.2,21,4,0)
3950referneces. The contents of the patient list will produce the count for
3951"^DD",1130580001.101,1130580001.101,1.2,21,5,0)
3952the measure. This count is for the numerator.
3953"^DD",1130580001.101,1130580001.101,1.2,"DT")
39543120716
3955"^DD",1130580001.101,1130580001.101,1.5,0)
3956NEGATIVE NUMERATOR LIST^P810.5'^PXRMXP(810.5,^7;4^Q
3957"^DD",1130580001.101,1130580001.101,1.5,.1)
3958LIST OF PATIENTS THAT DO NOT MEET THE REQUIREMENTS
3959"^DD",1130580001.101,1130580001.101,1.5,"DT")
39603110809
3961"^DD",1130580001.101,1130580001.101,1.51,0)
3962ALTERNATE NEGATIVE NUM LIST^P1130580001.301'^C0Q(301,^7;5^Q
3963"^DD",1130580001.101,1130580001.101,1.51,.1)
3964NEGATIVE NUMERATOR LIST IN C0Q PATIENT LIST FILE
3965"^DD",1130580001.101,1130580001.101,1.51,"DT")
39663110809
3967"^DD",1130580001.101,1130580001.101,2,0)
3968DENOMINATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;3^Q
3969"^DD",1130580001.101,1130580001.101,2,.1)
3970MEASURE DENOMINATOR PATIENT LIST
3971"^DD",1130580001.101,1130580001.101,2,"DT")
39723101012
3973"^DD",1130580001.101,1130580001.101,2.1,0)
3974ALTERNATIVE DENOMINATOR LIST^P1130580001.301'^C0Q(301,^7;3^Q
3975"^DD",1130580001.101,1130580001.101,2.1,"DT")
39763110805
3977"^DD",1130580001.101,1130580001.101,2.2,0)
3978DENOMINATOR RULE SET^*P810.4'^PXRM(810.4,^7;8^S DIC("S")="I $P(^(0),U,3)=3" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X
3979"^DD",1130580001.101,1130580001.101,2.2,3)
3980Enter the reminder rule set to use for this measure.
3981"^DD",1130580001.101,1130580001.101,2.2,12)
3982If the type of the reminder list rule is a Rule Set.
3983"^DD",1130580001.101,1130580001.101,2.2,12.1)
3984S DIC("S")="I $P(^(0),U,3)=3"
3985"^DD",1130580001.101,1130580001.101,2.2,21,0)
3986^^5^5^3120716^
3987"^DD",1130580001.101,1130580001.101,2.2,21,1,0)
3988This is the denominator reminder rule set to use for the quality measure.
3989"^DD",1130580001.101,1130580001.101,2.2,21,2,0)
3990
3991"^DD",1130580001.101,1130580001.101,2.2,21,3,0)
3992The rule set is used to generate a patient list, which this package
3993"^DD",1130580001.101,1130580001.101,2.2,21,4,0)
3994referneces. The contents of the patient list will produce the count for
3995"^DD",1130580001.101,1130580001.101,2.2,21,5,0)
3996the measure. This count is for the denominator.
3997"^DD",1130580001.101,1130580001.101,2.2,"DT")
39983120716
3999"^DD",1130580001.101,1130580001.101,2.5,0)
4000EXTRACT DEFINITION^P810.2'^PXRM(810.2,^7;9^Q
4001"^DD",1130580001.101,1130580001.101,2.5,3)
4002Select a Reminder Extract Definition for this measure
4003"^DD",1130580001.101,1130580001.101,2.5,21,0)
4004^^4^4^3120726^
4005"^DD",1130580001.101,1130580001.101,2.5,21,1,0)
4006If this measure depends upon a reminder extract definition, you can add
4007"^DD",1130580001.101,1130580001.101,2.5,21,2,0)
4008this extract definition here. This will alter how the Quality Measures
4009"^DD",1130580001.101,1130580001.101,2.5,21,3,0)
4010package computes the measure to use the extract in addition and prior to
4011"^DD",1130580001.101,1130580001.101,2.5,21,4,0)
4012the rule sets.
4013"^DD",1130580001.101,1130580001.101,2.5,"DT")
40143120726
4015"^DD",1130580001.101,1130580001.101,3,0)
4016QRDA TEMPLATE ROOT^F^^0;4^K:$L(X)>120!($L(X)<3) X
4017"^DD",1130580001.101,1130580001.101,3,.1)
4018
4019"^DD",1130580001.101,1130580001.101,3,3)
4020Answer must be 3-120 characters in length
4021"^DD",1130580001.101,1130580001.101,3,21,0)
4022^^2^2^3120731^^
4023"^DD",1130580001.101,1130580001.101,3,21,1,0)
4024Measure template root for the QRDA Document. A series of . delimited
4025"^DD",1130580001.101,1130580001.101,3,21,2,0)
4026numbers. E.g. 2.16.840.1.113883.3.249.11.14.1.1.1
4027"^DD",1130580001.101,1130580001.101,3,"DT")
40283120731
4029"^DD",1130580001.101,1130580001.101,3.1,0)
4030QRDA MEASURE SYSTEM OID^CJ^^ ; ^S X="2.16.840.1.113883.3.249.12"
4031"^DD",1130580001.101,1130580001.101,3.1,.1)
4032QRDA SYSTEM OID (FIXED)
4033"^DD",1130580001.101,1130580001.101,3.1,9.01)
4034
4035"^DD",1130580001.101,1130580001.101,3.1,9.1)
4036S X="2.16.840.1.113883.3.249.12"
4037"^DD",1130580001.101,1130580001.101,3.1,"DT")
40383101012
4039"^DD",1130580001.101,1130580001.101,3.2,0)
4040QRDA CODE^F^^4;1^K:$L(X)>80!($L(X)<1) X
4041"^DD",1130580001.101,1130580001.101,3.2,.1)
4042QRDA MEASURE CODE
4043"^DD",1130580001.101,1130580001.101,3.2,3)
4044Answer must be 1-80 characters in length
4045"^DD",1130580001.101,1130580001.101,3.2,"DT")
40463101012
4047"^DD",1130580001.101,1130580001.101,4,0)
4048MEASURE TYPE^S^P:Performance;Q:Quality;E:Electronic Prescribing Performance;^0;5^Q
4049"^DD",1130580001.101,1130580001.101,4,3)
4050Enter a code P, Q or E
4051"^DD",1130580001.101,1130580001.101,4,21,0)
4052^^19^19^3120530^
4053"^DD",1130580001.101,1130580001.101,4,21,1,0)
4054This field designates the measure type. It can be P, Q or M.
4055"^DD",1130580001.101,1130580001.101,4,21,2,0)
4056
4057"^DD",1130580001.101,1130580001.101,4,21,3,0)
4058P is for Performance. Performance measures are MU measures to measure
4059"^DD",1130580001.101,1130580001.101,4,21,4,0)
4060how meaningfully used an EMR is. An example of a performance measure
4061"^DD",1130580001.101,1130580001.101,4,21,5,0)
4062is whether allergies are documented in the EMR. Performance measures
4063"^DD",1130580001.101,1130580001.101,4,21,6,0)
4064reference a Patient List created by this package.
4065"^DD",1130580001.101,1130580001.101,4,21,7,0)
4066
4067"^DD",1130580001.101,1130580001.101,4,21,8,0)
4068Q is for Quality Measures. Quality measures are MU measures to assess how
4069"^DD",1130580001.101,1130580001.101,4,21,9,0)
4070well the patients are cared for. An example of a quality measure is
4071"^DD",1130580001.101,1130580001.101,4,21,10,0)
4072whether Hemoglobin A1c Poor Control. Quality measures reference Patient
4073"^DD",1130580001.101,1130580001.101,4,21,11,0)
4074Lists in the Reminders package.
4075"^DD",1130580001.101,1130580001.101,4,21,12,0)
4076
4077"^DD",1130580001.101,1130580001.101,4,21,13,0)
4078E is for Electronic Prescribing. This is a Performance measure, except
4079"^DD",1130580001.101,1130580001.101,4,21,14,0)
4080that it is handled differently than the rest. Instead of the numerators
4081"^DD",1130580001.101,1130580001.101,4,21,15,0)
4082and denominators being lists of patients as with all the other
4083"^DD",1130580001.101,1130580001.101,4,21,16,0)
4084measurements, they are a number of prescriptions. That's why we have a
4085"^DD",1130580001.101,1130580001.101,4,21,17,0)
4086special flag for it. It references a Patient List created by this
4087"^DD",1130580001.101,1130580001.101,4,21,18,0)
4088package. The numerator and denominators are stored in subfiles for each
4089"^DD",1130580001.101,1130580001.101,4,21,19,0)
4090patient.
4091"^DD",1130580001.101,1130580001.101,4,23,0)
4092^^4^4^3120530^
4093"^DD",1130580001.101,1130580001.101,4,23,1,0)
4094As of version C0P*1.0*1, the software doesn't use this field except to
4095"^DD",1130580001.101,1130580001.101,4,23,2,0)
4096check for an electronic prescribing type (code E).
4097"^DD",1130580001.101,1130580001.101,4,23,3,0)
4098
4099"^DD",1130580001.101,1130580001.101,4,23,4,0)
4100I anticipate using this field for other purposes in the future.
4101"^DD",1130580001.101,1130580001.101,4,"DT")
41023120530
4103"^DD",1130580001.101,1130580001.111,0)
4104VERY LONG DESCRIPTION SUB-FIELD^^.01^1
4105"^DD",1130580001.101,1130580001.111,0,"DT")
41063101013
4107"^DD",1130580001.101,1130580001.111,0,"NM","VERY LONG DESCRIPTION")
4108
4109"^DD",1130580001.101,1130580001.111,0,"UP")
41101130580001.101
4111"^DD",1130580001.101,1130580001.111,.01,0)
4112VERY LONG DESCRIPTION^Wx^^0;1
4113"^DD",1130580001.101,1130580001.111,.01,.1)
4114LONGER DESCRIPTION - IF IT DOESN'T FIT IN .6
4115"^DD",1130580001.101,1130580001.111,.01,3)
4116LONGER DESCRIPTION - INSTEAD OF LONG DESCRIPTION
4117"^DD",1130580001.101,1130580001.111,.01,"DT")
41183101013
4119"^DD",1130580001.401,1130580001.401,2,0)
4120EP MU MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;6^Q
4121"^DD",1130580001.401,1130580001.401,2,.1)
4122OUTPATIENT MEANINGFUL USE MEASUREMENT SET
4123"^DD",1130580001.401,1130580001.401,2,1,0)
4124^.1
4125"^DD",1130580001.401,1130580001.401,2,1,1,0)
41261130580001.401^AMMS
4127"^DD",1130580001.401,1130580001.401,2,1,1,1)
4128S ^C0Q(401,"AMMS",$E(X,1,30),DA)=""
4129"^DD",1130580001.401,1130580001.401,2,1,1,2)
4130K ^C0Q(401,"AMMS",$E(X,1,30),DA)
4131"^DD",1130580001.401,1130580001.401,2,1,1,3)
4132USED BY THE CODE. SEE DESCRIPTION.
4133"^DD",1130580001.401,1130580001.401,2,1,1,"%D",0)
4134^.101^5^5^3120530^^^
4135"^DD",1130580001.401,1130580001.401,2,1,1,"%D",1,0)
4136Indexes the IEN of the Measurement Set. Used so that we can walk back to
4137"^DD",1130580001.401,1130580001.401,2,1,1,"%D",2,0)
4138a parameter when processing a specific IEN.
4139"^DD",1130580001.401,1130580001.401,2,1,1,"%D",3,0)
4140
4141"^DD",1130580001.401,1130580001.401,2,1,1,"%D",4,0)
4142You can get the IEN of the measurement set using
4143"^DD",1130580001.401,1130580001.401,2,1,1,"%D",5,0)
4144$O(^C0Q(401,"AMMS",MSIEN,"")).
4145"^DD",1130580001.401,1130580001.401,2,1,1,"DT")
41463120530
4147"^DD",1130580001.401,1130580001.401,2,"DT")
41483120103
4149"^DD",1130580001.401,1130580001.401,2.1,0)
4150EP QUALITY MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;7^Q
4151"^DD",1130580001.401,1130580001.401,2.1,.1)
4152OUTPATIENT QUALITY MEASUREMENT SET
4153"^DD",1130580001.401,1130580001.401,2.1,1,0)
4154^.1
4155"^DD",1130580001.401,1130580001.401,2.1,1,1,0)
41561130580001.401^AQMS
4157"^DD",1130580001.401,1130580001.401,2.1,1,1,1)
4158S ^C0Q(401,"AQMS",$E(X,1,30),DA)=""
4159"^DD",1130580001.401,1130580001.401,2.1,1,1,2)
4160K ^C0Q(401,"AQMS",$E(X,1,30),DA)
4161"^DD",1130580001.401,1130580001.401,2.1,1,1,3)
4162USED BY THE CODE. SEE DESCRIPTION.
4163"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",0)
4164^^5^5^3120530^
4165"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",1,0)
4166Indexes the IEN of the Measurement Set. Used so that we can walk back to
4167"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",2,0)
4168a parameter when processing a specific IEN.
4169"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",3,0)
4170
4171"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",4,0)
4172You can get the IEN of the measurement set using
4173"^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",5,0)
4174$O(^C0Q(401,"AQMS",MSIEN,"")).
4175"^DD",1130580001.401,1130580001.401,2.1,1,1,"DT")
41763120530
4177"^DD",1130580001.401,1130580001.401,2.1,"DT")
41783120103
4179"^DIC",1130580001.101,1130580001.101,0)
4180C0Q QUALITY MEASURE^1130580001.101
4181"^DIC",1130580001.101,1130580001.101,0,"GL")
4182^C0Q(101,
4183"^DIC",1130580001.101,"B","C0Q QUALITY MEASURE",1130580001.101)
4184
4185**END**
4186**END**
Note: See TracBrowser for help on using the repository browser.