KIDS Distribution saved on Sep 02, 2011@14:13:43
added Smoking status and CPOE calculation
**KIDS**:C0Q*1.0*0^
**INSTALL NAME**
C0Q*1.0*0
"BLD",7812,0)
C0Q*1.0*0^^0^3110902^n
"BLD",7812,4,0)
^9.64PA^1130580001.301^4
"BLD",7812,4,178.301,0)
178.301
"BLD",7812,4,178.301,222)
y^y^f^^n^^y^o^n
"BLD",7812,4,1130580001.101,0)
1130580001.101
"BLD",7812,4,1130580001.101,222)
y^y^f^^^^n^^
"BLD",7812,4,1130580001.101,224)
"BLD",7812,4,1130580001.201,0)
1130580001.201
"BLD",7812,4,1130580001.201,222)
y^y^f^^^^n^^
"BLD",7812,4,1130580001.201,224)
"BLD",7812,4,1130580001.301,0)
1130580001.301
"BLD",7812,4,1130580001.301,222)
y^y^f^^^^n^^
"BLD",7812,4,1130580001.301,224)
"BLD",7812,4,"B",178.301,178.301)
"BLD",7812,4,"B",1130580001.101,1130580001.101)
"BLD",7812,4,"B",1130580001.201,1130580001.201)
"BLD",7812,4,"B",1130580001.301,1130580001.301)
"BLD",7812,6.3)
19
"BLD",7812,"KRN",0)
^9.67PA^779.2^20
"BLD",7812,"KRN",.4,0)
.4
"BLD",7812,"KRN",.4,"NM",0)
^9.68A^6^6
"BLD",7812,"KRN",.4,"NM",1,0)
C0Q PRINT BY PATIENT FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.4,"NM",2,0)
C0Q PRINT MEASUREMENT SET FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.4,"NM",3,0)
C0Q PRINT QUALITY MEASURES FILE #1130580001.101^1130580001.101^0
"BLD",7812,"KRN",.4,"NM",4,0)
C0Q EP SETUP FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.4,"NM",5,0)
C0Q HOS MEASURES FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.4,"NM",6,0)
C0Q MEASUREMENT REPORT FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.4,"NM","B","C0Q EP SETUP FILE #1130580001.201",4)
"BLD",7812,"KRN",.4,"NM","B","C0Q HOS MEASURES FILE #1130580001.201",5)
"BLD",7812,"KRN",.4,"NM","B","C0Q MEASUREMENT REPORT FILE #1130580001.201",6)
"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT BY PATIENT FILE #1130580001.201",1)
"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT MEASUREMENT SET FILE #1130580001.201",2)
"BLD",7812,"KRN",.4,"NM","B","C0Q PRINT QUALITY MEASURES FILE #1130580001.101",3)
"BLD",7812,"KRN",.401,0)
.401
"BLD",7812,"KRN",.402,0)
.402
"BLD",7812,"KRN",.402,"NM",0)
^9.68A^2^2
"BLD",7812,"KRN",.402,"NM",1,0)
C0Q MEASUREMENT SET DEFINE FILE #1130580001.201^1130580001.201^0
"BLD",7812,"KRN",.402,"NM",2,0)
C0Q QUALITY MEASURE DEFINITION FILE #1130580001.101^1130580001.101^0
"BLD",7812,"KRN",.402,"NM","B","C0Q MEASUREMENT SET DEFINE FILE #1130580001.201",1)
"BLD",7812,"KRN",.402,"NM","B","C0Q QUALITY MEASURE DEFINITION FILE #1130580001.101",2)
"BLD",7812,"KRN",.403,0)
.403
"BLD",7812,"KRN",.5,0)
.5
"BLD",7812,"KRN",.84,0)
.84
"BLD",7812,"KRN",3.6,0)
3.6
"BLD",7812,"KRN",3.8,0)
3.8
"BLD",7812,"KRN",9.2,0)
9.2
"BLD",7812,"KRN",9.8,0)
9.8
"BLD",7812,"KRN",9.8,"NM",0)
^9.68A^11^11
"BLD",7812,"KRN",9.8,"NM",1,0)
C0QMAIN^^0^B115162981
"BLD",7812,"KRN",9.8,"NM",2,0)
C0QGMRAD^^0^B18802718
"BLD",7812,"KRN",9.8,"NM",3,0)
C0QGMTSA^^0^B2175692
"BLD",7812,"KRN",9.8,"NM",4,0)
C0QGMTSG^^0^B29331917
"BLD",7812,"KRN",9.8,"NM",5,0)
C0QERTIM^^0^B7596326
"BLD",7812,"KRN",9.8,"NM",6,0)
C0QIMMUN^^0^B6463760
"BLD",7812,"KRN",9.8,"NM",7,0)
C0QPQRI^^0^B41579607
"BLD",7812,"KRN",9.8,"NM",8,0)
C0QPRML^^0^B51124381
"BLD",7812,"KRN",9.8,"NM",9,0)
C0QSET^^0^B8586809
"BLD",7812,"KRN",9.8,"NM",10,0)
C0QUPDT^^0^B39929946
"BLD",7812,"KRN",9.8,"NM",11,0)
C0QHF^^0^B3166240
"BLD",7812,"KRN",9.8,"NM","B","C0QERTIM",5)
"BLD",7812,"KRN",9.8,"NM","B","C0QGMRAD",2)
"BLD",7812,"KRN",9.8,"NM","B","C0QGMTSA",3)
"BLD",7812,"KRN",9.8,"NM","B","C0QGMTSG",4)
"BLD",7812,"KRN",9.8,"NM","B","C0QHF",11)
"BLD",7812,"KRN",9.8,"NM","B","C0QIMMUN",6)
"BLD",7812,"KRN",9.8,"NM","B","C0QMAIN",1)
"BLD",7812,"KRN",9.8,"NM","B","C0QPQRI",7)
"BLD",7812,"KRN",9.8,"NM","B","C0QPRML",8)
"BLD",7812,"KRN",9.8,"NM","B","C0QSET",9)
"BLD",7812,"KRN",9.8,"NM","B","C0QUPDT",10)
"BLD",7812,"KRN",19,0)
19
"BLD",7812,"KRN",19,"NM",0)
^9.68A^17^16
"BLD",7812,"KRN",19,"NM",1,0)
C0Q BY PATIENT NUMERATOR^^0
"BLD",7812,"KRN",19,"NM",2,0)
C0Q DENOMINATOR PATIENT LIST^^0
"BLD",7812,"KRN",19,"NM",3,0)
C0Q DISPLAY MEASURE SET^^0
"BLD",7812,"KRN",19,"NM",4,0)
C0Q DISPLAY QUALITY MEASURES^^0
"BLD",7812,"KRN",19,"NM",5,0)
C0Q EXPORT CCR BY MEASURE^^0
"BLD",7812,"KRN",19,"NM",6,0)
C0Q EXPORT MEASURE SET^^0
"BLD",7812,"KRN",19,"NM",7,0)
C0Q LIST MEASURE SET^^0
"BLD",7812,"KRN",19,"NM",8,0)
C0Q MEASURE SET DEFINITION^^0
"BLD",7812,"KRN",19,"NM",9,0)
C0Q QUALITY MEASURE DEFINITION^^0
"BLD",7812,"KRN",19,"NM",10,0)
C0Q QUALITY MEASUREMENT MENU^^0
"BLD",7812,"KRN",19,"NM",12,0)
C0Q COPY PATIENT LISTS^^0
"BLD",7812,"KRN",19,"NM",13,0)
C0Q PQRI MENU^^0
"BLD",7812,"KRN",19,"NM",14,0)
C0Q PRINT MEASURES^^0
"BLD",7812,"KRN",19,"NM",15,0)
C0Q UPDATE QUALITY MEASUREMENT^^0
"BLD",7812,"KRN",19,"NM",16,0)
C0Q PRINT PQRI XML^^0
"BLD",7812,"KRN",19,"NM",17,0)
C0Q UPDATE MU MEASURES^^0
"BLD",7812,"KRN",19,"NM","B","C0Q BY PATIENT NUMERATOR",1)
"BLD",7812,"KRN",19,"NM","B","C0Q COPY PATIENT LISTS",12)
"BLD",7812,"KRN",19,"NM","B","C0Q DENOMINATOR PATIENT LIST",2)
"BLD",7812,"KRN",19,"NM","B","C0Q DISPLAY MEASURE SET",3)
"BLD",7812,"KRN",19,"NM","B","C0Q DISPLAY QUALITY MEASURES",4)
"BLD",7812,"KRN",19,"NM","B","C0Q EXPORT CCR BY MEASURE",5)
"BLD",7812,"KRN",19,"NM","B","C0Q EXPORT MEASURE SET",6)
"BLD",7812,"KRN",19,"NM","B","C0Q LIST MEASURE SET",7)
"BLD",7812,"KRN",19,"NM","B","C0Q MEASURE SET DEFINITION",8)
"BLD",7812,"KRN",19,"NM","B","C0Q PQRI MENU",13)
"BLD",7812,"KRN",19,"NM","B","C0Q PRINT MEASURES",14)
"BLD",7812,"KRN",19,"NM","B","C0Q PRINT PQRI XML",16)
"BLD",7812,"KRN",19,"NM","B","C0Q QUALITY MEASURE DEFINITION",9)
"BLD",7812,"KRN",19,"NM","B","C0Q QUALITY MEASUREMENT MENU",10)
"BLD",7812,"KRN",19,"NM","B","C0Q UPDATE MU MEASURES",17)
"BLD",7812,"KRN",19,"NM","B","C0Q UPDATE QUALITY MEASUREMENT",15)
"BLD",7812,"KRN",19.1,0)
19.1
"BLD",7812,"KRN",101,0)
101
"BLD",7812,"KRN",409.61,0)
409.61
"BLD",7812,"KRN",771,0)
771
"BLD",7812,"KRN",779.2,0)
779.2
"BLD",7812,"KRN",870,0)
870
"BLD",7812,"KRN",8989.51,0)
8989.51
"BLD",7812,"KRN",8989.52,0)
8989.52
"BLD",7812,"KRN",8994,0)
8994
"BLD",7812,"KRN","B",.4,.4)
"BLD",7812,"KRN","B",.401,.401)
"BLD",7812,"KRN","B",.402,.402)
"BLD",7812,"KRN","B",.403,.403)
"BLD",7812,"KRN","B",.5,.5)
"BLD",7812,"KRN","B",.84,.84)
"BLD",7812,"KRN","B",3.6,3.6)
"BLD",7812,"KRN","B",3.8,3.8)
"BLD",7812,"KRN","B",9.2,9.2)
"BLD",7812,"KRN","B",9.8,9.8)
"BLD",7812,"KRN","B",19,19)
"BLD",7812,"KRN","B",19.1,19.1)
"BLD",7812,"KRN","B",101,101)
"BLD",7812,"KRN","B",409.61,409.61)
"BLD",7812,"KRN","B",771,771)
"BLD",7812,"KRN","B",779.2,779.2)
"BLD",7812,"KRN","B",870,870)
"BLD",7812,"KRN","B",8989.51,8989.51)
"BLD",7812,"KRN","B",8989.52,8989.52)
"BLD",7812,"KRN","B",8994,8994)
"BLD",7812,"QUES",0)
^9.62^^
"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)
"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,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^^
"FIA",1130580001.101,0,10)
"FIA",1130580001.101,0,11)
"FIA",1130580001.101,0,"RLRO")
"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,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,1130580001.301)
0
"FIA",1130580001.301,1130580001.311)
0
"FIA",1130580001.301,1130580001.3111)
0
"FIA",1130580001.301,1130580001.321)
0
"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.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
"KRN",.4,1589,-1)
0^3
"KRN",.4,1589,0)
C0Q PRINT QUALITY MEASURES^3101012.2017^@^1130580001.101^^@^3110502
"KRN",.4,1589,"F",2)
.01~.5~1~2~
"KRN",.4,1589,"H")
C0Q QUAILITY MEASURE LIST
"KRN",.4,1590,-1)
0^2
"KRN",.4,1590,0)
C0Q PRINT MEASUREMENT SET^3101012.2337^@^1130580001.201^^@^3110502
"KRN",.4,1590,"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,1590,"H")
C0Q MEASUREMENTS LIST
"KRN",.4,1591,-1)
0^1
"KRN",.4,1591,0)
C0Q PRINT BY PATIENT^3101014.2342^@^1130580001.201^^@^3101014
"KRN",.4,1591,"F",2)
.01~1,.01~1,2,.01~
"KRN",.4,1591,"H")
C0Q MEASUREMENTS LIST
"KRN",.4,1592,-1)
0^5
"KRN",.4,1592,0)
C0Q HOS MEASURES^3110430.1539^@^1130580001.201^^@^3110430
"KRN",.4,1592,"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,1592,"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,1592,"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,1592,"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,1592,"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,1592,"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,1592,"H")
C0Q MEASUREMENTS LIST
"KRN",.4,1593,-1)
0^4
"KRN",.4,1593,0)
C0Q EP SETUP^3110430.1927^@^1130580001.201^^@^3110502
"KRN",.4,1593,"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,1593,"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,1593,"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,1593,"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,1593,"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,1593,"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,1593,"H")
C0Q MEASUREMENTS LIST
"KRN",.4,1594,-1)
0^6
"KRN",.4,1594,0)
C0Q MEASUREMENT REPORT^3110512.1707^@^1130580001.201^^@^3110902
"KRN",.4,1594,"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,1594,"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,1594,"H")
C0Q MEASUREMENTS LIST
"KRN",.402,1778,-1)
0^2
"KRN",.402,1778,0)
C0Q QUALITY MEASURE DEFINITION^3101012.1927^@^1130580001.101^^@^3110809
"KRN",.402,1778,"DR",1,1130580001.101)
.01;.5;1;2;
"KRN",.402,1779,-1)
0^1
"KRN",.402,1779,0)
C0Q MEASUREMENT SET DEFINE^3101012.1929^@^1130580001.201^^@^3110621
"KRN",.402,1779,"DR",1,1130580001.201)
.01;1;
"KRN",.402,1779,"DR",2,1130580001.2011)
.01;
"KRN",19,11104,-1)
0^9
"KRN",19,11104,0)
C0Q QUALITY MEASURE DEFINITION^QUALITY MEASURE DEFINITION^^E^^^^^^^^
"KRN",19,11104,30)
C0Q(101,
"KRN",19,11104,31)
AEMQL
"KRN",19,11104,50)
C0Q(101,
"KRN",19,11104,51)
[C0Q QUALITY MEASURE DEFINITION]
"KRN",19,11104,"U")
QUALITY MEASURE DEFINITION
"KRN",19,11105,-1)
0^8
"KRN",19,11105,0)
C0Q MEASURE SET DEFINITION^MEASURE SET DEFINITION^^E^^^^^^^^
"KRN",19,11105,30)
C0Q(201,
"KRN",19,11105,31)
AEMQL
"KRN",19,11105,50)
C0Q(201,
"KRN",19,11105,51)
[C0Q MEASUREMENT SET DEFINE]
"KRN",19,11105,"U")
MEASURE SET DEFINITION
"KRN",19,11106,-1)
0^10
"KRN",19,11106,0)
C0Q QUALITY MEASUREMENT MENU^QUALITY MEASUREMENT MENU^^M^^^^^^^^
"KRN",19,11106,10,0)
^19.01IP^15^15
"KRN",19,11106,10,1,0)
11105
"KRN",19,11106,10,1,"^")
C0Q MEASURE SET DEFINITION
"KRN",19,11106,10,2,0)
11104
"KRN",19,11106,10,2,"^")
C0Q QUALITY MEASURE DEFINITION
"KRN",19,11106,10,6,0)
11110
"KRN",19,11106,10,6,"^")
C0Q BY PATIENT NUMERATOR
"KRN",19,11106,10,7,0)
11111
"KRN",19,11106,10,7,"^")
C0Q DENOMINATOR PATIENT LIST
"KRN",19,11106,10,9,0)
11113
"KRN",19,11106,10,9,"^")
C0Q COPY PATIENT LISTS
"KRN",19,11106,10,11,0)
11115
"KRN",19,11106,10,11,"^")
C0Q UPDATE QUALITY MEASUREMENT
"KRN",19,11106,10,12,0)
11116
"KRN",19,11106,10,12,"^")
C0Q PQRI MENU
"KRN",19,11106,10,13,0)
11117
"KRN",19,11106,10,13,"^")
C0Q PRINT MEASURES
"KRN",19,11106,10,14,0)
11118
"KRN",19,11106,10,14,"^")
C0Q PRINT PQRI XML
"KRN",19,11106,10,15,0)
11124
"KRN",19,11106,10,15,"^")
C0Q UPDATE MU MEASURES
"KRN",19,11106,99)
62333,41065
"KRN",19,11106,"U")
QUALITY MEASUREMENT MENU
"KRN",19,11107,-1)
0^4
"KRN",19,11107,0)
C0Q DISPLAY QUALITY MEASURES^DISPLAY QUALITY MEASURES^^P^^^^^^^^
"KRN",19,11107,60)
C0Q(101,
"KRN",19,11107,62)
0
"KRN",19,11107,63)
[C0Q PRINT QUALITY MEASURES]
"KRN",19,11107,64)
"KRN",19,11107,65)
"KRN",19,11107,66)
"KRN",19,11107,"U")
DISPLAY QUALITY MEASURES
"KRN",19,11108,-1)
0^3
"KRN",19,11108,0)
C0Q DISPLAY MEASURE SET^DISPLAY MEASURE SET^^P^^^^^^^^
"KRN",19,11108,60)
C0Q(201,
"KRN",19,11108,62)
0
"KRN",19,11108,63)
[C0Q PRINT MEASUREMENT SET]
"KRN",19,11108,64)
"KRN",19,11108,65)
"KRN",19,11108,66)
"KRN",19,11108,"U")
DISPLAY MEASURE SET
"KRN",19,11109,-1)
0^7
"KRN",19,11109,0)
C0Q LIST MEASURE SET^LIST MEASURE SET^^R^^^^^^^^
"KRN",19,11109,25)
EN^C0QMAIN
"KRN",19,11109,"U")
LIST MEASURE SET
"KRN",19,11110,-1)
0^1
"KRN",19,11110,0)
C0Q BY PATIENT NUMERATOR^BY PATIENT NUMERATOR^^R^^^^^^^^
"KRN",19,11110,25)
NBYP^C0QMAIN
"KRN",19,11110,"U")
BY PATIENT NUMERATOR
"KRN",19,11111,-1)
0^2
"KRN",19,11111,0)
C0Q DENOMINATOR PATIENT LIST^DENOMINATOR PATIENT LIST^^R^^^^^^^^
"KRN",19,11111,25)
DBYP^C0QMAIN
"KRN",19,11111,"U")
DENOMINATOR PATIENT LIST
"KRN",19,11112,-1)
0^5
"KRN",19,11112,0)
C0Q EXPORT CCR BY MEASURE^EXPORT CCR BY MEASURE^^R^^^^^^^^
"KRN",19,11112,25)
EXPORT^C0QMAIN
"KRN",19,11112,"U")
EXPORT CCR BY MEASURE
"KRN",19,11113,-1)
0^12
"KRN",19,11113,0)
C0Q COPY PATIENT LISTS^COPY OVER PATIENT LISTS^^R^^^^^^^^
"KRN",19,11113,25)
EN2^C0QMAIN
"KRN",19,11113,"U")
COPY OVER PATIENT LISTS
"KRN",19,11114,-1)
0^6
"KRN",19,11114,0)
C0Q EXPORT MEASURE SET^ALL MEASURES EXPORT^^R^^^^^^^^
"KRN",19,11114,25)
ENEXP^C0QMAIN
"KRN",19,11114,"U")
ALL MEASURES EXPORT
"KRN",19,11115,-1)
0^15
"KRN",19,11115,0)
C0Q UPDATE QUALITY MEASUREMENT^RERUN ALL CURRENT REMINDERS^^R^^^^^^^^^^^1
"KRN",19,11115,1,0)
^19.06^3^3^3110430^^
"KRN",19,11115,1,1,0)
Picks up the C0Q MEASUREMENST file entry to use from the Parameter C0Q
"KRN",19,11115,1,2,0)
MEASUREMENT TO USE, then runs and updates all associated Patient Lists and
"KRN",19,11115,1,3,0)
populates the C0Q QUALITY MEASURE and C0Q MEASUREMENTS files.
"KRN",19,11115,15)
W !,"Quality Measures Update Queued" H 2
"KRN",19,11115,25)
QUE^C0QMAIN
"KRN",19,11115,"U")
RERUN ALL CURRENT REMINDERS
"KRN",19,11116,-1)
0^13
"KRN",19,11116,0)
C0Q PQRI MENU^PQRI MENU^^M^^^^^^^^
"KRN",19,11116,10,0)
^19.01IP^3^3
"KRN",19,11116,10,1,0)
11114
"KRN",19,11116,10,1,"^")
C0Q EXPORT MEASURE SET
"KRN",19,11116,10,2,0)
11112
"KRN",19,11116,10,2,"^")
C0Q EXPORT CCR BY MEASURE
"KRN",19,11116,10,3,0)
11109
"KRN",19,11116,10,3,"^")
C0Q LIST MEASURE SET
"KRN",19,11116,99)
62333,41065
"KRN",19,11116,"U")
PQRI MENU
"KRN",19,11117,-1)
0^14
"KRN",19,11117,0)
C0Q PRINT MEASURES^PRINT C0Q MEASURES^^I^^^^^^^^
"KRN",19,11117,30)
C0Q(201,
"KRN",19,11117,31)
AEMQ
"KRN",19,11117,63)
[C0Q MEASUREMENT REPORT
"KRN",19,11117,80)
C0Q(201,
"KRN",19,11117,"U")
PRINT C0Q MEASURES
"KRN",19,11118,-1)
0^16
"KRN",19,11118,0)
C0Q PRINT PQRI XML^PQRI PRINT XML^^R^^^^^^^^
"KRN",19,11118,25)
EN^C0QPQRI
"KRN",19,11118,"U")
PQRI PRINT XML
"KRN",19,11124,-1)
0^17
"KRN",19,11124,0)
C0Q UPDATE MU MEASURES^UPDATE MU MEASURES^^R^^^^^^^^
"KRN",19,11124,25)
BUILD^C0QPRML
"KRN",19,11124,"U")
UPDATE MU MEASURES
"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
"QUES","XPF1",0)
Y
"QUES","XPF1","??")
^D REP^XPDH
"QUES","XPF1","A")
Shall I write over your |FLAG| File
"QUES","XPF1","B")
YES
"QUES","XPF1","M")
D XPF1^XPDIQ
"QUES","XPF2",0)
Y
"QUES","XPF2","??")
^D DTA^XPDH
"QUES","XPF2","A")
Want my data |FLAG| yours
"QUES","XPF2","B")
YES
"QUES","XPF2","M")
D XPF2^XPDIQ
"QUES","XPI1",0)
YO
"QUES","XPI1","??")
^D INHIBIT^XPDH
"QUES","XPI1","A")
Want KIDS to INHIBIT LOGONs during the install
"QUES","XPI1","B")
NO
"QUES","XPI1","M")
D XPI1^XPDIQ
"QUES","XPM1",0)
PO^VA(200,:EM
"QUES","XPM1","??")
^D MG^XPDH
"QUES","XPM1","A")
Enter the Coordinator for Mail Group '|FLAG|'
"QUES","XPM1","B")
"QUES","XPM1","M")
D XPM1^XPDIQ
"QUES","XPO1",0)
Y
"QUES","XPO1","??")
^D MENU^XPDH
"QUES","XPO1","A")
Want KIDS to Rebuild Menu Trees Upon Completion of Install
"QUES","XPO1","B")
NO
"QUES","XPO1","M")
D XPO1^XPDIQ
"QUES","XPZ1",0)
Y
"QUES","XPZ1","??")
^D OPT^XPDH
"QUES","XPZ1","A")
Want to DISABLE Scheduled Options, Menu Options, and Protocols
"QUES","XPZ1","B")
NO
"QUES","XPZ1","M")
D XPZ1^XPDIQ
"QUES","XPZ2",0)
Y
"QUES","XPZ2","??")
^D RTN^XPDH
"QUES","XPZ2","A")
Want to MOVE routines to other CPUs
"QUES","XPZ2","B")
NO
"QUES","XPZ2","M")
D XPZ2^XPDIQ
"RTN")
11
"RTN","C0QERTIM")
0^5^B7596326
"RTN","C0QERTIM",1,0)
C0QERTIM ; Time from admission to leaving a hospital location ;
"RTN","C0QERTIM",2,0)
;;0.1;C0Q;;;Build 19
"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)
;;4.0;Adverse Reaction Tracking;**2,10**;Mar 29, 1996;Build 19
"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)
;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 19
"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)
;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 19
"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^B3166240
"RTN","C0QHF",1,0)
C0QHF ; GPL - Health Factor Utility Routines ;9/02/11 17:05
"RTN","C0QHF",2,0)
;;0.1;C0Q;nopatch;noreleasedate;Build 19
"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 $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1
"RTN","C0QHF",40,0)
E S ZR=0
"RTN","C0QHF",41,0)
Q ZR
"RTN","C0QHF",42,0)
;
"RTN","C0QHF",43,0)
HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY
"RTN","C0QHF",44,0)
; RTN IS PASSED BY REFERENCE AND RETURNS AN ARRAY OF HEALTH FACTORS
"RTN","C0QHF",45,0)
; THAT THE PATIENT HAS IN THE CATEGORY. RETURNS NULL IF NONE
"RTN","C0QHF",46,0)
; FORMAT RNT(HEALTH FACTOR IEN,HEALTH FACTOR NAME)=""
"RTN","C0QHF",47,0)
N ZI
"RTN","C0QHF",48,0)
S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN
"RTN","C0QHF",49,0)
N C0QN,C0QO
"RTN","C0QHF",50,0)
S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS
"RTN","C0QHF",51,0)
S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY
"RTN","C0QHF",52,0)
D UNITY^C0QSET("C0QR",C0QN,C0QO) ; THE DIFFERENCE
"RTN","C0QHF",53,0)
K RTN ; CLEAR THE RETURN ARRAY
"RTN","C0QHF",54,0)
N ZJ S ZJ=""
"RTN","C0QHF",55,0)
F S ZJ=$O(C0QR(1,ZJ)) Q:ZJ="" D ; FOR ALL HEALTH FACTOR MATCHES
"RTN","C0QHF",56,0)
. S RTN(ZJ,$P(^AUTTHF(ZJ,0),"^",1))=""
"RTN","C0QHF",57,0)
Q
"RTN","C0QHF",58,0)
;
"RTN","C0QHF",59,0)
HFLCAT(RTN,C0QHFCAT) ; RETURNS A LIST OF PATIENTS WHO HAVE A HEALTH FACTOR
"RTN","C0QHF",60,0)
; IN THE C0QHFCAT CATEGORY. RTN IS PASSED BY REFERENCE
"RTN","C0QHF",61,0)
; THIS WILL BE HARD TO DO WITHOUT SOME NEW INDEXES
"RTN","C0QHF",62,0)
Q
"RTN","C0QHF",63,0)
;
"RTN","C0QHF",64,0)
HFLPAT(RTN,C0QHF) ; RETURNS A LIST OF PATIENTS WHO HAVE A SPECIFIC HEALTH
"RTN","C0QHF",65,0)
; FACTOR. RTN IS PASSED BY REFERENCE
"RTN","C0QHF",66,0)
; THIS ONE ALSO WILL BE HARD TO DO QUICKLY WITHOUT A NEW INDEX
"RTN","C0QHF",67,0)
Q
"RTN","C0QHF",68,0)
;
"RTN","C0QHF",69,0)
INDEXES(DDREF) ;PRINT THE INDEXES ACTUALLY ON FILE DDREF
"RTN","C0QHF",70,0)
; IE D INDEXES($NA(^DD))
"RTN","C0QHF",71,0)
N ZI
"RTN","C0QHF",72,0)
S ZI="A"
"RTN","C0QHF",73,0)
F S ZI=$O(@DDREF@(ZI)) Q:ZI="" W !,ZI
"RTN","C0QHF",74,0)
Q
"RTN","C0QHF",75,0)
;
"RTN","C0QIMMUN")
0^6^B6463760
"RTN","C0QIMMUN",1,0)
C0QIMMUN ;Prep Immunization Order data for HL7 Message creation ;
"RTN","C0QIMMUN",2,0)
;;0.1;C0Q;nopatch;noreleasedate;Build 19
"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","C0QMAIN")
0^1^B115162981
"RTN","C0QMAIN",1,0)
C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10 17:05
"RTN","C0QMAIN",2,0)
;;0.1;C0Q;nopatch;noreleasedate;Build 19
"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)
S C0QSUM=1
"RTN","C0QMAIN",150,0)
D C0QRPC(.G,MSIEN)
"RTN","C0QMAIN",151,0)
; iterate over the measures
"RTN","C0QMAIN",152,0)
S MEASURE=0
"RTN","C0QMAIN",153,0)
F S MEASURE=$O(^C0Q(201,MSIEN,5,MEASURE)) Q:MEASURE'>0 D
"RTN","C0QMAIN",154,0)
. S NUMER=0,DENOM=0
"RTN","C0QMAIN",155,0)
. ; now count the numerator patients
"RTN","C0QMAIN",156,0)
. S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,1,P)) Q:P'>0 S NUMER=NUMER+1
"RTN","C0QMAIN",157,0)
. S $P(^C0Q(201,MSIEN,5,MEASURE,2),U)=NUMER
"RTN","C0QMAIN",158,0)
. ; and count the denominator patients
"RTN","C0QMAIN",159,0)
. S P=0 F S P=$O(^C0Q(201,MSIEN,5,MEASURE,3,P)) Q:P'>0 S DENOM=DENOM+1
"RTN","C0QMAIN",160,0)
. Q:DENOM=0
"RTN","C0QMAIN",161,0)
. ; and stuff the values
"RTN","C0QMAIN",162,0)
. S $P(^C0Q(201,MSIEN,5,MEASURE,4),U,1,2)=DENOM_U_$J(100*NUMER/DENOM,0,0)
"RTN","C0QMAIN",163,0)
. Q
"RTN","C0QMAIN",164,0)
Q
"RTN","C0QMAIN",165,0)
;
"RTN","C0QMAIN",166,0)
C0QRPC(RTN,MSET,FMT,NOPURGE) ; RPC FORMAT
"RTN","C0QMAIN",167,0)
; MSET IS THE NAME OR IEN OF THE MEASURE SET
"RTN","C0QMAIN",168,0)
; RTN IS THE RETURN ARRAY OF THE RESULTS PASSED BY REFERENCE
"RTN","C0QMAIN",169,0)
; FMT IS THE FORMAT OF THE OUTPUT - "ARRAY" OR "HTML" OR "XML"
"RTN","C0QMAIN",170,0)
; NOTE: ARRAY IS DEFAULT AND THE OTHERS ARE NOT IMPLEMENTED YET
"RTN","C0QMAIN",171,0)
; IF NOPURGE IS 1, PATIENT LISTS WILL NOT BE DELETED BEFORE ADDING
"RTN","C0QMAIN",172,0)
; IF NOPURGE IS 0 OR OMITTED, PATIENT LISTS WILL BE DELETED THEN ADDED
"RTN","C0QMAIN",173,0)
;W !,"LOOKING FOR MEASURE SET ",MSET,!
"RTN","C0QMAIN",174,0)
N ZI S ZI=""
"RTN","C0QMAIN",175,0)
N C0QM ; FOR HOLDING THE MEASURES IN THE SET
"RTN","C0QMAIN",176,0)
D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES
"RTN","C0QMAIN",177,0)
D DELIST("C0QM")
"RTN","C0QMAIN",178,0)
N ZII S ZII=0
"RTN","C0QMAIN",179,0)
F S ZII=$O(C0QM(ZII)) Q:+ZII=0 D ; FOR EACH MEASURE
"RTN","C0QMAIN",180,0)
. D CLEARMEA(MSET,ZII) ; FIRST CLEAR OUT THE MEASURE
"RTN","C0QMAIN",181,0)
K C0QM
"RTN","C0QMAIN",182,0)
D CLEAN^DILF
"RTN","C0QMAIN",183,0)
D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES AGAIN
"RTN","C0QMAIN",184,0)
D DELIST("C0QM")
"RTN","C0QMAIN",185,0)
F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE
"RTN","C0QMAIN",186,0)
. S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
"RTN","C0QMAIN",187,0)
. ;W $$GET1^DIQ($$C0QQFN,ZI_",","DISPLAY NAME"),!
"RTN","C0QMAIN",188,0)
. ;N C0QNL,C0QDL ;NUMERATOR AND DENOMINATOR LIST POINTERS
"RTN","C0QMAIN",189,0)
. ;W !,"MEASURE: ",$$GET1^DIQ($$C0QQFN,ZI_",",.01),! ; PRINT THE MEASURE NAME
"RTN","C0QMAIN",190,0)
. ; FOLLOW THE POINTERS TO THE C0Q QUALITYM MEASURE FILE AND GET LIST PTRS
"RTN","C0QMAIN",191,0)
. S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
"RTN","C0QMAIN",192,0)
. I C0QNL="" D ; CHECK ALTERNATE LIST
"RTN","C0QMAIN",193,0)
. . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER
"RTN","C0QMAIN",194,0)
. . I C0QNL'="" S C0QNALT=1
"RTN","C0QMAIN",195,0)
. S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER
"RTN","C0QMAIN",196,0)
. I C0QDL="" D ; CHECK ALTERNATE LIST
"RTN","C0QMAIN",197,0)
. . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER
"RTN","C0QMAIN",198,0)
. . I C0QDL'="" S C0QDALT=1
"RTN","C0QMAIN",199,0)
. ; NOW FOLLOW THE LIST POINTERS TO THE REMINDER PATIENT LIST FILE
"RTN","C0QMAIN",200,0)
. ;W "NUMERATOR: ",$$GET1^DIQ($$RLSTFN,C0QNL_",","NAME"),!
"RTN","C0QMAIN",201,0)
. ; FIRST PROCESS THE NUMERATOR
"RTN","C0QMAIN",202,0)
. K ^TMP("DILIST",$J)
"RTN","C0QMAIN",203,0)
. N C0QUFN ; FILE NUMBER TO USE
"RTN","C0QMAIN",204,0)
. I $G(C0QNALT)=1 S C0QUFN=$$C0QALFN()
"RTN","C0QMAIN",205,0)
. E S C0QUFN=$$RLSTPFN
"RTN","C0QMAIN",206,0)
. D LIST^DIC(C0QUFN,","_C0QNL_",",".01I") ; GET THE LIST OF PATIENTS
"RTN","C0QMAIN",207,0)
. ;D DELIST("G") ;
"RTN","C0QMAIN",208,0)
. ;I $D(G) ZWR G
"RTN","C0QMAIN",209,0)
. K C0QNUMP
"RTN","C0QMAIN",210,0)
. S NCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; NUMERATOR COUNT
"RTN","C0QMAIN",211,0)
. N ZJ S ZJ=""
"RTN","C0QMAIN",212,0)
. F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ;
"RTN","C0QMAIN",213,0)
. . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01)
"RTN","C0QMAIN",214,0)
. . S C0QNUMP("N",ZJ,ZDFN)=""
"RTN","C0QMAIN",215,0)
. ;I '$G(C0QSUM) ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES
"RTN","C0QMAIN",216,0)
. D ADDPATS(MSET,ZII,"C0QNUMP")
"RTN","C0QMAIN",217,0)
. ; NEXT PROCESS THE DENOMINATOR
"RTN","C0QMAIN",218,0)
. ;W "DENOMINATOR: ",$$GET1^DIQ($$RLSTFN,C0QDL_",","NAME"),!
"RTN","C0QMAIN",219,0)
. K ^TMP("DILIST",$J)
"RTN","C0QMAIN",220,0)
. I $G(C0QDALT)=1 S C0QUFN=$$C0QALFN()
"RTN","C0QMAIN",221,0)
. E S C0QUFN=$$RLSTPFN
"RTN","C0QMAIN",222,0)
. D LIST^DIC(C0QUFN,","_C0QDL_",",".01I") ; GET THE LIST OF PATIENTS
"RTN","C0QMAIN",223,0)
. ;D DELIST("G")
"RTN","C0QMAIN",224,0)
. ;I $D(G) ZWR G
"RTN","C0QMAIN",225,0)
. ;S ZJ=""
"RTN","C0QMAIN",226,0)
. S DCNT=$O(^TMP("DILIST",$J,"ID",""),-1) ; DENOMONIATOR COUNT
"RTN","C0QMAIN",227,0)
. K C0QDEMP
"RTN","C0QMAIN",228,0)
. F S ZJ=$O(^TMP("DILIST",$J,"ID",ZJ)) Q:ZJ="" D ;
"RTN","C0QMAIN",229,0)
. . S ZDFN=^TMP("DILIST",$J,"ID",ZJ,.01)
"RTN","C0QMAIN",230,0)
. . S C0QDEMP("D",ZJ,ZDFN)=""
"RTN","C0QMAIN",231,0)
. D ADDPATS(MSET,ZII,"C0QDEMP")
"RTN","C0QMAIN",232,0)
. ;I $G(C0QSUM)'=1 ZWR ^TMP("DILIST",$J,1,*) ; LIST THE PATIENT NAMES
"RTN","C0QMAIN",233,0)
. ;E D ;
"RTN","C0QMAIN",234,0)
. ;. W "NUM CNT: ",NCNT
"RTN","C0QMAIN",235,0)
. ;. W " DEN CNT: ",DCNT,!
"RTN","C0QMAIN",236,0)
Q
"RTN","C0QMAIN",237,0)
;
"RTN","C0QMAIN",238,0)
CLEARMEA(MSET,MEAS) ; DELETE AND THEN RECREATE AS EMPTY THE
"RTN","C0QMAIN",239,0)
; MEASURE MEAS IN MEASURE SET IEN MSET
"RTN","C0QMAIN",240,0)
;
"RTN","C0QMAIN",241,0)
N C0QFDA,MFN,MEASURE
"RTN","C0QMAIN",242,0)
S MFN=$$C0QMMFN() ; FILE NUMBER FOR MEASURE SUBFILE
"RTN","C0QMAIN",243,0)
D CLEAN^DILF
"RTN","C0QMAIN",244,0)
S MEASURE=$$GET1^DIQ(MFN,MEAS_","_MSET_",",.01,"I") ; MEASURE POINTER
"RTN","C0QMAIN",245,0)
D CLEAN^DILF
"RTN","C0QMAIN",246,0)
K ZERR
"RTN","C0QMAIN",247,0)
S C0QFDA(MFN,MEAS_","_MSET_",",.01)="@" ; GET READY TO DELETE THE MEASURE
"RTN","C0QMAIN",248,0)
D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE
"RTN","C0QMAIN",249,0)
I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
"RTN","C0QMAIN",250,0)
;. W "ERROR",!
"RTN","C0QMAIN",251,0)
;. ZWR ZERR
"RTN","C0QMAIN",252,0)
;. B
"RTN","C0QMAIN",253,0)
K C0QFDA
"RTN","C0QMAIN",254,0)
S C0QFDA(MFN,"+1,"_MSET_",",.01)=MEASURE ; GET READY TO RECREATE THE SUBFILE
"RTN","C0QMAIN",255,0)
D UPDIE ; CREATE THE SUBFILE
"RTN","C0QMAIN",256,0)
Q
"RTN","C0QMAIN",257,0)
;
"RTN","C0QMAIN",258,0)
ADDPATS(MSET,MEAS,PATS) ;ADD PATIENTS TO NUMERATOR AND DENOMINATOR
"RTN","C0QMAIN",259,0)
; OF MEASURE SET IEN MSET MEASURE IEN MEAS
"RTN","C0QMAIN",260,0)
; PATS IS OF THE FORM @PATS@("N",X,DFN)="" AND @PATS@("D",X,DFN)=""
"RTN","C0QMAIN",261,0)
; WHERE N IS FOR NUMERATOR AND D IS FOR DENOMINATOR AND X 1..N
"RTN","C0QMAIN",262,0)
; IF PATIENTS ARE ALREADY THERE, THEY WILL NOT BE ADDED AGAIN
"RTN","C0QMAIN",263,0)
N C0QI,C0QJ
"RTN","C0QMAIN",264,0)
N C0QFDA
"RTN","C0QMAIN",265,0)
S C0QI=""
"RTN","C0QMAIN",266,0)
F S C0QI=$O(@PATS@("N",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT
"RTN","C0QMAIN",267,0)
. S C0QFDA($$C0QMMNFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("N",C0QI,""))
"RTN","C0QMAIN",268,0)
;W "ADDING NUMERATOR",!
"RTN","C0QMAIN",269,0)
;I $D(C0QFDA) ZWR C0QFDA
"RTN","C0QMAIN",270,0)
I $D(C0QFDA) D UPDIE
"RTN","C0QMAIN",271,0)
K C0QFDA
"RTN","C0QMAIN",272,0)
S C0QI=""
"RTN","C0QMAIN",273,0)
F S C0QI=$O(@PATS@("D",C0QI)) Q:C0QI="" D ; FOR EACH NUMERATOR PATIENT
"RTN","C0QMAIN",274,0)
. S C0QFDA($$C0QMMDFN,"?+"_C0QI_","_MEAS_","_MSET_",",.01)=$O(@PATS@("D",C0QI,""))
"RTN","C0QMAIN",275,0)
;W "ADDING DENOMINATOR",!
"RTN","C0QMAIN",276,0)
;I $D(C0QFDA) ZWR C0QFDA
"RTN","C0QMAIN",277,0)
I $D(C0QFDA) D UPDIE
"RTN","C0QMAIN",278,0)
Q
"RTN","C0QMAIN",279,0)
;
"RTN","C0QMAIN",280,0)
DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO
"RTN","C0QMAIN",281,0)
; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
"RTN","C0QMAIN",282,0)
N ZI,IV,EV,ZDI,ZIEN
"RTN","C0QMAIN",283,0)
S ZI=""
"RTN","C0QMAIN",284,0)
S ZDI=$NA(^TMP("DILIST",$J))
"RTN","C0QMAIN",285,0)
K @RTN
"RTN","C0QMAIN",286,0)
F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ;
"RTN","C0QMAIN",287,0)
. S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
"RTN","C0QMAIN",288,0)
. S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE
"RTN","C0QMAIN",289,0)
. S ZIEN=@ZDI@(2,ZI) ; IEN
"RTN","C0QMAIN",290,0)
. S @RTN@(ZIEN)=IV_"^"_EV
"RTN","C0QMAIN",291,0)
Q
"RTN","C0QMAIN",292,0)
;
"RTN","C0QMAIN",293,0)
DELPATS(MSET,MEAS,NDEL) ; DELETE PATIENTS FROM NUMERATOR AND DENOMINATOR
"RTN","C0QMAIN",294,0)
; FOR A MEASURE (ONLY AFFECTS THE C0Q MEASURES FILE)
"RTN","C0QMAIN",295,0)
; MSET IS THE IEN OF THE MEASURE SET
"RTN","C0QMAIN",296,0)
; MEAS IS THE IEN OF THE MEASURE
"RTN","C0QMAIN",297,0)
; NDEL IS A LIST OF PATIENTS TO NOT DELETE (NOT IMPLEMENTED YET)
"RTN","C0QMAIN",298,0)
; IN THE FORM @NDEL@("N",IEN,DFN)="" FOR NUMERATOR PATIENTS
"RTN","C0QMAIN",299,0)
; AND @NDEL@("D",IEN,DFN)="" FOR DENOMINATOR PATIENTS WHERE IEN IS
"RTN","C0QMAIN",300,0)
; THE IEN OF THE PATIENT RECORD IN THE SUBFILE
"RTN","C0QMAIN",301,0)
; THIS FEATURE WILL ALLOW EFFICIENCIES FOR LONG PATIENT LISTS
"RTN","C0QMAIN",302,0)
; IN THAT PATIENTS THAT ARE GOING TO BE ADDED ARE NOT FIRST DELETED
"RTN","C0QMAIN",303,0)
N C0QI,C0QJ
"RTN","C0QMAIN",304,0)
D LIST^DIC($$C0QMMFN,","_MSET_",")
"RTN","C0QMAIN",305,0)
K C0QFDA
"RTN","C0QMAIN",306,0)
;ZWR ^TMP("DILIST",$J,*)
"RTN","C0QMAIN",307,0)
;ZWR ^TMP("DIERR",$J,*)
"RTN","C0QMAIN",308,0)
;D
"RTN","C0QMAIN",309,0)
Q
"RTN","C0QMAIN",310,0)
;
"RTN","C0QMAIN",311,0)
UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
"RTN","C0QMAIN",312,0)
K ZERR
"RTN","C0QMAIN",313,0)
D CLEAN^DILF
"RTN","C0QMAIN",314,0)
D UPDATE^DIE("","C0QFDA","","ZERR")
"RTN","C0QMAIN",315,0)
I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
"RTN","C0QMAIN",316,0)
;. W "ERROR",!
"RTN","C0QMAIN",317,0)
;. ZWR ZERR
"RTN","C0QMAIN",318,0)
;. B
"RTN","C0QMAIN",319,0)
K C0QFDA
"RTN","C0QMAIN",320,0)
Q
"RTN","C0QMAIN",321,0)
;
"RTN","C0QMAIN",322,0)
QUE ;QUE THE RUN OF THE PATIENT LISTS AND THE BUILD THE LISTS OF THE PATIENTS
"RTN","C0QMAIN",323,0)
;AND THEIR MEASURES
"RTN","C0QMAIN",324,0)
S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE")
"RTN","C0QMAIN",325,0)
N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
"RTN","C0QMAIN",326,0)
S ZTDESC="CREATE PATIENT LIST"
"RTN","C0QMAIN",327,0)
S ZTRTN="RUN^C0QMAIN"
"RTN","C0QMAIN",328,0)
S ZTSAVE("MSIEN")=""
"RTN","C0QMAIN",329,0)
S ZTIO=""
"RTN","C0QMAIN",330,0)
S ZTDTH=$$NOW^XLFDT
"RTN","C0QMAIN",331,0)
D ^%ZTLOAD
"RTN","C0QMAIN",332,0)
Q
"RTN","C0QMAIN",333,0)
;
"RTN","C0QMAIN",334,0)
RUN ; DO THE REAL WORK
"RTN","C0QMAIN",335,0)
I '$D(MSIEN) S MSIEN=$$GET^XPAR("DIV."_$P($$SITE^VASITE(),U,2),"C0Q MEASUREMENT TO USE")
"RTN","C0QMAIN",336,0)
S BEG=$P(^C0Q(201,MSIEN,4),U,3) ;Begin date
"RTN","C0QMAIN",337,0)
S END=$P(^C0Q(201,MSIEN,4),U,4) ;End date
"RTN","C0QMAIN",338,0)
S PATCREAT="N" ;Secure list - N=No
"RTN","C0QMAIN",339,0)
S PLISTPUG="N" ;Purge list after 5 years - N=No
"RTN","C0QMAIN",340,0)
S PXRMDPAT=0 ;Include deceased patients - N=No
"RTN","C0QMAIN",341,0)
S PXRMTPAT=0 ;Include test patients - N=No
"RTN","C0QMAIN",342,0)
S PXRMNODE="PXRMRULE" ;Node in ^TMP($J,"PXRMRULE"
"RTN","C0QMAIN",343,0)
N ZI S ZI=""
"RTN","C0QMAIN",344,0)
F S ZI=$O(^C0Q(201,MSIEN,5,"B",ZI)) Q:ZI'>0 D ; LOOP THROUGH EACH QM
"RTN","C0QMAIN",345,0)
. S PXRMLSTN=+$P(^C0Q(101,ZI,0),U,2) ; NUMERATOR MEASURE
"RTN","C0QMAIN",346,0)
. S PXRMLSTD=+$P(^C0Q(101,ZI,0),U,3) ; DENOMINATOR MEASURE
"RTN","C0QMAIN",347,0)
. S PXRMRULN=+$P(^PXRMXP(810.5,PXRMLSTN,0),U,6) ; RULES FOR THE LIST
"RTN","C0QMAIN",348,0)
. S PXRMRULD=+$P(^PXRMXP(810.5,PXRMLSTD,0),U,6)
"RTN","C0QMAIN",349,0)
. D RUN^PXRMLCR(PXRMRULD,PXRMLSTD,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT)
"RTN","C0QMAIN",350,0)
. D RUN^PXRMLCR(PXRMRULN,PXRMLSTN,PXRMNODE,BEG,END,PXRMDPAT,PXRMTPAT)
"RTN","C0QMAIN",351,0)
D C0QRPC(.G,MSIEN)
"RTN","C0QMAIN",352,0)
Q
"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)
;;0.1;C0C;nopatch;noreleasedate;Build 19
"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^B51124381
"RTN","C0QPRML",1,0)
C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm
"RTN","C0QPRML",2,0)
;;1.0;MU PACKAGE;;;Build 19
"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)
Q
"RTN","C0QPRML",46,0)
;
"RTN","C0QPRML",47,0)
ALL ;retrieve active inpatients
"RTN","C0QPRML",48,0)
N WARD S WARD=""
"RTN","C0QPRML",49,0)
F D Q:WARD=""
"RTN","C0QPRML",50,0)
. S WARD=$O(^DIC(42,"B",WARD)) ;ward name
"RTN","C0QPRML",51,0)
. Q:WARD=""
"RTN","C0QPRML",52,0)
. N WIEN S WIEN=""
"RTN","C0QPRML",53,0)
. F S WIEN=$O(^DIC(42,"B",WARD,WIEN)) Q:'WIEN D ;wards IEN
"RTN","C0QPRML",54,0)
. . S WARDNAME=$P(^DIC(42,WIEN,0),U,2) ;ward name
"RTN","C0QPRML",55,0)
. . N DFN,RB S DFN=""
"RTN","C0QPRML",56,0)
. . F S DFN=$O(^DPT("CN",WARD,+DFN)) Q:'DFN D ;DFN of patient on ward
"RTN","C0QPRML",57,0)
. . . D DEMO
"RTN","C0QPRML",58,0)
. . . D PROBLEM
"RTN","C0QPRML",59,0)
. . . D ALLERGY
"RTN","C0QPRML",60,0)
. . . D MEDS
"RTN","C0QPRML",61,0)
. . . D SMOKING
"RTN","C0QPRML",62,0)
. . . D VITALS
"RTN","C0QPRML",63,0)
. . . I C0QPR D PRINT
"RTN","C0QPRML",64,0)
. . . I C0QSS D SS
"RTN","C0QPRML",65,0)
. . . I C0QPL D PATLIST
"RTN","C0QPRML",66,0)
Q
"RTN","C0QPRML",67,0)
;
"RTN","C0QPRML",68,0)
DEMO ; patient demographics
"RTN","C0QPRML",69,0)
S PTNAME=$P(^DPT(DFN,0),U) ;patient name
"RTN","C0QPRML",70,0)
S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth
"RTN","C0QPRML",71,0)
S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex
"RTN","C0QPRML",72,0)
D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility
"RTN","C0QPRML",73,0)
S PTHRN=$P($G(VA("PID")),U) ;health record number
"RTN","C0QPRML",74,0)
S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file
"RTN","C0QPRML",75,0)
I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl
"RTN","C0QPRML",76,0)
S RACE=""
"RTN","C0QPRML",77,0)
F D Q:RACE=""
"RTN","C0QPRML",78,0)
. S RACE=$O(^DPT(DFN,.02,"B",RACE)) ;race code IEN
"RTN","C0QPRML",79,0)
. Q:'RACE
"RTN","C0QPRML",80,0)
. S RACEDSC=$P($G(^DIC(10,RACE,0)),U) ;race description
"RTN","C0QPRML",81,0)
S ETHN=""
"RTN","C0QPRML",82,0)
F D Q:ETHN=""
"RTN","C0QPRML",83,0)
. S ETHN=$O(^DPT(DFN,.06,"B",ETHN)) ;ethnicity IEN
"RTN","C0QPRML",84,0)
. Q:'ETHN
"RTN","C0QPRML",85,0)
. S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description
"RTN","C0QPRML",86,0)
S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed
"RTN","C0QPRML",87,0)
Q
"RTN","C0QPRML",88,0)
;
"RTN","C0QPRML",89,0)
PROBLEM ; PATIENT PROBLEMS
"RTN","C0QPRML",90,0)
D LIST^ORQQPL(.PROBL,DFN,"A")
"RTN","C0QPRML",91,0)
S PBCNT=""
"RTN","C0QPRML",92,0)
F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D
"RTN","C0QPRML",93,0)
. S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description
"RTN","C0QPRML",94,0)
K PROBL
"RTN","C0QPRML",95,0)
Q
"RTN","C0QPRML",96,0)
;
"RTN","C0QPRML",97,0)
ALLERGY ; ALLERGY LIST
"RTN","C0QPRML",98,0)
D LIST^ORQQAL(.ALRGYL,DFN)
"RTN","C0QPRML",99,0)
S ALCNT=""
"RTN","C0QPRML",100,0)
F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D
"RTN","C0QPRML",101,0)
. S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description
"RTN","C0QPRML",102,0)
K ALRGYL
"RTN","C0QPRML",103,0)
Q
"RTN","C0QPRML",104,0)
;
"RTN","C0QPRML",105,0)
MEDS ; MEDICATIONS
"RTN","C0QPRML",106,0)
;
"RTN","C0QPRML",107,0)
I DFN=97 D Q ;
"RTN","C0QPRML",108,0)
. S MDCNT=271
"RTN","C0QPRML",109,0)
K MEDSL
"RTN","C0QPRML",110,0)
D EN^C0CNHIN(.MEDSL,DFN,"MED;") ; GET THE MEDS FROM THE NHIN API
"RTN","C0QPRML",111,0)
; can't use COVER^ORWPS even though it's fast.. we need to detect
"RTN","C0QPRML",112,0)
; if the medications are Inpatient to compute the CPOE measure
"RTN","C0QPRML",113,0)
; we will use the NHINV routines for this purpose
"RTN","C0QPRML",114,0)
;D COVER^ORWPS(.MEDSL,DFN)
"RTN","C0QPRML",115,0)
S MDCNT="" S HASINP=0
"RTN","C0QPRML",116,0)
F S MDCNT=$O(MEDSL("med",MDCNT)) Q:MDCNT="" D
"RTN","C0QPRML",117,0)
. ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only
"RTN","C0QPRML",118,0)
. Q:MEDSL("med",MDCNT,"status@value")'="active"
"RTN","C0QPRML",119,0)
. ;S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
"RTN","C0QPRML",120,0)
. S MDDESC=$G(MEDSL("med",MDCNT,"products.product@name"))
"RTN","C0QPRML",121,0)
. ;S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
"RTN","C0QPRML",122,0)
. S MDITEM=$G(MEDSL("med",MDCNT,"sig")) ; i think this is what meditem is
"RTN","C0QPRML",123,0)
. I MEDSL("med",MDCNT,"vaType@value")="I" S HASINP=1
"RTN","C0QPRML",124,0)
I HASINP D ; THE PATIENT HAS AN INPATIENT MED
"RTN","C0QPRML",125,0)
. S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE
"RTN","C0QPRML",126,0)
E S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient
"RTN","C0QPRML",127,0)
K MEDSL
"RTN","C0QPRML",128,0)
Q
"RTN","C0QPRML",129,0)
;
"RTN","C0QPRML",130,0)
SMOKING ;
"RTN","C0QPRML",131,0)
N C0QSMOKE
"RTN","C0QPRML",132,0)
D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE
"RTN","C0QPRML",133,0)
; PATIENT IN THE CATEGORY OF TOBACCO
"RTN","C0QPRML",134,0)
I $D(C0QSMOKE) S C0QLIST("HasSmokingStatus",DFN)=""
"RTN","C0QPRML",135,0)
E S C0QLIST("NoSmokingStatus",DFN)=""
"RTN","C0QPRML",136,0)
Q
"RTN","C0QPRML",137,0)
;
"RTN","C0QPRML",138,0)
VITALS ;
"RTN","C0QPRML",139,0)
;
"RTN","C0QPRML",140,0)
N C0QSDT,C0QEDT
"RTN","C0QPRML",141,0)
D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE
"RTN","C0QPRML",142,0)
D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY
"RTN","C0QPRML",143,0)
D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS
"RTN","C0QPRML",144,0)
I $D(VITRSLT) D ;ZWR VITRSLT B ;
"RTN","C0QPRML",145,0)
. I VITRSLT(1)["No vitals found." S C0QLIST("NoVitalSigns",DFN)=""
"RTN","C0QPRML",146,0)
. E S C0QLIST("HasVitalSigns",DFN)=""
"RTN","C0QPRML",147,0)
Q
"RTN","C0QPRML",148,0)
;
"RTN","C0QPRML",149,0)
PRINT ; PRINT TO SCREEN
"RTN","C0QPRML",150,0)
"RTN","C0QPRML",151,0)
I $D(WARD) W !!,WARD_"-"_WARDNAME_" "_RB_": "_PTNAME_"("_PTSEX_") "
"RTN","C0QPRML",152,0)
I $D(EXDTE) D ;
"RTN","C0QPRML",153,0)
. W !,"Discharge Date: ",EXDTE
"RTN","C0QPRML",154,0)
. W !,DFN," ",PTNAME
"RTN","C0QPRML",155,0)
W !,"DOB: ",PTDOB," HRN: ",PTHRN
"RTN","C0QPRML",156,0)
W !,"Language Spoken: ",$G(PTLANG)
"RTN","C0QPRML",157,0)
W !,"Race: ",RACEDSC
"RTN","C0QPRML",158,0)
W !,"Ethnicity: ",$G(ETHNDSC)
"RTN","C0QPRML",159,0)
W !,"Problems: "
"RTN","C0QPRML",160,0)
W !,PBDESC
"RTN","C0QPRML",161,0)
W !,"Allergies: "
"RTN","C0QPRML",162,0)
W !,ALDESC
"RTN","C0QPRML",163,0)
W !,"Medications: "
"RTN","C0QPRML",164,0)
W !
"RTN","C0QPRML",165,0)
Q
"RTN","C0QPRML",166,0)
;
"RTN","C0QPRML",167,0)
SS ; CREATE SPREADSHEET ARRAY
"RTN","C0QPRML",168,0)
S G1("Patient")=DFN
"RTN","C0QPRML",169,0)
I $D(WARD) D ;
"RTN","C0QPRML",170,0)
. S G1("WardName")=WARDNAME
"RTN","C0QPRML",171,0)
. S G1("RoomAndBed")=RB
"RTN","C0QPRML",172,0)
I $D(EXDTE) D ;
"RTN","C0QPRML",173,0)
. S G1("DischargeDate")=EXDTE
"RTN","C0QPRML",174,0)
S G1("PatientName")=PTNAME
"RTN","C0QPRML",175,0)
S G1("Gender")=PTSEX
"RTN","C0QPRML",176,0)
S G1("DateOfBirth")=PTDOB
"RTN","C0QPRML",177,0)
S G1("HealthRecordNumber")=PTHRN
"RTN","C0QPRML",178,0)
S G1("LanguageSpoken")=$G(PTLANG)
"RTN","C0QPRML",179,0)
S G1("Race")=RACEDSC
"RTN","C0QPRML",180,0)
S G1("Ehtnicity")=$G(ETHNDSC)
"RTN","C0QPRML",181,0)
S G1("Problem")=PBDESC
"RTN","C0QPRML",182,0)
I PBDESC["No problems found" S G1("HasProblem")=0
"RTN","C0QPRML",183,0)
E S G1("HasProblem")=1
"RTN","C0QPRML",184,0)
S G1("Allergies")=ALDESC
"RTN","C0QPRML",185,0)
I ALDESC["No Allergy" S G1("HasAllergy")=0
"RTN","C0QPRML",186,0)
E S G1("HasAllergy")=1
"RTN","C0QPRML",187,0)
I $D(MDITEM) D ;
"RTN","C0QPRML",188,0)
. S G1("HasMed")=1
"RTN","C0QPRML",189,0)
E S G1("HasMed")=0
"RTN","C0QPRML",190,0)
S G1("MedDescription")=$G(MDDESC)
"RTN","C0QPRML",191,0)
I $D(MDITEM) W !,"("_MDITEM_")"_MDDESC E W !,MDDESC
"RTN","C0QPRML",192,0)
D RNF1TO2B^C0CRNF("GRSLT","G1")
"RTN","C0QPRML",193,0)
K G1
"RTN","C0QPRML",194,0)
Q ; DON'T WANT TO DO THE NHIN STUFF NOW
"RTN","C0QPRML",195,0)
;
"RTN","C0QPRML",196,0)
PATLIST ; CREATE PATIENT LISTS
"RTN","C0QPRML",197,0)
S C0QLIST("Patient",DFN)="" ; THE PATIENT LIST
"RTN","C0QPRML",198,0)
N DEMOYN S DEMOYN=1
"RTN","C0QPRML",199,0)
I $G(PTSEX)="" S DEMOYN=0
"RTN","C0QPRML",200,0)
I $G(PTDOB)="" S DEMOYN=0
"RTN","C0QPRML",201,0)
I $G(PTHRN)="" S DEMOYN=0
"RTN","C0QPRML",202,0)
I $G(PTLANG)="" S DEMOYN=0
"RTN","C0QPRML",203,0)
I $G(RACEDSC)="" S DEMOYN=0
"RTN","C0QPRML",204,0)
I $G(ETHNDSC)="" S DEMOYN=0
"RTN","C0QPRML",205,0)
I DEMOYN S C0QLIST("HasDemographics",DFN)=""
"RTN","C0QPRML",206,0)
E S C0QLIST("FailedDemographics",DFN)=""
"RTN","C0QPRML",207,0)
;S G1("Gender")=PTSEX
"RTN","C0QPRML",208,0)
;S G1("DateOfBirth")=PTDOB
"RTN","C0QPRML",209,0)
;S G1("HealthRecordNumber")=PTHRN
"RTN","C0QPRML",210,0)
;S G1("LanguageSpoken")=$G(PTLANG)
"RTN","C0QPRML",211,0)
;S G1("Race")=RACEDSC
"RTN","C0QPRML",212,0)
;S G1("Ehtnicity")=$G(ETHNDSC)
"RTN","C0QPRML",213,0)
S G1("Problem")=PBDESC
"RTN","C0QPRML",214,0)
I PBDESC["No problems found" S C0QLIST("NoProblem",DFN)=""
"RTN","C0QPRML",215,0)
E S C0QLIST("HasProblem",DFN)=""
"RTN","C0QPRML",216,0)
;S G1("Allergies")=ALDESC
"RTN","C0QPRML",217,0)
I ALDESC["No Allergy" S C0QLIST("NoAllergy",DFN)=""
"RTN","C0QPRML",218,0)
E S C0QLIST("HasAllergy",DFN)=""
"RTN","C0QPRML",219,0)
I $D(MDITEM) D ;
"RTN","C0QPRML",220,0)
. S C0QLIST("HasMed",DFN)=""
"RTN","C0QPRML",221,0)
E S G1("NoMed",DFN)=""
"RTN","C0QPRML",222,0)
;S G1("MedDescription")=$G(MDDESC)
"RTN","C0QPRML",223,0)
Q
"RTN","C0QPRML",224,0)
;
"RTN","C0QPRML",225,0)
NHIN ; SHOW THE NHIN ARRAY FOR THIS PATIENT
"RTN","C0QPRML",226,0)
Q:DFN=137!14
"RTN","C0QPRML",227,0)
D EN^C0CNHIN(.G,DFN,"")
"RTN","C0QPRML",228,0)
ZWR G
"RTN","C0QPRML",229,0)
K G
"RTN","C0QPRML",230,0)
;
"RTN","C0QPRML",231,0)
QUIT ;end of WARD
"RTN","C0QPRML",232,0)
;
"RTN","C0QPRML",233,0)
;
"RTN","C0QPRML",234,0)
DIS;
"RTN","C0QPRML",235,0)
N DFN,DTE,EXDTE S DTE=""
"RTN","C0QPRML",236,0)
F D Q:DTE=""
"RTN","C0QPRML",237,0)
. S DTE=$O(^DGPM("B",DTE))
"RTN","C0QPRML",238,0)
. Q:'DTE
"RTN","C0QPRML",239,0)
. Q:DTE<3110703
"RTN","C0QPRML",240,0)
. S EXDTE=$$FMTE^XLFDT(DTE)
"RTN","C0QPRML",241,0)
. N PTFM S PTFM=""
"RTN","C0QPRML",242,0)
. D
"RTN","C0QPRML",243,0)
. . S PTFM=$O(^DGPM("B",DTE,PTFM))
"RTN","C0QPRML",244,0)
. . Q:'PTFM
"RTN","C0QPRML",245,0)
. . S DFN=$P(^DGPM(PTFM,0),U,3)
"RTN","C0QPRML",246,0)
. . D DEMO
"RTN","C0QPRML",247,0)
. . D PROBLEM
"RTN","C0QPRML",248,0)
. . D ALLERGY
"RTN","C0QPRML",249,0)
. . D MEDS
"RTN","C0QPRML",250,0)
. . D SMOKING
"RTN","C0QPRML",251,0)
. . D VITALS
"RTN","C0QPRML",252,0)
. . I C0QPR D PRINT
"RTN","C0QPRML",253,0)
. . I C0QSS D SS
"RTN","C0QPRML",254,0)
. . I C0QPL D PATLIST
"RTN","C0QPRML",255,0)
Q
"RTN","C0QPRML",256,0)
;
"RTN","C0QPRML",257,0)
C0QPLF() Q 1130580001.301 ; FILE NUMBER FOR C0Q PATIENT LIST FILE
"RTN","C0QPRML",258,0)
C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE
"RTN","C0QPRML",259,0)
FILE ; FILE THE PATIENT LISTS TO C0Q PATIENT LIST
"RTN","C0QPRML",260,0)
;
"RTN","C0QPRML",261,0)
I '$D(C0QLIST) Q ;
"RTN","C0QPRML",262,0)
N LFN S LFN=$$C0QALFN()
"RTN","C0QPRML",263,0)
N ZI,ZN
"RTN","C0QPRML",264,0)
S ZI=""
"RTN","C0QPRML",265,0)
F S ZI=$O(C0QLIST(ZI)) Q:ZI="" D ;
"RTN","C0QPRML",266,0)
. S ZN=$O(^C0Q(301,"CATTR",ZI,""))
"RTN","C0QPRML",267,0)
. I ZN="" D Q ; OOPS
"RTN","C0QPRML",268,0)
. . W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI
"RTN","C0QPRML",269,0)
. ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN
"RTN","C0QPRML",270,0)
. N C0QNEW,C0QOLD,C0QRSLT
"RTN","C0QPRML",271,0)
. S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST
"RTN","C0QPRML",272,0)
. S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST
"RTN","C0QPRML",273,0)
. D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW
"RTN","C0QPRML",274,0)
. N ZJ,ZK
"RTN","C0QPRML",275,0)
. ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST
"RTN","C0QPRML",276,0)
. K C0QFDA
"RTN","C0QPRML",277,0)
. S ZJ=""
"RTN","C0QPRML",278,0)
. F S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ="" D ; MARKED WITH A 2 FROM UNITY
"RTN","C0QPRML",279,0)
. . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE
"RTN","C0QPRML",280,0)
. . I ZK="" D Q ; OOPS SHOULDN'T HAPPEN
"RTN","C0QPRML",281,0)
. . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE"
"RTN","C0QPRML",282,0)
. . . B
"RTN","C0QPRML",283,0)
. . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@"
"RTN","C0QPRML",284,0)
. I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS
"RTN","C0QPRML",285,0)
. ; SECOND, PROCESS THE ADDITIONS
"RTN","C0QPRML",286,0)
. K C0QFDA
"RTN","C0QPRML",287,0)
. S ZJ="" S ZK=1
"RTN","C0QPRML",288,0)
. F S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ="" D ; PATIENTS TO ADD ARE MARKED WITH 0
"RTN","C0QPRML",289,0)
. . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ
"RTN","C0QPRML",290,0)
. . S ZK=ZK+1
"RTN","C0QPRML",291,0)
. I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS
"RTN","C0QPRML",292,0)
;. Q
"RTN","C0QPRML",293,0)
;. K C0QFDA
"RTN","C0QPRML",294,0)
;. N ZJ,ZC
"RTN","C0QPRML",295,0)
;. S ZJ="" S ZC=1
"RTN","C0QPRML",296,0)
;. F S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ="" D ; FOR EACH PAT IN LIST
"RTN","C0QPRML",297,0)
;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ
"RTN","C0QPRML",298,0)
;. . S ZC=ZC+1
"RTN","C0QPRML",299,0)
;. D UPDIE
"RTN","C0QPRML",300,0)
;. W !,"FOUND:"_ZI
"RTN","C0QPRML",301,0)
Q
"RTN","C0QPRML",302,0)
;
"RTN","C0QPRML",303,0)
KLNCR(ZREC) ; KILL AND RECREATE RECORD ZREC IN PATIENT LIST FILE
"RTN","C0QPRML",304,0)
;
"RTN","C0QPRML",305,0)
N C0QFDA,ZFN,LIST,ATTR
"RTN","C0QPRML",306,0)
S ZFN=$$C0QPLF() ; FILE NUMBER FOR C0Q PATIENT LIST FILE
"RTN","C0QPRML",307,0)
D CLEAN^DILF
"RTN","C0QPRML",308,0)
S LIST=$$GET1^DIQ(ZFN,ZREC_",",.01) ; MEASURE NAME
"RTN","C0QPRML",309,0)
S ATTR=$$GET1^DIQ(ZFN,ZREC_",",999) ; ATTRIBUTE
"RTN","C0QPRML",310,0)
D CLEAN^DILF
"RTN","C0QPRML",311,0)
K ZERR
"RTN","C0QPRML",312,0)
S C0QFDA(ZFN,ZREC_",",.01)="@" ; GET READY TO DELETE THE MEASURE
"RTN","C0QPRML",313,0)
D FILE^DIE(,"C0QFDA","ZERR") ; KILL THE SUBFILE
"RTN","C0QPRML",314,0)
I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
"RTN","C0QPRML",315,0)
;. W "ERROR",!
"RTN","C0QPRML",316,0)
;. ZWR ZERR
"RTN","C0QPRML",317,0)
;. B
"RTN","C0QPRML",318,0)
K C0QFDA
"RTN","C0QPRML",319,0)
S C0QFDA(ZFN,"+1,",.01)=LIST ; GET READY TO RECREATE THE RECORD
"RTN","C0QPRML",320,0)
S C0QFDA(ZFN,"+1,",999)=ATTR ; ATTRIBUTE
"RTN","C0QPRML",321,0)
D UPDIE ; CREATE THE SUBFILE
"RTN","C0QPRML",322,0)
N ZR ; NEW IEN FOR THE RECORD
"RTN","C0QPRML",323,0)
S ZR=$O(^C0Q(301,"CATTR",ATTR,""))
"RTN","C0QPRML",324,0)
;
"RTN","C0QPRML",325,0)
Q ZR
"RTN","C0QPRML",326,0)
;
"RTN","C0QPRML",327,0)
UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
"RTN","C0QPRML",328,0)
K ZERR
"RTN","C0QPRML",329,0)
D CLEAN^DILF
"RTN","C0QPRML",330,0)
D UPDATE^DIE("","C0QFDA","","ZERR")
"RTN","C0QPRML",331,0)
I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
"RTN","C0QPRML",332,0)
;. W "ERROR",!
"RTN","C0QPRML",333,0)
;. ZWR ZERR
"RTN","C0QPRML",334,0)
;. B
"RTN","C0QPRML",335,0)
K C0QFDA
"RTN","C0QPRML",336,0)
Q
"RTN","C0QPRML",337,0)
;
"RTN","C0QPRML",338,0)
; WHAT FOLLOWS IS OLD CODE - DELETE WHEN THIS WORKS
"RTN","C0QPRML",339,0)
;. . N PTNAME S PTNAME=$P(^DPT(DFN,0),U,1)
"RTN","C0QPRML",340,0)
;. . S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth
"RTN","C0QPRML",341,0)
;. . S PTSEX=$P($G(^DPT(DFN,0)),U,2) ;patient sex
"RTN","C0QPRML",342,0)
;. . D PID^VADPT ;VADPT call to grab PISD based on PT Eligibility
"RTN","C0QPRML",343,0)
;. . S PTHRN=$P($G(VA("PID")),U) ;health record number
"RTN","C0QPRML",344,0)
;. . S PTRLANG=$P($G(^DPT(DFN,256000)),U) ;ptr to language file
"RTN","C0QPRML",345,0)
;. . I $G(PTRLANG)'="" S PTLANG=$P(^DI(.85,PTRLANG,0),U) ;PLS extrnl
"RTN","C0QPRML",346,0)
;. . S RACE=""
"RTN","C0QPRML",347,0)
;. . F D Q:RACE=""
"RTN","C0QPRML",348,0)
;. . . S RACE=$O(^DPT(DFN,.02,"B",RACE))
"RTN","C0QPRML",349,0)
;. . . Q:'RACE
"RTN","C0QPRML",350,0)
;. . . S RACEDSC=$P($G(^DIC(10,RACE,0)),U)
"RTN","C0QPRML",351,0)
;. . N ETHNDSC
"RTN","C0QPRML",352,0)
;. . N ETHNDSC S ETHNDSC=""
"RTN","C0QPRML",353,0)
;. . S ETHN=""
"RTN","C0QPRML",354,0)
;. . F D Q:ETHN=""
"RTN","C0QPRML",355,0)
;. . . S ETHN=$O(^DPT(DFN,.06,"B",ETHN))
"RTN","C0QPRML",356,0)
;. . . Q:'ETHN
"RTN","C0QPRML",357,0)
;. . . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U)
"RTN","C0QPRML",358,0)
;. . D LIST^ORQQPL(.PROBL,DFN,"A")
"RTN","C0QPRML",359,0)
;. . S PBCNT=""
"RTN","C0QPRML",360,0)
;. . F S PBCNT=$O(PROBL(PBCNT)) Q:PBCNT="" D
"RTN","C0QPRML",361,0)
;. . . S PBDESC=$P(PROBL(PBCNT),U,2) ;problem description
"RTN","C0QPRML",362,0)
;. . K PROBL
"RTN","C0QPRML",363,0)
;. . D LIST^ORQQAL(.ALRGYL,DFN)
"RTN","C0QPRML",364,0)
;. . S ALCNT=""
"RTN","C0QPRML",365,0)
;. . F S ALCNT=$O(ALRGYL(ALCNT)) Q:ALCNT="" D
"RTN","C0QPRML",366,0)
;. . . S ALDESC=$P(ALRGYL(ALCNT),U,2) ;allergy description
"RTN","C0QPRML",367,0)
;. . K ALRGYL
"RTN","C0QPRML",368,0)
;. . D COVER^ORWPS(.MEDSL,DFN)
"RTN","C0QPRML",369,0)
;. . S MDCNT=""
"RTN","C0QPRML",370,0)
;. . F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D
"RTN","C0QPRML",371,0)
;. . . Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only
"RTN","C0QPRML",372,0)
;. . . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
"RTN","C0QPRML",373,0)
;. . . S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
"RTN","C0QPRML",374,0)
;. . K MEDSL
"RTN","C0QPRML",375,0)
;. . W !,"Discharge Date: ",EXDTE
"RTN","C0QPRML",376,0)
;. . W !,DFN," ",PTNAME
"RTN","C0QPRML",377,0)
;. . W !,"DOB: ",PTDOB," HRN: ",PTHRN
"RTN","C0QPRML",378,0)
;. . W !,"Language Spoken: ",$G(PTLANG)
"RTN","C0QPRML",379,0)
;. . W !,"Race: ",RACEDSC
"RTN","C0QPRML",380,0)
;. . W !,"Ethnicity: ",ETHNDSC
"RTN","C0QPRML",381,0)
;. . W !,"Problems: "
"RTN","C0QPRML",382,0)
;. . W !,PBDESC
"RTN","C0QPRML",383,0)
;. . W !,"Allergies: "
"RTN","C0QPRML",384,0)
;. . W !,ALDESC
"RTN","C0QPRML",385,0)
;. . W !,"Medications: "
"RTN","C0QPRML",386,0)
;. . I $D(MDITEM) W !,"(",MDITEM,")",MDDESC E W !,MDDESC
"RTN","C0QPRML",387,0)
;. . W !
"RTN","C0QPRML",388,0)
;Q
"RTN","C0QPRML",389,0)
;
"RTN","C0QPRML",390,0)
;
"RTN","C0QPRML",391,0)
;
"RTN","C0QPRML",392,0)
;
"RTN","C0QPRML",393,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;MU PACKAGE;;;Build 19
"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^B39929946
"RTN","C0QUPDT",1,0)
C0QUPDT ; GPL - Quality Reporting List Update Routines ;8/29/11 17:05
"RTN","C0QUPDT",2,0)
;;0.1;C0Q;nopatch;noreleasedate;Build 19
"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)
C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ;
"RTN","C0QUPDT",30,0)
;
"RTN","C0QUPDT",31,0)
UPDATE(RNT,MSET) ; UPDATE A MEASURE SET BY ADDING NEW ENTRIES TO PATIENT
"RTN","C0QUPDT",32,0)
; LISTS AND DELETING ENTRIES THAT ARE NO LONGER VALID. ALSO UPDATE
"RTN","C0QUPDT",33,0)
; NUMERATOR AND DENOMINATOR COUNTS
"RTN","C0QUPDT",34,0)
; MAKES HEAVY USE OF UNITY^C0QSET TO DETERMINE WHAT TO ADD AND DELETE
"RTN","C0QUPDT",35,0)
;
"RTN","C0QUPDT",36,0)
; THIS IS A REPLACEMENT FOR C0QRPC^C0QMAIN WHICH DELETES THE PATIENT
"RTN","C0QUPDT",37,0)
; LISTS AND RECREATES THEM, WHICH IS A LOT OF UNNECESSARY PROCESSING
"RTN","C0QUPDT",38,0)
;
"RTN","C0QUPDT",39,0)
N ZI S ZI=""
"RTN","C0QUPDT",40,0)
N C0QM ; FOR HOLDING THE MEASURES IN THE SET
"RTN","C0QUPDT",41,0)
D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES
"RTN","C0QUPDT",42,0)
D DELIST("C0QM")
"RTN","C0QUPDT",43,0)
N ZII S ZII=""
"RTN","C0QUPDT",44,0)
F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE
"RTN","C0QUPDT",45,0)
. S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
"RTN","C0QUPDT",46,0)
. S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
"RTN","C0QUPDT",47,0)
. I C0QNL="" D ; CHECK ALTERNATE LIST
"RTN","C0QUPDT",48,0)
. . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1.1,"I") ; NUMERATOR POINTER
"RTN","C0QUPDT",49,0)
. . I C0QNL'="" S C0QNALT=1
"RTN","C0QUPDT",50,0)
. S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2,"I") ; DENOMINATOR POINTER
"RTN","C0QUPDT",51,0)
. I C0QDL="" D ; CHECK ALTERNATE LIST
"RTN","C0QUPDT",52,0)
. . S C0QDL=$$GET1^DIQ($$C0QQFN,ZI_",",2.1,"I") ; DENOMINATOR POINTER
"RTN","C0QUPDT",53,0)
. . I C0QDL'="" S C0QDALT=1
"RTN","C0QUPDT",54,0)
. ;
"RTN","C0QUPDT",55,0)
. ; FIRST PROCESS THE NUMERATOR
"RTN","C0QUPDT",56,0)
. ;
"RTN","C0QUPDT",57,0)
. N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
"RTN","C0QUPDT",58,0)
. I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
"RTN","C0QUPDT",59,0)
. . S C0QNEW=$NA(^C0Q(301,C0QNL,1,"B")) ; B INDEX FOR THIS LIST
"RTN","C0QUPDT",60,0)
. E D ; USE THE REMINDER PACKAGE PATIENT LISTS
"RTN","C0QUPDT",61,0)
. . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS
"RTN","C0QUPDT",62,0)
. N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
"RTN","C0QUPDT",63,0)
. S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET
"RTN","C0QUPDT",64,0)
. N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
"RTN","C0QUPDT",65,0)
. D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
"RTN","C0QUPDT",66,0)
. N C0QCNT
"RTN","C0QUPDT",67,0)
. S C0QNCNT=$G(C0QRSLT("COUNT"))
"RTN","C0QUPDT",68,0)
. I C0QNCNT="" D ;
"RTN","C0QUPDT",69,0)
. . S C0QNCNT=0 ; DEFAULT COUNT IS ZERO
"RTN","C0QUPDT",70,0)
. . N GZZ S GZZ=""
"RTN","C0QUPDT",71,0)
. . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
"RTN","C0QUPDT",72,0)
. . . S C0QNCNT=C0QNCNT+1
"RTN","C0QUPDT",73,0)
. . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
"RTN","C0QUPDT",74,0)
. . . S C0QNCNT=C0QNCNT+1
"RTN","C0QUPDT",75,0)
. K C0QFDA ; CLEAR THE FDA
"RTN","C0QUPDT",76,0)
. N C0QONCNT ; OLD COUNT
"RTN","C0QUPDT",77,0)
. S C0QONCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",1.1)
"RTN","C0QUPDT",78,0)
. I C0QNCNT'=C0QONCNT D ; COUNT HAS CHANGED
"RTN","C0QUPDT",79,0)
. . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",1.1)=C0QNCNT ; NUMERATOR COUNT
"RTN","C0QUPDT",80,0)
. . D UPDIE ; UPDATE THE NUMERATOR COUNT
"RTN","C0QUPDT",81,0)
. I $D(C0QRSLT) D ;B ;
"RTN","C0QUPDT",82,0)
. . ;ZWR C0QRSLT
"RTN","C0QUPDT",83,0)
. ; FIRST PROCESS DELETIONS
"RTN","C0QUPDT",84,0)
. K C0QFDA ; CLEAR OUT THE FDA
"RTN","C0QUPDT",85,0)
. N ZG,ZIEN S ZG=""
"RTN","C0QUPDT",86,0)
. F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
"RTN","C0QUPDT",87,0)
. . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
"RTN","C0QUPDT",88,0)
. . I ZIEN="" D Q ; OOPS
"RTN","C0QUPDT",89,0)
. . . W !,"ERROR DELETING ENTRY!! ",ZG
"RTN","C0QUPDT",90,0)
. . S C0QFDA($$C0QMMNFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
"RTN","C0QUPDT",91,0)
. I $D(C0QFDA) D UPDIE ; PROCESS
"RTN","C0QUPDT",92,0)
. ; SECOND, PROCESS ADDITIONS
"RTN","C0QUPDT",93,0)
. K C0QFDA ; CLEAR OUT THE FDA
"RTN","C0QUPDT",94,0)
. N ZG,ZC S ZG="" S ZC=1
"RTN","C0QUPDT",95,0)
. F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
"RTN","C0QUPDT",96,0)
. . S C0QFDA($$C0QMMNFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
"RTN","C0QUPDT",97,0)
. . S ZC=ZC+1
"RTN","C0QUPDT",98,0)
. I $D(C0QFDA) D UPDIE ; PROCESS
"RTN","C0QUPDT",99,0)
. ;
"RTN","C0QUPDT",100,0)
. ; PROCESS THE DENOMINATOR
"RTN","C0QUPDT",101,0)
. ;
"RTN","C0QUPDT",102,0)
. N C0QNEW ; REFERENCE TO NEW NUMBERATOR LIST B INDEX
"RTN","C0QUPDT",103,0)
. I $G(C0QNALT)=1 D ; USING ALTERNATE LIST FOR NUMERATOR
"RTN","C0QUPDT",104,0)
. . S C0QNEW=$NA(^C0Q(301,C0QDL,1,"B")) ; B INDEX FOR THIS LIST
"RTN","C0QUPDT",105,0)
. E D ; USE THE REMINDER PACKAGE PATIENT LISTS
"RTN","C0QUPDT",106,0)
. . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS
"RTN","C0QUPDT",107,0)
. N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
"RTN","C0QUPDT",108,0)
. S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET
"RTN","C0QUPDT",109,0)
. N C0QRSLT ; ARRAY FOR THE UNITY DIFFERENCES
"RTN","C0QUPDT",110,0)
. D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND THE DIFFERENCES
"RTN","C0QUPDT",111,0)
. N C0QDCNT
"RTN","C0QUPDT",112,0)
. S C0QDCNT=$G(C0QRSLT("COUNT"))
"RTN","C0QUPDT",113,0)
. I C0QDCNT="" D ;
"RTN","C0QUPDT",114,0)
. . S C0QDCNT=0 ; DEFAULT COUNT IS ZERO
"RTN","C0QUPDT",115,0)
. . N GZZ S GZZ=""
"RTN","C0QUPDT",116,0)
. . F S GZZ=$O(C0QRSLT(0,GZZ)) Q:GZZ="" D ; EVERY ADD ENTRY
"RTN","C0QUPDT",117,0)
. . . S C0QDCNT=C0QDCNT+1
"RTN","C0QUPDT",118,0)
. . F S GZZ=$O(C0QRSLT(1,GZZ)) Q:GZZ="" D ; EVERY EQUAL ENTRY
"RTN","C0QUPDT",119,0)
. . . S C0QDCNT=C0QDCNT+1
"RTN","C0QUPDT",120,0)
. K C0QFDA ; CLEAR THE FDA
"RTN","C0QUPDT",121,0)
. N C0QODCNT ; OLD COUNT
"RTN","C0QUPDT",122,0)
. S C0QODCNT=$$GET1^DIQ($$C0QMMFN(),ZII_","_MSET_",",2.1)
"RTN","C0QUPDT",123,0)
. I C0QDCNT'=C0QODCNT D ; COUNT HAS CHANGED
"RTN","C0QUPDT",124,0)
. . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",2.1)=C0QDCNT ; DENOMINATOR COUNT
"RTN","C0QUPDT",125,0)
. . D UPDIE ; UPDATE THE DENOMINATOR COUNT
"RTN","C0QUPDT",126,0)
. I $D(C0QRSLT) D ;B ;
"RTN","C0QUPDT",127,0)
. . ;ZWR C0QRSLT
"RTN","C0QUPDT",128,0)
. I '$D(C0QRSLT) Q ; NO RESULTS TO USE
"RTN","C0QUPDT",129,0)
. ; FIRST PROCESS DELETIONS
"RTN","C0QUPDT",130,0)
. K C0QFDA ; CLEAR OUT THE FDA
"RTN","C0QUPDT",131,0)
. N ZG,ZIEN S ZG=""
"RTN","C0QUPDT",132,0)
. F S ZG=$O(C0QRSLT(2,ZG)) Q:ZG="" D ; FOR EACH DELETION
"RTN","C0QUPDT",133,0)
. . S ZIEN=$O(@C0QOLD@(ZG,"")) ; IEN OF THE ENTRY
"RTN","C0QUPDT",134,0)
. . I ZIEN="" D Q ; OOPS
"RTN","C0QUPDT",135,0)
. . . W !,"ERROR DELETING ENTRY!! ",ZG
"RTN","C0QUPDT",136,0)
. . S C0QFDA($$C0QMMDFN(),ZIEN_","_ZII_","_MSET_",",.01)="@" ; DELETE
"RTN","C0QUPDT",137,0)
. I $D(C0QFDA) D UPDIE ; PROCESS
"RTN","C0QUPDT",138,0)
. ; SECOND, PROCESS ADDITIONS
"RTN","C0QUPDT",139,0)
. K C0QFDA ; CLEAR OUT THE FDA
"RTN","C0QUPDT",140,0)
. N ZG,ZC S ZG="" S ZC=1
"RTN","C0QUPDT",141,0)
. F S ZG=$O(C0QRSLT(0,ZG)) Q:ZG="" D ; FOR EACH ADDITION
"RTN","C0QUPDT",142,0)
. . S C0QFDA($$C0QMMDFN(),"+"_ZC_","_ZII_","_MSET_",",.01)=ZG ; ADD THE ENTRY
"RTN","C0QUPDT",143,0)
. . S ZC=ZC+1
"RTN","C0QUPDT",144,0)
. I $D(C0QFDA) D UPDIE ; PROCESS
"RTN","C0QUPDT",145,0)
. N C0QPCT ; PERCENT
"RTN","C0QUPDT",146,0)
. I C0QDCNT>0 D ;
"RTN","C0QUPDT",147,0)
. . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0)
"RTN","C0QUPDT",148,0)
. . K C0QFDA
"RTN","C0QUPDT",149,0)
. . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT
"RTN","C0QUPDT",150,0)
. . D UPDIE
"RTN","C0QUPDT",151,0)
Q
"RTN","C0QUPDT",152,0)
;
"RTN","C0QUPDT",153,0)
DELIST(RTN) ; DECODES ^TMP("DILIST",$J) INTO
"RTN","C0QUPDT",154,0)
; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
"RTN","C0QUPDT",155,0)
; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE
"RTN","C0QUPDT",156,0)
N ZI,IV,EV,ZDI,ZIEN
"RTN","C0QUPDT",157,0)
S ZI=""
"RTN","C0QUPDT",158,0)
S ZDI=$NA(^TMP("DILIST",$J))
"RTN","C0QUPDT",159,0)
K @RTN
"RTN","C0QUPDT",160,0)
F S ZI=$O(@ZDI@(1,ZI)) Q:ZI="" D ;
"RTN","C0QUPDT",161,0)
. S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
"RTN","C0QUPDT",162,0)
. S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE
"RTN","C0QUPDT",163,0)
. S ZIEN=@ZDI@(2,ZI) ; IEN
"RTN","C0QUPDT",164,0)
. S @RTN@(ZIEN)=IV_"^"_EV
"RTN","C0QUPDT",165,0)
. ;S @RTN@("B",IV,ZIEN)=EV
"RTN","C0QUPDT",166,0)
Q
"RTN","C0QUPDT",167,0)
;
"RTN","C0QUPDT",168,0)
UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
"RTN","C0QUPDT",169,0)
K ZERR
"RTN","C0QUPDT",170,0)
D CLEAN^DILF
"RTN","C0QUPDT",171,0)
ZWR C0QFDA
"RTN","C0QUPDT",172,0)
D UPDATE^DIE("","C0QFDA","","ZERR")
"RTN","C0QUPDT",173,0)
I $D(ZERR) S ZZERR=ZZERR ; ZZERR DOESN'T EXIST, INVOKE THE ERROR TRAP IF TASKED
"RTN","C0QUPDT",174,0)
;. W "ERROR",!
"RTN","C0QUPDT",175,0)
;. ZWR ZERR
"RTN","C0QUPDT",176,0)
;. B
"RTN","C0QUPDT",177,0)
K C0QFDA
"RTN","C0QUPDT",178,0)
Q
"RTN","C0QUPDT",179,0)
;
"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")
@
"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,.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^^1.51^14
"^DD",1130580001.101,1130580001.101,0,"DDA")
N
"^DD",1130580001.101,1130580001.101,0,"DT")
3110809
"^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,.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^^.2^7
"^DD",1130580001.201,1130580001.201,0,"DDA")
N
"^DD",1130580001.201,1130580001.201,0,"DT")
3110621
"^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,.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,1,0)
MEASURE^1130580001.2011P^^5;0
"^DD",1130580001.201,1130580001.2011,0)
MEASURE SUB-FIELD^^3^6
"^DD",1130580001.201,1130580001.2011,0,"DT")
3110621
"^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,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,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^^999^8
"^DD",1130580001.301,1130580001.301,0,"DDA")
N
"^DD",1130580001.301,1130580001.301,0,"DT")
3110805
"^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,.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,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
"^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)
**END**
**END**