KIDS Distribution saved on Sep 17, 2012@16:13:14 ERX MU MEASURE SUPPORT **KIDS**:C0Q*1.0*1^ **INSTALL NAME** C0Q*1.0*1 "BLD",7937,0) C0Q*1.0*1^QUALITY MEASURES^0^3120917^y "BLD",7937,1,0) ^^291^291^3120917^ "BLD",7937,1,1,0) ePrescribing MU measure in this package. "BLD",7937,1,2,0) "BLD",7937,1,3,0) Dependencies: "BLD",7937,1,4,0) This build requires C0P*1*4 for the new WebService entry that gets MU "BLD",7937,1,5,0) data from New Crop. "BLD",7937,1,6,0) This build requires the base C0Q 1.0 to be installed. "BLD",7937,1,7,0) "BLD",7937,1,8,0) This build performs the following: "BLD",7937,1,9,0) Routines: "BLD",7937,1,10,0) 1. Adds routine C0QMUERX for calculation of ePrescribing stats. "BLD",7937,1,11,0) 2. Mods routine C0QMU12 to call C0QMUERX for the ERX measure for "BLD",7937,1,12,0) Outpatients. "BLD",7937,1,13,0) 3. Mods routine C0QUPDT to handle the special case of ePrescribing stats. "BLD",7937,1,14,0) Also, some checks and quits so that we won't crash if no patient lists "BLD",7937,1,15,0) are associated with the measure. "BLD",7937,1,16,0) "BLD",7937,1,17,0) Data Dictionary: "BLD",7937,1,18,0) 1. File C0Q PARAMETER has two new indexes: "BLD",7937,1,19,0) AMMS REGULAR "BLD",7937,1,20,0) Field: EP MU MEASUREMENT SET (1130580001.401,2) "BLD",7937,1,21,0) Description: Indexes the IEN of the Measurement Set. Used so that we can "BLD",7937,1,22,0) walk back to a parameter when processing a specific IEN. "BLD",7937,1,23,0) "BLD",7937,1,24,0) You can get the IEN of the measurement set using "BLD",7937,1,25,0) $O(^C0Q(401,"AMMS",MSIEN,"")). "BLD",7937,1,26,0) 1)= S ^C0Q(401,"AMMS",$E(X,1,30),DA)="" "BLD",7937,1,27,0) 2)= K ^C0Q(401,"AMMS",$E(X,1,30),DA) "BLD",7937,1,28,0) 3)= USED BY THE CODE. SEE DESCRIPTION. "BLD",7937,1,29,0) "BLD",7937,1,30,0) AQMS REGULAR "BLD",7937,1,31,0) Field: EP QUALITY MEASUREMENT SET (1130580001.401,2.1) "BLD",7937,1,32,0) Description: Indexes the IEN of the Measurement Set. Used so that we can "BLD",7937,1,33,0) walk back to a parameter when processing a specific IEN. "BLD",7937,1,34,0) "BLD",7937,1,35,0) You can get the IEN of the measurement set using "BLD",7937,1,36,0) $O(^C0Q(401,"AQMS",MSIEN,"")). "BLD",7937,1,37,0) 1)= S ^C0Q(401,"AQMS",$E(X,1,30),DA)="" "BLD",7937,1,38,0) 2)= K ^C0Q(401,"AQMS",$E(X,1,30),DA) "BLD",7937,1,39,0) 3)= USED BY THE CODE. SEE DESCRIPTION. "BLD",7937,1,40,0) "BLD",7937,1,41,0) 2. File C0Q QUALITY MEASURE has a new field, MEASURE TYPE (#4): "BLD",7937,1,42,0) "BLD",7937,1,43,0) 1130580001.101,4MEASURE TYPE 0;5 SET "BLD",7937,1,44,0) "BLD",7937,1,45,0) 'P' FOR Performance; "BLD",7937,1,46,0) 'Q' FOR Quality; "BLD",7937,1,47,0) 'E' FOR Electronic Prescribing Performance; "BLD",7937,1,48,0) LAST EDITED: MAY 30, 2012 "BLD",7937,1,49,0) HELP-PROMPT: Enter a code P, Q or E "BLD",7937,1,50,0) DESCRIPTION: This field designates the measure type. It can "BLD",7937,1,51,0) be P, Q or M. "BLD",7937,1,52,0) "BLD",7937,1,53,0) P is for Performance. Performance measures are "BLD",7937,1,54,0) MU measures to measure how meaningfully used an "BLD",7937,1,55,0) EMR is. An example of a performance measure is "BLD",7937,1,56,0) whether allergies are documented in the EMR. "BLD",7937,1,57,0) Performance measures reference a Patient List "BLD",7937,1,58,0) created by this package. "BLD",7937,1,59,0) "BLD",7937,1,60,0) Q is for Quality Measures. Quality measures are "BLD",7937,1,61,0) MU measures to assess how well the patients are "BLD",7937,1,62,0) cared for. An example of a quality measure is "BLD",7937,1,63,0) whether Hemoglobin A1c Poor Control. Quality "BLD",7937,1,64,0) measures reference Patient Lists in the "BLD",7937,1,65,0) Reminders package. "BLD",7937,1,66,0) "BLD",7937,1,67,0) E is for Electronic Prescribing. This is a "BLD",7937,1,68,0) Performance measure, except that it is handled "BLD",7937,1,69,0) differently than the rest. Instead of the "BLD",7937,1,70,0) numerators and denominators being lists of "BLD",7937,1,71,0) patients as with all the other measurements, "BLD",7937,1,72,0) they are a number of prescriptions. That's why "BLD",7937,1,73,0) we have a special flag for it. It references a "BLD",7937,1,74,0) Patient List created by this package. The "BLD",7937,1,75,0) numerator and denominators are stored in "BLD",7937,1,76,0) subfiles for each patient. "BLD",7937,1,77,0) "BLD",7937,1,78,0) TECHNICAL DESCR: As of version C0P*1.0*1, the software doesn't "BLD",7937,1,79,0) use this field except to check for an "BLD",7937,1,80,0) electronic prescribing type (code E). "BLD",7937,1,81,0) "BLD",7937,1,82,0) I anticipate using this field for other "BLD",7937,1,83,0) purposes in the future. "BLD",7937,1,84,0) "BLD",7937,1,85,0) INPUT TEMPLATE: "BLD",7937,1,86,0) C0Q EDIT MU MEASURE adds the new field MEASURE TYPE mentioned above. "BLD",7937,1,87,0) "BLD",7937,1,88,0) DATA: "BLD",7937,1,89,0) The entry MU EP ERX for processing ePrescribing stats in C0Q QUALITY "BLD",7937,1,90,0) MEASURE is sent to destination sites. "BLD",7937,1,91,0) "BLD",7937,1,92,0) Implementation Steps: "BLD",7937,1,93,0) 1. If you don't have New Crop eRx installed, there won't be any effects. "BLD",7937,1,94,0) The C0Q code will behave like before. "BLD",7937,1,95,0) 2. If you don't have C0P*1.0*4 installed, again, the C0Q code will behave "BLD",7937,1,96,0) as before the patch. "BLD",7937,1,97,0) 3. Once you install C0P*1.0*4 with this patch (C0Q*1.0*1), the code will "BLD",7937,1,98,0) loop through all Outpatients who have an ERx. The actual patients are "BLD",7937,1,99,0) determined via your outpatient parameters. If your parameters reference a "BLD",7937,1,100,0) clinic location that already has patients with ERxs, you don't need to do "BLD",7937,1,101,0) anything to make the code run. It will run automatically; and it's time "BLD",7937,1,102,0) consuming; before you run it though, make sure to do #4. "BLD",7937,1,103,0) 4. In order for you to see a print out of the eRx measures, you "BLD",7937,1,104,0) need to add the Measure MU EP ERX to the Measure Set used in the EP MU "BLD",7937,1,105,0) MEASUREMENT SET field in your Outpatient Parameters. You must do this "BLD",7937,1,106,0) before you run this for the first time. "BLD",7937,1,107,0) "BLD",7937,1,108,0) Example of Set-up: "BLD",7937,1,109,0) "BLD",7937,1,110,0) Select QUALITY MEASUREMENT MENU Option: ? "BLD",7937,1,111,0) "BLD",7937,1,112,0) COPY OVER PATIENT LISTS "BLD",7937,1,113,0) ED-1 COMPUTATION "BLD",7937,1,114,0) ED-2 COMPUTATION "BLD",7937,1,115,0) EP UPDATE MU MEASURES "BLD",7937,1,116,0) INP UPDATE MU MEASURES "BLD",7937,1,117,0) PQRI MENU ... "BLD",7937,1,118,0) PQRI PRINT XML "BLD",7937,1,119,0) PRINT C0Q MEASURES "BLD",7937,1,120,0) QRDA MENU ... "BLD",7937,1,121,0) SETUP QUALITY REPORTING ... "BLD",7937,1,122,0) "BLD",7937,1,123,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "BLD",7937,1,124,0) text. "BLD",7937,1,125,0) "BLD",7937,1,126,0) Select QUALITY MEASUREMENT MENU Option: setUP QUALITY REPORTING "BLD",7937,1,127,0) "BLD",7937,1,128,0) Select SETUP QUALITY REPORTING Option: ? "BLD",7937,1,129,0) "BLD",7937,1,130,0) DISPLAY QUALITY MEASURES "BLD",7937,1,131,0) EDIT SUPERUSERS "BLD",7937,1,132,0) EP EDIT PARMS "BLD",7937,1,133,0) INP EDIT PARMS "BLD",7937,1,134,0) MEASURE SET EDIT "BLD",7937,1,135,0) MU MEASURE EDIT "BLD",7937,1,136,0) QUALITY MEASURE EDIT "BLD",7937,1,137,0) "BLD",7937,1,138,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "BLD",7937,1,139,0) text. "BLD",7937,1,140,0) "BLD",7937,1,141,0) Select SETUP QUALITY REPORTING Option: ep edit PARMS "BLD",7937,1,142,0) "BLD",7937,1,143,0) Select C0Q PARAMETER NAME: OUTPATIENT "BLD",7937,1,144,0) NAME: OUTPATIENT// "BLD",7937,1,145,0) MEASUREMENT PERIOD KEY: MU12// "BLD",7937,1,146,0) PARAMETER TYPE: OUTPATIENT// "BLD",7937,1,147,0) EP MU MEASUREMENT SET: OUTPATIENT MEASURE SET// "BLD",7937,1,148,0) EP QUALITY MEASUREMENT SET: "BLD",7937,1,149,0) Select CLINIC: DR OFFICE// "BLD",7937,1,150,0) PATIENT LIST LABEL: "BLD",7937,1,151,0) Select SUBSCRIBER: "BLD",7937,1,152,0) "BLD",7937,1,153,0) Select C0Q PARAMETER NAME: "BLD",7937,1,154,0) "BLD",7937,1,155,0) Select SETUP QUALITY REPORTING Option: measure set EDIT "BLD",7937,1,156,0) "BLD",7937,1,157,0) Select C0Q MEASUREMENT SET NAME: outpaTIENT MEASURE SET "BLD",7937,1,158,0) NAME: OUTPATIENT MEASURE SET Replace "BLD",7937,1,159,0) BEGIN DATE: JUN 12,2001// "BLD",7937,1,160,0) END DATE: MAY 25,2012// "BLD",7937,1,161,0) LOCKED: "BLD",7937,1,162,0) MU YEAR KEY: MU12// "BLD",7937,1,163,0) QRDA TEMPLATE ROOT: "BLD",7937,1,164,0) Select MEASURE: MU EP ERX// "BLD",7937,1,165,0) MEASURE: MU EP ERX// "BLD",7937,1,166,0) NUMERATOR FILTER LIST: "BLD",7937,1,167,0) DENOMINATOR FILTER LIST: "BLD",7937,1,168,0) Select MEASURE: "BLD",7937,1,169,0) "BLD",7937,1,170,0) Select C0Q MEASUREMENT SET NAME: "BLD",7937,1,171,0) "BLD",7937,1,172,0) Select SETUP QUALITY REPORTING Option: "BLD",7937,1,173,0) "BLD",7937,1,174,0) Select QUALITY MEASUREMENT MENU Option: ? "BLD",7937,1,175,0) "BLD",7937,1,176,0) COPY OVER PATIENT LISTS "BLD",7937,1,177,0) ED-1 COMPUTATION "BLD",7937,1,178,0) ED-2 COMPUTATION "BLD",7937,1,179,0) EP UPDATE MU MEASURES "BLD",7937,1,180,0) INP UPDATE MU MEASURES "BLD",7937,1,181,0) PQRI MENU ... "BLD",7937,1,182,0) PQRI PRINT XML "BLD",7937,1,183,0) PRINT C0Q MEASURES "BLD",7937,1,184,0) QRDA MENU ... "BLD",7937,1,185,0) SETUP QUALITY REPORTING ... "BLD",7937,1,186,0) "BLD",7937,1,187,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "BLD",7937,1,188,0) text. "BLD",7937,1,189,0) "BLD",7937,1,190,0) Select QUALITY MEASUREMENT MENU Option: ep updATE MU MEASURES "BLD",7937,1,191,0) Sep 16, 2012@86:54:61 "BLD",7937,1,192,0) Jan 03, 2008@80:85:41 "BLD",7937,1,193,0) Jan 01, 2008@81:59:42 "BLD",7937,1,194,0) Nov 25, 2005@86:89:76 "BLD",7937,1,195,0) Nov 25, 2005@85:87:58 "BLD",7937,1,196,0) Nov 24, 2005@79:68:87 "BLD",7937,1,197,0) Aug 01, 2005@91:59:64 "BLD",7937,1,198,0) Aug 2005@84:91:51 "BLD",7937,1,199,0) Aug 2005@84:78:82 "BLD",7937,1,200,0) Jul 28, 2005@88:55:64 "BLD",7937,1,201,0) Jul 28, 2005@88:46:85 "BLD",7937,1,202,0) Jul 28, 2005@87:95:55 "BLD",7937,1,203,0) Jul 27, 2005@87:79:80 "BLD",7937,1,204,0) Jul 27, 2005@83:83:97 "BLD",7937,1,205,0) Jul 26, 2005@88:78:96 "BLD",7937,1,206,0) Jul 26, 2005@88:75:45 "BLD",7937,1,207,0) Jul 26, 2005@88:58:60 "BLD",7937,1,208,0) Jul 26, 2005@88:52:62 "BLD",7937,1,209,0) Jul 26, 2005@88:50:59 "BLD",7937,1,210,0) Jul 26, 2005@88:49:74 "BLD",7937,1,211,0) Jul 26, 2005@84:54:55 "BLD",7937,1,212,0) Jul 24, 2005@91:62:76 "BLD",7937,1,213,0) Jul 23, 2005@88:98:45 "BLD",7937,1,214,0) Jul 23, 2005@85:77:89 "BLD",7937,1,215,0) Jul 23, 2005@83:77:71 "BLD",7937,1,216,0) Jul 23, 2005@82:82:99 "BLD",7937,1,217,0) Jul 23, 2005@82:66:61 "BLD",7937,1,218,0) Jul 22, 2005@83:85:46 "BLD",7937,1,219,0) Jul 22, 2005@82:82:92 "BLD",7937,1,220,0) Jul 22, 2005@82:75:99 "BLD",7937,1,221,0) Jul 21, 2005@89:50:71 "BLD",7937,1,222,0) Jul 21, 2005@83:53:48 "BLD",7937,1,223,0) Jul 20, 2005@91:43:44 "BLD",7937,1,224,0) Jul 20, 2005@87:89:46 "BLD",7937,1,225,0) Jul 20, 2005@84:60:78 "BLD",7937,1,226,0) Jul 20, 2005@84:60:71 "BLD",7937,1,227,0) Jul 19, 2005@89:92:54 "BLD",7937,1,228,0) Jul 19, 2005@89:55:97 "BLD",7937,1,229,0) Jul 18, 2005@92:58:51 "BLD",7937,1,230,0) Jul 18, 2005@91:47:87 "BLD",7937,1,231,0) Jul 18, 2005@88:67:86 "BLD",7937,1,232,0) Jul 18, 2005@88:63:92 "BLD",7937,1,233,0) Jul 18, 2005@86:64:88 "BLD",7937,1,234,0) Jul 18, 2005@84:56:82 "BLD",7937,1,235,0) Jul 18, 2005@84:45:52 "BLD",7937,1,236,0) Jul 17, 2005@82:42:51 "BLD",7937,1,237,0) Jul 14, 2005@84:00 "BLD",7937,1,238,0) Jul 07, 2005@86:97 "BLD",7937,1,239,0) Jul 2005@85:62:77B index passed "BLD",7937,1,240,0) 4 "BLD",7937,1,241,0) Calling GETMEDS6 SOAP Web Service Call for 4 "BLD",7937,1,242,0) Patient 4 Rx 1 "BLD",7937,1,243,0) DeaClassCode: 0 "BLD",7937,1,244,0) PharmacyType: 1 "BLD",7937,1,245,0) PharmacyDetailType: 1 "BLD",7937,1,246,0) FinalDestinationType: 2 "BLD",7937,1,247,0) FinalStatusType: 2 "BLD",7937,1,248,0) Patient 4 Rx 2 "BLD",7937,1,249,0) DeaClassCode: 0 "BLD",7937,1,250,0) PharmacyType: 0 "BLD",7937,1,251,0) Patient 4 Rx 3 "BLD",7937,1,252,0) DeaClassCode: 0 "BLD",7937,1,253,0) PharmacyType: 1 "BLD",7937,1,254,0) PharmacyDetailType: 1 "BLD",7937,1,255,0) FinalDestinationType: 2 "BLD",7937,1,256,0) FinalStatusType: 2 "BLD",7937,1,257,0) Patient 4 Rx 4 "BLD",7937,1,258,0) DeaClassCode: 0 "BLD",7937,1,259,0) PharmacyType: 0 "BLD",7937,1,260,0) IENs ?+14,1,17, ready to file "BLD",7937,1,261,0) Saving ERXDEN of 0 for Patient MOUSE,MICKEY (4) "BLD",7937,1,262,0) Fileman Data Array "BLD",7937,1,263,0) C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXDEN "BLD",7937,1,264,0) C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0 "BLD",7937,1,265,0) Patient 4 Rx 1 "BLD",7937,1,266,0) DeaClassCode: 0 "BLD",7937,1,267,0) PharmacyType: 1 "BLD",7937,1,268,0) PharmacyDetailType: 1 "BLD",7937,1,269,0) FinalDestinationType: 2 "BLD",7937,1,270,0) Patient 4 Rx 2 "BLD",7937,1,271,0) DeaClassCode: 0 "BLD",7937,1,272,0) PharmacyType: 0 "BLD",7937,1,273,0) Patient 4 Rx 3 "BLD",7937,1,274,0) DeaClassCode: 0 "BLD",7937,1,275,0) PharmacyType: 1 "BLD",7937,1,276,0) PharmacyDetailType: 1 "BLD",7937,1,277,0) FinalDestinationType: 2 "BLD",7937,1,278,0) Patient 4 Rx 4 "BLD",7937,1,279,0) DeaClassCode: 0 "BLD",7937,1,280,0) PharmacyType: 0 "BLD",7937,1,281,0) IENs ?+14,1,17, ready to file "BLD",7937,1,282,0) Saving ERXNUM of 0 for Patient MOUSE,MICKEY (4) "BLD",7937,1,283,0) Fileman Data Array "BLD",7937,1,284,0) C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXNUM "BLD",7937,1,285,0) C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0 "BLD",7937,1,286,0) C0QFDA(1130580001.2011,"1,7,",3)=100 "BLD",7937,1,287,0) Processing E-Prescribing Counts "BLD",7937,1,288,0) DFN Denominator Numerator "BLD",7937,1,289,0) 4 0 0 "BLD",7937,1,290,0) === === "BLD",7937,1,291,0) 0 0 "BLD",7937,4,0) ^9.64PA^1130580001.101^2 "BLD",7937,4,1130580001.101,0) 1130580001.101 "BLD",7937,4,1130580001.101,222) y^y^f^^n^^y^o^n "BLD",7937,4,1130580001.101,224) I $P(^(0),U)="MU EP ERX" "BLD",7937,4,1130580001.401,0) 1130580001.401 "BLD",7937,4,1130580001.401,2,0) ^9.641^1130580001.401^1 "BLD",7937,4,1130580001.401,2,1130580001.401,0) C0Q PARAMETER (File-top level) "BLD",7937,4,1130580001.401,2,1130580001.401,1,0) ^9.6411^2.1^2 "BLD",7937,4,1130580001.401,2,1130580001.401,1,2,0) EP MU MEASUREMENT SET "BLD",7937,4,1130580001.401,2,1130580001.401,1,2.1,0) EP QUALITY MEASUREMENT SET "BLD",7937,4,1130580001.401,222) y^n^p^^^^n^^n "BLD",7937,4,1130580001.401,224) "BLD",7937,4,"APDD",1130580001.401,1130580001.401) "BLD",7937,4,"APDD",1130580001.401,1130580001.401,2) "BLD",7937,4,"APDD",1130580001.401,1130580001.401,2.1) "BLD",7937,4,"B",1130580001.101,1130580001.101) "BLD",7937,4,"B",1130580001.401,1130580001.401) "BLD",7937,6.3) 32 "BLD",7937,"ABPKG") n "BLD",7937,"INIT") POST^C0Q1P1 "BLD",7937,"KRN",0) ^9.67PA^779.2^20 "BLD",7937,"KRN",.4,0) .4 "BLD",7937,"KRN",.4,"NM",0) ^9.68A^^0 "BLD",7937,"KRN",.401,0) .401 "BLD",7937,"KRN",.401,"NM",0) ^9.68A^^ "BLD",7937,"KRN",.402,0) .402 "BLD",7937,"KRN",.402,"NM",0) ^9.68A^1^1 "BLD",7937,"KRN",.402,"NM",1,0) C0Q EDIT MU MEASURE FILE #1130580001.101^1130580001.101^0 "BLD",7937,"KRN",.402,"NM","B","C0Q EDIT MU MEASURE FILE #1130580001.101",1) "BLD",7937,"KRN",.403,0) .403 "BLD",7937,"KRN",.5,0) .5 "BLD",7937,"KRN",.84,0) .84 "BLD",7937,"KRN",3.6,0) 3.6 "BLD",7937,"KRN",3.8,0) 3.8 "BLD",7937,"KRN",9.2,0) 9.2 "BLD",7937,"KRN",9.8,0) 9.8 "BLD",7937,"KRN",9.8,"NM",0) ^9.68A^3^3 "BLD",7937,"KRN",9.8,"NM",1,0) C0QMUERX^^0^B83723794 "BLD",7937,"KRN",9.8,"NM",2,0) C0QUPDT^^0^B78393601 "BLD",7937,"KRN",9.8,"NM",3,0) C0QMU12^^0^B266254568 "BLD",7937,"KRN",9.8,"NM","B","C0QMU12",3) "BLD",7937,"KRN",9.8,"NM","B","C0QMUERX",1) "BLD",7937,"KRN",9.8,"NM","B","C0QUPDT",2) "BLD",7937,"KRN",19,0) 19 "BLD",7937,"KRN",19,"NM",0) ^9.68A^^0 "BLD",7937,"KRN",19.1,0) 19.1 "BLD",7937,"KRN",101,0) 101 "BLD",7937,"KRN",409.61,0) 409.61 "BLD",7937,"KRN",771,0) 771 "BLD",7937,"KRN",779.2,0) 779.2 "BLD",7937,"KRN",870,0) 870 "BLD",7937,"KRN",8989.51,0) 8989.51 "BLD",7937,"KRN",8989.52,0) 8989.52 "BLD",7937,"KRN",8994,0) 8994 "BLD",7937,"KRN","B",.4,.4) "BLD",7937,"KRN","B",.401,.401) "BLD",7937,"KRN","B",.402,.402) "BLD",7937,"KRN","B",.403,.403) "BLD",7937,"KRN","B",.5,.5) "BLD",7937,"KRN","B",.84,.84) "BLD",7937,"KRN","B",3.6,3.6) "BLD",7937,"KRN","B",3.8,3.8) "BLD",7937,"KRN","B",9.2,9.2) "BLD",7937,"KRN","B",9.8,9.8) "BLD",7937,"KRN","B",19,19) "BLD",7937,"KRN","B",19.1,19.1) "BLD",7937,"KRN","B",101,101) "BLD",7937,"KRN","B",409.61,409.61) "BLD",7937,"KRN","B",771,771) "BLD",7937,"KRN","B",779.2,779.2) "BLD",7937,"KRN","B",870,870) "BLD",7937,"KRN","B",8989.51,8989.51) "BLD",7937,"KRN","B",8989.52,8989.52) "BLD",7937,"KRN","B",8994,8994) "BLD",7937,"QDEF") ^^^^NO^^^^NO^^NO "BLD",7937,"QUES",0) ^9.62^^ "BLD",7937,"REQB",0) ^9.611^1^1 "BLD",7937,"REQB",1,0) QUALITY MEASURES 1.0^2 "BLD",7937,"REQB","B","QUALITY MEASURES 1.0",1) "DATA",1130580001.101,104,0) MU EP ERX^^^^E "DATA",1130580001.101,104,1) More than 40% of all permissible prescriptions written by the EP are transmitted electronically using certified EHR technology. "DATA",1130580001.101,104,5) Eligibile Prescriptions transmitted electronically "DATA",1130580001.101,104,6,0) ^1130580001.111^6^6^3120614^^^ "DATA",1130580001.101,104,6,1,0) Final Rule Text: § 170.304(b). "DATA",1130580001.101,104,6,2,0) Electronic prescribing. Enable a user to electronically generate "DATA",1130580001.101,104,6,3,0) and transmit prescriptions and prescription-related information "DATA",1130580001.101,104,6,4,0) in accordance with: "DATA",1130580001.101,104,6,5,0) (1) The standard specified in § 170.205(b)(1) or § 170.205(b)(2); and "DATA",1130580001.101,104,6,6,0) (2) The standard specified in 170.207(d). "DATA",1130580001.101,104,7) ^^^^^MU12 "FIA",1130580001.101) C0Q QUALITY MEASURE "FIA",1130580001.101,0) ^C0Q(101, "FIA",1130580001.101,0,0) 1130580001.101I "FIA",1130580001.101,0,1) y^y^f^^n^^y^o^n "FIA",1130580001.101,0,10) "FIA",1130580001.101,0,11) I $P(^(0),U)="MU EP ERX" "FIA",1130580001.101,0,"RLRO") "FIA",1130580001.101,0,"VR") 1.0^C0Q "FIA",1130580001.101,1130580001.101) 0 "FIA",1130580001.101,1130580001.111) 0 "FIA",1130580001.401) C0Q PARAMETER "FIA",1130580001.401,0) ^C0Q(401, "FIA",1130580001.401,0,0) 1130580001.401 "FIA",1130580001.401,0,1) y^n^p^^^^n^^n "FIA",1130580001.401,0,10) "FIA",1130580001.401,0,11) "FIA",1130580001.401,0,"RLRO") "FIA",1130580001.401,0,"VR") 1.0^C0Q "FIA",1130580001.401,1130580001.401) 1 "FIA",1130580001.401,1130580001.401,2) "FIA",1130580001.401,1130580001.401,2.1) "INIT") POST^C0Q1P1 "IX",1130580001.101,1130580001.101,"B",0) 1130580001.101^B^New-Style B Index. Will be used as part of the key.^R^^F^IR^I^1130580001.101^^^^^LS "IX",1130580001.101,1130580001.101,"B",1) S ^C0Q(101,"B",$E(X,1,30),DA)="" "IX",1130580001.101,1130580001.101,"B",2) K ^C0Q(101,"B",$E(X,1,30),DA) "IX",1130580001.101,1130580001.101,"B",2.5) K ^C0Q(101,"B") "IX",1130580001.101,1130580001.101,"B",11.1,0) ^.114IA^1^1 "IX",1130580001.101,1130580001.101,"B",11.1,1,0) 1^F^1130580001.101^.01^30^1^F "IX",1130580001.101,1130580001.101,"MU",0) 1130580001.101^MU^MEANINGFUL USE YEAR KEY^R^^F^IR^I^1130580001.101^^^^^LS "IX",1130580001.101,1130580001.101,"MU",1) S ^C0Q(101,"MU",$E(X,1,30),DA)="" "IX",1130580001.101,1130580001.101,"MU",2) K ^C0Q(101,"MU",$E(X,1,30),DA) "IX",1130580001.101,1130580001.101,"MU",2.5) K ^C0Q(101,"MU") "IX",1130580001.101,1130580001.101,"MU",11.1,0) ^.114IA^1^1 "IX",1130580001.101,1130580001.101,"MU",11.1,1,0) 1^F^1130580001.101^.3^30^1^F "KEY",1130580001.101,1130580001.101,"A",0) 1130580001.101^A^P^739 "KEY",1130580001.101,1130580001.101,"A",2,0) ^.312IA^1^1 "KEY",1130580001.101,1130580001.101,"A",2,1,0) .01^1130580001.101^1 "KEYPTR",1130580001.101,1130580001.101,"A") 1130580001.101^B "KRN",.402,1746,-1) 0^1 "KRN",.402,1746,0) C0Q EDIT MU MEASURE^3120917.1335^@^1130580001.101^^@^3120614 "KRN",.402,1746,"DR",1,1130580001.101) .01;4;.3;.5;.61;.7;.8;1.1;2.1; "MBREQ") 0 "ORD",7,.402) .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,"",%) "ORD",7,.402,0) INPUT TEMPLATE "PKG",213,-1) 1^1 "PKG",213,0) QUALITY MEASURES^C0Q^Tracks and Prints Quality Measures "PKG",213,20,0) ^9.402P^^ "PKG",213,22,0) ^9.49I^1^1 "PKG",213,22,1,0) 1.0^3120731^3120614^8 "PKG",213,22,1,"PAH",1,0) 1^3120917 "PKG",213,22,1,"PAH",1,1,0) ^^291^291^3120917 "PKG",213,22,1,"PAH",1,1,1,0) ePrescribing MU measure in this package. "PKG",213,22,1,"PAH",1,1,2,0) "PKG",213,22,1,"PAH",1,1,3,0) Dependencies: "PKG",213,22,1,"PAH",1,1,4,0) This build requires C0P*1*4 for the new WebService entry that gets MU "PKG",213,22,1,"PAH",1,1,5,0) data from New Crop. "PKG",213,22,1,"PAH",1,1,6,0) This build requires the base C0Q 1.0 to be installed. "PKG",213,22,1,"PAH",1,1,7,0) "PKG",213,22,1,"PAH",1,1,8,0) This build performs the following: "PKG",213,22,1,"PAH",1,1,9,0) Routines: "PKG",213,22,1,"PAH",1,1,10,0) 1. Adds routine C0QMUERX for calculation of ePrescribing stats. "PKG",213,22,1,"PAH",1,1,11,0) 2. Mods routine C0QMU12 to call C0QMUERX for the ERX measure for "PKG",213,22,1,"PAH",1,1,12,0) Outpatients. "PKG",213,22,1,"PAH",1,1,13,0) 3. Mods routine C0QUPDT to handle the special case of ePrescribing stats. "PKG",213,22,1,"PAH",1,1,14,0) Also, some checks and quits so that we won't crash if no patient lists "PKG",213,22,1,"PAH",1,1,15,0) are associated with the measure. "PKG",213,22,1,"PAH",1,1,16,0) "PKG",213,22,1,"PAH",1,1,17,0) Data Dictionary: "PKG",213,22,1,"PAH",1,1,18,0) 1. File C0Q PARAMETER has two new indexes: "PKG",213,22,1,"PAH",1,1,19,0) AMMS REGULAR "PKG",213,22,1,"PAH",1,1,20,0) Field: EP MU MEASUREMENT SET (1130580001.401,2) "PKG",213,22,1,"PAH",1,1,21,0) Description: Indexes the IEN of the Measurement Set. Used so that we can "PKG",213,22,1,"PAH",1,1,22,0) walk back to a parameter when processing a specific IEN. "PKG",213,22,1,"PAH",1,1,23,0) "PKG",213,22,1,"PAH",1,1,24,0) You can get the IEN of the measurement set using "PKG",213,22,1,"PAH",1,1,25,0) $O(^C0Q(401,"AMMS",MSIEN,"")). "PKG",213,22,1,"PAH",1,1,26,0) 1)= S ^C0Q(401,"AMMS",$E(X,1,30),DA)="" "PKG",213,22,1,"PAH",1,1,27,0) 2)= K ^C0Q(401,"AMMS",$E(X,1,30),DA) "PKG",213,22,1,"PAH",1,1,28,0) 3)= USED BY THE CODE. SEE DESCRIPTION. "PKG",213,22,1,"PAH",1,1,29,0) "PKG",213,22,1,"PAH",1,1,30,0) AQMS REGULAR "PKG",213,22,1,"PAH",1,1,31,0) Field: EP QUALITY MEASUREMENT SET (1130580001.401,2.1) "PKG",213,22,1,"PAH",1,1,32,0) Description: Indexes the IEN of the Measurement Set. Used so that we can "PKG",213,22,1,"PAH",1,1,33,0) walk back to a parameter when processing a specific IEN. "PKG",213,22,1,"PAH",1,1,34,0) "PKG",213,22,1,"PAH",1,1,35,0) You can get the IEN of the measurement set using "PKG",213,22,1,"PAH",1,1,36,0) $O(^C0Q(401,"AQMS",MSIEN,"")). "PKG",213,22,1,"PAH",1,1,37,0) 1)= S ^C0Q(401,"AQMS",$E(X,1,30),DA)="" "PKG",213,22,1,"PAH",1,1,38,0) 2)= K ^C0Q(401,"AQMS",$E(X,1,30),DA) "PKG",213,22,1,"PAH",1,1,39,0) 3)= USED BY THE CODE. SEE DESCRIPTION. "PKG",213,22,1,"PAH",1,1,40,0) "PKG",213,22,1,"PAH",1,1,41,0) 2. File C0Q QUALITY MEASURE has a new field, MEASURE TYPE (#4): "PKG",213,22,1,"PAH",1,1,42,0) "PKG",213,22,1,"PAH",1,1,43,0) 1130580001.101,4MEASURE TYPE 0;5 SET "PKG",213,22,1,"PAH",1,1,44,0) "PKG",213,22,1,"PAH",1,1,45,0) 'P' FOR Performance; "PKG",213,22,1,"PAH",1,1,46,0) 'Q' FOR Quality; "PKG",213,22,1,"PAH",1,1,47,0) 'E' FOR Electronic Prescribing Performance; "PKG",213,22,1,"PAH",1,1,48,0) LAST EDITED: MAY 30, 2012 "PKG",213,22,1,"PAH",1,1,49,0) HELP-PROMPT: Enter a code P, Q or E "PKG",213,22,1,"PAH",1,1,50,0) DESCRIPTION: This field designates the measure type. It can "PKG",213,22,1,"PAH",1,1,51,0) be P, Q or M. "PKG",213,22,1,"PAH",1,1,52,0) "PKG",213,22,1,"PAH",1,1,53,0) P is for Performance. Performance measures are "PKG",213,22,1,"PAH",1,1,54,0) MU measures to measure how meaningfully used an "PKG",213,22,1,"PAH",1,1,55,0) EMR is. An example of a performance measure is "PKG",213,22,1,"PAH",1,1,56,0) whether allergies are documented in the EMR. "PKG",213,22,1,"PAH",1,1,57,0) Performance measures reference a Patient List "PKG",213,22,1,"PAH",1,1,58,0) created by this package. "PKG",213,22,1,"PAH",1,1,59,0) "PKG",213,22,1,"PAH",1,1,60,0) Q is for Quality Measures. Quality measures are "PKG",213,22,1,"PAH",1,1,61,0) MU measures to assess how well the patients are "PKG",213,22,1,"PAH",1,1,62,0) cared for. An example of a quality measure is "PKG",213,22,1,"PAH",1,1,63,0) whether Hemoglobin A1c Poor Control. Quality "PKG",213,22,1,"PAH",1,1,64,0) measures reference Patient Lists in the "PKG",213,22,1,"PAH",1,1,65,0) Reminders package. "PKG",213,22,1,"PAH",1,1,66,0) "PKG",213,22,1,"PAH",1,1,67,0) E is for Electronic Prescribing. This is a "PKG",213,22,1,"PAH",1,1,68,0) Performance measure, except that it is handled "PKG",213,22,1,"PAH",1,1,69,0) differently than the rest. Instead of the "PKG",213,22,1,"PAH",1,1,70,0) numerators and denominators being lists of "PKG",213,22,1,"PAH",1,1,71,0) patients as with all the other measurements, "PKG",213,22,1,"PAH",1,1,72,0) they are a number of prescriptions. That's why "PKG",213,22,1,"PAH",1,1,73,0) we have a special flag for it. It references a "PKG",213,22,1,"PAH",1,1,74,0) Patient List created by this package. The "PKG",213,22,1,"PAH",1,1,75,0) numerator and denominators are stored in "PKG",213,22,1,"PAH",1,1,76,0) subfiles for each patient. "PKG",213,22,1,"PAH",1,1,77,0) "PKG",213,22,1,"PAH",1,1,78,0) TECHNICAL DESCR: As of version C0P*1.0*1, the software doesn't "PKG",213,22,1,"PAH",1,1,79,0) use this field except to check for an "PKG",213,22,1,"PAH",1,1,80,0) electronic prescribing type (code E). "PKG",213,22,1,"PAH",1,1,81,0) "PKG",213,22,1,"PAH",1,1,82,0) I anticipate using this field for other "PKG",213,22,1,"PAH",1,1,83,0) purposes in the future. "PKG",213,22,1,"PAH",1,1,84,0) "PKG",213,22,1,"PAH",1,1,85,0) INPUT TEMPLATE: "PKG",213,22,1,"PAH",1,1,86,0) C0Q EDIT MU MEASURE adds the new field MEASURE TYPE mentioned above. "PKG",213,22,1,"PAH",1,1,87,0) "PKG",213,22,1,"PAH",1,1,88,0) DATA: "PKG",213,22,1,"PAH",1,1,89,0) The entry MU EP ERX for processing ePrescribing stats in C0Q QUALITY "PKG",213,22,1,"PAH",1,1,90,0) MEASURE is sent to destination sites. "PKG",213,22,1,"PAH",1,1,91,0) "PKG",213,22,1,"PAH",1,1,92,0) Implementation Steps: "PKG",213,22,1,"PAH",1,1,93,0) 1. If you don't have New Crop eRx installed, there won't be any effects. "PKG",213,22,1,"PAH",1,1,94,0) The C0Q code will behave like before. "PKG",213,22,1,"PAH",1,1,95,0) 2. If you don't have C0P*1.0*4 installed, again, the C0Q code will behave "PKG",213,22,1,"PAH",1,1,96,0) as before the patch. "PKG",213,22,1,"PAH",1,1,97,0) 3. Once you install C0P*1.0*4 with this patch (C0Q*1.0*1), the code will "PKG",213,22,1,"PAH",1,1,98,0) loop through all Outpatients who have an ERx. The actual patients are "PKG",213,22,1,"PAH",1,1,99,0) determined via your outpatient parameters. If your parameters reference a "PKG",213,22,1,"PAH",1,1,100,0) clinic location that already has patients with ERxs, you don't need to do "PKG",213,22,1,"PAH",1,1,101,0) anything to make the code run. It will run automatically; and it's time "PKG",213,22,1,"PAH",1,1,102,0) consuming; before you run it though, make sure to do #4. "PKG",213,22,1,"PAH",1,1,103,0) 4. In order for you to see a print out of the eRx measures, you "PKG",213,22,1,"PAH",1,1,104,0) need to add the Measure MU EP ERX to the Measure Set used in the EP MU "PKG",213,22,1,"PAH",1,1,105,0) MEASUREMENT SET field in your Outpatient Parameters. You must do this "PKG",213,22,1,"PAH",1,1,106,0) before you run this for the first time. "PKG",213,22,1,"PAH",1,1,107,0) "PKG",213,22,1,"PAH",1,1,108,0) Example of Set-up: "PKG",213,22,1,"PAH",1,1,109,0) "PKG",213,22,1,"PAH",1,1,110,0) Select QUALITY MEASUREMENT MENU Option: ? "PKG",213,22,1,"PAH",1,1,111,0) "PKG",213,22,1,"PAH",1,1,112,0) COPY OVER PATIENT LISTS "PKG",213,22,1,"PAH",1,1,113,0) ED-1 COMPUTATION "PKG",213,22,1,"PAH",1,1,114,0) ED-2 COMPUTATION "PKG",213,22,1,"PAH",1,1,115,0) EP UPDATE MU MEASURES "PKG",213,22,1,"PAH",1,1,116,0) INP UPDATE MU MEASURES "PKG",213,22,1,"PAH",1,1,117,0) PQRI MENU ... "PKG",213,22,1,"PAH",1,1,118,0) PQRI PRINT XML "PKG",213,22,1,"PAH",1,1,119,0) PRINT C0Q MEASURES "PKG",213,22,1,"PAH",1,1,120,0) QRDA MENU ... "PKG",213,22,1,"PAH",1,1,121,0) SETUP QUALITY REPORTING ... "PKG",213,22,1,"PAH",1,1,122,0) "PKG",213,22,1,"PAH",1,1,123,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "PKG",213,22,1,"PAH",1,1,124,0) text. "PKG",213,22,1,"PAH",1,1,125,0) "PKG",213,22,1,"PAH",1,1,126,0) Select QUALITY MEASUREMENT MENU Option: setUP QUALITY REPORTING "PKG",213,22,1,"PAH",1,1,127,0) "PKG",213,22,1,"PAH",1,1,128,0) Select SETUP QUALITY REPORTING Option: ? "PKG",213,22,1,"PAH",1,1,129,0) "PKG",213,22,1,"PAH",1,1,130,0) DISPLAY QUALITY MEASURES "PKG",213,22,1,"PAH",1,1,131,0) EDIT SUPERUSERS "PKG",213,22,1,"PAH",1,1,132,0) EP EDIT PARMS "PKG",213,22,1,"PAH",1,1,133,0) INP EDIT PARMS "PKG",213,22,1,"PAH",1,1,134,0) MEASURE SET EDIT "PKG",213,22,1,"PAH",1,1,135,0) MU MEASURE EDIT "PKG",213,22,1,"PAH",1,1,136,0) QUALITY MEASURE EDIT "PKG",213,22,1,"PAH",1,1,137,0) "PKG",213,22,1,"PAH",1,1,138,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "PKG",213,22,1,"PAH",1,1,139,0) text. "PKG",213,22,1,"PAH",1,1,140,0) "PKG",213,22,1,"PAH",1,1,141,0) Select SETUP QUALITY REPORTING Option: ep edit PARMS "PKG",213,22,1,"PAH",1,1,142,0) "PKG",213,22,1,"PAH",1,1,143,0) Select C0Q PARAMETER NAME: OUTPATIENT "PKG",213,22,1,"PAH",1,1,144,0) NAME: OUTPATIENT// "PKG",213,22,1,"PAH",1,1,145,0) MEASUREMENT PERIOD KEY: MU12// "PKG",213,22,1,"PAH",1,1,146,0) PARAMETER TYPE: OUTPATIENT// "PKG",213,22,1,"PAH",1,1,147,0) EP MU MEASUREMENT SET: OUTPATIENT MEASURE SET// "PKG",213,22,1,"PAH",1,1,148,0) EP QUALITY MEASUREMENT SET: "PKG",213,22,1,"PAH",1,1,149,0) Select CLINIC: DR OFFICE// "PKG",213,22,1,"PAH",1,1,150,0) PATIENT LIST LABEL: "PKG",213,22,1,"PAH",1,1,151,0) Select SUBSCRIBER: "PKG",213,22,1,"PAH",1,1,152,0) "PKG",213,22,1,"PAH",1,1,153,0) Select C0Q PARAMETER NAME: "PKG",213,22,1,"PAH",1,1,154,0) "PKG",213,22,1,"PAH",1,1,155,0) Select SETUP QUALITY REPORTING Option: measure set EDIT "PKG",213,22,1,"PAH",1,1,156,0) "PKG",213,22,1,"PAH",1,1,157,0) Select C0Q MEASUREMENT SET NAME: outpaTIENT MEASURE SET "PKG",213,22,1,"PAH",1,1,158,0) NAME: OUTPATIENT MEASURE SET Replace "PKG",213,22,1,"PAH",1,1,159,0) BEGIN DATE: JUN 12,2001// "PKG",213,22,1,"PAH",1,1,160,0) END DATE: MAY 25,2012// "PKG",213,22,1,"PAH",1,1,161,0) LOCKED: "PKG",213,22,1,"PAH",1,1,162,0) MU YEAR KEY: MU12// "PKG",213,22,1,"PAH",1,1,163,0) QRDA TEMPLATE ROOT: "PKG",213,22,1,"PAH",1,1,164,0) Select MEASURE: MU EP ERX// "PKG",213,22,1,"PAH",1,1,165,0) MEASURE: MU EP ERX// "PKG",213,22,1,"PAH",1,1,166,0) NUMERATOR FILTER LIST: "PKG",213,22,1,"PAH",1,1,167,0) DENOMINATOR FILTER LIST: "PKG",213,22,1,"PAH",1,1,168,0) Select MEASURE: "PKG",213,22,1,"PAH",1,1,169,0) "PKG",213,22,1,"PAH",1,1,170,0) Select C0Q MEASUREMENT SET NAME: "PKG",213,22,1,"PAH",1,1,171,0) "PKG",213,22,1,"PAH",1,1,172,0) Select SETUP QUALITY REPORTING Option: "PKG",213,22,1,"PAH",1,1,173,0) "PKG",213,22,1,"PAH",1,1,174,0) Select QUALITY MEASUREMENT MENU Option: ? "PKG",213,22,1,"PAH",1,1,175,0) "PKG",213,22,1,"PAH",1,1,176,0) COPY OVER PATIENT LISTS "PKG",213,22,1,"PAH",1,1,177,0) ED-1 COMPUTATION "PKG",213,22,1,"PAH",1,1,178,0) ED-2 COMPUTATION "PKG",213,22,1,"PAH",1,1,179,0) EP UPDATE MU MEASURES "PKG",213,22,1,"PAH",1,1,180,0) INP UPDATE MU MEASURES "PKG",213,22,1,"PAH",1,1,181,0) PQRI MENU ... "PKG",213,22,1,"PAH",1,1,182,0) PQRI PRINT XML "PKG",213,22,1,"PAH",1,1,183,0) PRINT C0Q MEASURES "PKG",213,22,1,"PAH",1,1,184,0) QRDA MENU ... "PKG",213,22,1,"PAH",1,1,185,0) SETUP QUALITY REPORTING ... "PKG",213,22,1,"PAH",1,1,186,0) "PKG",213,22,1,"PAH",1,1,187,0) Enter ?? for more options, ??? for brief descriptions, ?OPTION for help "PKG",213,22,1,"PAH",1,1,188,0) text. "PKG",213,22,1,"PAH",1,1,189,0) "PKG",213,22,1,"PAH",1,1,190,0) Select QUALITY MEASUREMENT MENU Option: ep updATE MU MEASURES "PKG",213,22,1,"PAH",1,1,191,0) Sep 16, 2012@86:54:61 "PKG",213,22,1,"PAH",1,1,192,0) Jan 03, 2008@80:85:41 "PKG",213,22,1,"PAH",1,1,193,0) Jan 01, 2008@81:59:42 "PKG",213,22,1,"PAH",1,1,194,0) Nov 25, 2005@86:89:76 "PKG",213,22,1,"PAH",1,1,195,0) Nov 25, 2005@85:87:58 "PKG",213,22,1,"PAH",1,1,196,0) Nov 24, 2005@79:68:87 "PKG",213,22,1,"PAH",1,1,197,0) Aug 01, 2005@91:59:64 "PKG",213,22,1,"PAH",1,1,198,0) Aug 2005@84:91:51 "PKG",213,22,1,"PAH",1,1,199,0) Aug 2005@84:78:82 "PKG",213,22,1,"PAH",1,1,200,0) Jul 28, 2005@88:55:64 "PKG",213,22,1,"PAH",1,1,201,0) Jul 28, 2005@88:46:85 "PKG",213,22,1,"PAH",1,1,202,0) Jul 28, 2005@87:95:55 "PKG",213,22,1,"PAH",1,1,203,0) Jul 27, 2005@87:79:80 "PKG",213,22,1,"PAH",1,1,204,0) Jul 27, 2005@83:83:97 "PKG",213,22,1,"PAH",1,1,205,0) Jul 26, 2005@88:78:96 "PKG",213,22,1,"PAH",1,1,206,0) Jul 26, 2005@88:75:45 "PKG",213,22,1,"PAH",1,1,207,0) Jul 26, 2005@88:58:60 "PKG",213,22,1,"PAH",1,1,208,0) Jul 26, 2005@88:52:62 "PKG",213,22,1,"PAH",1,1,209,0) Jul 26, 2005@88:50:59 "PKG",213,22,1,"PAH",1,1,210,0) Jul 26, 2005@88:49:74 "PKG",213,22,1,"PAH",1,1,211,0) Jul 26, 2005@84:54:55 "PKG",213,22,1,"PAH",1,1,212,0) Jul 24, 2005@91:62:76 "PKG",213,22,1,"PAH",1,1,213,0) Jul 23, 2005@88:98:45 "PKG",213,22,1,"PAH",1,1,214,0) Jul 23, 2005@85:77:89 "PKG",213,22,1,"PAH",1,1,215,0) Jul 23, 2005@83:77:71 "PKG",213,22,1,"PAH",1,1,216,0) Jul 23, 2005@82:82:99 "PKG",213,22,1,"PAH",1,1,217,0) Jul 23, 2005@82:66:61 "PKG",213,22,1,"PAH",1,1,218,0) Jul 22, 2005@83:85:46 "PKG",213,22,1,"PAH",1,1,219,0) Jul 22, 2005@82:82:92 "PKG",213,22,1,"PAH",1,1,220,0) Jul 22, 2005@82:75:99 "PKG",213,22,1,"PAH",1,1,221,0) Jul 21, 2005@89:50:71 "PKG",213,22,1,"PAH",1,1,222,0) Jul 21, 2005@83:53:48 "PKG",213,22,1,"PAH",1,1,223,0) Jul 20, 2005@91:43:44 "PKG",213,22,1,"PAH",1,1,224,0) Jul 20, 2005@87:89:46 "PKG",213,22,1,"PAH",1,1,225,0) Jul 20, 2005@84:60:78 "PKG",213,22,1,"PAH",1,1,226,0) Jul 20, 2005@84:60:71 "PKG",213,22,1,"PAH",1,1,227,0) Jul 19, 2005@89:92:54 "PKG",213,22,1,"PAH",1,1,228,0) Jul 19, 2005@89:55:97 "PKG",213,22,1,"PAH",1,1,229,0) Jul 18, 2005@92:58:51 "PKG",213,22,1,"PAH",1,1,230,0) Jul 18, 2005@91:47:87 "PKG",213,22,1,"PAH",1,1,231,0) Jul 18, 2005@88:67:86 "PKG",213,22,1,"PAH",1,1,232,0) Jul 18, 2005@88:63:92 "PKG",213,22,1,"PAH",1,1,233,0) Jul 18, 2005@86:64:88 "PKG",213,22,1,"PAH",1,1,234,0) Jul 18, 2005@84:56:82 "PKG",213,22,1,"PAH",1,1,235,0) Jul 18, 2005@84:45:52 "PKG",213,22,1,"PAH",1,1,236,0) Jul 17, 2005@82:42:51 "PKG",213,22,1,"PAH",1,1,237,0) Jul 14, 2005@84:00 "PKG",213,22,1,"PAH",1,1,238,0) Jul 07, 2005@86:97 "PKG",213,22,1,"PAH",1,1,239,0) Jul 2005@85:62:77B index passed "PKG",213,22,1,"PAH",1,1,240,0) 4 "PKG",213,22,1,"PAH",1,1,241,0) Calling GETMEDS6 SOAP Web Service Call for 4 "PKG",213,22,1,"PAH",1,1,242,0) Patient 4 Rx 1 "PKG",213,22,1,"PAH",1,1,243,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,244,0) PharmacyType: 1 "PKG",213,22,1,"PAH",1,1,245,0) PharmacyDetailType: 1 "PKG",213,22,1,"PAH",1,1,246,0) FinalDestinationType: 2 "PKG",213,22,1,"PAH",1,1,247,0) FinalStatusType: 2 "PKG",213,22,1,"PAH",1,1,248,0) Patient 4 Rx 2 "PKG",213,22,1,"PAH",1,1,249,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,250,0) PharmacyType: 0 "PKG",213,22,1,"PAH",1,1,251,0) Patient 4 Rx 3 "PKG",213,22,1,"PAH",1,1,252,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,253,0) PharmacyType: 1 "PKG",213,22,1,"PAH",1,1,254,0) PharmacyDetailType: 1 "PKG",213,22,1,"PAH",1,1,255,0) FinalDestinationType: 2 "PKG",213,22,1,"PAH",1,1,256,0) FinalStatusType: 2 "PKG",213,22,1,"PAH",1,1,257,0) Patient 4 Rx 4 "PKG",213,22,1,"PAH",1,1,258,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,259,0) PharmacyType: 0 "PKG",213,22,1,"PAH",1,1,260,0) IENs ?+14,1,17, ready to file "PKG",213,22,1,"PAH",1,1,261,0) Saving ERXDEN of 0 for Patient MOUSE,MICKEY (4) "PKG",213,22,1,"PAH",1,1,262,0) Fileman Data Array "PKG",213,22,1,"PAH",1,1,263,0) C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXDEN "PKG",213,22,1,"PAH",1,1,264,0) C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0 "PKG",213,22,1,"PAH",1,1,265,0) Patient 4 Rx 1 "PKG",213,22,1,"PAH",1,1,266,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,267,0) PharmacyType: 1 "PKG",213,22,1,"PAH",1,1,268,0) PharmacyDetailType: 1 "PKG",213,22,1,"PAH",1,1,269,0) FinalDestinationType: 2 "PKG",213,22,1,"PAH",1,1,270,0) Patient 4 Rx 2 "PKG",213,22,1,"PAH",1,1,271,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,272,0) PharmacyType: 0 "PKG",213,22,1,"PAH",1,1,273,0) Patient 4 Rx 3 "PKG",213,22,1,"PAH",1,1,274,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,275,0) PharmacyType: 1 "PKG",213,22,1,"PAH",1,1,276,0) PharmacyDetailType: 1 "PKG",213,22,1,"PAH",1,1,277,0) FinalDestinationType: 2 "PKG",213,22,1,"PAH",1,1,278,0) Patient 4 Rx 4 "PKG",213,22,1,"PAH",1,1,279,0) DeaClassCode: 0 "PKG",213,22,1,"PAH",1,1,280,0) PharmacyType: 0 "PKG",213,22,1,"PAH",1,1,281,0) IENs ?+14,1,17, ready to file "PKG",213,22,1,"PAH",1,1,282,0) Saving ERXNUM of 0 for Patient MOUSE,MICKEY (4) "PKG",213,22,1,"PAH",1,1,283,0) Fileman Data Array "PKG",213,22,1,"PAH",1,1,284,0) C0QFDA(1130580001.3111,"?+14,1,17,",.01): ERXNUM "PKG",213,22,1,"PAH",1,1,285,0) C0QFDA(1130580001.3111,"?+14,1,17,",.02): 0 "PKG",213,22,1,"PAH",1,1,286,0) C0QFDA(1130580001.2011,"1,7,",3)=100 "PKG",213,22,1,"PAH",1,1,287,0) Processing E-Prescribing Counts "PKG",213,22,1,"PAH",1,1,288,0) DFN Denominator Numerator "PKG",213,22,1,"PAH",1,1,289,0) 4 0 0 "PKG",213,22,1,"PAH",1,1,290,0) === === "PKG",213,22,1,"PAH",1,1,291,0) 0 0 "QUES","XPF1",0) Y "QUES","XPF1","??") ^D REP^XPDH "QUES","XPF1","A") Shall I write over your |FLAG| File "QUES","XPF1","B") YES "QUES","XPF1","M") D XPF1^XPDIQ "QUES","XPF2",0) Y "QUES","XPF2","??") ^D DTA^XPDH "QUES","XPF2","A") Want my data |FLAG| yours "QUES","XPF2","B") YES "QUES","XPF2","M") D XPF2^XPDIQ "QUES","XPI1",0) YO "QUES","XPI1","??") ^D INHIBIT^XPDH "QUES","XPI1","A") Want KIDS to INHIBIT LOGONs during the install "QUES","XPI1","B") NO "QUES","XPI1","M") D XPI1^XPDIQ "QUES","XPM1",0) PO^VA(200,:EM "QUES","XPM1","??") ^D MG^XPDH "QUES","XPM1","A") Enter the Coordinator for Mail Group '|FLAG|' "QUES","XPM1","B") "QUES","XPM1","M") D XPM1^XPDIQ "QUES","XPO1",0) Y "QUES","XPO1","??") ^D MENU^XPDH "QUES","XPO1","A") Want KIDS to Rebuild Menu Trees Upon Completion of Install "QUES","XPO1","B") NO "QUES","XPO1","M") D XPO1^XPDIQ "QUES","XPZ1",0) Y "QUES","XPZ1","??") ^D OPT^XPDH "QUES","XPZ1","A") Want to DISABLE Scheduled Options, Menu Options, and Protocols "QUES","XPZ1","B") NO "QUES","XPZ1","M") D XPZ1^XPDIQ "QUES","XPZ2",0) Y "QUES","XPZ2","??") ^D RTN^XPDH "QUES","XPZ2","A") Want to MOVE routines to other CPUs "QUES","XPZ2","B") NO "QUES","XPZ2","M") D XPZ2^XPDIQ "RTN") 4 "RTN","C0Q1P1") 0^^B541473 "RTN","C0Q1P1",1,0) C0Q1P1 ; VEN/SMH - Inits for Patch 1 ; 9/17/12 1:15pm "RTN","C0Q1P1",2,0) ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32 "RTN","C0Q1P1",3,0) ; "RTN","C0Q1P1",4,0) POST ; Post-Install hook for Patch 1; PEP "RTN","C0Q1P1",5,0) ; Fire off the new x-refs for entries in the parameter file "RTN","C0Q1P1",6,0) N C0QI S C0QI=0 ; Walk through starting with number 1 "RTN","C0Q1P1",7,0) F S C0QI=$O(^C0Q(401,C0QI)) Q:'C0QI D "RTN","C0Q1P1",8,0) . N DA,DIK S DIK="^C0Q(401,",DIK(1)="2^AMMS",DA=C0QI D EN^DIK "RTN","C0Q1P1",9,0) . N DA,DIK S DIK="^C0Q(401,",DIK(1)="2.1^AQMS",DA=C0QI D EN^DIK "RTN","C0Q1P1",10,0) QUIT "RTN","C0QMU12") 0^3^B266254568 "RTN","C0QMU12",1,0) C0QMU12 ;JJOH/ZAG/GPL - Patient Reminder List ; 9/17/12 1:19pm "RTN","C0QMU12",2,0) ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32 "RTN","C0QMU12",3,0) ; "RTN","C0QMU12",4,0) ;2011 Zach Gonzales - Licensed under the terms of the GNU "RTN","C0QMU12",5,0) ;General Public License See attached copy of the License. "RTN","C0QMU12",6,0) ; "RTN","C0QMU12",7,0) ; GPL - THIS ROUTINE IS A COPY OF JJOHMU11 THAT HAS BEEN MODIFIED "RTN","C0QMU12",8,0) ; FOR MEANINGFUL USE CALCULATION FOR FISCAL YEAR 2012 AT OROVILLE HOSPITAL "RTN","C0QMU12",9,0) ; "RTN","C0QMU12",10,0) C0QPFN() Q 1130580001.401 ; PARAMETER FILE "RTN","C0QMU12",11,0) C0QPCFN() Q 1130580001.411 ; CLINIC SUBFILE "RTN","C0QMU12",12,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QMU12",13,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QMU12",14,0) INIT(ZARY,ZTYP) ; INITIALIZE THE PARAMETERS FOR BUILDING PATIENT LISTS "RTN","C0QMU12",15,0) ; ZARY IS PASSED BY NAME "RTN","C0QMU12",16,0) ; ZTYP IS "INP" OR "EP" "RTN","C0QMU12",17,0) N ZMU S ZMU="MU12" ; THIS IS THE ONLY HARD CODED VALUE LEFT "RTN","C0QMU12",18,0) ; TBD - CHANGE IT TO A READ FROM SYSTEM PARAMETERS "RTN","C0QMU12",19,0) K @ZARY ; CLEAR RETURN ARRAY "RTN","C0QMU12",20,0) N ZIEN,ZCNT,ZX "RTN","C0QMU12",21,0) I $O(^C0Q(401,"MUTYP",ZMU,ZTYP,""))="" D Q ; OOPS NO RECORD THERE "RTN","C0QMU12",22,0) . W !,"ERROR, NO PARAMETERS AVAILABLE" "RTN","C0QMU12",23,0) S ZIEN="" "RTN","C0QMU12",24,0) S ZCNT=0 "RTN","C0QMU12",25,0) F S ZIEN=$O(^C0Q(401,"MUTYP",ZMU,ZTYP,ZIEN)) Q:ZIEN="" D ; "RTN","C0QMU12",26,0) . S ZCNT=ZCNT+1 "RTN","C0QMU12",27,0) . S @ZARY@(ZCNT,"MU")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.02) "RTN","C0QMU12",28,0) . S @ZARY@(ZCNT,"TYPE")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.03) "RTN","C0QMU12",29,0) . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",1,"I") "RTN","C0QMU12",30,0) . S @ZARY@(ZCNT,"InpatientMeasurementSet")=ZX "RTN","C0QMU12",31,0) . S @ZARY@(ZCNT,"InpatientBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I") "RTN","C0QMU12",32,0) . S @ZARY@(ZCNT,"InpatientEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I") "RTN","C0QMU12",33,0) . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I") "RTN","C0QMU12",34,0) . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",2,"I") "RTN","C0QMU12",35,0) . S @ZARY@(ZCNT,"EPMeasurementSet")=ZX "RTN","C0QMU12",36,0) . S @ZARY@(ZCNT,"EPBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I") "RTN","C0QMU12",37,0) . S @ZARY@(ZCNT,"EPEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I") "RTN","C0QMU12",38,0) . S @ZARY@(ZCNT,"EPQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",2.1,"I") "RTN","C0QMU12",39,0) . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I") "RTN","C0QMU12",40,0) . D CLEAN^DILF "RTN","C0QMU12",41,0) . D LIST^DIC($$C0QPCFN,","_ZIEN_",",".01I") "RTN","C0QMU12",42,0) . I $D(^TMP("DIERR",$J)) D Q ; ERROR READING CLINIC LIST "RTN","C0QMU12",43,0) . . W !,"ERROR READING CLINIC PARAMETER LIST" "RTN","C0QMU12",44,0) . M @ZARY@(ZCNT,"CLINICS")=^TMP("DILIST",$J) "RTN","C0QMU12",45,0) ; "RTN","C0QMU12",46,0) Q "RTN","C0QMU12",47,0) ; "RTN","C0QMU12",48,0) BUILD ; CALL ALL AND DIS AND BUILD THE GRSLT ARRAY or print or create "RTN","C0QMU12",49,0) ; patient lists "RTN","C0QMU12",50,0) ;N GRSLT ; ARRAY FOR RESULTS "RTN","C0QMU12",51,0) I '$D(C0QSS) S C0QSS=0 ;default don't build spreadsheet array "RTN","C0QMU12",52,0) I '$D(C0QPR) S C0QPR=0 ;default don't print out results "RTN","C0QMU12",53,0) I '$D(C0QPL) S C0QPL=1 ;default do create patient lists "RTN","C0QMU12",54,0) S ZYR="MU12-" "RTN","C0QMU12",55,0) D INITCLST ; initialize C0QLIST "RTN","C0QMU12",56,0) N G1 ; ONE SET OF VALUES - RNF1 FORMAT "RTN","C0QMU12",57,0) N C0QPARM "RTN","C0QMU12",58,0) D INIT("C0QPARM","INP") ; initialize inpatient parms "RTN","C0QMU12",59,0) I $O(C0QPARM(""))="" D Q ; no parms for inpatient "RTN","C0QMU12",60,0) . W !,"No inpatient parameters" "RTN","C0QMU12",61,0) N ZDIV S ZDIV="" "RTN","C0QMU12",62,0) F S ZDIV=$O(C0QPARM(ZDIV)) Q:ZDIV="" D ; for each inpatient division "RTN","C0QMU12",63,0) . D ALL ; all currently admitted patients in the hospital "RTN","C0QMU12",64,0) . D DIS ; all patients discharged since the reporting period began "RTN","C0QMU12",65,0) . I C0QSS D ZWRITE^C0QUTIL("GRSLT") "RTN","C0QMU12",66,0) . ;D ICUPAT ; GENERATE ICU PATIENT LIST "RTN","C0QMU12",67,0) . I C0QPL D ; "RTN","C0QMU12",68,0) . . D FILE ; FILE THE PATIENT LISTS "RTN","C0QMU12",69,0) . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientMeasurementSet")) ; "RTN","C0QMU12",70,0) . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientQualitySet")) ; "RTN","C0QMU12",71,0) . K C0QLIST "RTN","C0QMU12",72,0) Q "RTN","C0QMU12",73,0) ; "RTN","C0QMU12",74,0) INITCLST ; initialize C0QLIST "RTN","C0QMU12",75,0) ; INITIALIZE LISTS "RTN","C0QMU12",76,0) ; this is done so that if there are no matching patients, the patient list "RTN","C0QMU12",77,0) ; will be zeroed out "RTN","C0QMU12",78,0) K C0QLIST "RTN","C0QMU12",79,0) S C0QLIST(ZYR_"HasDemographics")="" "RTN","C0QMU12",80,0) S C0QLIST(ZYR_"Patient")="" "RTN","C0QMU12",81,0) S C0QLIST(ZYR_"HasProblem")="" "RTN","C0QMU12",82,0) S C0QLIST(ZYR_"HasAllergy")="" "RTN","C0QMU12",83,0) S C0QLIST(ZYR_"HasMed")="" "RTN","C0QMU12",84,0) S C0QLIST(ZYR_"HasVitalSigns")="" "RTN","C0QMU12",85,0) S C0QLIST(ZYR_"HasMedOrders")="" "RTN","C0QMU12",86,0) S C0QLIST(ZYR_"HasSmokingStatus")="" "RTN","C0QMU12",87,0) Q "RTN","C0QMU12",88,0) ; "RTN","C0QMU12",89,0) ALL ;retrieve active inpatients "RTN","C0QMU12",90,0) N WARD S WARD="" "RTN","C0QMU12",91,0) F D Q:WARD="" "RTN","C0QMU12",92,0) . S WARD=$O(^DIC(42,"B",WARD)) ;ward name "RTN","C0QMU12",93,0) . Q:WARD="" "RTN","C0QMU12",94,0) . N WIEN S WIEN="" "RTN","C0QMU12",95,0) . F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN "RTN","C0QMU12",96,0) . . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name "RTN","C0QMU12",97,0) . . N DFN,RB S DFN="" "RTN","C0QMU12",98,0) . . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward "RTN","C0QMU12",99,0) . . . D DEMO^C0QMU122 "RTN","C0QMU12",100,0) . . . D PROBLEM "RTN","C0QMU12",101,0) . . . D ALLERGY "RTN","C0QMU12",102,0) . . . D MEDS4 "RTN","C0QMU12",103,0) . . . D RECON2 "RTN","C0QMU12",104,0) . . . D ADVDIR "RTN","C0QMU12",105,0) . . . D SMOKING "RTN","C0QMU12",106,0) . . . D VITALS "RTN","C0QMU12",107,0) . . . D VTE1 "RTN","C0QMU12",108,0) . . . D COD "RTN","C0QMU12",109,0) . . . D EDTIME "RTN","C0QMU12",110,0) . . . I C0QPR D PRINT^C0QMU121 "RTN","C0QMU12",111,0) . . . I C0QSS D SS^C0QMU121 "RTN","C0QMU12",112,0) . . . I C0QPL D PATLIST^C0QMU121 "RTN","C0QMU12",113,0) Q "RTN","C0QMU12",114,0) ; "RTN","C0QMU12",115,0) PROBLEM ; PATIENT PROBLEMS "RTN","C0QMU12",116,0) D LIST^ORQQPL(.PROBL,DFN,"A") "RTN","C0QMU12",117,0) S PBCNT="" "RTN","C0QMU12",118,0) F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D "RTN","C0QMU12",119,0) . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description "RTN","C0QMU12",120,0) I PBDESC["No problems found" S C0QLIST(ZYR_"NoProblem",DFN)="" "RTN","C0QMU12",121,0) E S C0QLIST(ZYR_"HasProblem",DFN)="" "RTN","C0QMU12",122,0) K PROBL "RTN","C0QMU12",123,0) Q "RTN","C0QMU12",124,0) ; "RTN","C0QMU12",125,0) ALLERGY ; ALLERGY LIST "RTN","C0QMU12",126,0) ; WANT TO CHANGE ALLERGIES FOR 2012 TO POPULATE THE C0QLIST DIRECTLY. GPL "RTN","C0QMU12",127,0) D LIST^ORQQAL(.ALRGYL,DFN) "RTN","C0QMU12",128,0) S ALCNT="" "RTN","C0QMU12",129,0) F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D "RTN","C0QMU12",130,0) . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description "RTN","C0QMU12",131,0) I ALDESC["No Allergy" S C0QLIST(ZYR_"NoAllergy",DFN)="" "RTN","C0QMU12",132,0) E S C0QLIST(ZYR_"HasAllergy",DFN)="" "RTN","C0QMU12",133,0) K ALRGYL "RTN","C0QMU12",134,0) Q "RTN","C0QMU12",135,0) ; "RTN","C0QMU12",136,0) MEDS4 ; USE OCL^PSOORRL TO GET ALL MEDS "RTN","C0QMU12",137,0) ; DELETED MEDS, MEDS2, AND MEDS3 FOR 2012 TO USE ONLY MEDS4 "RTN","C0QMU12",138,0) N BEG,END "RTN","C0QMU12",139,0) S BEG=$$DT^C0QUTIL("JULY 3,2011") "RTN","C0QMU12",140,0) S END=$$DT^C0QUTIL("NOW") "RTN","C0QMU12",141,0) D OCL^PSOORRL(DFN,BEG,END) ;DBIA #2400 "RTN","C0QMU12",142,0) N C0QMEDS "RTN","C0QMU12",143,0) M C0QMEDS=^TMP("PS",$J) ; MEDS RETURNED FROM CALL "RTN","C0QMU12",144,0) N FOUND "RTN","C0QMU12",145,0) N ZI "RTN","C0QMU12",146,0) I '$D(C0QMEDS(1)) D Q ; QUIT IF NO MEDS "RTN","C0QMU12",147,0) . S C0QLIST(ZYR_"NoMed",DFN)="" "RTN","C0QMU12",148,0) E D ; HAS MEDS "RTN","C0QMU12",149,0) . S C0QLIST(ZYR_"HasMed",DFN)="" "RTN","C0QMU12",150,0) S ZI="" S FOUND=0 "RTN","C0QMU12",151,0) F S ZI=$O(C0QMEDS(ZI)) Q:ZI="" D ; FOR EACH MED "RTN","C0QMU12",152,0) . N ZM "RTN","C0QMU12",153,0) . S ZM=$G(C0QMEDS(ZI,0)) ;THE MEDICATION "RTN","C0QMU12",154,0) . I $P($P(ZM,"^",1),";",2)="I" D ; IE 1U;I FOR AN INPATIENT UNIT DOSE "RTN","C0QMU12",155,0) . . S FOUND=1 "RTN","C0QMU12",156,0) I FOUND S C0QLIST(ZYR_"HasMedOrders",DFN)="" ; MET CPOE MEASURE "RTN","C0QMU12",157,0) E S C0QLIST(ZYR_"NoMedOrders",DFN)="" "RTN","C0QMU12",158,0) Q "RTN","C0QMU12",159,0) ; "RTN","C0QMU12",160,0) RECON ; MEDICATIONS RECONCILIATION "RTN","C0QMU12",161,0) ; WANT TO SIMPLIFY MEDS RECON FOR 2012. GPL "RTN","C0QMU12",162,0) ; "RTN","C0QMU12",163,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QMU12",164,0) . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QMU12",165,0) N HASRECON S HASRECON=0 "RTN","C0QMU12",166,0) N GT,G "RTN","C0QMU12",167,0) S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")="" "RTN","C0QMU12",168,0) S GT(5,"HasMedRecon","Medication Reconcilation Complete")="" "RTN","C0QMU12",169,0) I $$TXTALL^C0QNOTES(.G,.GT,DFN) D ; SEARCH ALL NOTES FOR MED RECON "RTN","C0QMU12",170,0) . S HASRECON=1 "RTN","C0QMU12",171,0) ;N ZT "RTN","C0QMU12",172,0) ;S ZT="MEDICATION RECONCILIATION COMPLET" "RTN","C0QMU12",173,0) ;I $$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) D ; "RTN","C0QMU12",174,0) ;. S HASRECON=1 "RTN","C0QMU12",175,0) ;E D ; "RTN","C0QMU12",176,0) ;. S ZT="Medication Reconcilation Complete" "RTN","C0QMU12",177,0) ;. I $$NTTXT^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",ZT,DFN) D ; "RTN","C0QMU12",178,0) ;. . S HASRECON=1 "RTN","C0QMU12",179,0) ;I $$HFYN^C0QHF("MEDS HAVE BEEN REVIEWED",DFN) S HASRECON=1 "RTN","C0QMU12",180,0) I HASRECON D ; "RTN","C0QMU12",181,0) . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",182,0) E S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",183,0) Q "RTN","C0QMU12",184,0) ; "RTN","C0QMU12",185,0) RECON2 ; USE HEALTH FACTORS FOR MEDICATION RECONCILIATION "RTN","C0QMU12",186,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QMU12",187,0) . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QMU12",188,0) I $$HFYN^C0QHF(DFN,"Medication Reconciliation Completed: Yes") D ; "RTN","C0QMU12",189,0) . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",190,0) E S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",191,0) Q "RTN","C0QMU12",192,0) ; "RTN","C0QMU12",193,0) ERX ; FOR EP, WE LOOK AT ERX MEDS "RTN","C0QMU12",194,0) N ZI S ZI="" "RTN","C0QMU12",195,0) N ZERX S ZERX=$NA(^PS(55,DFN,"NVA")) "RTN","C0QMU12",196,0) F S ZI=$O(@ZERX@(ZI)) Q:ZI="" D ; "RTN","C0QMU12",197,0) . ;B "RTN","C0QMU12",198,0) . I $G(@ZERX@(ZI,1,1,0))["E-Rx Web" D ; "RTN","C0QMU12",199,0) . . S C0QLIST(ZYR_"HasMed",DFN)="" "RTN","C0QMU12",200,0) . . S C0QLIST(ZYR_"HasMedOrders",DFN)="" "RTN","C0QMU12",201,0) . . S C0QLIST(ZYR_"HasERX",DFN)="" "RTN","C0QMU12",202,0) . . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",203,0) . E D ; "RTN","C0QMU12",204,0) . . S C0QLIST(ZYR_"NoMed",DFN)="" "RTN","C0QMU12",205,0) . . S C0QLIST(ZYR_"NoMedOrders",DFN)="" "RTN","C0QMU12",206,0) . . S C0QLIST(ZYR_"NoERX",DFN)="" "RTN","C0QMU12",207,0) . . S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",208,0) Q "RTN","C0QMU12",209,0) ; "RTN","C0QMU12",210,0) ADVDIR ; ADVANCE DIRECTIVE "RTN","C0QMU12",211,0) ; "RTN","C0QMU12",212,0) I $$AGE^C0QUTIL(DFN)>64 D ; ONLY FOR PATIENTS 65 AND OLDER "RTN","C0QMU12",213,0) . S C0QLIST(ZYR_"Over65",DFN)="" "RTN","C0QMU12",214,0) . I $$HASNTYN^C0QNOTES("ADVANCE DIRECTIVE",DFN) D ; "RTN","C0QMU12",215,0) . . S C0QLIST(ZYR_"HasAdvanceDirective",DFN)="" "RTN","C0QMU12",216,0) . E D ; "RTN","C0QMU12",217,0) . . S C0QLIST(ZYR_"NoAdvanceDirective",DFN)="" "RTN","C0QMU12",218,0) Q "RTN","C0QMU12",219,0) ; "RTN","C0QMU12",220,0) SMOKING G SMOKING^C0QMU121 "RTN","C0QMU12",221,0) VITALS ; "RTN","C0QMU12",222,0) ; "RTN","C0QMU12",223,0) N C0QSDT,C0QEDT "RTN","C0QMU12",224,0) D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE "RTN","C0QMU12",225,0) D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY "RTN","C0QMU12",226,0) D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS "RTN","C0QMU12",227,0) I $D(VITRSLT) D ;ZWR VITRSLT B ; "RTN","C0QMU12",228,0) . I VITRSLT(1)["No vitals found." S C0QLIST(ZYR_"NoVitalSigns",DFN)="" "RTN","C0QMU12",229,0) . E S C0QLIST(ZYR_"HasVitalSigns",DFN)="" "RTN","C0QMU12",230,0) Q "RTN","C0QMU12",231,0) ; "RTN","C0QMU12",232,0) VTE1 ; VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL "RTN","C0QMU12",233,0) ; "RTN","C0QMU12",234,0) I $$HFYN^C0QHF(DFN,"VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL") D ; "RTN","C0QMU12",235,0) . S C0QLIST(ZYR_"HasVTE24",DFN)="" "RTN","C0QMU12",236,0) E S C0QLIST(ZYR_"NoVTE24",DFN)="" "RTN","C0QMU12",237,0) Q "RTN","C0QMU12",238,0) ; "RTN","C0QMU12",239,0) COD ; TEST FOR PRELIMINARY CAUSE OF DEATH NOTE "RTN","C0QMU12",240,0) I $$HASNTYN^C0QNOTES("PRELIMINARY CAUSE OF DEATH",DFN) D ; "RTN","C0QMU12",241,0) . S C0QLIST(ZYR_"CauseOfDeath",DFN)="" "RTN","C0QMU12",242,0) Q "RTN","C0QMU12",243,0) ; "RTN","C0QMU12",244,0) EDTIME ; CHECK FOR EMERGENCY DEPT TIME FACTORS "RTN","C0QMU12",245,0) N FOUND "RTN","C0QMU12",246,0) S FOUND=0 "RTN","C0QMU12",247,0) I $$HFYN^C0QHF(DFN,"ED ARRIVAL TIME") S FOUND=1 "RTN","C0QMU12",248,0) I '$$HFYN^C0QHF(DFN,"ED DEPARTURE TIME") S FOUND=0 "RTN","C0QMU12",249,0) I '$$HFYN^C0QHF(DFN,"TIME DECISION TO ADMIT MADE") S FOUND=0 "RTN","C0QMU12",250,0) I FOUND D ; "RTN","C0QMU12",251,0) . S C0QLIST(ZYR_"HasEDtime",DFN)="" "RTN","C0QMU12",252,0) E S C0QLIST(ZYR_"NoEDtime",DFN)="" "RTN","C0QMU12",253,0) Q "RTN","C0QMU12",254,0) ; "RTN","C0QMU12",255,0) ICUPAT ; CREATE LIST OF ICU PATIENTS "RTN","C0QMU12",256,0) N ZICU "RTN","C0QMU12",257,0) S ZICU=$O(^SC("B","IC","")) ; IEN OF ICU HOSPITAL LOCATION "RTN","C0QMU12",258,0) N ZI,ZJ,ZP "RTN","C0QMU12",259,0) S ZI="" "RTN","C0QMU12",260,0) F S ZI=$O(^AUPNVSIT("AHL",ZICU,ZI)) Q:ZI="" D ; EACH DATE "RTN","C0QMU12",261,0) . S ZJ="" "RTN","C0QMU12",262,0) . F S ZJ=$O(^AUPNVSIT("AHL",ZICU,ZI,ZJ)) Q:ZJ="" D ; EACH VISIT "RTN","C0QMU12",263,0) . . S ZP=$P(^AUPNVSIT(ZJ,0),"^",5) ; DFN "RTN","C0QMU12",264,0) . . S C0QLIST(ZYR_"ICUPatient",ZP)="" "RTN","C0QMU12",265,0) Q "RTN","C0QMU12",266,0) ; "RTN","C0QMU12",267,0) FILTER ; CALLED AFTER ALL THE PATIENT LISTS HAVE BEEN FILED "RTN","C0QMU12",268,0) ; WILL KILL C0QLIST AND CREATE DERIVATIVE PATIENT LISTS BY FILTERING "RTN","C0QMU12",269,0) K C0QLIST "RTN","C0QMU12",270,0) N ZPAT "RTN","C0QMU12",271,0) S ZPAT=$$PATLN(ZYR_"Patient") ; name of patient list of all patients admitted "RTN","C0QMU12",272,0) ; during the reporting period. used to filter other lists "RTN","C0QMU12",273,0) ; "RTN","C0QMU12",274,0) ; filter ICU patients against ZPAT "RTN","C0QMU12",275,0) N GN,GO,GF "RTN","C0QMU12",276,0) S GN=ZPAT "RTN","C0QMU12",277,0) S GO=$$PATLN(ZYR_"ICUPatient") ; all ICU patient "RTN","C0QMU12",278,0) S GF=$NA(C0QLIST(ZYR_"ICUReporting")) ; the filtered list destination "RTN","C0QMU12",279,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",280,0) ; "RTN","C0QMU12",281,0) ; FILTER VTE-2 DENOMINATOR FOR QUALITY MEASURE "RTN","C0QMU12",282,0) ; "RTN","C0QMU12",283,0) S GN=$NA(C0QLIST(ZYR_"ICUReporting")) ; ICU patients admitted inside rpt period "RTN","C0QMU12",284,0) S GO=$$RPATLN("MU VTE-2 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",285,0) S GF=$NA(C0QLIST(ZYR_"VTE2DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",286,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",287,0) ; "RTN","C0QMU12",288,0) S GN=ZPAT "RTN","C0QMU12",289,0) S GO=$$RPATLN("MU VTE-3 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",290,0) S GF=$NA(C0QLIST(ZYR_"VTE3DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",291,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",292,0) ; "RTN","C0QMU12",293,0) S GN=ZPAT "RTN","C0QMU12",294,0) S GO=$$RPATLN("MU VTE-4 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",295,0) S GF=$NA(C0QLIST(ZYR_"VTE4DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",296,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",297,0) ; "RTN","C0QMU12",298,0) S GN=ZPAT "RTN","C0QMU12",299,0) S GO=$$RPATLN("MU VTE-5 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",300,0) S GF=$NA(C0QLIST(ZYR_"VTE5DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",301,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",302,0) ; "RTN","C0QMU12",303,0) D FILE ; FILE ALL THE PATIENT LISTS "RTN","C0QMU12",304,0) D UPDATE^C0QUPDT(.G,5) ; UPDATE THE HOS 2011 MEANINGFUL USE measure set "RTN","C0QMU12",305,0) Q "RTN","C0QMU12",306,0) ; "RTN","C0QMU12",307,0) ED1 ; "RTN","C0QMU12",308,0) S ZYR="MU12-" "RTN","C0QMU12",309,0) D DOTIME^C0QMU121("ED DEPARTURE TIME") "RTN","C0QMU12",310,0) Q "RTN","C0QMU12",311,0) ; "RTN","C0QMU12",312,0) ED2 ; "RTN","C0QMU12",313,0) S ZYR="MU12-" "RTN","C0QMU12",314,0) D DOTIME2^C0QMU121("TIME DECISION TO ADMIT MADE") "RTN","C0QMU12",315,0) Q "RTN","C0QMU12",316,0) ; "RTN","C0QMU12",317,0) RPATLN(ZLST) ; EXTRINSIC RETURNS THE GLOBAL NAME OF THE REMINDER PATIENT LIST "RTN","C0QMU12",318,0) ; WHOSE NAME IS ZLST "RTN","C0QMU12",319,0) N ZIEN,ZN "RTN","C0QMU12",320,0) S ZIEN=$O(^PXRMXP(810.5,"B",ZLST,"")) ; ien of patient list "RTN","C0QMU12",321,0) S ZN=$NA(^PXRMXP(810.5,ZIEN,30,"B")) ; GLOBAL NAME IN REMINDER PATIENT LIST "RTN","C0QMU12",322,0) Q ZN "RTN","C0QMU12",323,0) ; "RTN","C0QMU12",324,0) PATLN(ZATTR) ; EXTRINSIC RETURNS THE NAME OF THE PATIENT LIST WITH "RTN","C0QMU12",325,0) ; THE ATTRIBUTE ZATTR "RTN","C0QMU12",326,0) N ZIEN,ZN "RTN","C0QMU12",327,0) S ZIEN=$O(^C0Q(301,"CATTR",ZATTR,"")) ; ien of patient list "RTN","C0QMU12",328,0) S ZN=$NA(^C0Q(301,ZIEN,1,"B")) ; NAME OF PATIENT LIST IN C0Q PATIENT LIST "RTN","C0QMU12",329,0) Q ZN "RTN","C0QMU12",330,0) ; "RTN","C0QMU12",331,0) INLIST(ZLIST,DFN) ; EXTRINSIC FOR IS PATIENT ALREADY IN LIST ZLIST "RTN","C0QMU12",332,0) N ZL,ZR "RTN","C0QMU12",333,0) S ZL=$O(^C0Q(301,"CATTR",ZLIST,"")) ; IEN OF LIST IN C0Q PATIENT LIST FILE "RTN","C0QMU12",334,0) I ZL="" Q 0 ; LIST DOES NOT EXIST "RTN","C0QMU12",335,0) S ZR=0 ; ASSUME NOT IN LIST "RTN","C0QMU12",336,0) I $D(^C0Q(301,ZL,1,"B",DFN)) S ZR=1 ; PATIENT IS IN LIST "RTN","C0QMU12",337,0) Q ZR "RTN","C0QMU12",338,0) ; "RTN","C0QMU12",339,0) LOCPAT(PREFIX,LOC) ;retrieve active outpatients "RTN","C0QMU12",340,0) ; PREFIX WILL GO IN C0XLIST(PREFIX_"-PATIENT",DFN)="" "RTN","C0QMU12",341,0) ; LOC IS HOSPITAL LOCATION "RTN","C0QMU12",342,0) S ULOC=$O(^SC("B",LOC,"")) ; IEN OF HOSPITAL LOCATION "RTN","C0QMU12",343,0) I ULOC="" D Q ; OOPS "RTN","C0QMU12",344,0) . W !,"HOSPITAL LOCATION NOT FOUND: ",LOC "RTN","C0QMU12",345,0) S IDTE=9999999-DTE ; INVERSE DATE "RTN","C0QMU12",346,0) N ZI "RTN","C0QMU12",347,0) S ZI="" ; BEGIN AT LATEST DATE FOR THIS LOC IN VISIT FILE "RTN","C0QMU12",348,0) F S ZI=$O(^AUPNVSIT("AHL",ULOC,ZI)) Q:(ZI="")!(ZI>IDTE) D ; FOR EACH DATE "RTN","C0QMU12",349,0) . W !,$$FMTE^XLFDT(9999999-ZI) ;B ; "RTN","C0QMU12",350,0) . I ZI="" Q ; "RTN","C0QMU12",351,0) . N ZJ S ZJ="" "RTN","C0QMU12",352,0) . F S ZJ=$O(^AUPNVSIT("AHL",ULOC,ZI,ZJ)) Q:ZJ="" D ; FOR EACH VISIT "RTN","C0QMU12",353,0) . . S DFN=$$GET1^DIQ(9000010,ZJ,.05,"I") ; PATIENT "RTN","C0QMU12",354,0) . . S C0QLIST(PREFIX_"Patient",DFN)="" "RTN","C0QMU12",355,0) Q "RTN","C0QMU12",356,0) ; "RTN","C0QMU12",357,0) EPPAT(ZYR) ; BUILD ALL PATIENT LISTS FOR CLINICS "RTN","C0QMU12",358,0) ; "RTN","C0QMU12",359,0) S DTE=3111000 "RTN","C0QMU12",360,0) S MUYR=ZYR "RTN","C0QMU12",361,0) N ZC,ZN "RTN","C0QMU12",362,0) S ZN=0 "RTN","C0QMU12",363,0) N ZI S ZI=0 "RTN","C0QMU12",364,0) F S ZI=$O(^SC(ZI)) Q:+ZI=0 D ; FOR EVERY HOSPITAL LOCATION "RTN","C0QMU12",365,0) . I $$GET1^DIQ(44,ZI_",",2,"I")'="C" Q ; NOT A CLINIC "RTN","C0QMU12",366,0) . S ZC=$$GET1^DIQ(44,ZI_",",.01) ; NAME OF CLINIC "RTN","C0QMU12",367,0) . S ZCIEN=ZI ; IEN OF CLINIC "RTN","C0QMU12",368,0) . S ZN=ZN+1 ; COUNT OF CLINICS "RTN","C0QMU12",369,0) . S PRE=MUYR_"-EP-"_ZC_"-" "RTN","C0QMU12",370,0) . D LOCPAT(PRE,ZC) "RTN","C0QMU12",371,0) W !,"NUMBER OF CLINICS: ",ZN "RTN","C0QMU12",372,0) D FILE ; CREATE ALL THE EP PATIENT LISTS "RTN","C0QMU12",373,0) Q "RTN","C0QMU12",374,0) ; "RTN","C0QMU12",375,0) DOEP ; DO EP COMPUTATIONS "RTN","C0QMU12",376,0) S ZYR="MU12-" "RTN","C0QMU12",377,0) N C0QPARM,C0QCLNC "RTN","C0QMU12",378,0) D INIT("C0QPARM","EP") ; INITIALIZE PARAMETERS "RTN","C0QMU12",379,0) K C0QLIST ; CLEAR THE LIST "RTN","C0QMU12",380,0) N ZI S ZI="" "RTN","C0QMU12",381,0) F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ; FOR EACH EP "RTN","C0QMU12",382,0) . S DTE=C0QPARM(ZI,"EPBeginDate") ; beginning of measurement period "RTN","C0QMU12",383,0) . S EDTE=C0QPARM(ZI,"EPEndDate") ; end of measurement period -- tbd use this "RTN","C0QMU12",384,0) . S C0QCLNC=C0QPARM(ZI,"CLINICS",1,1) ; only one clinic for now "RTN","C0QMU12",385,0) . S PRE=ZYR_"EP-"_C0QCLNC_"-" "RTN","C0QMU12",386,0) . D LOCPAT(PRE,C0QCLNC) ; GET THE PATIENTS "RTN","C0QMU12",387,0) . I $D(DEBUG) D ZWRITE^C0QUTIL("C0QLIST") "RTN","C0QMU12",388,0) . M C0QLIST(ZYR_"EP-ALL-PATIENTS")=C0QLIST(PRE_"Patient") "RTN","C0QMU12",389,0) S DFN="" "RTN","C0QMU12",390,0) S ZYR=ZYR_"EP-" "RTN","C0QMU12",391,0) F S DFN=$O(C0QLIST(ZYR_"ALL-PATIENTS",DFN)) Q:DFN="" D ; EACH PATIENT "RTN","C0QMU12",392,0) . D DEMO^C0QMU122 "RTN","C0QMU12",393,0) . D PROBLEM "RTN","C0QMU12",394,0) . D ALLERGY "RTN","C0QMU12",395,0) . ;D MEDS "RTN","C0QMU12",396,0) . D ERX "RTN","C0QMU12",397,0) . D SMOKING "RTN","C0QMU12",398,0) . D VITALS "RTN","C0QMU12",399,0) D FILE ; FILE THE PATIENT LISTS "RTN","C0QMU12",400,0) ; "RTN","C0QMU12",401,0) ; Now process eRx MU measures for these patients "RTN","C0QMU12",402,0) ; Check for eRx template and code first; if they exist, run the code "RTN","C0QMU12",403,0) I $D(^C0PX("B","GETMEDS6")),$L($T(SOAP^C0PWS2)) DO "RTN","C0QMU12",404,0) . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data; "RTN","C0QMU12",405,0) . D EN^C0QMUERX($$PATLN^C0QMU12(ZYR_"HasERX")) ; Pass the eRx patient list "RTN","C0QMU12",406,0) ; "RTN","C0QMU12",407,0) N C0QCIEN "RTN","C0QMU12",408,0) S ZI="" "RTN","C0QMU12",409,0) F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ; "RTN","C0QMU12",410,0) . S C0QCIEN=C0QPARM(ZI,"EPMeasurementSet") ; ien of measurement set "RTN","C0QMU12",411,0) . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data; "RTN","C0QMU12",412,0) . D UPDATE^C0QUPDT(.G,C0QCIEN) ; UPDATE THE MU MEASUREMENT SET "RTN","C0QMU12",413,0) Q "RTN","C0QMU12",414,0) ; "RTN","C0QMU12",415,0) DIS ; "RTN","C0QMU12",416,0) N DFN,DTE,EXDTE S DTE="" "RTN","C0QMU12",417,0) F D Q:DTE="" "RTN","C0QMU12",418,0) . S DTE=$O(^DGPM("B",DTE)) "RTN","C0QMU12",419,0) . Q:'DTE "RTN","C0QMU12",420,0) . ;Q:$P(DTE,".")<3110703 "RTN","C0QMU12",421,0) . Q:$P(DTE,".")<3111000 ; NEW BEGIN DATE FOR FISCAL YEAR 2012 "RTN","C0QMU12",422,0) . S EXDTE=$$FMTE^XLFDT(DTE) "RTN","C0QMU12",423,0) . N PTFM S PTFM="" "RTN","C0QMU12",424,0) . D "RTN","C0QMU12",425,0) . . S PTFM=$O(^DGPM("B",DTE,PTFM)) "RTN","C0QMU12",426,0) . . Q:'PTFM "RTN","C0QMU12",427,0) . . S DFN=$P(^DGPM(PTFM,0),U,3) "RTN","C0QMU12",428,0) . . S C0QLIST(ZYR_"Patient",DFN)="" "RTN","C0QMU12",429,0) . . D DEMO^C0QMU122 "RTN","C0QMU12",430,0) . . D PROBLEM "RTN","C0QMU12",431,0) . . D ALLERGY "RTN","C0QMU12",432,0) . . D MEDS4 "RTN","C0QMU12",433,0) . . D RECON2 "RTN","C0QMU12",434,0) . . D ADVDIR "RTN","C0QMU12",435,0) . . D SMOKING "RTN","C0QMU12",436,0) . . D VITALS "RTN","C0QMU12",437,0) . . ;D:$P(DTE,".")>3110912 VTE1 "RTN","C0QMU12",438,0) . . D VTE1 "RTN","C0QMU12",439,0) . . D COD "RTN","C0QMU12",440,0) . . D EDTIME "RTN","C0QMU12",441,0) . . I C0QPR D PRINT^C0QMU121 "RTN","C0QMU12",442,0) . . I C0QSS D SS^C0QMU121 "RTN","C0QMU12",443,0) . . I C0QPL D PATLIST^C0QMU121 "RTN","C0QMU12",444,0) Q "RTN","C0QMU12",445,0) ; "RTN","C0QMU12",446,0) C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QMU12",447,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE "RTN","C0QMU12",448,0) FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST "RTN","C0QMU12",449,0) ; "RTN","C0QMU12",450,0) I '$D(C0QLIST) Q ; "RTN","C0QMU12",451,0) N LFN S LFN=$$C0QALFN() "RTN","C0QMU12",452,0) N ZI,ZN "RTN","C0QMU12",453,0) S ZI="" "RTN","C0QMU12",454,0) F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ; "RTN","C0QMU12",455,0) . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) "RTN","C0QMU12",456,0) . I ZN="" D ; LIST NOT FOUND, CREATE IT "RTN","C0QMU12",457,0) . . K C0QFDA "RTN","C0QMU12",458,0) . . S FN=$$C0QPLF ; C0Q PATIENT LIST FILE "RTN","C0QMU12",459,0) . . S C0QFDA(FN,"+1,",.01)=ZI "RTN","C0QMU12",460,0) . . S C0QFDA(FN,"+1,",999)=ZI ; ATTRIBUTE "RTN","C0QMU12",461,0) . . W !,"CREATING ",ZI "RTN","C0QMU12",462,0) . . D UPDIE ; ADD THE RECORD "RTN","C0QMU12",463,0) . . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) ; THE NEW IEN "RTN","C0QMU12",464,0) . ;I ZN="" D Q ; OOPS "RTN","C0QMU12",465,0) . ;. W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI "RTN","C0QMU12",466,0) . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN "RTN","C0QMU12",467,0) . N C0QNEW,C0QOLD,C0QRSLT "RTN","C0QMU12",468,0) . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST "RTN","C0QMU12",469,0) . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST "RTN","C0QMU12",470,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW "RTN","C0QMU12",471,0) . N ZJ,ZK "RTN","C0QMU12",472,0) . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST "RTN","C0QMU12",473,0) . K C0QFDA "RTN","C0QMU12",474,0) . S ZJ="" "RTN","C0QMU12",475,0) . F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY "RTN","C0QMU12",476,0) . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE "RTN","C0QMU12",477,0) . . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN "RTN","C0QMU12",478,0) . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE" "RTN","C0QMU12",479,0) . . . S $EC=",U1130580001," ; smh - instead of a BREAK "RTN","C0QMU12",480,0) . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@" "RTN","C0QMU12",481,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS "RTN","C0QMU12",482,0) . ; SECOND, PROCESS THE ADDITIONS "RTN","C0QMU12",483,0) . K C0QFDA "RTN","C0QMU12",484,0) . S ZJ="" S ZK=1 "RTN","C0QMU12",485,0) . F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0 "RTN","C0QMU12",486,0) . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ "RTN","C0QMU12",487,0) . . S ZK=ZK+1 "RTN","C0QMU12",488,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS "RTN","C0QMU12",489,0) ;. Q "RTN","C0QMU12",490,0) ;. K C0QFDA "RTN","C0QMU12",491,0) ;. N ZJ,ZC "RTN","C0QMU12",492,0) ;. S ZJ="" S ZC=1 "RTN","C0QMU12",493,0) ;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST "RTN","C0QMU12",494,0) ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ "RTN","C0QMU12",495,0) ;. . S ZC=ZC+1 "RTN","C0QMU12",496,0) ;. D UPDIE "RTN","C0QMU12",497,0) ;. W !,"FOUND:"_ZI "RTN","C0QMU12",498,0) Q "RTN","C0QMU12",499,0) ; "RTN","C0QMU12",500,0) KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE "RTN","C0QMU12",501,0) ; "RTN","C0QMU12",502,0) N C0QFDA,ZFN,LIST,ATTR "RTN","C0QMU12",503,0) S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QMU12",504,0) D CLEAN^DILF "RTN","C0QMU12",505,0) S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME "RTN","C0QMU12",506,0) S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE "RTN","C0QMU12",507,0) D CLEAN^DILF "RTN","C0QMU12",508,0) K ZERR "RTN","C0QMU12",509,0) S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE "RTN","C0QMU12",510,0) D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE "RTN","C0QMU12",511,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMU12",512,0) ;. W "ERROR",! "RTN","C0QMU12",513,0) ;. ZWR ZERR "RTN","C0QMU12",514,0) ;. B "RTN","C0QMU12",515,0) K C0QFDA "RTN","C0QMU12",516,0) S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD "RTN","C0QMU12",517,0) S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE "RTN","C0QMU12",518,0) D UPDIE ; CREATE THE SUBFILE "RTN","C0QMU12",519,0) N ZR ; NEW IEN FOR THE RECORD "RTN","C0QMU12",520,0) S ZR=$O(^C0Q(301,"CATTR",ATTR,"")) "RTN","C0QMU12",521,0) ; "RTN","C0QMU12",522,0) Q ZR "RTN","C0QMU12",523,0) ; "RTN","C0QMU12",524,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QMU12",525,0) K ZERR "RTN","C0QMU12",526,0) D CLEAN^DILF "RTN","C0QMU12",527,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QMU12",528,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMU12",529,0) K C0QFDA "RTN","C0QMU12",530,0) Q "RTN","C0QMU12",531,0) ; "RTN","C0QMU12",532,0) END ;end of C0QPRML; "RTN","C0QMUERX") 0^1^B83723794 "RTN","C0QMUERX",1,0) C0QMUERX ; VEN - Analyze ERx Data for Patients ; 9/17/12 1:16pm "RTN","C0QMUERX",2,0) ;;1.0;QUALITY MEASURES;**1**;May 21, 2012;Build 32 "RTN","C0QMUERX",3,0) QUIT ; No Entry from the top "RTN","C0QMUERX",4,0) ; "RTN","C0QMUERX",5,0) UT ; Unit Tests "RTN","C0QMUERX",6,0) N C0QDEBUG S C0QDEBUG=1 "RTN","C0QMUERX",7,0) W "Testing ^DPT B Index",! "RTN","C0QMUERX",8,0) D EN("^DPT(""B"")") "RTN","C0QMUERX",9,0) W !,"Testing B Index on a C0Q Patient List",! "RTN","C0QMUERX",10,0) D EN("^C0Q(301,4,1,""B"")") "RTN","C0QMUERX",11,0) W !,"Testing ^AUPNPAT B Index",! "RTN","C0QMUERX",12,0) D EN("^AUPNPAT(""B"")") "RTN","C0QMUERX",13,0) W !,"Testing Reminder Patient List B Index",! "RTN","C0QMUERX",14,0) D EN("^PXRMXP(810.5,80,30,""B"")") "RTN","C0QMUERX",15,0) W !,"Testing upright file ^DPT",! "RTN","C0QMUERX",16,0) D EN("^DPT") "RTN","C0QMUERX",17,0) W !,"Testing a file with no data",! "RTN","C0QMUERX",18,0) D EN("^ALKJSDF") "RTN","C0QMUERX",19,0) W !,"Testing a no valid parameters",! "RTN","C0QMUERX",20,0) D EN("") "RTN","C0QMUERX",21,0) UT2 ; Units Tests 2 "RTN","C0QMUERX",22,0) N C0QDEBUG S C0QDEBUG=1 "RTN","C0QMUERX",23,0) D EN("^C0Q(301,4,1,""B"")") "RTN","C0QMUERX",24,0) QUIT "RTN","C0QMUERX",25,0) UT3 ; More Unit Tests "RTN","C0QMUERX",26,0) N C0QDEBUG S C0QDEBUG=1 "RTN","C0QMUERX",27,0) D EN($$PATLN^C0QMU12("MU12-EP-HasERX")) "RTN","C0QMUERX",28,0) W $$COUNT($$PATLN^C0QMU12("MU12-EP-HasERX")) "RTN","C0QMUERX",29,0) QUIT "RTN","C0QMUERX",30,0) EN(C0QLIST) ; PEP - Analyze ERx Data and store "RTN","C0QMUERX",31,0) ; Parameters: "RTN","C0QMUERX",32,0) ; C0QLIST - Pass by Name. Global or Local Reference. "RTN","C0QMUERX",33,0) ; Can be: ^DPT("B") for all patients or ^C0Q(301,2,1,"B") for a specific patient list "RTN","C0QMUERX",34,0) ; Future: Can be a search template on file 2 or 9000001 "RTN","C0QMUERX",35,0) ; "RTN","C0QMUERX",36,0) ; Check if XML Soap Message is installed "RTN","C0QMUERX",37,0) I '$D(^C0PX("B","GETMEDS6")) WRITE "GETMEDS6 Soap Message not installed",! QUIT "RTN","C0QMUERX",38,0) ; "RTN","C0QMUERX",39,0) ; Check if SOAP^C0PWS2 exists "RTN","C0QMUERX",40,0) I '$L($T(SOAP^C0PWS2)) WRITE "C0PWS2 Doesn't exist",! QUIT "RTN","C0QMUERX",41,0) ; "RTN","C0QMUERX",42,0) ; Check C0QLIST for sanity. Must be a single node. "RTN","C0QMUERX",43,0) IF '($DATA(C0QLIST)#2)!(C0QLIST="") WRITE "You didn't pass the list",! QUIT "RTN","C0QMUERX",44,0) ; "RTN","C0QMUERX",45,0) ; Contents must be a Reference with Data "RTN","C0QMUERX",46,0) IF '$DATA(@C0QLIST) WRITE "Destination doesn't contain any data",! QUIT "RTN","C0QMUERX",47,0) ; "RTN","C0QMUERX",48,0) ; Is this a B index? "RTN","C0QMUERX",49,0) NEW C0QB "RTN","C0QMUERX",50,0) IF $QSUBSCRIPT(C0QLIST,$QLENGTH(C0QLIST))="B" DO "RTN","C0QMUERX",51,0) . SET C0QB=1 "RTN","C0QMUERX",52,0) . ; DEBUG "RTN","C0QMUERX",53,0) . W:$G(C0QDEBUG) "B index passed",! "RTN","C0QMUERX",54,0) . ; DEBUG "RTN","C0QMUERX",55,0) ELSE SET C0QB=0 "RTN","C0QMUERX",56,0) ; "RTN","C0QMUERX",57,0) ; Make sure our TMP is empty "RTN","C0QMUERX",58,0) K ^TMP($J) "RTN","C0QMUERX",59,0) ; "RTN","C0QMUERX",60,0) ; Walk the global "RTN","C0QMUERX",61,0) N C0QWALK S C0QWALK=$SELECT(C0QB:"",'C0QB:0) ; Walker, start of $ORDER? "RTN","C0QMUERX",62,0) N C0QDONE S C0QDONE=0 ; Finish Flag "RTN","C0QMUERX",63,0) FOR SET C0QWALK=$O(@C0QLIST@(C0QWALK)) QUIT:C0QDONE DO "RTN","C0QMUERX",64,0) . ; Are we done? "RTN","C0QMUERX",65,0) . I C0QB,C0QWALK="" S C0QDONE=1 QUIT ; If in index and we are out, done "RTN","C0QMUERX",66,0) . I 'C0QB,'+C0QWALK S C0QDONE=1 QUIT ; If not in index and we are not numeric, done "RTN","C0QMUERX",67,0) . ; "RTN","C0QMUERX",68,0) . N C0QDFN ; DFN of Patient "RTN","C0QMUERX",69,0) . ; If Walking B Index and Index not numeric, grab DFN (assuming ^DPT or ^AUPNPAT) "RTN","C0QMUERX",70,0) . ; TODO: Should I check that the global is ^DPT or ^AUPNPAT? "RTN","C0QMUERX",71,0) . I C0QB,'+C0QWALK S C0QDFN=$O(@C0QLIST@(C0QWALK,"")) "RTN","C0QMUERX",72,0) . ; Otherwise, we will assume the contents of the index are the DFNs "RTN","C0QMUERX",73,0) . E S C0QDFN=C0QWALK "RTN","C0QMUERX",74,0) . I $G(C0QDEBUG) W C0QDFN," " "RTN","C0QMUERX",75,0) . ; "RTN","C0QMUERX",76,0) . ; Now, check to see if the patient has e-Rx's "RTN","C0QMUERX",77,0) . I $$HASERX(C0QDFN) S ^TMP($J,C0QDFN)="" "RTN","C0QMUERX",78,0) ; "RTN","C0QMUERX",79,0) W:$G(C0QDEBUG) ! ; "RTN","C0QMUERX",80,0) ; "RTN","C0QMUERX",81,0) ; Loop through collected DFNs, send to WS, and get data back, store in ^TMP($J,DFN) "RTN","C0QMUERX",82,0) N C0QDFN S C0QDFN=0 "RTN","C0QMUERX",83,0) F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO "RTN","C0QMUERX",84,0) . N C0POUT "RTN","C0QMUERX",85,0) . W:$G(C0QDEBUG) "Calling GETMEDS6 SOAP Web Service Call for "_C0QDFN,! "RTN","C0QMUERX",86,0) . D SOAP^C0PWS2("C0POUT","GETMEDS6",DUZ,C0QDFN) "RTN","C0QMUERX",87,0) . Q:$G(C0POUT(1,"RowCount"))=0 ; WS says no data "RTN","C0QMUERX",88,0) . M ^TMP($J,C0QDFN)=C0POUT "RTN","C0QMUERX",89,0) ; "RTN","C0QMUERX",90,0) ; From the New Crop Meaningful Use documentation: "RTN","C0QMUERX",91,0) ; Appendix G: Meaningful Use Certification FAQ Question 10 "RTN","C0QMUERX",92,0) ; "RTN","C0QMUERX",93,0) ; DENOMINATOR NUMERATOR "RTN","C0QMUERX",94,0) ; DeaClassCode = 0, 9 DeaClassCode = 0, 9 "RTN","C0QMUERX",95,0) ; PharmacyType = 1 PharmacyType = 1 "RTN","C0QMUERX",96,0) ; PharmacyDetailType = 1, 2 PharmacyDetailType = 1, 2 "RTN","C0QMUERX",97,0) ; FinalDestinationType = 1, 2, 3, 4 FinalDestinationType = 3, 4 "RTN","C0QMUERX",98,0) ; FinalStatusType = 1, 4, 5 FinalStatusType = 1, 5 "RTN","C0QMUERX",99,0) ; "RTN","C0QMUERX",100,0) ; DeMorgan's Law "RTN","C0QMUERX",101,0) ; NOT(A or B) = NOT(A) and NOT(B) "RTN","C0QMUERX",102,0) ; So to collect prescriptions for which DeaClassCode is 0 or 9 "RTN","C0QMUERX",103,0) ; We exclude all those who are not 0 AND not 9. "RTN","C0QMUERX",104,0) ; See: http://en.wikipedia.org/wiki/De_Morgan%27s_laws#Negation_of_a_disjunction "RTN","C0QMUERX",105,0) ; "RTN","C0QMUERX",106,0) ; The algorithms below use an Onion Peeling method. Any prescription which "RTN","C0QMUERX",107,0) ; fails makes you jump to the next prescription. "RTN","C0QMUERX",108,0) ; The "Onion levels" are: "RTN","C0QMUERX",109,0) ; DeaClassCode, PharamcyType, PharmacyDetailType, FinalDestinationType, FinalStatusType "RTN","C0QMUERX",110,0) ; "RTN","C0QMUERX",111,0) ; Now walk through collected DFNs and accumulate MU stats "RTN","C0QMUERX",112,0) ; "RTN","C0QMUERX",113,0) ; WARNING: Naked References below "RTN","C0QMUERX",114,0) ; "RTN","C0QMUERX",115,0) N C0QDFN,C0QRXNO S (C0QDFN,C0QRXNO)=0 "RTN","C0QMUERX",116,0) N C0QD S C0QD=0 ; Denominator - Overall (cf C0QDP below) "RTN","C0QMUERX",117,0) ; "RTN","C0QMUERX",118,0) ; Calculate Denominator below "RTN","C0QMUERX",119,0) F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO "RTN","C0QMUERX",120,0) . N C0QDP S C0QDP=0 ; Denominator - Patient Specific "RTN","C0QMUERX",121,0) . F S C0QRXNO=$O(^TMP($J,C0QDFN,C0QRXNO)) Q:C0QRXNO="" DO "RTN","C0QMUERX",122,0) .. W:$G(C0QDEBUG) "Patient "_C0QDFN_" Rx "_C0QRXNO,! "RTN","C0QMUERX",123,0) .. ; "RTN","C0QMUERX",124,0) .. I ^(C0QRXNO,"DeaClassCode") ; Change $REFERENCE "RTN","C0QMUERX",125,0) .. ; "RTN","C0QMUERX",126,0) .. N DEA S DEA=^("DeaClassCode") "RTN","C0QMUERX",127,0) .. W:$G(C0QDEBUG) "DeaClassCode: "_DEA,! "RTN","C0QMUERX",128,0) .. Q:((DEA'=0)&(DEA'=9)) "RTN","C0QMUERX",129,0) .. ; "RTN","C0QMUERX",130,0) .. N PT S PT=^("PharmacyType") "RTN","C0QMUERX",131,0) .. W:$G(C0QDEBUG) "PharmacyType: "_PT,! "RTN","C0QMUERX",132,0) .. Q:(PT'=1) "RTN","C0QMUERX",133,0) .. ; "RTN","C0QMUERX",134,0) .. N PDT S PDT=^("PharmacyDetailType") "RTN","C0QMUERX",135,0) .. W:$G(C0QDEBUG) "PharmacyDetailType: "_PDT,! "RTN","C0QMUERX",136,0) .. Q:((PDT'=1)&(PDT'=2)) "RTN","C0QMUERX",137,0) .. ; "RTN","C0QMUERX",138,0) .. N FDT S FDT=^("FinalDestinationType") "RTN","C0QMUERX",139,0) .. W:$G(C0QDEBUG) "FinalDestinationType: "_FDT,! "RTN","C0QMUERX",140,0) .. Q:((FDT'=1)&(FDT'=2)&(FDT'=3)&(FDT'=4)) "RTN","C0QMUERX",141,0) .. ; "RTN","C0QMUERX",142,0) .. N FST S FST=^("FinalStatusType") "RTN","C0QMUERX",143,0) .. W:$G(C0QDEBUG) "FinalStatusType: "_FST,! "RTN","C0QMUERX",144,0) .. Q:((FST'=1)&(FST'=4)&(FST'=5)) "RTN","C0QMUERX",145,0) .. ; "RTN","C0QMUERX",146,0) .. W:$G(C0QDEBUG) "Adding to Denominator",! "RTN","C0QMUERX",147,0) .. S C0QDP=C0QDP+1 "RTN","C0QMUERX",148,0) .. S C0QD=C0QD+1 "RTN","C0QMUERX",149,0) . ; "RTN","C0QMUERX",150,0) . ; SAVE C0QDP - while it lasts! "RTN","C0QMUERX",151,0) . D SAVE(C0QLIST,C0QDFN,"ERXDEN",C0QDP) "RTN","C0QMUERX",152,0) ; "RTN","C0QMUERX",153,0) ; Calculate Numerator below "RTN","C0QMUERX",154,0) N C0QDFN,C0QRXNO S (C0QDFN,C0QRXNO)=0 "RTN","C0QMUERX",155,0) N C0QN S C0QN=0 ; Numerator - Overall (cf C0QNP below) "RTN","C0QMUERX",156,0) F S C0QDFN=$O(^TMP($J,C0QDFN)) Q:C0QDFN="" DO "RTN","C0QMUERX",157,0) . N C0QNP S C0QNP=0 ; Numerator - Patient Specific "RTN","C0QMUERX",158,0) . F S C0QRXNO=$O(^TMP($J,C0QDFN,C0QRXNO)) Q:C0QRXNO="" DO "RTN","C0QMUERX",159,0) .. W:$G(C0QDEBUG) "Patient "_C0QDFN_" Rx "_C0QRXNO,! "RTN","C0QMUERX",160,0) .. ; "RTN","C0QMUERX",161,0) .. I ^(C0QRXNO,"DeaClassCode") ; Change $REFERENCE "RTN","C0QMUERX",162,0) .. ; "RTN","C0QMUERX",163,0) .. N DEA S DEA=^("DeaClassCode") "RTN","C0QMUERX",164,0) .. W:$G(C0QDEBUG) "DeaClassCode: "_DEA,! "RTN","C0QMUERX",165,0) .. Q:((DEA'=0)&(DEA'=9)) "RTN","C0QMUERX",166,0) .. ; "RTN","C0QMUERX",167,0) .. N PT S PT=^("PharmacyType") "RTN","C0QMUERX",168,0) .. W:$G(C0QDEBUG) "PharmacyType: "_PT,! "RTN","C0QMUERX",169,0) .. Q:(PT'=1) "RTN","C0QMUERX",170,0) .. ; "RTN","C0QMUERX",171,0) .. N PDT S PDT=^("PharmacyDetailType") "RTN","C0QMUERX",172,0) .. W:$G(C0QDEBUG) "PharmacyDetailType: "_PDT,! "RTN","C0QMUERX",173,0) .. Q:((PDT'=1)&(PDT'=2)) "RTN","C0QMUERX",174,0) .. ; "RTN","C0QMUERX",175,0) .. N FDT S FDT=^("FinalDestinationType") "RTN","C0QMUERX",176,0) .. W:$G(C0QDEBUG) "FinalDestinationType: "_FDT,! "RTN","C0QMUERX",177,0) .. Q:((FDT'=3)&(FDT'=4)) "RTN","C0QMUERX",178,0) .. ; "RTN","C0QMUERX",179,0) .. N FST S FST=^("FinalStatusType") "RTN","C0QMUERX",180,0) .. W:$G(C0QDEBUG) "FinalStatusType: "_FST,! "RTN","C0QMUERX",181,0) .. Q:((FST'=1)&(FST'=5)) "RTN","C0QMUERX",182,0) .. ; "RTN","C0QMUERX",183,0) .. W:$G(C0QDEBUG) "Adding to Numerator",! "RTN","C0QMUERX",184,0) .. S C0QNP=C0QNP+1 "RTN","C0QMUERX",185,0) .. S C0QN=C0QN+1 "RTN","C0QMUERX",186,0) . ; "RTN","C0QMUERX",187,0) . ; Save C0QNP while it lasts "RTN","C0QMUERX",188,0) . D SAVE(C0QLIST,C0QDFN,"ERXNUM",C0QNP) "RTN","C0QMUERX",189,0) ; "RTN","C0QMUERX",190,0) S ^TMP($J)=C0QN_U_C0QD "RTN","C0QMUERX",191,0) ; "RTN","C0QMUERX",192,0) ; TODO: Over here, do something with the numerator and denominator.. "RTN","C0QMUERX",193,0) ; Probably store them somewhere. "RTN","C0QMUERX",194,0) ; "RTN","C0QMUERX",195,0) I '$G(C0QDEBUG) K ^TMP($J) ; Empty out in production not testing "RTN","C0QMUERX",196,0) QUIT "RTN","C0QMUERX",197,0) ; "RTN","C0QMUERX",198,0) HASERX(DFN) ; $$ - Private; Has E-Prescriptions? "RTN","C0QMUERX",199,0) ; Parameters "RTN","C0QMUERX",200,0) ; - DFN by Value "RTN","C0QMUERX",201,0) ; Output "RTN","C0QMUERX",202,0) ; 0 or 1 (false or true) "RTN","C0QMUERX",203,0) N ZI S ZI="" "RTN","C0QMUERX",204,0) N ZERX S ZERX=$NA(^PS(55,DFN,"NVA")) "RTN","C0QMUERX",205,0) N DONE,HASERX "RTN","C0QMUERX",206,0) F S ZI=$O(@ZERX@(ZI)) Q:ZI="" Q:$G(DONE) D "RTN","C0QMUERX",207,0) . I $G(@ZERX@(ZI,1,1,0))["E-Rx Web" S (DONE,HASERX)=1 "RTN","C0QMUERX",208,0) Q +$G(HASERX) "RTN","C0QMUERX",209,0) ; "RTN","C0QMUERX",210,0) SAVE(C0QLIST,C0QDFN,TYPE,COUNT) ; Proc - Private; Save Count in C0Q(301, file "RTN","C0QMUERX",211,0) ; Layman's Explanation: Save the denominator or numerator for ePrescribing for "RTN","C0QMUERX",212,0) ; each of the patients in the Subfile for that patient in ^C0Q(301, "RTN","C0QMUERX",213,0) ; Still hard to understand though! Here's a demo: "RTN","C0QMUERX",214,0) ; ^C0Q(301,IEN has a subfile under node 1 which stores the patients. E.g. "RTN","C0QMUERX",215,0) ; ^C0Q(301,48,1,15,0)=91$ "RTN","C0QMUERX",216,0) ; ^C0Q(301,48,1,16,0)=93$ "RTN","C0QMUERX",217,0) ; ^C0Q(301,48,1,17,0)=173$ "RTN","C0QMUERX",218,0) ; "RTN","C0QMUERX",219,0) ; I store the numerator and denominator under each of the patients. The numerator "RTN","C0QMUERX",220,0) ; stands for the number of prescriptions that were electronically transmitted; "RTN","C0QMUERX",221,0) ; the denominator stands for the numbers of prescriptions that COULD HAVE BEEN "RTN","C0QMUERX",222,0) ; electronically transmitted. End result for Patient 173 is as follows: "RTN","C0QMUERX",223,0) ; ^C0Q(301,48,1,17,0)=173 "RTN","C0QMUERX",224,0) ; ^C0Q(301,48,1,17,1,0)="^1130580001.3111^2^2" "RTN","C0QMUERX",225,0) ; ^C0Q(301,48,1,17,1,1,0)="ERXDEN^0" "RTN","C0QMUERX",226,0) ; ^C0Q(301,48,1,17,1,2,0)="ERXNUM^0" "RTN","C0QMUERX",227,0) ; ^C0Q(301,48,1,17,1,"B","ERXDEN",1)="" "RTN","C0QMUERX",228,0) ; ^C0Q(301,48,1,17,1,"B","ERXNUM",2)="" "RTN","C0QMUERX",229,0) ; "RTN","C0QMUERX",230,0) ; Subroutine COUNT (below) goes and counts the data "RTN","C0QMUERX",231,0) ; "RTN","C0QMUERX",232,0) ; Params: "RTN","C0QMUERX",233,0) ; C0QLIST (by val): "B" x-ref where patients are located. Only supports ^C0Q(301, file. "RTN","C0QMUERX",234,0) ; C0QDFN (by val): Patient DFN for whom to file data. "RTN","C0QMUERX",235,0) ; TYPE (by val): Either ERXDEN or ERXNUM for eRx Denominator or eRx Numerator "RTN","C0QMUERX",236,0) ; COUNT (by val): The number to save "RTN","C0QMUERX",237,0) ; "RTN","C0QMUERX",238,0) ; First, QUIT if this isn't a Quality Measures List? "RTN","C0QMUERX",239,0) ; $QS(x,0) gets you the global name "RTN","C0QMUERX",240,0) ; "RTN","C0QMUERX",241,0) ; This should give you an idea of what I am dealing with! "RTN","C0QMUERX",242,0) ; "RTN","C0QMUERX",243,0) ; ^C0Q(301,48,1,15,0)=91 "RTN","C0QMUERX",244,0) ; ^C0Q(301,48,1,16,0)=93 "RTN","C0QMUERX",245,0) ; ^C0Q(301,48,1,17,0)=173 "RTN","C0QMUERX",246,0) ; ^C0Q(301,48,1,18,0)=174 "RTN","C0QMUERX",247,0) ; ^C0Q(301,48,1,"B",5,1)="" "RTN","C0QMUERX",248,0) ; ^C0Q(301,48,1,"B",10,2)="" "RTN","C0QMUERX",249,0) ; ^C0Q(301,48,1,"B",11,3)="" "RTN","C0QMUERX",250,0) ; ^C0Q(301,48,1,"B",14,4)="" "RTN","C0QMUERX",251,0) ; "RTN","C0QMUERX",252,0) I $QS(C0QLIST,0)'="^C0Q" W:$G(C0QDEBUG) "Not Saving Patient "_C0QDFN,! QUIT "RTN","C0QMUERX",253,0) ; "RTN","C0QMUERX",254,0) ; Otherwise, prepare to save "RTN","C0QMUERX",255,0) N C0QFDA ; Fileman Data Array "RTN","C0QMUERX",256,0) N C0QIENS ; IENS "RTN","C0QMUERX",257,0) N L1,L2 ; Top Level, Level 2 "RTN","C0QMUERX",258,0) S L1=$QS(C0QLIST,2) ; Top Level IEN "RTN","C0QMUERX",259,0) S L2=$O(^C0Q(301,L1,1,"B",C0QDFN,"")) ; Patient IEN "RTN","C0QMUERX",260,0) S C0QIENS="?+1"_C0QDFN_","_L2_","_L1_"," ; TODO: Here C0QDFN is a dummy for uniqueness in FDA, not meaningful! - DO BETTER! "RTN","C0QMUERX",261,0) W:$G(C0QDEBUG) "IENs "_C0QIENS_" ready to file",! "RTN","C0QMUERX",262,0) W:$G(C0QDEBUG) "Saving "_TYPE_" of "_COUNT_" for Patient "_$P(^DPT(C0QDFN,0),U)_" ("_C0QDFN_")",! "RTN","C0QMUERX",263,0) S C0QFDA(1130580001.3111,C0QIENS,.01)=TYPE "RTN","C0QMUERX",264,0) S C0QFDA(1130580001.3111,C0QIENS,.02)=COUNT "RTN","C0QMUERX",265,0) ; "RTN","C0QMUERX",266,0) W:$G(C0QDEBUG) "Fileman Data Array",! "RTN","C0QMUERX",267,0) I $G(C0QDEBUG) N % S %=$NA(C0QFDA) F S %=$Q(@%) Q:%="" W %_": "_@%,! "RTN","C0QMUERX",268,0) ; "RTN","C0QMUERX",269,0) N C0QERR ; Errors "RTN","C0QMUERX",270,0) D UPDATE^DIE("","C0QFDA","","C0QERR") "RTN","C0QMUERX",271,0) ; "RTN","C0QMUERX",272,0) I $D(C0QERR) DO "RTN","C0QMUERX",273,0) . W "Error in filing data",! "RTN","C0QMUERX",274,0) . N % S %=$NAME(C0QERR) F S %=$Q(@%) Q:%="" W %_": "_@%,! "RTN","C0QMUERX",275,0) ; "RTN","C0QMUERX",276,0) QUIT "RTN","C0QMUERX",277,0) ; "RTN","C0QMUERX",278,0) COUNT(C0QLIST) ; $$ - Private; Count Numerator and Denominator for a Patient List "RTN","C0QMUERX",279,0) ; Input: C0QLIST - Pass by Value - Patient Listing B index (only C0Q(301,IEN,1,"B", listing is supported) "RTN","C0QMUERX",280,0) ; Output: (as string) NUMERATOR/DENOMINATOR "RTN","C0QMUERX",281,0) ; Optional Symtab input: C0QDEBUG to print out debug messages to STDOUT. "RTN","C0QMUERX",282,0) ; "RTN","C0QMUERX",283,0) I $QS(C0QLIST,0)'="^C0Q" W:$G(C0QDEBUG) "Counting for files other than C0Q(301, not supported ",! QUIT "0/0" "RTN","C0QMUERX",284,0) ; MEASURE ----------- "RTN","C0QMUERX",285,0) ; IEN ----------- | "RTN","C0QMUERX",286,0) ; L1 ------| | | "RTN","C0QMUERX",287,0) ; V V V "RTN","C0QMUERX",288,0) ; ^C0Q(301,48,1,2,1,1,0)="ERXDEN^0" "RTN","C0QMUERX",289,0) ; ^C0Q(301,48,1,2,1,2,0)="ERXNUM^0" "RTN","C0QMUERX",290,0) ; ^C0Q(301,48,1,2,1,"B","ERXDEN",1)="" "RTN","C0QMUERX",291,0) ; ^C0Q(301,48,1,2,1,"B","ERXNUM",2)="" "RTN","C0QMUERX",292,0) ; ^C0Q(301,48,1,2,1,"B" "RTN","C0QMUERX",293,0) W:$G(C0QDEBUG) "DFN",?20,"Denominator",?40,"Numerator",! "RTN","C0QMUERX",294,0) ; "RTN","C0QMUERX",295,0) N L1 S L1=$QS(C0QLIST,2) ; Top Level IEN "RTN","C0QMUERX",296,0) ; "RTN","C0QMUERX",297,0) N DENTOT,NUMTOT S (DENTOT,NUMTOT)=0 ; Denominator Total, Numerator Total "RTN","C0QMUERX",298,0) ; "RTN","C0QMUERX",299,0) N C0QDFN S C0QDFN=0 ; Walker through B index "RTN","C0QMUERX",300,0) F S C0QDFN=$O(^C0Q(301,L1,1,"B",C0QDFN)) Q:C0QDFN="" DO "RTN","C0QMUERX",301,0) . N IEN S IEN=$O(^(C0QDFN,"")) ; naked naked - get IEN from B index "RTN","C0QMUERX",302,0) . W:$G(C0QDEBUG) C0QDFN "RTN","C0QMUERX",303,0) . ; "RTN","C0QMUERX",304,0) . ; Denom Processing "RTN","C0QMUERX",305,0) . N DENIEN S DENIEN=$O(^C0Q(301,L1,1,IEN,1,"B","ERXDEN","")) ; Denom IEN "RTN","C0QMUERX",306,0) . N DEN S DEN=$S(DENIEN:$P(^C0Q(301,L1,1,IEN,1,DENIEN,0),U,2),1:"N/A") ; Denominator "RTN","C0QMUERX",307,0) . W:$G(C0QDEBUG) ?20,DEN "RTN","C0QMUERX",308,0) . S DENTOT=DENTOT+DEN ; Total it up (N/A becomes zero) "RTN","C0QMUERX",309,0) . ; "RTN","C0QMUERX",310,0) . N NUMIEN S NUMIEN=$O(^C0Q(301,L1,1,IEN,1,"B","ERXNUM","")) ; Numerator IEN "RTN","C0QMUERX",311,0) . N NUM S NUM=$S(NUMIEN:$P(^C0Q(301,L1,1,IEN,1,NUMIEN,0),U,2),1:"N/A") ; Numerator "RTN","C0QMUERX",312,0) . W:$G(C0QDEBUG) ?40,NUM "RTN","C0QMUERX",313,0) . S NUMTOT=NUMTOT+NUM ; Total it up (N/A becomes zero) "RTN","C0QMUERX",314,0) . ; "RTN","C0QMUERX",315,0) . w:$G(C0QDEBUG) ! "RTN","C0QMUERX",316,0) ; "RTN","C0QMUERX",317,0) ; Write the totals "RTN","C0QMUERX",318,0) D:$G(C0QDEBUG) "RTN","C0QMUERX",319,0) . W ?20,"===" "RTN","C0QMUERX",320,0) . W ?40,"===" "RTN","C0QMUERX",321,0) . W ! "RTN","C0QMUERX",322,0) . ; "RTN","C0QMUERX",323,0) . W ?20,DENTOT "RTN","C0QMUERX",324,0) . W ?40,NUMTOT "RTN","C0QMUERX",325,0) . W ! "RTN","C0QMUERX",326,0) ; "RTN","C0QMUERX",327,0) ; Quit with Numeartor/Denominator "RTN","C0QMUERX",328,0) QUIT NUMTOT_"/"_DENTOT "RTN","C0QUPDT") 0^2^B78393601 "RTN","C0QUPDT",1,0) C0QUPDT ; GPL - Quality Reporting List Update Routines ; 9/17/12 1:12pm "RTN","C0QUPDT",2,0) ;;1.0;C0Q;**1**;May 21, 2012;Build 32 "RTN","C0QUPDT",3,0) ;Copyright 2009 George Lilly. Licensed under the terms of the GNU "RTN","C0QUPDT",4,0) ;General Public License See attached copy of the License. "RTN","C0QUPDT",5,0) ; "RTN","C0QUPDT",6,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QUPDT",7,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QUPDT",8,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QUPDT",9,0) ;(at your option) any later version. "RTN","C0QUPDT",10,0) ; "RTN","C0QUPDT",11,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QUPDT",12,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QUPDT",13,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QUPDT",14,0) ;GNU General Public License for more details. "RTN","C0QUPDT",15,0) ; "RTN","C0QUPDT",16,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QUPDT",17,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QUPDT",18,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QUPDT",19,0) ; "RTN","C0QUPDT",20,0) Q "RTN","C0QUPDT",21,0) ; "RTN","C0QUPDT",22,0) C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE "RTN","C0QUPDT",23,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QUPDT",24,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QUPDT",25,0) C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE "RTN","C0QUPDT",26,0) C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE "RTN","C0QUPDT",27,0) RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE "RTN","C0QUPDT",28,0) RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE "RTN","C0QUPDT",29,0) C0QPLF() Q 1130580001.301 ; C0Q PATIENT LIST FILE "RTN","C0QUPDT",30,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ; "RTN","C0QUPDT",31,0) ; "RTN","C0QUPDT",32,0) UPDATE(RNT,MSET) ; UPDATE A MEASURE SET BY ADDING NEW ENTRIES TO PATIENT "RTN","C0QUPDT",33,0) ; LISTS AND DELETING ENTRIES THAT ARE NO LONGER VALID. ALSO UPDATE "RTN","C0QUPDT",34,0) ; NUMERATOR AND DENOMINATOR COUNTS "RTN","C0QUPDT",35,0) ; MAKES HEAVY USE OF UNITY^C0QSET TO DETERMINE WHAT TO ADD AND DELETE "RTN","C0QUPDT",36,0) ; "RTN","C0QUPDT",37,0) ; THIS IS A REPLACEMENT FOR C0QRPC^C0QMAIN WHICH DELETES THE PATIENT "RTN","C0QUPDT",38,0) ; LISTS AND RECREATES THEM, WHICH IS A LOT OF UNNECESSARY PROCESSING "RTN","C0QUPDT",39,0) ; "RTN","C0QUPDT",40,0) N ZI S ZI="" "RTN","C0QUPDT",41,0) N C0QM ; FOR HOLDING THE MEASURES IN THE SET "RTN","C0QUPDT",42,0) I $$GET1^DIQ($$C0QMFN,MSET_",",.05,"I")="Y" D Q ; IS IT LOCKED? "RTN","C0QUPDT",43,0) . W !,"ERROR MEASURE SET IS LOCKED, EXITING" "RTN","C0QUPDT",44,0) D LIST^DIC($$C0QMMFN,","_MSET_",",".01I;1.2I;2.2I") ; GET ALL THE MEASURES "RTN","C0QUPDT",45,0) D DELIST("C0QM") "RTN","C0QUPDT",46,0) N ZII S ZII="" "RTN","C0QUPDT",47,0) F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE "RTN","C0QUPDT",48,0) . ; "RTN","C0QUPDT",49,0) . ; Special processing for eRx measure. "RTN","C0QUPDT",50,0) . I $$GET1^DIQ(1130580001.101,+C0QM(ZII)_",",4,"I")="E" D ERXCOUNT(MSET,ZII) Q "RTN","C0QUPDT",51,0) . ; "RTN","C0QUPDT",52,0) . ; Otherwise, we go on "RTN","C0QUPDT",53,0) . N C0QNL,C0QDL,C0QFLTN,C0QFLTD "RTN","C0QUPDT",54,0) . S C0QFLTN=$P(C0QM(ZII),U,3) ;IEN OF NUMERATOR FILTER LIST "RTN","C0QUPDT",55,0) . S C0QFLTD=$P(C0QM(ZII),U,4) ; IEN OF DENOMINATOR FILTER LIST "RTN","C0QUPDT",56,0) . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE "RTN","C0QUPDT",57,0) . ; "RTN","C0QUPDT",58,0) . ; Numerator "RTN","C0QUPDT",59,0) . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER "RTN","C0QUPDT",60,0) . I C0QNL="" D ; CHECK ALTERNATE LIST "RTN","C0QUPDT",61,0) . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER "RTN","C0QUPDT",62,0) . . I C0QNL'="" S C0QNALT=1 "RTN","C0QUPDT",63,0) . I C0QNL="" QUIT ; No Numerator. Can't perform calculation.--smh "RTN","C0QUPDT",64,0) . ; "RTN","C0QUPDT",65,0) . ; Denominator "RTN","C0QUPDT",66,0) . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER "RTN","C0QUPDT",67,0) . I C0QDL="" D ; CHECK ALTERNATE LIST "RTN","C0QUPDT",68,0) . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER "RTN","C0QUPDT",69,0) . . I C0QDL'="" S C0QDALT=1 "RTN","C0QUPDT",70,0) . I C0QDL="" QUIT ; No Denominator. Can't perform calcuation.--smh "RTN","C0QUPDT",71,0) . ; "RTN","C0QUPDT",72,0) . ; FIRST PROCESS THE NUMERATOR "RTN","C0QUPDT",73,0) . ; "RTN","C0QUPDT",74,0) . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX "RTN","C0QUPDT",75,0) . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR "RTN","C0QUPDT",76,0) . . S C0QNEW=$NA(^C0Q(301,C0QNL,1,"B")) ; B INDEX FOR THIS LIST "RTN","C0QUPDT",77,0) . E D ; USE THE REMINDER PACKAGE PATIENT LISTS "RTN","C0QUPDT",78,0) . . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS "RTN","C0QUPDT",79,0) . I C0QFLTN'="" D ; USE A NUMERATOR FILTER LIST "RTN","C0QUPDT",80,0) . . N ZNEW "RTN","C0QUPDT",81,0) . . S ZNEW=$NA(^C0Q(301,C0QFLTN,1,"B")) ; B INDEX OF FILTER LIST "RTN","C0QUPDT",82,0) . . K C0QFLTRD "RTN","C0QUPDT",83,0) . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) "RTN","C0QUPDT",84,0) . . S C0QNEW="C0QFLTRD" "RTN","C0QUPDT",85,0) . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST "RTN","C0QUPDT",86,0) . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET "RTN","C0QUPDT",87,0) . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES "RTN","C0QUPDT",88,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES "RTN","C0QUPDT",89,0) . N C0QCNT "RTN","C0QUPDT",90,0) . S C0QNCNT=$G(C0QRSLT("COUNT")) "RTN","C0QUPDT",91,0) . I C0QNCNT="" D ; "RTN","C0QUPDT",92,0) . . S C0QNCNT=0 ; DEFAULT COUNT IS ZERO "RTN","C0QUPDT",93,0) . . N GZZ S GZZ="" "RTN","C0QUPDT",94,0) . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY "RTN","C0QUPDT",95,0) . . . S C0QNCNT=C0QNCNT+1 "RTN","C0QUPDT",96,0) . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY "RTN","C0QUPDT",97,0) . . . S C0QNCNT=C0QNCNT+1 "RTN","C0QUPDT",98,0) . K C0QFDA ; CLEAR THE FDA "RTN","C0QUPDT",99,0) . N C0QONCNT ; OLD COUNT "RTN","C0QUPDT",100,0) . S C0QONCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",1.1) "RTN","C0QUPDT",101,0) . I C0QNCNT'=C0QONCNT D ; COUNT HAS CHANGED "RTN","C0QUPDT",102,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",1.1)=C0QNCNT ; NUMERATOR COUNT "RTN","C0QUPDT",103,0) . . D UPDIE ; UPDATE THE NUMERATOR COUNT "RTN","C0QUPDT",104,0) . I $D(C0QRSLT) D ;B ; "RTN","C0QUPDT",105,0) . . ;ZWR C0QRSLT "RTN","C0QUPDT",106,0) . ; FIRST PROCESS DELETIONS "RTN","C0QUPDT",107,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",108,0) . N ZG,ZIEN S ZG="" "RTN","C0QUPDT",109,0) . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION "RTN","C0QUPDT",110,0) . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY "RTN","C0QUPDT",111,0) . . I ZIEN="" D Q ; OOPS "RTN","C0QUPDT",112,0) . . . W !,"ERROR DELETING ENTRY!! ",ZG "RTN","C0QUPDT",113,0) . . S C0QFDA($$C0QMMNFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE "RTN","C0QUPDT",114,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",115,0) . ; SECOND, PROCESS ADDITIONS "RTN","C0QUPDT",116,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",117,0) . N ZG,ZC S ZG="" S ZC=1 "RTN","C0QUPDT",118,0) . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION "RTN","C0QUPDT",119,0) . . S C0QFDA($$C0QMMNFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY "RTN","C0QUPDT",120,0) . . S ZC=ZC+1 "RTN","C0QUPDT",121,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",122,0) . ; "RTN","C0QUPDT",123,0) . ; PROCESS THE DENOMINATOR "RTN","C0QUPDT",124,0) . ; "RTN","C0QUPDT",125,0) . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX "RTN","C0QUPDT",126,0) . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR "RTN","C0QUPDT",127,0) . . S C0QNEW=$NA(^C0Q(301,C0QDL,1,"B")) ; B INDEX FOR THIS LIST "RTN","C0QUPDT",128,0) . E D ; USE THE REMINDER PACKAGE PATIENT LISTS "RTN","C0QUPDT",129,0) . . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS "RTN","C0QUPDT",130,0) . I C0QFLTD'="" D ; USE A DENOMINATOR FILTER LIST "RTN","C0QUPDT",131,0) . . N ZNEW "RTN","C0QUPDT",132,0) . . S ZNEW=$NA(^C0Q(301,C0QFLTD,1,"B")) ; B INDEX OF FILTER LIST "RTN","C0QUPDT",133,0) . . K C0QFLTRD "RTN","C0QUPDT",134,0) . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) "RTN","C0QUPDT",135,0) . . S C0QNEW="C0QFLTRD" "RTN","C0QUPDT",136,0) . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST "RTN","C0QUPDT",137,0) . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET "RTN","C0QUPDT",138,0) . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES "RTN","C0QUPDT",139,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES "RTN","C0QUPDT",140,0) . N C0QDCNT "RTN","C0QUPDT",141,0) . S C0QDCNT=$G(C0QRSLT("COUNT")) "RTN","C0QUPDT",142,0) . I C0QDCNT="" D ; "RTN","C0QUPDT",143,0) . . S C0QDCNT=0 ; DEFAULT COUNT IS ZERO "RTN","C0QUPDT",144,0) . . N GZZ S GZZ="" "RTN","C0QUPDT",145,0) . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY "RTN","C0QUPDT",146,0) . . . S C0QDCNT=C0QDCNT+1 "RTN","C0QUPDT",147,0) . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY "RTN","C0QUPDT",148,0) . . . S C0QDCNT=C0QDCNT+1 "RTN","C0QUPDT",149,0) . K C0QFDA ; CLEAR THE FDA "RTN","C0QUPDT",150,0) . N C0QODCNT ; OLD COUNT "RTN","C0QUPDT",151,0) . S C0QODCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",2.1) "RTN","C0QUPDT",152,0) . I C0QDCNT'=C0QODCNT D ; COUNT HAS CHANGED "RTN","C0QUPDT",153,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",2.1)=C0QDCNT ; DENOMINATOR COUNT "RTN","C0QUPDT",154,0) . . D UPDIE ; UPDATE THE DENOMINATOR COUNT "RTN","C0QUPDT",155,0) . I $D(C0QRSLT) D ;B ; "RTN","C0QUPDT",156,0) . . ;ZWR C0QRSLT "RTN","C0QUPDT",157,0) . I '$D(C0QRSLT) Q ; NO RESULTS TO USE "RTN","C0QUPDT",158,0) . ; FIRST PROCESS DELETIONS "RTN","C0QUPDT",159,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",160,0) . N ZG,ZIEN S ZG="" "RTN","C0QUPDT",161,0) . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION "RTN","C0QUPDT",162,0) . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY "RTN","C0QUPDT",163,0) . . I ZIEN="" D Q ; OOPS "RTN","C0QUPDT",164,0) . . . W !,"ERROR DELETING ENTRY!! ",ZG "RTN","C0QUPDT",165,0) . . S C0QFDA($$C0QMMDFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE "RTN","C0QUPDT",166,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",167,0) . ; SECOND, PROCESS ADDITIONS "RTN","C0QUPDT",168,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",169,0) . N ZG,ZC S ZG="" S ZC=1 "RTN","C0QUPDT",170,0) . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION "RTN","C0QUPDT",171,0) . . S C0QFDA($$C0QMMDFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY "RTN","C0QUPDT",172,0) . . S ZC=ZC+1 "RTN","C0QUPDT",173,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",174,0) . ; "RTN","C0QUPDT",175,0) . ; File Percentage "RTN","C0QUPDT",176,0) . N C0QPCT ; PERCENT "RTN","C0QUPDT",177,0) . D ; "RTN","C0QUPDT",178,0) . . I C0QDCNT>0 D ; "RTN","C0QUPDT",179,0) . . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0) "RTN","C0QUPDT",180,0) . . E S C0QPCT=0 "RTN","C0QUPDT",181,0) . . K C0QFDA "RTN","C0QUPDT",182,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT "RTN","C0QUPDT",183,0) . . D UPDIE "RTN","C0QUPDT",184,0) Q "RTN","C0QUPDT",185,0) ; "RTN","C0QUPDT",186,0) DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO "RTN","C0QUPDT",187,0) ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE "RTN","C0QUPDT",188,0) ; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE "RTN","C0QUPDT",189,0) N ZI,IV,EV,ZDI,ZIEN,FLTN,FLTD "RTN","C0QUPDT",190,0) S ZI="" "RTN","C0QUPDT",191,0) S ZDI=$NA(^TMP("DILIST",$J)) "RTN","C0QUPDT",192,0) K @RTN "RTN","C0QUPDT",193,0) F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ; "RTN","C0QUPDT",194,0) . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE "RTN","C0QUPDT",195,0) . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE "RTN","C0QUPDT",196,0) . S FLTN=$G(@ZDI@("ID",ZI,1.2)) ; NUMERATOR FILTER LIST "RTN","C0QUPDT",197,0) . S FLTD=$G(@ZDI@("ID",ZI,2.2)) ; DENOMINATOR FILTER LIST "RTN","C0QUPDT",198,0) . S ZIEN=@ZDI@(2,ZI) ; IEN "RTN","C0QUPDT",199,0) . S @RTN@(ZIEN)=IV_"^"_EV_"^"_FLTN_"^"_FLTD "RTN","C0QUPDT",200,0) . ;S @RTN@("B",IV,ZIEN)=EV "RTN","C0QUPDT",201,0) Q "RTN","C0QUPDT",202,0) ; "RTN","C0QUPDT",203,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QUPDT",204,0) K ZERR "RTN","C0QUPDT",205,0) D CLEAN^DILF "RTN","C0QUPDT",206,0) D ZWRITE^C0QUTIL("C0QFDA") "RTN","C0QUPDT",207,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QUPDT",208,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QUPDT",209,0) ;. W "ERROR",! "RTN","C0QUPDT",210,0) ;. ZWR ZERR "RTN","C0QUPDT",211,0) ;. B "RTN","C0QUPDT",212,0) K C0QFDA "RTN","C0QUPDT",213,0) Q "RTN","C0QUPDT",214,0) ; "RTN","C0QUPDT",215,0) ERXCOUNT(MSETIEN,MIEN) ; Private Proc; Get eRx and file as Numerator, Denominator, and % "RTN","C0QUPDT",216,0) ; Inputs: "RTN","C0QUPDT",217,0) ; MSETIEN - Measurement Set IEN - By Value "RTN","C0QUPDT",218,0) ; MIEN - Measurement IEN inside the Measurement Set - By Value "RTN","C0QUPDT",219,0) ; "RTN","C0QUPDT",220,0) ; Optional Symtab input: C0QDEBUG to print out debug messages to STDOUT. "RTN","C0QUPDT",221,0) ; "RTN","C0QUPDT",222,0) ; No check is done to see if the caller is sending bad data. Measurement must be "RTN","C0QUPDT",223,0) ; in a subfile under Measurement Set. "RTN","C0QUPDT",224,0) ; "RTN","C0QUPDT",225,0) W:$G(C0QDEBUG) "Processing E-Prescribing Counts",! "RTN","C0QUPDT",226,0) ; Example of Data we go through in the C0Q Parameter File, so the code below "RTN","C0QUPDT",227,0) ; will make sense. "RTN","C0QUPDT",228,0) ; ^C0Q(401,"AMMS",2,1)="" "RTN","C0QUPDT",229,0) ; ^C0Q(401,"AMMS",2,2)="" "RTN","C0QUPDT",230,0) ; ^C0Q(401,"AQMS",6,2)="" "RTN","C0QUPDT",231,0) ; ^C0Q(401,"B","INPATIENT",2)="" "RTN","C0QUPDT",232,0) ; ^C0Q(401,"B","OUTPATIENT",1)="" "RTN","C0QUPDT",233,0) ; ^C0Q(401,"MU","MU12",1)="" "RTN","C0QUPDT",234,0) ; ^C0Q(401,"MU","MU12",2)="" "RTN","C0QUPDT",235,0) ; ^C0Q(401,"MUTYP","MU12","EP",1)="" "RTN","C0QUPDT",236,0) ; ^C0Q(401,"MUTYP","MU12","INP",2)="" "RTN","C0QUPDT",237,0) ; "RTN","C0QUPDT",238,0) ; Get Parameter year from the Parameters file. "RTN","C0QUPDT",239,0) ; 1. Get parameter associated with this measurement set from AMMS x-ref (new in C0Q*1*1). "RTN","C0QUPDT",240,0) N C0QPARAM "RTN","C0QUPDT",241,0) N % S %="" F S %=$O(^C0Q(401,"AMMS",MSETIEN,%)) Q:%="" S C0QPARAM(%)="" "RTN","C0QUPDT",242,0) ; "RTN","C0QUPDT",243,0) ; 2. Find the year for each of those--store as value of node; IEN still subscript. "RTN","C0QUPDT",244,0) N % S %="" F S %=$O(C0QPARAM(%)) Q:%="" S C0QPARAM(%)=$$GET1^DIQ(1130580001.401,%_",",.02) "RTN","C0QUPDT",245,0) ; "RTN","C0QUPDT",246,0) ; 3. Now make sure that this parameter that point to an Outpatient Parameters "RTN","C0QUPDT",247,0) ; WARNING: CONFUSING CODE WRITTEN BY ME AHEAD "RTN","C0QUPDT",248,0) ; The % loop will stop with a valid value if found; % is used in the lines immediately below "RTN","C0QUPDT",249,0) N % S %="" F S %=$O(C0QPARAM(%)) Q:%="" Q:$D(^C0Q(401,"MUTYP",C0QPARAM(%),"EP",%)) "RTN","C0QUPDT",250,0) ; "RTN","C0QUPDT",251,0) ; 4. If % has a valid IEN (there can be multiple, we take the first), then off we go. "RTN","C0QUPDT",252,0) ; Otherwise, if it is back to "", we quit. "RTN","C0QUPDT",253,0) N MUYEAR "RTN","C0QUPDT",254,0) IF '% W "No suitable parameter found. Cannot determine Measurement Year.",! QUIT "RTN","C0QUPDT",255,0) ELSE S MUYEAR=C0QPARAM(%) "RTN","C0QUPDT",256,0) ; "RTN","C0QUPDT",257,0) ; Now, based on the MU year, construct the patient list name that has the eRx data. "RTN","C0QUPDT",258,0) N LISTNAME S LISTNAME=MUYEAR_"-"_"EP"_"-"_"HasERX" "RTN","C0QUPDT",259,0) ; "RTN","C0QUPDT",260,0) ; Call the API in C0QMUERX to get the counts already calculated "RTN","C0QUPDT",261,0) ; Data is returned NUM/DEN "RTN","C0QUPDT",262,0) N COUNTS S COUNTS=$$COUNT^C0QMUERX($$PATLN^C0QMU12(LISTNAME)) "RTN","C0QUPDT",263,0) ; "RTN","C0QUPDT",264,0) ; File the count "RTN","C0QUPDT",265,0) N NUM S NUM=$P(COUNTS,"/") ; Numerator "RTN","C0QUPDT",266,0) N DEN S DEN=$P(COUNTS,"/",2) ; Denominator "RTN","C0QUPDT",267,0) ; "RTN","C0QUPDT",268,0) ; Prepare FDA "RTN","C0QUPDT",269,0) N C0QFDA,C0QERR "RTN","C0QUPDT",270,0) S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",1.1)=NUM ; Numerator "RTN","C0QUPDT",271,0) S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",2.1)=DEN ; Denominator "RTN","C0QUPDT",272,0) S C0QFDA($$C0QMMFN(),MIEN_","_MSETIEN_",",3)=$S(DEN=0:0,1:$J(100*NUM/DEN,0,0)) ; Percentage; avoid dividing by zero! "RTN","C0QUPDT",273,0) ; "RTN","C0QUPDT",274,0) ; File FDA using Filer not updater (editing existing entry only) "RTN","C0QUPDT",275,0) D FILE^DIE("ET",$NAME(C0QFDA),$NAME(C0QERR)) ; Flags: External, Transaction "RTN","C0QUPDT",276,0) ; "RTN","C0QUPDT",277,0) ; If error, print it out "RTN","C0QUPDT",278,0) I $D(C0QERR) DO "RTN","C0QUPDT",279,0) . W "Error filing data",! "RTN","C0QUPDT",280,0) . N % S %=$NAME(C0QERR) F S %=$Q(@%) Q:%="" W %_": "_@%,! "RTN","C0QUPDT",281,0) ; "RTN","C0QUPDT",282,0) QUIT "SEC","^DD",1130580001.101,1130580001.101,3.1,9) "SEC","^DIC",1130580001.101,1130580001.101,0,"AUDIT") @ "SEC","^DIC",1130580001.101,1130580001.101,0,"DD") @ "SEC","^DIC",1130580001.101,1130580001.101,0,"DEL") @ "SEC","^DIC",1130580001.101,1130580001.101,0,"LAYGO") @ "SEC","^DIC",1130580001.101,1130580001.101,0,"RD") @ "SEC","^DIC",1130580001.101,1130580001.101,0,"WR") @ "VER") 8.0^22.0 "^DD",1130580001.101,1130580001.101,0) FIELD^^.3^19 "^DD",1130580001.101,1130580001.101,0,"DDA") N "^DD",1130580001.101,1130580001.101,0,"DT") 3120731 "^DD",1130580001.101,1130580001.101,0,"ID",.7) W:$D(^(5)) " ",$P(^(5),U,1) "^DD",1130580001.101,1130580001.101,0,"IX","B",1130580001.101,.01) "^DD",1130580001.101,1130580001.101,0,"NM","C0Q QUALITY MEASURE") "^DD",1130580001.101,1130580001.101,0,"PT",1130580001.2011,.01) "^DD",1130580001.101,1130580001.101,0,"VRPK") C0Q "^DD",1130580001.101,1130580001.101,.01,0) NAME^RF^^0;1^K:$L(X)>30!($L(X)<1)!'(X'?1P.E) X "^DD",1130580001.101,1130580001.101,.01,.1) MEASURE NAME "^DD",1130580001.101,1130580001.101,.01,1,0) ^.1 "^DD",1130580001.101,1130580001.101,.01,1,1,0) 1130580001.101^B "^DD",1130580001.101,1130580001.101,.01,1,1,1) S ^C0Q(101,"B",$E(X,1,30),DA)="" "^DD",1130580001.101,1130580001.101,.01,1,1,2) K ^C0Q(101,"B",$E(X,1,30),DA) "^DD",1130580001.101,1130580001.101,.01,3) Answer must be 1-30 characters in length "^DD",1130580001.101,1130580001.101,.01,"DT") 3101012 "^DD",1130580001.101,1130580001.101,.3,0) MU YEAR KEY^F^^7;6^K:$L(X)>30!($L(X)<1) X "^DD",1130580001.101,1130580001.101,.3,.1) MEANINGFUL USE YEAR KEY "^DD",1130580001.101,1130580001.101,.3,3) Answer must be 1-30 characters in length. "^DD",1130580001.101,1130580001.101,.3,"DT") 3111201 "^DD",1130580001.101,1130580001.101,.5,0) TITLE^F^^1;1^K:$L(X)>240!($L(X)<3) X "^DD",1130580001.101,1130580001.101,.5,.1) MEASURE TITLE "^DD",1130580001.101,1130580001.101,.5,3) Answer must be 3-240 characters in length "^DD",1130580001.101,1130580001.101,.5,"DT") 3110430 "^DD",1130580001.101,1130580001.101,.61,0) VERY LONG DESCRIPTION^1130580001.111^^6;0 "^DD",1130580001.101,1130580001.101,.7,0) DISPLAY NAME^F^^5;1^K:$L(X)>240!($L(X)<3) X "^DD",1130580001.101,1130580001.101,.7,.1) QRDA DISPLAY NAME "^DD",1130580001.101,1130580001.101,.7,3) Answer must be 3-240 characters in length "^DD",1130580001.101,1130580001.101,.7,"DT") 3101012 "^DD",1130580001.101,1130580001.101,.8,0) REPORTING NAME^F^^7;1^K:$L(X)>30!($L(X)<3) X "^DD",1130580001.101,1130580001.101,.8,.1) REPORTING MEASURE NAME "^DD",1130580001.101,1130580001.101,.8,3) Answer must be 3-30 characters in length "^DD",1130580001.101,1130580001.101,.8,"DT") 3110615 "^DD",1130580001.101,1130580001.101,1,0) NUMERATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;2^Q "^DD",1130580001.101,1130580001.101,1,.1) MEASURE NUMERATOR PATIENT LIST "^DD",1130580001.101,1130580001.101,1,"DT") 3101012 "^DD",1130580001.101,1130580001.101,1.1,0) ALTERNATIVE NUMERATOR LIST^P1130580001.301'^C0Q(301,^7;2^Q "^DD",1130580001.101,1130580001.101,1.1,"DT") 3110805 "^DD",1130580001.101,1130580001.101,1.2,0) NUMERATOR 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 "^DD",1130580001.101,1130580001.101,1.2,3) Enter the reminder rule set to use for this measure. "^DD",1130580001.101,1130580001.101,1.2,12) If the type of the reminder list rule is a Rule Set. "^DD",1130580001.101,1130580001.101,1.2,12.1) S DIC("S")="I $P(^(0),U,3)=3" "^DD",1130580001.101,1130580001.101,1.2,21,0) ^^5^5^3120716^ "^DD",1130580001.101,1130580001.101,1.2,21,1,0) This is the numerator reminder rule set to use for the quality measure. "^DD",1130580001.101,1130580001.101,1.2,21,2,0) "^DD",1130580001.101,1130580001.101,1.2,21,3,0) The rule set is used to generate a patient list, which this package "^DD",1130580001.101,1130580001.101,1.2,21,4,0) referneces. The contents of the patient list will produce the count for "^DD",1130580001.101,1130580001.101,1.2,21,5,0) the measure. This count is for the numerator. "^DD",1130580001.101,1130580001.101,1.2,"DT") 3120716 "^DD",1130580001.101,1130580001.101,1.5,0) NEGATIVE NUMERATOR LIST^P810.5'^PXRMXP(810.5,^7;4^Q "^DD",1130580001.101,1130580001.101,1.5,.1) LIST OF PATIENTS THAT DO NOT MEET THE REQUIREMENTS "^DD",1130580001.101,1130580001.101,1.5,"DT") 3110809 "^DD",1130580001.101,1130580001.101,1.51,0) ALTERNATE NEGATIVE NUM LIST^P1130580001.301'^C0Q(301,^7;5^Q "^DD",1130580001.101,1130580001.101,1.51,.1) NEGATIVE NUMERATOR LIST IN C0Q PATIENT LIST FILE "^DD",1130580001.101,1130580001.101,1.51,"DT") 3110809 "^DD",1130580001.101,1130580001.101,2,0) DENOMINATOR PATIENT LIST^P810.5'^PXRMXP(810.5,^0;3^Q "^DD",1130580001.101,1130580001.101,2,.1) MEASURE DENOMINATOR PATIENT LIST "^DD",1130580001.101,1130580001.101,2,"DT") 3101012 "^DD",1130580001.101,1130580001.101,2.1,0) ALTERNATIVE DENOMINATOR LIST^P1130580001.301'^C0Q(301,^7;3^Q "^DD",1130580001.101,1130580001.101,2.1,"DT") 3110805 "^DD",1130580001.101,1130580001.101,2.2,0) DENOMINATOR 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 "^DD",1130580001.101,1130580001.101,2.2,3) Enter the reminder rule set to use for this measure. "^DD",1130580001.101,1130580001.101,2.2,12) If the type of the reminder list rule is a Rule Set. "^DD",1130580001.101,1130580001.101,2.2,12.1) S DIC("S")="I $P(^(0),U,3)=3" "^DD",1130580001.101,1130580001.101,2.2,21,0) ^^5^5^3120716^ "^DD",1130580001.101,1130580001.101,2.2,21,1,0) This is the denominator reminder rule set to use for the quality measure. "^DD",1130580001.101,1130580001.101,2.2,21,2,0) "^DD",1130580001.101,1130580001.101,2.2,21,3,0) The rule set is used to generate a patient list, which this package "^DD",1130580001.101,1130580001.101,2.2,21,4,0) referneces. The contents of the patient list will produce the count for "^DD",1130580001.101,1130580001.101,2.2,21,5,0) the measure. This count is for the denominator. "^DD",1130580001.101,1130580001.101,2.2,"DT") 3120716 "^DD",1130580001.101,1130580001.101,2.5,0) EXTRACT DEFINITION^P810.2'^PXRM(810.2,^7;9^Q "^DD",1130580001.101,1130580001.101,2.5,3) Select a Reminder Extract Definition for this measure "^DD",1130580001.101,1130580001.101,2.5,21,0) ^^4^4^3120726^ "^DD",1130580001.101,1130580001.101,2.5,21,1,0) If this measure depends upon a reminder extract definition, you can add "^DD",1130580001.101,1130580001.101,2.5,21,2,0) this extract definition here. This will alter how the Quality Measures "^DD",1130580001.101,1130580001.101,2.5,21,3,0) package computes the measure to use the extract in addition and prior to "^DD",1130580001.101,1130580001.101,2.5,21,4,0) the rule sets. "^DD",1130580001.101,1130580001.101,2.5,"DT") 3120726 "^DD",1130580001.101,1130580001.101,3,0) QRDA TEMPLATE ROOT^F^^0;4^K:$L(X)>120!($L(X)<3) X "^DD",1130580001.101,1130580001.101,3,.1) "^DD",1130580001.101,1130580001.101,3,3) Answer must be 3-120 characters in length "^DD",1130580001.101,1130580001.101,3,21,0) ^^2^2^3120731^^ "^DD",1130580001.101,1130580001.101,3,21,1,0) Measure template root for the QRDA Document. A series of . delimited "^DD",1130580001.101,1130580001.101,3,21,2,0) numbers. E.g. 2.16.840.1.113883.3.249.11.14.1.1.1 "^DD",1130580001.101,1130580001.101,3,"DT") 3120731 "^DD",1130580001.101,1130580001.101,3.1,0) QRDA MEASURE SYSTEM OID^CJ^^ ; ^S X="2.16.840.1.113883.3.249.12" "^DD",1130580001.101,1130580001.101,3.1,.1) QRDA SYSTEM OID (FIXED) "^DD",1130580001.101,1130580001.101,3.1,9.01) "^DD",1130580001.101,1130580001.101,3.1,9.1) S X="2.16.840.1.113883.3.249.12" "^DD",1130580001.101,1130580001.101,3.1,"DT") 3101012 "^DD",1130580001.101,1130580001.101,3.2,0) QRDA CODE^F^^4;1^K:$L(X)>80!($L(X)<1) X "^DD",1130580001.101,1130580001.101,3.2,.1) QRDA MEASURE CODE "^DD",1130580001.101,1130580001.101,3.2,3) Answer must be 1-80 characters in length "^DD",1130580001.101,1130580001.101,3.2,"DT") 3101012 "^DD",1130580001.101,1130580001.101,4,0) MEASURE TYPE^S^P:Performance;Q:Quality;E:Electronic Prescribing Performance;^0;5^Q "^DD",1130580001.101,1130580001.101,4,3) Enter a code P, Q or E "^DD",1130580001.101,1130580001.101,4,21,0) ^^19^19^3120530^ "^DD",1130580001.101,1130580001.101,4,21,1,0) This field designates the measure type. It can be P, Q or M. "^DD",1130580001.101,1130580001.101,4,21,2,0) "^DD",1130580001.101,1130580001.101,4,21,3,0) P is for Performance. Performance measures are MU measures to measure "^DD",1130580001.101,1130580001.101,4,21,4,0) how meaningfully used an EMR is. An example of a performance measure "^DD",1130580001.101,1130580001.101,4,21,5,0) is whether allergies are documented in the EMR. Performance measures "^DD",1130580001.101,1130580001.101,4,21,6,0) reference a Patient List created by this package. "^DD",1130580001.101,1130580001.101,4,21,7,0) "^DD",1130580001.101,1130580001.101,4,21,8,0) Q is for Quality Measures. Quality measures are MU measures to assess how "^DD",1130580001.101,1130580001.101,4,21,9,0) well the patients are cared for. An example of a quality measure is "^DD",1130580001.101,1130580001.101,4,21,10,0) whether Hemoglobin A1c Poor Control. Quality measures reference Patient "^DD",1130580001.101,1130580001.101,4,21,11,0) Lists in the Reminders package. "^DD",1130580001.101,1130580001.101,4,21,12,0) "^DD",1130580001.101,1130580001.101,4,21,13,0) E is for Electronic Prescribing. This is a Performance measure, except "^DD",1130580001.101,1130580001.101,4,21,14,0) that it is handled differently than the rest. Instead of the numerators "^DD",1130580001.101,1130580001.101,4,21,15,0) and denominators being lists of patients as with all the other "^DD",1130580001.101,1130580001.101,4,21,16,0) measurements, they are a number of prescriptions. That's why we have a "^DD",1130580001.101,1130580001.101,4,21,17,0) special flag for it. It references a Patient List created by this "^DD",1130580001.101,1130580001.101,4,21,18,0) package. The numerator and denominators are stored in subfiles for each "^DD",1130580001.101,1130580001.101,4,21,19,0) patient. "^DD",1130580001.101,1130580001.101,4,23,0) ^^4^4^3120530^ "^DD",1130580001.101,1130580001.101,4,23,1,0) As of version C0P*1.0*1, the software doesn't use this field except to "^DD",1130580001.101,1130580001.101,4,23,2,0) check for an electronic prescribing type (code E). "^DD",1130580001.101,1130580001.101,4,23,3,0) "^DD",1130580001.101,1130580001.101,4,23,4,0) I anticipate using this field for other purposes in the future. "^DD",1130580001.101,1130580001.101,4,"DT") 3120530 "^DD",1130580001.101,1130580001.111,0) VERY LONG DESCRIPTION SUB-FIELD^^.01^1 "^DD",1130580001.101,1130580001.111,0,"DT") 3101013 "^DD",1130580001.101,1130580001.111,0,"NM","VERY LONG DESCRIPTION") "^DD",1130580001.101,1130580001.111,0,"UP") 1130580001.101 "^DD",1130580001.101,1130580001.111,.01,0) VERY LONG DESCRIPTION^Wx^^0;1 "^DD",1130580001.101,1130580001.111,.01,.1) LONGER DESCRIPTION - IF IT DOESN'T FIT IN .6 "^DD",1130580001.101,1130580001.111,.01,3) LONGER DESCRIPTION - INSTEAD OF LONG DESCRIPTION "^DD",1130580001.101,1130580001.111,.01,"DT") 3101013 "^DD",1130580001.401,1130580001.401,2,0) EP MU MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;6^Q "^DD",1130580001.401,1130580001.401,2,.1) OUTPATIENT MEANINGFUL USE MEASUREMENT SET "^DD",1130580001.401,1130580001.401,2,1,0) ^.1 "^DD",1130580001.401,1130580001.401,2,1,1,0) 1130580001.401^AMMS "^DD",1130580001.401,1130580001.401,2,1,1,1) S ^C0Q(401,"AMMS",$E(X,1,30),DA)="" "^DD",1130580001.401,1130580001.401,2,1,1,2) K ^C0Q(401,"AMMS",$E(X,1,30),DA) "^DD",1130580001.401,1130580001.401,2,1,1,3) USED BY THE CODE. SEE DESCRIPTION. "^DD",1130580001.401,1130580001.401,2,1,1,"%D",0) ^.101^5^5^3120530^^^ "^DD",1130580001.401,1130580001.401,2,1,1,"%D",1,0) Indexes the IEN of the Measurement Set. Used so that we can walk back to "^DD",1130580001.401,1130580001.401,2,1,1,"%D",2,0) a parameter when processing a specific IEN. "^DD",1130580001.401,1130580001.401,2,1,1,"%D",3,0) "^DD",1130580001.401,1130580001.401,2,1,1,"%D",4,0) You can get the IEN of the measurement set using "^DD",1130580001.401,1130580001.401,2,1,1,"%D",5,0) $O(^C0Q(401,"AMMS",MSIEN,"")). "^DD",1130580001.401,1130580001.401,2,1,1,"DT") 3120530 "^DD",1130580001.401,1130580001.401,2,"DT") 3120103 "^DD",1130580001.401,1130580001.401,2.1,0) EP QUALITY MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;7^Q "^DD",1130580001.401,1130580001.401,2.1,.1) OUTPATIENT QUALITY MEASUREMENT SET "^DD",1130580001.401,1130580001.401,2.1,1,0) ^.1 "^DD",1130580001.401,1130580001.401,2.1,1,1,0) 1130580001.401^AQMS "^DD",1130580001.401,1130580001.401,2.1,1,1,1) S ^C0Q(401,"AQMS",$E(X,1,30),DA)="" "^DD",1130580001.401,1130580001.401,2.1,1,1,2) K ^C0Q(401,"AQMS",$E(X,1,30),DA) "^DD",1130580001.401,1130580001.401,2.1,1,1,3) USED BY THE CODE. SEE DESCRIPTION. "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",0) ^^5^5^3120530^ "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",1,0) Indexes the IEN of the Measurement Set. Used so that we can walk back to "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",2,0) a parameter when processing a specific IEN. "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",3,0) "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",4,0) You can get the IEN of the measurement set using "^DD",1130580001.401,1130580001.401,2.1,1,1,"%D",5,0) $O(^C0Q(401,"AQMS",MSIEN,"")). "^DD",1130580001.401,1130580001.401,2.1,1,1,"DT") 3120530 "^DD",1130580001.401,1130580001.401,2.1,"DT") 3120103 "^DIC",1130580001.101,1130580001.101,0) C0Q QUALITY MEASURE^1130580001.101 "^DIC",1130580001.101,1130580001.101,0,"GL") ^C0Q(101, "^DIC",1130580001.101,"B","C0Q QUALITY MEASURE",1130580001.101) **END** **END**