KIDS Distribution saved on May 21, 2012@20:02:18 C0Q 1.0 **KIDS**:C0Q 1.0^ **INSTALL NAME** C0Q 1.0 "BLD",7927,0) C0Q 1.0^QUALITY MEASURES^0^3120521^n "BLD",7927,1,0) ^^9^9^3120521^^ "BLD",7927,1,1,0) The C0Q Quality Reporting Package is a mumps-based addition to VistA for "BLD",7927,1,2,0) reporting Meaningful Use and Quality Measurements. The package supports "BLD",7927,1,3,0) both inpatient and outpatient reporting, and computes the Meaningful Use "BLD",7927,1,4,0) measures from patient records. For Quality Measurements, the reporting "BLD",7927,1,5,0) package relies on the VistA Reminders Patient Lists as the source for its "BLD",7927,1,6,0) reporting. "BLD",7927,1,7,0) "BLD",7927,1,8,0) Installation and Use instructions can be found here: "BLD",7927,1,9,0) http://vistapedia.net/index.php?title=C0Q_Quality_Reporting_1.0 "BLD",7927,4,0) ^9.64PA^1130580001.401^5 "BLD",7927,4,178.301,0) 178.301 "BLD",7927,4,178.301,222) y^y^f^^n^^y^o^n "BLD",7927,4,1130580001.101,0) 1130580001.101 "BLD",7927,4,1130580001.101,222) y^y^f^^n^^y^o^n "BLD",7927,4,1130580001.101,224) "BLD",7927,4,1130580001.201,0) 1130580001.201 "BLD",7927,4,1130580001.201,222) y^y^f^^^^n^^ "BLD",7927,4,1130580001.201,224) "BLD",7927,4,1130580001.301,0) 1130580001.301 "BLD",7927,4,1130580001.301,222) y^y^f^^^^n^^ "BLD",7927,4,1130580001.301,224) "BLD",7927,4,1130580001.401,0) 1130580001.401 "BLD",7927,4,1130580001.401,222) y^y^f^^^^n "BLD",7927,4,"B",178.301,178.301) "BLD",7927,4,"B",1130580001.101,1130580001.101) "BLD",7927,4,"B",1130580001.201,1130580001.201) "BLD",7927,4,"B",1130580001.301,1130580001.301) "BLD",7927,4,"B",1130580001.401,1130580001.401) "BLD",7927,6.3) 31 "BLD",7927,"ABPKG") n "BLD",7927,"INIT") POST^C0QKIDS "BLD",7927,"KRN",0) ^9.67PA^779.2^20 "BLD",7927,"KRN",.4,0) .4 "BLD",7927,"KRN",.4,"NM",0) ^9.68A^6^6 "BLD",7927,"KRN",.4,"NM",1,0) C0Q PRINT BY PATIENT FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.4,"NM",2,0) C0Q PRINT MEASUREMENT SET FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.4,"NM",3,0) C0Q PRINT QUALITY MEASURES FILE #1130580001.101^1130580001.101^0 "BLD",7927,"KRN",.4,"NM",4,0) C0Q EP SETUP FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.4,"NM",5,0) C0Q HOS MEASURES FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.4,"NM",6,0) C0Q MEASUREMENT REPORT FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.4,"NM","B","C0Q EP SETUP FILE #1130580001.201",4) "BLD",7927,"KRN",.4,"NM","B","C0Q HOS MEASURES FILE #1130580001.201",5) "BLD",7927,"KRN",.4,"NM","B","C0Q MEASUREMENT REPORT FILE #1130580001.201",6) "BLD",7927,"KRN",.4,"NM","B","C0Q PRINT BY PATIENT FILE #1130580001.201",1) "BLD",7927,"KRN",.4,"NM","B","C0Q PRINT MEASUREMENT SET FILE #1130580001.201",2) "BLD",7927,"KRN",.4,"NM","B","C0Q PRINT QUALITY MEASURES FILE #1130580001.101",3) "BLD",7927,"KRN",.401,0) .401 "BLD",7927,"KRN",.402,0) .402 "BLD",7927,"KRN",.402,"NM",0) ^9.68A^8^7 "BLD",7927,"KRN",.402,"NM",1,0) C0Q MEASUREMENT SET DEFINE FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.402,"NM",3,0) C0Q EDIT INPATIENT PARMS FILE #1130580001.401^1130580001.401^0 "BLD",7927,"KRN",.402,"NM",4,0) C0Q EDIT MEASURE SET FILE #1130580001.201^1130580001.201^0 "BLD",7927,"KRN",.402,"NM",5,0) C0Q EDIT MU MEASURE FILE #1130580001.101^1130580001.101^0 "BLD",7927,"KRN",.402,"NM",6,0) C0Q EDIT OUPATIENT PARMS FILE #1130580001.401^1130580001.401^0 "BLD",7927,"KRN",.402,"NM",7,0) C0Q EDIT QUALITY MEASURE FILE #1130580001.101^1130580001.101^0 "BLD",7927,"KRN",.402,"NM",8,0) C0Q EDIT SUPERUSERS FILE #1130580001.401^1130580001.401^0 "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT INPATIENT PARMS FILE #1130580001.401",3) "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT MEASURE SET FILE #1130580001.201",4) "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT MU MEASURE FILE #1130580001.101",5) "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT OUPATIENT PARMS FILE #1130580001.401",6) "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT QUALITY MEASURE FILE #1130580001.101",7) "BLD",7927,"KRN",.402,"NM","B","C0Q EDIT SUPERUSERS FILE #1130580001.401",8) "BLD",7927,"KRN",.402,"NM","B","C0Q MEASUREMENT SET DEFINE FILE #1130580001.201",1) "BLD",7927,"KRN",.403,0) .403 "BLD",7927,"KRN",.5,0) .5 "BLD",7927,"KRN",.84,0) .84 "BLD",7927,"KRN",3.6,0) 3.6 "BLD",7927,"KRN",3.8,0) 3.8 "BLD",7927,"KRN",9.2,0) 9.2 "BLD",7927,"KRN",9.8,0) 9.8 "BLD",7927,"KRN",9.8,"NM",0) ^9.68A^17^15 "BLD",7927,"KRN",9.8,"NM",1,0) C0QMAIN^^0^B116855264 "BLD",7927,"KRN",9.8,"NM",2,0) C0QGMRAD^^0^B18802718 "BLD",7927,"KRN",9.8,"NM",3,0) C0QGMTSA^^0^B2175692 "BLD",7927,"KRN",9.8,"NM",4,0) C0QGMTSG^^0^B29331917 "BLD",7927,"KRN",9.8,"NM",5,0) C0QERTIM^^0^B7596326 "BLD",7927,"KRN",9.8,"NM",6,0) C0QIMMUN^^0^B6463760 "BLD",7927,"KRN",9.8,"NM",7,0) C0QPQRI^^0^B41579607 "BLD",7927,"KRN",9.8,"NM",8,0) C0QPRML^^0^B451973864 "BLD",7927,"KRN",9.8,"NM",9,0) C0QSET^^0^B8586809 "BLD",7927,"KRN",9.8,"NM",10,0) C0QUPDT^^0^B50831833 "BLD",7927,"KRN",9.8,"NM",11,0) C0QHF^^0^B4977233 "BLD",7927,"KRN",9.8,"NM",13,0) C0QUTIL^^0^B4564493 "BLD",7927,"KRN",9.8,"NM",14,0) C0QINIT^^0^B5128171 "BLD",7927,"KRN",9.8,"NM",15,0) C0QNOTES^^0^B16851075 "BLD",7927,"KRN",9.8,"NM",17,0) C0QMU12^^0^B931116171 "BLD",7927,"KRN",9.8,"NM","B","C0QERTIM",5) "BLD",7927,"KRN",9.8,"NM","B","C0QGMRAD",2) "BLD",7927,"KRN",9.8,"NM","B","C0QGMTSA",3) "BLD",7927,"KRN",9.8,"NM","B","C0QGMTSG",4) "BLD",7927,"KRN",9.8,"NM","B","C0QHF",11) "BLD",7927,"KRN",9.8,"NM","B","C0QIMMUN",6) "BLD",7927,"KRN",9.8,"NM","B","C0QINIT",14) "BLD",7927,"KRN",9.8,"NM","B","C0QMAIN",1) "BLD",7927,"KRN",9.8,"NM","B","C0QMU12",17) "BLD",7927,"KRN",9.8,"NM","B","C0QNOTES",15) "BLD",7927,"KRN",9.8,"NM","B","C0QPQRI",7) "BLD",7927,"KRN",9.8,"NM","B","C0QPRML",8) "BLD",7927,"KRN",9.8,"NM","B","C0QSET",9) "BLD",7927,"KRN",9.8,"NM","B","C0QUPDT",10) "BLD",7927,"KRN",9.8,"NM","B","C0QUTIL",13) "BLD",7927,"KRN",19,0) 19 "BLD",7927,"KRN",19,"NM",0) ^9.68A^29^24 "BLD",7927,"KRN",19,"NM",1,0) C0Q BY PATIENT NUMERATOR^^0 "BLD",7927,"KRN",19,"NM",2,0) C0Q DENOMINATOR PATIENT LIST^^0 "BLD",7927,"KRN",19,"NM",3,0) C0Q DISPLAY MEASURE SET^^0 "BLD",7927,"KRN",19,"NM",4,0) C0Q DISPLAY QUALITY MEASURES^^0 "BLD",7927,"KRN",19,"NM",5,0) C0Q EXPORT CCR BY MEASURE^^0 "BLD",7927,"KRN",19,"NM",6,0) C0Q EXPORT MEASURE SET^^0 "BLD",7927,"KRN",19,"NM",7,0) C0Q LIST MEASURE SET^^0 "BLD",7927,"KRN",19,"NM",10,0) C0Q QUALITY MEASUREMENT MENU^^0 "BLD",7927,"KRN",19,"NM",12,0) C0Q COPY PATIENT LISTS^^0 "BLD",7927,"KRN",19,"NM",13,0) C0Q PQRI MENU^^0 "BLD",7927,"KRN",19,"NM",14,0) C0Q PRINT MEASURES^^0 "BLD",7927,"KRN",19,"NM",15,0) C0Q UPDATE QUALITY MEASUREMENT^^0 "BLD",7927,"KRN",19,"NM",16,0) C0Q PRINT PQRI XML^^0 "BLD",7927,"KRN",19,"NM",19,0) C0Q ED1 COMPUTATION^^0 "BLD",7927,"KRN",19,"NM",20,0) C0Q ED2 COMPUTATION^^0 "BLD",7927,"KRN",19,"NM",21,0) C0Q EP UPDATE MU MEASURES^^0 "BLD",7927,"KRN",19,"NM",22,0) C0Q INP UPDATE MU MEASURES^^0 "BLD",7927,"KRN",19,"NM",23,0) C0Q SETUP QUALITY REPORTING^^0 "BLD",7927,"KRN",19,"NM",24,0) C0Q EDIT INP PARMS^^0 "BLD",7927,"KRN",19,"NM",25,0) C0Q EDIT MEASURE SET^^0 "BLD",7927,"KRN",19,"NM",26,0) C0Q EDIT MU MEASURE^^0 "BLD",7927,"KRN",19,"NM",27,0) C0Q EDIT OUTPATIENT PARMS^^0 "BLD",7927,"KRN",19,"NM",28,0) C0Q EDIT QUALITY MEASURE^^0 "BLD",7927,"KRN",19,"NM",29,0) C0Q EDIT SUPERUSERS^^0 "BLD",7927,"KRN",19,"NM","B","C0Q BY PATIENT NUMERATOR",1) "BLD",7927,"KRN",19,"NM","B","C0Q COPY PATIENT LISTS",12) "BLD",7927,"KRN",19,"NM","B","C0Q DENOMINATOR PATIENT LIST",2) "BLD",7927,"KRN",19,"NM","B","C0Q DISPLAY MEASURE SET",3) "BLD",7927,"KRN",19,"NM","B","C0Q DISPLAY QUALITY MEASURES",4) "BLD",7927,"KRN",19,"NM","B","C0Q ED1 COMPUTATION",19) "BLD",7927,"KRN",19,"NM","B","C0Q ED2 COMPUTATION",20) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT INP PARMS",24) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT MEASURE SET",25) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT MU MEASURE",26) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT OUTPATIENT PARMS",27) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT QUALITY MEASURE",28) "BLD",7927,"KRN",19,"NM","B","C0Q EDIT SUPERUSERS",29) "BLD",7927,"KRN",19,"NM","B","C0Q EP UPDATE MU MEASURES",21) "BLD",7927,"KRN",19,"NM","B","C0Q EXPORT CCR BY MEASURE",5) "BLD",7927,"KRN",19,"NM","B","C0Q EXPORT MEASURE SET",6) "BLD",7927,"KRN",19,"NM","B","C0Q INP UPDATE MU MEASURES",22) "BLD",7927,"KRN",19,"NM","B","C0Q LIST MEASURE SET",7) "BLD",7927,"KRN",19,"NM","B","C0Q PQRI MENU",13) "BLD",7927,"KRN",19,"NM","B","C0Q PRINT MEASURES",14) "BLD",7927,"KRN",19,"NM","B","C0Q PRINT PQRI XML",16) "BLD",7927,"KRN",19,"NM","B","C0Q QUALITY MEASUREMENT MENU",10) "BLD",7927,"KRN",19,"NM","B","C0Q SETUP QUALITY REPORTING",23) "BLD",7927,"KRN",19,"NM","B","C0Q UPDATE QUALITY MEASUREMENT",15) "BLD",7927,"KRN",19.1,0) 19.1 "BLD",7927,"KRN",101,0) 101 "BLD",7927,"KRN",409.61,0) 409.61 "BLD",7927,"KRN",771,0) 771 "BLD",7927,"KRN",779.2,0) 779.2 "BLD",7927,"KRN",870,0) 870 "BLD",7927,"KRN",8989.51,0) 8989.51 "BLD",7927,"KRN",8989.52,0) 8989.52 "BLD",7927,"KRN",8994,0) 8994 "BLD",7927,"KRN","B",.4,.4) "BLD",7927,"KRN","B",.401,.401) "BLD",7927,"KRN","B",.402,.402) "BLD",7927,"KRN","B",.403,.403) "BLD",7927,"KRN","B",.5,.5) "BLD",7927,"KRN","B",.84,.84) "BLD",7927,"KRN","B",3.6,3.6) "BLD",7927,"KRN","B",3.8,3.8) "BLD",7927,"KRN","B",9.2,9.2) "BLD",7927,"KRN","B",9.8,9.8) "BLD",7927,"KRN","B",19,19) "BLD",7927,"KRN","B",19.1,19.1) "BLD",7927,"KRN","B",101,101) "BLD",7927,"KRN","B",409.61,409.61) "BLD",7927,"KRN","B",771,771) "BLD",7927,"KRN","B",779.2,779.2) "BLD",7927,"KRN","B",870,870) "BLD",7927,"KRN","B",8989.51,8989.51) "BLD",7927,"KRN","B",8989.52,8989.52) "BLD",7927,"KRN","B",8994,8994) "BLD",7927,"PRET") TRAN^C0QKIDS "BLD",7927,"QDEF") ^^^^^^^^YES "BLD",7927,"QUES",0) ^9.62^^ "BLD",7927,"REQB",0) ^9.611^1^1 "BLD",7927,"REQB",1,0) C0C 1.2^2 "BLD",7927,"REQB","B","C0C 1.2",1) "DATA",178.301,1,0) TEST "DATA",178.301,1,9,0) ^178.3014^2^2 "DATA",178.301,1,9,1,0) //TEST/ONE "DATA",178.301,1,9,1,2) TESTONE "DATA",178.301,1,9,2,0) //TEST/TWO "DATA",178.301,1,9,2,1) DFN "DATA",178.301,1,9,2,2) TESTTWO "DATA",178.301,2,0) ICD9 "DATA",178.301,2,1) http://www.webservicemart.com/icd9code.asmx/ICD9Codes "DATA",178.301,2,2) http://www.webservicemart.com/icd9code.asmx?op=ICD9Codes "DATA",178.301,2,3,0) ^178.311^11^11^3100225^^^^ "DATA",178.301,2,3,1,0) "DATA",178.301,2,3,2,0) "DATA",178.301,2,3,5,0) "DATA",178.301,2,3,6,0) "DATA",178.301,2,3,7,0) string "DATA",178.301,2,3,8,0) string "DATA",178.301,2,3,9,0) "DATA",178.301,2,3,10,0) "DATA",178.301,2,3,11,0) "DATA",178.301,2,6) http://76.110.216.135/icd9code.asmx/ICD9Codes "DATA",178.301,2,8,0) ^178.3013^11^11^3100225^^ "DATA",178.301,2,8,1,0) "DATA",178.301,2,8,2,0) "DATA",178.301,2,8,6,0) "DATA",178.301,2,8,7,0) @@//soap:Envelope/soap:Body/ICD9Codes/Code@@ "DATA",178.301,2,8,8,0) @@//soap:Envelope/soap:Body/ICD9Codes/CodeLenght@@ "DATA",178.301,2,8,9,0) "DATA",178.301,2,8,10,0) "DATA",178.301,2,8,11,0) "DATA",178.301,2,9,0) ^178.3014^5^5 "DATA",178.301,2,9,1,0) //soap:Envelope "DATA",178.301,2,9,2,0) //soap:Envelope/soap:Body "DATA",178.301,2,9,3,0) //soap:Envelope/soap:Body/ICD9Codes "DATA",178.301,2,9,4,0) //soap:Envelope/soap:Body/ICD9Codes/Code "DATA",178.301,2,9,4,2) CODE "DATA",178.301,2,9,5,0) //soap:Envelope/soap:Body/ICD9Codes/CodeLenght "DATA",178.301,2,9,5,2) CODELN "DATA",178.301,2,10,0) ^^4^4^3100226^ "DATA",178.301,2,10,1,0) User-Agent: Mozilla/4.0 "DATA",178.301,2,10,2,0) SOAPAction: "http://webservicemart.com/ws/ICD9Codes" "DATA",178.301,2,10,3,0) Expect: 100-continue "DATA",178.301,2,10,4,0) Connection: Keep-Alive "DATA",178.301,3,0) ICD9RESULT "DATA",178.301,3,3,0) ^^31^31^3100227^ "DATA",178.301,3,3,1,0) "DATA",178.301,3,3,2,0) "DATA",178.301,3,3,3,0) "DATA",178.301,3,3,4,0) "DATA",178.301,3,3,5,0) "DATA",178.301,3,3,6,0) "DATA",178.301,3,3,7,0) "DATA",178.301,3,3,8,0) "DATA",178.301,3,3,9,0) "DATA",178.301,3,3,10,0) "DATA",178.301,3,3,11,0) "DATA",178.301,3,3,12,0) "DATA",178.301,3,3,13,0) "DATA",178.301,3,3,14,0) "DATA",178.301,3,3,15,0) "DATA",178.301,3,3,16,0) "DATA",178.301,3,3,17,0) "DATA",178.301,3,3,18,0) "DATA",178.301,3,3,19,0) "DATA",178.301,3,3,20,0) "DATA",178.301,3,3,21,0) "DATA",178.301,3,3,22,0) "DATA",178.301,3,3,23,0) "DATA",178.301,3,3,24,0) "DATA",178.301,3,3,25,0) "DATA",178.301,3,3,26,0) "DATA",178.301,3,3,27,0) "DATA",178.301,3,3,28,0) "DATA",178.301,3,3,29,0) "DATA",178.301,3,3,30,0) "DATA",178.301,3,3,31,0) "DATA",178.301,4,0) PQRIXML "DATA",178.301,4,3,0) ^^42^42^3110620^ "DATA",178.301,4,3,1,0) "DATA",178.301,4,3,2,0) "DATA",178.301,4,3,5,0) "DATA",178.301,4,3,6,0) 12-10-2010 "DATA",178.301,4,3,7,0) 14:27 "DATA",178.301,4,3,8,0) RegistryA "DATA",178.301,4,3,9,0) 1.0 "DATA",178.301,4,3,10,0) 1 "DATA",178.301,4,3,11,0) 9 "DATA",178.301,4,3,12,0) "DATA",178.301,4,3,13,0) "DATA",178.301,4,3,14,0) Model Registry "DATA",178.301,4,3,15,0) 125789123 "DATA",178.301,4,3,16,0) C "DATA",178.301,4,3,17,0) "DATA",178.301,4,3,18,0) "DATA",178.301,4,3,19,0) "DATA",178.301,4,3,20,0) 12011989 "DATA",178.301,4,3,21,0) 387682321 "DATA",178.301,4,3,22,0) Y "DATA",178.301,4,3,23,0) 06-13-2010 "DATA",178.301,4,3,24,0) 12-10-2010 "DATA",178.301,4,3,25,0) "DATA",178.301,4,3,26,0) 2 "DATA",178.301,4,3,27,0) 20 "DATA",178.301,4,3,28,0) 30 "DATA",178.301,4,3,29,0) 66.67 "DATA",178.301,4,3,30,0) "DATA",178.301,4,3,31,0) "DATA",178.301,4,3,32,0) 128 "DATA",178.301,4,3,33,0) 100 "DATA",178.301,4,3,34,0) 18 "DATA",178.301,4,3,35,0) 0 "DATA",178.301,4,3,36,0) 10 "DATA",178.301,4,3,37,0) 28.00 "DATA",178.301,4,3,38,0) 90.00 "DATA",178.301,4,3,39,0) "DATA",178.301,4,3,40,0) "DATA",178.301,4,3,41,0) "DATA",178.301,4,3,42,0) "DATA",178.301,4,8,0) ^^42^42^3110614^ "DATA",178.301,4,8,1,0) "DATA",178.301,4,8,2,0) "DATA",178.301,4,8,5,0) "DATA",178.301,4,8,6,0) @@//submission/file-audit-data/create-date@@ "DATA",178.301,4,8,7,0) @@//submission/file-audit-data/create-time@@ "DATA",178.301,4,8,8,0) @@//submission/file-audit-data/create-by@@ "DATA",178.301,4,8,9,0) @@//submission/file-audit-data/version@@ "DATA",178.301,4,8,10,0) @@//submission/file-audit-data/file-number@@ "DATA",178.301,4,8,11,0) @@//submission/file-audit-data/number-of-files@@ "DATA",178.301,4,8,12,0) "DATA",178.301,4,8,13,0) "DATA",178.301,4,8,14,0) @@//submission/registry/registry-name@@ "DATA",178.301,4,8,15,0) @@//submission/registry/registry-id@@ "DATA",178.301,4,8,16,0) @@//submission/registry/submission-method@@ "DATA",178.301,4,8,17,0) "DATA",178.301,4,8,18,0) "DATA",178.301,4,8,19,0) "DATA",178.301,4,8,20,0) @@//submission/measure-group/provider/npi@@ "DATA",178.301,4,8,21,0) @@//submission/measure-group/provider/tin@@ "DATA",178.301,4,8,22,0) @@//submission/measure-group/provider/waiver-signed@@ "DATA",178.301,4,8,23,0) @@//submission/measure-group/provider/encounter-from-date@@ "DATA",178.301,4,8,24,0) @@//submission/measure-group/provider/encounter-to-date@@ "DATA",178.301,4,8,25,0) "DATA",178.301,4,8,26,0) @@//submission/measure-group/provider/measure-group-stat/ffs-patient-count@@ "DATA",178.301,4,8,27,0) @@//submission/measure-group/provider/measure-group-stat/group-reporting-rate-numerator@@ "DATA",178.301,4,8,28,0) @@//submission/measure-group/provider/measure-group-stat/group-eligible-instances@@ "DATA",178.301,4,8,29,0) @@//submission/measure-group/provider/measure-group-stat/group-reporting-rate@@ "DATA",178.301,4,8,30,0) "DATA",178.301,4,8,31,0) "DATA",178.301,4,8,32,0) @@//submission/measure-group/provider/pqri-measure/pqri-measure-number@@ "DATA",178.301,4,8,33,0) @@//submission/measure-group/provider/pqri-measure/eligible-instances@@ "DATA",178.301,4,8,34,0) @@//submission/measure-group/provider/pqri-measure/meets-performance-instances@@ "DATA",178.301,4,8,35,0) @@//submission/measure-group/provider/pqri-measure/performance-exclusion-instances@@ "DATA",178.301,4,8,36,0) @@//submission/measure-group/provider/pqri-measure/performance-not-met-instances@@ "DATA",178.301,4,8,37,0) @@//submission/measure-group/provider/pqri-measure/reporting-rate@@ "DATA",178.301,4,8,38,0) @@//submission/measure-group/provider/pqri-measure/performance-rate@@ "DATA",178.301,4,8,39,0) "DATA",178.301,4,8,40,0) "DATA",178.301,4,8,41,0) "DATA",178.301,4,8,42,0) "DATA",178.301,4,9,0) ^178.3014^25^25 "DATA",178.301,4,9,1,0) //submission/file-audit-data/create-by "DATA",178.301,4,9,1,1) a "DATA",178.301,4,9,1,2) create-by "DATA",178.301,4,9,2,0) //submission/file-audit-data/create-date "DATA",178.301,4,9,2,2) create-date "DATA",178.301,4,9,3,0) //submission/file-audit-data/create-time "DATA",178.301,4,9,3,2) create-time "DATA",178.301,4,9,4,0) //submission/file-audit-data/file-number "DATA",178.301,4,9,4,2) file-number "DATA",178.301,4,9,5,0) //submission/file-audit-data/number-of-files "DATA",178.301,4,9,5,2) number-of-files "DATA",178.301,4,9,6,0) //submission/file-audit-data/version "DATA",178.301,4,9,6,2) version "DATA",178.301,4,9,7,0) //submission/measure-group/provider/encounter-from-date "DATA",178.301,4,9,7,2) encounter-from-date "DATA",178.301,4,9,8,0) //submission/measure-group/provider/encounter-to-date "DATA",178.301,4,9,8,2) encounter-to-date "DATA",178.301,4,9,9,0) //submission/measure-group/provider/measure-group-stat/ffs-patient-count "DATA",178.301,4,9,9,2) ffs-patient-count "DATA",178.301,4,9,10,0) //submission/measure-group/provider/measure-group-stat/group-eligible-instances "DATA",178.301,4,9,10,2) group-eligible-instances "DATA",178.301,4,9,11,0) //submission/measure-group/provider/measure-group-stat/group-reporting-rate "DATA",178.301,4,9,11,2) group-reporting-rate "DATA",178.301,4,9,12,0) //submission/measure-group/provider/measure-group-stat/group-reporting-rate-numerator "DATA",178.301,4,9,12,2) group-reporting-rate-numerator "DATA",178.301,4,9,13,0) //submission/measure-group/provider/npi "DATA",178.301,4,9,13,2) npi "DATA",178.301,4,9,14,0) //submission/measure-group/provider/pqri-measure/eligible-instances "DATA",178.301,4,9,14,2) eligible-instances "DATA",178.301,4,9,15,0) //submission/measure-group/provider/pqri-measure/meets-performance-instances "DATA",178.301,4,9,15,2) meets-performance-instances "DATA",178.301,4,9,16,0) //submission/measure-group/provider/pqri-measure/performance-exclusion-instances "DATA",178.301,4,9,16,2) performance-exclusion-instances "DATA",178.301,4,9,17,0) //submission/measure-group/provider/pqri-measure/performance-not-met-instances "DATA",178.301,4,9,17,2) performance-not-met-instances "DATA",178.301,4,9,18,0) //submission/measure-group/provider/pqri-measure/performance-rate "DATA",178.301,4,9,18,2) performance-rate "DATA",178.301,4,9,19,0) //submission/measure-group/provider/pqri-measure/pqri-measure-number "DATA",178.301,4,9,19,2) pqri-measure-number "DATA",178.301,4,9,20,0) //submission/measure-group/provider/pqri-measure/reporting-rate "DATA",178.301,4,9,20,2) reporting-rate "DATA",178.301,4,9,21,0) //submission/measure-group/provider/tin "DATA",178.301,4,9,21,2) tin "DATA",178.301,4,9,22,0) //submission/measure-group/provider/waiver-signed "DATA",178.301,4,9,22,2) waiver-signed "DATA",178.301,4,9,23,0) //submission/registry/registry-id "DATA",178.301,4,9,23,2) registry-id "DATA",178.301,4,9,24,0) //submission/registry/registry-name "DATA",178.301,4,9,24,2) registry-name "DATA",178.301,4,9,25,0) //submission/registry/submission-method "DATA",178.301,4,9,25,2) submission-method "DATA",178.301,5,0) PQRI ONE MEASURE "DATA",178.301,5,3,0) ^^12^12^3110620^ "DATA",178.301,5,3,1,0) "DATA",178.301,5,3,2,0) "DATA",178.301,5,3,3,0) "DATA",178.301,5,3,4,0) @@pqri-measure-number@@ "DATA",178.301,5,3,5,0) @@eligible-instances@@ "DATA",178.301,5,3,6,0) @@meets-performance-instances@@ "DATA",178.301,5,3,7,0) @@performance-exclusion-instances@@ "DATA",178.301,5,3,8,0) @@performance-not-met-instances@@ "DATA",178.301,5,3,9,0) @@reporting-rate@@ "DATA",178.301,5,3,10,0) @@performance-rate@@ "DATA",178.301,5,3,11,0) "DATA",178.301,5,3,12,0) "DATA",1130580001.101,1,0) M1^41^40^2.16.840.1.113883.3.249.11.2 "DATA",1130580001.101,1,1) CMS Measure #1: Diabetes Mellitus: Hemoglobin A1c Poor Control in Diabetes Mellitus "DATA",1130580001.101,1,4) PQRI-1 "DATA",1130580001.101,1,5) Hemoglobin A1c Poor Control in Diabetes Mellitus "DATA",1130580001.101,1,6,0) ^^2^2^3101013^ "DATA",1130580001.101,1,6,1,0) Percentage of patients 18 through 75 years with diabetes melli "DATA",1130580001.101,1,6,2,0) tus who had most recent hemoglobin A1C greater than 9.0% "DATA",1130580001.101,2,0) M5^47^46^2.16.840.1.113883.3.249.11.5 "DATA",1130580001.101,2,1) CMS Measure #5: Heart Failure: Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,2,4) PQRI-5 "DATA",1130580001.101,2,5) Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,2,6,0) ^^2^2^3101013^ "DATA",1130580001.101,2,6,1,0) Percentage of patients 18 years and older with a diagnosis of "DATA",1130580001.101,2,6,2,0) heart failure and LVSD who were prescribed an ACE inhbitor or ARB therapy "DATA",1130580001.101,3,0) M112^26^25^2.16.840.1.113883.3.249.11.9 "DATA",1130580001.101,3,1) Measure #112: Preventive Care and Screening: Screening Mammography "DATA",1130580001.101,3,4) PQRI-112 "DATA",1130580001.101,3,5) Screening Mammography "DATA",1130580001.101,3,6,0) ^1130580001.111^2^2^3101014^^ "DATA",1130580001.101,3,6,1,0) Percentage of womaen aged 40 through 69 years who had a mammog "DATA",1130580001.101,3,6,2,0) ram to screen for breast cancer within 24 months "DATA",1130580001.101,4,0) M124^33^33^2.16.840.1.113883.3.249.11.11 "DATA",1130580001.101,4,1) Measure #124: Health Information Technology (HIT): Adoption/Use of Electronic Health Records "DATA",1130580001.101,4,4) PQRI-124 "DATA",1130580001.101,4,5) Adoption/Use of Electronic Health Records (EHR) "DATA",1130580001.101,4,6,0) ^^3^3^3101013^ "DATA",1130580001.101,4,6,1,0) Documents whether provider has adopted and is using health inf "DATA",1130580001.101,4,6,2,0) ormation technology. To qualify, the provider must havea adopted and be "DATA",1130580001.101,4,6,3,0) using a certified/qualified electronic health record (EHR) "DATA",1130580001.101,5,0) M128^58^31^2.16.840.1.113883.3.249.11.54 "DATA",1130580001.101,5,1) Measure #128: Preventive Care and Screening: Body Mass Index (BMI) Screening and Follow-Up "DATA",1130580001.101,5,4) PQRI-128 "DATA",1130580001.101,5,5) Body Mass Index (BMI) Screening and Follow-Up "DATA",1130580001.101,5,6,0) ^1130580001.111^5^5^3101014^^ "DATA",1130580001.101,5,6,1,0) Percentage of patients aged 18 yesrs and older with a calculate BMI in "DATA",1130580001.101,5,6,2,0) the past 6 months or during the current visit documented in the medical "DATA",1130580001.101,5,6,3,0) record and if the most recent BMI is ourtide parameters, a follow-up plan "DATA",1130580001.101,5,6,4,0) is documented. Ages 65 and older BMI equal to or greater than 30 or less "DATA",1130580001.101,5,6,5,0) than 22 and ages 18-64, BMI greater than or equal to 25 or less than 18.5 "DATA",1130580001.101,6,0) M47^20^48^2.16.840.1.113883.3.249.11.52 "DATA",1130580001.101,6,1) Measure #47: Advance Care Plan "DATA",1130580001.101,6,4) PQRI-47 "DATA",1130580001.101,6,5) Advance Care Plan "DATA",1130580001.101,6,6,0) ^1130580001.111^5^5^3101014^^^ "DATA",1130580001.101,6,6,1,0) Percentage of patients age 65 and older who have an advanced care plan or "DATA",1130580001.101,6,6,2,0) surrogate decision maker documented in the medical record or documented "DATA",1130580001.101,6,6,3,0) in the medical record that an advance care plan was discussed but the "DATA",1130580001.101,6,6,4,0) patient did not wish or was not able to name a surrogate decision maker "DATA",1130580001.101,6,6,5,0) or provide an advance care plan. "DATA",1130580001.101,7,0) M48^24^23^2.16.840.1.113883.3.249.11.53 "DATA",1130580001.101,7,1) Measure #48: Urinary Incontinence: Assessment of Presence or Absence of Urinary Incontinence in Women Aged 65 Years and Older "DATA",1130580001.101,7,4) PQRI-48 "DATA",1130580001.101,7,5) Assessment of Presence or Absence of Urinary Incontinence in Women Aged 65 Years and Older "DATA",1130580001.101,7,6,0) ^^3^3^3101013^ "DATA",1130580001.101,7,6,1,0) Percentage of patients equal to or older than 65 years of age at the "DATA",1130580001.101,7,6,2,0) beginning of the measurement perion who were assesed for the presence or "DATA",1130580001.101,7,6,3,0) absence of urinary incontinence within 12 months "DATA",1130580001.101,8,0) M2^43^42^2.16.840.1.113883.3.249.11.3 "DATA",1130580001.101,8,1) Measure #2: Diabetes Mellitus: Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus "DATA",1130580001.101,8,4) PQRI-2 "DATA",1130580001.101,8,5) Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus "DATA",1130580001.101,8,6,0) ^^2^2^3101013^ "DATA",1130580001.101,8,6,1,0) Percentage of patients 18 through 75 years with diabetes melli "DATA",1130580001.101,8,6,2,0) tus who had most recent LDL-C level in control (less than 100 mg./dL) "DATA",1130580001.101,9,0) M3^45^44^2.16.840.1.113883.3.249.11.4 "DATA",1130580001.101,9,1) CMS Measure #3: Diabetes Mellitus: High Blood Pressure Control in Diabetes Mellitus - QRDA Cat I template "DATA",1130580001.101,9,4) PQRI-3 "DATA",1130580001.101,9,5) High Blood Pressure Control in Diabetes Mellitus "DATA",1130580001.101,9,6,0) ^^2^2^3101013^ "DATA",1130580001.101,9,6,1,0) Percentage of patients 18 through 75 years with diabetes melli "DATA",1130580001.101,9,6,2,0) tus who had most recent blood pressure in control (less than 140/80 mmHg) "DATA",1130580001.101,10,0) M7^35^34^2.16.840.1.113883.3.249.11.6 "DATA",1130580001.101,10,1) CMS Measure #7: Coronary Artery Disease (CAD): Beta-Blocker Therapy for CAD Patients with Prior Myocardial Infarction (MI) "DATA",1130580001.101,10,4) PQRI-7 "DATA",1130580001.101,10,5) Percentage of patients 18 aged 18 years and older wit a diagnosis of CAD and prior MI who were prescribed beta-blocker therapy "DATA",1130580001.101,10,6,0) ^^3^3^3101013^ "DATA",1130580001.101,10,6,1,0) Percentage of patients aged 18 years and older with a diagnosis of "DATA",1130580001.101,10,6,2,0) coronary artery disease and a prior MI who where prescribed beta-blocker "DATA",1130580001.101,10,6,3,0) therapy "DATA",1130580001.101,11,0) M110^81^80^2.16.840.1.113883.3.249.11.7 "DATA",1130580001.101,11,1) Measure #110: Preventive Care and Screening: Influenza Immunization for Patients >= 50 Years "DATA",1130580001.101,11,4) PQRI-110 "DATA",1130580001.101,11,5) Influenza Immunization for Patients >= 50 Years "DATA",1130580001.101,11,6,0) ^1130580001.111^2^2^3101014^^ "DATA",1130580001.101,11,6,1,0) Percentage of patients aged 50 years and older who received an "DATA",1130580001.101,11,6,2,0) influenza immunization during the flu season (September through February) "DATA",1130580001.101,12,0) M111^71^68^2.16.840.1.113883.3.249.11.8 "DATA",1130580001.101,12,1) Measure #111: Preventive Care and Screening: Pneumonia Vaccination for Patients 65 Years and Older "DATA",1130580001.101,12,4) PQRI-111 "DATA",1130580001.101,12,5) Pneumonia Vaccination for Patients 65 Years and Older "DATA",1130580001.101,12,6,0) ^^2^2^3101013^ "DATA",1130580001.101,12,6,1,0) Percentage of patients afed 65 years and older who have ever r "DATA",1130580001.101,12,6,2,0) eceived a pneumoccal vaccine "DATA",1130580001.101,13,0) M113^67^66^2.16.840.1.113883.3.249.11.10 "DATA",1130580001.101,13,1) Measure #113: Preventive Care and Screening: Colorectal Cancer Screening "DATA",1130580001.101,13,4) PQRI-113 "DATA",1130580001.101,13,5) Colorectal Cancer Screening "DATA",1130580001.101,13,6,0) ^^2^2^3101013^ "DATA",1130580001.101,13,6,1,0) Percentage of patients aged 50 through 80 who received the app "DATA",1130580001.101,13,6,2,0) ropriate colorectal cancer screening "DATA",1130580001.101,14,0) M39^65^64^2.16.840.1.113883.3.249.11.51 "DATA",1130580001.101,14,1) Measure #39: Screening or Therapy for Osteoporosis for Women Aged 65 Years and Older "DATA",1130580001.101,14,4) PQRI-39 "DATA",1130580001.101,14,5) Screening or Therapy for Osteoporosis for Women Aged 65 Years and Older "DATA",1130580001.101,14,6,0) ^^3^3^3101013^ "DATA",1130580001.101,14,6,1,0) Percentage of patients who had a DXA measurement ordered or pe "DATA",1130580001.101,14,6,2,0) rformed at least once since age 60 or pharmacologic therapy prescribed "DATA",1130580001.101,14,6,3,0) within 12 months before the end of the measurement period "DATA",1130580001.101,16,0) M173^50^49^2.16.840.1.113883.3.249.11.55 "DATA",1130580001.101,16,1) Measure #173: Preventive Care and Screening: Unhealthy Alcohol Use - Screening "DATA",1130580001.101,16,4) PQRI-173 "DATA",1130580001.101,16,5) Preventive Care and Screening: Unhealthy Alcohol Use - Screening "DATA",1130580001.101,16,6,0) ^^2^2^3101013^ "DATA",1130580001.101,16,6,1,0) Percentage of patients aged 18 years and older who were screen "DATA",1130580001.101,16,6,2,0) ed for unhealthy alcohol use using a systematic method within 24 months "DATA",1130580001.101,17,0) M0013^52^77^2.16.840.1.113883.3.249.11.56 "DATA",1130580001.101,17,1) Measure #0013: Hypertension (HTN): Blood Pressure Measurement - QRDA Cat I template "DATA",1130580001.101,17,4) PQRI-13 "DATA",1130580001.101,17,5) Hypertension (HTN): Blood Pressure Measurement "DATA",1130580001.101,17,6,0) ^1130580001.111^3^3^3110412^^ "DATA",1130580001.101,17,6,1,0) Percentage of patients aged 18 years and older with a diagnosi "DATA",1130580001.101,17,6,2,0) s of hypertension in the beginning of the measurement period with a blood "DATA",1130580001.101,17,6,3,0) pressure recorded "DATA",1130580001.101,18,0) M0022^73^61^2.16.840.1.113883.3.249.11.57 "DATA",1130580001.101,18,1) Measure #0022: Drugs to be avoided in the Elderly "DATA",1130580001.101,18,4) PQRI-22 "DATA",1130580001.101,18,5) Drugs to be avoided in the elderly "DATA",1130580001.101,18,6,0) ^^2^2^3101013^ "DATA",1130580001.101,18,6,1,0) Percentage of patients aged 65 years and older who received at least one "DATA",1130580001.101,18,6,2,0) drug to be avoided in the elderly in the measurement period "DATA",1130580001.101,19,0) M0028^79^78^2.16.840.1.113883.3.249.11.59 "DATA",1130580001.101,19,1) Measure #0028: Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention "DATA",1130580001.101,19,4) PQRI-28 "DATA",1130580001.101,19,5) Preventive care and Screening: Tobacco Use: Screening and Cessation Intervention "DATA",1130580001.101,19,6,0) ^^4^4^3101013^ "DATA",1130580001.101,19,6,1,0) Percentage of patients aged 18 years of older who were screene "DATA",1130580001.101,19,6,2,0) d about tobacco use at least once during the two year measurement period "DATA",1130580001.101,19,6,3,0) AND who received smoking cessation counseling if identified as a tobacco "DATA",1130580001.101,19,6,4,0) user "DATA",1130580001.101,20,0) M0038^85^84^2.16.840.1.113883.3.249.11.60 "DATA",1130580001.101,20,1) Measure #0038: Childhood Immunization Status "DATA",1130580001.101,20,4) PQRI-38 "DATA",1130580001.101,20,5) Childhood immumnization status "DATA",1130580001.101,20,6,0) ^^4^4^3101013^ "DATA",1130580001.101,20,6,1,0) Percentage of children who turn two years of age during the me "DATA",1130580001.101,20,6,2,0) asurement period who have had 4 DTaP/DT, 3 IPV, 1 MMR and 3 H influenza "DATA",1130580001.101,20,6,3,0) type B, 3 hepatitis B, 1 chicken pox vaccine (VZV) and 4 pneumoccal "DATA",1130580001.101,20,6,4,0) conjugate vaccines by their second birthday "DATA",1130580001.101,21,0) M0024^72^70 "DATA",1130580001.101,22,0) TEST M0028A^107^106^2.16.840.1.113883.3.249.11.59 "DATA",1130580001.101,22,1) Measure #0028: Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention "DATA",1130580001.101,22,4) PQRI-28 "DATA",1130580001.101,22,5) Preventive care and Screening: Tobacco Use: Screening and Cessation Intervention "DATA",1130580001.101,22,6,0) ^1130580001.111^4^4^3110427^^^^ "DATA",1130580001.101,22,6,1,0) Percentage of patients aged 18 years of older who were screene "DATA",1130580001.101,22,6,2,0) d about tobacco use at least once during the two year measurement period "DATA",1130580001.101,22,6,3,0) AND who received smoking cessation counseling if identified as a tobacco "DATA",1130580001.101,22,6,4,0) user "DATA",1130580001.101,23,0) MU HOS NQF 0495^53^135 "DATA",1130580001.101,23,1) ED THROUGHPUT ARRIVAL TO DEPARTURE "DATA",1130580001.101,23,5) ED THROUGHPUT ARRIVAL TO DEPARTURE "DATA",1130580001.101,23,6,0) ^1130580001.111^3^3^3110430^^^^ "DATA",1130580001.101,23,6,1,0) Median time from emergency department arrival to time of departure from "DATA",1130580001.101,23,6,2,0) the emergency room for patients admitted to the facility from the "DATA",1130580001.101,23,6,3,0) emergency department "DATA",1130580001.101,23,7) NQF0495 "DATA",1130580001.101,24,0) MU HOS NQF 0497^54^94 "DATA",1130580001.101,24,1) ED THROUGHPUT ADMITTING DECISION TO DEPARTURE "DATA",1130580001.101,24,5) ED THROUGHPUT ADMITTING DECISION TO DEPARTURE "DATA",1130580001.101,24,6,0) ^^3^3^3110430^ "DATA",1130580001.101,24,6,1,0) Median time from admit decision time to time of departure from the "DATA",1130580001.101,24,6,2,0) emergency department of emergency department patients admitted to "DATA",1130580001.101,24,6,3,0) inpatient status "DATA",1130580001.101,24,7) NQF0497 "DATA",1130580001.101,25,0) MU HOS NQF 0435^55^56 "DATA",1130580001.101,25,1) Ischemic stroke.Discharge on anti-thrombotics "DATA",1130580001.101,25,5) Ischemic stroke.Discharge on anti-thrombotic "DATA",1130580001.101,25,6,0) ^^2^2^3110430^ "DATA",1130580001.101,25,6,1,0) Ischemic stroke patients prescribed antithrombotic therapy at hospital "DATA",1130580001.101,25,6,2,0) discharge "DATA",1130580001.101,25,7) NQF0435 "DATA",1130580001.101,26,0) MU HOS NQF 0436^57^58 "DATA",1130580001.101,26,1) Ischemic stroke.Anticoagulation for A-fib/flutter "DATA",1130580001.101,26,5) Ischemic stroke.Anticoagulation for A-fib/flutter "DATA",1130580001.101,26,6,0) ^1130580001.111^2^2^3110430^^^ "DATA",1130580001.101,26,6,1,0) Ischemic stroke patients with atrial fibrillation/flutter who are "DATA",1130580001.101,26,6,2,0) prescribed anticoagulation therapy at hospital discharge "DATA",1130580001.101,26,7) NQF0436 "DATA",1130580001.101,27,0) MU HOS NQF 0437^59^60 "DATA",1130580001.101,27,1) Ischemic stroke.Thrombolytic therapy for patients arriving within 2 hours of symptom onset "DATA",1130580001.101,27,5) Ischemic stroke.Thrombolytic therapy for patients arriving within 2 hours of symptom onset "DATA",1130580001.101,27,6,0) ^^3^3^3110430^ "DATA",1130580001.101,27,6,1,0) Acute ischemic stroke patients who arrive at this hospital within 2 "DATA",1130580001.101,27,6,2,0) hours of time last known well and for whom IV t-PA was initiated at this "DATA",1130580001.101,27,6,3,0) hospital within 3 hours of time last known well. "DATA",1130580001.101,27,7) NQF0437 "DATA",1130580001.101,28,0) MU HOS NQF 0438^61^62 "DATA",1130580001.101,28,1) Ischemic or hemorrhagic stroke.Antithrombotic therapy by day 2 "DATA",1130580001.101,28,5) Ischemic or hemorrhagic stroke.Antithrombotic therapy by day 2 "DATA",1130580001.101,28,6,0) ^^2^2^3110430^ "DATA",1130580001.101,28,6,1,0) Ischemic stroke patients administered antithrombotic therapy by the "DATA",1130580001.101,28,6,2,0) end of hospital day 2. "DATA",1130580001.101,28,7) NQF0438 "DATA",1130580001.101,29,0) MU HOS NQF 0439^63^64 "DATA",1130580001.101,29,1) Ischemic stroke.Discharge on statins "DATA",1130580001.101,29,5) Ischemic stroke.Discharge on statins "DATA",1130580001.101,29,6,0) ^^3^3^3110430^ "DATA",1130580001.101,29,6,1,0) Ischemic stroke patients with LDL > 100 mg/dL, or LDL not measured, or, "DATA",1130580001.101,29,6,2,0) who were on a lipid-lowering medication prior to hospital arrival are "DATA",1130580001.101,29,6,3,0) prescribed statin medication at hospital discharge "DATA",1130580001.101,29,7) NQF0439 "DATA",1130580001.101,30,0) MU HOS NQF 0440^65^66 "DATA",1130580001.101,30,1) Ischemic or hemorrhagic stroke.Stroke education "DATA",1130580001.101,30,5) Ischemic or hemorrhagic stroke.Stroke education "DATA",1130580001.101,30,6,0) ^^5^5^3110430^ "DATA",1130580001.101,30,6,1,0) Ischemic or hemorrhagic stroke patients or their caregivers who were "DATA",1130580001.101,30,6,2,0) given educational materials during the hospital stay addressing all of the "DATA",1130580001.101,30,6,3,0) following: activation of emergency medical system, need for follow-up "DATA",1130580001.101,30,6,4,0) after discharge, medications prescribed at discharge, risk factors for "DATA",1130580001.101,30,6,5,0) stroke, and warning signs and symptoms of stroke. "DATA",1130580001.101,30,7) NQF0440 "DATA",1130580001.101,31,0) MU HOS NQF 0441^67^68 "DATA",1130580001.101,31,1) Ischemic or hemorrhagic stroke.Rehabilitation assessment "DATA",1130580001.101,31,5) Ischemic or hemorrhagic stroke.Rehabilitation assessment "DATA",1130580001.101,31,6,0) ^^2^2^3110430^ "DATA",1130580001.101,31,6,1,0) Ischemic or hemorrhagic stroke patients who were assessed for "DATA",1130580001.101,31,6,2,0) rehabilitation services. "DATA",1130580001.101,31,7) NQF0441 "DATA",1130580001.101,32,0) MU HOS NQF 0371^44^43 "DATA",1130580001.101,32,1) VTE prophylaxis within 24 hours of arrival "DATA",1130580001.101,32,5) VTE prophylaxis within 24 hours of arrival "DATA",1130580001.101,32,6,0) ^^4^4^3110430^ "DATA",1130580001.101,32,6,1,0) This measure assesses the number of patients who received VTE prophylaxis "DATA",1130580001.101,32,6,2,0) or have documentation why no VTE prophylaxis was given the day of or the "DATA",1130580001.101,32,6,3,0) day after hospital admission or surgery end date for surgeries that start "DATA",1130580001.101,32,6,4,0) the day of or the day after hospital admission. "DATA",1130580001.101,32,7) NQF0371 "DATA",1130580001.101,33,0) MU HOS NQF 0372^69^45 "DATA",1130580001.101,33,1) ICU VTE prophylaxis "DATA",1130580001.101,33,5) ICU VTE prophylaxis "DATA",1130580001.101,33,6,0) ^^5^5^3110430^ "DATA",1130580001.101,33,6,1,0) This measure assesses the number of patients who received VTE prophylaxis "DATA",1130580001.101,33,6,2,0) or have documentation why no VTE prophylaxis was given the day of or the "DATA",1130580001.101,33,6,3,0) day after the initial admission (or transfer) to the Intensive Care Unit "DATA",1130580001.101,33,6,4,0) (ICU) or surgery end date for surgeries that start the day of or the day "DATA",1130580001.101,33,6,5,0) after ICU admission (or transfer). "DATA",1130580001.101,33,7) NQF0372 "DATA",1130580001.101,34,0) MU HOS NQF 0373^70^71 "DATA",1130580001.101,34,1) Anticoagulation overlap therapy "DATA",1130580001.101,34,5) Anticoagulation overlap therapy "DATA",1130580001.101,34,6,0) ^^8^8^3110430^ "DATA",1130580001.101,34,6,1,0) This measure assesses the number of patients diagnosed with confirmed VTE "DATA",1130580001.101,34,6,2,0) who received an overlap of parenteral (intravenous [IV] or subcutaneous "DATA",1130580001.101,34,6,3,0) [subcu]) anticoagulation and warfarin therapy. For patients who received "DATA",1130580001.101,34,6,4,0) less than five days of overlap therapy, they must be discharged on both "DATA",1130580001.101,34,6,5,0) medications. Overlap therapy must be administered for at least five days "DATA",1130580001.101,34,6,6,0) with an international normalized ratio (INR) . 2 prior to discontinuation "DATA",1130580001.101,34,6,7,0) of the parenteral anticoagulation therapy or the patient must be "DATA",1130580001.101,34,6,8,0) discharged on both medications. "DATA",1130580001.101,34,7) NQF0373 "DATA",1130580001.101,35,0) MU HOS NQF 0374^72^73 "DATA",1130580001.101,35,1) Platelet monitoring on unfractionated heparin "DATA",1130580001.101,35,5) Platelet monitoring on unfractionated heparin "DATA",1130580001.101,35,6,0) ^^10^10^3110430^ "DATA",1130580001.101,35,6,1,0) This measure assesses the number of patients diagnosed with confirmed VTE "DATA",1130580001.101,35,6,2,0) who received intravenous (IV) UFH therapy dosages AND had their platelet "DATA",1130580001.101,35,6,3,0) counts monitored using defined parameters such as a nomogram or "DATA",1130580001.101,35,6,4,0) protocol This measure assesses the number of patients diagnosed with "DATA",1130580001.101,35,6,5,0) confirmed VTE who received intravenous (IV) UFH therapy dosages AND had "DATA",1130580001.101,35,6,6,0) their platelet counts monitored using defined parameters such as a "DATA",1130580001.101,35,6,7,0) nomogram or protocol This measure assesses the number of patients "DATA",1130580001.101,35,6,8,0) diagnosed with confirmed VTE who received intravenous (IV) UFH therapy "DATA",1130580001.101,35,6,9,0) dosages AND had their platelet counts monitored using defined parameters "DATA",1130580001.101,35,6,10,0) such as a nomogram or protocol "DATA",1130580001.101,35,7) NQF0374 "DATA",1130580001.101,36,0) MU HOS NQF 0375^74^75 "DATA",1130580001.101,36,1) VTE discharge instructions "DATA",1130580001.101,36,5) VTE discharge instructions "DATA",1130580001.101,36,6,0) ^^11^11^3110430^ "DATA",1130580001.101,36,6,1,0) This measure assesses the number of patients diagnosed with confirmed VTE "DATA",1130580001.101,36,6,2,0) that are discharged to home, to home with home health, home hospice or "DATA",1130580001.101,36,6,3,0) discharged/transferred to court/law enforcement on warfarin with written "DATA",1130580001.101,36,6,4,0) discharge instructions that address all four criteria: compliance issues, "DATA",1130580001.101,36,6,5,0) dietary advice, follow-up This measure assesses the number of patients "DATA",1130580001.101,36,6,6,0) diagnosed with confirmed VTE that are discharged to home, to home with "DATA",1130580001.101,36,6,7,0) home health, home hospice or discharged/transferred to court/law "DATA",1130580001.101,36,6,8,0) enforcement on warfarin with written discharge instructions that address "DATA",1130580001.101,36,6,9,0) all four criteria: compliance issues, dietary advice, follow-up "DATA",1130580001.101,36,6,10,0) monitoring, and information about the potential for adverse drug "DATA",1130580001.101,36,6,11,0) reactions/interactions. "DATA",1130580001.101,36,7) NQF0375 "DATA",1130580001.101,37,0) MU HOS NQF 0376^76^77 "DATA",1130580001.101,37,1) Incidence of potentially preventable VTE "DATA",1130580001.101,37,5) Incidence of potentially preventable VTE "DATA",1130580001.101,37,6,0) ^^4^4^3110430^ "DATA",1130580001.101,37,6,1,0) This measure assesses the number of patients diagnosed with confirmed VTE "DATA",1130580001.101,37,6,2,0) during hospitalization (not present on arrival) who did not receive VTE "DATA",1130580001.101,37,6,3,0) prophylaxis between hospital admission and the day before the VTE "DATA",1130580001.101,37,6,4,0) diagnostic testing order date. "DATA",1130580001.101,37,7) NQF0376 "DATA",1130580001.101,39,0) MU EP NQF 0421^156^152 "DATA",1130580001.101,39,1) NQF0421 Adult Weight Screening and Follow-Up "DATA",1130580001.101,39,5) NQF0421 Adult Weight Screening and Follow-Up "DATA",1130580001.101,39,6,0) ^1130580001.111^6^6^3110628^^^^ "DATA",1130580001.101,39,6,1,0) Percentage of patients aged 18 "DATA",1130580001.101,39,6,2,0) years and older with a calculated BMI in the past "DATA",1130580001.101,39,6,3,0) six months or during the current visit documented in "DATA",1130580001.101,39,6,4,0) the medical record AND if the most recent BMI is "DATA",1130580001.101,39,6,5,0) outside parameters, a follow-up plan is "DATA",1130580001.101,39,6,6,0) documented. "DATA",1130580001.101,39,7) NQF0421 "DATA",1130580001.101,40,0) MU EP NQF 0013^99^40 "DATA",1130580001.101,40,1) NQF0013 Hypertension: Blood Pressure Measurement "DATA",1130580001.101,40,5) NQF0013 Hypertension: Blood Pressure Measurement "DATA",1130580001.101,40,6,0) ^1130580001.111^4^4^3110628^^ "DATA",1130580001.101,40,6,1,0) Percentage of patient visits for patients "DATA",1130580001.101,40,6,2,0) aged 18 years and older with a diagnosis of hypertension "DATA",1130580001.101,40,6,3,0) who have been seen for at least 2 office visits, with blood "DATA",1130580001.101,40,6,4,0) pressure (BP) recorded "DATA",1130580001.101,40,7) NQF0013 "DATA",1130580001.101,41,0) MU EP NQF 0028A^102^100 "DATA",1130580001.101,41,1) NQF0028A Preventive Care and Screening Measure Pair: a. Tobacco Use Assessment,b. Tobacco Cessation Intervention "DATA",1130580001.101,41,5) NQF0028A Tobacco Use Assessment "DATA",1130580001.101,41,6,0) ^1130580001.111^7^7^3110625^^^ "DATA",1130580001.101,41,6,1,0) Percentage of patients aged 18 years and "DATA",1130580001.101,41,6,2,0) older who have been seen for at least 2 office visits who "DATA",1130580001.101,41,6,3,0) were queried about tobacco use one or more times within "DATA",1130580001.101,41,6,4,0) 24 months b. Percentage of patients aged 18 years and "DATA",1130580001.101,41,6,5,0) older identified as tobacco users within the past 24 "DATA",1130580001.101,41,6,6,0) months and have been seen for at least 2 office visits, "DATA",1130580001.101,41,6,7,0) who received cessation intervention. "DATA",1130580001.101,41,7) NQF0028A "DATA",1130580001.101,42,0) MU EP NQF 0041^144^132 "DATA",1130580001.101,42,1) Preventive Care and Screening: Influenza Immunization for Patients >= 50 Years Old "DATA",1130580001.101,42,5) NQF0041 Influenza Immunization 50 years and older "DATA",1130580001.101,42,6,0) ^^4^4^3110430^ "DATA",1130580001.101,42,6,1,0) Percentage of patients aged 50 years "DATA",1130580001.101,42,6,2,0) and older who received an influenza immunization "DATA",1130580001.101,42,6,3,0) during the flu season (September through "DATA",1130580001.101,42,6,4,0) February). "DATA",1130580001.101,42,7) NQF0041 "DATA",1130580001.101,43,0) MU EP NQF 0024^42^41 "DATA",1130580001.101,43,1) NQF0024 Weight Assessment and Counseling for Children and Adolescents "DATA",1130580001.101,43,5) NQF0024 Weight Assessment and Counseling for Children and Adolescents "DATA",1130580001.101,43,6,0) ^^6^6^3110430^ "DATA",1130580001.101,43,6,1,0) Percentage of patients 2 -17 years of age "DATA",1130580001.101,43,6,2,0) who had an outpatient visit with a Primary Care Physician "DATA",1130580001.101,43,6,3,0) (PCP) or OB/GYN and who had evidence of BMI "DATA",1130580001.101,43,6,4,0) percentile documentation, counseling for nutrition and "DATA",1130580001.101,43,6,5,0) counseling for physical activity during the measurement "DATA",1130580001.101,43,6,6,0) year. "DATA",1130580001.101,43,7) NQF0024 "DATA",1130580001.101,44,0) MU EP NQF 0038 "DATA",1130580001.101,44,1) Childhood Immunization Status "DATA",1130580001.101,44,5) Childhood Immunization Status "DATA",1130580001.101,44,6,0) ^^14^14^3110430^ "DATA",1130580001.101,44,6,1,0) Percentage of children 2 years of age who "DATA",1130580001.101,44,6,2,0) had four diphtheria, tetanus and acellular pertussis "DATA",1130580001.101,44,6,3,0) (DTaP); three polio(IPV), one measles, ,mumps and "DATA",1130580001.101,44,6,4,0) rubella (MMR); two H influenza type B (HiB); three "DATA",1130580001.101,44,6,5,0) Percentage of children 2 years of age who "DATA",1130580001.101,44,6,6,0) had four diphtheria, tetanus and acellular pertussis "DATA",1130580001.101,44,6,7,0) (DTaP); three polio(IPV), one measles, ,mumps and "DATA",1130580001.101,44,6,8,0) rubella (MMR); two H influenza type B (HiB); three "DATA",1130580001.101,44,6,9,0) hepatitis B (Hep B); one chicken pox (VZV); four "DATA",1130580001.101,44,6,10,0) pneumococcal conjugate (PCV); two hepatitis A (Hep A); "DATA",1130580001.101,44,6,11,0) two or three rotavirus (RV); and two influenza (flu) "DATA",1130580001.101,44,6,12,0) vaccines by their second birthday. The measure "DATA",1130580001.101,44,6,13,0) calculates a rate for each vaccine and nine separate "DATA",1130580001.101,44,6,14,0) combination rates. "DATA",1130580001.101,44,7) NQF0038 "DATA",1130580001.101,45,0) MU EP NQF 0059^146^145 "DATA",1130580001.101,45,1) Diabetes: Hemoglobin A1c Poor Contro "DATA",1130580001.101,45,5) Diabetes: NQF0059 Hemoglobin A1c Poor Control "DATA",1130580001.101,45,6,0) ^^2^2^3110430^ "DATA",1130580001.101,45,6,1,0) Percentage of patients 18 - 75 years of age with diabetes (type 1 "DATA",1130580001.101,45,6,2,0) or type 2) who had hemoglobin A1c > 9.0%. "DATA",1130580001.101,45,7) NQF0059 "DATA",1130580001.101,46,0) MU EP NQF 0064^139^145 "DATA",1130580001.101,46,1) Diabetes: Low Density Lipoprotein (LDL) Management and Control "DATA",1130580001.101,46,5) NQF0064 Diabetes: Low Density Lipoprotein (LDL) Management and Control "DATA",1130580001.101,46,6,0) ^^3^3^3110430^ "DATA",1130580001.101,46,6,1,0) Percentage of patients 18-75 years of age with diabetes (type 1 "DATA",1130580001.101,46,6,2,0) or type 2) who had LDL-C < 100 mg/dL).Percentage of patients 18-75 years "DATA",1130580001.101,46,6,3,0) of age with diabetes (type 1 or type 2) who had LDL-C < 100 mg/dL). "DATA",1130580001.101,46,7) NQF0064 "DATA",1130580001.101,47,0) MU EP NQF 0061^147^145 "DATA",1130580001.101,47,1) Blood Pressure Management "DATA",1130580001.101,47,5) NQF0061 Diabetes: Blood Pressure Management "DATA",1130580001.101,47,6,0) ^^2^2^3110430^ "DATA",1130580001.101,47,6,1,0) Percentage of patients 18 - 75 years of age with "DATA",1130580001.101,47,6,2,0) diabetes (type 1 or type 2) who had blood pressure <140/90 mmHg. "DATA",1130580001.101,47,7) NQF0061 "DATA",1130580001.101,48,0) MU EP NQF 0081 "DATA",1130580001.101,48,1) Heart Failure (HF): Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,48,5) Heart Failure (HF): Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,48,6,0) ^^3^3^3110430^ "DATA",1130580001.101,48,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,48,6,2,0) diagnosis of heart failure and LVSD (LVEF < 40%) who were "DATA",1130580001.101,48,6,3,0) prescribed ACE inhibitor or ARB therapy "DATA",1130580001.101,48,7) NQF0081 "DATA",1130580001.101,49,0) MU EP NQF 0070 "DATA",1130580001.101,49,1) Pneumonia Vaccination Status for Older Adults "DATA",1130580001.101,49,5) Pneumonia Vaccination Status for Older Adults "DATA",1130580001.101,49,6,0) ^^2^2^3110430^ "DATA",1130580001.101,49,6,1,0) Percentage of patients 65 years of age and older who have ever "DATA",1130580001.101,49,6,2,0) received a pneumococcal vaccine. "DATA",1130580001.101,49,7) NQF0070 "DATA",1130580001.101,50,0) MU EP NQF 0031 "DATA",1130580001.101,50,1) Breast Cancer Screening "DATA",1130580001.101,50,5) Breast Cancer Screening "DATA",1130580001.101,50,6,0) ^^2^2^3110430^ "DATA",1130580001.101,50,6,1,0) Percentage of women 40-69 years of age who had a "DATA",1130580001.101,50,6,2,0) mammogram to screen for breast cancer "DATA",1130580001.101,50,7) NQF0031 "DATA",1130580001.101,51,0) MU EP NQF 0034 "DATA",1130580001.101,51,1) Colorectal Cancer Screening "DATA",1130580001.101,51,5) Colorectal Cancer Screening "DATA",1130580001.101,51,6,0) ^^2^2^3110430^ "DATA",1130580001.101,51,6,1,0) Percentage of adults 50-75 years of age who had appropriate screening for "DATA",1130580001.101,51,6,2,0) colorectal cancer. "DATA",1130580001.101,51,7) NQF0034 "DATA",1130580001.101,52,0) MU EP NQF 0067 "DATA",1130580001.101,52,1) Coronary Artery Disease (CAD): Oral Antiplatelet Therapy Prescribed for Patients with CAD "DATA",1130580001.101,52,5) Coronary Artery Disease (CAD): Oral Antiplatelet Therapy Prescribed for Patients with CAD "DATA",1130580001.101,52,6,0) ^^2^2^3110430^ "DATA",1130580001.101,52,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,52,6,2,0) diagnosis of CAD who were prescribed oral antiplatelet therapy. "DATA",1130580001.101,52,7) NQF0067 "DATA",1130580001.101,53,0) MU EP NQF 0083 "DATA",1130580001.101,53,1) Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,53,5) Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD) "DATA",1130580001.101,53,6,0) ^^3^3^3110430^ "DATA",1130580001.101,53,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,53,6,2,0) diagnosis of heart failure who also have LVSD (LVEF < 40%) and who were "DATA",1130580001.101,53,6,3,0) prescribed beta-blocker therapy "DATA",1130580001.101,53,7) NQF0083 "DATA",1130580001.101,54,0) MU EP NQF 0105 "DATA",1130580001.101,54,1) Anti-depressant medication management: (a) Effective Acute Phase Treatment,(b)Effective Continuation Phase Treatment "DATA",1130580001.101,54,5) Anti-depressant medication management: (a) Effective Acute Phase Treatment,(b)Effective Continuation Phase Treatment "DATA",1130580001.101,54,6,0) ^^4^4^3110430^ "DATA",1130580001.101,54,6,1,0) The percentage of patients 18 years of age and older "DATA",1130580001.101,54,6,2,0) who were diagnosed with a new episode of major depression, treated "DATA",1130580001.101,54,6,3,0) with antidepressant medication, and who remained on an "DATA",1130580001.101,54,6,4,0) antidepressant medication treatment. "DATA",1130580001.101,54,7) NQF0105 "DATA",1130580001.101,55,0) MU EP NQF 0086 "DATA",1130580001.101,55,1) Primary Open Angle Glaucoma (POAG): Optic Nerve Evaluation "DATA",1130580001.101,55,5) Primary Open Angle Glaucoma (POAG): Optic Nerve Evaluation "DATA",1130580001.101,55,6,0) ^^4^4^3110430^ "DATA",1130580001.101,55,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,55,6,2,0) diagnosis of POAG who have been seen for at least two office visits "DATA",1130580001.101,55,6,3,0) who have an optic nerve head evaluation during one or more office "DATA",1130580001.101,55,6,4,0) visits within 12 months. "DATA",1130580001.101,55,7) NQF0086 "DATA",1130580001.101,56,0) MU EP NQF 0088 "DATA",1130580001.101,56,1) Diabetic Retinopathy: Documentation of Presence or Absence of Macular Edema and Level of Severity of Retinopathy "DATA",1130580001.101,56,5) Diabetic Retinopathy: Documentation of Presence or Absence of Macular Edema and Level of Severity of Retinopathy "DATA",1130580001.101,56,6,0) ^^5^5^3110430^ "DATA",1130580001.101,56,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,56,6,2,0) diagnosis of diabetic retinopathy who had a dilated macular or fundus "DATA",1130580001.101,56,6,3,0) exam performed which included documentation of the level of severity "DATA",1130580001.101,56,6,4,0) of retinopathy and the presence or absence of macular edema during "DATA",1130580001.101,56,6,5,0) one or more office visits within 12 months. "DATA",1130580001.101,56,7) NQF0088 "DATA",1130580001.101,57,0) MU EP NQF 0089 "DATA",1130580001.101,57,1) Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes Care "DATA",1130580001.101,57,5) Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes Care "DATA",1130580001.101,57,6,0) ^^6^6^3110430^ "DATA",1130580001.101,57,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,57,6,2,0) diagnosis of diabetic retinopathy who had a dilated macular or fundus "DATA",1130580001.101,57,6,3,0) exam performed with documented communication to the physician who "DATA",1130580001.101,57,6,4,0) manages the ongoing care of the patient with diabetes mellitus "DATA",1130580001.101,57,6,5,0) regarding the findings of the macular or fundus exam at least once "DATA",1130580001.101,57,6,6,0) within 12 months. "DATA",1130580001.101,57,7) NQF0089 "DATA",1130580001.101,58,0) MU EP NQF 0047 "DATA",1130580001.101,58,1) Asthma Pharmacologic Therapy "DATA",1130580001.101,58,5) Asthma Pharmacologic Therapy "DATA",1130580001.101,58,6,0) ^1130580001.111^4^4^3110430^^ "DATA",1130580001.101,58,6,1,0) Percentage of patients aged 5 through 40 years with a "DATA",1130580001.101,58,6,2,0) diagnosis of mild, moderate, or severe persistent asthma who were "DATA",1130580001.101,58,6,3,0) prescribed either the preferred long-term control medication (inhaled "DATA",1130580001.101,58,6,4,0) corticosteroid) or an acceptable alternative treatment "DATA",1130580001.101,58,7) NQF0047 "DATA",1130580001.101,59,0) MU EP NQF 0001 "DATA",1130580001.101,59,1) Asthma Assessment "DATA",1130580001.101,59,5) Asthma Assessment "DATA",1130580001.101,59,6,0) ^^5^5^3110430^ "DATA",1130580001.101,59,6,1,0) Percentage of patients aged 5 through 40 years with a "DATA",1130580001.101,59,6,2,0) diagnosis of asthma and who have been seen for at least 2 office "DATA",1130580001.101,59,6,3,0) visits, who were evaluated during at least one office visit within 12 "DATA",1130580001.101,59,6,4,0) months for the frequency (numeric) of daytime and nocturnal asthma "DATA",1130580001.101,59,6,5,0) symptoms. "DATA",1130580001.101,59,7) NQF0001 "DATA",1130580001.101,60,0) MU EP NQF 0002 "DATA",1130580001.101,60,1) Oncology Breast Cancer: Hormonal Therapy for Stage IC-IIIC Estrogen Receptor/Progesterone Receptor (ER/PR) Positive Breat Cancer "DATA",1130580001.101,60,5) Oncology Breast Cancer: Hormonal Therapy for Stage IC-IIIC Estrogen Receptor/Progesterone Receptor (ER/PR) Positive Breast Cancer "DATA",1130580001.101,60,6,0) ^^4^4^3110430^ "DATA",1130580001.101,60,6,1,0) Percentage of female patients aged 18 years and older "DATA",1130580001.101,60,6,2,0) with Stage IC through IIIC, ER or PR positive breast cancer who were "DATA",1130580001.101,60,6,3,0) prescribed tamoxifen or aromatase inhibitor (AI) during the 12-month "DATA",1130580001.101,60,6,4,0) reporting period. "DATA",1130580001.101,60,7) NQF0002 "DATA",1130580001.101,61,0) MU EP NQF 0385 "DATA",1130580001.101,61,1) Oncology Colon Cancer: Chemotherapy for Stage III Colon Cancer Patients "DATA",1130580001.101,61,5) Oncology Colon Cancer: Chemotherapy for Stage III Colon Cancer Patients "DATA",1130580001.101,61,6,0) ^^4^4^3110430^ "DATA",1130580001.101,61,6,1,0) Percentage of patients aged 18 years and older with "DATA",1130580001.101,61,6,2,0) Stage IIIA through IIIC colon cancer who are referred for adjuvant "DATA",1130580001.101,61,6,3,0) chemotherapy, prescribed adjuvant chemotherapy, or have previously "DATA",1130580001.101,61,6,4,0) received adjuvant chemotherapy within the 12-month reporting period "DATA",1130580001.101,61,7) NQF0385 "DATA",1130580001.101,62,0) MU EP NQF 0389 "DATA",1130580001.101,62,1) Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer Patients "DATA",1130580001.101,62,5) Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer Patients "DATA",1130580001.101,62,6,0) ^^5^5^3110430^ "DATA",1130580001.101,62,6,1,0) Percentage of patients, regardless of age, with a diagnosis of "DATA",1130580001.101,62,6,2,0) prostate cancer at low risk of recurrence receiving interstitial prostate "DATA",1130580001.101,62,6,3,0) brachytherapy, OR external beam radiotherapy to the prostate, OR radical "DATA",1130580001.101,62,6,4,0) prostatectomy, OR cryotherapy who did not have a bone scan performed at "DATA",1130580001.101,62,6,5,0) any time since diagnosis of prostate cancer. "DATA",1130580001.101,62,7) NQF0389 "DATA",1130580001.101,63,0) MU EP NQF 0027 "DATA",1130580001.101,63,1) Smoking Smokers and Tobacco Users to Quit,b. Discussing Smoking and Tobacco use Cessation Medications, c. Discussing Smoking and Tobacco use Cessation Strategies and Tobacco Use Cessation, Medical assistance: a. Advising "DATA",1130580001.101,63,5) Smoking and Tobacco Use Cessation "DATA",1130580001.101,63,6,0) ^^5^5^3110430^ "DATA",1130580001.101,63,6,1,0) Percentage of patients 18 years of age and older who were "DATA",1130580001.101,63,6,2,0) current smokers or tobacco users, who were seen by a practitioner during "DATA",1130580001.101,63,6,3,0) the measurement year and who received advice to quit smoking or tobacco "DATA",1130580001.101,63,6,4,0) use or whose practitioner recommended or discussed smoking or tobacco use "DATA",1130580001.101,63,6,5,0) cessation medications, methods or strategies "DATA",1130580001.101,63,7) NQF0027 "DATA",1130580001.101,64,0) MU EP NQF 0055 "DATA",1130580001.101,64,1) Diabetes: Eye Exam "DATA",1130580001.101,64,5) Diabetes: Eye Exam "DATA",1130580001.101,64,6,0) ^^3^3^3110430^ "DATA",1130580001.101,64,6,1,0) Percentage of patients 18 -75 years of age with diabetes (type 1 "DATA",1130580001.101,64,6,2,0) or type 2) who had a retinal or dilated eye exam or a negative retinal "DATA",1130580001.101,64,6,3,0) exam (no evidence of retinopathy) by an eye care professional "DATA",1130580001.101,64,7) NQF0055 "DATA",1130580001.101,65,0) MU EP NQF 0062 "DATA",1130580001.101,65,1) Diabetes: Urine Screening "DATA",1130580001.101,65,5) Diabetes: Urine Screening "DATA",1130580001.101,65,6,0) ^^3^3^3110430^ "DATA",1130580001.101,65,6,1,0) Percentage of patients 18 - 75 years of age with diabetes (type 1 "DATA",1130580001.101,65,6,2,0) or type 2) who had a nephropathy screening test or evidence of "DATA",1130580001.101,65,6,3,0) nephropathy. "DATA",1130580001.101,65,7) NQF0062 "DATA",1130580001.101,66,0) MU EP NQF 0056 "DATA",1130580001.101,66,1) Diabetes: Foot Exam "DATA",1130580001.101,66,5) Diabetes: Foot Exam "DATA",1130580001.101,66,6,0) ^^3^3^3110430^ "DATA",1130580001.101,66,6,1,0) The percentage of patients aged 18 - 75 years with diabetes "DATA",1130580001.101,66,6,2,0) (type 1 or type 2) who had a foot exam (visual inspection, sensory exam "DATA",1130580001.101,66,6,3,0) with monofilament, or pulse exam). "DATA",1130580001.101,66,7) NQF0056 "DATA",1130580001.101,67,0) MU EP NQF 0074 "DATA",1130580001.101,67,1) Coronary Artery Disease (CAD): Drug Therapy for Lowering LDLCholesterol "DATA",1130580001.101,67,5) Coronary Artery Disease (CAD): Drug Therapy for Lowering LDLCholesterol "DATA",1130580001.101,67,6,0) ^^3^3^3110430^ "DATA",1130580001.101,67,6,1,0) Percentage of patients aged 18 years and older with a "DATA",1130580001.101,67,6,2,0) diagnosis of CAD who were prescribed a lipid-lowering therapy (based "DATA",1130580001.101,67,6,3,0) on current ACC/AHA guidelines). "DATA",1130580001.101,67,7) NQF0074 "DATA",1130580001.101,68,0) MU EP NQF 0084 "DATA",1130580001.101,68,1) Heart Failure (HF): Warfarin Therapy Patients with Atrial Fibrillation "DATA",1130580001.101,68,5) Heart Failure (HF): Warfarin Therapy Patients with Atrial Fibrillation "DATA",1130580001.101,68,6,0) ^^3^3^3110430^ "DATA",1130580001.101,68,6,1,0) Percentage of all patients aged 18 years and older with a "DATA",1130580001.101,68,6,2,0) diagnosis of heart failure and paroxysmal or chronic atrial fibrillation "DATA",1130580001.101,68,6,3,0) who were prescribed warfarin therapy. "DATA",1130580001.101,68,7) NQF0084 "DATA",1130580001.101,69,0) MU EP NQF 0073 "DATA",1130580001.101,69,1) Ischemic Vascular Disease (IVD): Blood Pressure Management "DATA",1130580001.101,69,5) Ischemic Vascular Disease (IVD): Blood Pressure Management "DATA",1130580001.101,69,6,0) ^^11^11^3110430^ "DATA",1130580001.101,69,6,1,0) Percentage of patients 18 years of age and older who "DATA",1130580001.101,69,6,2,0) were discharged alive for acute myocardial infarction (AMI), coronary "DATA",1130580001.101,69,6,3,0) artery bypass graft (CABG) or percutaneous transluminal coronary "DATA",1130580001.101,69,6,4,0) Percentage of patients 18 years of age and older who "DATA",1130580001.101,69,6,5,0) were discharged alive for acute myocardial infarction (AMI), coronary "DATA",1130580001.101,69,6,6,0) artery bypass graft (CABG) or percutaneous transluminal coronary "DATA",1130580001.101,69,6,7,0) angioplasty (PTCA) from January 1- November 1 of the year prior to "DATA",1130580001.101,69,6,8,0) the measurement year, or who had a diagnosis of ischemic vascular "DATA",1130580001.101,69,6,9,0) disease (IVD) during the measurement year and the year prior to the "DATA",1130580001.101,69,6,10,0) measurement year and whose recent blood pressure is in control "DATA",1130580001.101,69,6,11,0) (<140/90 mmHg). "DATA",1130580001.101,69,7) NQF0073 "DATA",1130580001.101,70,0) MU EP NQF 0068 "DATA",1130580001.101,70,1) Ischemic Vascular Disease (IVD): Use of Aspirin or Another Antithrombotic "DATA",1130580001.101,70,5) Ischemic Vascular Disease (IVD): Use of Aspirin or Another Antithrombotic "DATA",1130580001.101,70,6,0) ^^8^8^3110430^ "DATA",1130580001.101,70,6,1,0) Percentage of patients 18 years of age and older who were "DATA",1130580001.101,70,6,2,0) discharged alive for acute myocardial infarction (AMI), coronary artery "DATA",1130580001.101,70,6,3,0) bypass graft (CABG) or percutaneous transluminal coronary "DATA",1130580001.101,70,6,4,0) angioplasty (PTCA) from January 1-November 1 of the year prior to the "DATA",1130580001.101,70,6,5,0) measurement year, or who had a diagnosis of ischemic vascular "DATA",1130580001.101,70,6,6,0) disease (IVD) during the measurement year and the year prior to the "DATA",1130580001.101,70,6,7,0) measurement year and who had documentation of use of aspirin or "DATA",1130580001.101,70,6,8,0) another antithrombotic during the measurement year "DATA",1130580001.101,70,7) NQF0068 "DATA",1130580001.101,71,0) MU EP NQF 0004 "DATA",1130580001.101,71,1) Initiation and Engagement of Alcohol and Other Drug Dependence Treatment:(a)Initiation,(b)Engagement "DATA",1130580001.101,71,5) Initiation and Engagement of Alcohol and Other Drug Dependence Treatment:(a) Initiation,(b) Engagement "DATA",1130580001.101,71,6,0) ^^6^6^3110430^ "DATA",1130580001.101,71,6,1,0) The percentage of adolescent and adult patients with a new "DATA",1130580001.101,71,6,2,0) episode of alcohol and other drug (AOD) dependence who initiate treatment "DATA",1130580001.101,71,6,3,0) through an inpatient AOD admission, outpatient visit, intensive "DATA",1130580001.101,71,6,4,0) outpatient encounter or partial hospitalization within 14 days of the "DATA",1130580001.101,71,6,5,0) diagnosis and who initiated treatment and who had two or more additional "DATA",1130580001.101,71,6,6,0) services with an AOD diagnosis within 30 days of the initiation visit. "DATA",1130580001.101,71,7) NQF0004 "DATA",1130580001.101,72,0) MU EP NQF 0012 "DATA",1130580001.101,72,1) Prenatal Care: Screening for Human Immunodeficiency Virus (HIV) "DATA",1130580001.101,72,5) Prenatal Care: Screening for Human Immunodeficiency Virus (HIV) "DATA",1130580001.101,72,6,0) ^^3^3^3110430^ "DATA",1130580001.101,72,6,1,0) Percentage of patients, regardless of age, who gave birth during "DATA",1130580001.101,72,6,2,0) a 12-month period who were screened for HIV infection during the first or "DATA",1130580001.101,72,6,3,0) second prenatal care visit. "DATA",1130580001.101,72,7) NQF0012 "DATA",1130580001.101,73,0) MU EP NQF 0014 "DATA",1130580001.101,73,1) Prenatal Care: Anti-D Immune Globulin "DATA",1130580001.101,73,5) Prenatal Care: Anti-D Immune Globulin "DATA",1130580001.101,73,6,0) ^^3^3^3110430^ "DATA",1130580001.101,73,6,1,0) Percentage of D (Rh) negative, unsensitized patients, regardless "DATA",1130580001.101,73,6,2,0) of age, who gave birth during a 12-month period who received anti-D "DATA",1130580001.101,73,6,3,0) immune globulin at 26-30 weeks gestation. "DATA",1130580001.101,73,7) NQD0014 "DATA",1130580001.101,74,0) MU EP NQF 0018 "DATA",1130580001.101,74,1) Controlling High Blood Pressure "DATA",1130580001.101,74,5) Controlling High Blood Pressure "DATA",1130580001.101,74,6,0) ^^3^3^3110430^ "DATA",1130580001.101,74,6,1,0) The percentage of patients 18-85 years of age who had a "DATA",1130580001.101,74,6,2,0) diagnosis of hypertension and whose BP was adequately controlled during "DATA",1130580001.101,74,6,3,0) the measurement year "DATA",1130580001.101,74,7) NQF0018 "DATA",1130580001.101,75,0) MU EP NQF 0032 "DATA",1130580001.101,75,1) Cervical Cancer Screening "DATA",1130580001.101,75,5) Cervical Cancer Screening "DATA",1130580001.101,75,6,0) ^^2^2^3110430^ "DATA",1130580001.101,75,6,1,0) Percentage of women 21-64 years of age, who received one or "DATA",1130580001.101,75,6,2,0) more Pap tests to screen for cervical cancer "DATA",1130580001.101,75,7) NQF0032 "DATA",1130580001.101,76,0) MU EP NQF 0033 "DATA",1130580001.101,76,1) Chlamydia Screening for Women "DATA",1130580001.101,76,5) Chlamydia Screening for Women "DATA",1130580001.101,76,6,0) ^^3^3^3110430^ "DATA",1130580001.101,76,6,1,0) Percentage of women 15- 24 years of age who were identified as sexually "DATA",1130580001.101,76,6,2,0) active and who had at least one test for chlamydia during the measurement "DATA",1130580001.101,76,6,3,0) year. "DATA",1130580001.101,76,7) NQF0033 "DATA",1130580001.101,77,0) MU EP NQF 0036 "DATA",1130580001.101,77,1) Use of Appropriate Medications for Asthma "DATA",1130580001.101,77,5) Use of Appropriate Medications for Asthma "DATA",1130580001.101,77,6,0) ^^4^4^3110430^ "DATA",1130580001.101,77,6,1,0) Percentage of patients 5 - 50 years of age who were identified as having "DATA",1130580001.101,77,6,2,0) persistent asthma and were appropriately prescribed medication during the "DATA",1130580001.101,77,6,3,0) measurement year. Report three age stratifications (5-11 years, 12-50 "DATA",1130580001.101,77,6,4,0) years, and total). "DATA",1130580001.101,77,7) NQF0036 "DATA",1130580001.101,78,0) MU EP NQF 0052 "DATA",1130580001.101,78,1) Low Back Pain: Use of Imaging Studies "DATA",1130580001.101,78,5) Low Back Pain: Use of Imaging Studies "DATA",1130580001.101,78,6,0) ^1130580001.111^3^3^3110430^^ "DATA",1130580001.101,78,6,1,0) Percentage of patients with a primary diagnosis of low back pain "DATA",1130580001.101,78,6,2,0) who did not have an imaging study (plain x-ray, MRI, CT scan) within 28 "DATA",1130580001.101,78,6,3,0) days of diagnosis. "DATA",1130580001.101,78,7) NQF0052 "DATA",1130580001.101,79,0) MU EP NQF 0075 "DATA",1130580001.101,79,1) Ischemic Vascular Disease (IVD): Complete Lipid Panel and LDL Control "DATA",1130580001.101,79,5) Ischemic Vascular Disease (IVD): Complete Lipid Panel and LDL Control "DATA",1130580001.101,79,6,0) ^^7^7^3110430^ "DATA",1130580001.101,79,6,1,0) Percentage of patients 18 years of age and older who were discharged alive "DATA",1130580001.101,79,6,2,0) for acute myocardial infarction (AMI), coronary artery bypass graft (CABG) "DATA",1130580001.101,79,6,3,0) or percutaneous transluminal angioplasty (PTCA) from January 1-November1 "DATA",1130580001.101,79,6,4,0) of the year prior to the measurement year, or who had a diagnosis of "DATA",1130580001.101,79,6,5,0) ischemic vascular disease (IVD) during the measurement year and the year "DATA",1130580001.101,79,6,6,0) prior to the measurement year and who had a complete lipid profile "DATA",1130580001.101,79,6,7,0) performed during the measurement year and whose LDL-C<100 mg/dL "DATA",1130580001.101,79,7) NQF0075 "DATA",1130580001.101,80,0) MU EP NQF 0575 "DATA",1130580001.101,80,1) Diabetes: Hemoglobin A1c Control (<8.0%) "DATA",1130580001.101,80,5) Diabetes: Hemoglobin A1c Control (<8.0%) "DATA",1130580001.101,80,6,0) ^^2^2^3110430^ "DATA",1130580001.101,80,6,1,0) The percentage of patients 18-75 years of age with diabetes "DATA",1130580001.101,80,6,2,0) (type 1 or type 2) who had hemoglobin A1c <8.0% "DATA",1130580001.101,80,7) NQF0575 "DATA",1130580001.101,81,0) MU EP NQF 0028B^104^103 "DATA",1130580001.101,81,1) NQF0028B Preventive Care and Screening Measure Pair: a. Tobacco Use Assessment,b. Tobacco Cessation Intervention "DATA",1130580001.101,81,5) NQF0028B Tobacco Use Assessment and Cessation Intervention "DATA",1130580001.101,81,6,0) ^1130580001.111^7^7^3110625^^^^ "DATA",1130580001.101,81,6,1,0) Percentage of patients aged 18 years and "DATA",1130580001.101,81,6,2,0) older who have been seen for at least 2 office visits who "DATA",1130580001.101,81,6,3,0) were queried about tobacco use one or more times within "DATA",1130580001.101,81,6,4,0) 24 months b. Percentage of patients aged 18 years and "DATA",1130580001.101,81,6,5,0) older identified as tobacco users within the past 24 "DATA",1130580001.101,81,6,6,0) months and have been seen for at least 2 office visits, "DATA",1130580001.101,81,6,7,0) who received cessation intervention. "DATA",1130580001.101,81,7) NQF0028B "DATA",1130580001.101,82,0) MU EP 0028B "DATA",1130580001.101,83,0) NQF0038 NUM1 DPT^115^109 "DATA",1130580001.101,83,5) NQF0038 NUM1 DPT "DATA",1130580001.101,83,7) NQF0038 NUM1 DPT "DATA",1130580001.101,84,0) NQF0038 NUM2 IPV^123^109 "DATA",1130580001.101,84,5) NQF0038 NUM2 IPV "DATA",1130580001.101,84,7) NQF0038 NUM2 IPV "DATA",1130580001.101,85,0) NQF0038 NUM3 MMR^114^109 "DATA",1130580001.101,85,5) NQF0038 NUM3 MMR "DATA",1130580001.101,85,7) NQF0038 NUM3 MMR "DATA",1130580001.101,86,0) NQF0038 NUM4 HiB^116^109 "DATA",1130580001.101,86,5) NQF0038 NUM4 HiB "DATA",1130580001.101,86,7) NQF0038 NUM4 HiB "DATA",1130580001.101,87,0) NQF0038 NUM5 HEP B^117^109 "DATA",1130580001.101,87,5) NQF0038 NUM5 HEP B "DATA",1130580001.101,87,7) NQF0038 NUM5 HEP B "DATA",1130580001.101,88,0) NQF0038 NUM6 VZV^118^109 "DATA",1130580001.101,88,5) NQF0038 NUM6 VZV "DATA",1130580001.101,88,7) NQF0038 NUM6 VZV "DATA",1130580001.101,89,0) NQF0038 NUM7 PCV^119^109 "DATA",1130580001.101,89,5) NQF0038 NUM7 PCV "DATA",1130580001.101,89,7) NQF0038 NUM7 PCV "DATA",1130580001.101,90,0) NQF0038 NUM8 HEP A^120^109 "DATA",1130580001.101,90,5) NQF0038 NUM8 HEP A "DATA",1130580001.101,90,7) NQF0038 NUM8 HEP A "DATA",1130580001.101,91,0) NQF0038 NUM9^121^109 "DATA",1130580001.101,91,5) NQF0038 NUM9 "DATA",1130580001.101,91,7) NQF0038 NUM9 "DATA",1130580001.101,92,0) NQF0038 NUM10^122^109 "DATA",1130580001.101,92,5) NQF0038 NUM10 "DATA",1130580001.101,92,7) NQF0038 NUM10 "DATA",1130580001.101,93,0) NQF0038 NUM11 COMBO5^124^109 "DATA",1130580001.101,93,5) NQF0038 NUM11 COMBO5 "DATA",1130580001.101,93,7) NQF0038 NUM11 COMBO5 "DATA",1130580001.101,94,0) NQF0038 NUM12 COMBO6^125^109 "DATA",1130580001.101,94,5) NQF0038 NUM12 COMBO6 "DATA",1130580001.101,94,7) NQF0038 NUM12 COMBO6 "DATA",1130580001.101,95,0) MU 2011 INP ADV DIRECTIVES "DATA",1130580001.101,95,5) Advance Directives "DATA",1130580001.101,95,7) ^15^14^^17 "DATA",1130580001.101,96,0) MU 2011 INP CPOE "DATA",1130580001.101,96,5) CPOE for Medications "DATA",1130580001.101,96,7) ^10^1^^11 "DATA",1130580001.101,97,0) MU 2011 INP MED RECON "DATA",1130580001.101,97,5) Medication Reconcilliation "DATA",1130580001.101,97,7) ^19^21^^20 "DATA",1130580001.101,98,0) MU 2011 INP PROBLEM LIST "DATA",1130580001.101,98,5) Problem List "DATA",1130580001.101,98,7) ^2^1^^3 "DATA",1130580001.101,99,0) MU 2011 INP VITAL SIGNS "DATA",1130580001.101,99,5) Record Vital Signs "DATA",1130580001.101,99,7) ^16^1^^18 "DATA",1130580001.101,100,0) MU 2011 INP SMOKING STATUS "DATA",1130580001.101,100,5) Smoking Status "DATA",1130580001.101,100,7) ^12^1^^13 "DATA",1130580001.101,101,0) MU 2011 INP MED LIST "DATA",1130580001.101,101,5) Active Medication List "DATA",1130580001.101,101,7) ^4^1^^5 "DATA",1130580001.101,102,0) MU 2011 INP ALLERGY LIST "DATA",1130580001.101,102,5) Medication Allergy List "DATA",1130580001.101,102,7) ^6^1^^7 "DATA",1130580001.101,103,0) MU 2011 INP DEMOGRAPHICS "DATA",1130580001.101,103,5) Record Demographics "DATA",1130580001.101,103,7) ^8^1^^9 "FIA",178.301) C0C XML MISC "FIA",178.301,0) ^C0CX(178.301, "FIA",178.301,0,0) 178.301 "FIA",178.301,0,1) y^y^f^^n^^y^o^n "FIA",178.301,0,10) "FIA",178.301,0,11) "FIA",178.301,0,"RLRO") "FIA",178.301,0,"VR") 1.0^C0Q "FIA",178.301,178.301) 0 "FIA",178.301,178.3013) 0 "FIA",178.301,178.3014) 0 "FIA",178.301,178.311) 0 "FIA",178.301,178.321) 0 "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) "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.201) C0Q MEASUREMENTS "FIA",1130580001.201,0) ^C0Q(201, "FIA",1130580001.201,0,0) 1130580001.201 "FIA",1130580001.201,0,1) y^y^f^^^^n^^ "FIA",1130580001.201,0,10) "FIA",1130580001.201,0,11) "FIA",1130580001.201,0,"RLRO") "FIA",1130580001.201,0,"VR") 1.0^C0Q "FIA",1130580001.201,1130580001.201) 0 "FIA",1130580001.201,1130580001.2011) 0 "FIA",1130580001.201,1130580001.20111) 0 "FIA",1130580001.201,1130580001.20112) 0 "FIA",1130580001.301) C0Q PATIENT LIST "FIA",1130580001.301,0) ^C0Q(301, "FIA",1130580001.301,0,0) 1130580001.301I "FIA",1130580001.301,0,1) y^y^f^^^^n^^ "FIA",1130580001.301,0,10) "FIA",1130580001.301,0,11) "FIA",1130580001.301,0,"RLRO") "FIA",1130580001.301,0,"VR") 1.0^C0Q "FIA",1130580001.301,1130580001.301) 0 "FIA",1130580001.301,1130580001.311) 0 "FIA",1130580001.301,1130580001.3111) 0 "FIA",1130580001.301,1130580001.321) 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^y^f^^^^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) 0 "FIA",1130580001.401,1130580001.4013) 0 "FIA",1130580001.401,1130580001.411) 0 "INIT") POST^C0QKIDS "IX",178.301,178.301,"XPATH",0) 178.301^XPATH^REGULAR WHOLE FILE INDEX ON XPATH BY TEMPLATE^R^^F^IR^W^178.3014^^^^^LS "IX",178.301,178.301,"XPATH",1) S ^C0CX(178.301,"XPATH",X(2),$E(X(1),1,240),DA(1),DA)="" "IX",178.301,178.301,"XPATH",2) K ^C0CX(178.301,"XPATH",X(2),$E(X(1),1,240),DA(1),DA) "IX",178.301,178.301,"XPATH",2.5) K ^C0CX(178.301,"XPATH") "IX",178.301,178.301,"XPATH",11.1,0) ^.114IA^2^2 "IX",178.301,178.301,"XPATH",11.1,1,0) 1^F^178.3014^.01^240^2^F "IX",178.301,178.301,"XPATH",11.1,1,3) "IX",178.301,178.301,"XPATH",11.1,2,0) 2^C^^^^1 "IX",178.301,178.301,"XPATH",11.1,2,1.5) S X=DA(1) "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 "IX",1130580001.201,1130580001.201,"MU",0) 1130580001.201^MU^MEANINGFUL USE YEAR KEY INDEX^R^^F^IR^I^1130580001.201^^^^^LS "IX",1130580001.201,1130580001.201,"MU",1) S ^C0Q(201,"MU",$E(X,1,30),DA)="" "IX",1130580001.201,1130580001.201,"MU",2) K ^C0Q(201,"MU",$E(X,1,30),DA) "IX",1130580001.201,1130580001.201,"MU",2.5) K ^C0Q(201,"MU") "IX",1130580001.201,1130580001.201,"MU",11.1,0) ^.114IA^1^1 "IX",1130580001.201,1130580001.201,"MU",11.1,1,0) 1^F^1130580001.201^.3^30^1^F "IX",1130580001.301,1130580001.301,"CATTR",0) 1130580001.301^CATTR^ATTRIBUTE TO TIE PATIENT LIST RECORD TO INTERNAL ARRAYS^R^^F^IR^I^1130580001.301^^^^^LS "IX",1130580001.301,1130580001.301,"CATTR",1) S ^C0Q(301,"CATTR",$E(X,1,64),DA)="" "IX",1130580001.301,1130580001.301,"CATTR",2) K ^C0Q(301,"CATTR",$E(X,1,64),DA) "IX",1130580001.301,1130580001.301,"CATTR",2.5) K ^C0Q(301,"CATTR") "IX",1130580001.301,1130580001.301,"CATTR",11.1,0) ^.114IA^1^1 "IX",1130580001.301,1130580001.301,"CATTR",11.1,1,0) 1^F^1130580001.301^999^64^1^F "IX",1130580001.301,1130580001.301,"MU",0) 1130580001.301^MU^MEANINGFUL USE YEAR KEY^R^^F^IR^I^1130580001.301^^^^^LS "IX",1130580001.301,1130580001.301,"MU",1) S ^C0Q(301,"MU",$E(X,1,30),DA)="" "IX",1130580001.301,1130580001.301,"MU",2) K ^C0Q(301,"MU",$E(X,1,30),DA) "IX",1130580001.301,1130580001.301,"MU",2.5) K ^C0Q(301,"MU") "IX",1130580001.301,1130580001.301,"MU",11.1,0) ^.114IA^1^1 "IX",1130580001.301,1130580001.301,"MU",11.1,1,0) 1^F^1130580001.301^.3^30^1^F "IX",1130580001.401,1130580001.401,"MU",0) 1130580001.401^MU^REGULAR INDEX ON THE REPORTING PERIOD FIELD^R^^F^IR^I^1130580001.401^^^^^LS "IX",1130580001.401,1130580001.401,"MU",1) S ^C0Q(401,"MU",$E(X,1,30),DA)="" "IX",1130580001.401,1130580001.401,"MU",2) K ^C0Q(401,"MU",$E(X,1,30),DA) "IX",1130580001.401,1130580001.401,"MU",2.5) K ^C0Q(401,"MU") "IX",1130580001.401,1130580001.401,"MU",11.1,0) ^.114IA^1^1 "IX",1130580001.401,1130580001.401,"MU",11.1,1,0) 1^F^1130580001.401^.02^30^1^F "IX",1130580001.401,1130580001.401,"MUTYP",0) 1130580001.401^MUTYP^INDEX ON PARAMETER TYPE BY REPORTING PERIOD^R^^R^IR^I^1130580001.401^^^^^LS "IX",1130580001.401,1130580001.401,"MUTYP",1) S ^C0Q(401,"MUTYP",$E(X(1),1,30),X(2),DA)="" "IX",1130580001.401,1130580001.401,"MUTYP",2) K ^C0Q(401,"MUTYP",$E(X(1),1,30),X(2),DA) "IX",1130580001.401,1130580001.401,"MUTYP",2.5) K ^C0Q(401,"MUTYP") "IX",1130580001.401,1130580001.401,"MUTYP",11.1,0) ^.114IA^2^2 "IX",1130580001.401,1130580001.401,"MUTYP",11.1,1,0) 1^F^1130580001.401^.02^30^1^F "IX",1130580001.401,1130580001.401,"MUTYP",11.1,1,3) "IX",1130580001.401,1130580001.401,"MUTYP",11.1,2,0) 2^F^1130580001.401^.03^^2^F "IX",1130580001.401,1130580001.401,"MUTYP",11.1,2,3) "KRN",.4,1495,-1) 0^3 "KRN",.4,1495,0) C0Q PRINT QUALITY MEASURES^3101012.2017^@^1130580001.101^^@^3120105 "KRN",.4,1495,"F",2) .01~.5~1~2~ "KRN",.4,1495,"H") C0Q QUAILITY MEASURE LIST "KRN",.4,1496,-1) 0^2 "KRN",.4,1496,0) C0Q PRINT MEASUREMENT SET^3101012.2337^@^1130580001.201^^@^3110502 "KRN",.4,1496,"F",2) .01~.02~.03~.05~.2~1,.01~1,1,.01~1,1.1~1,2,.01~1,2.1~1,3~ "KRN",.4,1496,"H") C0Q MEASUREMENTS LIST "KRN",.4,1497,-1) 0^1 "KRN",.4,1497,0) C0Q PRINT BY PATIENT^3101014.2342^@^1130580001.201^^@^3101014 "KRN",.4,1497,"F",2) .01~1,.01~1,2,.01~ "KRN",.4,1497,"H") C0Q MEASUREMENTS LIST "KRN",.4,1498,-1) 0^5 "KRN",.4,1498,0) C0Q HOS MEASURES^3110430.1539^@^1130580001.201^^@^3110430 "KRN",.4,1498,"DXS",1,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,1)):^(1),1:"") "KRN",.4,1498,"DXS",2,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"") "KRN",.4,1498,"DXS",3,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"") "KRN",.4,1498,"F",1) .01~1,.01~1,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:TITLE"~ "KRN",.4,1498,"F",2) 1,X DXS(2,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,2),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:NUMERATOR"~ "KRN",.4,1498,"F",3) 1,X DXS(3,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,3),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:DENOMINATOR"~ "KRN",.4,1498,"H") C0Q MEASUREMENTS LIST "KRN",.4,1499,-1) 0^4 "KRN",.4,1499,0) C0Q EP SETUP^3110430.1927^@^1130580001.201^^@^3110502 "KRN",.4,1499,"DXS",1,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,1)):^(1),1:"") "KRN",.4,1499,"DXS",2,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"") "KRN",.4,1499,"DXS",3,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,0)):^(0),1:"") "KRN",.4,1499,"F",1) .01~1,.01~1,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:TITLE"~ "KRN",.4,1499,"F",2) 1,X DXS(2,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,2),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:NUMERATOR"~ "KRN",.4,1499,"F",3) 1,X DXS(3,9.2) S X=$P($G(^PXRMXP(810.5,+$P(DIP(101),U,3),0)),U) S D0=I(0,0) S D1=I(1,0) W X K DIP;Z;"MEASURE:DENOMINATOR"~ "KRN",.4,1499,"H") C0Q MEASUREMENTS LIST "KRN",.4,1500,-1) 0^6 "KRN",.4,1500,0) C0Q MEASUREMENT REPORT^3110512.1707^@^1130580001.201^^@^3120521 "KRN",.4,1500,"DXS",1,9.2) S I(1,0)=$G(D1),I(0,0)=$G(D0),DIP(1)=$S($D(^C0Q(201,D0,5,D1,0)):^(0),1:""),D0=$P(DIP(1),U,1) S:'D0!'$D(^C0Q(101,+D0,0)) D0=-1 S DIP(101)=$S($D(^C0Q(101,D0,5)):^(5),1:"") "KRN",.4,1500,"F",2) 1,X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) S D1=I(1,0) K DIP;W25;S;Z;"MEASURE:DISPLAY NAME"~1,2.1;"DENOMINATOR";C27~1,1.1;"NUMERATOR"~1,3;C62~ "KRN",.4,1500,"H") C0Q MEASUREMENTS LIST "KRN",.402,1736,-1) 0^1 "KRN",.402,1736,0) C0Q MEASUREMENT SET DEFINE^3101012.1929^@^1130580001.201^^@^3110621 "KRN",.402,1736,"DR",1,1130580001.201) .01;1; "KRN",.402,1736,"DR",2,1130580001.2011) .01; "KRN",.402,1742,-1) 0^3 "KRN",.402,1742,0) C0Q EDIT INPATIENT PARMS^3120105.1456^@^1130580001.401^^@^3120124 "KRN",.402,1742,"DIAB",1,1,1130580001.4013,0) ALL "KRN",.402,1742,"DR",1,1130580001.401) .01;.02;.03;1;1.1;3; "KRN",.402,1742,"DR",2,1130580001.4013) .01:.02 "KRN",.402,1743,-1) 0^6 "KRN",.402,1743,0) C0Q EDIT OUPATIENT PARMS^3120105.1458^@^1130580001.401^^@^3120219 "KRN",.402,1743,"DIAB",1,1,1130580001.4013,0) ALL "KRN",.402,1743,"DIAB",1,1,1130580001.411,0) ALL "KRN",.402,1743,"DR",1,1130580001.401) .01;.02;.03;2;2.1;2.2;2.3;3; "KRN",.402,1743,"DR",2,1130580001.4013) .01:.02 "KRN",.402,1743,"DR",2,1130580001.411) .01 "KRN",.402,1744,-1) 0^8 "KRN",.402,1744,0) C0Q EDIT SUPERUSERS^3120105.1459^@^1130580001.401^^@^3120124 "KRN",.402,1744,"DIAB",1,1,1130580001.4013,0) ALL "KRN",.402,1744,"DR",1,1130580001.401) .01;.02;.03;3; "KRN",.402,1744,"DR",2,1130580001.4013) .01:.02 "KRN",.402,1745,-1) 0^7 "KRN",.402,1745,0) C0Q EDIT QUALITY MEASURE^3120105.1536^@^1130580001.101^^@^3120117 "KRN",.402,1745,"DR",1,1130580001.101) .01;.3;.5;.61;.7;.8;1;2;3;3.2; "KRN",.402,1746,-1) 0^5 "KRN",.402,1746,0) C0Q EDIT MU MEASURE^3120105.1537^@^1130580001.101^^@^3120219 "KRN",.402,1746,"DR",1,1130580001.101) .01;.3;.5;.61;.7;.8;1.1;2.1; "KRN",.402,1747,-1) 0^4 "KRN",.402,1747,0) C0Q EDIT MEASURE SET^3120105.1539^@^1130580001.201^^@^3120219 "KRN",.402,1747,"DR",1,1130580001.201) .01;.02;.03;.05;.3;1; "KRN",.402,1747,"DR",2,1130580001.2011) .01;1.2;2.2; "KRN",19,11027,-1) 0^10 "KRN",19,11027,0) C0Q QUALITY MEASUREMENT MENU^QUALITY MEASUREMENT MENU^^M^^^^^^^^ "KRN",19,11027,10,0) ^19.01IP^19^19 "KRN",19,11027,10,9,0) 11034 "KRN",19,11027,10,9,"^") C0Q COPY PATIENT LISTS "KRN",19,11027,10,12,0) 11037 "KRN",19,11027,10,12,"^") C0Q PQRI MENU "KRN",19,11027,10,13,0) 11038 "KRN",19,11027,10,13,"^") C0Q PRINT MEASURES "KRN",19,11027,10,14,0) 11044 "KRN",19,11027,10,14,"^") C0Q PRINT PQRI XML "KRN",19,11027,10,15,0) 11058 "KRN",19,11027,10,15,"^") C0Q INP UPDATE MU MEASURES "KRN",19,11027,10,16,0) 11059 "KRN",19,11027,10,16,"^") C0Q ED1 COMPUTATION "KRN",19,11027,10,17,0) 11060 "KRN",19,11027,10,17,"^") C0Q ED2 COMPUTATION "KRN",19,11027,10,18,0) 11061 "KRN",19,11027,10,18,"^") C0Q SETUP QUALITY REPORTING "KRN",19,11027,10,19,0) 11062 "KRN",19,11027,10,19,"^") C0Q EP UPDATE MU MEASURES "KRN",19,11027,99) 62598,59399 "KRN",19,11027,"U") QUALITY MEASUREMENT MENU "KRN",19,11028,-1) 0^4 "KRN",19,11028,0) C0Q DISPLAY QUALITY MEASURES^DISPLAY QUALITY MEASURES^^P^^^^^^^^ "KRN",19,11028,60) C0Q(101, "KRN",19,11028,62) 0 "KRN",19,11028,63) [C0Q PRINT QUALITY MEASURES] "KRN",19,11028,64) "KRN",19,11028,65) "KRN",19,11028,66) "KRN",19,11028,"U") DISPLAY QUALITY MEASURES "KRN",19,11029,-1) 0^3 "KRN",19,11029,0) C0Q DISPLAY MEASURE SET^DISPLAY MEASURE SET^^P^^^^^^^^ "KRN",19,11029,60) C0Q(201, "KRN",19,11029,62) 0 "KRN",19,11029,63) [C0Q PRINT MEASUREMENT SET] "KRN",19,11029,64) "KRN",19,11029,65) "KRN",19,11029,66) "KRN",19,11029,"U") DISPLAY MEASURE SET "KRN",19,11030,-1) 0^7 "KRN",19,11030,0) C0Q LIST MEASURE SET^LIST MEASURE SET^^R^^^^^^^^ "KRN",19,11030,25) EN^C0QMAIN "KRN",19,11030,"U") LIST MEASURE SET "KRN",19,11031,-1) 0^1 "KRN",19,11031,0) C0Q BY PATIENT NUMERATOR^BY PATIENT NUMERATOR^^R^^^^^^^^ "KRN",19,11031,25) NBYP^C0QMAIN "KRN",19,11031,"U") BY PATIENT NUMERATOR "KRN",19,11032,-1) 0^2 "KRN",19,11032,0) C0Q DENOMINATOR PATIENT LIST^DENOMINATOR PATIENT LIST^^R^^^^^^^^ "KRN",19,11032,25) DBYP^C0QMAIN "KRN",19,11032,"U") DENOMINATOR PATIENT LIST "KRN",19,11033,-1) 0^5 "KRN",19,11033,0) C0Q EXPORT CCR BY MEASURE^EXPORT CCR BY MEASURE^^R^^^^^^^^ "KRN",19,11033,25) EXPORT^C0QMAIN "KRN",19,11033,"U") EXPORT CCR BY MEASURE "KRN",19,11034,-1) 0^12 "KRN",19,11034,0) C0Q COPY PATIENT LISTS^COPY OVER PATIENT LISTS^^R^^^^^^^^ "KRN",19,11034,25) EN2^C0QMAIN "KRN",19,11034,"U") COPY OVER PATIENT LISTS "KRN",19,11035,-1) 0^6 "KRN",19,11035,0) C0Q EXPORT MEASURE SET^ALL MEASURES EXPORT^^R^^^^^^^^ "KRN",19,11035,25) ENEXP^C0QMAIN "KRN",19,11035,"U") ALL MEASURES EXPORT "KRN",19,11036,-1) 0^15 "KRN",19,11036,0) C0Q UPDATE QUALITY MEASUREMENT^RERUN ALL CURRENT REMINDERS^^R^^^^^^^^^^^1 "KRN",19,11036,1,0) ^19.06^3^3^3110430^^ "KRN",19,11036,1,1,0) Picks up the C0Q MEASUREMENST file entry to use from the Parameter C0Q "KRN",19,11036,1,2,0) MEASUREMENT TO USE, then runs and updates all associated Patient Lists and "KRN",19,11036,1,3,0) populates the C0Q QUALITY MEASURE and C0Q MEASUREMENTS files. "KRN",19,11036,15) W !,"Quality Measures Update Queued" H 2 "KRN",19,11036,25) QUE^C0QMAIN "KRN",19,11036,"U") RERUN ALL CURRENT REMINDERS "KRN",19,11037,-1) 0^13 "KRN",19,11037,0) C0Q PQRI MENU^PQRI MENU^^M^^^^^^^^ "KRN",19,11037,10,0) ^19.01IP^6^6 "KRN",19,11037,10,1,0) 11035 "KRN",19,11037,10,1,"^") C0Q EXPORT MEASURE SET "KRN",19,11037,10,2,0) 11033 "KRN",19,11037,10,2,"^") C0Q EXPORT CCR BY MEASURE "KRN",19,11037,10,3,0) 11030 "KRN",19,11037,10,3,"^") C0Q LIST MEASURE SET "KRN",19,11037,10,4,0) 11031 "KRN",19,11037,10,4,"^") C0Q BY PATIENT NUMERATOR "KRN",19,11037,10,5,0) 11032 "KRN",19,11037,10,5,"^") C0Q DENOMINATOR PATIENT LIST "KRN",19,11037,10,6,0) 11036 "KRN",19,11037,10,6,"^") C0Q UPDATE QUALITY MEASUREMENT "KRN",19,11037,99) 62598,59399 "KRN",19,11037,"U") PQRI MENU "KRN",19,11038,-1) 0^14 "KRN",19,11038,0) C0Q PRINT MEASURES^PRINT C0Q MEASURES^^I^^^^^^^^ "KRN",19,11038,30) C0Q(201, "KRN",19,11038,31) AEMQ "KRN",19,11038,63) [C0Q MEASUREMENT REPORT "KRN",19,11038,80) C0Q(201, "KRN",19,11038,"U") PRINT C0Q MEASURES "KRN",19,11044,-1) 0^16 "KRN",19,11044,0) C0Q PRINT PQRI XML^PQRI PRINT XML^^R^^^^^^^^ "KRN",19,11044,25) EN^C0QPQRI "KRN",19,11044,"U") PQRI PRINT XML "KRN",19,11058,-1) 0^22 "KRN",19,11058,0) C0Q INP UPDATE MU MEASURES^INP UPDATE MU MEASURES^^R^^^^^^^^ "KRN",19,11058,25) BUILD^C0QMU12 "KRN",19,11058,"U") INP UPDATE MU MEASURES "KRN",19,11059,-1) 0^19 "KRN",19,11059,0) C0Q ED1 COMPUTATION^ED-1 COMPUTATION^^R^^^^^^^^ "KRN",19,11059,25) ED1^C0QMU12 "KRN",19,11059,"U") ED-1 COMPUTATION "KRN",19,11060,-1) 0^20 "KRN",19,11060,0) C0Q ED2 COMPUTATION^ED-2 COMPUTATION^^R^^^^^^^^QUALITY MEASURES "KRN",19,11060,25) ED2^C0QMU12 "KRN",19,11060,"U") ED-2 COMPUTATION "KRN",19,11061,-1) 0^23 "KRN",19,11061,0) C0Q SETUP QUALITY REPORTING^SETUP QUALITY REPORTING^^M^^^^^^^^ "KRN",19,11061,10,0) ^19.01IP^9^9 "KRN",19,11061,10,1,0) 11028 "KRN",19,11061,10,1,"^") C0Q DISPLAY QUALITY MEASURES "KRN",19,11061,10,4,0) 11063 "KRN",19,11061,10,4,"^") C0Q EDIT INP PARMS "KRN",19,11061,10,5,0) 11064 "KRN",19,11061,10,5,"^") C0Q EDIT OUTPATIENT PARMS "KRN",19,11061,10,6,0) 11065 "KRN",19,11061,10,6,"^") C0Q EDIT SUPERUSERS "KRN",19,11061,10,7,0) 11067 "KRN",19,11061,10,7,"^") C0Q EDIT QUALITY MEASURE "KRN",19,11061,10,8,0) 11068 "KRN",19,11061,10,8,"^") C0Q EDIT MU MEASURE "KRN",19,11061,10,9,0) 11066 "KRN",19,11061,10,9,"^") C0Q EDIT MEASURE SET "KRN",19,11061,99) 62598,59399 "KRN",19,11061,"U") SETUP QUALITY REPORTING "KRN",19,11062,-1) 0^21 "KRN",19,11062,0) C0Q EP UPDATE MU MEASURES^EP UPDATE MU MEASURES^^R^^^^^^^^ "KRN",19,11062,25) DOEP^C0QMU12 "KRN",19,11062,"U") EP UPDATE MU MEASURES "KRN",19,11063,-1) 0^24 "KRN",19,11063,0) C0Q EDIT INP PARMS^INP EDIT PARMS^^E^^^^^^^^ "KRN",19,11063,30) C0Q(401, "KRN",19,11063,31) AEMQL "KRN",19,11063,50) C0Q(401, "KRN",19,11063,51) [C0Q EDIT INPATIENT PARMS] "KRN",19,11063,"U") INP EDIT PARMS "KRN",19,11064,-1) 0^27 "KRN",19,11064,0) C0Q EDIT OUTPATIENT PARMS^EP EDIT PARMS^^E^^^^^^^^ "KRN",19,11064,30) C0Q(401, "KRN",19,11064,31) AEMQL "KRN",19,11064,50) C0Q(401, "KRN",19,11064,51) [C0Q EDIT OUPATIENT PARMS] "KRN",19,11064,"U") EP EDIT PARMS "KRN",19,11065,-1) 0^29 "KRN",19,11065,0) C0Q EDIT SUPERUSERS^EDIT SUPERUSERS^^E^^^^^^^^ "KRN",19,11065,30) C0Q(401, "KRN",19,11065,31) AEMQL "KRN",19,11065,50) C0Q(401, "KRN",19,11065,51) [C0Q EDIT SUPERUSERS] "KRN",19,11065,"U") EDIT SUPERUSERS "KRN",19,11066,-1) 0^25 "KRN",19,11066,0) C0Q EDIT MEASURE SET^MEASURE SET EDIT^^E^^^^^^^^ "KRN",19,11066,30) C0Q(201, "KRN",19,11066,31) AEMQL "KRN",19,11066,50) C0Q(201, "KRN",19,11066,51) [C0Q EDIT MEASURE SET] "KRN",19,11066,"U") MEASURE SET EDIT "KRN",19,11067,-1) 0^28 "KRN",19,11067,0) C0Q EDIT QUALITY MEASURE^QUALITY MEASURE EDIT^^E^^^^^^^^ "KRN",19,11067,30) C0Q(101, "KRN",19,11067,31) AEMQL "KRN",19,11067,50) C0Q(101, "KRN",19,11067,51) [C0Q EDIT QUALITY MEASURE] "KRN",19,11067,"U") QUALITY MEASURE EDIT "KRN",19,11068,-1) 0^26 "KRN",19,11068,0) C0Q EDIT MU MEASURE^MU MEASURE EDIT^^E^^^^^^^^ "KRN",19,11068,30) C0Q(101, "KRN",19,11068,31) AEMQL "KRN",19,11068,50) C0Q(101, "KRN",19,11068,51) [C0Q EDIT MU MEASURE] "KRN",19,11068,"U") MU MEASURE EDIT "MBREQ") 0 "ORD",5,.4) .4;5;;;EDEOUT^DIFROMSO(.4,DA,"",XPDA);FPRE^DIFROMSI(.4,"",XPDA);EPRE^DIFROMSI(.4,DA,$E("N",$G(XPDNEW)),XPDA,"",OLDA);;EPOST^DIFROMSI(.4,DA,"",XPDA);DEL^DIFROMSK(.4,"",%) "ORD",5,.4,0) PRINT TEMPLATE "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 "ORD",18,19) 19;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA "ORD",18,19,0) OPTION "PKG",212,-1) 1^1 "PKG",212,0) QUALITY MEASURES^C0Q^Tracks and Prints Quality Measures "PKG",212,1,0) ^9.41A^3^3^3120521^^^ "PKG",212,1,1,0) Tracks and Prints quality measures for several reporting programs: "PKG",212,1,2,0) - Meaningful Use "PKG",212,1,3,0) - PQRI "PKG",212,20,0) ^9.402P^^ "PKG",212,22,0) ^9.49I^1^1 "PKG",212,22,1,0) 1.0^3120521 "PKG",212,22,1,1,0) ^^9^9^3120521 "PKG",212,22,1,1,1,0) The C0Q Quality Reporting Package is a mumps-based addition to VistA for "PKG",212,22,1,1,2,0) reporting Meaningful Use and Quality Measurements. The package supports "PKG",212,22,1,1,3,0) both inpatient and outpatient reporting, and computes the Meaningful Use "PKG",212,22,1,1,4,0) measures from patient records. For Quality Measurements, the reporting "PKG",212,22,1,1,5,0) package relies on the VistA Reminders Patient Lists as the source for its "PKG",212,22,1,1,6,0) reporting. "PKG",212,22,1,1,7,0) "PKG",212,22,1,1,8,0) Installation and Use instructions can be found here: "PKG",212,22,1,1,9,0) http://vistapedia.net/index.php?title=C0Q_Quality_Reporting_1.0 "PKG",212,"VERSION") 1.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") YES "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") 16 "RTN","C0QERTIM") 0^5^B7596326 "RTN","C0QERTIM",1,0) C0QERTIM ; Time from admission to leaving a hospital location ; "RTN","C0QERTIM",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QERTIM",3,0) EN ;Get Location "RTN","C0QERTIM",4,0) S DIC=42,DIC(0)="AEMQ" D ^DIC I Y<1 G EXIT "RTN","C0QERTIM",5,0) S LOCATION=+Y "RTN","C0QERTIM",6,0) ;Start date "RTN","C0QERTIM",7,0) S %DT="AE",%DT("A")="Start DATE: " D ^%DT G:Y=-1 EXIT S START=Y "RTN","C0QERTIM",8,0) ;End date "RTN","C0QERTIM",9,0) S %DT="AE",%DT("A")="Stop DATE: " D ^%DT G:Y=-1 EXIT S STOP=Y "RTN","C0QERTIM",10,0) ;select device: "RTN","C0QERTIM",11,0) S %ZIS="Q" D ^%ZIS G EXIT:POP "RTN","C0QERTIM",12,0) I $D(IO("Q")) D G EXIT "RTN","C0QERTIM",13,0) . S ZTRTN="DQ^C0QERTIM",ZTDESC="Time from admission to leaving a hospital location" "RTN","C0QERTIM",14,0) . S ZTSAVE("LOCATION")="",ZTSAVE("START")="",ZTSAVE("STOP")="" "RTN","C0QERTIM",15,0) . D ^%ZTLOAD D HOME^%ZIS K IO("Q") "RTN","C0QERTIM",16,0) . Q "RTN","C0QERTIM",17,0) DQ ; Get down to business "RTN","C0QERTIM",18,0) ;sort on admit date/time in file 45, screen on LOSING WARD in sub-file 535. "RTN","C0QERTIM",19,0) ;^DGPT("AF",date/time,DA) "RTN","C0QERTIM",20,0) S PATCOUNT=0,ADMITIME=START "RTN","C0QERTIM",21,0) F S ADMITIME=$O(^DGPT("AF",ADMITIME)) Q:ADMITIME'>0 D "RTN","C0QERTIM",22,0) . Q:ADMITIME>STOP "RTN","C0QERTIM",23,0) . ;FMIN from ADMISSION DATE piece 2 "RTN","C0QERTIM",24,0) . S X=ADMITIME D H^%DTC S FMINDAY=%H,FMINSEC=%T "RTN","C0QERTIM",25,0) . S D0="" F S D0=$O(^DGPT("AF",ADMITIME,D0)) Q:D0'>0 D "RTN","C0QERTIM",26,0) . . S D1=0 F S D1=$O(^DGPT(D0,535,D1)) Q:D1'>0 D "RTN","C0QERTIM",27,0) . . . ;Losing ward in piece 6 of ^DGPT(D0,535,D1,0) "RTN","C0QERTIM",28,0) . . . Q:$P($G(^DGPT(D0,535,D1,0)),U,6)'=LOCATION "RTN","C0QERTIM",29,0) . . . ;FMOUT from MOVEMENT DATE on leaving in piece 10 "RTN","C0QERTIM",30,0) . . . S X=$P($G(^DGPT(D0,535,D1,0)),U,10) D H^%DTC S FMOUTDAY=%H,FMOUTSEC=%T "RTN","C0QERTIM",31,0) . . . I FMINDAY=FMOUTDAY S MINUTES=$P((FMOUTSEC-FMINSEC)/60,".") "RTN","C0QERTIM",32,0) . . . I FMINDAY'=FMOUTDAY D "RTN","C0QERTIM",33,0) . . . . S DIFFDAY=FMOUTDAY-FMINDAY "RTN","C0QERTIM",34,0) . . . . S MINUTES=1440*(DIFFDAY-1)+$P((FMOUTSEC+86400-FMINSEC)/60,".") "RTN","C0QERTIM",35,0) . . . . Q "RTN","C0QERTIM",36,0) . . . S PATCOUNT=PATCOUNT+1 "RTN","C0QERTIM",37,0) . . . S ^TMP($J,"PATIENTS",$P(^DPT(+^DGPT(D0,0),0),U))=MINUTES "RTN","C0QERTIM",38,0) . . . S ^TMP($J,"MINUTES",MINUTES)=1+$G(^TMP($J,"MINUTES",MINUTES)) "RTN","C0QERTIM",39,0) . . . Q "RTN","C0QERTIM",40,0) . . Q "RTN","C0QERTIM",41,0) . Q "RTN","C0QERTIM",42,0) U IO W @IOF "RTN","C0QERTIM",43,0) ;list median time from Admission to leaving hospital LOCATION "RTN","C0QERTIM",44,0) S MID=$P(PATCOUNT/2,"."),SUM=0 "RTN","C0QERTIM",45,0) S MEDIAN=0 F S MEDIAN=$O(^TMP($J,"MINUTES",MEDIAN)) Q:MEDIAN'>0 D "RTN","C0QERTIM",46,0) . S SUM=SUM+^TMP($J,"MINUTES",MEDIAN) Q:SUM>MID "RTN","C0QERTIM",47,0) . Q "RTN","C0QERTIM",48,0) W "The median time spent in ",$P(^DIC(42,LOCATION,0),U)," is ",MEDIAN," minutes.",! "RTN","C0QERTIM",49,0) W !,"Patient",?40,"Minutes in ",$P(^DIC(42,LOCATION,0),U) "RTN","C0QERTIM",50,0) ;list patient and time from admission to leaving the location "RTN","C0QERTIM",51,0) S PATIENT="" F S PATIENT=$O(^TMP($J,"PATIENTS",PATIENT)) Q:PATIENT="" D "RTN","C0QERTIM",52,0) . W !,PATIENT,?40," ",^TMP($J,"PATIENTS",PATIENT) "RTN","C0QERTIM",53,0) EXIT ; DO CLEANUP "RTN","C0QERTIM",54,0) S:$D(ZTQUEUED) ZTREQ="@" "RTN","C0QERTIM",55,0) K DIC,START,STOP,LOCATION,PATCOUNT,ADMITIME,FMINDAY,FMINSEC,FMOUTDAY,FMOUTSEC "RTN","C0QERTIM",56,0) K POP,D0,D1,DIFFDAY,MINUTES,MID,MEDIAN,PATIENT,^TMP($J) "RTN","C0QERTIM",57,0) Q "RTN","C0QERTIM",58,0) "RTN","C0QGMRAD") 0^2^B18802718 "RTN","C0QGMRAD",1,0) C0QGMRAD ;HIRMFO/RM,WAA-UTILITY TO GATHER PATIENT DATA ;1/15/98 13:47 "RTN","C0QGMRAD",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QGMRAD",3,0) EN1 ; ENTRY TO GATHER PATIENT A/AR DATA "RTN","C0QGMRAD",4,0) ;INPUT VARIABLES: "RTN","C0QGMRAD",5,0) ; "RTN","C0QGMRAD",6,0) ; DFN Pointer to Patient file. "RTN","C0QGMRAD",7,0) ; GMRA (OPTIONAL) A^B^C DEFAULT="0^0^111^0" **LOCAL "RTN","C0QGMRAD",8,0) ; where A = 0 return all reactions (allergic/non-allergic). "RTN","C0QGMRAD",9,0) ; 1 return allergies only. "RTN","C0QGMRAD",10,0) ; 2 return non-allergies only. "RTN","C0QGMRAD",11,0) ; B = 0 return all data (verified or non-verified). "RTN","C0QGMRAD",12,0) ; 1 return only verified data. "RTN","C0QGMRAD",13,0) ; 2 return only non-verified data. "RTN","C0QGMRAD",14,0) ; C = X_Y_Z "RTN","C0QGMRAD",15,0) ; where X, Y, and Z are either 0 or 1. 1 would mean to "RTN","C0QGMRAD",16,0) ; return an Adverse Reaction of that particular type, "RTN","C0QGMRAD",17,0) ; and zero means do not return an Adverse Reaction of "RTN","C0QGMRAD",18,0) ; that type. "RTN","C0QGMRAD",19,0) ; X is for TYPE=OTHER "RTN","C0QGMRAD",20,0) ; Y is for TYPE=FOOD "RTN","C0QGMRAD",21,0) ; Z is for TYPE=DRUG. "RTN","C0QGMRAD",22,0) ; E.g., 001 (return drug only), 111 (returns all types), "RTN","C0QGMRAD",23,0) ; and 010 (returns food only). "RTN","C0QGMRAD",24,0) ; **LOCAL "RTN","C0QGMRAD",25,0) ; D = 0 return both Observed and Historical "RTN","C0QGMRAD",26,0) ; 1 return only Observed "RTN","C0QGMRAD",27,0) ; **LOCAL "RTN","C0QGMRAD",28,0) ;OUTPUT VARIABLES: "RTN","C0QGMRAD",29,0) ; GMRAL = 1 if patient has Adverse Reaction "RTN","C0QGMRAD",30,0) ; 0 if patient has no known Adverse Reaction "RTN","C0QGMRAD",31,0) ; null if patient has not been asked about Adverse Reaction "RTN","C0QGMRAD",32,0) ; GMRAL(PTR TO 120.8) = A^B^C^D^E^F^G^H^I "RTN","C0QGMRAD",33,0) ; where A = Pointer to Patient file. "RTN","C0QGMRAD",34,0) ; B = Free text of causative agent. "RTN","C0QGMRAD",35,0) ; *C = Type of reaction, where D is drug, F is food, and O is "RTN","C0QGMRAD",36,0) ; other. "RTN","C0QGMRAD",37,0) ; D = 1 if Adverse Reaction has been verified "RTN","C0QGMRAD",38,0) ; 0 if Adverse Reaction has not been verified "RTN","C0QGMRAD",39,0) ; E = 0 if this is an allergic reaction "RTN","C0QGMRAD",40,0) ; 1 if this is not an allergic reaction "RTN","C0QGMRAD",41,0) ; **F = the mechanism of reaction in the format: "RTN","C0QGMRAD",42,0) ; External format;Internal format "RTN","C0QGMRAD",43,0) ; (ALLERGY;0, PHARMACOLOGIC;2, UNKNOWN;U). "RTN","C0QGMRAD",44,0) ; G = Type of reaction. "RTN","C0QGMRAD",45,0) ; where D = drug "RTN","C0QGMRAD",46,0) ; DF = drug/food "RTN","C0QGMRAD",47,0) ; DFO = drug/food/other "RTN","C0QGMRAD",48,0) ; DO = drug/other "RTN","C0QGMRAD",49,0) ; F = food "RTN","C0QGMRAD",50,0) ; FO = food/other "RTN","C0QGMRAD",51,0) ; O = other "RTN","C0QGMRAD",52,0) ; H = the mechanism of reaction in the format: "RTN","C0QGMRAD",53,0) ; External format;Internal format "RTN","C0QGMRAD",54,0) ; (ALLERGY;A, PHARMACOLOGIC;P, UNKNOWN;U) "RTN","C0QGMRAD",55,0) ; I = IEN and Global root of reactant (stored in piece B above) "RTN","C0QGMRAD",56,0) ; set equal to the GMR ALLERGY field (#1) of the PATIENT "RTN","C0QGMRAD",57,0) ; ALLERGY file (#120.8) "RTN","C0QGMRAD",58,0) ; GMRAL(PTR TO 120.8,"S",COUNT) = S "RTN","C0QGMRAD",59,0) ; where COUNT = number 1 to number of signs/symptoms for this "RTN","C0QGMRAD",60,0) ; reaction. "RTN","C0QGMRAD",61,0) ; S = a sign/symptom for this reaction in the format: "RTN","C0QGMRAD",62,0) ; External format;Internal format "RTN","C0QGMRAD",63,0) ; "RTN","C0QGMRAD",64,0) ;* NOTE: This piece will no longer be supported after 9/1/97, "RTN","C0QGMRAD",65,0) ; Please use piece G. "RTN","C0QGMRAD",66,0) ;** NOTE: This piece will no longer be supported after 9/1/97, "RTN","C0QGMRAD",67,0) ; Please use piece H. "RTN","C0QGMRAD",68,0) ; "RTN","C0QGMRAD",69,0) N GMRAOTH "RTN","C0QGMRAD",70,0) Q:'$D(DFN) S:'$D(GMRA)#2 GMRA="0^0^111^1" K GMRAL "RTN","C0QGMRAD",71,0) DPT ; "RTN","C0QGMRAD",72,0) ;Read NKA Node in file 120.86 "RTN","C0QGMRAD",73,0) S GMRAL=$P($G(^GMR(120.86,DFN,0)),U,2) "RTN","C0QGMRAD",74,0) ;Do not set GMRAL array if patient is unassessed or NKA. "RTN","C0QGMRAD",75,0) I GMRAL=0 Q ;PATIENT HAS NO KNOWN ALLERGIES "RTN","C0QGMRAD",76,0) F GMRAREC=0:0 S GMRAREC=$O(^GMR(120.8,"B",DFN,GMRAREC)) Q:GMRAREC'>0 S GMRANODE=$S($D(^GMR(120.8,GMRAREC,0)):^(0),1:"") D:GMRANODE SETAL "RTN","C0QGMRAD",77,0) I GMRAL=1,+$O(GMRAL(0))'>0 S GMRAL=0 ;if flag is set to 1 (reactions exist), then make certain the reactions are passed in the GMRAL array "RTN","C0QGMRAD",78,0) K GMRA,GMRANODE,GMRAOSOF,GMRAREC,GMRATCNT "RTN","C0QGMRAD",79,0) Q "RTN","C0QGMRAD",80,0) SETAL ; "RTN","C0QGMRAD",81,0) N %,GMRAI,GMRASIGN "RTN","C0QGMRAD",82,0) ;Q:'$P(GMRANODE,"^",12)&'$D(GMRAOSOF) ;IF NOT SIGNED OFF MARK IT "RTN","C0QGMRAD",83,0) Q:+$G(^GMR(120.8,GMRAREC,"ER"))&'$D(GMRAERR) ;IF ENTERED IN ERROR QUIT "RTN","C0QGMRAD",84,0) I GMRAL'=1 S GMRAL=1 ; PATIENT HAS ALLERGIES "RTN","C0QGMRAD",85,0) S GMRAI=0 ; BEGIN CHECK FOR ADR/ALL CRITERIA "RTN","C0QGMRAD",86,0) I $P(GMRA,"^",4),$P(GMRANODE,"^",6)="h" Q ;QUIT IF HISTORICAL EXCLUDED **LOCAL "RTN","C0QGMRAD",87,0) I '$P(GMRA,"^") S GMRAI=1 "RTN","C0QGMRAD",88,0) E I $P(GMRA,"^")=1 S:$F("AU",$P(GMRANODE,"^",14))>1 GMRAI=1 "RTN","C0QGMRAD",89,0) E S:$F("P",$P(GMRANODE,"^",14))>1 GMRAI=1 "RTN","C0QGMRAD",90,0) Q:'GMRAI ; QUIT IF ADR/ALL CRITERIA NOT MET "RTN","C0QGMRAD",91,0) Q:2-$P(GMRA,"^",2)=(1-$P(GMRANODE,"^",16)) ;QUIT IF VER/NON VER CRITERIA NOT MET "RTN","C0QGMRAD",92,0) S GMRAI=0 ; BEGIN CHECK FOR ALLERGY TYPE CRITERIA "RTN","C0QGMRAD",93,0) F %=1:1:3 I $E($P(GMRA,"^",3),%),$P(GMRANODE,"^",20)[$E("OFD",%) S GMRAI=1 Q "RTN","C0QGMRAD",94,0) Q:'GMRAI ; QUIT IF ALLERGY TYPE CRITERIA NOT MET "RTN","C0QGMRAD",95,0) D PASS(GMRAREC,.GMRAL) "RTN","C0QGMRAD",96,0) Q "RTN","C0QGMRAD",97,0) PASS(GMRAREC,GMRAL) ; Data filer "RTN","C0QGMRAD",98,0) ; This subroutine will store all the patient date for a reaction is an "RTN","C0QGMRAD",99,0) ; array. "RTN","C0QGMRAD",100,0) ; Input: "RTN","C0QGMRAD",101,0) ; GMRAREC = The IEN for the entry in 120.8 "RTN","C0QGMRAD",102,0) ;Output: "RTN","C0QGMRAD",103,0) ; GMRAL(GMRAREC) the array entry for the record "RTN","C0QGMRAD",104,0) ; "RTN","C0QGMRAD",105,0) N GMRANODE "RTN","C0QGMRAD",106,0) S GMRANODE=$G(^GMR(120.8,GMRAREC,0)) Q:GMRANODE="" "RTN","C0QGMRAD",107,0) S %=$P(GMRANODE,"^",14) "RTN","C0QGMRAD",108,0) S GMRAL(GMRAREC)=$P(GMRANODE,"^",1,2)_"^"_$E($P(GMRANODE,"^",20))_"^"_+$P(GMRANODE,"^",16)_"^"_$S(%="A"!(%="U"):0,1:1) "RTN","C0QGMRAD",109,0) S GMRAL(GMRAREC)=GMRAL(GMRAREC)_"^"_$S(%="A":"ALLERGY;0",%="P":"PHARMACOLOGIC;2",%="U":"UNKNOWN;U",1:"")_"^"_$P(GMRANODE,"^",20)_"^"_$S(%="A":"ALLERGY;A",%="P":"PHARMACOLOGIC;P",%="U":"UNKNOWN;U",1:"") "RTN","C0QGMRAD",110,0) S GMRAL(GMRAREC)=GMRAL(GMRAREC)_"^"_$P(GMRANODE,"^",3) "RTN","C0QGMRAD",111,0) Q:'$O(^GMR(120.8,GMRAREC,10,0)) ;QUIT IF NO SIGNS/SYMPTOMS "RTN","C0QGMRAD",112,0) S:'$D(GMRAOTH) GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0)) "RTN","C0QGMRAD",113,0) S GMRAX=0,GMRAY=1 F S GMRAX=$O(^GMR(120.8,GMRAREC,10,GMRAX)) Q:GMRAX<1 D I GMRAZ'="" S GMRAL(GMRAREC,"S",GMRAY)=GMRAZ(1),GMRAY=GMRAY+1 "RTN","C0QGMRAD",114,0) .S GMRAZ=$G(^GMR(120.8,GMRAREC,10,GMRAX,0)) "RTN","C0QGMRAD",115,0) .S GMRAZ(1)=$S(+GMRAZ'=GMRAOTH:$P($G(^GMRD(120.83,+GMRAZ,0)),U)_";"_+GMRAZ,1:$P(GMRAZ,U,2)_";"_+GMRAZ) "RTN","C0QGMRAD",116,0) .Q "RTN","C0QGMRAD",117,0) K GMRAX,GMRAY,GMRAZ "RTN","C0QGMRAD",118,0) Q "RTN","C0QGMTSA") 0^3^B2175692 "RTN","C0QGMTSA",1,0) C0QGMTSA ; SLC/DLT,KER - Brief Adverse Reaction/Allergy ; 02/27/2002 "RTN","C0QGMTSA",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QGMTSA",3,0) ; "RTN","C0QGMTSA",4,0) ; External References "RTN","C0QGMTSA",5,0) ; DBIA 10096 ^%ZOSF("TEST" "RTN","C0QGMTSA",6,0) ; DBIA 10099 EN1^GMRADPT **LOCAL NOW EN1^C0QGMRAD "RTN","C0QGMTSA",7,0) ; "RTN","C0QGMTSA",8,0) ALLRG ; Allergies "RTN","C0QGMTSA",9,0) N I,Z,X,SEQ,GMTSA,ALLRG K GMTSA S (SEQ,ALLRG)=0 S X="C0QGMRAD" X ^%ZOSF("TEST") "RTN","C0QGMTSA",10,0) I $T D Q:$D(GMTSQIT) "RTN","C0QGMTSA",11,0) . D GETALLRG I ALLRG D "RTN","C0QGMTSA",12,0) . . D CKP^GMTSUP Q:$D(GMTSQIT) W ?3,"Allergy/Reaction: " D ALLRGP "RTN","C0QGMTSA",13,0) Q "RTN","C0QGMTSA",14,0) ALLRGP ; Allergy Print "RTN","C0QGMTSA",15,0) D CKP^GMTSUP Q:$D(GMTSQIT) W ?21 S X=0 "RTN","C0QGMTSA",16,0) F I=0:0 S I=$O(GMTSA(I)) Q:I="" D Q:$D(GMTSQIT) "RTN","C0QGMTSA",17,0) . S X=X+1 W:X>1 ", " W:(77)'>($X+$L(GMTSA(I))) ! "RTN","C0QGMTSA",18,0) . D CKP^GMTSUP Q:$D(GMTSQIT) W GMTSA(I) "RTN","C0QGMTSA",19,0) Q:$D(GMTSQIT) D CKP^GMTSUP Q:$D(GMTSQIT) W ! Q "RTN","C0QGMTSA",20,0) GETALLRG ; Get Allergies "RTN","C0QGMTSA",21,0) N GMI,GMJ,GMRAL D EN1^C0QGMRAD I GMRAL="" S ALLRG=0 Q "RTN","C0QGMTSA",22,0) I GMRAL="0" S ALLRG=1,GMTSA(1)="No Known Allergies" Q "RTN","C0QGMTSA",23,0) S ALLRG=1,GMI=0 F S GMI=$O(GMRAL(GMI)) Q:GMI'>0 D "RTN","C0QGMTSA",24,0) . S GMTSA(GMI)=$P(GMRAL(GMI),U,2) "RTN","C0QGMTSA",25,0) . S GMJ=0 F S GMJ=$O(GMTSA(GMJ)) Q:GMJ'>0 I GMI'=GMJ,(GMTSA(GMI)=$G(GMTSA(GMJ))) K GMTSA(GMI) Q "RTN","C0QGMTSA",26,0) Q "RTN","C0QGMTSG") 0^4^B29331917 "RTN","C0QGMTSG",1,0) C0QGMTSG ; SLC/DLT,KER - Allergies ; 01/06/2003 "RTN","C0QGMTSG",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QGMTSG",3,0) ; "RTN","C0QGMTSG",4,0) ; External References "RTN","C0QGMTSG",5,0) ; DBIA 10096 ^%ZOSF("TEST" "RTN","C0QGMTSG",6,0) ; DBIA 10035 ^DPT( "RTN","C0QGMTSG",7,0) ; DBIA 905 ^GMR(120.8 "RTN","C0QGMTSG",8,0) ; DBIA 2056 $$GET1^DIQ (file #120.86 and #200) "RTN","C0QGMTSG",9,0) ; DBIA 10011 ^DIWP "RTN","C0QGMTSG",10,0) ; DBIA 10099 EN1^GMRADPT **LOCAL changed to C0QGMRAD "RTN","C0QGMTSG",11,0) ; DBIA 10060 ^VA(200, "RTN","C0QGMTSG",12,0) ; DBIA 3449 ^GMR(120.86, "RTN","C0QGMTSG",13,0) ; "RTN","C0QGMTSG",14,0) ALLRG ; Allergies "RTN","C0QGMTSG",15,0) N X,GMTSALAS,GMTSALAD,GMTSALAW,GMTSALAT,GMTSAV,GMTSAFN,GMRAL,GMTSAL "RTN","C0QGMTSG",16,0) N GMTSALNM,GMTSCNT,GMTSEACT,GMTSLN,GMTSMECH,GMTSPRT,GMTSTY,CC,C,KK "RTN","C0QGMTSG",17,0) N ALLRG,TITLE,JJ K GMTSA S (SEQ,ALLRG)=0,TITLE="ALLERGY/ADVERSE REACTION (AR)" "RTN","C0QGMTSG",18,0) S X="C0QGMRAD" X ^%ZOSF("TEST") "RTN","C0QGMTSG",19,0) I $T D Q:$D(GMTSQIT) "RTN","C0QGMTSG",20,0) . D GETALLRG D:ALLRG TITLE,ALLRGP D:'ALLRG&($L($G(GMTSALAS))) TITLE,NKA "RTN","C0QGMTSG",21,0) I 'ALLRG,'$L($G(GMTSALAS)) D "RTN","C0QGMTSG",22,0) . I $D(GMTSPNF)&('ALLRG) D CKP^GMTSUP Q:$D(GMTSQIT) W "Unknown, please evaluate",! "RTN","C0QGMTSG",23,0) K ALL,CC,CCC,CD,DIWF,DIWL,DIWR,GMTSALF,GMTSALNM,GMTSNODE,GMTSPRT,I,II,JJ,KK,L,M,MX,N,Z,X,SEQ,GMTSA,ALLRG,TITLE,GMRA,GMRAL,GMTSEACT,GMTSMECH,GMTSTY,GMTSPFN,GMTSAL,GMTSCNT,GMTSLN,ODT "RTN","C0QGMTSG",24,0) Q "RTN","C0QGMTSG",25,0) ALLRGP ; Allergy Print "RTN","C0QGMTSG",26,0) S II="" F S II=$O(GMTSAL(II)) Q:II']"" I $O(GMTSAL(II,""))]"" D "RTN","C0QGMTSG",27,0) . D CKP^GMTSUP Q:$D(GMTSQIT) W !?2,$S(II="D":"Drug:",II="DF":"Drug/Food:",II="DFO":"Drug/Food/Other:",II="DO":"Drug/Other:",II="F":"Food:",II="FO":"Food/Other:",II="O":"Other:",1:II_":") "RTN","C0QGMTSG",28,0) . S JJ="" F S JJ=$O(GMTSAL(II,JJ)) Q:JJ="" D "RTN","C0QGMTSG",29,0) .. N WKK S KK="" F S KK=$O(GMTSAL(II,JJ,KK)) Q:KK="" D "RTN","C0QGMTSG",30,0) ... S L=0 F S L=$O(GMTSAL(II,JJ,KK,L)) Q:'L D CKP^GMTSUP Q:$D(GMTSQIT) D AUTOV W !?5,JJ_": " S:$L(KK)>30 WKK=KK,WKK=$$WRAP^GMTSORC(WKK,30) W ?24,$S($L(KK)>30:$P(WKK,"|"),1:KK) D "RTN","C0QGMTSG",31,0) .... I GMTSAV=1 W " (AV" "RTN","C0QGMTSG",32,0) .... E W $S($P(GMTSAL(II,JJ,KK,L),U,5)=1:" (V",$P(GMTSAL(II,JJ,KK,L),U,5)=0:" (NV",1:"") "RTN","C0QGMTSG",33,0) .... W $S($P($G(^GMR(120.8,GMTSALNM,0)),U,6)="h":"/Historical)",$P($G(^(0)),U,6)="o":"/Observed)",1:")") "RTN","C0QGMTSG",34,0) .... I $L($P($G(WKK),"|",2)) D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,$P(WKK,"|",2) "RTN","C0QGMTSG",35,0) .... S (M,MX,ALL)=0 F S M=$O(GMTSAL(II,JJ,KK,L,"S",M)) Q:M="" D Q:$D(GMTSQIT) "RTN","C0QGMTSG",36,0) ..... I ALL=0 D CKP^GMTSUP Q:$D(GMTSQIT) W !?27 "RTN","C0QGMTSG",37,0) ..... S MX=MX+1 "RTN","C0QGMTSG",38,0) ..... W:MX>1 ", " "RTN","C0QGMTSG",39,0) ..... S N=$P(GMTSAL(II,JJ,KK,L,"S",M),";") "RTN","C0QGMTSG",40,0) ..... S ALL=1 I (74)'>($X+$L(N)) D CKP^GMTSUP Q:$D(GMTSQIT) W !,?27,N Q "RTN","C0QGMTSG",41,0) ..... S ALL=1 W N "RTN","C0QGMTSG",42,0) .... D SIGBLK($P(GMTSAFN,U,5)) "RTN","C0QGMTSG",43,0) .... D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,"Date/Time: " S ODT=$P(GMTSAFN,U,4) S X=ODT D REGDTM4^GMTSU W X,! "RTN","C0QGMTSG",44,0) ....S CC="" F S CC=$O(^GMR(120.8,GMTSALNM,26,"B",CC)) Q:CC="" D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,"Comments at: " S X=CC D REGDTM4^GMTSU S CD=X S CCC=0 F S CCC=$O(^GMR(120.8,GMTSALNM,26,"B",CC,CCC)) Q:'CCC D TEXT "RTN","C0QGMTSG",45,0) Q "RTN","C0QGMTSG",46,0) NKA ; No known allergies "RTN","C0QGMTSG",47,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS))!($L($G(GMTSALAD))) ! "RTN","C0QGMTSG",48,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS)) ?22,$G(GMTSALAS),! "RTN","C0QGMTSG",49,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAS))!($L($G(GMTSALAD)))!($L($G(GMTSALAW))) ?24,"Assessment date: ",$G(GMTSALAD),! "RTN","C0QGMTSG",50,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAW)) ?28,"Assessed by: ",GMTSALAW,! "RTN","C0QGMTSG",51,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(GMTSALAW))&($L($G(GMTSALAT))) ?34,"Title: ",GMTSALAT,! "RTN","C0QGMTSG",52,0) Q "RTN","C0QGMTSG",53,0) GETALLRG ; Get Allergies "RTN","C0QGMTSG",54,0) S GMRA="0^0^111^1" D EN1^C0QGMRAD I GMRAL="" S ALLRG=0 Q "RTN","C0QGMTSG",55,0) I +($G(DFN))>0,+($G(GMRAL))=0 D ALLAS S ALLRG=0 Q "RTN","C0QGMTSG",56,0) I $D(GMRAL)>9 D "RTN","C0QGMTSG",57,0) . S I=0 F GMTSCNT=1:1 S I=$O(GMRAL(I)) Q:'I D "RTN","C0QGMTSG",58,0) .. S GMTSTY=$P(GMRAL(I),U,7) Q:GMTSTY']"" "RTN","C0QGMTSG",59,0) .. S GMTSEACT=$P(GMRAL(I),U,2) Q:GMTSEACT']"" "RTN","C0QGMTSG",60,0) .. S GMTSMECH=$P($P(GMRAL(I),U,8),";") "RTN","C0QGMTSG",61,0) .. S:GMTSMECH']"" GMTSMECH="UNKNOWN" "RTN","C0QGMTSG",62,0) .. S GMTSAL(GMTSTY,GMTSMECH,GMTSEACT,GMTSCNT)=I_"^"_GMRAL(I) "RTN","C0QGMTSG",63,0) .. S JJ=0 F S JJ=$O(GMRAL(I,"S",JJ)) Q:'JJ S GMTSAL(GMTSTY,GMTSMECH,GMTSEACT,GMTSCNT,"S",JJ)=GMRAL(I,"S",JJ) "RTN","C0QGMTSG",64,0) .. S ALLRG=1 "RTN","C0QGMTSG",65,0) Q "RTN","C0QGMTSG",66,0) ALLAS ; Allergy Assessment "RTN","C0QGMTSG",67,0) N X,GMTSALG1,GMTSALG2,GMTSALG3,GMTSAU S (GMTSALAS,GMTSALAD,GMTSALAW)="" S GMTSALAS="No known allergies" "RTN","C0QGMTSG",68,0) S GMTSALAD=$$GET1^DIQ(120.86,+($G(DFN)),3,"I",,"GMTSALG2") S:$D(GMTSALG2) GMTSALAD="" S:+GMTSALAD=0 GMTSALAD="" "RTN","C0QGMTSG",69,0) I +GMTSALAD>0 S X=GMTSALAD D REGDT4^GMTSU S GMTSALAD=X "RTN","C0QGMTSG",70,0) S GMTSAU=$$GET1^DIQ(120.86,+($G(DFN)),2,"I") "RTN","C0QGMTSG",71,0) S GMTSALAW=$$GET1^DIQ(200,(+GMTSAU_","),.01,"E",,"GMTSALG3") "RTN","C0QGMTSG",72,0) S GMTSALAT=$$GET1^DIQ(200,(+GMTSAU_","),20.3) "RTN","C0QGMTSG",73,0) S:$D(GMTSALG3) (GMTSALAW,GMTSALAT)="" "RTN","C0QGMTSG",74,0) Q "RTN","C0QGMTSG",75,0) AUTOV ; Autoverify "RTN","C0QGMTSG",76,0) S GMTSAV=0,GMTSALNM=$P(GMTSAL(II,JJ,KK,L),U),GMTSAFN=$G(^GMR(120.8,GMTSALNM,0)) "RTN","C0QGMTSG",77,0) I $P(GMTSAFN,U,18)="",$P(GMTSAFN,U,16)=1 S GMTSAV=1 "RTN","C0QGMTSG",78,0) Q "RTN","C0QGMTSG",79,0) TITLE ; Print title "RTN","C0QGMTSG",80,0) D CKP^GMTSUP Q:$D(GMTSQIT) "RTN","C0QGMTSG",81,0) I $D(GMTSPNF) W ?21,TITLE,! "RTN","C0QGMTSG",82,0) E W ?21,"Title: ",TITLE,! "RTN","C0QGMTSG",83,0) Q "RTN","C0QGMTSG",84,0) TEXT ; Setup for print of allergy comments "RTN","C0QGMTSG",85,0) W ?31,CD D CKP^GMTSUP Q:$D(GMTSQIT) "RTN","C0QGMTSG",86,0) K ^UTILITY($J,"W") S GMTSLN=0 F S GMTSLN=$O(^GMR(120.8,GMTSALNM,26,CCC,2,GMTSLN)) Q:'GMTSLN S GMTSPRT=^GMR(120.8,GMTSALNM,26,CCC,2,GMTSLN,0) D FORMAT "RTN","C0QGMTSG",87,0) I $D(^UTILITY($J,"W")) F GMTSLN=1:1:^UTILITY($J,"W",DIWL) D LINE Q:$D(GMTSQIT) "RTN","C0QGMTSG",88,0) K ^UTILITY($J,"W") "RTN","C0QGMTSG",89,0) Q:'GMTSLN "RTN","C0QGMTSG",90,0) W ! Q "RTN","C0QGMTSG",91,0) FORMAT ; Formats each line "RTN","C0QGMTSG",92,0) S DIWL=3,DIWR=80,DIWF="C58",X=GMTSPRT D ^DIWP "RTN","C0QGMTSG",93,0) Q "RTN","C0QGMTSG",94,0) LINE ; Writes formatted lines of text "RTN","C0QGMTSG",95,0) D CKP^GMTSUP Q:$D(GMTSQIT) W !,?24,^UTILITY($J,"W",DIWL,GMTSLN,0) "RTN","C0QGMTSG",96,0) Q "RTN","C0QGMTSG",97,0) SIGBLK(GMTSALF) ; Signature block "RTN","C0QGMTSG",98,0) Q:+GMTSALF'>0 N GMTSSB,GMTSST,GMTSSN S GMTSSB=$$GET1^DIQ(200,(+GMTSALF_","),20.2),GMTSST=$$GET1^DIQ(200,(+GMTSALF_","),20.3),GMTSSN=$$GET1^DIQ(200,(+GMTSALF_","),.01) "RTN","C0QGMTSG",99,0) D CKP^GMTSUP Q:$D(GMTSQIT) W !!,?24,"Originator: ",$S(GMTSSB'="":GMTSSB,1:GMTSSN) "RTN","C0QGMTSG",100,0) D CKP^GMTSUP Q:$D(GMTSQIT) W:$L(GMTSST) !,?24,"Title: ",GMTSST "RTN","C0QGMTSG",101,0) Q "RTN","C0QHF") 0^11^B4977233 "RTN","C0QHF",1,0) C0QHF ; GPL - Health Factor Utility Routines ;9/02/11 17:05 "RTN","C0QHF",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QHF",3,0) ;Copyright 2011 George Lilly. Licensed under the terms of the GNU "RTN","C0QHF",4,0) ;General Public License See attached copy of the License. "RTN","C0QHF",5,0) ; "RTN","C0QHF",6,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QHF",7,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QHF",8,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QHF",9,0) ;(at your option) any later version. "RTN","C0QHF",10,0) ; "RTN","C0QHF",11,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QHF",12,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QHF",13,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QHF",14,0) ;GNU General Public License for more details. "RTN","C0QHF",15,0) ; "RTN","C0QHF",16,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QHF",17,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QHF",18,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QHF",19,0) ; "RTN","C0QHF",20,0) Q "RTN","C0QHF",21,0) ; "RTN","C0QHF",22,0) ; these routines are for quick lookups on HEALTH FACTOR and V HEALTH FACTOR "RTN","C0QHF",23,0) ; files... "RTN","C0QHF",24,0) ; "RTN","C0QHF",25,0) ; from the DD: "RTN","C0QHF",26,0) ;STANDARD DATA DICTIONARY #9000010.23 -- V HEALTH FACTORS FILE "RTN","C0QHF",27,0) ;STORED IN ^AUPNVHF( (6744 ENTRIES) "RTN","C0QHF",28,0) ;CROSS REFERENCED BY: PATIENT NAME(AATOO), HEALTH FACTOR(AATOO1), VISIT(AD), "RTN","C0QHF",29,0) ; VISIT(AV10), HEALTH FACTOR(B), PATIENT NAME(C) "RTN","C0QHF",30,0) ; "RTN","C0QHF",31,0) ;STANDARD DATA DICTIONARY #9999999.64 -- HEALTH FACTORS FILE "RTN","C0QHF",32,0) ;STORED IN ^AUTTHF( (8656 ENTRIES) "RTN","C0QHF",33,0) ;CROSS REFERENCED BY: CATEGORY(AC), ENTRY TYPE(AD), FACTOR(B), SYNONYM(D) "RTN","C0QHF",34,0) ; "RTN","C0QHF",35,0) HFYN(DFN,C0QHF) ; EXTRINSIC RETURNS 1 (YES) OR 0 (NO) IF A PATIENT "RTN","C0QHF",36,0) ; HAS A HEALTH FACTOR "RTN","C0QHF",37,0) N ZI,ZJ,ZR "RTN","C0QHF",38,0) S ZI=$O(^AUTTHF("B",C0QHF,"")) ; HEALTH FACTOR IEN "RTN","C0QHF",39,0) I ZI="" D Q 0 ; "RTN","C0QHF",40,0) . W !,"BAD HEALTH FACTOR: ",C0QHF "RTN","C0QHF",41,0) I $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1 "RTN","C0QHF",42,0) E S ZR=0 "RTN","C0QHF",43,0) Q ZR "RTN","C0QHF",44,0) ; "RTN","C0QHF",45,0) HFIEN(ZHF) ; EXTRINSIC RETURNS THE IEN OF THE HEALTHFACTOR "RTN","C0QHF",46,0) N ZI "RTN","C0QHF",47,0) S ZI=$O(^AUTTHF("B",ZHF,"")) ; HEALTH FACTOR IEN "RTN","C0QHF",48,0) Q ZI "RTN","C0QHF",49,0) ; "RTN","C0QHF",50,0) VHFIEN(DFN,ZHF) ; EXTRINSIC RETURNS THE LAST IEN OF THIS HEALTH FACTOR "RTN","C0QHF",51,0) ; FOR THE PATIENT "RTN","C0QHF",52,0) N ZG,ZJ,ZK "RTN","C0QHF",53,0) S ZG=$$HFIEN(ZHF) "RTN","C0QHF",54,0) I ZG="" Q ; OPPS HEALTH FACTOR NOT FOUND "RTN","C0QHF",55,0) S ZJ=$O(^AUPNVHF("AA",DFN,ZG,""),-1) ;DATE "RTN","C0QHF",56,0) S ZK=$O(^AUPNVHF("AA",DFN,ZG,ZJ,"")) ;IEN "RTN","C0QHF",57,0) Q ZK "RTN","C0QHF",58,0) ; "RTN","C0QHF",59,0) HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY "RTN","C0QHF",60,0) ; RTN IS PASSED BY REFERENCE AND RETURNS AN ARRAY OF HEALTH FACTORS "RTN","C0QHF",61,0) ; THAT THE PATIENT HAS IN THE CATEGORY. RETURNS NULL IF NONE "RTN","C0QHF",62,0) ; FORMAT RNT(HEALTH FACTOR IEN,HEALTH FACTOR NAME)="" "RTN","C0QHF",63,0) N ZI "RTN","C0QHF",64,0) S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN "RTN","C0QHF",65,0) N C0QN,C0QO,C0QR "RTN","C0QHF",66,0) S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS "RTN","C0QHF",67,0) S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY "RTN","C0QHF",68,0) D UNITY^C0QSET("C0QR",C0QN,C0QO) ; THE DIFFERENCE "RTN","C0QHF",69,0) K RTN ; CLEAR THE RETURN ARRAY "RTN","C0QHF",70,0) N ZJ S ZJ="" "RTN","C0QHF",71,0) F S ZJ=$O(C0QR(1,ZJ)) Q:ZJ="" D ; FOR ALL HEALTH FACTOR MATCHES "RTN","C0QHF",72,0) . S RTN(ZJ,$P(^AUTTHF(ZJ,0),"^",1))="" "RTN","C0QHF",73,0) Q "RTN","C0QHF",74,0) ; "RTN","C0QHF",75,0) HFLCAT(RTN,C0QHFCAT) ; RETURNS A LIST OF PATIENTS WHO HAVE A HEALTH FACTOR "RTN","C0QHF",76,0) ; IN THE C0QHFCAT CATEGORY. RTN IS PASSED BY REFERENCE "RTN","C0QHF",77,0) ; THIS WILL BE HARD TO DO WITHOUT SOME NEW INDEXES "RTN","C0QHF",78,0) Q "RTN","C0QHF",79,0) ; "RTN","C0QHF",80,0) HFLPAT(RTN,C0QHF) ; RETURNS A LIST OF PATIENTS WHO HAVE A SPECIFIC HEALTH "RTN","C0QHF",81,0) ; FACTOR. RTN IS PASSED BY REFERENCE "RTN","C0QHF",82,0) ; THIS ONE ALSO WILL BE HARD TO DO QUICKLY WITHOUT A NEW INDEX "RTN","C0QHF",83,0) Q "RTN","C0QHF",84,0) ; "RTN","C0QHF",85,0) INDEXES(DDREF) ;PRINT THE INDEXES ACTUALLY ON FILE DDREF "RTN","C0QHF",86,0) ; IE D INDEXES($NA(^DD)) "RTN","C0QHF",87,0) N ZI "RTN","C0QHF",88,0) S ZI="A" "RTN","C0QHF",89,0) F S ZI=$O(@DDREF@(ZI)) Q:ZI="" W !,ZI "RTN","C0QHF",90,0) Q "RTN","C0QHF",91,0) ; "RTN","C0QIMMUN") 0^6^B6463760 "RTN","C0QIMMUN",1,0) C0QIMMUN ;Prep Immunization Order data for HL7 Message creation ; "RTN","C0QIMMUN",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QIMMUN",3,0) ; ^XTMP("C0QIMMUN",0)=purge date^create date "RTN","C0QIMMUN",4,0) ; ^XTMP("C0QIMMUN",order_date,order#,item_name)=item_value "RTN","C0QIMMUN",5,0) ; ^XTMP("C0QIMMUN","LASTORDR")=last order processed "RTN","C0QIMMUN",6,0) FIND ; Find the next set of immunization orders "RTN","C0QIMMUN",7,0) N X1,X2,X,%,%DT,%H,%T,NOW,ORDER,LASTORDR,SUBSC,DIR "RTN","C0QIMMUN",8,0) S LASTORDR=+$G(^XTMP("C0QIMMUN","LASTORDR")) "RTN","C0QIMMUN",9,0) W !,"The ""Last Order"" from which to begin checking for Immunization orders is: ",LASTORDR "RTN","C0QIMMUN",10,0) S DIR("A")="Do you want to reset that value" "RTN","C0QIMMUN",11,0) S DIR(0)="Y",DIR("B")="NO" D ^DIR D:Y=1 "RTN","C0QIMMUN",12,0) . S DIR("A")="What value shall be used?" "RTN","C0QIMMUN",13,0) . S DIR(0)="NO",DIR("B")=LASTORDR D ^DIR "RTN","C0QIMMUN",14,0) . W:Y'>0 !,"We'll skip reseting it then." "RTN","C0QIMMUN",15,0) . D:Y>0 "RTN","C0QIMMUN",16,0) . . S LASTORDR=+Y "RTN","C0QIMMUN",17,0) . . L +^XTMP("C0QIMMUN") "RTN","C0QIMMUN",18,0) . . S X1=DT,X2=365 D C^%DTC "RTN","C0QIMMUN",19,0) . . S ^XTMP("C0QIMMUN",0)=X_U_DT "RTN","C0QIMMUN",20,0) . . S ^XTMP("C0QIMMUN","LASTORDR")=LASTORDR "RTN","C0QIMMUN",21,0) . . L -^XTMP("C0QIMMUN") "RTN","C0QIMMUN",22,0) . . Q "RTN","C0QIMMUN",23,0) . Q "RTN","C0QIMMUN",24,0) S DIR("A")="Ready to prep more immunization orders for HL7 messages" "RTN","C0QIMMUN",25,0) S DIR(0)="Y",DIR("B")="YES" D ^DIR Q:Y'=1 "RTN","C0QIMMUN",26,0) L +^XTMP("C0QIMMUN") "RTN","C0QIMMUN",27,0) I '$D(^XTMP("C0QIMMUN",0)) D "RTN","C0QIMMUN",28,0) . S X1=DT,X2=365 D C^%DTC "RTN","C0QIMMUN",29,0) . S ^XTMP("C0QIMMUN",0)=X_U_DT "RTN","C0QIMMUN",30,0) . S ^XTMP("C0QIMMUN","LASTORDR")=0 "RTN","C0QIMMUN",31,0) S ORDER=^XTMP("C0QIMMUN","LASTORDR") "RTN","C0QIMMUN",32,0) F S ORDER=$O(^OR(100,ORDER)) Q:ORDER'>0 D "RTN","C0QIMMUN",33,0) . S LASTORDR=ORDER "RTN","C0QIMMUN",34,0) . D:$D(^OR(100,ORDER,4.5,"ID","ORZ HL7")) GOTONE "RTN","C0QIMMUN",35,0) . Q "RTN","C0QIMMUN",36,0) S ^XTMP("C0QIMMUN","LASTORDR")=LASTORDR "RTN","C0QIMMUN",37,0) W !,"Done",!,"Last Order processed: ",LASTORDR,! "RTN","C0QIMMUN",38,0) L -^XTMP("C0QIMMUN") "RTN","C0QIMMUN",39,0) Q "RTN","C0QIMMUN",40,0) GOTONE ; Take the order number and move the relevant HL7 information into ^XTMP "RTN","C0QIMMUN",41,0) S NOW=$P(^OR(100,ORDER,0),U,7) "RTN","C0QIMMUN",42,0) S ^XTMP("C0QIMMUN",NOW,ORDER,"PATIENT")=$P(^OR(100,ORDER,0),U,2) "RTN","C0QIMMUN",43,0) S ^XTMP("C0QIMMUN",NOW,ORDER,"LOCATION")=$P(^OR(100,ORDER,0),U,10) "RTN","C0QIMMUN",44,0) S ^XTMP("C0QIMMUN",NOW,ORDER,"ORDEREDBY")=$P(^OR(100,ORDER,0),U,6) "RTN","C0QIMMUN",45,0) S ENTRY=0 F S ENTRY=$O(^OR(100,ORDER,4.5,ENTRY)) Q:ENTRY'>0 D "RTN","C0QIMMUN",46,0) . S SUBSC=$P($G(^OR(100,ORDER,4.5,ENTRY,0)),U,4) "RTN","C0QIMMUN",47,0) . Q:'$L(SUBSC) "RTN","C0QIMMUN",48,0) . I SUBSC'="TIME" S ^XTMP("C0QIMMUN",NOW,ORDER,SUBSC)=^OR(100,ORDER,4.5,ENTRY,1) "RTN","C0QIMMUN",49,0) . E S X=^OR(100,ORDER,4.5,ENTRY,1),%DT="TS" D ^%DT S ^XTMP("C0QIMMUN",NOW,ORDER,SUBSC)=Y "RTN","C0QIMMUN",50,0) . Q "RTN","C0QIMMUN",51,0) S ^XTMP("C0QIMMUN",NOW,ORDER,"ORDERTEXT")=$G(^OR(100,ORDER,8,1,.1,1,0)) "RTN","C0QIMMUN",52,0) Q "RTN","C0QINIT") 0^14^B5128171 "RTN","C0QINIT",1,0) C0QINIT ; GPL - Quality Reporting Initialization Routines ;12/01/11 17:05 "RTN","C0QINIT",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QINIT",3,0) ;Copyright 2011 George Lilly. Licensed under the terms of the GNU "RTN","C0QINIT",4,0) ;General Public License See attached copy of the License. "RTN","C0QINIT",5,0) ; "RTN","C0QINIT",6,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QINIT",7,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QINIT",8,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QINIT",9,0) ;(at your option) any later version. "RTN","C0QINIT",10,0) ; "RTN","C0QINIT",11,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QINIT",12,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QINIT",13,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QINIT",14,0) ;GNU General Public License for more details. "RTN","C0QINIT",15,0) ; "RTN","C0QINIT",16,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QINIT",17,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QINIT",18,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QINIT",19,0) ; "RTN","C0QINIT",20,0) Q "RTN","C0QINIT",21,0) ; "RTN","C0QINIT",22,0) C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE "RTN","C0QINIT",23,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QINIT",24,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QINIT",25,0) C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE "RTN","C0QINIT",26,0) C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE "RTN","C0QINIT",27,0) RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE "RTN","C0QINIT",28,0) RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE "RTN","C0QINIT",29,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ; "RTN","C0QINIT",30,0) ; "RTN","C0QINIT",31,0) COPYQ ; INTERACTIVE COPY OF A QUALITY MEASURE "RTN","C0QINIT",32,0) N FN "RTN","C0QINIT",33,0) S FN=$$C0QQFN "RTN","C0QINIT",34,0) S DIC=FN,DIC(0)="AEMQ" D ^DIC "RTN","C0QINIT",35,0) I Y<1 Q ; EXIT "RTN","C0QINIT",36,0) S C0QIEN=$P(Y,U) "RTN","C0QINIT",37,0) ;N G,ZWP "RTN","C0QINIT",38,0) D GETS^DIQ(FN,C0QIEN,"**","EI","G") "RTN","C0QINIT",39,0) M ZWP=G(FN,C0QIEN_",",.61) "RTN","C0QINIT",40,0) ; GET READY TO CREATE THE NEW COPY "RTN","C0QINIT",41,0) ; FIRST FIND OUT THE NEW NAME "RTN","C0QINIT",42,0) N QNAME "RTN","C0QINIT",43,0) S QNAME=G(FN,C0QIEN_",",.01,"E") "RTN","C0QINIT",44,0) S DIR(0)="F^3:240" "RTN","C0QINIT",45,0) S DIR("A")="New Measure Name" "RTN","C0QINIT",46,0) S DIR("B")=QNAME "RTN","C0QINIT",47,0) D ^DIR "RTN","C0QINIT",48,0) I Y="^" Q ; "RTN","C0QINIT",49,0) N QNEW "RTN","C0QINIT",50,0) S QNEW=Y "RTN","C0QINIT",51,0) K C0QFDA "RTN","C0QINIT",52,0) N ZI S ZI="" "RTN","C0QINIT",53,0) F S ZI=$O(G(FN,C0QIEN_",",ZI)) Q:ZI="" D ; FOR EACH FIELD "RTN","C0QINIT",54,0) . I ZI=.01 D Q ; THE NEW NAME "RTN","C0QINIT",55,0) . . S C0QFDA(FN,"+1,",.01)=QNEW ; NEW MEASURE NAME "RTN","C0QINIT",56,0) . I ZI=3.1 Q ; SKIP THE COMPUTED FIELD "RTN","C0QINIT",57,0) . S C0QFDA(FN,"+1,",ZI)=G(FN,C0QIEN_",",ZI,"I") "RTN","C0QINIT",58,0) D UPDIE ; CREATE THE NEW RECORD "RTN","C0QINIT",59,0) S DIE=$$C0QQFN ; GET READY TO EDIT IT "RTN","C0QINIT",60,0) D EN^DIB ; EDIT THE NEW RECORD "RTN","C0QINIT",61,0) Q "RTN","C0QINIT",62,0) ; "RTN","C0QINIT",63,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QINIT",64,0) K ZERR "RTN","C0QINIT",65,0) D CLEAN^DILF "RTN","C0QINIT",66,0) ZWR C0QFDA "RTN","C0QINIT",67,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QINIT",68,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, "RTN","C0QINIT",69,0) ; INVOKE THE ERROR TRAP IF TASKED "RTN","C0QINIT",70,0) K C0QFDA "RTN","C0QINIT",71,0) Q "RTN","C0QINIT",72,0) ; "RTN","C0QKIDS") 0^^B6264637 "RTN","C0QKIDS",1,0) C0QKIDS ; VEN/SMH - Kids Utilities for transporting C0Q data ; 5/21/12 7:34pm "RTN","C0QKIDS",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QKIDS",3,0) ; Licensed under package license. See Documentation. "RTN","C0QKIDS",4,0) ; "RTN","C0QKIDS",5,0) ; PEPs: TRAN, POST "RTN","C0QKIDS",6,0) ; "RTN","C0QKIDS",7,0) TRAN ; Unified Transport; PEP "RTN","C0QKIDS",8,0) D TRAN301 QUIT "RTN","C0QKIDS",9,0) POST ; Unified Post; PEP "RTN","C0QKIDS",10,0) D POST301 QUIT "RTN","C0QKIDS",11,0) ; "RTN","C0QKIDS",12,0) ; << >> "RTN","C0QKIDS",13,0) ; "RTN","C0QKIDS",14,0) TRAN301 ; Grab FDA for entire file C0Q PATIENT LIST and store in Transport Global; Private EP "RTN","C0QKIDS",15,0) N C0QIEN S C0QIEN=0 ; IEN walker "RTN","C0QKIDS",16,0) N C0QREF S C0QREF=$NAME(^TMP("C0Q1130580001.301",$J)) ; Temporary Global Reference "RTN","C0QKIDS",17,0) K @C0QREF ; Kill that "RTN","C0QKIDS",18,0) F S C0QIEN=$O(^C0Q(301,C0QIEN)) Q:'+C0QIEN D GETS^DIQ(1130580001.301,C0QIEN_",","*","",C0QREF) ; Load FDA's in there "RTN","C0QKIDS",19,0) M @XPDGREF@("C0Q","1130580001.301")=@C0QREF ; Put in Transport Global "RTN","C0QKIDS",20,0) K @C0QREF ; Remove "RTN","C0QKIDS",21,0) QUIT "RTN","C0QKIDS",22,0) ; "RTN","C0QKIDS",23,0) POST301 ; Get FDA from Transport Global and install in destination system for C0Q PATIENT LIST; Private EP "RTN","C0QKIDS",24,0) N C0QFDA S C0QFDA=$NAME(@XPDGREF@("C0Q","1130580001.301")) ; FDA array name is the global reference "RTN","C0QKIDS",25,0) N C0QERR ; Error "RTN","C0QKIDS",26,0) D UPDATE^DIE("E",C0QFDA,"","C0QERR") ; File all "RTN","C0QKIDS",27,0) I $D(C0QERR) D ; if there's an error, print it out "RTN","C0QKIDS",28,0) . D MES^XPDUTL("Couldn't add data into C0Q PATIENT LIST file") "RTN","C0QKIDS",29,0) . S C0QERR=$Q(C0QERR) "RTN","C0QKIDS",30,0) . F S C0QERR=$Q(@C0QERR) Q:C0QERR="" D MES^XPDUTL(C0QERR_": "_@C0QERR) "RTN","C0QKIDS",31,0) QUIT "RTN","C0QKIDS",32,0) ; "RTN","C0QKIDS",33,0) POST101 ; Clean transported data from broken pointers in destination systems; Private EP "RTN","C0QKIDS",34,0) N C0QIEN S C0QIEN=0 ; Ien looper "RTN","C0QKIDS",35,0) N C0QFDA ; Fileman Data Array "RTN","C0QKIDS",36,0) F S C0QIEN=$O(^C0Q(101,C0QIEN)) Q:'+C0QIEN DO ; For each record, delete these fields "RTN","C0QKIDS",37,0) . S C0QFDA(1130580001.101,C0QIEN_",",1)="@" ; NUMERATOR PATIENT LIST "RTN","C0QKIDS",38,0) . S C0QFDA(1130580001.101,C0QIEN_",",1.5)="@" ; NEGATIVE NUMERATOR LIST "RTN","C0QKIDS",39,0) . S C0QFDA(1130580001.101,C0QIEN_",",2)="@" ; DENOMINATOR PATIENT LIST "RTN","C0QKIDS",40,0) N C0QERR ; Errors "RTN","C0QKIDS",41,0) D FILE^DIE("","C0QFDA","C0QERR") ; Do it! "RTN","C0QKIDS",42,0) I $D(C0QERR) D ; if there's an error, print it out "RTN","C0QKIDS",43,0) . D MES^XPDUTL("Couldn't fix data into C0Q QUALITY MEASURE file") "RTN","C0QKIDS",44,0) . S C0QERR=$Q(C0QERR) "RTN","C0QKIDS",45,0) . F S C0QERR=$Q(@C0QERR) Q:C0QERR="" D MES^XPDUTL(C0QERR_": "_@C0QERR) "RTN","C0QKIDS",46,0) QUIT "RTN","C0QMAIN") 0^1^B116855264 "RTN","C0QMAIN",1,0) C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10 17:05 "RTN","C0QMAIN",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QMAIN",3,0) ;Copyright 2009 George Lilly. Licensed under the terms of the GNU "RTN","C0QMAIN",4,0) ;General Public License See attached copy of the License. "RTN","C0QMAIN",5,0) ; "RTN","C0QMAIN",6,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QMAIN",7,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QMAIN",8,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QMAIN",9,0) ;(at your option) any later version. "RTN","C0QMAIN",10,0) ; "RTN","C0QMAIN",11,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QMAIN",12,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QMAIN",13,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QMAIN",14,0) ;GNU General Public License for more details. "RTN","C0QMAIN",15,0) ; "RTN","C0QMAIN",16,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QMAIN",17,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QMAIN",18,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QMAIN",19,0) ; "RTN","C0QMAIN",20,0) Q "RTN","C0QMAIN",21,0) ; "RTN","C0QMAIN",22,0) C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE "RTN","C0QMAIN",23,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QMAIN",24,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QMAIN",25,0) C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE "RTN","C0QMAIN",26,0) C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE "RTN","C0QMAIN",27,0) RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE "RTN","C0QMAIN",28,0) RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE "RTN","C0QMAIN",29,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ; "RTN","C0QMAIN",30,0) EXPORT ; EXPORT ENTRY POINT FOR CCR "RTN","C0QMAIN",31,0) ; Select a patient. "RTN","C0QMAIN",32,0) N C0QMS,C0QM,C0QMIEN,C0QNA,C0QNORD "RTN","C0QMAIN",33,0) S C0QNORD=3 ; WE WANT DENOMINATORS USE 1 FOR NUMERATORS "RTN","C0QMAIN",34,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",35,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",36,0) S C0QMS=$P(Y,U,1) ; SET THE MEASURE SET "RTN","C0QMAIN",37,0) S DIC=$$C0QQFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",38,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",39,0) S C0QM=$P(Y,U,1) ; SET THE MEASURE IEN "RTN","C0QMAIN",40,0) N C0QMN S C0QMN=$P(Y,U,2) ; SET THE MEASURE NAME "RTN","C0QMAIN",41,0) S C0QMIEN=$O(^C0Q(201,C0QMS,5,"B",C0QM,"")) "RTN","C0QMAIN",42,0) S C0QNA=$NA(^C0Q(201,C0QMS,5,C0QMIEN,C0QNORD,"B")) "RTN","C0QMAIN",43,0) N ZI S ZI="" "RTN","C0QMAIN",44,0) F S ZI=$O(@C0QNA@(ZI)) Q:ZI="" D ; "RTN","C0QMAIN",45,0) . W !,ZI "RTN","C0QMAIN",46,0) . N ONAME S ONAME=C0QMN_"_"_ZI_"_CCR_V1_0_0.xml" "RTN","C0QMAIN",47,0) . D XPAT^C0CCCR(ZI,,,ONAME) ; EXPORT TO A FILE "RTN","C0QMAIN",48,0) Q "RTN","C0QMAIN",49,0) ; "RTN","C0QMAIN",50,0) NBYP ; ENTRY POINT FOR COMMAND LINE BY PATIENT MEASURE LISTING "RTN","C0QMAIN",51,0) ; "RTN","C0QMAIN",52,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",53,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",54,0) N MSIEN S MSIEN=+Y "RTN","C0QMAIN",55,0) W !,"NUMERATOR PATIENT LIST",! "RTN","C0QMAIN",56,0) N C0QPAT "RTN","C0QMAIN",57,0) D PATS(.C0QPAT,MSIEN,"N") ; GET THE NUMERATOR PATIENT LIST "RTN","C0QMAIN",58,0) I $D(C0QPAT) D ; LIST RETURNED "RTN","C0QMAIN",59,0) . ; "RTN","C0QMAIN",60,0) Q "RTN","C0QMAIN",61,0) ; "RTN","C0QMAIN",62,0) DBYP ; ENTRY POINT FOR COMMAND LINE BY PATIENT MEASURE LISTING "RTN","C0QMAIN",63,0) ; "RTN","C0QMAIN",64,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",65,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",66,0) N MSIEN S MSIEN=+Y "RTN","C0QMAIN",67,0) N C0QPAT "RTN","C0QMAIN",68,0) W !,"DENOMINATOR PATIENT LIST",! "RTN","C0QMAIN",69,0) D PATS(.C0QPAT,MSIEN,"D") ; GET THE NUMERATOR PATIENT LIST "RTN","C0QMAIN",70,0) I $D(C0QPAT) D ; LIST RETURNED "RTN","C0QMAIN",71,0) . ; "RTN","C0QMAIN",72,0) . ; "RTN","C0QMAIN",73,0) Q "RTN","C0QMAIN",74,0) ; "RTN","C0QMAIN",75,0) ENEXP ; EXTERNAL MENU ENTRY POINT FOR EXP "RTN","C0QMAIN",76,0) ; "RTN","C0QMAIN",77,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",78,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",79,0) N MSIEN S MSIEN=+Y "RTN","C0QMAIN",80,0) D EXP(MSIEN) "RTN","C0QMAIN",81,0) Q "RTN","C0QMAIN",82,0) ; "RTN","C0QMAIN",83,0) EXP(MSET,NOEX) ; EXPORT ALL PATIENTS FOR MEASURE SET IEN MSET "RTN","C0QMAIN",84,0) ; ALSO, WRITE OUT THE BY PATIENT MEASURE TEXT FILE "RTN","C0QMAIN",85,0) ; IF NOEX=1, THEN ONLY THE MEASURE TEXT FILE GETS WRITTEN, NO EXPORTS ARE "RTN","C0QMAIN",86,0) ; DONE "RTN","C0QMAIN",87,0) I '$D(NOEX) S NOEX=0 "RTN","C0QMAIN",88,0) N ZQI,ZARY,ZFN,ODIR "RTN","C0QMAIN",89,0) S ZQI="" "RTN","C0QMAIN",90,0) D PATS(.ZARY,MSET,"D",1) "RTN","C0QMAIN",91,0) S ZFN="MEASURES-BY-PATIENT.txt" "RTN","C0QMAIN",92,0) S ODIR=^TMP("C0CCCR","ODIR") ; OUTPUT DIRECTORY "RTN","C0QMAIN",93,0) S GARY=$NA(^TMP("C0Q",$J)) "RTN","C0QMAIN",94,0) K @GARY "RTN","C0QMAIN",95,0) M @GARY=ZARY "RTN","C0QMAIN",96,0) S GARY1=$NA(@GARY@(1)) "RTN","C0QMAIN",97,0) N ZY "RTN","C0QMAIN",98,0) S ZY=$$OUTPUT^C0CXPATH(GARY1,ZFN,ODIR) "RTN","C0QMAIN",99,0) W !,ZY "RTN","C0QMAIN",100,0) I NOEX=1 Q ; DO NOT EXPORT "RTN","C0QMAIN",101,0) F S ZQI=$O(ZARY(ZQI)) Q:ZQI="" D ; FOR EACH PATIENT "RTN","C0QMAIN",102,0) . D XPAT^C0CCCR(+ZARY(ZQI)) ; "RTN","C0QMAIN",103,0) Q "RTN","C0QMAIN",104,0) ; "RTN","C0QMAIN",105,0) PATS(ZRTN,MSIEN,NORD,QT) ; BUILDS A LIST OF PATIENTS AND THEIR MEASURES "RTN","C0QMAIN",106,0) ; FOR MEASURE SET MSET. NORD="N" (DEFAULT) MEANS NUMERATOR PATIENTS "RTN","C0QMAIN",107,0) ; NORD="D" MEANS DENOMINATOR PATIENTS "RTN","C0QMAIN",108,0) ; QT=1 MEANS QUIET "RTN","C0QMAIN",109,0) I $G(QT)'=1 S QT=0 "RTN","C0QMAIN",110,0) N ZI,ZJ,ZK,ZIDX,ZN,ZM "RTN","C0QMAIN",111,0) S ZN=0 ; COUNT OF PATIENTS "RTN","C0QMAIN",112,0) S ZI="" "RTN","C0QMAIN",113,0) ; GOING TO USE THE NUMERATOR BY PATIENT INDEX "RTN","C0QMAIN",114,0) I '$D(NORD) S NORD="N" "RTN","C0QMAIN",115,0) I '((NORD="N")!(NORD="D")) S NORD="N" "RTN","C0QMAIN",116,0) I NORD="N" S ZIDX=$NA(^C0Q(201,"ANBYP")) "RTN","C0QMAIN",117,0) E S ZIDX=$NA(^C0Q(201,"ADBYP")) "RTN","C0QMAIN",118,0) F S ZI=$O(@ZIDX@(ZI)) Q:ZI="" D ; FOR EACH PATIENT "RTN","C0QMAIN",119,0) . I $O(@ZIDX@(ZI,MSIEN,""))'="" D ; IF PATIENT IS IN THIS SET "RTN","C0QMAIN",120,0) . . I 'QT W !,$$GET1^DIQ(2,ZI_",",.01) ;PATIENT NAME "RTN","C0QMAIN",121,0) . . S ZN=ZN+1 ; INCREMENT PATIENT COUNT "RTN","C0QMAIN",122,0) . . S ZRTN(ZN)=ZI "RTN","C0QMAIN",123,0) . E Q ; NEXT PATIENT "RTN","C0QMAIN",124,0) . S (ZJ,ZK)="" "RTN","C0QMAIN",125,0) . F S ZJ=$O(@ZIDX@(ZI,MSIEN,ZJ)) Q:ZJ="" D ; FOR EACH MEASURE "RTN","C0QMAIN",126,0) . . ;S ZL=$O(@ZIDX@(ZI,MSIEN,ZJ,"")) ; MEASURE IS FOURTH "RTN","C0QMAIN",127,0) . . S ZK="" "RTN","C0QMAIN",128,0) . . S ZK=$$GET1^DIQ($$C0QMMFN,ZJ_","_MSIEN_",",.01,"I") "RTN","C0QMAIN",129,0) . . ;W !,"ZK:",ZK," ZJ:",ZJ," ZI",ZI,! "RTN","C0QMAIN",130,0) . . S ZM=$$GET1^DIQ($$C0QQFN,ZK_",",.01) ; MEASURE NAME "RTN","C0QMAIN",131,0) . . I 'QT W " ",ZM "RTN","C0QMAIN",132,0) . . S ZRTN(ZN)=ZRTN(ZN)_" "_ZM "RTN","C0QMAIN",133,0) Q "RTN","C0QMAIN",134,0) ; "RTN","C0QMAIN",135,0) EN ; ENTRY POINT FOR COMMAND LINE AND MENU ACCESS TO C0QRPC "RTN","C0QMAIN",136,0) ; "RTN","C0QMAIN",137,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",138,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",139,0) N MSIEN S MSIEN=+Y "RTN","C0QMAIN",140,0) ;D C0QRPC(.G,MSIEN) "RTN","C0QMAIN",141,0) D UPDATE^C0QUPDT(.G,MSIEN) "RTN","C0QMAIN",142,0) Q "RTN","C0QMAIN",143,0) ; "RTN","C0QMAIN",144,0) EN2 ; SUMMARY ENTRY POINT FOR COMMAND LINE AND MENU ACCESS TO C0QRPC "RTN","C0QMAIN",145,0) ; "RTN","C0QMAIN",146,0) S DIC=$$C0QMFN,DIC(0)="AEMQ" D ^DIC "RTN","C0QMAIN",147,0) I Y<1 Q ; EXIT "RTN","C0QMAIN",148,0) N MSIEN S MSIEN=+Y "RTN","C0QMAIN",149,0) ; changed by gpl to call the new UPDATE^C0QUPDT routine instead "RTN","C0QMAIN",150,0) D UPDATE^C0QUPDT(.G,MSIEN) "RTN","C0QMAIN",151,0) Q "RTN","C0QMAIN",152,0) ; end gpl change "RTN","C0QMAIN",153,0) S C0QSUM=1 "RTN","C0QMAIN",154,0) D C0QRPC(.G,MSIEN) "RTN","C0QMAIN",155,0) ; iterate over the measures "RTN","C0QMAIN",156,0) S MEASURE=0 "RTN","C0QMAIN",157,0) F S MEASURE=$O(^C0Q(201,MSIEN,5,MEASURE)) Q:MEASURE'>0 D "RTN","C0QMAIN",158,0) . S NUMER=0,DENOM=0 "RTN","C0QMAIN",159,0) . ; now count the numerator patients "RTN","C0QMAIN",160,0) . S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,1,P)) Q:P'>0 S NUMER=NUMER+1 "RTN","C0QMAIN",161,0) . S $P(^C0Q(201,MSIEN,5,MEASURE,2),U)=NUMER "RTN","C0QMAIN",162,0) . ; and count the denominator patients "RTN","C0QMAIN",163,0) . S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,3,P)) Q:P'>0 S DENOM=DENOM+1 "RTN","C0QMAIN",164,0) . Q:DENOM=0 "RTN","C0QMAIN",165,0) . ; and stuff the values "RTN","C0QMAIN",166,0) . S $P(^C0Q(201,MSIEN,5,MEASURE,4),U,1,2)=DENOM_U_$J(100*NUMER/DENOM,0,0) "RTN","C0QMAIN",167,0) . Q "RTN","C0QMAIN",168,0) Q "RTN","C0QMAIN",169,0) ; "RTN","C0QMAIN",170,0) C0QRPC(RTN,MSET,FMT,NOPURGE) ; RPC FORMAT "RTN","C0QMAIN",171,0) ; MSET IS THE NAME OR IEN OF THE MEASURE SET "RTN","C0QMAIN",172,0) ; RTN IS THE RETURN ARRAY OF THE RESULTS PASSED BY REFERENCE "RTN","C0QMAIN",173,0) ; FMT IS THE FORMAT OF THE OUTPUT - "ARRAY" OR "HTML" OR "XML" "RTN","C0QMAIN",174,0) ; NOTE: ARRAY IS DEFAULT AND THE OTHERS ARE NOT IMPLEMENTED YET "RTN","C0QMAIN",175,0) ; IF NOPURGE IS 1, PATIENT LISTS WILL NOT BE DELETED BEFORE ADDING "RTN","C0QMAIN",176,0) ; IF NOPURGE IS 0 OR OMITTED, PATIENT LISTS WILL BE DELETED THEN ADDED "RTN","C0QMAIN",177,0) ;W !,"LOOKING FOR MEASURE SET ",MSET,! "RTN","C0QMAIN",178,0) N ZI S ZI="" "RTN","C0QMAIN",179,0) N C0QM ; FOR HOLDING THE MEASURES IN THE SET "RTN","C0QMAIN",180,0) D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES "RTN","C0QMAIN",181,0) D DELIST("C0QM") "RTN","C0QMAIN",182,0) N ZII S ZII=0 "RTN","C0QMAIN",183,0) F S ZII=$O(C0QM(ZII)) Q:+ZII=0 D ; FOR EACH MEASURE "RTN","C0QMAIN",184,0) . D CLEARMEA(MSET,ZII) ; FIRST CLEAR OUT THE MEASURE "RTN","C0QMAIN",185,0) K C0QM "RTN","C0QMAIN",186,0) D CLEAN^DILF "RTN","C0QMAIN",187,0) D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES AGAIN "RTN","C0QMAIN",188,0) D DELIST("C0QM") "RTN","C0QMAIN",189,0) F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE "RTN","C0QMAIN",190,0) . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE "RTN","C0QMAIN",191,0) . ;W $$GET1^DIQ($$C0QQFN,ZI_",","DISPLAY NAME"),! "RTN","C0QMAIN",192,0) . ;N C0QNL,C0QDL ;NUMERATOR AND DENOMINATOR LIST POINTERS "RTN","C0QMAIN",193,0) . ;W !,"MEASURE: ",$$GET1^DIQ($$C0QQFN,ZI_",",.01),! ; PRINT THE MEASURE NAME "RTN","C0QMAIN",194,0) . ; FOLLOW THE POINTERS TO THE C0Q QUALITYM MEASURE FILE AND GET LIST PTRS "RTN","C0QMAIN",195,0) . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER "RTN","C0QMAIN",196,0) . I C0QNL="" D ; CHECK ALTERNATE LIST "RTN","C0QMAIN",197,0) . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER "RTN","C0QMAIN",198,0) . . I C0QNL'="" S C0QNALT=1 "RTN","C0QMAIN",199,0) . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER "RTN","C0QMAIN",200,0) . I C0QDL="" D ; CHECK ALTERNATE LIST "RTN","C0QMAIN",201,0) . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER "RTN","C0QMAIN",202,0) . . I C0QDL'="" S C0QDALT=1 "RTN","C0QMAIN",203,0) . ; NOW FOLLOW THE LIST POINTERS TO THE REMINDER PATIENT LIST FILE "RTN","C0QMAIN",204,0) . ;W "NUMERATOR: ",$$GET1^DIQ($$RLSTFN,C0QNL_",","NAME"),! "RTN","C0QMAIN",205,0) . ; FIRST PROCESS THE NUMERATOR "RTN","C0QMAIN",206,0) . K ^TMP("DILIST",$J) "RTN","C0QMAIN",207,0) . N C0QUFN ; FILE NUMBER TO USE "RTN","C0QMAIN",208,0) . I $G(C0QNALT)=1 S C0QUFN=$$C0QALFN() "RTN","C0QMAIN",209,0) . E S C0QUFN=$$RLSTPFN "RTN","C0QMAIN",210,0) . D LIST^DIC(C0QUFN,","_C0QNL_",",".01I") ; GET THE LIST OF PATIENTS "RTN","C0QMAIN",211,0) . ;D DELIST("G") ; "RTN","C0QMAIN",212,0) . ;I $D(G) ZWR G "RTN","C0QMAIN",213,0) . K C0QNUMP "RTN","C0QMAIN",214,0) . S NCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; NUMERATOR COUNT "RTN","C0QMAIN",215,0) . N ZJ S ZJ="" "RTN","C0QMAIN",216,0) . F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ; "RTN","C0QMAIN",217,0) . . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01) "RTN","C0QMAIN",218,0) . . S C0QNUMP("N",ZJ,ZDFN)="" "RTN","C0QMAIN",219,0) . ;I '$G(C0QSUM) ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES "RTN","C0QMAIN",220,0) . D ADDPATS(MSET,ZII,"C0QNUMP") "RTN","C0QMAIN",221,0) . ; NEXT PROCESS THE DENOMINATOR "RTN","C0QMAIN",222,0) . ;W "DENOMINATOR: ",$$GET1^DIQ($$RLSTFN,C0QDL_",","NAME"),! "RTN","C0QMAIN",223,0) . K ^TMP("DILIST",$J) "RTN","C0QMAIN",224,0) . I $G(C0QDALT)=1 S C0QUFN=$$C0QALFN() "RTN","C0QMAIN",225,0) . E S C0QUFN=$$RLSTPFN "RTN","C0QMAIN",226,0) . D LIST^DIC(C0QUFN,","_C0QDL_",",".01I") ; GET THE LIST OF PATIENTS "RTN","C0QMAIN",227,0) . ;D DELIST("G") "RTN","C0QMAIN",228,0) . ;I $D(G) ZWR G "RTN","C0QMAIN",229,0) . ;S ZJ="" "RTN","C0QMAIN",230,0) . S DCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; DENOMONIATOR COUNT "RTN","C0QMAIN",231,0) . K C0QDEMP "RTN","C0QMAIN",232,0) . F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ; "RTN","C0QMAIN",233,0) . . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01) "RTN","C0QMAIN",234,0) . . S C0QDEMP("D",ZJ,ZDFN)="" "RTN","C0QMAIN",235,0) . D ADDPATS(MSET,ZII,"C0QDEMP") "RTN","C0QMAIN",236,0) . ;I $G(C0QSUM)'=1 ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES "RTN","C0QMAIN",237,0) . ;E D ; "RTN","C0QMAIN",238,0) . ;. W "NUM CNT: ",NCNT "RTN","C0QMAIN",239,0) . ;. W " DEN CNT: ",DCNT,! "RTN","C0QMAIN",240,0) Q "RTN","C0QMAIN",241,0) ; "RTN","C0QMAIN",242,0) CLEARMEA(MSET,MEAS) ; DELETE AND THEN RECREATE AS EMPTY THE "RTN","C0QMAIN",243,0) ; MEASURE MEAS IN MEASURE SET IEN MSET "RTN","C0QMAIN",244,0) ; "RTN","C0QMAIN",245,0) N C0QFDA,MFN,MEASURE "RTN","C0QMAIN",246,0) S MFN=$$C0QMMFN() ; FILE NUMBER FOR MEASURE SUBFILE "RTN","C0QMAIN",247,0) D CLEAN^DILF "RTN","C0QMAIN",248,0) S MEASURE=$$GET1^DIQ(MFN,MEAS_","_MSET_",",.01,"I") ; MEASURE POINTER "RTN","C0QMAIN",249,0) D CLEAN^DILF "RTN","C0QMAIN",250,0) K ZERR "RTN","C0QMAIN",251,0) S C0QFDA(MFN,MEAS_","_MSET_",",.01)="@" ; GET READY TO DELETE THE MEASURE "RTN","C0QMAIN",252,0) D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE "RTN","C0QMAIN",253,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMAIN",254,0) ;. W "ERROR",! "RTN","C0QMAIN",255,0) ;. ZWR ZERR "RTN","C0QMAIN",256,0) ;. B "RTN","C0QMAIN",257,0) K C0QFDA "RTN","C0QMAIN",258,0) S C0QFDA(MFN,"+1,"_MSET_",",.01)=MEASURE ; GET READY TO RECREATE THE SUBFILE "RTN","C0QMAIN",259,0) D UPDIE ; CREATE THE SUBFILE "RTN","C0QMAIN",260,0) Q "RTN","C0QMAIN",261,0) ; "RTN","C0QMAIN",262,0) ADDPATS(MSET,MEAS,PATS) ;ADD PATIENTS TO NUMERATOR AND DENOMINATOR "RTN","C0QMAIN",263,0) ; OF MEASURE SET IEN MSET MEASURE IEN MEAS "RTN","C0QMAIN",264,0) ; PATS IS OF THE FORM @PATS@("N",X,DFN)="" AND @PATS@("D",X,DFN)="" "RTN","C0QMAIN",265,0) ; WHERE N IS FOR NUMERATOR AND D IS FOR DENOMINATOR AND X 1..N "RTN","C0QMAIN",266,0) ; IF PATIENTS ARE ALREADY THERE, THEY WILL NOT BE ADDED AGAIN "RTN","C0QMAIN",267,0) N C0QI,C0QJ "RTN","C0QMAIN",268,0) N C0QFDA "RTN","C0QMAIN",269,0) S C0QI="" "RTN","C0QMAIN",270,0) F S C0QI=$O(@PATS@("N",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT "RTN","C0QMAIN",271,0) . S C0QFDA($$C0QMMNFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("N",C0QI,"")) "RTN","C0QMAIN",272,0) ;W "ADDING NUMERATOR",! "RTN","C0QMAIN",273,0) ;I $D(C0QFDA) ZWR C0QFDA "RTN","C0QMAIN",274,0) I $D(C0QFDA) D UPDIE "RTN","C0QMAIN",275,0) K C0QFDA "RTN","C0QMAIN",276,0) S C0QI="" "RTN","C0QMAIN",277,0) F S C0QI=$O(@PATS@("D",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT "RTN","C0QMAIN",278,0) . S C0QFDA($$C0QMMDFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("D",C0QI,"")) "RTN","C0QMAIN",279,0) ;W "ADDING DENOMINATOR",! "RTN","C0QMAIN",280,0) ;I $D(C0QFDA) ZWR C0QFDA "RTN","C0QMAIN",281,0) I $D(C0QFDA) D UPDIE "RTN","C0QMAIN",282,0) Q "RTN","C0QMAIN",283,0) ; "RTN","C0QMAIN",284,0) DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO "RTN","C0QMAIN",285,0) ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE "RTN","C0QMAIN",286,0) N ZI,IV,EV,ZDI,ZIEN "RTN","C0QMAIN",287,0) S ZI="" "RTN","C0QMAIN",288,0) S ZDI=$NA(^TMP("DILIST",$J)) "RTN","C0QMAIN",289,0) K @RTN "RTN","C0QMAIN",290,0) F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ; "RTN","C0QMAIN",291,0) . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE "RTN","C0QMAIN",292,0) . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE "RTN","C0QMAIN",293,0) . S ZIEN=@ZDI@(2,ZI) ; IEN "RTN","C0QMAIN",294,0) . S @RTN@(ZIEN)=IV_"^"_EV "RTN","C0QMAIN",295,0) Q "RTN","C0QMAIN",296,0) ; "RTN","C0QMAIN",297,0) DELPATS(MSET,MEAS,NDEL) ; DELETE PATIENTS FROM NUMERATOR AND DENOMINATOR "RTN","C0QMAIN",298,0) ; FOR A MEASURE (ONLY AFFECTS THE C0Q MEASURES FILE) "RTN","C0QMAIN",299,0) ; MSET IS THE IEN OF THE MEASURE SET "RTN","C0QMAIN",300,0) ; MEAS IS THE IEN OF THE MEASURE "RTN","C0QMAIN",301,0) ; NDEL IS A LIST OF PATIENTS TO NOT DELETE (NOT IMPLEMENTED YET) "RTN","C0QMAIN",302,0) ; IN THE FORM @NDEL@("N",IEN,DFN)="" FOR NUMERATOR PATIENTS "RTN","C0QMAIN",303,0) ; AND @NDEL@("D",IEN,DFN)="" FOR DENOMINATOR PATIENTS WHERE IEN IS "RTN","C0QMAIN",304,0) ; THE IEN OF THE PATIENT RECORD IN THE SUBFILE "RTN","C0QMAIN",305,0) ; THIS FEATURE WILL ALLOW EFFICIENCIES FOR LONG PATIENT LISTS "RTN","C0QMAIN",306,0) ; IN THAT PATIENTS THAT ARE GOING TO BE ADDED ARE NOT FIRST DELETED "RTN","C0QMAIN",307,0) N C0QI,C0QJ "RTN","C0QMAIN",308,0) D LIST^DIC($$C0QMMFN,","_MSET_",") "RTN","C0QMAIN",309,0) K C0QFDA "RTN","C0QMAIN",310,0) ;ZWR ^TMP("DILIST",$J,*) "RTN","C0QMAIN",311,0) ;ZWR ^TMP("DIERR",$J,*) "RTN","C0QMAIN",312,0) ;D "RTN","C0QMAIN",313,0) Q "RTN","C0QMAIN",314,0) ; "RTN","C0QMAIN",315,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QMAIN",316,0) K ZERR "RTN","C0QMAIN",317,0) D CLEAN^DILF "RTN","C0QMAIN",318,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QMAIN",319,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMAIN",320,0) ;. W "ERROR",! "RTN","C0QMAIN",321,0) ;. ZWR ZERR "RTN","C0QMAIN",322,0) ;. B "RTN","C0QMAIN",323,0) K C0QFDA "RTN","C0QMAIN",324,0) Q "RTN","C0QMAIN",325,0) ; "RTN","C0QMAIN",326,0) QUE ;QUE THE RUN OF THE PATIENT LISTS AND THE BUILD THE LISTS OF THE PATIENTS "RTN","C0QMAIN",327,0) ;AND THEIR MEASURES "RTN","C0QMAIN",328,0) S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE") "RTN","C0QMAIN",329,0) N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE "RTN","C0QMAIN",330,0) S ZTDESC="CREATE PATIENT LIST" "RTN","C0QMAIN",331,0) S ZTRTN="RUN^C0QMAIN" "RTN","C0QMAIN",332,0) S ZTSAVE("MSIEN")="" "RTN","C0QMAIN",333,0) S ZTIO="" "RTN","C0QMAIN",334,0) S ZTDTH=$$NOW^XLFDT "RTN","C0QMAIN",335,0) D ^%ZTLOAD "RTN","C0QMAIN",336,0) Q "RTN","C0QMAIN",337,0) ; "RTN","C0QMAIN",338,0) RUN ; DO THE REAL WORK "RTN","C0QMAIN",339,0) I '$D(MSIEN) S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE") "RTN","C0QMAIN",340,0) S BEG=$P(^C0Q(201,MSIEN,4),U,3) ;Begin date "RTN","C0QMAIN",341,0) S END=$P(^C0Q(201,MSIEN,4),U,4) ;End date "RTN","C0QMAIN",342,0) S PATCREAT="N" ;Secure list - N=No "RTN","C0QMAIN",343,0) S PLISTPUG="N" ;Purge list after 5 years - N=No "RTN","C0QMAIN",344,0) S PXRMDPAT=0 ;Include deceased patients - N=No "RTN","C0QMAIN",345,0) S PXRMTPAT=0 ;Include test patients - N=No "RTN","C0QMAIN",346,0) S PXRMNODE="PXRMRULE" ;Node in ^TMP($J,"PXRMRULE" "RTN","C0QMAIN",347,0) N ZI S ZI="" "RTN","C0QMAIN",348,0) F S ZI=$O(^C0Q(201,MSIEN,5,"B",ZI)) Q:ZI'>0 D ; LOOP THROUGH EACH QM "RTN","C0QMAIN",349,0) . S PXRMLSTN=+$P(^C0Q(101,ZI,0),U,2) ; NUMERATOR MEASURE "RTN","C0QMAIN",350,0) . S PXRMLSTD=+$P(^C0Q(101,ZI,0),U,3) ; DENOMINATOR MEASURE "RTN","C0QMAIN",351,0) . S PXRMRULN=+$P(^PXRMXP(810.5,PXRMLSTN,0),U,6) ; RULES FOR THE LIST "RTN","C0QMAIN",352,0) . S PXRMRULD=+$P(^PXRMXP(810.5,PXRMLSTD,0),U,6) "RTN","C0QMAIN",353,0) . D RUN^PXRMLCR(PXRMRULD,PXRMLSTD,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT) "RTN","C0QMAIN",354,0) . D RUN^PXRMLCR(PXRMRULN,PXRMLSTN,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT) "RTN","C0QMAIN",355,0) D C0QRPC(.G,MSIEN) "RTN","C0QMAIN",356,0) Q "RTN","C0QMU12") 0^17^B931116171 "RTN","C0QMU12",1,0) C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm "RTN","C0QMU12",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "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) ;This program is free software; you can redistribute it and/or modify "RTN","C0QMU12",8,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QMU12",9,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QMU12",10,0) ;(at your option) any later version. "RTN","C0QMU12",11,0) ; "RTN","C0QMU12",12,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QMU12",13,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QMU12",14,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QMU12",15,0) ;GNU General Public License for more details. "RTN","C0QMU12",16,0) ; "RTN","C0QMU12",17,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QMU12",18,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QMU12",19,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QMU12",20,0) ; "RTN","C0QMU12",21,0) ; GPL - THIS ROUTINE IS A COPY OF JJOHMU11 THAT HAS BEEN MODIFIED "RTN","C0QMU12",22,0) ; FOR MEANINGFUL USE CALCULATION FOR FISCAL YEAR 2012 AT OROVILLE HOSPITAL "RTN","C0QMU12",23,0) ; "RTN","C0QMU12",24,0) C0QPFN() Q 1130580001.401 ; PARAMETER FILE "RTN","C0QMU12",25,0) C0QPCFN() Q 1130580001.411 ; CLINIC SUBFILE "RTN","C0QMU12",26,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QMU12",27,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QMU12",28,0) INIT(ZARY,ZTYP) ; INITIALIZE THE PARAMETERS FOR BUILDING PATIENT LISTS "RTN","C0QMU12",29,0) ; ZARY IS PASSED BY NAME "RTN","C0QMU12",30,0) ; ZTYP IS "INP" OR "EP" "RTN","C0QMU12",31,0) N ZMU S ZMU="MU12" ; THIS IS THE ONLY HARD CODED VALUE LEFT "RTN","C0QMU12",32,0) ; TBD - CHANGE IT TO A READ FROM SYSTEM PARAMETERS "RTN","C0QMU12",33,0) K @ZARY ; CLEAR RETURN ARRAY "RTN","C0QMU12",34,0) N ZIEN,ZCNT,ZX "RTN","C0QMU12",35,0) I $O(^C0Q(401,"MUTYP",ZMU,ZTYP,""))="" D Q ; OOPS NO RECORD THERE "RTN","C0QMU12",36,0) . W !,"ERROR, NO PARAMETERS AVAILABLE" "RTN","C0QMU12",37,0) S ZIEN="" "RTN","C0QMU12",38,0) S ZCNT=0 "RTN","C0QMU12",39,0) F S ZIEN=$O(^C0Q(401,"MUTYP",ZMU,ZTYP,ZIEN)) Q:ZIEN="" D ; "RTN","C0QMU12",40,0) . S ZCNT=ZCNT+1 "RTN","C0QMU12",41,0) . S @ZARY@(ZCNT,"MU")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.02) "RTN","C0QMU12",42,0) . S @ZARY@(ZCNT,"TYPE")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.03) "RTN","C0QMU12",43,0) . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",1,"I") "RTN","C0QMU12",44,0) . S @ZARY@(ZCNT,"InpatientMeasurementSet")=ZX "RTN","C0QMU12",45,0) . S @ZARY@(ZCNT,"InpatientBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I") "RTN","C0QMU12",46,0) . S @ZARY@(ZCNT,"InpatientEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I") "RTN","C0QMU12",47,0) . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I") "RTN","C0QMU12",48,0) . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",2,"I") "RTN","C0QMU12",49,0) . S @ZARY@(ZCNT,"EPMeasurementSet")=ZX "RTN","C0QMU12",50,0) . S @ZARY@(ZCNT,"EPBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I") "RTN","C0QMU12",51,0) . S @ZARY@(ZCNT,"EPEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I") "RTN","C0QMU12",52,0) . S @ZARY@(ZCNT,"EPQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",2.1,"I") "RTN","C0QMU12",53,0) . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I") "RTN","C0QMU12",54,0) . D CLEAN^DILF "RTN","C0QMU12",55,0) . D LIST^DIC($$C0QPCFN,","_ZIEN_",",".01I") "RTN","C0QMU12",56,0) . I $D(^TMP("DIERR",$J)) D Q ; ERROR READING CLINIC LIST "RTN","C0QMU12",57,0) . . W !,"ERROR READING CLINIC PARAMETER LIST" "RTN","C0QMU12",58,0) . M @ZARY@(ZCNT,"CLINICS")=^TMP("DILIST",$J) "RTN","C0QMU12",59,0) ; "RTN","C0QMU12",60,0) Q "RTN","C0QMU12",61,0) ; "RTN","C0QMU12",62,0) BUILD ; CALL ALL AND DIS AND BUILD THE GRSLT ARRAY or print or create "RTN","C0QMU12",63,0) ; patient lists "RTN","C0QMU12",64,0) ;N GRSLT ; ARRAY FOR RESULTS "RTN","C0QMU12",65,0) I '$D(C0QSS) S C0QSS=0 ;default don't build spreadsheet array "RTN","C0QMU12",66,0) I '$D(C0QPR) S C0QPR=0 ;default don't print out results "RTN","C0QMU12",67,0) I '$D(C0QPL) S C0QPL=1 ;default do create patient lists "RTN","C0QMU12",68,0) S ZYR="MU12-" "RTN","C0QMU12",69,0) D INITCLST ; initialize C0QLIST "RTN","C0QMU12",70,0) N G1 ; ONE SET OF VALUES - RNF1 FORMAT "RTN","C0QMU12",71,0) N C0QPARM "RTN","C0QMU12",72,0) D INIT("C0QPARM","INP") ; initialize inpatient parms "RTN","C0QMU12",73,0) I $O(C0QPARM(""))="" D Q ; no parms for inpatient "RTN","C0QMU12",74,0) . W !,"No inpatient parameters" "RTN","C0QMU12",75,0) N ZDIV S ZDIV="" "RTN","C0QMU12",76,0) F S ZDIV=$O(C0QPARM(ZDIV)) Q:ZDIV="" D ; for each inpatient division "RTN","C0QMU12",77,0) . D ALL ; all currently admitted patients in the hospital "RTN","C0QMU12",78,0) . D DIS ; all patients discharged since the reporting period began "RTN","C0QMU12",79,0) . I C0QSS ZWR GRSLT "RTN","C0QMU12",80,0) . ;D ICUPAT ; GENERATE ICU PATIENT LIST "RTN","C0QMU12",81,0) . I C0QPL D ; "RTN","C0QMU12",82,0) . . D FILE ; FILE THE PATIENT LISTS "RTN","C0QMU12",83,0) . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientMeasurementSet")) ; "RTN","C0QMU12",84,0) . . D UPDATE^C0QUPDT(.G,C0QPARM(ZDIV,"InpatientQualitySet")) ; "RTN","C0QMU12",85,0) . K C0QLIST "RTN","C0QMU12",86,0) Q "RTN","C0QMU12",87,0) ; "RTN","C0QMU12",88,0) INITCLST ; initialize C0QLIST "RTN","C0QMU12",89,0) ; INITIALIZE LISTS "RTN","C0QMU12",90,0) ; this is done so that if there are no matching patients, the patient list "RTN","C0QMU12",91,0) ; will be zeroed out "RTN","C0QMU12",92,0) K C0QLIST "RTN","C0QMU12",93,0) S C0QLIST(ZYR_"HasDemographics")="" "RTN","C0QMU12",94,0) S C0QLIST(ZYR_"Patient")="" "RTN","C0QMU12",95,0) S C0QLIST(ZYR_"HasProblem")="" "RTN","C0QMU12",96,0) S C0QLIST(ZYR_"HasAllergy")="" "RTN","C0QMU12",97,0) S C0QLIST(ZYR_"HasMed")="" "RTN","C0QMU12",98,0) S C0QLIST(ZYR_"HasVitalSigns")="" "RTN","C0QMU12",99,0) S C0QLIST(ZYR_"HasMedOrders")="" "RTN","C0QMU12",100,0) S C0QLIST(ZYR_"HasSmokingStatus")="" "RTN","C0QMU12",101,0) Q "RTN","C0QMU12",102,0) ; "RTN","C0QMU12",103,0) ALL ;retrieve active inpatients "RTN","C0QMU12",104,0) N WARD S WARD="" "RTN","C0QMU12",105,0) F D Q:WARD="" "RTN","C0QMU12",106,0) . S WARD=$O(^DIC(42,"B",WARD)) ;ward name "RTN","C0QMU12",107,0) . Q:WARD="" "RTN","C0QMU12",108,0) . N WIEN S WIEN="" "RTN","C0QMU12",109,0) . F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN "RTN","C0QMU12",110,0) . . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name "RTN","C0QMU12",111,0) . . N DFN,RB S DFN="" "RTN","C0QMU12",112,0) . . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward "RTN","C0QMU12",113,0) . . . D DEMO "RTN","C0QMU12",114,0) . . . D PROBLEM "RTN","C0QMU12",115,0) . . . D ALLERGY "RTN","C0QMU12",116,0) . . . D MEDS4 "RTN","C0QMU12",117,0) . . . D RECON2 "RTN","C0QMU12",118,0) . . . D ADVDIR "RTN","C0QMU12",119,0) . . . D SMOKING "RTN","C0QMU12",120,0) . . . D VITALS "RTN","C0QMU12",121,0) . . . D VTE1 "RTN","C0QMU12",122,0) . . . D COD "RTN","C0QMU12",123,0) . . . D EDTIME "RTN","C0QMU12",124,0) . . . I C0QPR D PRINT "RTN","C0QMU12",125,0) . . . I C0QSS D SS "RTN","C0QMU12",126,0) . . . I C0QPL D PATLIST "RTN","C0QMU12",127,0) Q "RTN","C0QMU12",128,0) ; "RTN","C0QMU12",129,0) DEMO ; patient demographics "RTN","C0QMU12",130,0) K PTDOB "RTN","C0QMU12",131,0) N PTNAME,PTSEX,PTHRN,PTRLANG,PTLANG,RACE,RACEDSC,ETHN,ETHNDSC,RB "RTN","C0QMU12",132,0) S PTNAME=$P(^DPT(DFN,0),U) ;patient name "RTN","C0QMU12",133,0) S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth "RTN","C0QMU12",134,0) S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex "RTN","C0QMU12",135,0) D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility "RTN","C0QMU12",136,0) S PTHRN=$P($G(VA("PID")),U) ;health record number "RTN","C0QMU12",137,0) S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file "RTN","C0QMU12",138,0) I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl "RTN","C0QMU12",139,0) S RACE="" "RTN","C0QMU12",140,0) F D Q:RACE="" "RTN","C0QMU12",141,0) . S RACE=$O(^DPT(DFN,.02,"B",RACE)) ;race code IEN "RTN","C0QMU12",142,0) . Q:'RACE "RTN","C0QMU12",143,0) . S RACEDSC=$P($G(^DIC(10,RACE,0)),U) ;race description "RTN","C0QMU12",144,0) S ETHN="" "RTN","C0QMU12",145,0) F D Q:ETHN="" "RTN","C0QMU12",146,0) . S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) ;ethnicity IEN "RTN","C0QMU12",147,0) . Q:'ETHN "RTN","C0QMU12",148,0) . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description "RTN","C0QMU12",149,0) S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed "RTN","C0QMU12",150,0) N DEMOYN S DEMOYN=1 "RTN","C0QMU12",151,0) I $G(PTSEX)="" S DEMOYN=0 "RTN","C0QMU12",152,0) I $G(PTDOB)="" S DEMOYN=0 "RTN","C0QMU12",153,0) I $G(PTHRN)="" S DEMOYN=0 "RTN","C0QMU12",154,0) I $G(PTLANG)="" S DEMOYN=0 "RTN","C0QMU12",155,0) I $G(RACEDSC)="" S DEMOYN=0 "RTN","C0QMU12",156,0) I $G(ETHNDSC)="" S DEMOYN=0 "RTN","C0QMU12",157,0) I DEMOYN S C0QLIST(ZYR_"HasDemographics",DFN)="" "RTN","C0QMU12",158,0) E S C0QLIST(ZYR_"FailedDemographics",DFN)="" "RTN","C0QMU12",159,0) Q "RTN","C0QMU12",160,0) ; "RTN","C0QMU12",161,0) PROBLEM ; PATIENT PROBLEMS "RTN","C0QMU12",162,0) D LIST^ORQQPL(.PROBL,DFN,"A") "RTN","C0QMU12",163,0) S PBCNT="" "RTN","C0QMU12",164,0) F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D "RTN","C0QMU12",165,0) . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description "RTN","C0QMU12",166,0) I PBDESC["No problems found" S C0QLIST(ZYR_"NoProblem",DFN)="" "RTN","C0QMU12",167,0) E S C0QLIST(ZYR_"HasProblem",DFN)="" "RTN","C0QMU12",168,0) K PROBL "RTN","C0QMU12",169,0) Q "RTN","C0QMU12",170,0) ; "RTN","C0QMU12",171,0) ALLERGY ; ALLERGY LIST "RTN","C0QMU12",172,0) ; WANT TO CHANGE ALLERGIES FOR 2012 TO POPULATE THE C0QLIST DIRECTLY. GPL "RTN","C0QMU12",173,0) D LIST^ORQQAL(.ALRGYL,DFN) "RTN","C0QMU12",174,0) S ALCNT="" "RTN","C0QMU12",175,0) F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D "RTN","C0QMU12",176,0) . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description "RTN","C0QMU12",177,0) I ALDESC["No Allergy" S C0QLIST(ZYR_"NoAllergy",DFN)="" "RTN","C0QMU12",178,0) E S C0QLIST(ZYR_"HasAllergy",DFN)="" "RTN","C0QMU12",179,0) K ALRGYL "RTN","C0QMU12",180,0) Q "RTN","C0QMU12",181,0) ; "RTN","C0QMU12",182,0) MEDS4 ; USE OCL^PSOORRL TO GET ALL MEDS "RTN","C0QMU12",183,0) ; DELETED MEDS, MEDS2, AND MEDS3 FOR 2012 TO USE ONLY MEDS4 "RTN","C0QMU12",184,0) N BEG,END "RTN","C0QMU12",185,0) S BEG=$$DT^C0QUTIL("JULY 3,2011") "RTN","C0QMU12",186,0) S END=$$DT^C0QUTIL("NOW") "RTN","C0QMU12",187,0) D OCL^PSOORRL(DFN,BEG,END) ;DBIA #2400 "RTN","C0QMU12",188,0) N C0QMEDS "RTN","C0QMU12",189,0) M C0QMEDS=^TMP("PS",$J) ; MEDS RETURNED FROM CALL "RTN","C0QMU12",190,0) N FOUND "RTN","C0QMU12",191,0) N ZI "RTN","C0QMU12",192,0) I '$D(C0QMEDS(1)) D Q ; QUIT IF NO MEDS "RTN","C0QMU12",193,0) . S C0QLIST(ZYR_"NoMed",DFN)="" "RTN","C0QMU12",194,0) E D ; HAS MEDS "RTN","C0QMU12",195,0) . S C0QLIST(ZYR_"HasMed",DFN)="" "RTN","C0QMU12",196,0) S ZI="" S FOUND=0 "RTN","C0QMU12",197,0) F S ZI=$O(C0QMEDS(ZI)) Q:ZI="" D ; FOR EACH MED "RTN","C0QMU12",198,0) . N ZM "RTN","C0QMU12",199,0) . S ZM=$G(C0QMEDS(ZI,0)) ;THE MEDICATION "RTN","C0QMU12",200,0) . I $P($P(ZM,"^",1),";",2)="I" D ; IE 1U;I FOR AN INPATIENT UNIT DOSE "RTN","C0QMU12",201,0) . . S FOUND=1 "RTN","C0QMU12",202,0) I FOUND S C0QLIST(ZYR_"HasMedOrders",DFN)="" ; MET CPOE MEASURE "RTN","C0QMU12",203,0) E S C0QLIST(ZYR_"NoMedOrders",DFN)="" "RTN","C0QMU12",204,0) Q "RTN","C0QMU12",205,0) ; "RTN","C0QMU12",206,0) RECON ; MEDICATIONS RECONCILIATION "RTN","C0QMU12",207,0) ; WANT TO SIMPLIFY MEDS RECON FOR 2012. GPL "RTN","C0QMU12",208,0) ; "RTN","C0QMU12",209,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QMU12",210,0) . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QMU12",211,0) N HASRECON S HASRECON=0 "RTN","C0QMU12",212,0) N GT,G "RTN","C0QMU12",213,0) S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")="" "RTN","C0QMU12",214,0) S GT(5,"HasMedRecon","Medication Reconcilation Complete")="" "RTN","C0QMU12",215,0) I $$TXTALL^C0QNOTES(.G,.GT,DFN) D ; SEARCH ALL NOTES FOR MED RECON "RTN","C0QMU12",216,0) . S HASRECON=1 "RTN","C0QMU12",217,0) ;N ZT "RTN","C0QMU12",218,0) ;S ZT="MEDICATION RECONCILIATION COMPLET" "RTN","C0QMU12",219,0) ;I $$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) D ; "RTN","C0QMU12",220,0) ;. S HASRECON=1 "RTN","C0QMU12",221,0) ;E D ; "RTN","C0QMU12",222,0) ;. S ZT="Medication Reconcilation Complete" "RTN","C0QMU12",223,0) ;. I $$NTTXT^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",ZT,DFN) D ; "RTN","C0QMU12",224,0) ;. . S HASRECON=1 "RTN","C0QMU12",225,0) ;I $$HFYN^C0QHF("MEDS HAVE BEEN REVIEWED",DFN) S HASRECON=1 "RTN","C0QMU12",226,0) I HASRECON D ; "RTN","C0QMU12",227,0) . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",228,0) E S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",229,0) Q "RTN","C0QMU12",230,0) ; "RTN","C0QMU12",231,0) RECON2 ; USE HEALTH FACTORS FOR MEDICATION RECONCILIATION "RTN","C0QMU12",232,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QMU12",233,0) . S C0QLIST(ZYR_"XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QMU12",234,0) I $$HFYN^C0QHF(DFN,"Medication Reconciliation Completed: Yes") D ; "RTN","C0QMU12",235,0) . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",236,0) E S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",237,0) Q "RTN","C0QMU12",238,0) ; "RTN","C0QMU12",239,0) ERX ; FOR EP, WE LOOK AT ERX MEDS "RTN","C0QMU12",240,0) N ZI S ZI="" "RTN","C0QMU12",241,0) N ZERX S ZERX=$NA(^PS(55,DFN,"NVA")) "RTN","C0QMU12",242,0) F S ZI=$O(@ZERX@(ZI)) Q:ZI="" D ; "RTN","C0QMU12",243,0) . ;B "RTN","C0QMU12",244,0) . I $G(@ZERX@(ZI,1,1,0))["E-Rx Web" D ; "RTN","C0QMU12",245,0) . . S C0QLIST(ZYR_"HasMed",DFN)="" "RTN","C0QMU12",246,0) . . S C0QLIST(ZYR_"HasMedOrders",DFN)="" "RTN","C0QMU12",247,0) . . S C0QLIST(ZYR_"HasERX",DFN)="" "RTN","C0QMU12",248,0) . . S C0QLIST(ZYR_"HasMedRecon",DFN)="" "RTN","C0QMU12",249,0) . E D ; "RTN","C0QMU12",250,0) . . S C0QLIST(ZYR_"NoMed",DFN)="" "RTN","C0QMU12",251,0) . . S C0QLIST(ZYR_"NoMedOrders",DFN)="" "RTN","C0QMU12",252,0) . . S C0QLIST(ZYR_"NoERX",DFN)="" "RTN","C0QMU12",253,0) . . S C0QLIST(ZYR_"NoMedRecon",DFN)="" "RTN","C0QMU12",254,0) Q "RTN","C0QMU12",255,0) ; "RTN","C0QMU12",256,0) ADVDIR ; ADVANCE DIRECTIVE "RTN","C0QMU12",257,0) ; "RTN","C0QMU12",258,0) I $$AGE^C0QUTIL(DFN)>64 D ; ONLY FOR PATIENTS 65 AND OLDER "RTN","C0QMU12",259,0) . S C0QLIST(ZYR_"Over65",DFN)="" "RTN","C0QMU12",260,0) . I $$HASNTYN^C0QNOTES("ADVANCE DIRECTIVE",DFN) D ; "RTN","C0QMU12",261,0) . . S C0QLIST(ZYR_"HasAdvanceDirective",DFN)="" "RTN","C0QMU12",262,0) . E D ; "RTN","C0QMU12",263,0) . . S C0QLIST(ZYR_"NoAdvanceDirective",DFN)="" "RTN","C0QMU12",264,0) Q "RTN","C0QMU12",265,0) ; "RTN","C0QMU12",266,0) SMOKING ; "RTN","C0QMU12",267,0) ; WANT TO CHANGE SMOKING STATUS CHECKING FOR 2012 TO A SIMPLE SET OF "RTN","C0QMU12",268,0) ; HEALTH FACTORS. GPL "RTN","C0QMU12",269,0) I $$INLIST(ZYR_"HasSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STAT CHECK "RTN","C0QMU12",270,0) . S C0QLIST(ZYR_"HasSmokingStatus",DFN)="" "RTN","C0QMU12",271,0) . S C0QLIST(ZYR_"Over12",DFN)="" "RTN","C0QMU12",272,0) I $$INLIST(ZYR_"NoSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STATUS CHECK "RTN","C0QMU12",273,0) . S C0QLIST(ZYR_"NoSmokingStatus",DFN)="" "RTN","C0QMU12",274,0) . S C0QLIST(ZYR_"Over12",DFN)="" "RTN","C0QMU12",275,0) N C0QSMOKE,C0QSYN "RTN","C0QMU12",276,0) S C0QSYN=0 "RTN","C0QMU12",277,0) I $$AGE^C0QUTIL(DFN)<13 Q ; DON'T CHECK UNDER AGE 13 "RTN","C0QMU12",278,0) D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE "RTN","C0QMU12",279,0) ; PATIENT IN THE CATEGORY OF TOBACCO "RTN","C0QMU12",280,0) I $D(C0QSMOKE) S C0QSYN=1 "RTN","C0QMU12",281,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco <1 Yr Ago") "RTN","C0QMU12",282,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco > 20 Yrs Ago") "RTN","C0QMU12",283,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 1-5 Yrs Ago") "RTN","C0QMU12",284,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 10-20 Yrs Ago") "RTN","C0QMU12",285,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 5-10 Yrs Ago") "RTN","C0QMU12",286,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking") "RTN","C0QMU12",287,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking < 1 Yr Ago") "RTN","C0QMU12",288,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking > 20 Yrs Ago") "RTN","C0QMU12",289,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 1-5 Yrs Ago") "RTN","C0QMU12",290,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 10-20 Yrs Ago") "RTN","C0QMU12",291,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 5-10 Yrs Ago") "RTN","C0QMU12",292,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") "RTN","C0QMU12",293,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 1-5 YRS AGO") "RTN","C0QMU12",294,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 10-20 YRS AGO") "RTN","C0QMU12",295,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 5-10 YRS AGO") "RTN","C0QMU12",296,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: < 1 YR AGO") "RTN","C0QMU12",297,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: > 20 YRS AGO") "RTN","C0QMU12",298,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER") "RTN","C0QMU12",299,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 10-20 YRS") "RTN","C0QMU12",300,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 20+ YRS") "RTN","C0QMU12",301,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR") "RTN","C0QMU12",302,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR AGO") "RTN","C0QMU12",303,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER > 20 YRS AGO") "RTN","C0QMU12",304,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS") "RTN","C0QMU12",305,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS AGO") "RTN","C0QMU12",306,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 10-20 YRS AGO") "RTN","C0QMU12",307,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS") "RTN","C0QMU12",308,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS AGO") "RTN","C0QMU12",309,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") "RTN","C0QMU12",310,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QMU12",311,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QMU12",312,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QMU12",313,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QMU12",314,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QMU12",315,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QMU12",316,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QMU12",317,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QMU12",318,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QMU12",319,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QMU12",320,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QMU12",321,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QMU12",322,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QMU12",323,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QMU12",324,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QMU12",325,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QMU12",326,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QMU12",327,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QMU12",328,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QMU12",329,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking Cessation (OPH)") "RTN","C0QMU12",330,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QMU12",331,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QMU12",332,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QMU12",333,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QMU12",334,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QMU12",335,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QMU12",336,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QMU12",337,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QMU12",338,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QMU12",339,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QMU12",340,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QMU12",341,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QMU12",342,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QMU12",343,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QMU12",344,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QMU12",345,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QMU12",346,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QMU12",347,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QMU12",348,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QMU12",349,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QMU12",350,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QMU12",351,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QMU12",352,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QMU12",353,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QMU12",354,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QMU12",355,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QMU12",356,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QMU12",357,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QMU12",358,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QMU12",359,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QMU12",360,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QMU12",361,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QMU12",362,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QMU12",363,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QMU12",364,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QMU12",365,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QMU12",366,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QMU12",367,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QMU12",368,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QMU12",369,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QMU12",370,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QMU12",371,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QMU12",372,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QMU12",373,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QMU12",374,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QMU12",375,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QMU12",376,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QMU12",377,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QMU12",378,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QMU12",379,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QMU12",380,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QMU12",381,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QMU12",382,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QMU12",383,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QMU12",384,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QMU12",385,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QMU12",386,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QMU12",387,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QMU12",388,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QMU12",389,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QMU12",390,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QMU12",391,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QMU12",392,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QMU12",393,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QMU12",394,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QMU12",395,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QMU12",396,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QMU12",397,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QMU12",398,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QMU12",399,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QMU12",400,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QMU12",401,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QMU12",402,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QMU12",403,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QMU12",404,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QMU12",405,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QMU12",406,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QMU12",407,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QMU12",408,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QMU12",409,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker (PMH)") "RTN","C0QMU12",410,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Tobacco User") "RTN","C0QMU12",411,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Current Smoker - No") "RTN","C0QMU12",412,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Current Smoker - Yes") "RTN","C0QMU12",413,0) S C0QLIST(ZYR_"Over12",DFN)="" "RTN","C0QMU12",414,0) ;N GT "RTN","C0QMU12",415,0) ;S GT(1,"HasSmokingStatus","SMOK")="" "RTN","C0QMU12",416,0) ;S GT(2,"HasSmokingStatus","Smok")="" "RTN","C0QMU12",417,0) ;S GT(3,"HasSmokingStatus","smok")="" "RTN","C0QMU12",418,0) ;I 'C0QSYN D ; "RTN","C0QMU12",419,0) ;. N G "RTN","C0QMU12",420,0) ;. S OK=$$TXTALL^C0QNOTES(.G,.GT,DFN) "RTN","C0QMU12",421,0) ;. I $D(G) S C0QSYN=1 "RTN","C0QMU12",422,0) I C0QSYN S C0QLIST(ZYR_"HasSmokingStatus",DFN)="" "RTN","C0QMU12",423,0) E S C0QLIST(ZYR_"NoSmokingStatus",DFN)="" "RTN","C0QMU12",424,0) Q "RTN","C0QMU12",425,0) ; "RTN","C0QMU12",426,0) VITALS ; "RTN","C0QMU12",427,0) ; "RTN","C0QMU12",428,0) N C0QSDT,C0QEDT "RTN","C0QMU12",429,0) D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE "RTN","C0QMU12",430,0) D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY "RTN","C0QMU12",431,0) D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS "RTN","C0QMU12",432,0) I $D(VITRSLT) D ;ZWR VITRSLT B ; "RTN","C0QMU12",433,0) . I VITRSLT(1)["No vitals found." S C0QLIST(ZYR_"NoVitalSigns",DFN)="" "RTN","C0QMU12",434,0) . E S C0QLIST(ZYR_"HasVitalSigns",DFN)="" "RTN","C0QMU12",435,0) Q "RTN","C0QMU12",436,0) ; "RTN","C0QMU12",437,0) VTE1 ; VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL "RTN","C0QMU12",438,0) ; "RTN","C0QMU12",439,0) I $$HFYN^C0QHF(DFN,"VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL") D ; "RTN","C0QMU12",440,0) . S C0QLIST(ZYR_"HasVTE24",DFN)="" "RTN","C0QMU12",441,0) E S C0QLIST(ZYR_"NoVTE24",DFN)="" "RTN","C0QMU12",442,0) Q "RTN","C0QMU12",443,0) ; "RTN","C0QMU12",444,0) COD ; TEST FOR PRELIMINARY CAUSE OF DEATH NOTE "RTN","C0QMU12",445,0) I $$HASNTYN^C0QNOTES("PRELIMINARY CAUSE OF DEATH",DFN) D ; "RTN","C0QMU12",446,0) . S C0QLIST(ZYR_"CauseOfDeath",DFN)="" "RTN","C0QMU12",447,0) Q "RTN","C0QMU12",448,0) ; "RTN","C0QMU12",449,0) EDTIME ; CHECK FOR EMERGENCY DEPT TIME FACTORS "RTN","C0QMU12",450,0) N FOUND "RTN","C0QMU12",451,0) S FOUND=0 "RTN","C0QMU12",452,0) I $$HFYN^C0QHF(DFN,"ED ARRIVAL TIME") S FOUND=1 "RTN","C0QMU12",453,0) I '$$HFYN^C0QHF(DFN,"ED DEPARTURE TIME") S FOUND=0 "RTN","C0QMU12",454,0) I '$$HFYN^C0QHF(DFN,"TIME DECISION TO ADMIT MADE") S FOUND=0 "RTN","C0QMU12",455,0) I FOUND D ; "RTN","C0QMU12",456,0) . S C0QLIST(ZYR_"HasEDtime",DFN)="" "RTN","C0QMU12",457,0) E S C0QLIST(ZYR_"NoEDtime",DFN)="" "RTN","C0QMU12",458,0) Q "RTN","C0QMU12",459,0) ; "RTN","C0QMU12",460,0) ICUPAT ; CREATE LIST OF ICU PATIENTS "RTN","C0QMU12",461,0) N ZICU "RTN","C0QMU12",462,0) S ZICU=$O(^SC("B","IC","")) ; IEN OF ICU HOSPITAL LOCATION "RTN","C0QMU12",463,0) N ZI,ZJ,ZP "RTN","C0QMU12",464,0) S ZI="" "RTN","C0QMU12",465,0) F S ZI=$O(^AUPNVSIT("AHL",ZICU,ZI)) Q:ZI="" D ; EACH DATE "RTN","C0QMU12",466,0) . S ZJ="" "RTN","C0QMU12",467,0) . F S ZJ=$O(^AUPNVSIT("AHL",ZICU,ZI,ZJ)) Q:ZJ="" D ; EACH VISIT "RTN","C0QMU12",468,0) . . S ZP=$P(^AUPNVSIT(ZJ,0),"^",5) ; DFN "RTN","C0QMU12",469,0) . . S C0QLIST(ZYR_"ICUPatient",ZP)="" "RTN","C0QMU12",470,0) Q "RTN","C0QMU12",471,0) ; "RTN","C0QMU12",472,0) FILTER ; CALLED AFTER ALL THE PATIENT LISTS HAVE BEEN FILED "RTN","C0QMU12",473,0) ; WILL KILL C0QLIST AND CREATE DERIVATIVE PATIENT LISTS BY FILTERING "RTN","C0QMU12",474,0) K C0QLIST "RTN","C0QMU12",475,0) N ZPAT "RTN","C0QMU12",476,0) S ZPAT=$$PATLN(ZYR_"Patient") ; name of patient list of all patients admitted "RTN","C0QMU12",477,0) ; during the reporting period. used to filter other lists "RTN","C0QMU12",478,0) ; "RTN","C0QMU12",479,0) ; filter ICU patients against ZPAT "RTN","C0QMU12",480,0) N GN,GO,GF "RTN","C0QMU12",481,0) S GN=ZPAT "RTN","C0QMU12",482,0) S GO=$$PATLN(ZYR_"ICUPatient") ; all ICU patient "RTN","C0QMU12",483,0) S GF=$NA(C0QLIST(ZYR_"ICUReporting")) ; the filtered list destination "RTN","C0QMU12",484,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",485,0) ; "RTN","C0QMU12",486,0) ; FILTER VTE-2 DENOMINATOR FOR QUALITY MEASURE "RTN","C0QMU12",487,0) ; "RTN","C0QMU12",488,0) S GN=$NA(C0QLIST(ZYR_"ICUReporting")) ; ICU patients admitted inside rpt period "RTN","C0QMU12",489,0) S GO=$$RPATLN("MU VTE-2 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",490,0) S GF=$NA(C0QLIST(ZYR_"VTE2DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",491,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",492,0) ; "RTN","C0QMU12",493,0) S GN=ZPAT "RTN","C0QMU12",494,0) S GO=$$RPATLN("MU VTE-3 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",495,0) S GF=$NA(C0QLIST(ZYR_"VTE3DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",496,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",497,0) ; "RTN","C0QMU12",498,0) S GN=ZPAT "RTN","C0QMU12",499,0) S GO=$$RPATLN("MU VTE-4 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",500,0) S GF=$NA(C0QLIST(ZYR_"VTE4DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",501,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",502,0) ; "RTN","C0QMU12",503,0) S GN=ZPAT "RTN","C0QMU12",504,0) S GO=$$RPATLN("MU VTE-5 DENOM PL") ; TAXONOMY BASED DENOMENATOR "RTN","C0QMU12",505,0) S GF=$NA(C0QLIST(ZYR_"VTE5DEN")) ; NEW DENOMINATOR PL "RTN","C0QMU12",506,0) D AND^C0QSET(GF,GN,GO) ; filter the list with the AND set operation "RTN","C0QMU12",507,0) ; "RTN","C0QMU12",508,0) D FILE ; FILE ALL THE PATIENT LISTS "RTN","C0QMU12",509,0) D UPDATE^C0QUPDT(.G,5) ; UPDATE THE HOS 2011 MEANINGFUL USE measure set "RTN","C0QMU12",510,0) Q "RTN","C0QMU12",511,0) ; "RTN","C0QMU12",512,0) ED1 ; "RTN","C0QMU12",513,0) S ZYR="MU12-" "RTN","C0QMU12",514,0) D DOTIME("ED DEPARTURE TIME") "RTN","C0QMU12",515,0) Q "RTN","C0QMU12",516,0) ; "RTN","C0QMU12",517,0) ED2 ; "RTN","C0QMU12",518,0) S ZYR="MU12-" "RTN","C0QMU12",519,0) D DOTIME2("TIME DECISION TO ADMIT MADE") "RTN","C0QMU12",520,0) Q "RTN","C0QMU12",521,0) ; "RTN","C0QMU12",522,0) DOTIME(ZHF) ; COMPUTE THE MEAN TIME IN THE ED FROM ARRIVAL TO DEPARTURE "RTN","C0QMU12",523,0) ; THIS IS A QUALITY MEASURE ED-1 FOR MEANINGFUL USE "RTN","C0QMU12",524,0) ; IT PRINTS A REPORT OF EACH PATIENT WITH THE ED TIMES RECORDED "RTN","C0QMU12",525,0) ; AND THEIR TIME. AT THE END IT PRINTS THE MEAN TIME "RTN","C0QMU12",526,0) N ZP "RTN","C0QMU12",527,0) S ZP=$$PATLN(ZYR_"HasEDtime") ; patient list name for patients to process "RTN","C0QMU12",528,0) S ZHFN=9000010.23 ; FILE NUMBER FOR V HEALTH FACTORS "RTN","C0QMU12",529,0) S ZVFN=9000010 ; VISIT FILE NUMBER "RTN","C0QMU12",530,0) K ZARY1,ZARY2 "RTN","C0QMU12",531,0) N ZI S ZI="" "RTN","C0QMU12",532,0) S COUNT=0 "RTN","C0QMU12",533,0) F S ZI=$O(@ZP@(ZI)) Q:ZI="" D ; FOR EACH PATIENT "RTN","C0QMU12",534,0) . S COUNT=COUNT+1 "RTN","C0QMU12",535,0) . N ZA,ZD "RTN","C0QMU12",536,0) . S ZA=$$VHFIEN^C0QHF(ZI,"ED ARRIVAL TIME") ; IEN OF ARRIVAL HEALTH FACTOR "RTN","C0QMU12",537,0) . S ZD=$$VHFIEN^C0QHF(ZI,ZHF) ; IEN OF DEPART HEALTH FACTOR "RTN","C0QMU12",538,0) . N ZAD,ZDD ; ARRIVAL DATE, DEPARTURE DATE "RTN","C0QMU12",539,0) . N ZAC,ZDC ; ARRIVAL COMMENT, DEPARTURE COMMENT "RTN","C0QMU12",540,0) . ; THE COMMENT IS THE TIME XXYY "RTN","C0QMU12",541,0) . N OK,TMP "RTN","C0QMU12",542,0) . S TMP=$$GET1^DIQ(ZHFN,ZA_",",.03,"I") ; VISIT POINTER "RTN","C0QMU12",543,0) . S ZAD=$$GET1^DIQ(ZVFN,TMP_",",.01,"I") ; VISIT DATE "RTN","C0QMU12",544,0) . ;S ZAD=$P(^AUPNVHF(ZA,0),U,3) ; DATE IS PIECE 3 "RTN","C0QMU12",545,0) . S TMP=$$GET1^DIQ(ZHFN,ZD_",",.03,"I") ; VISIT POINTER "RTN","C0QMU12",546,0) . S ZDD=$$GET1^DIQ(ZVFN,TMP_",",.01,"I") ; VISIT DATE "RTN","C0QMU12",547,0) . ;S ZDD=$$GET1^DIQ(ZHFN,ZD_",",1201,"I") ; EVENT DATE FIELD "RTN","C0QMU12",548,0) . ;S ZDD=$P(^AUPNVHF(ZD,0),U,3) ; DATE IS PIECE 3 "RTN","C0QMU12",549,0) . ;S OK=$$GET1^DIQ(ZHFN,ZA_",",81101,"","ZAC") ; ARRIVAL TIME "RTN","C0QMU12",550,0) . S ZAC=$G(^AUPNVHF(ZA,811)) ; THE TIME "RTN","C0QMU12",551,0) . ;S OK=$$GET1^DIQ(ZHFN,ZD_",",81101,"","ZDC") ; DEPARTURE TIME "RTN","C0QMU12",552,0) . S ZDC=$G(^AUPNVHF(ZD,811)) ; DEPARTURE TIME "RTN","C0QMU12",553,0) . N ZT ; THE TIME DIFFERENCE BETWEEN THE DATES "RTN","C0QMU12",554,0) . W !,!,"PATIENT: ",ZI," ",$P(^DPT(ZI,0),U,1) "RTN","C0QMU12",555,0) . W !,"IN: ",$$FMTE^XLFDT(ZAD_"."_ZAC)," OUT: ",$$FMTE^XLFDT(ZDD_"."_ZDC) "RTN","C0QMU12",556,0) . S G1=($E(ZDC,1,2)*60)+($E(ZDC,3,4)) "RTN","C0QMU12",557,0) . S G2=($E(ZAC,1,2)*60)+($E(ZAC,3,4)) "RTN","C0QMU12",558,0) . I (ZDD-ZAD)>0 S G1=G1+(((ZDD-ZAD)*24)*60) "RTN","C0QMU12",559,0) . S GTOT=G1-G2 "RTN","C0QMU12",560,0) . W !,"TIME: ",GTOT," ESTIMATED" "RTN","C0QMU12",561,0) . S ZT=$$DTDIFF^C0QUTIL(ZDD,ZDC,ZAD,ZAC) ; COMPUTE THE DIFFERENCE IN MINUTES "RTN","C0QMU12",562,0) . W !,"COMPUTED MINUTES: ",ZT "RTN","C0QMU12",563,0) . ;I ZT'=GTOT B ; LET'S FIND OUT WHAT'S WRONG "RTN","C0QMU12",564,0) . I ZT<0 D Q ; SKIP PATIENTS WITH NEGATIVE TIMES "RTN","C0QMU12",565,0) . . W !,"****EXCLUDED****" "RTN","C0QMU12",566,0) . I ZT>400000 D Q ; THESE ARE ERRORS "RTN","C0QMU12",567,0) . . W !,"****EXCLUDED****" "RTN","C0QMU12",568,0) . S ZARY1(ZT,ZI)="" ; ARRAY ORDERED BY MINUTES OF PATIENTS "RTN","C0QMU12",569,0) N ZY,ZZ S ZY="" S ZZ="" "RTN","C0QMU12",570,0) N ZCOUNT S ZCOUNT=0 "RTN","C0QMU12",571,0) F S ZY=$O(ZARY1(ZY)) Q:ZY="" D ; FOR EACH TIME "RTN","C0QMU12",572,0) . F S ZZ=$O(ZARY1(ZY,ZZ)) Q:ZZ="" D ; FOR EACH PATIENT WITH THIS TIME "RTN","C0QMU12",573,0) . . S ZCOUNT=ZCOUNT+1 "RTN","C0QMU12",574,0) . . S ZARY2(ZCOUNT,ZY,ZZ)="" "RTN","C0QMU12",575,0) . . ;W !,ZCOUNT," PATIENT: ",ZZ," MINUTES: ",ZY "RTN","C0QMU12",576,0) N ZMID "RTN","C0QMU12",577,0) S ZMID=$P(ZCOUNT/2,".") "RTN","C0QMU12",578,0) W !,"NUMBER OF PATIENTS IN REPORT: ",ZCOUNT "RTN","C0QMU12",579,0) W !,"ED ARRIVAL TIME UNTIL ",ZHF "RTN","C0QMU12",580,0) W !,"MEDIAN TIME: ",$O(ZARY2(ZMID,"")) "RTN","C0QMU12",581,0) Q "RTN","C0QMU12",582,0) ; "RTN","C0QMU12",583,0) DOTIME2(ZHF) ; COMPUTE THE MEAN TIME IN THE ED FROM ARRIVAL TO DEPARTURE "RTN","C0QMU12",584,0) ; THIS IS A QUALITY MEASURE ED-1 FOR MEANINGFUL USE "RTN","C0QMU12",585,0) ; IT PRINTS A REPORT OF EACH PATIENT WITH THE ED TIMES RECORDED "RTN","C0QMU12",586,0) ; AND THEIR TIME. AT THE END IT PRINTS THE MEAN TIME "RTN","C0QMU12",587,0) N ZP "RTN","C0QMU12",588,0) S ZP=$$PATLN(ZYR_"HasEDtime") ; patient list name for patients to process "RTN","C0QMU12",589,0) S ZHFN=9000010.23 ; FILE NUMBER FOR V HEALTH FACTORS "RTN","C0QMU12",590,0) S ZVFN=9000010 ; VISIT FILE NUMBER "RTN","C0QMU12",591,0) K ZARY1,ZARY2 "RTN","C0QMU12",592,0) N ZI S ZI="" "RTN","C0QMU12",593,0) S COUNT=0 "RTN","C0QMU12",594,0) F S ZI=$O(@ZP@(ZI)) Q:ZI="" D ; FOR EACH PATIENT "RTN","C0QMU12",595,0) . S COUNT=COUNT+1 "RTN","C0QMU12",596,0) . N ZA,ZD "RTN","C0QMU12",597,0) . ;S ZA=$$VHFIEN^C0QHF(ZI,"ED ARRIVAL TIME") ; IEN OF ARRIVAL HEALTH FACTOR "RTN","C0QMU12",598,0) . ;S ZD=$$VHFIEN^C0QHF(ZI,ZHF) ; IEN OF DEPART HEALTH FACTOR "RTN","C0QMU12",599,0) . S ZA=$$VHFIEN^C0QHF(ZI,ZHF) ; IEN OF DEPART HEALTH FACTOR "RTN","C0QMU12",600,0) . S ZD=$$VHFIEN^C0QHF(ZI,"ED DEPARTURE TIME") ; IEN OF ARRIVAL HEALTH FACTOR "RTN","C0QMU12",601,0) . N ZAD,ZDD ; ARRIVAL DATE, DEPARTURE DATE "RTN","C0QMU12",602,0) . N ZAC,ZDC ; ARRIVAL COMMENT, DEPARTURE COMMENT "RTN","C0QMU12",603,0) . ; THE COMMENT IS THE TIME XXYY "RTN","C0QMU12",604,0) . N OK,TMP "RTN","C0QMU12",605,0) . S TMP=$$GET1^DIQ(ZHFN,ZA_",",.03,"I") ; VISIT POINTER "RTN","C0QMU12",606,0) . S ZAD=$$GET1^DIQ(ZVFN,TMP_",",.01,"I") ; VISIT DATE "RTN","C0QMU12",607,0) . ;S ZAD=$P(^AUPNVHF(ZA,0),U,3) ; DATE IS PIECE 3 "RTN","C0QMU12",608,0) . S TMP=$$GET1^DIQ(ZHFN,ZD_",",.03,"I") ; VISIT POINTER "RTN","C0QMU12",609,0) . S ZDD=$$GET1^DIQ(ZVFN,TMP_",",.01,"I") ; VISIT DATE "RTN","C0QMU12",610,0) . ;S ZDD=$$GET1^DIQ(ZHFN,ZD_",",1201,"I") ; EVENT DATE FIELD "RTN","C0QMU12",611,0) . ;S ZDD=$P(^AUPNVHF(ZD,0),U,3) ; DATE IS PIECE 3 "RTN","C0QMU12",612,0) . ;S OK=$$GET1^DIQ(ZHFN,ZA_",",81101,"","ZAC") ; ARRIVAL TIME "RTN","C0QMU12",613,0) . S ZAC=$G(^AUPNVHF(ZA,811)) ; THE TIME "RTN","C0QMU12",614,0) . ;S OK=$$GET1^DIQ(ZHFN,ZD_",",81101,"","ZDC") ; DEPARTURE TIME "RTN","C0QMU12",615,0) . S ZDC=$G(^AUPNVHF(ZD,811)) ; DEPARTURE TIME "RTN","C0QMU12",616,0) . N ZT ; THE TIME DIFFERENCE BETWEEN THE DATES "RTN","C0QMU12",617,0) . W !,!,"PATIENT: ",ZI," ",$P(^DPT(ZI,0),U,1) "RTN","C0QMU12",618,0) . W !,"IN: ",$$FMTE^XLFDT(ZAD_"."_ZAC)," OUT: ",$$FMTE^XLFDT(ZDD_"."_ZDC) "RTN","C0QMU12",619,0) . S G1=($E(ZDC,1,2)*60)+($E(ZDC,3,4)) "RTN","C0QMU12",620,0) . S G2=($E(ZAC,1,2)*60)+($E(ZAC,3,4)) "RTN","C0QMU12",621,0) . I (ZDD-ZAD)>0 S G1=G1+(((ZDD-ZAD)*24)*60) "RTN","C0QMU12",622,0) . S GTOT=G1-G2 "RTN","C0QMU12",623,0) . W !,"TIME: ",GTOT," ESTIMATED" "RTN","C0QMU12",624,0) . S ZT=$$DTDIFF^C0QUTIL(ZDD,ZDC,ZAD,ZAC) ; COMPUTE THE DIFFERENCE IN MINUTES "RTN","C0QMU12",625,0) . W !,"COMPUTED MINUTES: ",ZT "RTN","C0QMU12",626,0) . ;I ZT'=GTOT B ; LET'S FIND OUT WHAT'S WRONG "RTN","C0QMU12",627,0) . I ZT<0 D Q ; SKIP PATIENTS WITH NEGATIVE TIMES "RTN","C0QMU12",628,0) . . W !,"****EXCLUDED****" "RTN","C0QMU12",629,0) . I ZT>400000 D Q ; THESE ARE ERRORS "RTN","C0QMU12",630,0) . . W !,"****EXCLUDED****" "RTN","C0QMU12",631,0) . S ZARY1(ZT,ZI)="" ; ARRAY ORDERED BY MINUTES OF PATIENTS "RTN","C0QMU12",632,0) N ZY,ZZ S ZY="" S ZZ="" "RTN","C0QMU12",633,0) N ZCOUNT S ZCOUNT=0 "RTN","C0QMU12",634,0) F S ZY=$O(ZARY1(ZY)) Q:ZY="" D ; FOR EACH TIME "RTN","C0QMU12",635,0) . F S ZZ=$O(ZARY1(ZY,ZZ)) Q:ZZ="" D ; FOR EACH PATIENT WITH THIS TIME "RTN","C0QMU12",636,0) . . S ZCOUNT=ZCOUNT+1 "RTN","C0QMU12",637,0) . . S ZARY2(ZCOUNT,ZY,ZZ)="" "RTN","C0QMU12",638,0) . . ;W !,ZCOUNT," PATIENT: ",ZZ," MINUTES: ",ZY "RTN","C0QMU12",639,0) N ZMID "RTN","C0QMU12",640,0) S ZMID=$P(ZCOUNT/2,".") "RTN","C0QMU12",641,0) W !,"NUMBER OF PATIENTS IN REPORT: ",ZCOUNT "RTN","C0QMU12",642,0) W !,"ED ARRIVAL TIME UNTIL ",ZHF "RTN","C0QMU12",643,0) W !,"MEDIAN TIME: ",$O(ZARY2(ZMID,"")) "RTN","C0QMU12",644,0) Q "RTN","C0QMU12",645,0) ; "RTN","C0QMU12",646,0) RPATLN(ZLST) ; EXTRINSIC RETURNS THE GLOBAL NAME OF THE REMINDER PATIENT LIST "RTN","C0QMU12",647,0) ; WHOSE NAME IS ZLST "RTN","C0QMU12",648,0) N ZIEN,ZN "RTN","C0QMU12",649,0) S ZIEN=$O(^PXRMXP(810.5,"B",ZLST,"")) ; ien of patient list "RTN","C0QMU12",650,0) S ZN=$NA(^PXRMXP(810.5,ZIEN,30,"B")) ; GLOBAL NAME IN REMINDER PATIENT LIST "RTN","C0QMU12",651,0) Q ZN "RTN","C0QMU12",652,0) ; "RTN","C0QMU12",653,0) PATLN(ZATTR) ; EXTRINSIC RETURNS THE NAME OF THE PATIENT LIST WITH "RTN","C0QMU12",654,0) ; THE ATTRIBUTE ZATTR "RTN","C0QMU12",655,0) N ZIEN,ZN "RTN","C0QMU12",656,0) S ZIEN=$O(^C0Q(301,"CATTR",ZATTR,"")) ; ien of patient list "RTN","C0QMU12",657,0) S ZN=$NA(^C0Q(301,ZIEN,1,"B")) ; NAME OF PATIENT LIST IN C0Q PATIENT LIST "RTN","C0QMU12",658,0) Q ZN "RTN","C0QMU12",659,0) ; "RTN","C0QMU12",660,0) INLIST(ZLIST,DFN) ; EXTRINSIC FOR IS PATIENT ALREADY IN LIST ZLIST "RTN","C0QMU12",661,0) N ZL,ZR "RTN","C0QMU12",662,0) S ZL=$O(^C0Q(301,"CATTR",ZLIST,"")) ; IEN OF LIST IN C0Q PATIENT LIST FILE "RTN","C0QMU12",663,0) I ZL="" Q 0 ; LIST DOES NOT EXIST "RTN","C0QMU12",664,0) S ZR=0 ; ASSUME NOT IN LIST "RTN","C0QMU12",665,0) I $D(^C0Q(301,ZL,1,"B",DFN)) S ZR=1 ; PATIENT IS IN LIST "RTN","C0QMU12",666,0) Q ZR "RTN","C0QMU12",667,0) ; "RTN","C0QMU12",668,0) ; LOOK AT GETTING RID OF PRINT AND SS AS THEY ARE NOT BEING USED. GPL "RTN","C0QMU12",669,0) PRINT ; PRINT TO SCREEN "RTN","C0QMU12",670,0) I $D(WARD) W !!,WARD_"-"_WARDNAME_" "_RB_": "_PTNAME_"("_PTSEX_") " "RTN","C0QMU12",671,0) I $D(EXDTE) D ; "RTN","C0QMU12",672,0) . W !,"Discharge Date: ",EXDTE "RTN","C0QMU12",673,0) . W !,DFN," ",PTNAME "RTN","C0QMU12",674,0) W !,"DOB: ",PTDOB," HRN: ",PTHRN "RTN","C0QMU12",675,0) W !,"Language Spoken: ",$G(PTLANG) "RTN","C0QMU12",676,0) W !,"Race: ",RACEDSC "RTN","C0QMU12",677,0) W !,"Ethnicity: ",$G(ETHNDSC) "RTN","C0QMU12",678,0) W !,"Problems: " "RTN","C0QMU12",679,0) W !,PBDESC "RTN","C0QMU12",680,0) W !,"Allergies: " "RTN","C0QMU12",681,0) W !,ALDESC "RTN","C0QMU12",682,0) W !,"Medications: " "RTN","C0QMU12",683,0) W ! "RTN","C0QMU12",684,0) Q "RTN","C0QMU12",685,0) ; "RTN","C0QMU12",686,0) SS ; CREATE SPREADSHEET ARRAY "RTN","C0QMU12",687,0) S G1("Patient")=DFN "RTN","C0QMU12",688,0) I $D(WARD) D ; "RTN","C0QMU12",689,0) . S G1("WardName")=WARDNAME "RTN","C0QMU12",690,0) . S G1("RoomAndBed")=RB "RTN","C0QMU12",691,0) I $D(EXDTE) D ; "RTN","C0QMU12",692,0) . S G1("DischargeDate")=EXDTE "RTN","C0QMU12",693,0) S G1("PatientName")=PTNAME "RTN","C0QMU12",694,0) S G1("Gender")=PTSEX "RTN","C0QMU12",695,0) S G1("DateOfBirth")=PTDOB "RTN","C0QMU12",696,0) S G1("HealthRecordNumber")=PTHRN "RTN","C0QMU12",697,0) S G1("LanguageSpoken")=$G(PTLANG) "RTN","C0QMU12",698,0) S G1("Race")=RACEDSC "RTN","C0QMU12",699,0) S G1("Ehtnicity")=$G(ETHNDSC) "RTN","C0QMU12",700,0) S G1("Problem")=PBDESC "RTN","C0QMU12",701,0) I PBDESC["No problems found" S G1("HasProblem")=0 "RTN","C0QMU12",702,0) E S G1("HasProblem")=1 "RTN","C0QMU12",703,0) S G1("Allergies")=ALDESC "RTN","C0QMU12",704,0) I ALDESC["No Allergy" S G1("HasAllergy")=0 "RTN","C0QMU12",705,0) E S G1("HasAllergy")=1 "RTN","C0QMU12",706,0) I $D(MDITEM) D ; "RTN","C0QMU12",707,0) . S G1("HasMed")=1 "RTN","C0QMU12",708,0) E S G1("HasMed")=0 "RTN","C0QMU12",709,0) S G1("MedDescription")=$G(MDDESC) "RTN","C0QMU12",710,0) I $D(MDITEM) W !,"("_MDITEM_")"_MDDESC E W !,MDDESC "RTN","C0QMU12",711,0) D RNF1TO2B^C0CRNF("GRSLT","G1") "RTN","C0QMU12",712,0) K G1 "RTN","C0QMU12",713,0) Q ; DON'T WANT TO DO THE NHIN STUFF NOW "RTN","C0QMU12",714,0) ; "RTN","C0QMU12",715,0) PATLIST ; CREATE PATIENT LISTS "RTN","C0QMU12",716,0) ; WANT TO GET RID OF PATLIST AND MOVE FUNCTION TO OTHER ROUTINES. GPL "RTN","C0QMU12",717,0) S C0QLIST(ZYR_"Patient",DFN)="" ; THE PATIENT LIST "RTN","C0QMU12",718,0) N DEMOYN S DEMOYN=1 "RTN","C0QMU12",719,0) I $G(PTSEX)="" S DEMOYN=0 "RTN","C0QMU12",720,0) I $G(PTDOB)="" S DEMOYN=0 "RTN","C0QMU12",721,0) I $G(PTHRN)="" S DEMOYN=0 "RTN","C0QMU12",722,0) I $G(PTLANG)="" S DEMOYN=0 "RTN","C0QMU12",723,0) I $G(RACEDSC)="" S DEMOYN=0 "RTN","C0QMU12",724,0) I $G(ETHNDSC)="" S DEMOYN=0 "RTN","C0QMU12",725,0) ;I DEMOYN S C0QLIST("HasDemographics",DFN)="" "RTN","C0QMU12",726,0) ;E S C0QLIST("FailedDemographics",DFN)="" "RTN","C0QMU12",727,0) ;S G1("Gender")=PTSEX "RTN","C0QMU12",728,0) ;S G1("DateOfBirth")=PTDOB "RTN","C0QMU12",729,0) ;S G1("HealthRecordNumber")=PTHRN "RTN","C0QMU12",730,0) ;S G1("LanguageSpoken")=$G(PTLANG) "RTN","C0QMU12",731,0) ;S G1("Race")=RACEDSC "RTN","C0QMU12",732,0) ;S G1("Ehtnicity")=$G(ETHNDSC) "RTN","C0QMU12",733,0) S G1("Problem")=PBDESC "RTN","C0QMU12",734,0) I PBDESC["No problems found" S C0QLIST(ZYR_"NoProblem",DFN)="" "RTN","C0QMU12",735,0) E S C0QLIST(ZYR_"HasProblem",DFN)="" "RTN","C0QMU12",736,0) ;S G1("Allergies")=ALDESC "RTN","C0QMU12",737,0) I ALDESC["No Allergy" S C0QLIST(ZYR_"NoAllergy",DFN)="" "RTN","C0QMU12",738,0) E S C0QLIST(ZYR_"HasAllergy",DFN)="" "RTN","C0QMU12",739,0) ;I $D(MDITEM) D ; "RTN","C0QMU12",740,0) ;. S C0QLIST("HasMed",DFN)="" "RTN","C0QMU12",741,0) ;E S G1("NoMed",DFN)="" "RTN","C0QMU12",742,0) ;S G1("MedDescription")=$G(MDDESC) "RTN","C0QMU12",743,0) Q "RTN","C0QMU12",744,0) ; "RTN","C0QMU12",745,0) NHIN ; SHOW THE NHIN ARRAY FOR THIS PATIENT "RTN","C0QMU12",746,0) Q:DFN=137!14 "RTN","C0QMU12",747,0) D EN^C0CNHIN(.G,DFN,"") "RTN","C0QMU12",748,0) ZWR G "RTN","C0QMU12",749,0) K G "RTN","C0QMU12",750,0) ; "RTN","C0QMU12",751,0) QUIT ;end of WARD "RTN","C0QMU12",752,0) ; "RTN","C0QMU12",753,0) LOCPAT(PREFIX,LOC) ;retrieve active outpatients "RTN","C0QMU12",754,0) ; PREFIX WILL GO IN C0XLIST(PREFIX_"-PATIENT",DFN)="" "RTN","C0QMU12",755,0) ; LOC IS HOSPITAL LOCATION "RTN","C0QMU12",756,0) S ULOC=$O(^SC("B",LOC,"")) ; IEN OF HOSPITAL LOCATION "RTN","C0QMU12",757,0) I ULOC="" D Q ; OOPS "RTN","C0QMU12",758,0) . W !,"HOSPITAL LOCATION NOT FOUND: ",LOC "RTN","C0QMU12",759,0) S IDTE=9999999-DTE ; INVERSE DATE "RTN","C0QMU12",760,0) N ZI "RTN","C0QMU12",761,0) S ZI="" ; BEGIN AT LATEST DATE FOR THIS LOC IN VISIT FILE "RTN","C0QMU12",762,0) F S ZI=$O(^AUPNVSIT("AHL",ULOC,ZI)) Q:(ZI="")!(ZI>IDTE) D ; FOR EACH DATE "RTN","C0QMU12",763,0) . W !,$$FMTE^XLFDT(9999999-ZI) ;B ; "RTN","C0QMU12",764,0) . I ZI="" Q ; "RTN","C0QMU12",765,0) . N ZJ S ZJ="" "RTN","C0QMU12",766,0) . F S ZJ=$O(^AUPNVSIT("AHL",ULOC,ZI,ZJ)) Q:ZJ="" D ; FOR EACH VISIT "RTN","C0QMU12",767,0) . . S DFN=$$GET1^DIQ(9000010,ZJ,.05,"I") ; PATIENT "RTN","C0QMU12",768,0) . . S C0QLIST(PREFIX_"Patient",DFN)="" "RTN","C0QMU12",769,0) Q "RTN","C0QMU12",770,0) ; "RTN","C0QMU12",771,0) EPPAT(ZYR) ; BUILD ALL PATIENT LISTS FOR CLINICS "RTN","C0QMU12",772,0) ; "RTN","C0QMU12",773,0) S DTE=3111000 "RTN","C0QMU12",774,0) S MUYR=ZYR "RTN","C0QMU12",775,0) N ZC,ZN "RTN","C0QMU12",776,0) S ZN=0 "RTN","C0QMU12",777,0) N ZI S ZI=0 "RTN","C0QMU12",778,0) F S ZI=$O(^SC(ZI)) Q:+ZI=0 D ; FOR EVERY HOSPITAL LOCATION "RTN","C0QMU12",779,0) . I $$GET1^DIQ(44,ZI_",",2,"I")'="C" Q ; NOT A CLINIC "RTN","C0QMU12",780,0) . S ZC=$$GET1^DIQ(44,ZI_",",.01) ; NAME OF CLINIC "RTN","C0QMU12",781,0) . S ZCIEN=ZI ; IEN OF CLINIC "RTN","C0QMU12",782,0) . S ZN=ZN+1 ; COUNT OF CLINICS "RTN","C0QMU12",783,0) . S PRE=MUYR_"-EP-"_ZC_"-" "RTN","C0QMU12",784,0) . D LOCPAT(PRE,ZC) "RTN","C0QMU12",785,0) W !,"NUMBER OF CLINICS: ",ZN "RTN","C0QMU12",786,0) D FILE ; CREATE ALL THE EP PATIENT LISTS "RTN","C0QMU12",787,0) Q "RTN","C0QMU12",788,0) ; "RTN","C0QMU12",789,0) DOEP ; DO EP COMPUTATIONS "RTN","C0QMU12",790,0) S ZYR="MU12-" "RTN","C0QMU12",791,0) N C0QPARM,C0QCLNC "RTN","C0QMU12",792,0) D INIT("C0QPARM","EP") ; INITIALIZE PARAMETERS "RTN","C0QMU12",793,0) K C0QLIST ; CLEAR THE LIST "RTN","C0QMU12",794,0) N ZI S ZI="" "RTN","C0QMU12",795,0) F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ; FOR EACH EP "RTN","C0QMU12",796,0) . S DTE=C0QPARM(ZI,"EPBeginDate") ; beginning of measurement period "RTN","C0QMU12",797,0) . S EDTE=C0QPARM(ZI,"EPEndDate") ; end of measurement period -- tbd use this "RTN","C0QMU12",798,0) . S C0QCLNC=C0QPARM(ZI,"CLINICS",1,1) ; only one clinic for now "RTN","C0QMU12",799,0) . S PRE=ZYR_"EP-"_C0QCLNC_"-" "RTN","C0QMU12",800,0) . D LOCPAT(PRE,C0QCLNC) ; GET THE PATIENTS "RTN","C0QMU12",801,0) . I $D(DEBUG) ZWR C0QLIST "RTN","C0QMU12",802,0) . M C0QLIST(ZYR_"EP-ALL-PATIENTS")=C0QLIST(PRE_"Patient") "RTN","C0QMU12",803,0) S DFN="" "RTN","C0QMU12",804,0) S ZYR=ZYR_"EP-" "RTN","C0QMU12",805,0) F S DFN=$O(C0QLIST(ZYR_"ALL-PATIENTS",DFN)) Q:DFN="" D ; EACH PATIENT "RTN","C0QMU12",806,0) . D DEMO "RTN","C0QMU12",807,0) . D PROBLEM "RTN","C0QMU12",808,0) . D ALLERGY "RTN","C0QMU12",809,0) . ;D MEDS "RTN","C0QMU12",810,0) . D ERX "RTN","C0QMU12",811,0) . D SMOKING "RTN","C0QMU12",812,0) . D VITALS "RTN","C0QMU12",813,0) D FILE ; FILE THE PATIENT LISTS "RTN","C0QMU12",814,0) N C0QCIEN "RTN","C0QMU12",815,0) S ZI="" "RTN","C0QMU12",816,0) F S ZI=$O(C0QPARM(ZI)) Q:ZI="" D ; "RTN","C0QMU12",817,0) . S C0QCIEN=C0QPARM(ZI,"EPMeasurementSet") ; ien of measurement set "RTN","C0QMU12",818,0) . D UPDATE^C0QUPDT(.G,C0QCIEN) ; UPDATE THE MU MEASUREMENT SET "RTN","C0QMU12",819,0) Q "RTN","C0QMU12",820,0) ; "RTN","C0QMU12",821,0) DIS; "RTN","C0QMU12",822,0) N DFN,DTE,EXDTE S DTE="" "RTN","C0QMU12",823,0) F D Q:DTE="" "RTN","C0QMU12",824,0) . S DTE=$O(^DGPM("B",DTE)) "RTN","C0QMU12",825,0) . Q:'DTE "RTN","C0QMU12",826,0) . ;Q:$P(DTE,".")<3110703 "RTN","C0QMU12",827,0) . Q:$P(DTE,".")<3111000 ; NEW BEGIN DATE FOR FISCAL YEAR 2012 "RTN","C0QMU12",828,0) . S EXDTE=$$FMTE^XLFDT(DTE) "RTN","C0QMU12",829,0) . N PTFM S PTFM="" "RTN","C0QMU12",830,0) . D "RTN","C0QMU12",831,0) . . S PTFM=$O(^DGPM("B",DTE,PTFM)) "RTN","C0QMU12",832,0) . . Q:'PTFM "RTN","C0QMU12",833,0) . . S DFN=$P(^DGPM(PTFM,0),U,3) "RTN","C0QMU12",834,0) . . S C0QLIST(ZYR_"Patient",DFN)="" "RTN","C0QMU12",835,0) . . D DEMO "RTN","C0QMU12",836,0) . . D PROBLEM "RTN","C0QMU12",837,0) . . D ALLERGY "RTN","C0QMU12",838,0) . . D MEDS4 "RTN","C0QMU12",839,0) . . D RECON2 "RTN","C0QMU12",840,0) . . D ADVDIR "RTN","C0QMU12",841,0) . . D SMOKING "RTN","C0QMU12",842,0) . . D VITALS "RTN","C0QMU12",843,0) . . ;D:$P(DTE,".")>3110912 VTE1 "RTN","C0QMU12",844,0) . . D VTE1 "RTN","C0QMU12",845,0) . . D COD "RTN","C0QMU12",846,0) . . D EDTIME "RTN","C0QMU12",847,0) . . I C0QPR D PRINT "RTN","C0QMU12",848,0) . . I C0QSS D SS "RTN","C0QMU12",849,0) . . I C0QPL D PATLIST "RTN","C0QMU12",850,0) Q "RTN","C0QMU12",851,0) ; "RTN","C0QMU12",852,0) C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QMU12",853,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE "RTN","C0QMU12",854,0) FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST "RTN","C0QMU12",855,0) ; "RTN","C0QMU12",856,0) I '$D(C0QLIST) Q ; "RTN","C0QMU12",857,0) N LFN S LFN=$$C0QALFN() "RTN","C0QMU12",858,0) N ZI,ZN "RTN","C0QMU12",859,0) S ZI="" "RTN","C0QMU12",860,0) F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ; "RTN","C0QMU12",861,0) . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) "RTN","C0QMU12",862,0) . I ZN="" D ; LIST NOT FOUND, CREATE IT "RTN","C0QMU12",863,0) . . K C0QFDA "RTN","C0QMU12",864,0) . . S FN=$$C0QPLF ; C0Q PATIENT LIST FILE "RTN","C0QMU12",865,0) . . S C0QFDA(FN,"+1,",.01)=ZI "RTN","C0QMU12",866,0) . . S C0QFDA(FN,"+1,",999)=ZI ; ATTRIBUTE "RTN","C0QMU12",867,0) . . W !,"CREATING ",ZI "RTN","C0QMU12",868,0) . . D UPDIE ; ADD THE RECORD "RTN","C0QMU12",869,0) . . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) ; THE NEW IEN "RTN","C0QMU12",870,0) . ;I ZN="" D Q ; OOPS "RTN","C0QMU12",871,0) . ;. W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI "RTN","C0QMU12",872,0) . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN "RTN","C0QMU12",873,0) . N C0QNEW,C0QOLD,C0QRSLT "RTN","C0QMU12",874,0) . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST "RTN","C0QMU12",875,0) . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST "RTN","C0QMU12",876,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW "RTN","C0QMU12",877,0) . N ZJ,ZK "RTN","C0QMU12",878,0) . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST "RTN","C0QMU12",879,0) . K C0QFDA "RTN","C0QMU12",880,0) . S ZJ="" "RTN","C0QMU12",881,0) . F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY "RTN","C0QMU12",882,0) . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE "RTN","C0QMU12",883,0) . . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN "RTN","C0QMU12",884,0) . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE" "RTN","C0QMU12",885,0) . . . B "RTN","C0QMU12",886,0) . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@" "RTN","C0QMU12",887,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS "RTN","C0QMU12",888,0) . ; SECOND, PROCESS THE ADDITIONS "RTN","C0QMU12",889,0) . K C0QFDA "RTN","C0QMU12",890,0) . S ZJ="" S ZK=1 "RTN","C0QMU12",891,0) . F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0 "RTN","C0QMU12",892,0) . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ "RTN","C0QMU12",893,0) . . S ZK=ZK+1 "RTN","C0QMU12",894,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS "RTN","C0QMU12",895,0) ;. Q "RTN","C0QMU12",896,0) ;. K C0QFDA "RTN","C0QMU12",897,0) ;. N ZJ,ZC "RTN","C0QMU12",898,0) ;. S ZJ="" S ZC=1 "RTN","C0QMU12",899,0) ;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST "RTN","C0QMU12",900,0) ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ "RTN","C0QMU12",901,0) ;. . S ZC=ZC+1 "RTN","C0QMU12",902,0) ;. D UPDIE "RTN","C0QMU12",903,0) ;. W !,"FOUND:"_ZI "RTN","C0QMU12",904,0) Q "RTN","C0QMU12",905,0) ; "RTN","C0QMU12",906,0) KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE "RTN","C0QMU12",907,0) ; "RTN","C0QMU12",908,0) N C0QFDA,ZFN,LIST,ATTR "RTN","C0QMU12",909,0) S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QMU12",910,0) D CLEAN^DILF "RTN","C0QMU12",911,0) S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME "RTN","C0QMU12",912,0) S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE "RTN","C0QMU12",913,0) D CLEAN^DILF "RTN","C0QMU12",914,0) K ZERR "RTN","C0QMU12",915,0) S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE "RTN","C0QMU12",916,0) D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE "RTN","C0QMU12",917,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMU12",918,0) ;. W "ERROR",! "RTN","C0QMU12",919,0) ;. ZWR ZERR "RTN","C0QMU12",920,0) ;. B "RTN","C0QMU12",921,0) K C0QFDA "RTN","C0QMU12",922,0) S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD "RTN","C0QMU12",923,0) S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE "RTN","C0QMU12",924,0) D UPDIE ; CREATE THE SUBFILE "RTN","C0QMU12",925,0) N ZR ; NEW IEN FOR THE RECORD "RTN","C0QMU12",926,0) S ZR=$O(^C0Q(301,"CATTR",ATTR,"")) "RTN","C0QMU12",927,0) ; "RTN","C0QMU12",928,0) Q ZR "RTN","C0QMU12",929,0) ; "RTN","C0QMU12",930,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QMU12",931,0) K ZERR "RTN","C0QMU12",932,0) D CLEAN^DILF "RTN","C0QMU12",933,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QMU12",934,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QMU12",935,0) ;. W "ERROR",! "RTN","C0QMU12",936,0) ;. ZWR ZERR "RTN","C0QMU12",937,0) ;. B "RTN","C0QMU12",938,0) K C0QFDA "RTN","C0QMU12",939,0) Q "RTN","C0QMU12",940,0) ; "RTN","C0QMU12",941,0) ; WHAT FOLLOWS IS OLD CODE - DELETE WHEN THIS WORKS "RTN","C0QMU12",942,0) ;. . N PTNAME S PTNAME=$P(^DPT(DFN,0),U,1) "RTN","C0QMU12",943,0) ;. . S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth "RTN","C0QMU12",944,0) ;. . S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex "RTN","C0QMU12",945,0) ;. . D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility "RTN","C0QMU12",946,0) ;. . S PTHRN=$P($G(VA("PID")),U) ;health record number "RTN","C0QMU12",947,0) ;. . S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file "RTN","C0QMU12",948,0) ;. . I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl "RTN","C0QMU12",949,0) ;. . S RACE="" "RTN","C0QMU12",950,0) ;. . F D Q:RACE="" "RTN","C0QMU12",951,0) ;. . . S RACE=$O(^DPT(DFN,.02,"B",RACE)) "RTN","C0QMU12",952,0) ;. . . Q:'RACE "RTN","C0QMU12",953,0) ;. . . S RACEDSC=$P($G(^DIC(10,RACE,0)),U) "RTN","C0QMU12",954,0) ;. . N ETHNDSC "RTN","C0QMU12",955,0) ;. . N ETHNDSC S ETHNDSC="" "RTN","C0QMU12",956,0) ;. . S ETHN="" "RTN","C0QMU12",957,0) ;. . F D Q:ETHN="" "RTN","C0QMU12",958,0) ;. . . S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) "RTN","C0QMU12",959,0) ;. . . Q:'ETHN "RTN","C0QMU12",960,0) ;. . . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) "RTN","C0QMU12",961,0) ;. . D LIST^ORQQPL(.PROBL,DFN,"A") "RTN","C0QMU12",962,0) ;. . S PBCNT="" "RTN","C0QMU12",963,0) ;. . F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D "RTN","C0QMU12",964,0) ;. . . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description "RTN","C0QMU12",965,0) ;. . K PROBL "RTN","C0QMU12",966,0) ;. . D LIST^ORQQAL(.ALRGYL,DFN) "RTN","C0QMU12",967,0) ;. . S ALCNT="" "RTN","C0QMU12",968,0) ;. . F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D "RTN","C0QMU12",969,0) ;. . . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description "RTN","C0QMU12",970,0) ;. . K ALRGYL "RTN","C0QMU12",971,0) ;. . D COVER^ORWPS(.MEDSL,DFN) "RTN","C0QMU12",972,0) ;. . S MDCNT="" "RTN","C0QMU12",973,0) ;. . F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D "RTN","C0QMU12",974,0) ;. . . Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only "RTN","C0QMU12",975,0) ;. . . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description "RTN","C0QMU12",976,0) ;. . . S MDITEM=$P($G(MEDSL(MDCNT)),U,3) "RTN","C0QMU12",977,0) ;. . K MEDSL "RTN","C0QMU12",978,0) ;. . W !,"Discharge Date: ",EXDTE "RTN","C0QMU12",979,0) ;. . W !,DFN," ",PTNAME "RTN","C0QMU12",980,0) ;. . W !,"DOB: ",PTDOB," HRN: ",PTHRN "RTN","C0QMU12",981,0) ;. . W !,"Language Spoken: ",$G(PTLANG) "RTN","C0QMU12",982,0) ;. . W !,"Race: ",RACEDSC "RTN","C0QMU12",983,0) ;. . W !,"Ethnicity: ",ETHNDSC "RTN","C0QMU12",984,0) ;. . W !,"Problems: " "RTN","C0QMU12",985,0) ;. . W !,PBDESC "RTN","C0QMU12",986,0) ;. . W !,"Allergies: " "RTN","C0QMU12",987,0) ;. . W !,ALDESC "RTN","C0QMU12",988,0) ;. . W !,"Medications: " "RTN","C0QMU12",989,0) ;. . I $D(MDITEM) W !,"(",MDITEM,")",MDDESC E W !,MDDESC "RTN","C0QMU12",990,0) ;. . W ! "RTN","C0QMU12",991,0) ;Q "RTN","C0QMU12",992,0) ; "RTN","C0QMU12",993,0) ; "RTN","C0QMU12",994,0) ; "RTN","C0QMU12",995,0) ; "RTN","C0QMU12",996,0) END ;end of C0QPRML; "RTN","C0QNOTES") 0^15^B16851075 "RTN","C0QNOTES",1,0) C0QNOTES ;GPL - Utility to look up patient notes ;9/5/11 8:50pm "RTN","C0QNOTES",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QNOTES",3,0) ; "RTN","C0QNOTES",4,0) ;2011 George Lilly - Licensed under the terms of the GNU "RTN","C0QNOTES",5,0) ;General Public License See attached copy of the License. "RTN","C0QNOTES",6,0) ; "RTN","C0QNOTES",7,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QNOTES",8,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QNOTES",9,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QNOTES",10,0) ;(at your option) any later version. "RTN","C0QNOTES",11,0) ; "RTN","C0QNOTES",12,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QNOTES",13,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QNOTES",14,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QNOTES",15,0) ;GNU General Public License for more details. "RTN","C0QNOTES",16,0) ; "RTN","C0QNOTES",17,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QNOTES",18,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QNOTES",19,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QNOTES",20,0) ; "RTN","C0QNOTES",21,0) Q "RTN","C0QNOTES",22,0) HASNTYN(ZNTYP,DFN) ; EXTRINSIC 1 YES 0 NO DOES THE PATIENT DFN HAVE "RTN","C0QNOTES",23,0) ; NOTE TYPE ZNTYP "RTN","C0QNOTES",24,0) N C0QN,C0QO "RTN","C0QNOTES",25,0) S C0QO=$NA(^TIU(8925.1,"B",ZNTYP)) ; ALL DOCUMENT DEFS FOR THIS NAME "RTN","C0QNOTES",26,0) S C0QN=$NA(^TIU(8925,"AA",DFN)) ; NOTES THE PATIENT HAS "RTN","C0QNOTES",27,0) N C0QR "RTN","C0QNOTES",28,0) D UNITY^C0QSET("C0QR",C0QN,C0QO) ; DOES PATIENT HAVE THE NOTE? "RTN","C0QNOTES",29,0) N ZR "RTN","C0QNOTES",30,0) I $D(C0QR(1)) S ZR=1 "RTN","C0QNOTES",31,0) E S ZR=0 "RTN","C0QNOTES",32,0) Q ZR "RTN","C0QNOTES",33,0) ; "RTN","C0QNOTES",34,0) TESTNT(DFN) ; TEST THE NTTXT ROUTINE "RTN","C0QNOTES",35,0) W !,"MEDICATION RECON IN ER NURSE NOTE" "RTN","C0QNOTES",36,0) I $$NTTXT("ER NURSE NOTE","MEDICATION RECONCILIATION COMPLET",DFN) W " FOUND" "RTN","C0QNOTES",37,0) E W " NOT FOUND" "RTN","C0QNOTES",38,0) W !,"Medication Recon in MED/SURG NURSING ADMISSION ASSESSMENT" "RTN","C0QNOTES",39,0) I $$NTTXT("MED/SURG NURSING ADMISSION ASSESSMENT","Medication Reconcilation complete",DFN) W "FOUND" "RTN","C0QNOTES",40,0) E W " NOT FOUND" "RTN","C0QNOTES",41,0) Q "RTN","C0QNOTES",42,0) ; "RTN","C0QNOTES",43,0) NTTXT(NTTITLE,NTTXT,DFN) ; EXTRINSIC 1 YES 0 NO DOES PATIENT HAVE "RTN","C0QNOTES",44,0) ; TEXT NTTXT IN NOTE TITLE NTTITLE "RTN","C0QNOTES",45,0) N C0QNTA,C0QTYP "RTN","C0QNOTES",46,0) S C0QDFMT=$O(^TIU(8925.1,"B",NTTITLE,"")) ; DOCUMENT FORMAT IEN "RTN","C0QNOTES",47,0) S C0QNTA=$NA(^TIU(8925,"AA",DFN,C0QDFMT)) ; ARRAY OF NOTES OF THIS TYPE FOR "RTN","C0QNOTES",48,0) ;^TIU(8925,"AA",15393,1808,6889171,375262)="" "RTN","C0QNOTES",49,0) N ZI,ZN,ZD,ZL "RTN","C0QNOTES",50,0) S ZD="" ; DATE OF THE THE NOTE "RTN","C0QNOTES",51,0) N FOUND S FOUND=0 "RTN","C0QNOTES",52,0) F S ZD=$O(@C0QNTA@(ZD)) Q:FOUND Q:ZD="" D ; FOR EACH DATE "RTN","C0QNOTES",53,0) . S ZN="" "RTN","C0QNOTES",54,0) . F S ZN=$O(@C0QNTA@(ZD,ZN)) Q:FOUND Q:ZN="" D ; EACH NOTE "RTN","C0QNOTES",55,0) . . W !,"NOTE ",ZN," ",$G(^TIU(8925,ZN,"TEXT",1,0)) "RTN","C0QNOTES",56,0) . . S ZI=0 ; WANT TO STAR ON LINE 1 "RTN","C0QNOTES",57,0) . . S ZL=$NA(^TIU(8925,ZN,"TEXT")) "RTN","C0QNOTES",58,0) . . F S ZI=$O(@ZL@(ZI)) Q:+ZI=0 D ; "RTN","C0QNOTES",59,0) . . . I $P($G(@ZL@(ZI,0)),NTTXT,2)'="" S FOUND=1 D ; "RTN","C0QNOTES",60,0) . . . . W "**********",$G(@ZL@(ZI,0)),! "RTN","C0QNOTES",61,0) Q FOUND ; IT'S THAT SIMPLE... PLEASE LEAVE SOME TEXT AT THE END OF WHAT "RTN","C0QNOTES",62,0) ; YOU SEARCH FOR...gpl ... for example is this is the note title: "RTN","C0QNOTES",63,0) ; MED/SURG NURSING ADMISSION ASSESSMENT "RTN","C0QNOTES",64,0) ;and this is the text you want: Medication Reconcilation completed. "RTN","C0QNOTES",65,0) ; search for: Medication Reconcilation complete "RTN","C0QNOTES",66,0) ; that will leave the "d." in piece two of the line "RTN","C0QNOTES",67,0) ; "RTN","C0QNOTES",68,0) ; or for this note: "RTN","C0QNOTES",69,0) ;ER NURSE NOTE "RTN","C0QNOTES",70,0) ; and this text: "RTN","C0QNOTES",71,0) ;MEDICATION RECONCILIATION COMPLETED "RTN","C0QNOTES",72,0) ; search for MEDICATION RECONCILIATION COMPLET "RTN","C0QNOTES",73,0) ; which will leave the "ED" in piece 2 "RTN","C0QNOTES",74,0) TXTALL(ZRTN,ZTARY,DFN) ; EXTRINSIC WHICH SEARCHES ALL OF A PATIENT'S NOTES "RTN","C0QNOTES",75,0) ; FOR AN ARRAY OF TEXT MATCHES. ZRTN IS PASSED BY REFERENCE AND IS LIKE "RTN","C0QNOTES",76,0) ; AN RPC RETURN. ZTARY IS PASSED BY REFERENCE AND HAS THE FORMAT "RTN","C0QNOTES",77,0) ; ZTARY(1,"TEXT1")="" ZTARY(2,"TEXT2")="" ETC "RTN","C0QNOTES",78,0) N C0QTYP,C0QDFMT "RTN","C0QNOTES",79,0) ;S C0QDFMT=$O(^TIU(8925.1,"B",NTTITLE,"")) ; DOCUMENT FORMAT IEN "RTN","C0QNOTES",80,0) S C0QNTA=$NA(^TIU(8925,"AA",DFN)) ; ARRAY OF NOTES FOR "RTN","C0QNOTES",81,0) ;^TIU(8925,"AA",15393,1808,6889171,375262)="" "RTN","C0QNOTES",82,0) N ZI,ZJ,ZN,ZD,ZL,ZT,NTTXT,ZC,ZTYP "RTN","C0QNOTES",83,0) S ZT="" "RTN","C0QNOTES",84,0) F S ZT=$O(@C0QNTA@(ZT)) Q:ZT="" D ; "RTN","C0QNOTES",85,0) . S ZTYP=$$GET1^DIQ(8925.1,ZT_",",.01) ; NAME OF NOTE TITLE "RTN","C0QNOTES",86,0) . S ZD="" ; DATE OF THE THE NOTE "RTN","C0QNOTES",87,0) . N FOUND S FOUND=0 "RTN","C0QNOTES",88,0) . F S ZD=$O(@C0QNTA@(ZT,ZD)) Q:FOUND Q:ZD="" D ; FOR EACH DATE "RTN","C0QNOTES",89,0) . . S ZN="" "RTN","C0QNOTES",90,0) . . F S ZN=$O(@C0QNTA@(ZT,ZD,ZN)) Q:FOUND Q:ZN="" D ; EACH NOTE "RTN","C0QNOTES",91,0) . . . W !,"NOTE ",ZN," ",$G(^TIU(8925,ZN,"TEXT",1,0)) "RTN","C0QNOTES",92,0) . . . S ZI=0 ; WANT TO STAR ON LINE 1 "RTN","C0QNOTES",93,0) . . . S ZL=$NA(^TIU(8925,ZN,"TEXT")) "RTN","C0QNOTES",94,0) . . . F S ZI=$O(@ZL@(ZI)) Q:+ZI=0 D ; "RTN","C0QNOTES",95,0) . . . . S ZJ="" ; INDEX FOR SEARCH TERMS "RTN","C0QNOTES",96,0) . . . . F S ZJ=$O(ZTARY(ZJ)) Q:ZJ="" D ; FOR EACH SEARCH TERM "RTN","C0QNOTES",97,0) . . . . . S ATTR=$O(ZTARY(ZJ,"")) "RTN","C0QNOTES",98,0) . . . . . S NTTXT=$O(ZTARY(ZJ,ATTR,"")) "RTN","C0QNOTES",99,0) . . . . . I $P($G(@ZL@(ZI,0)),NTTXT,2)'="" S FOUND=1 D ; "RTN","C0QNOTES",100,0) . . . . . . W "**********",$G(@ZL@(ZI,0)),! "RTN","C0QNOTES",101,0) . . . . . . S ZC=$O(ZRTN(""),-1) ; NEXT COUNT "RTN","C0QNOTES",102,0) . . . . . . I ZC="" S ZC=1 "RTN","C0QNOTES",103,0) . . . . . . E S ZC=ZC+1 "RTN","C0QNOTES",104,0) . . . . . . S ZRTN(ZC,ATTR,ZTYP,ZN,NTTXT)=$G(@ZL@(ZI,0)) "RTN","C0QNOTES",105,0) Q $G(FOUND) ; IT'S THAT SIMPLE... PLEASE LEAVE SOME TEXT AT THE END OF WHAT "RTN","C0QNOTES",106,0) ; "RTN","C0QNOTES",107,0) TESTALL ; "RTN","C0QNOTES",108,0) S GT(1,"HasSmokingStatus","SMOK")="" "RTN","C0QNOTES",109,0) S GT(2,"HasSmokingStatus","Smok")="" "RTN","C0QNOTES",110,0) S GT(3,"HasSmokingStatus","smok")="" "RTN","C0QNOTES",111,0) S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")="" "RTN","C0QNOTES",112,0) S GT(5,"HasMedRecon","Medication Reconcilation Complete")="" "RTN","C0QNOTES",113,0) W $$TXTALL(.G,.GT,2) ; CHECK ALL PATIENT 2'S NOTEST FOR SMOKING "RTN","C0QNOTES",114,0) ZWR G "RTN","C0QNOTES",115,0) Q "RTN","C0QNOTES",116,0) ; "RTN","C0QPQRI") 0^7^B41579607 "RTN","C0QPQRI",1,0) C0QPQRI ; GPL - GENERATES A PQRI XML FILE ;6/14/11 17:05 "RTN","C0QPQRI",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QPQRI",3,0) ;Copyright 2011 George Lilly. Licensed under the terms of the GNU "RTN","C0QPQRI",4,0) ;General Public License See attached copy of the License. "RTN","C0QPQRI",5,0) ; "RTN","C0QPQRI",6,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QPQRI",7,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QPQRI",8,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QPQRI",9,0) ;(at your option) any later version. "RTN","C0QPQRI",10,0) ; "RTN","C0QPQRI",11,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QPQRI",12,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QPQRI",13,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QPQRI",14,0) ;GNU General Public License for more details. "RTN","C0QPQRI",15,0) ; "RTN","C0QPQRI",16,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QPQRI",17,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QPQRI",18,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QPQRI",19,0) ; "RTN","C0QPQRI",20,0) Q "RTN","C0QPQRI",21,0) ; "RTN","C0QPQRI",22,0) C0QQFN() Q 1130580001.101 ; FILE NUMBER FOR C0Q QUALITY MEASURE FILE "RTN","C0QPQRI",23,0) C0QMFN() Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE "RTN","C0QPQRI",24,0) C0QMMFN() Q 1130580001.2011 ; FN FOR MEASURE SUBFILE "RTN","C0QPQRI",25,0) C0QMMNFN() Q 1130580001.20111 ; FN FOR NUMERATOR SUBFILE "RTN","C0QPQRI",26,0) C0QMMDFN() Q 1130580001.20112 ; FN FOR DENOMINATOR SUBFILE "RTN","C0QPQRI",27,0) RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE "RTN","C0QPQRI",28,0) RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE "RTN","C0QPQRI",29,0) ; "RTN","C0QPQRI",30,0) EN ; "RTN","C0QPQRI",31,0) ; lets try some hard coded values for now "RTN","C0QPQRI",32,0) N C0QVAR "RTN","C0QPQRI",33,0) ; "RTN","C0QPQRI",34,0) ; first, the values that occur only once for the file "RTN","C0QPQRI",35,0) ; "RTN","C0QPQRI",36,0) S C0QVAR("create-by")="RegistryA" "RTN","C0QPQRI",37,0) S C0QVAR("create-date")="12-10-2010" "RTN","C0QPQRI",38,0) S C0QVAR("create-time")="14:27" "RTN","C0QPQRI",39,0) S C0QVAR("file-number")=1 "RTN","C0QPQRI",40,0) S C0QVAR("number-of-files")=9 "RTN","C0QPQRI",41,0) S C0QVAR("version")="1.0" "RTN","C0QPQRI",42,0) ; "RTN","C0QPQRI",43,0) ; registry values "RTN","C0QPQRI",44,0) ; "RTN","C0QPQRI",45,0) S C0QVAR("registry-id")=125789123 "RTN","C0QPQRI",46,0) S C0QVAR("registry-name")="Model Registry" "RTN","C0QPQRI",47,0) S C0QVAR("submission-method")="C" "RTN","C0QPQRI",48,0) ; "RTN","C0QPQRI",49,0) ; values for each provider "RTN","C0QPQRI",50,0) ; "RTN","C0QPQRI",51,0) S C0QVAR("npi")=12011989 "RTN","C0QPQRI",52,0) S C0QVAR("tin")=387682321 "RTN","C0QPQRI",53,0) S C0QVAR("waiver-signed")="Y" "RTN","C0QPQRI",54,0) S C0QVAR("encounter-from-date")="06-13-2010" "RTN","C0QPQRI",55,0) S C0QVAR("encounter-to-date")="12-10-2010" "RTN","C0QPQRI",56,0) ; "RTN","C0QPQRI",57,0) ; values for each measure group "RTN","C0QPQRI",58,0) ; "RTN","C0QPQRI",59,0) S C0QVAR("ffs-patient-count")=2 "RTN","C0QPQRI",60,0) S C0QVAR("group-eligible-instances")=30 "RTN","C0QPQRI",61,0) S C0QVAR("group-reporting-rate")=66.67 "RTN","C0QPQRI",62,0) S C0QVAR("group-reporting-rate-numerator")=20 "RTN","C0QPQRI",63,0) ; "RTN","C0QPQRI",64,0) ; for each measure "RTN","C0QPQRI",65,0) ; "RTN","C0QPQRI",66,0) S C0QVAR("pqri-measure-number")=128 "RTN","C0QPQRI",67,0) S C0QVAR("eligible-instances")=100 "RTN","C0QPQRI",68,0) S C0QVAR("meets-performance-instances")=18 "RTN","C0QPQRI",69,0) S C0QVAR("performance-exclusion-instances")=0 "RTN","C0QPQRI",70,0) S C0QVAR("performance-not-met-instances")=10 "RTN","C0QPQRI",71,0) S C0QVAR("performance-rate")="90.00" "RTN","C0QPQRI",72,0) S C0QVAR("reporting-rate")="28.00" "RTN","C0QPQRI",73,0) ; "RTN","C0QPQRI",74,0) ; "RTN","C0QPQRI",75,0) N ZG,ZV "RTN","C0QPQRI",76,0) D GETTEMP^C0CMXP("ZG","PQRIXML") ; GET THE TEMPLATE "RTN","C0QPQRI",77,0) D BIND^C0CSOAP("ZV","C0QVAR","PQRIXML") ; GET BINDING VALUES "RTN","C0QPQRI",78,0) D MAP^C0CXPATH("ZG","ZV","ZO") ; MAP THE XML "RTN","C0QPQRI",79,0) D MEA("GG","GGG") ; GET THE MEASURES "RTN","C0QPQRI",80,0) N GB ; BUILD LIST "RTN","C0QPQRI",81,0) D QUEUE^C0CXPATH("GB","ZO",1,30) ; first part of pqri.xml "RTN","C0QPQRI",82,0) D QUEUE^C0CXPATH("GB","GG",2,$O(GG(""),-1)-1) ; the measures "RTN","C0QPQRI",83,0) D QUEUE^C0CXPATH("GB","ZO",$O(ZO(""),-1)-2,$O(ZO(""),-1)) ; LAST LINES "RTN","C0QPQRI",84,0) D BUILD^C0CXPATH("GB","GZO") ; BUILD THE XML "RTN","C0QPQRI",85,0) N ZI S ZI=0 "RTN","C0QPQRI",86,0) F S ZI=$O(ZO(ZI)) Q:ZI="" D ; FOR EACH LINE OF XML "RTN","C0QPQRI",87,0) . W !,GZO(ZI) ; WRITE OUT THE XML "RTN","C0QPQRI",88,0) N GN,GN1,GD S GN=$NA(^TMP("C0QXML",$J)) "RTN","C0QPQRI",89,0) K @GN "RTN","C0QPQRI",90,0) K ZO(0) ; GET RID OF LINE COUNT "RTN","C0QPQRI",91,0) M @GN=GZO "RTN","C0QPQRI",92,0) S GN1=$NA(@GN@(1)) "RTN","C0QPQRI",93,0) S GD=$G(^TMP("C0CCCR","ODIR")) ; CONVENIENT OUTPUT DIRECTORY "RTN","C0QPQRI",94,0) W $$OUTPUT^C0CXPATH(GN1,"pqri.xml",GD) "RTN","C0QPQRI",95,0) K @GN ; DONT NEED IT ANYMORE "RTN","C0QPQRI",96,0) Q "RTN","C0QPQRI",97,0) ; "RTN","C0QPQRI",98,0) INSERT(ZARY,ZONE) ; INSERT ONE MEASURE INTO THE ARRAY "RTN","C0QPQRI",99,0) ; "RTN","C0QPQRI",100,0) ;N GGG "RTN","C0QPQRI",101,0) S GGG="//submission/measure-group ID='C'/provider/pqri-measure" ;XPATH "RTN","C0QPQRI",102,0) D INSINNER^COCXPATH(ZARY,GGG,ZONE) ; INSERT XML "RTN","C0QPQRI",103,0) Q "RTN","C0QPQRI",104,0) ; "RTN","C0QPQRI",105,0) PQRI(ZOUT,KEEP) ; RETURN THE NHIN ARRAY FOR THE PQRI XML TEMPLATE "RTN","C0QPQRI",106,0) ; "RTN","C0QPQRI",107,0) N ZG "RTN","C0QPQRI",108,0) S ZG=$NA(^TMP("PQRIXML",$J)) "RTN","C0QPQRI",109,0) K @ZG "RTN","C0QPQRI",110,0) D GETXML^C0CMXP(ZG,"PQRIXML") ; GET THE XML FROM C0C MISC XML "RTN","C0QPQRI",111,0) N C0CDOCID "RTN","C0QPQRI",112,0) S C0CDOCID=$$PARSE^C0CDOM(ZG,"PQRIXML") ; PARSE THE XML "RTN","C0QPQRI",113,0) D DOMO^C0CDOM(C0CDOCID,"/","ZOUT","GIDX","GARY",,"//submission") ; BLD ARRAYS "RTN","C0QPQRI",114,0) I '$G(KEEP) K GIDX,GARY ; GET RID OF THE ARRAYS UNLESS KEEP=1 "RTN","C0QPQRI",115,0) Q "RTN","C0QPQRI",116,0) ; "RTN","C0QPQRI",117,0) PROCESS(ZRSLT,ZXML,ZREDUCE,KEEP) ; PARSE AND RUN DOMO ON XML "RTN","C0QPQRI",118,0) ; ZRTN IS PASSED BY REFERENCE "RTN","C0QPQRI",119,0) ; ZXML IS PASSED BY NAME "RTN","C0QPQRI",120,0) ; IF KEEP IS 1, GARY AND GIDX ARE NOT KILLED "RTN","C0QPQRI",121,0) ; "RTN","C0QPQRI",122,0) N ZG "RTN","C0QPQRI",123,0) S ZG=$NA(^TMP("C0CXML",$J)) "RTN","C0QPQRI",124,0) K @ZG "RTN","C0QPQRI",125,0) M @ZG=@ZXML "RTN","C0QPQRI",126,0) S C0CDOCID=$$PARSE^C0CDOM(ZG,"NHINARRAY") ; PARSE WITH MXML "RTN","C0QPQRI",127,0) D DOMO^C0CDOM(C0CDOCID,"/","ZRSLT","GIDX","GARY",,$G(ZREDUCE)) ; BLD ARRAYS "RTN","C0QPQRI",128,0) I '$G(KEEP) K GIDX,GARY,@ZG ; GET RID OF THE ARRAYS UNLESS KEEP=1 "RTN","C0QPQRI",129,0) Q "RTN","C0QPQRI",130,0) ; "RTN","C0QPQRI",131,0) GETFM(RTN,ZREC) ; GET THE QUALITY MEASURES ARRAY "RTN","C0QPQRI",132,0) ; "RTN","C0QPQRI",133,0) I '$D(ZREC) S ZREC=7 ; OUTPATIENT CERTIFICATION SET "RTN","C0QPQRI",134,0) ;N GPL "RTN","C0QPQRI",135,0) D LIST^DIC($$C0QMMFN(),","_ZREC_",",".01;1.1;2.1;3;",,,,,,,,"GPL") "RTN","C0QPQRI",136,0) N ZI S ZI="" "RTN","C0QPQRI",137,0) F S ZI=$O(GPL("DILIST","ID",ZI)) Q:ZI="" D ; "RTN","C0QPQRI",138,0) . S @RTN@(ZI,"measure")=GPL("DILIST","ID",ZI,.01) "RTN","C0QPQRI",139,0) . N ZMIEN,ZMEAIEN,ZRNAME "RTN","C0QPQRI",140,0) . S ZMIEN=GPL("DILIST",2,ZI) ; IEN OF MEASURE IN MEASURE FILE "RTN","C0QPQRI",141,0) . ;S ZMEAIEN=$$GET1^DIQ($$C0QMMFN(),ZMIEN_","_ZREC_",",.01,"I") ; MEASURE "RTN","C0QPQRI",142,0) . S ZRNAME=$$GET1^DIQ($$C0QMMFN(),ZMIEN_","_ZREC_",",".01:.8") ; MEASURE "RTN","C0QPQRI",143,0) . ;S @RTN@(ZI,"reportingName")=$$GET1^DIQ($$C0QQFN(),ZMEAIEN_",",.8) ; RNAME "RTN","C0QPQRI",144,0) . S @RTN@(ZI,"reportingName")=ZRNAME ; A SHORTCUT TO THE REPORTING NAME "RTN","C0QPQRI",145,0) . S @RTN@(ZI,"reportingNumber")=$P(ZRNAME,"NQF",2) ; NQF0001 -> 0001 "RTN","C0QPQRI",146,0) . S @RTN@(ZI,"denominator")=+GPL("DILIST","ID",ZI,2.1) "RTN","C0QPQRI",147,0) . S @RTN@(ZI,"numerator")=+GPL("DILIST","ID",ZI,1.1) "RTN","C0QPQRI",148,0) . N ZNUM,ZDEM,ZPCT "RTN","C0QPQRI",149,0) . S (ZNUM,ZDEM,ZPCT)=0 "RTN","C0QPQRI",150,0) . S ZDEM=+GPL("DILIST","ID",ZI,2.1) "RTN","C0QPQRI",151,0) . S ZNUM=+GPL("DILIST","ID",ZI,1.1) "RTN","C0QPQRI",152,0) . I ZDEM>0 S ZPCT=((ZNUM*100)/ZDEM) "RTN","C0QPQRI",153,0) . S @RTN@(ZI,"percent")=$P(ZPCT,".",1) "RTN","C0QPQRI",154,0) . S @RTN@(ZI,"ien")=ZI "RTN","C0QPQRI",155,0) ;ZWR GPL "RTN","C0QPQRI",156,0) Q "RTN","C0QPQRI",157,0) ; "RTN","C0QPQRI",158,0) MEA(ZOUT,ZIN) ; CREATE XML FROM THE MEASURES ARRAY "RTN","C0QPQRI",159,0) ; "RTN","C0QPQRI",160,0) D GETFM(ZIN) ; GET THE MEASURES "RTN","C0QPQRI",161,0) ;N G "RTN","C0QPQRI",162,0) ;N ZI,ZJ "RTN","C0QPQRI",163,0) S ZI="" "RTN","C0QPQRI",164,0) F S ZI=$O(@ZIN@(ZI)) Q:ZI="" D ; "RTN","C0QPQRI",165,0) . N ZDEN,ZNUM,ZPCT "RTN","C0QPQRI",166,0) . S ZDEN=$G(@ZIN@(ZI,"denominator")) "RTN","C0QPQRI",167,0) . S ZNUM=$G(@ZIN@(ZI,"numerator")) "RTN","C0QPQRI",168,0) . S ZPCT=$G(@ZIN@(ZI,"percent")) "RTN","C0QPQRI",169,0) . S G("pqri-measure",ZI,"eligible-instances")=ZDEN "RTN","C0QPQRI",170,0) . S G("pqri-measure",ZI,"meets-performance-instances")=ZNUM "RTN","C0QPQRI",171,0) . S G("pqri-measure",ZI,"performance-exclusion-instances")=0 "RTN","C0QPQRI",172,0) . S G("pqri-measure",ZI,"performance-not-met-instances")=ZDEN-ZNUM "RTN","C0QPQRI",173,0) . S G("pqri-measure",ZI,"performance-rate")=ZPCT "RTN","C0QPQRI",174,0) . S G("pqri-measure",ZI,"pqri-measure-number")="NQF "_@ZIN@(ZI,"reportingNumber") "RTN","C0QPQRI",175,0) . S G("pqri-measure",ZI,"reporting-rate")=ZPCT "RTN","C0QPQRI",176,0) K ^TMP("MXMLDOM",$J) "RTN","C0QPQRI",177,0) S C0CDOCID=$$DOMI^C0CDOM("G",1,"root") "RTN","C0QPQRI",178,0) D OUTXML^C0CDOM(ZOUT,C0CDOCID,1) "RTN","C0QPQRI",179,0) Q "RTN","C0QPQRI",180,0) ; "RTN","C0QPRML") 0^8^B451973864 "RTN","C0QPRML",1,0) C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm "RTN","C0QPRML",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QPRML",3,0) ; "RTN","C0QPRML",4,0) ;2011 Zach Gonzales - Licensed under the terms of the GNU "RTN","C0QPRML",5,0) ;General Public License See attached copy of the License. "RTN","C0QPRML",6,0) ; "RTN","C0QPRML",7,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QPRML",8,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QPRML",9,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QPRML",10,0) ;(at your option) any later version. "RTN","C0QPRML",11,0) ; "RTN","C0QPRML",12,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QPRML",13,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QPRML",14,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QPRML",15,0) ;GNU General Public License for more details. "RTN","C0QPRML",16,0) ; "RTN","C0QPRML",17,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QPRML",18,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QPRML",19,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QPRML",20,0) ; "RTN","C0QPRML",21,0) BUILD ; CALL ALL AND DIS AND BUILD THE GRSLT ARRAY or print or create "RTN","C0QPRML",22,0) ; patient lists "RTN","C0QPRML",23,0) ;N GRSLT ; ARRAY FOR RESULTS "RTN","C0QPRML",24,0) I '$D(C0QSS) S C0QSS=0 ;default don't build spreadsheet array "RTN","C0QPRML",25,0) I '$D(C0QPR) S C0QPR=0 ;default don't print out results "RTN","C0QPRML",26,0) I '$D(C0QPL) S C0QPL=1 ;default do create patient lists "RTN","C0QPRML",27,0) N G1 ; ONE SET OF VALUES - RNF1 FORMAT "RTN","C0QPRML",28,0) ; INITIALIZE LISTS "RTN","C0QPRML",29,0) ; this is done so that if there are no matching patients, the patient list "RTN","C0QPRML",30,0) ; will be zeroed out "RTN","C0QPRML",31,0) S C0QLIST("HasDemographics")="" "RTN","C0QPRML",32,0) S C0QLIST("Patient")="" "RTN","C0QPRML",33,0) S C0QLIST("HasProblem")="" "RTN","C0QPRML",34,0) S C0QLIST("HasAllergy")="" "RTN","C0QPRML",35,0) S C0QLIST("HasMed")="" "RTN","C0QPRML",36,0) S C0QLIST("HasVitalSigns")="" "RTN","C0QPRML",37,0) S C0QLIST("HasMedOrders")="" "RTN","C0QPRML",38,0) S C0QLIST("HasSmokingStatus")="" "RTN","C0QPRML",39,0) D ALL ; all currently admitted patients in the hospital "RTN","C0QPRML",40,0) D DIS ; all patients discharged since the reporting period began "RTN","C0QPRML",41,0) I C0QSS ZWR GRSLT "RTN","C0QPRML",42,0) I C0QPL D ; "RTN","C0QPRML",43,0) . D FILE ; FILE THE PATIENT LISTS "RTN","C0QPRML",44,0) . D UPDATE^C0QUPDT(.G,8) ; UPDATE THE MU MEASUREMENT SET "RTN","C0QPRML",45,0) . D UPDATE^C0QUPDT(.G,9) ; UPDATE THE MU MEASUREMENT SET "RTN","C0QPRML",46,0) Q "RTN","C0QPRML",47,0) ; "RTN","C0QPRML",48,0) ALL ;retrieve active inpatients "RTN","C0QPRML",49,0) N WARD S WARD="" "RTN","C0QPRML",50,0) F D Q:WARD="" "RTN","C0QPRML",51,0) . S WARD=$O(^DIC(42,"B",WARD)) ;ward name "RTN","C0QPRML",52,0) . Q:WARD="" "RTN","C0QPRML",53,0) . N WIEN S WIEN="" "RTN","C0QPRML",54,0) . F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN "RTN","C0QPRML",55,0) . . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name "RTN","C0QPRML",56,0) . . N DFN,RB S DFN="" "RTN","C0QPRML",57,0) . . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward "RTN","C0QPRML",58,0) . . . D DEMO "RTN","C0QPRML",59,0) . . . D PROBLEM "RTN","C0QPRML",60,0) . . . D ALLERGY "RTN","C0QPRML",61,0) . . . D MEDS4 "RTN","C0QPRML",62,0) . . . D RECON2 "RTN","C0QPRML",63,0) . . . D ADVDIR "RTN","C0QPRML",64,0) . . . D SMOKING "RTN","C0QPRML",65,0) . . . D VITALS "RTN","C0QPRML",66,0) . . . D VTE1 "RTN","C0QPRML",67,0) . . . D EDTIME "RTN","C0QPRML",68,0) . . . I C0QPR D PRINT "RTN","C0QPRML",69,0) . . . I C0QSS D SS "RTN","C0QPRML",70,0) . . . I C0QPL D PATLIST "RTN","C0QPRML",71,0) Q "RTN","C0QPRML",72,0) ; "RTN","C0QPRML",73,0) DEMO ; patient demographics "RTN","C0QPRML",74,0) K PTDOB "RTN","C0QPRML",75,0) N PTNAME,PTSEX,PTHRN,PTRLANG,PTLANG,RACE,RACEDSC,ETHN,ETHNDSC,RB "RTN","C0QPRML",76,0) S PTNAME=$P(^DPT(DFN,0),U) ;patient name "RTN","C0QPRML",77,0) S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth "RTN","C0QPRML",78,0) S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex "RTN","C0QPRML",79,0) D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility "RTN","C0QPRML",80,0) S PTHRN=$P($G(VA("PID")),U) ;health record number "RTN","C0QPRML",81,0) S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file "RTN","C0QPRML",82,0) I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl "RTN","C0QPRML",83,0) S RACE="" "RTN","C0QPRML",84,0) F D Q:RACE="" "RTN","C0QPRML",85,0) . S RACE=$O(^DPT(DFN,.02,"B",RACE)) ;race code IEN "RTN","C0QPRML",86,0) . Q:'RACE "RTN","C0QPRML",87,0) . S RACEDSC=$P($G(^DIC(10,RACE,0)),U) ;race description "RTN","C0QPRML",88,0) S ETHN="" "RTN","C0QPRML",89,0) F D Q:ETHN="" "RTN","C0QPRML",90,0) . S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) ;ethnicity IEN "RTN","C0QPRML",91,0) . Q:'ETHN "RTN","C0QPRML",92,0) . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description "RTN","C0QPRML",93,0) S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed "RTN","C0QPRML",94,0) N DEMOYN S DEMOYN=1 "RTN","C0QPRML",95,0) I $G(PTSEX)="" S DEMOYN=0 "RTN","C0QPRML",96,0) I $G(PTDOB)="" S DEMOYN=0 "RTN","C0QPRML",97,0) I $G(PTHRN)="" S DEMOYN=0 "RTN","C0QPRML",98,0) I $G(PTLANG)="" S DEMOYN=0 "RTN","C0QPRML",99,0) I $G(RACEDSC)="" S DEMOYN=0 "RTN","C0QPRML",100,0) I $G(ETHNDSC)="" S DEMOYN=0 "RTN","C0QPRML",101,0) I DEMOYN S C0QLIST("HasDemographics",DFN)="" "RTN","C0QPRML",102,0) E S C0QLIST("FailedDemographics",DFN)="" "RTN","C0QPRML",103,0) Q "RTN","C0QPRML",104,0) ; "RTN","C0QPRML",105,0) PROBLEM ; PATIENT PROBLEMS "RTN","C0QPRML",106,0) D LIST^ORQQPL(.PROBL,DFN,"A") "RTN","C0QPRML",107,0) S PBCNT="" "RTN","C0QPRML",108,0) F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D "RTN","C0QPRML",109,0) . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description "RTN","C0QPRML",110,0) K PROBL "RTN","C0QPRML",111,0) Q "RTN","C0QPRML",112,0) ; "RTN","C0QPRML",113,0) ALLERGY ; ALLERGY LIST "RTN","C0QPRML",114,0) D LIST^ORQQAL(.ALRGYL,DFN) "RTN","C0QPRML",115,0) S ALCNT="" "RTN","C0QPRML",116,0) F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D "RTN","C0QPRML",117,0) . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description "RTN","C0QPRML",118,0) K ALRGYL "RTN","C0QPRML",119,0) Q "RTN","C0QPRML",120,0) ; "RTN","C0QPRML",121,0) MEDS ; MEDICATIONS "RTN","C0QPRML",122,0) ; "RTN","C0QPRML",123,0) I DFN=97 D Q ; "RTN","C0QPRML",124,0) . S MDCNT=271 "RTN","C0QPRML",125,0) K MEDSL "RTN","C0QPRML",126,0) D EN^C0CNHIN(.MEDSL,DFN,"MED;") ; GET THE MEDS FROM THE NHIN API "RTN","C0QPRML",127,0) ; can't use COVER^ORWPS even though it's fast.. we need to detect "RTN","C0QPRML",128,0) ; if the medications are Inpatient to compute the CPOE measure "RTN","C0QPRML",129,0) ; we will use the NHINV routines for this purpose "RTN","C0QPRML",130,0) ;D COVER^ORWPS(.MEDSL,DFN) "RTN","C0QPRML",131,0) S MDCNT="" S HASINP=0 "RTN","C0QPRML",132,0) F S MDCNT=$O(MEDSL("med",MDCNT)) Q:MDCNT="" D "RTN","C0QPRML",133,0) . ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only "RTN","C0QPRML",134,0) . Q:MEDSL("med",MDCNT,"status@value")'="active" "RTN","C0QPRML",135,0) . ;S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description "RTN","C0QPRML",136,0) . S MDDESC=$G(MEDSL("med",MDCNT,"products.product@name")) "RTN","C0QPRML",137,0) . ;S MDITEM=$P($G(MEDSL(MDCNT)),U,3) "RTN","C0QPRML",138,0) . S MDITEM=$G(MEDSL("med",MDCNT,"sig")) ; i think this is what meditem is "RTN","C0QPRML",139,0) . I MEDSL("med",MDCNT,"vaType@value")="I" S HASINP=1 "RTN","C0QPRML",140,0) I HASINP D ; THE PATIENT HAS AN INPATIENT MED "RTN","C0QPRML",141,0) . S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE "RTN","C0QPRML",142,0) E S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient "RTN","C0QPRML",143,0) K MEDSL "RTN","C0QPRML",144,0) Q "RTN","C0QPRML",145,0) ; "RTN","C0QPRML",146,0) MEDS2 ; MEDICATIONS "RTN","C0QPRML",147,0) ; "RTN","C0QPRML",148,0) K MEDSL,MDDESC,MDITEM "RTN","C0QPRML",149,0) D COVER^ORWPS(.MEDSL,DFN) ; CPRS MED LIST "RTN","C0QPRML",150,0) I '$D(MEDSL) D ; "RTN","C0QPRML",151,0) . S C0QLIST("NoMedOrders",DFN)="" "RTN","C0QPRML",152,0) . I $$HFYN^C0QHF(DFN,"MEDS HAVE BEEN REVIEWED") D ; "RTN","C0QPRML",153,0) . . S C0QLIST("HasMed",DFN)="" "RTN","C0QPRML",154,0) . E S C0QLIST("NoMed",DFN)="" "RTN","C0QPRML",155,0) S MDCNT="" S HASINP=0 "RTN","C0QPRML",156,0) F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D ; "RTN","C0QPRML",157,0) . ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only "RTN","C0QPRML",158,0) . ;S C0QLIST("HasMedOrders",DFN)="" "RTN","C0QPRML",159,0) . S C0QLIST("HasMed",DFN)="" "RTN","C0QPRML",160,0) . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description "RTN","C0QPRML",161,0) . S MDITEM=$P($G(MEDSL(MDCNT)),U,3) "RTN","C0QPRML",162,0) . I $P($P(MEDSL(MDCNT),"^",1),";",2)="I" S HASINP=1 "RTN","C0QPRML",163,0) I HASINP D ; THE PATIENT HAS AN INPATIENT MED "RTN","C0QPRML",164,0) . S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE "RTN","C0QPRML",165,0) E S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient "RTN","C0QPRML",166,0) K MEDSL "RTN","C0QPRML",167,0) Q "RTN","C0QPRML",168,0) ; "RTN","C0QPRML",169,0) MEDS3 ; USE THE REMINDER INDEX ^PXRMINDX TO CHECK FOR MEDS "RTN","C0QPRML",170,0) ; "RTN","C0QPRML",171,0) S C0QPXRM=$NA(^PXRMINDX(55,"PI")) ; REMINDER INDEX FOR DRUGS "RTN","C0QPRML",172,0) I $D(@C0QPXRM@(DFN)) D ; HAS MEDS "RTN","C0QPRML",173,0) . S C0QLIST("HasMed",DFN)="" "RTN","C0QPRML",174,0) . S C0QLIST("HasMedOrders",DFN)="" "RTN","C0QPRML",175,0) E D ; NO MEDS "RTN","C0QPRML",176,0) . S C0QLIST("NoMed",DFN)="" "RTN","C0QPRML",177,0) . S C0QLIST("NoMedOrders",DFN)="" "RTN","C0QPRML",178,0) Q "RTN","C0QPRML",179,0) ; "RTN","C0QPRML",180,0) MEDS4 ; USE OCL^PSOORRL TO GET ALL MEDS "RTN","C0QPRML",181,0) N BEG,END "RTN","C0QPRML",182,0) S BEG=$$DT^C0PCUR("JULY 3,2011") "RTN","C0QPRML",183,0) S END=$$DT^C0PCUR("NOW") "RTN","C0QPRML",184,0) D OCL^PSOORRL(DFN,BEG,END) ;DBIA #2400 "RTN","C0QPRML",185,0) N C0QMEDS "RTN","C0QPRML",186,0) M C0QMEDS=^TMP("PS",$J) ; MEDS RETURNED FROM CALL "RTN","C0QPRML",187,0) N FOUND "RTN","C0QPRML",188,0) N ZI "RTN","C0QPRML",189,0) I '$D(C0QMEDS(1)) D Q ; QUIT IF NO MEDS "RTN","C0QPRML",190,0) . S C0QLIST("NoMed",DFN)="" "RTN","C0QPRML",191,0) E D ; HAS MEDS "RTN","C0QPRML",192,0) . S C0QLIST("HasMed",DFN)="" "RTN","C0QPRML",193,0) S ZI="" S FOUND=0 "RTN","C0QPRML",194,0) F S ZI=$O(C0QMEDS(ZI)) Q:ZI="" D ; FOR EACH MED "RTN","C0QPRML",195,0) . N ZM "RTN","C0QPRML",196,0) . S ZM=$G(C0QMEDS(ZI,0)) ;THE MEDICATION "RTN","C0QPRML",197,0) . I $P($P(ZM,"^",1),";",2)="I" D ; IE 1U;I FOR AN INPATIENT UNIT DOSE "RTN","C0QPRML",198,0) . . S FOUND=1 "RTN","C0QPRML",199,0) I FOUND S C0QLIST("HasMedOrders",DFN)="" ; MET CPOE MEASURE "RTN","C0QPRML",200,0) E S C0QLIST("NoMedOrders",DFN)="" "RTN","C0QPRML",201,0) Q "RTN","C0QPRML",202,0) ; "RTN","C0QPRML",203,0) RECON ; MEDICATIONS RECONCILIATION "RTN","C0QPRML",204,0) ; "RTN","C0QPRML",205,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QPRML",206,0) . S C0QLIST("XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QPRML",207,0) N HASRECON S HASRECON=0 "RTN","C0QPRML",208,0) N GT,G "RTN","C0QPRML",209,0) S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")="" "RTN","C0QPRML",210,0) S GT(5,"HasMedRecon","Medication Reconcilation Complete")="" "RTN","C0QPRML",211,0) I $$TXTALL^C0QNOTES(.G,.GT,DFN) D ; SEARCH ALL NOTES FOR MED RECON "RTN","C0QPRML",212,0) . S HASRECON=1 "RTN","C0QPRML",213,0) ;N ZT "RTN","C0QPRML",214,0) ;S ZT="MEDICATION RECONCILIATION COMPLET" "RTN","C0QPRML",215,0) ;I $$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) D ; "RTN","C0QPRML",216,0) ;. S HASRECON=1 "RTN","C0QPRML",217,0) ;E D ; "RTN","C0QPRML",218,0) ;. S ZT="Medication Reconcilation Complete" "RTN","C0QPRML",219,0) ;. I $$NTTXT^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",ZT,DFN) D ; "RTN","C0QPRML",220,0) ;. . S HASRECON=1 "RTN","C0QPRML",221,0) ;I $$HFYN^C0QHF("MEDS HAVE BEEN REVIEWED",DFN) S HASRECON=1 "RTN","C0QPRML",222,0) I HASRECON D ; "RTN","C0QPRML",223,0) . S C0QLIST("HasMedRecon",DFN)="" "RTN","C0QPRML",224,0) E S C0QLIST("NoMedRecon",DFN)="" "RTN","C0QPRML",225,0) Q "RTN","C0QPRML",226,0) ; "RTN","C0QPRML",227,0) RECON2 ; USE HEALTH FACTORS FOR MEDICATION RECONCILIATION "RTN","C0QPRML",228,0) I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; "RTN","C0QPRML",229,0) . S C0QLIST("XferOfCare",DFN)="" ; transfer of care patient "RTN","C0QPRML",230,0) I $$HFYN^C0QHF(DFN,"Medication Reconciliation Completed: Yes") D ; "RTN","C0QPRML",231,0) . S C0QLIST("HasMedRecon",DFN)="" "RTN","C0QPRML",232,0) E S C0QLIST("NoMedRecon",DFN)="" "RTN","C0QPRML",233,0) Q "RTN","C0QPRML",234,0) ; "RTN","C0QPRML",235,0) ADVDIR ; ADVANCE DIRECTIVE "RTN","C0QPRML",236,0) ; "RTN","C0QPRML",237,0) I $$AGE^C0QUTIL(DFN)>64 D ; ONLY FOR PATIENTS 65 AND OLDER "RTN","C0QPRML",238,0) . S C0QLIST("Over65",DFN)="" "RTN","C0QPRML",239,0) . I $$HASNTYN^C0QNOTES("ADVANCE DIRECTIVE",DFN) D ; "RTN","C0QPRML",240,0) . . S C0QLIST("HasAdvanceDirective",DFN)="" "RTN","C0QPRML",241,0) . E D ; "RTN","C0QPRML",242,0) . . S C0QLIST("NoAdvanceDirective",DFN)="" "RTN","C0QPRML",243,0) Q "RTN","C0QPRML",244,0) ; "RTN","C0QPRML",245,0) SMOKING ; "RTN","C0QPRML",246,0) I $$INLIST("HasSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STATUS CHECK "RTN","C0QPRML",247,0) . S C0QLIST("HasSmokingStatus",DFN)="" "RTN","C0QPRML",248,0) . S C0QLIST("Over12",DFN)="" "RTN","C0QPRML",249,0) I $$INLIST("NoSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STATUS CHECK "RTN","C0QPRML",250,0) . S C0QLIST("NoSmokingStatus",DFN)="" "RTN","C0QPRML",251,0) . S C0QLIST("Over12",DFN)="" "RTN","C0QPRML",252,0) N C0QSMOKE,C0QSYN "RTN","C0QPRML",253,0) S C0QSYN=0 "RTN","C0QPRML",254,0) I $$AGE^C0QUTIL(DFN)<13 Q ; DON'T CHECK UNDER AGE 13 "RTN","C0QPRML",255,0) D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE "RTN","C0QPRML",256,0) ; PATIENT IN THE CATEGORY OF TOBACCO "RTN","C0QPRML",257,0) I $D(C0QSMOKE) S C0QSYN=1 "RTN","C0QPRML",258,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco <1 Yr Ago") "RTN","C0QPRML",259,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco > 20 Yrs Ago") "RTN","C0QPRML",260,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 1-5 Yrs Ago") "RTN","C0QPRML",261,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 10-20 Yrs Ago") "RTN","C0QPRML",262,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 5-10 Yrs Ago") "RTN","C0QPRML",263,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking") "RTN","C0QPRML",264,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking < 1 Yr Ago") "RTN","C0QPRML",265,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking > 20 Yrs Ago") "RTN","C0QPRML",266,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 1-5 Yrs Ago") "RTN","C0QPRML",267,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 10-20 Yrs Ago") "RTN","C0QPRML",268,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 5-10 Yrs Ago") "RTN","C0QPRML",269,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") "RTN","C0QPRML",270,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 1-5 YRS AGO") "RTN","C0QPRML",271,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 10-20 YRS AGO") "RTN","C0QPRML",272,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 5-10 YRS AGO") "RTN","C0QPRML",273,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: < 1 YR AGO") "RTN","C0QPRML",274,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: > 20 YRS AGO") "RTN","C0QPRML",275,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER") "RTN","C0QPRML",276,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 10-20 YRS") "RTN","C0QPRML",277,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 20+ YRS") "RTN","C0QPRML",278,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR") "RTN","C0QPRML",279,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR AGO") "RTN","C0QPRML",280,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER > 20 YRS AGO") "RTN","C0QPRML",281,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS") "RTN","C0QPRML",282,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS AGO") "RTN","C0QPRML",283,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 10-20 YRS AGO") "RTN","C0QPRML",284,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS") "RTN","C0QPRML",285,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS AGO") "RTN","C0QPRML",286,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") "RTN","C0QPRML",287,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QPRML",288,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QPRML",289,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QPRML",290,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QPRML",291,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QPRML",292,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QPRML",293,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QPRML",294,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QPRML",295,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QPRML",296,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QPRML",297,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QPRML",298,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QPRML",299,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QPRML",300,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QPRML",301,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QPRML",302,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QPRML",303,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QPRML",304,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QPRML",305,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QPRML",306,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking Cessation (OPH)") "RTN","C0QPRML",307,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QPRML",308,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QPRML",309,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QPRML",310,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QPRML",311,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QPRML",312,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QPRML",313,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QPRML",314,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QPRML",315,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QPRML",316,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QPRML",317,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QPRML",318,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QPRML",319,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QPRML",320,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QPRML",321,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QPRML",322,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QPRML",323,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QPRML",324,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QPRML",325,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QPRML",326,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QPRML",327,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QPRML",328,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QPRML",329,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QPRML",330,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QPRML",331,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QPRML",332,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QPRML",333,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QPRML",334,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QPRML",335,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QPRML",336,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QPRML",337,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QPRML",338,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QPRML",339,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QPRML",340,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QPRML",341,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QPRML",342,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QPRML",343,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QPRML",344,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QPRML",345,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QPRML",346,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QPRML",347,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QPRML",348,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QPRML",349,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QPRML",350,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QPRML",351,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QPRML",352,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QPRML",353,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QPRML",354,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QPRML",355,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QPRML",356,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QPRML",357,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QPRML",358,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QPRML",359,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QPRML",360,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QPRML",361,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QPRML",362,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QPRML",363,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QPRML",364,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QPRML",365,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QPRML",366,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") "RTN","C0QPRML",367,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") "RTN","C0QPRML",368,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") "RTN","C0QPRML",369,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") "RTN","C0QPRML",370,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") "RTN","C0QPRML",371,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") "RTN","C0QPRML",372,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") "RTN","C0QPRML",373,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") "RTN","C0QPRML",374,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") "RTN","C0QPRML",375,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") "RTN","C0QPRML",376,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") "RTN","C0QPRML",377,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") "RTN","C0QPRML",378,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") "RTN","C0QPRML",379,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") "RTN","C0QPRML",380,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") "RTN","C0QPRML",381,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") "RTN","C0QPRML",382,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") "RTN","C0QPRML",383,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") "RTN","C0QPRML",384,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") "RTN","C0QPRML",385,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") "RTN","C0QPRML",386,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker (PMH)") "RTN","C0QPRML",387,0) S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Tobacco User") "RTN","C0QPRML",388,0) S C0QLIST("Over12",DFN)="" "RTN","C0QPRML",389,0) N GT "RTN","C0QPRML",390,0) S GT(1,"HasSmokingStatus","SMOK")="" "RTN","C0QPRML",391,0) S GT(2,"HasSmokingStatus","Smok")="" "RTN","C0QPRML",392,0) S GT(3,"HasSmokingStatus","smok")="" "RTN","C0QPRML",393,0) ;N ZT "RTN","C0QPRML",394,0) ;S ZT="Smok" "RTN","C0QPRML",395,0) ;S:'C0QSYN C0QSYN=$$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) ; "RTN","C0QPRML",396,0) I 'C0QSYN D ; "RTN","C0QPRML",397,0) . N G "RTN","C0QPRML",398,0) . S OK=$$TXTALL^C0QNOTES(.G,.GT,DFN) "RTN","C0QPRML",399,0) . I $D(G) S C0QSYN=1 "RTN","C0QPRML",400,0) I C0QSYN S C0QLIST("HasSmokingStatus",DFN)="" "RTN","C0QPRML",401,0) E S C0QLIST("NoSmokingStatus",DFN)="" "RTN","C0QPRML",402,0) Q "RTN","C0QPRML",403,0) ; "RTN","C0QPRML",404,0) VITALS ; "RTN","C0QPRML",405,0) ; "RTN","C0QPRML",406,0) N C0QSDT,C0QEDT "RTN","C0QPRML",407,0) D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE "RTN","C0QPRML",408,0) D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY "RTN","C0QPRML",409,0) D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS "RTN","C0QPRML",410,0) I $D(VITRSLT) D ;ZWR VITRSLT B ; "RTN","C0QPRML",411,0) . I VITRSLT(1)["No vitals found." S C0QLIST("NoVitalSigns",DFN)="" "RTN","C0QPRML",412,0) . E S C0QLIST("HasVitalSigns",DFN)="" "RTN","C0QPRML",413,0) Q "RTN","C0QPRML",414,0) ; "RTN","C0QPRML",415,0) VTE1 ; VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL "RTN","C0QPRML",416,0) ; "RTN","C0QPRML",417,0) I $$HFYN^C0QHF(DFN,"VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL") D ; "RTN","C0QPRML",418,0) . S C0QLIST("HasVTE24",DFN)="" "RTN","C0QPRML",419,0) E S C0QLIST("NoVTE24",DFN)="" "RTN","C0QPRML",420,0) Q "RTN","C0QPRML",421,0) ; "RTN","C0QPRML",422,0) EDTIME ; CHECK FOR EMERGENCY DEPT TIME FACTORS "RTN","C0QPRML",423,0) N FOUND "RTN","C0QPRML",424,0) S FOUND=0 "RTN","C0QPRML",425,0) I $$HFYN^C0QHF(DFN,"ED ARRIVAL TIME") S FOUND=1 "RTN","C0QPRML",426,0) I '$$HFYN^C0QHF(DFN,"ED DEPARTURE TIME") S FOUND=0 "RTN","C0QPRML",427,0) I '$$HFYN^C0QHF(DFN,"TIME DECISION TO ADMIT MADE") S FOUND=0 "RTN","C0QPRML",428,0) I FOUND D ; "RTN","C0QPRML",429,0) . S C0QLIST("HasEDtime",DFN)="" "RTN","C0QPRML",430,0) E S C0QLIST("NoEDtime",DFN)="" "RTN","C0QPRML",431,0) Q "RTN","C0QPRML",432,0) ; "RTN","C0QPRML",433,0) INLIST(ZLIST,DFN) ; EXTRINSIC FOR IS PATIENT ALREADY IN LIST ZLIST "RTN","C0QPRML",434,0) N ZL,ZR "RTN","C0QPRML",435,0) S ZL=$O(^C0Q(301,"CATTR",ZLIST,"")) ; IEN OF LIST IN C0Q PATIENT LIST FILE "RTN","C0QPRML",436,0) I ZL="" Q 0 ; LIST DOES NOT EXIST "RTN","C0QPRML",437,0) S ZR=0 ; ASSUME NOT IN LIST "RTN","C0QPRML",438,0) I $D(^C0Q(301,ZL,1,"B",DFN)) S ZR=1 ; PATIENT IS IN LIST "RTN","C0QPRML",439,0) Q ZR "RTN","C0QPRML",440,0) ; "RTN","C0QPRML",441,0) PRINT ; PRINT TO SCREEN "RTN","C0QPRML",442,0) "RTN","C0QPRML",443,0) I $D(WARD) W !!,WARD_"-"_WARDNAME_" "_RB_": "_PTNAME_"("_PTSEX_") " "RTN","C0QPRML",444,0) I $D(EXDTE) D ; "RTN","C0QPRML",445,0) . W !,"Discharge Date: ",EXDTE "RTN","C0QPRML",446,0) . W !,DFN," ",PTNAME "RTN","C0QPRML",447,0) W !,"DOB: ",PTDOB," HRN: ",PTHRN "RTN","C0QPRML",448,0) W !,"Language Spoken: ",$G(PTLANG) "RTN","C0QPRML",449,0) W !,"Race: ",RACEDSC "RTN","C0QPRML",450,0) W !,"Ethnicity: ",$G(ETHNDSC) "RTN","C0QPRML",451,0) W !,"Problems: " "RTN","C0QPRML",452,0) W !,PBDESC "RTN","C0QPRML",453,0) W !,"Allergies: " "RTN","C0QPRML",454,0) W !,ALDESC "RTN","C0QPRML",455,0) W !,"Medications: " "RTN","C0QPRML",456,0) W ! "RTN","C0QPRML",457,0) Q "RTN","C0QPRML",458,0) ; "RTN","C0QPRML",459,0) SS ; CREATE SPREADSHEET ARRAY "RTN","C0QPRML",460,0) S G1("Patient")=DFN "RTN","C0QPRML",461,0) I $D(WARD) D ; "RTN","C0QPRML",462,0) . S G1("WardName")=WARDNAME "RTN","C0QPRML",463,0) . S G1("RoomAndBed")=RB "RTN","C0QPRML",464,0) I $D(EXDTE) D ; "RTN","C0QPRML",465,0) . S G1("DischargeDate")=EXDTE "RTN","C0QPRML",466,0) S G1("PatientName")=PTNAME "RTN","C0QPRML",467,0) S G1("Gender")=PTSEX "RTN","C0QPRML",468,0) S G1("DateOfBirth")=PTDOB "RTN","C0QPRML",469,0) S G1("HealthRecordNumber")=PTHRN "RTN","C0QPRML",470,0) S G1("LanguageSpoken")=$G(PTLANG) "RTN","C0QPRML",471,0) S G1("Race")=RACEDSC "RTN","C0QPRML",472,0) S G1("Ehtnicity")=$G(ETHNDSC) "RTN","C0QPRML",473,0) S G1("Problem")=PBDESC "RTN","C0QPRML",474,0) I PBDESC["No problems found" S G1("HasProblem")=0 "RTN","C0QPRML",475,0) E S G1("HasProblem")=1 "RTN","C0QPRML",476,0) S G1("Allergies")=ALDESC "RTN","C0QPRML",477,0) I ALDESC["No Allergy" S G1("HasAllergy")=0 "RTN","C0QPRML",478,0) E S G1("HasAllergy")=1 "RTN","C0QPRML",479,0) I $D(MDITEM) D ; "RTN","C0QPRML",480,0) . S G1("HasMed")=1 "RTN","C0QPRML",481,0) E S G1("HasMed")=0 "RTN","C0QPRML",482,0) S G1("MedDescription")=$G(MDDESC) "RTN","C0QPRML",483,0) I $D(MDITEM) W !,"("_MDITEM_")"_MDDESC E W !,MDDESC "RTN","C0QPRML",484,0) D RNF1TO2B^C0CRNF("GRSLT","G1") "RTN","C0QPRML",485,0) K G1 "RTN","C0QPRML",486,0) Q ; DON'T WANT TO DO THE NHIN STUFF NOW "RTN","C0QPRML",487,0) ; "RTN","C0QPRML",488,0) PATLIST ; CREATE PATIENT LISTS "RTN","C0QPRML",489,0) S C0QLIST("Patient",DFN)="" ; THE PATIENT LIST "RTN","C0QPRML",490,0) N DEMOYN S DEMOYN=1 "RTN","C0QPRML",491,0) I $G(PTSEX)="" S DEMOYN=0 "RTN","C0QPRML",492,0) I $G(PTDOB)="" S DEMOYN=0 "RTN","C0QPRML",493,0) I $G(PTHRN)="" S DEMOYN=0 "RTN","C0QPRML",494,0) I $G(PTLANG)="" S DEMOYN=0 "RTN","C0QPRML",495,0) I $G(RACEDSC)="" S DEMOYN=0 "RTN","C0QPRML",496,0) I $G(ETHNDSC)="" S DEMOYN=0 "RTN","C0QPRML",497,0) ;I DEMOYN S C0QLIST("HasDemographics",DFN)="" "RTN","C0QPRML",498,0) ;E S C0QLIST("FailedDemographics",DFN)="" "RTN","C0QPRML",499,0) ;S G1("Gender")=PTSEX "RTN","C0QPRML",500,0) ;S G1("DateOfBirth")=PTDOB "RTN","C0QPRML",501,0) ;S G1("HealthRecordNumber")=PTHRN "RTN","C0QPRML",502,0) ;S G1("LanguageSpoken")=$G(PTLANG) "RTN","C0QPRML",503,0) ;S G1("Race")=RACEDSC "RTN","C0QPRML",504,0) ;S G1("Ehtnicity")=$G(ETHNDSC) "RTN","C0QPRML",505,0) S G1("Problem")=PBDESC "RTN","C0QPRML",506,0) I PBDESC["No problems found" S C0QLIST("NoProblem",DFN)="" "RTN","C0QPRML",507,0) E S C0QLIST("HasProblem",DFN)="" "RTN","C0QPRML",508,0) ;S G1("Allergies")=ALDESC "RTN","C0QPRML",509,0) I ALDESC["No Allergy" S C0QLIST("NoAllergy",DFN)="" "RTN","C0QPRML",510,0) E S C0QLIST("HasAllergy",DFN)="" "RTN","C0QPRML",511,0) ;I $D(MDITEM) D ; "RTN","C0QPRML",512,0) ;. S C0QLIST("HasMed",DFN)="" "RTN","C0QPRML",513,0) ;E S G1("NoMed",DFN)="" "RTN","C0QPRML",514,0) ;S G1("MedDescription")=$G(MDDESC) "RTN","C0QPRML",515,0) Q "RTN","C0QPRML",516,0) ; "RTN","C0QPRML",517,0) NHIN ; SHOW THE NHIN ARRAY FOR THIS PATIENT "RTN","C0QPRML",518,0) Q:DFN=137!14 "RTN","C0QPRML",519,0) D EN^C0CNHIN(.G,DFN,"") "RTN","C0QPRML",520,0) ZWR G "RTN","C0QPRML",521,0) K G "RTN","C0QPRML",522,0) ; "RTN","C0QPRML",523,0) QUIT ;end of WARD "RTN","C0QPRML",524,0) ; "RTN","C0QPRML",525,0) ; "RTN","C0QPRML",526,0) DIS; "RTN","C0QPRML",527,0) N DFN,DTE,EXDTE S DTE="" "RTN","C0QPRML",528,0) F D Q:DTE="" "RTN","C0QPRML",529,0) . S DTE=$O(^DGPM("B",DTE)) "RTN","C0QPRML",530,0) . Q:'DTE "RTN","C0QPRML",531,0) . Q:$P(DTE,".")<3110703 "RTN","C0QPRML",532,0) . S EXDTE=$$FMTE^XLFDT(DTE) "RTN","C0QPRML",533,0) . N PTFM S PTFM="" "RTN","C0QPRML",534,0) . D "RTN","C0QPRML",535,0) . . S PTFM=$O(^DGPM("B",DTE,PTFM)) "RTN","C0QPRML",536,0) . . Q:'PTFM "RTN","C0QPRML",537,0) . . S DFN=$P(^DGPM(PTFM,0),U,3) "RTN","C0QPRML",538,0) . . S C0QLIST("Patient",DFN)="" "RTN","C0QPRML",539,0) . . D DEMO "RTN","C0QPRML",540,0) . . D PROBLEM "RTN","C0QPRML",541,0) . . D ALLERGY "RTN","C0QPRML",542,0) . . D MEDS4 "RTN","C0QPRML",543,0) . . D RECON2 "RTN","C0QPRML",544,0) . . D ADVDIR "RTN","C0QPRML",545,0) . . D SMOKING "RTN","C0QPRML",546,0) . . D VITALS "RTN","C0QPRML",547,0) . . D VTE1 "RTN","C0QPRML",548,0) . . D EDTIME "RTN","C0QPRML",549,0) . . I C0QPR D PRINT "RTN","C0QPRML",550,0) . . I C0QSS D SS "RTN","C0QPRML",551,0) . . I C0QPL D PATLIST "RTN","C0QPRML",552,0) Q "RTN","C0QPRML",553,0) ; "RTN","C0QPRML",554,0) C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QPRML",555,0) C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE "RTN","C0QPRML",556,0) FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST "RTN","C0QPRML",557,0) ; "RTN","C0QPRML",558,0) I '$D(C0QLIST) Q ; "RTN","C0QPRML",559,0) N LFN S LFN=$$C0QALFN() "RTN","C0QPRML",560,0) N ZI,ZN "RTN","C0QPRML",561,0) S ZI="" "RTN","C0QPRML",562,0) F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ; "RTN","C0QPRML",563,0) . S ZN=$O(^C0Q(301,"CATTR",ZI,"")) "RTN","C0QPRML",564,0) . I ZN="" D Q ; OOPS "RTN","C0QPRML",565,0) . . W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI "RTN","C0QPRML",566,0) . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN "RTN","C0QPRML",567,0) . N C0QNEW,C0QOLD,C0QRSLT "RTN","C0QPRML",568,0) . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST "RTN","C0QPRML",569,0) . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST "RTN","C0QPRML",570,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW "RTN","C0QPRML",571,0) . N ZJ,ZK "RTN","C0QPRML",572,0) . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST "RTN","C0QPRML",573,0) . K C0QFDA "RTN","C0QPRML",574,0) . S ZJ="" "RTN","C0QPRML",575,0) . F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY "RTN","C0QPRML",576,0) . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE "RTN","C0QPRML",577,0) . . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN "RTN","C0QPRML",578,0) . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE" "RTN","C0QPRML",579,0) . . . B "RTN","C0QPRML",580,0) . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@" "RTN","C0QPRML",581,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS "RTN","C0QPRML",582,0) . ; SECOND, PROCESS THE ADDITIONS "RTN","C0QPRML",583,0) . K C0QFDA "RTN","C0QPRML",584,0) . S ZJ="" S ZK=1 "RTN","C0QPRML",585,0) . F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0 "RTN","C0QPRML",586,0) . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ "RTN","C0QPRML",587,0) . . S ZK=ZK+1 "RTN","C0QPRML",588,0) . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS "RTN","C0QPRML",589,0) ;. Q "RTN","C0QPRML",590,0) ;. K C0QFDA "RTN","C0QPRML",591,0) ;. N ZJ,ZC "RTN","C0QPRML",592,0) ;. S ZJ="" S ZC=1 "RTN","C0QPRML",593,0) ;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST "RTN","C0QPRML",594,0) ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ "RTN","C0QPRML",595,0) ;. . S ZC=ZC+1 "RTN","C0QPRML",596,0) ;. D UPDIE "RTN","C0QPRML",597,0) ;. W !,"FOUND:"_ZI "RTN","C0QPRML",598,0) Q "RTN","C0QPRML",599,0) ; "RTN","C0QPRML",600,0) KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE "RTN","C0QPRML",601,0) ; "RTN","C0QPRML",602,0) N C0QFDA,ZFN,LIST,ATTR "RTN","C0QPRML",603,0) S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE "RTN","C0QPRML",604,0) D CLEAN^DILF "RTN","C0QPRML",605,0) S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME "RTN","C0QPRML",606,0) S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE "RTN","C0QPRML",607,0) D CLEAN^DILF "RTN","C0QPRML",608,0) K ZERR "RTN","C0QPRML",609,0) S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE "RTN","C0QPRML",610,0) D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE "RTN","C0QPRML",611,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QPRML",612,0) ;. W "ERROR",! "RTN","C0QPRML",613,0) ;. ZWR ZERR "RTN","C0QPRML",614,0) ;. B "RTN","C0QPRML",615,0) K C0QFDA "RTN","C0QPRML",616,0) S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD "RTN","C0QPRML",617,0) S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE "RTN","C0QPRML",618,0) D UPDIE ; CREATE THE SUBFILE "RTN","C0QPRML",619,0) N ZR ; NEW IEN FOR THE RECORD "RTN","C0QPRML",620,0) S ZR=$O(^C0Q(301,"CATTR",ATTR,"")) "RTN","C0QPRML",621,0) ; "RTN","C0QPRML",622,0) Q ZR "RTN","C0QPRML",623,0) ; "RTN","C0QPRML",624,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QPRML",625,0) K ZERR "RTN","C0QPRML",626,0) D CLEAN^DILF "RTN","C0QPRML",627,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QPRML",628,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QPRML",629,0) ;. W "ERROR",! "RTN","C0QPRML",630,0) ;. ZWR ZERR "RTN","C0QPRML",631,0) ;. B "RTN","C0QPRML",632,0) K C0QFDA "RTN","C0QPRML",633,0) Q "RTN","C0QPRML",634,0) ; "RTN","C0QPRML",635,0) ; WHAT FOLLOWS IS OLD CODE - DELETE WHEN THIS WORKS "RTN","C0QPRML",636,0) ;. . N PTNAME S PTNAME=$P(^DPT(DFN,0),U,1) "RTN","C0QPRML",637,0) ;. . S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth "RTN","C0QPRML",638,0) ;. . S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex "RTN","C0QPRML",639,0) ;. . D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility "RTN","C0QPRML",640,0) ;. . S PTHRN=$P($G(VA("PID")),U) ;health record number "RTN","C0QPRML",641,0) ;. . S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file "RTN","C0QPRML",642,0) ;. . I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl "RTN","C0QPRML",643,0) ;. . S RACE="" "RTN","C0QPRML",644,0) ;. . F D Q:RACE="" "RTN","C0QPRML",645,0) ;. . . S RACE=$O(^DPT(DFN,.02,"B",RACE)) "RTN","C0QPRML",646,0) ;. . . Q:'RACE "RTN","C0QPRML",647,0) ;. . . S RACEDSC=$P($G(^DIC(10,RACE,0)),U) "RTN","C0QPRML",648,0) ;. . N ETHNDSC "RTN","C0QPRML",649,0) ;. . N ETHNDSC S ETHNDSC="" "RTN","C0QPRML",650,0) ;. . S ETHN="" "RTN","C0QPRML",651,0) ;. . F D Q:ETHN="" "RTN","C0QPRML",652,0) ;. . . S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) "RTN","C0QPRML",653,0) ;. . . Q:'ETHN "RTN","C0QPRML",654,0) ;. . . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) "RTN","C0QPRML",655,0) ;. . D LIST^ORQQPL(.PROBL,DFN,"A") "RTN","C0QPRML",656,0) ;. . S PBCNT="" "RTN","C0QPRML",657,0) ;. . F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D "RTN","C0QPRML",658,0) ;. . . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description "RTN","C0QPRML",659,0) ;. . K PROBL "RTN","C0QPRML",660,0) ;. . D LIST^ORQQAL(.ALRGYL,DFN) "RTN","C0QPRML",661,0) ;. . S ALCNT="" "RTN","C0QPRML",662,0) ;. . F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D "RTN","C0QPRML",663,0) ;. . . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description "RTN","C0QPRML",664,0) ;. . K ALRGYL "RTN","C0QPRML",665,0) ;. . D COVER^ORWPS(.MEDSL,DFN) "RTN","C0QPRML",666,0) ;. . S MDCNT="" "RTN","C0QPRML",667,0) ;. . F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D "RTN","C0QPRML",668,0) ;. . . Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only "RTN","C0QPRML",669,0) ;. . . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description "RTN","C0QPRML",670,0) ;. . . S MDITEM=$P($G(MEDSL(MDCNT)),U,3) "RTN","C0QPRML",671,0) ;. . K MEDSL "RTN","C0QPRML",672,0) ;. . W !,"Discharge Date: ",EXDTE "RTN","C0QPRML",673,0) ;. . W !,DFN," ",PTNAME "RTN","C0QPRML",674,0) ;. . W !,"DOB: ",PTDOB," HRN: ",PTHRN "RTN","C0QPRML",675,0) ;. . W !,"Language Spoken: ",$G(PTLANG) "RTN","C0QPRML",676,0) ;. . W !,"Race: ",RACEDSC "RTN","C0QPRML",677,0) ;. . W !,"Ethnicity: ",ETHNDSC "RTN","C0QPRML",678,0) ;. . W !,"Problems: " "RTN","C0QPRML",679,0) ;. . W !,PBDESC "RTN","C0QPRML",680,0) ;. . W !,"Allergies: " "RTN","C0QPRML",681,0) ;. . W !,ALDESC "RTN","C0QPRML",682,0) ;. . W !,"Medications: " "RTN","C0QPRML",683,0) ;. . I $D(MDITEM) W !,"(",MDITEM,")",MDDESC E W !,MDDESC "RTN","C0QPRML",684,0) ;. . W ! "RTN","C0QPRML",685,0) ;Q "RTN","C0QPRML",686,0) ; "RTN","C0QPRML",687,0) ; "RTN","C0QPRML",688,0) ; "RTN","C0QPRML",689,0) ; "RTN","C0QPRML",690,0) END ;end of C0QPRML; "RTN","C0QSET") 0^9^B8586809 "RTN","C0QSET",1,0) C0QSET ;GPL - SET OPERATIONS ON LISTS ;818/11 8:50pm "RTN","C0QSET",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QSET",3,0) ; "RTN","C0QSET",4,0) ;2011 George Lilly glilly@glilly.net - Licensed under the terms of the GNU "RTN","C0QSET",5,0) ;General Public License See attached copy of the License. "RTN","C0QSET",6,0) ; "RTN","C0QSET",7,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QSET",8,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QSET",9,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QSET",10,0) ;(at your option) any later version. "RTN","C0QSET",11,0) ; "RTN","C0QSET",12,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QSET",13,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QSET",14,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QSET",15,0) ;GNU General Public License for more details. "RTN","C0QSET",16,0) ; "RTN","C0QSET",17,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QSET",18,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QSET",19,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QSET",20,0) ; "RTN","C0QSET",21,0) Q "RTN","C0QSET",22,0) ; "RTN","C0QSET",23,0) TEST ; TEST OF UNITY ROUTINE "RTN","C0QSET",24,0) ; "RTN","C0QSET",25,0) S A(1)="" "RTN","C0QSET",26,0) S A(2)="" "RTN","C0QSET",27,0) S A(3)="" "RTN","C0QSET",28,0) S B(3)="" "RTN","C0QSET",29,0) S B(4)="" "RTN","C0QSET",30,0) D UNITY("C","A","B") "RTN","C0QSET",31,0) ZWR C "RTN","C0QSET",32,0) Q "RTN","C0QSET",33,0) ; "RTN","C0QSET",34,0) TEST2 ; WHICH PATIENTS HAVE MEDICATIONS? WHICH DON'T? "RTN","C0QSET",35,0) ; WHAT BAD PATIENT POINTERS ARE IN THE MEDICATIONS FILE? "RTN","C0QSET",36,0) S PATS=$NA(^DPT) "RTN","C0QSET",37,0) S MEDS=$NA(^PS(55)) "RTN","C0QSET",38,0) D UNITY("DELTA",PATS,MEDS) "RTN","C0QSET",39,0) W !,"PATIENTS WITH NO MEDS",! "RTN","C0QSET",40,0) ZWR DELTA(0,*) "RTN","C0QSET",41,0) W !,"BAD POINTERS IN THE MEDS FILE",! "RTN","C0QSET",42,0) ZWR DELTA(2,*) "RTN","C0QSET",43,0) Q "RTN","C0QSET",44,0) ; "RTN","C0QSET",45,0) UNITY(ZRTN,ZNEW,ZOLD) ; RETURNS THE DELTA BETWEEN THE NEW AND OLD LISTS "RTN","C0QSET",46,0) ; ONLY NUMERIC LISTS SUPPORTED. FOR LIST WITH STRINGS SEE UNITYS "RTN","C0QSET",47,0) ; ZRTN,ZNEW AND ZOLD ARE ALL PASSED BY NAME "RTN","C0QSET",48,0) ; FORMAT OF RETURN ARRAY: "RTN","C0QSET",49,0) ; @ZRTN@(0,X)="" ; X IS MISSING FROM OLD "RTN","C0QSET",50,0) ; @ZRTN@(1,Y)="" ; Y IS IN BOTH NEW AND OLD - NOT MISSING "RTN","C0QSET",51,0) ; @ZRTN@(2,Z)="" ; Z IS EXTRA IN OLD - WOULD BEED TO BE DELETED FOR UNITY "RTN","C0QSET",52,0) N C0QD ; TEMP WORK ARRAY "RTN","C0QSET",53,0) N ZN S ZN=0 ; COUNT "RTN","C0QSET",54,0) N ZI S ZI=0 "RTN","C0QSET",55,0) F S ZI=$O(@ZNEW@(ZI)) Q:+ZI=0 D ; FOR EACH ITEM IN NEW "RTN","C0QSET",56,0) . S C0QD(ZI)=0 ; SET THEM ALL AS 0 MEANING NEW "RTN","C0QSET",57,0) . S ZN=ZN+1 "RTN","C0QSET",58,0) S @ZRTN@("COUNT")=ZN ; NEW FILE COUNT "RTN","C0QSET",59,0) S ZI=0 "RTN","C0QSET",60,0) F S ZI=$O(@ZOLD@(ZI)) Q:+ZI=0 D ; FOR EACH ITEM IN OLD "RTN","C0QSET",61,0) . I $D(C0QD(ZI)) S C0QD(ZI)=1 ; NOT NEW - PRESENT IN NEW AND OLD "RTN","C0QSET",62,0) . E S C0QD(ZI)=2 ; EXTRA IN OLD - WOULD NEED TO BE DELETED "RTN","C0QSET",63,0) S ZI=0 "RTN","C0QSET",64,0) F S ZI=$O(C0QD(ZI)) Q:+ZI=0 D ; FOR EACH ITEM "RTN","C0QSET",65,0) . S @ZRTN@(C0QD(ZI),ZI)="" ; SET RESULTS IN RETURN ARRAY "RTN","C0QSET",66,0) Q "RTN","C0QSET",67,0) ; "RTN","C0QSET",68,0) UNITYS(ZRTN,ZNEW,ZOLD) ; RETURNS THE DELTA BETWEEN THE NEW AND OLD LISTS "RTN","C0QSET",69,0) ; THIS VERSION HAS SUPPORT FOR NUMBERS AND STRINGS IN A LIST "RTN","C0QSET",70,0) ; ZRTN,ZNEW AND ZOLD ARE ALL PASSED BY NAME "RTN","C0QSET",71,0) ; FORMAT OF RETURN ARRAY: "RTN","C0QSET",72,0) ; @ZRTN@(0,X)="" ; X IS MISSING FROM OLD "RTN","C0QSET",73,0) ; @ZRTN@(1,Y)="" ; Y IS IN BOTH NEW AND OLD - NOT MISSING "RTN","C0QSET",74,0) ; @ZRTN@(2,Z)="" ; Z IS EXTRA IN OLD - WOULD BEED TO BE DELETED FOR UNITY "RTN","C0QSET",75,0) N C0QD ; TEMP WORK ARRAY "RTN","C0QSET",76,0) N ZI S ZI="" "RTN","C0QSET",77,0) F S ZI=$O(@ZNEW@(ZI)) Q:ZI="" D ; FOR EACH ITEM IN NEW "RTN","C0QSET",78,0) . S C0QD(ZI)=0 ; SET THEM ALL AS 0 MEANING NEW "RTN","C0QSET",79,0) S ZI="" "RTN","C0QSET",80,0) F S ZI=$O(@ZOLD@(ZI)) Q:ZI="" D ; FOR EACH ITEM IN OLD "RTN","C0QSET",81,0) . I $D(C0QD(ZI)) S C0QD(ZI)=1 ; NOT NEW - PRESENT IN NEW AND OLD "RTN","C0QSET",82,0) . E S C0QD(ZI)=2 ; EXTRA IN OLD - WOULD NEED TO BE DELETED "RTN","C0QSET",83,0) S ZI="" "RTN","C0QSET",84,0) F S ZI=$O(C0QD(ZI)) Q:ZI="" D ; FOR EACH ITEM "RTN","C0QSET",85,0) . S @ZRTN@(C0QD(ZI),ZI)="" ; SET RESULTS IN RETURN ARRAY "RTN","C0QSET",86,0) Q "RTN","C0QSET",87,0) ; "RTN","C0QSET",88,0) AND(ZRTN,ZNEW,ZOLD) ; RETURNS A LIST OF WHAT IS COMMON TO BOTH NEW AND OLD "RTN","C0QSET",89,0) N ZD "RTN","C0QSET",90,0) D UNITY("ZD",ZNEW,ZOLD) "RTN","C0QSET",91,0) M @ZRTN=ZD(1) "RTN","C0QSET",92,0) Q "RTN","C0QSET",93,0) ; "RTN","C0QSET",94,0) NAND(ZRTN,ZNEW,ZOLD) ; RETURNS WHAT IS IN A OR B BUT NOT BOTH "RTN","C0QSET",95,0) N ZD "RTN","C0QSET",96,0) D UNITY("ZD",ZNEW,ZOLD) "RTN","C0QSET",97,0) M @ZRTN=ZD(0) "RTN","C0QSET",98,0) M @ZRTN=ZD(2) "RTN","C0QSET",99,0) Q "RTN","C0QSET",100,0) ; "RTN","C0QSET",101,0) AMINUSB(ZRTN,ZA,ZB) ; WHAT'S LEFT IN A AFTER REMOVING B FROM IT "RTN","C0QSET",102,0) N ZD "RTN","C0QSET",103,0) D UNITY("ZD",ZA,ZB) "RTN","C0QSET",104,0) M @ZRTN=ZD(0) "RTN","C0QSET",105,0) Q "RTN","C0QSET",106,0) ; "RTN","C0QSET",107,0) OR(ZRTN,ZA,ZB) ; WHAT'S IN A OR B OR BOTH "RTN","C0QSET",108,0) N ZD "RTN","C0QSET",109,0) D UNITY("ZD",ZA,ZB) "RTN","C0QSET",110,0) M @ZRTN=ZD(0) "RTN","C0QSET",111,0) M @ZRTN=ZD(1) "RTN","C0QSET",112,0) M @ZRTN=ZD(2) "RTN","C0QSET",113,0) Q "RTN","C0QSET",114,0) ; "RTN","C0QSET",115,0) END ;end of C0QSET; "RTN","C0QUPDT") 0^10^B50831833 "RTN","C0QUPDT",1,0) C0QUPDT ; GPL - Quality Reporting List Update Routines ;8/29/11 17:05 "RTN","C0QUPDT",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "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) . N C0QNL,C0QDL,C0QFLTN,C0QFLTD "RTN","C0QUPDT",49,0) . S C0QFLTN=$P(C0QM(ZII),U,3) ;IEN OF NUMERATOR FILTER LIST "RTN","C0QUPDT",50,0) . S C0QFLTD=$P(C0QM(ZII),U,4) ; IEN OF DENOMINATOR FILTER LIST "RTN","C0QUPDT",51,0) . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE "RTN","C0QUPDT",52,0) . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER "RTN","C0QUPDT",53,0) . I C0QNL="" D ; CHECK ALTERNATE LIST "RTN","C0QUPDT",54,0) . . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER "RTN","C0QUPDT",55,0) . . I C0QNL'="" S C0QNALT=1 "RTN","C0QUPDT",56,0) . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER "RTN","C0QUPDT",57,0) . I C0QDL="" D ; CHECK ALTERNATE LIST "RTN","C0QUPDT",58,0) . . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER "RTN","C0QUPDT",59,0) . . I C0QDL'="" S C0QDALT=1 "RTN","C0QUPDT",60,0) . ; "RTN","C0QUPDT",61,0) . ; FIRST PROCESS THE NUMERATOR "RTN","C0QUPDT",62,0) . ; "RTN","C0QUPDT",63,0) . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX "RTN","C0QUPDT",64,0) . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR "RTN","C0QUPDT",65,0) . . S C0QNEW=$NA(^C0Q(301,C0QNL,1,"B")) ; B INDEX FOR THIS LIST "RTN","C0QUPDT",66,0) . E D ; USE THE REMINDER PACKAGE PATIENT LISTS "RTN","C0QUPDT",67,0) . . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS "RTN","C0QUPDT",68,0) . I C0QFLTN'="" D ; USE A NUMERATOR FILTER LIST "RTN","C0QUPDT",69,0) . . N ZNEW "RTN","C0QUPDT",70,0) . . S ZNEW=$NA(^C0Q(301,C0QFLTN,1,"B")) ; B INDEX OF FILTER LIST "RTN","C0QUPDT",71,0) . . K C0QFLTRD "RTN","C0QUPDT",72,0) . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) "RTN","C0QUPDT",73,0) . . S C0QNEW="C0QFLTRD" "RTN","C0QUPDT",74,0) . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST "RTN","C0QUPDT",75,0) . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET "RTN","C0QUPDT",76,0) . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES "RTN","C0QUPDT",77,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES "RTN","C0QUPDT",78,0) . N C0QCNT "RTN","C0QUPDT",79,0) . S C0QNCNT=$G(C0QRSLT("COUNT")) "RTN","C0QUPDT",80,0) . I C0QNCNT="" D ; "RTN","C0QUPDT",81,0) . . S C0QNCNT=0 ; DEFAULT COUNT IS ZERO "RTN","C0QUPDT",82,0) . . N GZZ S GZZ="" "RTN","C0QUPDT",83,0) . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY "RTN","C0QUPDT",84,0) . . . S C0QNCNT=C0QNCNT+1 "RTN","C0QUPDT",85,0) . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY "RTN","C0QUPDT",86,0) . . . S C0QNCNT=C0QNCNT+1 "RTN","C0QUPDT",87,0) . K C0QFDA ; CLEAR THE FDA "RTN","C0QUPDT",88,0) . N C0QONCNT ; OLD COUNT "RTN","C0QUPDT",89,0) . S C0QONCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",1.1) "RTN","C0QUPDT",90,0) . I C0QNCNT'=C0QONCNT D ; COUNT HAS CHANGED "RTN","C0QUPDT",91,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",1.1)=C0QNCNT ; NUMERATOR COUNT "RTN","C0QUPDT",92,0) . . D UPDIE ; UPDATE THE NUMERATOR COUNT "RTN","C0QUPDT",93,0) . I $D(C0QRSLT) D ;B ; "RTN","C0QUPDT",94,0) . . ;ZWR C0QRSLT "RTN","C0QUPDT",95,0) . ; FIRST PROCESS DELETIONS "RTN","C0QUPDT",96,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",97,0) . N ZG,ZIEN S ZG="" "RTN","C0QUPDT",98,0) . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION "RTN","C0QUPDT",99,0) . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY "RTN","C0QUPDT",100,0) . . I ZIEN="" D Q ; OOPS "RTN","C0QUPDT",101,0) . . . W !,"ERROR DELETING ENTRY!! ",ZG "RTN","C0QUPDT",102,0) . . S C0QFDA($$C0QMMNFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE "RTN","C0QUPDT",103,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",104,0) . ; SECOND, PROCESS ADDITIONS "RTN","C0QUPDT",105,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",106,0) . N ZG,ZC S ZG="" S ZC=1 "RTN","C0QUPDT",107,0) . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION "RTN","C0QUPDT",108,0) . . S C0QFDA($$C0QMMNFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY "RTN","C0QUPDT",109,0) . . S ZC=ZC+1 "RTN","C0QUPDT",110,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",111,0) . ; "RTN","C0QUPDT",112,0) . ; PROCESS THE DENOMINATOR "RTN","C0QUPDT",113,0) . ; "RTN","C0QUPDT",114,0) . N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX "RTN","C0QUPDT",115,0) . I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR "RTN","C0QUPDT",116,0) . . S C0QNEW=$NA(^C0Q(301,C0QDL,1,"B")) ; B INDEX FOR THIS LIST "RTN","C0QUPDT",117,0) . E D ; USE THE REMINDER PACKAGE PATIENT LISTS "RTN","C0QUPDT",118,0) . . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS "RTN","C0QUPDT",119,0) . I C0QFLTD'="" D ; USE A DENOMINATOR FILTER LIST "RTN","C0QUPDT",120,0) . . N ZNEW "RTN","C0QUPDT",121,0) . . S ZNEW=$NA(^C0Q(301,C0QFLTD,1,"B")) ; B INDEX OF FILTER LIST "RTN","C0QUPDT",122,0) . . K C0QFLTRD "RTN","C0QUPDT",123,0) . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) "RTN","C0QUPDT",124,0) . . S C0QNEW="C0QFLTRD" "RTN","C0QUPDT",125,0) . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST "RTN","C0QUPDT",126,0) . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET "RTN","C0QUPDT",127,0) . N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES "RTN","C0QUPDT",128,0) . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES "RTN","C0QUPDT",129,0) . N C0QDCNT "RTN","C0QUPDT",130,0) . S C0QDCNT=$G(C0QRSLT("COUNT")) "RTN","C0QUPDT",131,0) . I C0QDCNT="" D ; "RTN","C0QUPDT",132,0) . . S C0QDCNT=0 ; DEFAULT COUNT IS ZERO "RTN","C0QUPDT",133,0) . . N GZZ S GZZ="" "RTN","C0QUPDT",134,0) . . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY "RTN","C0QUPDT",135,0) . . . S C0QDCNT=C0QDCNT+1 "RTN","C0QUPDT",136,0) . . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY "RTN","C0QUPDT",137,0) . . . S C0QDCNT=C0QDCNT+1 "RTN","C0QUPDT",138,0) . K C0QFDA ; CLEAR THE FDA "RTN","C0QUPDT",139,0) . N C0QODCNT ; OLD COUNT "RTN","C0QUPDT",140,0) . S C0QODCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",2.1) "RTN","C0QUPDT",141,0) . I C0QDCNT'=C0QODCNT D ; COUNT HAS CHANGED "RTN","C0QUPDT",142,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",2.1)=C0QDCNT ; DENOMINATOR COUNT "RTN","C0QUPDT",143,0) . . D UPDIE ; UPDATE THE DENOMINATOR COUNT "RTN","C0QUPDT",144,0) . I $D(C0QRSLT) D ;B ; "RTN","C0QUPDT",145,0) . . ;ZWR C0QRSLT "RTN","C0QUPDT",146,0) . I '$D(C0QRSLT) Q ; NO RESULTS TO USE "RTN","C0QUPDT",147,0) . ; FIRST PROCESS DELETIONS "RTN","C0QUPDT",148,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",149,0) . N ZG,ZIEN S ZG="" "RTN","C0QUPDT",150,0) . F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION "RTN","C0QUPDT",151,0) . . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY "RTN","C0QUPDT",152,0) . . I ZIEN="" D Q ; OOPS "RTN","C0QUPDT",153,0) . . . W !,"ERROR DELETING ENTRY!! ",ZG "RTN","C0QUPDT",154,0) . . S C0QFDA($$C0QMMDFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE "RTN","C0QUPDT",155,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",156,0) . ; SECOND, PROCESS ADDITIONS "RTN","C0QUPDT",157,0) . K C0QFDA ; CLEAR OUT THE FDA "RTN","C0QUPDT",158,0) . N ZG,ZC S ZG="" S ZC=1 "RTN","C0QUPDT",159,0) . F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION "RTN","C0QUPDT",160,0) . . S C0QFDA($$C0QMMDFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY "RTN","C0QUPDT",161,0) . . S ZC=ZC+1 "RTN","C0QUPDT",162,0) . I $D(C0QFDA) D UPDIE ; PROCESS "RTN","C0QUPDT",163,0) . N C0QPCT ; PERCENT "RTN","C0QUPDT",164,0) . D ; "RTN","C0QUPDT",165,0) . . I C0QDCNT>0 D ; "RTN","C0QUPDT",166,0) . . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0) "RTN","C0QUPDT",167,0) . . E S C0QPCT=0 "RTN","C0QUPDT",168,0) . . K C0QFDA "RTN","C0QUPDT",169,0) . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT "RTN","C0QUPDT",170,0) . . D UPDIE "RTN","C0QUPDT",171,0) Q "RTN","C0QUPDT",172,0) ; "RTN","C0QUPDT",173,0) DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO "RTN","C0QUPDT",174,0) ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE "RTN","C0QUPDT",175,0) ; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE "RTN","C0QUPDT",176,0) N ZI,IV,EV,ZDI,ZIEN,FLTN,FLTD "RTN","C0QUPDT",177,0) S ZI="" "RTN","C0QUPDT",178,0) S ZDI=$NA(^TMP("DILIST",$J)) "RTN","C0QUPDT",179,0) K @RTN "RTN","C0QUPDT",180,0) F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ; "RTN","C0QUPDT",181,0) . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE "RTN","C0QUPDT",182,0) . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE "RTN","C0QUPDT",183,0) . S FLTN=$G(@ZDI@("ID",ZI,1.2)) ; NUMERATOR FILTER LIST "RTN","C0QUPDT",184,0) . S FLTD=$G(@ZDI@("ID",ZI,2.2)) ; DENOMINATOR FILTER LIST "RTN","C0QUPDT",185,0) . S ZIEN=@ZDI@(2,ZI) ; IEN "RTN","C0QUPDT",186,0) . S @RTN@(ZIEN)=IV_"^"_EV_"^"_FLTN_"^"_FLTD "RTN","C0QUPDT",187,0) . ;S @RTN@("B",IV,ZIEN)=EV "RTN","C0QUPDT",188,0) Q "RTN","C0QUPDT",189,0) ; "RTN","C0QUPDT",190,0) UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS "RTN","C0QUPDT",191,0) K ZERR "RTN","C0QUPDT",192,0) D CLEAN^DILF "RTN","C0QUPDT",193,0) ZWR C0QFDA "RTN","C0QUPDT",194,0) D UPDATE^DIE("","C0QFDA","","ZERR") "RTN","C0QUPDT",195,0) I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED "RTN","C0QUPDT",196,0) ;. W "ERROR",! "RTN","C0QUPDT",197,0) ;. ZWR ZERR "RTN","C0QUPDT",198,0) ;. B "RTN","C0QUPDT",199,0) K C0QFDA "RTN","C0QUPDT",200,0) Q "RTN","C0QUPDT",201,0) ; "RTN","C0QUTIL") 0^13^B4564493 "RTN","C0QUTIL",1,0) C0QUTIL ;JJOH/ZAG/GPL - Utilities for C0Q Package ;9/2/11 4:30pm "RTN","C0QUTIL",2,0) ;;1.0;C0Q;;May 21, 2012;Build 31 "RTN","C0QUTIL",3,0) ; "RTN","C0QUTIL",4,0) ;2011 Licensed under the terms of the GNU General Public License "RTN","C0QUTIL",5,0) ;See attached copy of the License. "RTN","C0QUTIL",6,0) ; "RTN","C0QUTIL",7,0) ;This program is free software; you can redistribute it and/or modify "RTN","C0QUTIL",8,0) ;it under the terms of the GNU General Public License as published by "RTN","C0QUTIL",9,0) ;the Free Software Foundation; either version 2 of the License, or "RTN","C0QUTIL",10,0) ;(at your option) any later version. "RTN","C0QUTIL",11,0) ; "RTN","C0QUTIL",12,0) ;This program is distributed in the hope that it will be useful, "RTN","C0QUTIL",13,0) ;but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","C0QUTIL",14,0) ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","C0QUTIL",15,0) ;GNU General Public License for more details. "RTN","C0QUTIL",16,0) ; "RTN","C0QUTIL",17,0) ;You should have received a copy of the GNU General Public License along "RTN","C0QUTIL",18,0) ;with this program; if not, write to the Free Software Foundation, Inc., "RTN","C0QUTIL",19,0) ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. "RTN","C0QUTIL",20,0) ; "RTN","C0QUTIL",21,0) AGE(DFN) ; return current age in years and months "RTN","C0QUTIL",22,0) ; "RTN","C0QUTIL",23,0) Q:'$G(DFN) ;quit if no there is no patient "RTN","C0QUTIL",24,0) N DOB S DOB=$P(^DPT(+DFN,0),U,3) ;date of birth "RTN","C0QUTIL",25,0) N YRS "RTN","C0QUTIL",26,0) N DOD S DOD=+$G(^DPT(9,.35)) ;check for date of death "RTN","C0QUTIL",27,0) I 'DOD D "RTN","C0QUTIL",28,0) . N CDTE S CDTE=DT ;current date "RTN","C0QUTIL",29,0) . S YRS=$E(CDTE,1,3)-$E(DOB,1,3)-($E(CDTE,4,7)<$E(DOB,4,7)) "RTN","C0QUTIL",30,0) E D "RTN","C0QUTIL",31,0) . S YRS=$E(DOD,1,3)-$E(DOB,1,3)-($E(DOD,4,7)<$E(DOB,4,7)) "RTN","C0QUTIL",32,0) ; "RTN","C0QUTIL",33,0) ;Come back here and fix MONTHS and DAYS "RTN","C0QUTIL",34,0) ;N CM S CM=+$E(DT,4,5) ;current month "RTN","C0QUTIL",35,0) ;N CD S CD=+$E(DT,6,7) ;current day "RTN","C0QUTIL",36,0) ;N BM S BM=+$E(DOB,4,5) ;birth month "RTN","C0QUTIL",37,0) ;N BD S BD=+$E(DOB,6,7) ;birth day "RTN","C0QUTIL",38,0) ; "RTN","C0QUTIL",39,0) ;N DAYS S DAYS="" "RTN","C0QUTIL",40,0) ; "RTN","C0QUTIL",41,0) Q YRS ;_"y" gpl ..just want the number "RTN","C0QUTIL",42,0) ; "RTN","C0QUTIL",43,0) ; "RTN","C0QUTIL",44,0) DTDIFF(ZD1,ZT1,ZD2,ZT2,SHOW) ; extrinsic which returns the number of minutes "RTN","C0QUTIL",45,0) ; between 2 dates. ZD1 and ZD2 are fileman dates "RTN","C0QUTIL",46,0) ; ZT1 AND ZT2 are valid times (military time) ie 20:10 "RTN","C0QUTIL",47,0) ; IF SHOW=1 DEBUGGING INTERMEDIATE VALUES WILL BE DISPLAYED "RTN","C0QUTIL",48,0) I '$D(SHOW) S SHOW=0 "RTN","C0QUTIL",49,0) N GT1,GT2,GDT1,GDT2 "RTN","C0QUTIL",50,0) I ZT1[":" D ; "RTN","C0QUTIL",51,0) . S GT1=($P(ZT1,":",1)*3600)+($P(ZT1,":",2)*60) ; SECONDS "RTN","C0QUTIL",52,0) . S GT2=($P(ZT2,":",1)*3600)+($P(ZT2,":",2)*60) ; SECONDS "RTN","C0QUTIL",53,0) E D ; "RTN","C0QUTIL",54,0) . S GT1=($E(ZT1,1,2)*3600)+($E(ZT1,3,4)*60) "RTN","C0QUTIL",55,0) . S GT2=($E(ZT2,1,2)*3600)+($E(ZT2,3,4)*60) "RTN","C0QUTIL",56,0) ;W:SHOW !,"SECONDS: ",GT1," ",GT2 "RTN","C0QUTIL",57,0) ;S %=GT1 D S^%DTC ; FILEMAN TIME "RTN","C0QUTIL",58,0) ;S GDT1=ZD1_% ; FILEMAN DATE AND TIME "RTN","C0QUTIL",59,0) ;S %=GT2 D S^%DTC ; FILEMAN TIME "RTN","C0QUTIL",60,0) ;S GDT2=ZD2_% ; FILEMAN DATE AND TIME "RTN","C0QUTIL",61,0) S GDT1=ZD1_"."_ZT1 "RTN","C0QUTIL",62,0) S GDT2=ZD2_"."_ZT2 "RTN","C0QUTIL",63,0) W:SHOW !,"FILEMAN: ",GDT1," ",GDT2 "RTN","C0QUTIL",64,0) N ZH1,ZH2 "RTN","C0QUTIL",65,0) S ZH1=$$FMTH^XLFDT(GDT1) ; $H FORMAT "RTN","C0QUTIL",66,0) S ZH2=$$FMTH^XLFDT(GDT2) ; $H FORMAT "RTN","C0QUTIL",67,0) W:SHOW !,"$H: ",ZH1," ",ZH2 "RTN","C0QUTIL",68,0) N ZSECS,ZMIN "RTN","C0QUTIL",69,0) S ZSECS=$$HDIFF^XLFDT(ZH1,ZH2,2) ; DIFFERENCE IN $H "RTN","C0QUTIL",70,0) W:SHOW !,"DIFF: ",ZSECS "RTN","C0QUTIL",71,0) S ZMIN=ZSECS/60 ; DIFFERENCE IN MINUTES "RTN","C0QUTIL",72,0) W:SHOW !,"MIN: ",ZMIN "RTN","C0QUTIL",73,0) Q ZMIN "RTN","C0QUTIL",74,0) ; "RTN","C0QUTIL",75,0) DT(X) ; -- Returns FM date for X "RTN","C0QUTIL",76,0) N Y,%DT S %DT="T",Y="" D:X'="" ^%DT "RTN","C0QUTIL",77,0) Q Y "RTN","C0QUTIL",78,0) ; "RTN","C0QUTIL",79,0) END ;end of C0QUTIL "SEC","^DD",1130580001.101,1130580001.101,3.1,9) "SEC","^DIC",178.301,178.301,0,"AUDIT") @ "SEC","^DIC",178.301,178.301,0,"DD") @ "SEC","^DIC",178.301,178.301,0,"DEL") @ "SEC","^DIC",178.301,178.301,0,"LAYGO") @ "SEC","^DIC",178.301,178.301,0,"RD") @ "SEC","^DIC",178.301,178.301,0,"WR") @ "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") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"AUDIT") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"DD") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"DEL") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"LAYGO") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"RD") @ "SEC","^DIC",1130580001.201,1130580001.201,0,"WR") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"AUDIT") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"DD") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"DEL") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"LAYGO") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"RD") @ "SEC","^DIC",1130580001.301,1130580001.301,0,"WR") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"AUDIT") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"DD") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"DEL") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"LAYGO") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"RD") @ "SEC","^DIC",1130580001.401,1130580001.401,0,"WR") @ "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.01) FailedDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"1,",999) FailedDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.01) NoAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"10,",999) NoAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.01) NoEDtime "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"11,",999) NoEDtime "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.01) NoMed "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"12,",999) NoMed "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.01) NoMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"13,",999) NoMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.01) NoMedRecon "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"14,",999) NoMedRecon "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.01) NoProblem "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"15,",999) NoProblem "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.01) NoSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"16,",999) NoSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.01) NoVTE24 "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"17,",999) NoVTE24 "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.01) NoVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"18,",999) NoVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.01) Over12 "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"19,",999) Over12 "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.01) HasAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"2,",999) HasAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.01) Over65 "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"20,",999) Over65 "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.01) Patient "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"21,",999) Patient "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.01) MU 2011 INP NO MED "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"22,",999) NoMed "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.01) MU 2011 INP FAIL DEMO "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"23,",999) FailedDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.01) MU 2011 INP CPOE MED ORDERS "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"24,",999) HasMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.01) MU 2011 INP NO CPOE MED "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"25,",999) NoMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.01) MU 2011 INP HAS SMOKING ST "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"26,",999) HasSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.01) MU 2011 INP NO SMOKING ST "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"27,",999) NoSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.01) MU 2011 INP OVER 65 DEN "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"28,",999) Over65 "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.01) MU 2011 INP HAS ADV DIR "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"29,",999) HasAdvancedDirective "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.01) HasDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"3,",999) HasDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.01) MU 2011 INP HAS VITAL SIGNS "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"30,",999) HasVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.01) MU 2011 INP NO ADV DIR "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"31,",999) NoAdvancedDirective "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.01) MU 2011 INP NO VITAL SIGNS "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"32,",999) NoVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.01) MU 2011 INP HAS MED RECON "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"33,",999) HasMedRecon "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.01) MU 2011 INP NO MED RECON "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"34,",999) NoMedRecon "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.01) MU 2011 INP XFER OF CARE DEN "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"35,",999) XferOfCare "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.01) MU 2011 INP HAS ALLERGY "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"36,",999) HasAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.01) MU 2011 INP HAS DEMO "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"37,",999) HasDemographics "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.01) MU 2011 INP HAS MED "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"38,",999) HasMed "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.01) MU 2011 INP HAS PROBLEM "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"39,",999) HasProblem "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.01) HasMed "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"4,",999) HasMed "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.01) MU 2011 INP NO ALLERGY "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"40,",999) NoAllergy "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.01) MU 2011 INP NO PROBLEM "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"41,",999) NoProblem "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.01) MU 2011 INPATIENT PATIENT DEN "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"42,",999) Patient "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.01) HasMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"5,",999) HasMedOrders "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.01) HasProblem "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"6,",999) HasProblem "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.01) HasSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"7,",999) HasSmokingStatus "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.01) HasVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"8,",999) HasVitalSigns "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.01) NoAdvanceDirective "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.02) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.03) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.04) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.07) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",.3) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",200) "TEMP","C0Q",1130580001.301,1130580001.301,"9,",999) NoAdvanceDirective "VER") 8.0^22.0 "^DD",178.301,178.301,0) FIELD^^2.2^11 "^DD",178.301,178.301,0,"DDA") N "^DD",178.301,178.301,0,"DT") 3100226 "^DD",178.301,178.301,0,"IX","B",178.301,.01) "^DD",178.301,178.301,0,"NM","C0C XML MISC") "^DD",178.301,178.301,0,"PT",178.301,.03) "^DD",178.301,178.301,0,"VRPK") C0C "^DD",178.301,178.301,.01,0) TEMPLATE NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X "^DD",178.301,178.301,.01,.1) NAME OF THE XML TEMPLATE "^DD",178.301,178.301,.01,1,0) ^.1 "^DD",178.301,178.301,.01,1,1,0) 178.301^B "^DD",178.301,178.301,.01,1,1,1) S ^C0CX(178.301,"B",$E(X,1,30),DA)="" "^DD",178.301,178.301,.01,1,1,2) K ^C0CX(178.301,"B",$E(X,1,30),DA) "^DD",178.301,178.301,.01,3) NAME OF THE XML TEMPLATE "^DD",178.301,178.301,.01,"DT") 3100224 "^DD",178.301,178.301,.03,0) REPLY TEMPLATE^P178.301^C0CX(178.301,^0;2^Q "^DD",178.301,178.301,.03,.1) TEMPLATE TO USE FOR WEB SERVICE REPLY "^DD",178.301,178.301,.03,3) TEMPLATE TO USE FOR WEB SERVICE REPLY "^DD",178.301,178.301,.03,"DT") 3100224 "^DD",178.301,178.301,1,0) URL^F^^1;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.301,1,.1) WEB SERVICE URL "^DD",178.301,178.301,1,3) WEB SERVICE URL "^DD",178.301,178.301,1,"DT") 3100224 "^DD",178.301,178.301,2,0) WSDL URL^F^^2;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.301,2,.1) TEMPLATE DEFINITION URL - COULD BE WSDL "^DD",178.301,178.301,2,3) TEMPLATE DEFINITION URL - COULD BE WSDL "^DD",178.301,178.301,2,"DT") 3100224 "^DD",178.301,178.301,2.1,0) XML^178.311^^3;0 "^DD",178.301,178.301,2.2,0) XML HEADER^178.321^^10;0 "^DD",178.301,178.301,2.3,0) MIME TYPE^F^^5;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.301,2.3,.1) SOAP MIME TYPE "^DD",178.301,178.301,2.3,3) SOAP MIME TYPE "^DD",178.301,178.301,2.3,"DT") 3100224 "^DD",178.301,178.301,2.4,0) PROXY SERVER^F^^6;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.301,2.4,.1) OPTIONAL PROXY SERVER URL "^DD",178.301,178.301,2.4,3) OPTIONAL PROXY SERVER URL "^DD",178.301,178.301,2.4,"DT") 3100224 "^DD",178.301,178.301,2.5,0) XPATH REDUCTION STRING^F^^7;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.301,2.5,.1) PARTIAL XPATH TO BE REDACTED FROM GENERATED XPATHS "^DD",178.301,178.301,2.5,3) XPATH REDUCTION STRING "^DD",178.301,178.301,2.5,"DT") 3100224 "^DD",178.301,178.301,3,0) TEMPLATE XML^178.3013^^8;0 "^DD",178.301,178.301,4,0) BINDING^178.3014^^9;0 "^DD",178.301,178.3013,0) TEMPLATE XML SUB-FIELD^^.01^1 "^DD",178.301,178.3013,0,"DT") 3100224 "^DD",178.301,178.3013,0,"NM","TEMPLATE XML") "^DD",178.301,178.3013,0,"UP") 178.301 "^DD",178.301,178.3013,.01,0) TEMPLATE XML^WLx^^0;1 "^DD",178.301,178.3013,.01,.1) XML TEMPLATE - USUALLY GENERATED "^DD",178.301,178.3013,.01,3) XML TEMPLATE - USUALLY PROGRAM GENERATED "^DD",178.301,178.3013,.01,"DT") 3100224 "^DD",178.301,178.3014,0) BINDING SUB-FIELD^^4^8 "^DD",178.301,178.3014,0,"DT") 3100224 "^DD",178.301,178.3014,0,"IX","B",178.3014,.01) "^DD",178.301,178.3014,0,"NM","BINDING") "^DD",178.301,178.3014,0,"UP") 178.301 "^DD",178.301,178.3014,.01,0) XPATH^MF^^0;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.3014,.01,.1) XPATH BINDINGS "^DD",178.301,178.3014,.01,1,0) ^.1 "^DD",178.301,178.3014,.01,1,1,0) 178.3014^B "^DD",178.301,178.3014,.01,1,1,1) S ^C0CX(178.301,DA(1),9,"B",$E(X,1,30),DA)="" "^DD",178.301,178.3014,.01,1,1,2) K ^C0CX(178.301,DA(1),9,"B",$E(X,1,30),DA) "^DD",178.301,178.3014,.01,3) XPATH BINDINGS "^DD",178.301,178.3014,.01,"DT") 3100225 "^DD",178.301,178.3014,.05,0) INDEXED BY^F^^1;1^K:$L(X)>80!($L(X)<1) X "^DD",178.301,178.3014,.05,.1) IEN VARIABLE FOR FILEMAN MAPPING "^DD",178.301,178.3014,.05,3) IEN VARIABLE FOR FILEMAN MAPPING "^DD",178.301,178.3014,.05,"DT") 3100224 "^DD",178.301,178.3014,1,0) FILEMAN FIELD NAME^F^^1;2^K:$L(X)>60!($L(X)<3) X "^DD",178.301,178.3014,1,.1) NAME OF FILEMAN FIELD - OPTIONAL "^DD",178.301,178.3014,1,3) NAME OF FILEMAN FIELD - OPTIONAL "^DD",178.301,178.3014,1,"DT") 3100224 "^DD",178.301,178.3014,1.1,0) FILEMAN FILE POINTER^P1'^DIC(^1;3^Q "^DD",178.301,178.3014,1.1,.1) POINTER TO THE FILEMAN FILE "^DD",178.301,178.3014,1.1,3) POINTER TO THE FILEMAN FILE "^DD",178.301,178.3014,1.1,"DT") 3100224 "^DD",178.301,178.3014,1.2,0) FILEMAN FIELD NUMBER^NJ22,9^^1;4^K:+X'=X!(X>999999999999)!(X<.000000001)!(X?.E1"."10.N) X "^DD",178.301,178.3014,1.2,.1) FIELD NUMBER IN FILEMAN "^DD",178.301,178.3014,1.2,3) Type a number between .000000001 and 999999999999, 9 Decimal Digits "^DD",178.301,178.3014,1.2,"DT") 3100224 "^DD",178.301,178.3014,2,0) VARIABLE NAME^F^^2;1^K:$L(X)>240!($L(X)<1) X "^DD",178.301,178.3014,2,.1) NAME OF VARIABLE FOR BINDING "^DD",178.301,178.3014,2,3) NAME OF VARIABLE FOR BINDING "^DD",178.301,178.3014,2,"DT") 3100224 "^DD",178.301,178.3014,3,0) SQLI FIELD NAME^F^^3;1^K:$L(X)>240!($L(X)<3) X "^DD",178.301,178.3014,3,.1) SQLI NAME FOR THIS FIELD "^DD",178.301,178.3014,3,3) SQLI NAME FOR THIS FIELD "^DD",178.301,178.3014,3,"DT") 3100224 "^DD",178.301,178.3014,4,0) CCR VARIABLE^P170^C0CDIC(170,^3;2^Q "^DD",178.301,178.3014,4,.1) CCR DICTIONARY POINTER "^DD",178.301,178.3014,4,3) CCR DICTIONARY POINTER "^DD",178.301,178.3014,4,"DT") 3100224 "^DD",178.301,178.311,0) XML SUB-FIELD^^.01^1 "^DD",178.301,178.311,0,"DT") 3100224 "^DD",178.301,178.311,0,"NM","XML") "^DD",178.301,178.311,0,"UP") 178.301 "^DD",178.301,178.311,.01,0) XML^WLx^^0;1 "^DD",178.301,178.311,.01,.1) DEFINING XML "^DD",178.301,178.311,.01,3) DEFINING XML "^DD",178.301,178.311,.01,"DT") 3100224 "^DD",178.301,178.321,0) XML HEADER SUB-FIELD^^.01^1 "^DD",178.301,178.321,0,"DT") 3100226 "^DD",178.301,178.321,0,"NM","XML HEADER") "^DD",178.301,178.321,0,"UP") 178.301 "^DD",178.301,178.321,.01,0) XML HEADER^WLx^^0;1 "^DD",178.301,178.321,.01,.1) XML SOAP HEADER "^DD",178.301,178.321,.01,3) XML SOAP HEADER "^DD",178.301,178.321,.01,"DT") 3100226 "^DD",1130580001.101,1130580001.101,0) FIELD^^.3^15 "^DD",1130580001.101,1130580001.101,0,"DDA") N "^DD",1130580001.101,1130580001.101,0,"DT") 3111201 "^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,.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.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,3,0) QRDA TEMPLATE ROOT^F^^0;4^K:$L(X)>120!($L(X)<3) X "^DD",1130580001.101,1130580001.101,3,.1) MEASURE TEMPLATE ROOT FOR QRDA DOCUMENT "^DD",1130580001.101,1130580001.101,3,3) Answer must be 3-120 characters in length "^DD",1130580001.101,1130580001.101,3,"DT") 3101012 "^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.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.201,1130580001.201,0) FIELD^^.3^8 "^DD",1130580001.201,1130580001.201,0,"DDA") N "^DD",1130580001.201,1130580001.201,0,"DT") 3111129 "^DD",1130580001.201,1130580001.201,0,"IX","ADBYP",1130580001.20112,.01) "^DD",1130580001.201,1130580001.201,0,"IX","ANBYP",1130580001.20111,.01) "^DD",1130580001.201,1130580001.201,0,"IX","B",1130580001.201,.01) "^DD",1130580001.201,1130580001.201,0,"NM","C0Q MEASUREMENTS") "^DD",1130580001.201,1130580001.201,0,"PT",1130580001.401,1) "^DD",1130580001.201,1130580001.201,0,"PT",1130580001.401,1.1) "^DD",1130580001.201,1130580001.201,0,"PT",1130580001.401,2) "^DD",1130580001.201,1130580001.201,0,"PT",1130580001.401,2.1) "^DD",1130580001.201,1130580001.201,.01,0) SET NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X "^DD",1130580001.201,1130580001.201,.01,.1) MEASUREMENT SET NAME "^DD",1130580001.201,1130580001.201,.01,1,0) ^.1 "^DD",1130580001.201,1130580001.201,.01,1,1,0) 1130580001.201^B "^DD",1130580001.201,1130580001.201,.01,1,1,1) S ^C0Q(201,"B",$E(X,1,30),DA)="" "^DD",1130580001.201,1130580001.201,.01,1,1,2) K ^C0Q(201,"B",$E(X,1,30),DA) "^DD",1130580001.201,1130580001.201,.01,3) NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION "^DD",1130580001.201,1130580001.201,.01,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.02,0) BEGIN DATE^D^^4;3^S %DT="E" D ^%DT S X=Y K:X<1 X "^DD",1130580001.201,1130580001.201,.02,.1) MEASUREMENT BEGIN DATE "^DD",1130580001.201,1130580001.201,.02,3) MEASUREMENT BEGIN DATE "^DD",1130580001.201,1130580001.201,.02,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.03,0) END DATE^D^^4;4^S %DT="E" D ^%DT S X=Y K:X<1 X "^DD",1130580001.201,1130580001.201,.03,.1) MEASUREMENT END DATE "^DD",1130580001.201,1130580001.201,.03,3) MEASUREMENT END DATE "^DD",1130580001.201,1130580001.201,.03,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.04,0) DATE LAST CALCULATED^D^^6;1^S %DT="E" D ^%DT S X=Y K:X<1 X "^DD",1130580001.201,1130580001.201,.04,.1) DATE LAST PROCESSED "^DD",1130580001.201,1130580001.201,.04,3) DATE LAST PROCESSED "^DD",1130580001.201,1130580001.201,.04,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.05,0) LOCKED^S^Y:YES;N:NO;^6;2^Q "^DD",1130580001.201,1130580001.201,.05,.1) Y/N IS THIS RECORD SET LOCKED "^DD",1130580001.201,1130580001.201,.05,3) Y/N IS THIS RECORD SET LOCKED "^DD",1130580001.201,1130580001.201,.05,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.2,0) USE ALL MEASURES^S^Y:YES;N:NO;^6;3^Q "^DD",1130580001.201,1130580001.201,.2,.1) INCLUDE ALL MEASURES IN THIS SET? "^DD",1130580001.201,1130580001.201,.2,3) INCLUDE ALL MEASURES IN THIS SET? "^DD",1130580001.201,1130580001.201,.2,"DT") 3101012 "^DD",1130580001.201,1130580001.201,.3,0) MU YEAR KEY^F^^7;1^K:$L(X)>240!($L(X)<1) X "^DD",1130580001.201,1130580001.201,.3,.1) MEANINGFUL USE YEAR KEY "^DD",1130580001.201,1130580001.201,.3,3) Answer must be 1-240 characters in length. "^DD",1130580001.201,1130580001.201,.3,"DT") 3111129 "^DD",1130580001.201,1130580001.201,1,0) MEASURE^1130580001.2011P^^5;0 "^DD",1130580001.201,1130580001.2011,0) MEASURE SUB-FIELD^^2.2^8 "^DD",1130580001.201,1130580001.2011,0,"DT") 3111129 "^DD",1130580001.201,1130580001.2011,0,"IX","B",1130580001.2011,.01) "^DD",1130580001.201,1130580001.2011,0,"NM","MEASURE") "^DD",1130580001.201,1130580001.2011,0,"UP") 1130580001.201 "^DD",1130580001.201,1130580001.2011,.01,0) MEASURE^MP1130580001.101^C0Q(101,^0;1^Q "^DD",1130580001.201,1130580001.2011,.01,.1) INCLUDED QUALITY MEASURES "^DD",1130580001.201,1130580001.2011,.01,1,0) ^.1 "^DD",1130580001.201,1130580001.2011,.01,1,1,0) 1130580001.2011^B "^DD",1130580001.201,1130580001.2011,.01,1,1,1) S ^C0Q(201,DA(1),5,"B",$E(X,1,30),DA)="" "^DD",1130580001.201,1130580001.2011,.01,1,1,2) K ^C0Q(201,DA(1),5,"B",$E(X,1,30),DA) "^DD",1130580001.201,1130580001.2011,.01,3) INCLUDED QUALITY MEASURES "^DD",1130580001.201,1130580001.2011,.01,"DT") 3101012 "^DD",1130580001.201,1130580001.2011,1,0) NUMERATOR^1130580001.20111P^^1;0 "^DD",1130580001.201,1130580001.2011,1.1,0) NUMERATOR COUNT^NJ10,0^^2;1^K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"."1.N) X "^DD",1130580001.201,1130580001.2011,1.1,.1) NUMBER OF PATIENTS IN NUMERATOR "^DD",1130580001.201,1130580001.2011,1.1,3) NUMBER OF PATIENTS IN NUMERATOR "^DD",1130580001.201,1130580001.2011,1.1,"DT") 3101012 "^DD",1130580001.201,1130580001.2011,1.2,0) NUMERATOR FILTER LIST^P1130580001.301'^C0Q(301,^4;3^Q "^DD",1130580001.201,1130580001.2011,1.2,.1) FILTER LIST FOR NUMERATOR "^DD",1130580001.201,1130580001.2011,1.2,"DT") 3111129 "^DD",1130580001.201,1130580001.2011,2,0) DENOMINATOR^1130580001.20112P^^3;0 "^DD",1130580001.201,1130580001.2011,2.1,0) DENOMINATOR COUNT^NJ9,0^^4;1^K:+X'=X!(X>999999999)!(X<0)!(X?.E1"."1.N) X "^DD",1130580001.201,1130580001.2011,2.1,.1) NUMBER OF PATIENTS IN DENOMINATOR "^DD",1130580001.201,1130580001.2011,2.1,3) NUMBER OF PATIENTS IN DENOMINATOR "^DD",1130580001.201,1130580001.2011,2.1,"DT") 3101012 "^DD",1130580001.201,1130580001.2011,2.2,0) DENOMINATOR FILTER LIST^P1130580001.301'^C0Q(301,^4;4^Q "^DD",1130580001.201,1130580001.2011,2.2,.1) FILTER LIST FOR DENOMINATOR "^DD",1130580001.201,1130580001.2011,2.2,"DT") 3111129 "^DD",1130580001.201,1130580001.2011,3,0) PERCENTAGE^NJ6,2^^4;2^K:+X'=X!(X>100)!(X<0)!(X?.E1"."3.N) X "^DD",1130580001.201,1130580001.2011,3,.1) MEASURE PERCENTAGE "^DD",1130580001.201,1130580001.2011,3,3) Type a number between 0 and 100, 2 Decimal Digits "^DD",1130580001.201,1130580001.2011,3,"DT") 3110621 "^DD",1130580001.201,1130580001.20111,0) NUMERATOR SUB-FIELD^^.01^1 "^DD",1130580001.201,1130580001.20111,0,"DT") 3101012 "^DD",1130580001.201,1130580001.20111,0,"IX","B",1130580001.20111,.01) "^DD",1130580001.201,1130580001.20111,0,"NM","NUMERATOR") "^DD",1130580001.201,1130580001.20111,0,"UP") 1130580001.2011 "^DD",1130580001.201,1130580001.20111,.01,0) NUMERATOR^MP2'^DPT(^0;1^Q "^DD",1130580001.201,1130580001.20111,.01,.1) NUMERATOR PATIENTS "^DD",1130580001.201,1130580001.20111,.01,1,0) ^.1 "^DD",1130580001.201,1130580001.20111,.01,1,1,0) 1130580001.20111^B "^DD",1130580001.201,1130580001.20111,.01,1,1,1) S ^C0Q(201,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",1130580001.201,1130580001.20111,.01,1,1,2) K ^C0Q(201,DA(2),5,DA(1),1,"B",$E(X,1,30),DA) "^DD",1130580001.201,1130580001.20111,.01,1,2,0) 1130580001.201^ANBYP "^DD",1130580001.201,1130580001.20111,.01,1,2,1) S ^C0Q(201,"ANBYP",$E(X,1,30),DA(2),DA(1),DA)="" "^DD",1130580001.201,1130580001.20111,.01,1,2,2) K ^C0Q(201,"ANBYP",$E(X,1,30),DA(2),DA(1),DA) "^DD",1130580001.201,1130580001.20111,.01,1,2,"DT") 3101014 "^DD",1130580001.201,1130580001.20111,.01,3) NUMERATOR PATIENTS "^DD",1130580001.201,1130580001.20111,.01,"DT") 3101014 "^DD",1130580001.201,1130580001.20112,0) DENOMINATOR SUB-FIELD^^.01^1 "^DD",1130580001.201,1130580001.20112,0,"DT") 3101012 "^DD",1130580001.201,1130580001.20112,0,"IX","B",1130580001.20112,.01) "^DD",1130580001.201,1130580001.20112,0,"NM","DENOMINATOR") "^DD",1130580001.201,1130580001.20112,0,"UP") 1130580001.2011 "^DD",1130580001.201,1130580001.20112,.01,0) DENOMINATOR^MP2'^DPT(^0;1^Q "^DD",1130580001.201,1130580001.20112,.01,.1) DENOMINATOR PATIENTS "^DD",1130580001.201,1130580001.20112,.01,1,0) ^.1 "^DD",1130580001.201,1130580001.20112,.01,1,1,0) 1130580001.20112^B "^DD",1130580001.201,1130580001.20112,.01,1,1,1) S ^C0Q(201,DA(2),5,DA(1),3,"B",$E(X,1,30),DA)="" "^DD",1130580001.201,1130580001.20112,.01,1,1,2) K ^C0Q(201,DA(2),5,DA(1),3,"B",$E(X,1,30),DA) "^DD",1130580001.201,1130580001.20112,.01,1,2,0) 1130580001.201^ADBYP "^DD",1130580001.201,1130580001.20112,.01,1,2,1) S ^C0Q(201,"ADBYP",$E(X,1,30),DA(2),DA(1),DA)="" "^DD",1130580001.201,1130580001.20112,.01,1,2,2) K ^C0Q(201,"ADBYP",$E(X,1,30),DA(2),DA(1),DA) "^DD",1130580001.201,1130580001.20112,.01,1,2,"DT") 3101014 "^DD",1130580001.201,1130580001.20112,.01,3) DENOMINATOR PATIENTS "^DD",1130580001.201,1130580001.20112,.01,"DT") 3101014 "^DD",1130580001.301,1130580001.301,0) FIELD^^.3^9 "^DD",1130580001.301,1130580001.301,0,"DDA") N "^DD",1130580001.301,1130580001.301,0,"DT") 3111201 "^DD",1130580001.301,1130580001.301,0,"ID",999) W:$D(^(3)) " ",$P(^(3),U,1) "^DD",1130580001.301,1130580001.301,0,"IX","B",1130580001.301,.01) "^DD",1130580001.301,1130580001.301,0,"NM","C0Q PATIENT LIST") "^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,1.1) "^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,1.51) "^DD",1130580001.301,1130580001.301,0,"PT",1130580001.101,2.1) "^DD",1130580001.301,1130580001.301,0,"PT",1130580001.2011,1.2) "^DD",1130580001.301,1130580001.301,0,"PT",1130580001.2011,2.2) "^DD",1130580001.301,1130580001.301,.01,0) NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X "^DD",1130580001.301,1130580001.301,.01,1,0) ^.1 "^DD",1130580001.301,1130580001.301,.01,1,1,0) 1130580001.301^B "^DD",1130580001.301,1130580001.301,.01,1,1,1) S ^C0Q(301,"B",$E(X,1,30),DA)="" "^DD",1130580001.301,1130580001.301,.01,1,1,2) K ^C0Q(301,"B",$E(X,1,30),DA) "^DD",1130580001.301,1130580001.301,.01,3) NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION "^DD",1130580001.301,1130580001.301,.02,0) REPORT YEAR^NJ4,0^^0;2^K:+X'=X!(X>2050)!(X<2011)!(X?.E1"."1.N) X "^DD",1130580001.301,1130580001.301,.02,3) Type a number between 2011 and 2050, 0 decimal digits. "^DD",1130580001.301,1130580001.301,.02,"DT") 3110805 "^DD",1130580001.301,1130580001.301,.03,0) REPORT PERIOD^NJ2,0^^0;3^K:+X'=X!(X>12)!(X<1)!(X?.E1"."1.N) X "^DD",1130580001.301,1130580001.301,.03,3) Type a number between 1 and 12, 0 decimal digits. "^DD",1130580001.301,1130580001.301,.03,"DT") 3110805 "^DD",1130580001.301,1130580001.301,.04,0) ORIGINAL DATE CREATED^D^^0;4^S %DT="ESTR" D ^%DT S X=Y K:X<1 X "^DD",1130580001.301,1130580001.301,.04,3) (No range limit on date) "^DD",1130580001.301,1130580001.301,.04,"DT") 3110805 "^DD",1130580001.301,1130580001.301,.07,0) CREATOR^P200'^VA(200,^0;5^Q "^DD",1130580001.301,1130580001.301,.07,"DT") 3110805 "^DD",1130580001.301,1130580001.301,.3,0) MU YEAR KEY^F^^4;1^K:$L(X)>240!($L(X)<1) X "^DD",1130580001.301,1130580001.301,.3,.1) MEANINGFUL USE YEAR KEY "^DD",1130580001.301,1130580001.301,.3,3) Answer must be 1-240 characters in length. "^DD",1130580001.301,1130580001.301,.3,"DT") 3111201 "^DD",1130580001.301,1130580001.301,30,0) PATIENTS^1130580001.311P^^1;0 "^DD",1130580001.301,1130580001.301,200,0) CREATION DOCUMENTATION^1130580001.321^^2;0 "^DD",1130580001.301,1130580001.301,999,0) ATTRIBUTE^F^^3;1^K:$L(X)>64!($L(X)<1) X "^DD",1130580001.301,1130580001.301,999,3) PATIENT LIST ATTRIBUTE "^DD",1130580001.301,1130580001.301,999,"DT") 3110805 "^DD",1130580001.301,1130580001.311,0) PATIENTS SUB-FIELD^^.05^4 "^DD",1130580001.301,1130580001.311,0,"DT") 3110805 "^DD",1130580001.301,1130580001.311,0,"IX","B",1130580001.311,.01) "^DD",1130580001.301,1130580001.311,0,"NM","PATIENTS") "^DD",1130580001.301,1130580001.311,0,"UP") 1130580001.301 "^DD",1130580001.301,1130580001.311,.01,0) PATIENTS^MP2'^DPT(^0;1^Q "^DD",1130580001.301,1130580001.311,.01,1,0) ^.1 "^DD",1130580001.301,1130580001.311,.01,1,1,0) 1130580001.311^B "^DD",1130580001.301,1130580001.311,.01,1,1,1) S ^C0Q(301,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",1130580001.301,1130580001.311,.01,1,1,2) K ^C0Q(301,DA(1),1,"B",$E(X,1,30),DA) "^DD",1130580001.301,1130580001.311,.01,3) PATIENTS IN THE LIST "^DD",1130580001.301,1130580001.311,.01,"DT") 3110805 "^DD",1130580001.301,1130580001.311,.04,0) DESEASED^S^0:NO;1:YES;^2;1^Q "^DD",1130580001.301,1130580001.311,.04,"DT") 3110805 "^DD",1130580001.301,1130580001.311,.05,0) TEST PATIENT^S^0:NO;1:YES;^2;2^Q "^DD",1130580001.301,1130580001.311,.05,"DT") 3110805 "^DD",1130580001.301,1130580001.311,1,0) DATA^1130580001.3111^^1;0 "^DD",1130580001.301,1130580001.3111,0) DATA SUB-FIELD^^.02^2 "^DD",1130580001.301,1130580001.3111,0,"DT") 3110805 "^DD",1130580001.301,1130580001.3111,0,"IX","B",1130580001.3111,.01) "^DD",1130580001.301,1130580001.3111,0,"NM","DATA") "^DD",1130580001.301,1130580001.3111,0,"UP") 1130580001.311 "^DD",1130580001.301,1130580001.3111,.01,0) DATA TYPE^MF^^0;1^K:$L(X)>64!($L(X)<1) X "^DD",1130580001.301,1130580001.3111,.01,1,0) ^.1 "^DD",1130580001.301,1130580001.3111,.01,1,1,0) 1130580001.3111^B "^DD",1130580001.301,1130580001.3111,.01,1,1,1) S ^C0Q(301,DA(2),1,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",1130580001.301,1130580001.3111,.01,1,1,2) K ^C0Q(301,DA(2),1,DA(1),1,"B",$E(X,1,30),DA) "^DD",1130580001.301,1130580001.3111,.01,3) Answer must be 1-64 characters in length. "^DD",1130580001.301,1130580001.3111,.01,"DT") 3110805 "^DD",1130580001.301,1130580001.3111,.02,0) VALUE^F^^0;2^K:$L(X)>64!($L(X)<1) X "^DD",1130580001.301,1130580001.3111,.02,3) Answer must be 1-64 characters in length. "^DD",1130580001.301,1130580001.3111,.02,"DT") 3110805 "^DD",1130580001.301,1130580001.321,0) CREATION DOCUMENTATION SUB-FIELD^^.01^1 "^DD",1130580001.301,1130580001.321,0,"DT") 3110805 "^DD",1130580001.301,1130580001.321,0,"NM","CREATION DOCUMENTATION") "^DD",1130580001.301,1130580001.321,0,"UP") 1130580001.301 "^DD",1130580001.301,1130580001.321,.01,0) CREATION DOCUMENTATION^W^^0;1 "^DD",1130580001.301,1130580001.321,.01,3) DOCUMENTATION "^DD",1130580001.301,1130580001.321,.01,"DT") 3110805 "^DD",1130580001.401,1130580001.401,0) FIELD^^1.015^11 "^DD",1130580001.401,1130580001.401,0,"DDA") N "^DD",1130580001.401,1130580001.401,0,"DT") 3120207 "^DD",1130580001.401,1130580001.401,0,"IX","B",1130580001.401,.01) "^DD",1130580001.401,1130580001.401,0,"NM","C0Q PARAMETER") "^DD",1130580001.401,1130580001.401,.01,0) NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X "^DD",1130580001.401,1130580001.401,.01,1,0) ^.1 "^DD",1130580001.401,1130580001.401,.01,1,1,0) 1130580001.401^B "^DD",1130580001.401,1130580001.401,.01,1,1,1) S ^C0Q(401,"B",$E(X,1,30),DA)="" "^DD",1130580001.401,1130580001.401,.01,1,1,2) K ^C0Q(401,"B",$E(X,1,30),DA) "^DD",1130580001.401,1130580001.401,.01,3) NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION "^DD",1130580001.401,1130580001.401,.02,0) MEASUREMENT PERIOD KEY^F^^0;2^K:$L(X)>60!($L(X)<1) X "^DD",1130580001.401,1130580001.401,.02,.1) YEAR KEY FOR MEASUREMENT PERIOD IE MU12 "^DD",1130580001.401,1130580001.401,.02,3) Answer must be 1-60 characters in length. "^DD",1130580001.401,1130580001.401,.02,21,0) ^^3^3^3120103^ "^DD",1130580001.401,1130580001.401,.02,21,1,0) Meaningful Use and Quality Measures are generally computed for a "^DD",1130580001.401,1130580001.401,.02,21,2,0) particular fiscal year. The Measurement Period Key changes every year "^DD",1130580001.401,1130580001.401,.02,21,3,0) when new parameters are set up to govern the computations for that year. "^DD",1130580001.401,1130580001.401,.02,"DT") 3120103 "^DD",1130580001.401,1130580001.401,.03,0) PARAMETER TYPE^S^INP:INPATIENT;EP:OUTPATIENT;ALL:SUPERUSERS;^0;3^Q "^DD",1130580001.401,1130580001.401,.03,.1) C0Q PARAMETER TYPE "^DD",1130580001.401,1130580001.401,.03,21,0) ^^6^6^3120103^ "^DD",1130580001.401,1130580001.401,.03,21,1,0) If the current parameter record is type INP it will define the processing "^DD",1130580001.401,1130580001.401,.03,21,2,0) for inpatient patients. Type EP defines the processing for one group of "^DD",1130580001.401,1130580001.401,.03,21,3,0) oupatient patients where a group is the patients with a visit at one or "^DD",1130580001.401,1130580001.401,.03,21,4,0) more clinics specified in the CLINIC multiple. Type ALL is used to "^DD",1130580001.401,1130580001.401,.03,21,5,0) specify a set of subscribers who have access to all Measurement Sets in "^DD",1130580001.401,1130580001.401,.03,21,6,0) the specifies Measurement Period. "^DD",1130580001.401,1130580001.401,.03,"DT") 3120103 "^DD",1130580001.401,1130580001.401,1,0) INP MU MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;4^Q "^DD",1130580001.401,1130580001.401,1,.1) INPATIENT MEANINGFUL USE MEASUREMENT SET "^DD",1130580001.401,1130580001.401,1,"DT") 3120103 "^DD",1130580001.401,1130580001.401,1.015,0) DIVISION REPORTING^P40.8'^DG(40.8,^4;1^Q "^DD",1130580001.401,1130580001.401,1.015,.1) MEDICAL CENTER DIVISION FOR THIS PARAMETER "^DD",1130580001.401,1130580001.401,1.015,"DT") 3120207 "^DD",1130580001.401,1130580001.401,1.1,0) INP QUALITY MEASUREMENT SET^P1130580001.201'^C0Q(201,^0;5^Q "^DD",1130580001.401,1130580001.401,1.1,.1) INPATIENT QUALITY MEASUREMENT SET "^DD",1130580001.401,1130580001.401,1.1,"DT") 3120103 "^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,"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,"DT") 3120103 "^DD",1130580001.401,1130580001.401,2.2,0) CLINIC^1130580001.411P^^1;0 "^DD",1130580001.401,1130580001.401,2.3,0) PATIENT LIST LABEL^F^^2;1^K:$L(X)>20!($L(X)<1) X "^DD",1130580001.401,1130580001.401,2.3,.1) MU PATIENT LIST LABEL "^DD",1130580001.401,1130580001.401,2.3,3) Answer must be 1-20 characters in length. "^DD",1130580001.401,1130580001.401,2.3,21,0) ^^3^3^3120103^ "^DD",1130580001.401,1130580001.401,2.3,21,1,0) When there is more than one clinic in this reporting group, this field is "^DD",1130580001.401,1130580001.401,2.3,21,2,0) used to contain a label for the patient lists. If it is not defined, the "^DD",1130580001.401,1130580001.401,2.3,21,3,0) name of the first clinic defined is used as the label. "^DD",1130580001.401,1130580001.401,2.3,"DT") 3120103 "^DD",1130580001.401,1130580001.401,3,0) SUBSCRIBER^1130580001.4013P^^3;0 "^DD",1130580001.401,1130580001.4013,0) SUBSCRIBER SUB-FIELD^^.02^2 "^DD",1130580001.401,1130580001.4013,0,"DT") 3120103 "^DD",1130580001.401,1130580001.4013,0,"IX","B",1130580001.4013,.01) "^DD",1130580001.401,1130580001.4013,0,"NM","SUBSCRIBER") "^DD",1130580001.401,1130580001.4013,0,"UP") 1130580001.401 "^DD",1130580001.401,1130580001.4013,.01,0) SUBSCRIBER^MP200'^VA(200,^0;1^Q "^DD",1130580001.401,1130580001.4013,.01,.1) SUBSCRIBERS TO THIS MEASUREMENT SET "^DD",1130580001.401,1130580001.4013,.01,1,0) ^.1 "^DD",1130580001.401,1130580001.4013,.01,1,1,0) 1130580001.4013^B "^DD",1130580001.401,1130580001.4013,.01,1,1,1) S ^C0Q(401,DA(1),3,"B",$E(X,1,30),DA)="" "^DD",1130580001.401,1130580001.4013,.01,1,1,2) K ^C0Q(401,DA(1),3,"B",$E(X,1,30),DA) "^DD",1130580001.401,1130580001.4013,.01,"DT") 3120103 "^DD",1130580001.401,1130580001.4013,.02,0) DEFAULT^S^1:YES;0:NO;^0;2^Q "^DD",1130580001.401,1130580001.4013,.02,.1) DISPLAY AS SUBSCRIBER DEFAULT MEASUREMENT SET "^DD",1130580001.401,1130580001.4013,.02,"DT") 3120103 "^DD",1130580001.401,1130580001.411,0) CLINIC SUB-FIELD^^.01^1 "^DD",1130580001.401,1130580001.411,0,"DT") 3120103 "^DD",1130580001.401,1130580001.411,0,"IX","B",1130580001.411,.01) "^DD",1130580001.401,1130580001.411,0,"NM","CLINIC") "^DD",1130580001.401,1130580001.411,0,"UP") 1130580001.401 "^DD",1130580001.401,1130580001.411,.01,0) CLINIC^MP44'^SC(^0;1^Q "^DD",1130580001.401,1130580001.411,.01,.1) OUTPATIENT CLINIC "^DD",1130580001.401,1130580001.411,.01,1,0) ^.1 "^DD",1130580001.401,1130580001.411,.01,1,1,0) 1130580001.411^B "^DD",1130580001.401,1130580001.411,.01,1,1,1) S ^C0Q(401,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",1130580001.401,1130580001.411,.01,1,1,2) K ^C0Q(401,DA(1),1,"B",$E(X,1,30),DA) "^DD",1130580001.401,1130580001.411,.01,"DT") 3120103 "^DIC",178.301,178.301,0) C0C XML MISC^178.301 "^DIC",178.301,178.301,0,"GL") ^C0CX(178.301, "^DIC",178.301,"B","C0C XML MISC",178.301) "^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) "^DIC",1130580001.201,1130580001.201,0) C0Q MEASUREMENTS^1130580001.201 "^DIC",1130580001.201,1130580001.201,0,"GL") ^C0Q(201, "^DIC",1130580001.201,"B","C0Q MEASUREMENTS",1130580001.201) "^DIC",1130580001.301,1130580001.301,0) C0Q PATIENT LIST^1130580001.301 "^DIC",1130580001.301,1130580001.301,0,"GL") ^C0Q(301, "^DIC",1130580001.301,1130580001.301,"%",0) ^1.005^^0 "^DIC",1130580001.301,"B","C0Q PATIENT LIST",1130580001.301) "^DIC",1130580001.401,1130580001.401,0) C0Q PARAMETER^1130580001.401 "^DIC",1130580001.401,1130580001.401,0,"GL") ^C0Q(401, "^DIC",1130580001.401,1130580001.401,"%",0) ^1.005^^0 "^DIC",1130580001.401,1130580001.401,"%D",0) ^^7^7^3120103^ "^DIC",1130580001.401,1130580001.401,"%D",1,0) This parameter file was created by George Lilly 12/2011 for the C0Q "^DIC",1130580001.401,1130580001.401,"%D",2,0) Meaningful Use and Quality Measurement Project funded in part by Oroville "^DIC",1130580001.401,1130580001.401,"%D",3,0) Hospital. It controls the updating of Meaningful Use patient lists and "^DIC",1130580001.401,1130580001.401,"%D",4,0) C0Q MEASUREMENT SETs for a specific Measurement Period. In general, this "^DIC",1130580001.401,1130580001.401,"%D",5,0) file should be updated using the C0Q SETUP options because the "^DIC",1130580001.401,1130580001.401,"%D",6,0) combiniation of fields in each record varies depending on the updating "^DIC",1130580001.401,1130580001.401,"%D",7,0) behavior that is desired. "^DIC",1130580001.401,"B","C0Q PARAMETER",1130580001.401) **END** **END**