- Timestamp:
- Jan 4, 2012, 4:37:42 PM (13 years ago)
- Location:
- qrda/C0Q/trunk
- Files:
-
- 5 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
qrda/C0Q/trunk/p/C0QERTIM.m
r1232 r1335 1 1 C0QERTIM ; Time from admission to leaving a hospital location ; 2 ;;0.1;C0Q;;;Build 192 ;;0.1;C0Q;;;Build 23 3 3 EN ;Get Location 4 4 S DIC=42,DIC(0)="AEMQ" D ^DIC I Y<1 G EXIT -
qrda/C0Q/trunk/p/C0QGMRAD.m
r1232 r1335 1 1 C0QGMRAD ;HIRMFO/RM,WAA-UTILITY TO GATHER PATIENT DATA ;1/15/98 13:47 2 ;;4.0;Adverse Reaction Tracking;**2,10**;Mar 29, 1996;Build 192 ;;4.0;Adverse Reaction Tracking;**2,10**;Mar 29, 1996;Build 23 3 3 EN1 ; ENTRY TO GATHER PATIENT A/AR DATA 4 4 ;INPUT VARIABLES: -
qrda/C0Q/trunk/p/C0QGMTSA.m
r1232 r1335 1 1 C0QGMTSA ; SLC/DLT,KER - Brief Adverse Reaction/Allergy ; 02/27/2002 2 ;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 192 ;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 23 3 3 ; 4 4 ; External References -
qrda/C0Q/trunk/p/C0QGMTSG.m
r1232 r1335 1 1 C0QGMTSG ; SLC/DLT,KER - Allergies ; 01/06/2003 2 ;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 192 ;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 23 3 3 ; 4 4 ; External References -
qrda/C0Q/trunk/p/C0QHF.m
r1232 r1335 1 1 C0QHF ; GPL - Health Factor Utility Routines ;9/02/11 17:05 2 ;;0.1;C0Q;nopatch;noreleasedate;Build 192 ;;0.1;C0Q;nopatch;noreleasedate;Build 23 3 3 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU 4 4 ;General Public License See attached copy of the License. … … 37 37 N ZI,ZJ,ZR 38 38 S ZI=$O(^AUTTHF("B",C0QHF,"")) ; HEALTH FACTOR IEN 39 I ZI="" D Q 0 ; 40 . W !,"BAD HEALTH FACTOR: ",C0QHF 39 41 I $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1 40 42 E S ZR=0 41 43 Q ZR 44 ; 45 HFIEN(ZHF) ; EXTRINSIC RETURNS THE IEN OF THE HEALTHFACTOR 46 N ZI 47 S ZI=$O(^AUTTHF("B",ZHF,"")) ; HEALTH FACTOR IEN 48 Q ZI 49 ; 50 VHFIEN(DFN,ZHF) ; EXTRINSIC RETURNS THE LAST IEN OF THIS HEALTH FACTOR 51 ; FOR THE PATIENT 52 N ZG,ZJ,ZK 53 S ZG=$$HFIEN(ZHF) 54 I ZG="" Q ; OPPS HEALTH FACTOR NOT FOUND 55 S ZJ=$O(^AUPNVHF("AA",DFN,ZG,""),-1) ;DATE 56 S ZK=$O(^AUPNVHF("AA",DFN,ZG,ZJ,"")) ;IEN 57 Q ZK 42 58 ; 43 59 HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY … … 47 63 N ZI 48 64 S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN 49 N C0QN,C0QO 65 N C0QN,C0QO,C0QR 50 66 S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS 51 67 S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY -
qrda/C0Q/trunk/p/C0QIMMUN.m
r1232 r1335 1 1 C0QIMMUN ;Prep Immunization Order data for HL7 Message creation ; 2 ;;0.1;C0Q;nopatch;noreleasedate;Build 192 ;;0.1;C0Q;nopatch;noreleasedate;Build 23 3 3 ; ^XTMP("C0QIMMUN",0)=purge date^create date 4 4 ; ^XTMP("C0QIMMUN",order_date,order#,item_name)=item_value -
qrda/C0Q/trunk/p/C0QMAIN.m
r1232 r1335 1 1 C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10 17:05 2 ;;0.1;C0Q;nopatch;noreleasedate;Build 192 ;;0.1;C0Q;nopatch;noreleasedate;Build 23 3 3 ;Copyright 2009 George Lilly. Licensed under the terms of the GNU 4 4 ;General Public License See attached copy of the License. … … 27 27 RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE 28 28 RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE 29 C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE 29 C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ; 30 30 EXPORT ; EXPORT ENTRY POINT FOR CCR 31 31 ; Select a patient. … … 139 139 N MSIEN S MSIEN=+Y 140 140 ;D C0QRPC(.G,MSIEN) 141 141 D UPDATE^C0QUPDT(.G,MSIEN) 142 142 Q 143 143 ; … … 147 147 I Y<1 Q ; EXIT 148 148 N MSIEN S MSIEN=+Y 149 ; changed by gpl to call the new UPDATE^C0QUPDT routine instead 150 D UPDATE^C0QUPDT(.G,MSIEN) 151 Q 152 ; end gpl change 149 153 S C0QSUM=1 150 154 D C0QRPC(.G,MSIEN) -
qrda/C0Q/trunk/p/C0QPQRI.m
r1232 r1335 1 1 C0QPQRI ; GPL - GENERATES A PQRI XML FILE ;6/14/11 17:05 2 ;;0.1;C0C;nopatch;noreleasedate;Build 192 ;;0.1;C0C;nopatch;noreleasedate;Build 23 3 3 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU 4 4 ;General Public License See attached copy of the License. -
qrda/C0Q/trunk/p/C0QPRML.m
r1232 r1335 1 1 C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm 2 ;;1.0;MU PACKAGE;;;Build 192 ;;1.0;MU PACKAGE;;;Build 23 3 3 ; 4 4 ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU … … 43 43 . D FILE ; FILE THE PATIENT LISTS 44 44 . D UPDATE^C0QUPDT(.G,8) ; UPDATE THE MU MEASUREMENT SET 45 . D UPDATE^C0QUPDT(.G,9) ; UPDATE THE MU MEASUREMENT SET 45 46 Q 46 47 ; … … 58 59 . . . D PROBLEM 59 60 . . . D ALLERGY 60 . . . D MEDS 61 . . . D MEDS4 62 . . . D RECON2 63 . . . D ADVDIR 61 64 . . . D SMOKING 62 65 . . . D VITALS 66 . . . D VTE1 67 . . . D EDTIME 63 68 . . . I C0QPR D PRINT 64 69 . . . I C0QSS D SS … … 67 72 ; 68 73 DEMO ; patient demographics 74 K PTDOB 75 N PTNAME,PTSEX,PTHRN,PTRLANG,PTLANG,RACE,RACEDSC,ETHN,ETHNDSC,RB 69 76 S PTNAME=$P(^DPT(DFN,0),U) ;patient name 70 77 S PTDOB=$$FMTE^XLFDT($P($G(^DPT(DFN,0)),U,3)) ;date of birth … … 85 92 . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description 86 93 S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed 94 N DEMOYN S DEMOYN=1 95 I $G(PTSEX)="" S DEMOYN=0 96 I $G(PTDOB)="" S DEMOYN=0 97 I $G(PTHRN)="" S DEMOYN=0 98 I $G(PTLANG)="" S DEMOYN=0 99 I $G(RACEDSC)="" S DEMOYN=0 100 I $G(ETHNDSC)="" S DEMOYN=0 101 I DEMOYN S C0QLIST("HasDemographics",DFN)="" 102 E S C0QLIST("FailedDemographics",DFN)="" 87 103 Q 88 104 ; … … 128 144 Q 129 145 ; 130 SMOKING ; 131 N C0QSMOKE 146 MEDS2 ; MEDICATIONS 147 ; 148 K MEDSL,MDDESC,MDITEM 149 D COVER^ORWPS(.MEDSL,DFN) ; CPRS MED LIST 150 I '$D(MEDSL) D ; 151 . S C0QLIST("NoMedOrders",DFN)="" 152 . I $$HFYN^C0QHF(DFN,"MEDS HAVE BEEN REVIEWED") D ; 153 . . S C0QLIST("HasMed",DFN)="" 154 . E S C0QLIST("NoMed",DFN)="" 155 S MDCNT="" S HASINP=0 156 F S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT="" D ; 157 . ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE" ;active medications only 158 . ;S C0QLIST("HasMedOrders",DFN)="" 159 . S C0QLIST("HasMed",DFN)="" 160 . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description 161 . S MDITEM=$P($G(MEDSL(MDCNT)),U,3) 162 . I $P($P(MEDSL(MDCNT),"^",1),";",2)="I" S HASINP=1 163 I HASINP D ; THE PATIENT HAS AN INPATIENT MED 164 . S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE 165 E S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient 166 K MEDSL 167 Q 168 ; 169 MEDS3 ; USE THE REMINDER INDEX ^PXRMINDX TO CHECK FOR MEDS 170 ; 171 S C0QPXRM=$NA(^PXRMINDX(55,"PI")) ; REMINDER INDEX FOR DRUGS 172 I $D(@C0QPXRM@(DFN)) D ; HAS MEDS 173 . S C0QLIST("HasMed",DFN)="" 174 . S C0QLIST("HasMedOrders",DFN)="" 175 E D ; NO MEDS 176 . S C0QLIST("NoMed",DFN)="" 177 . S C0QLIST("NoMedOrders",DFN)="" 178 Q 179 ; 180 MEDS4 ; USE OCL^PSOORRL TO GET ALL MEDS 181 N BEG,END 182 S BEG=$$DT^C0PCUR("JULY 3,2011") 183 S END=$$DT^C0PCUR("NOW") 184 D OCL^PSOORRL(DFN,BEG,END) ;DBIA #2400 185 N C0QMEDS 186 M C0QMEDS=^TMP("PS",$J) ; MEDS RETURNED FROM CALL 187 N FOUND 188 N ZI 189 I '$D(C0QMEDS(1)) D Q ; QUIT IF NO MEDS 190 . S C0QLIST("NoMed",DFN)="" 191 E D ; HAS MEDS 192 . S C0QLIST("HasMed",DFN)="" 193 S ZI="" S FOUND=0 194 F S ZI=$O(C0QMEDS(ZI)) Q:ZI="" D ; FOR EACH MED 195 . N ZM 196 . S ZM=$G(C0QMEDS(ZI,0)) ;THE MEDICATION 197 . I $P($P(ZM,"^",1),";",2)="I" D ; IE 1U;I FOR AN INPATIENT UNIT DOSE 198 . . S FOUND=1 199 I FOUND S C0QLIST("HasMedOrders",DFN)="" ; MET CPOE MEASURE 200 E S C0QLIST("NoMedOrders",DFN)="" 201 Q 202 ; 203 RECON ; MEDICATIONS RECONCILIATION 204 ; 205 I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; 206 . S C0QLIST("XferOfCare",DFN)="" ; transfer of care patient 207 N HASRECON S HASRECON=0 208 N GT,G 209 S GT(4,"HasMedRecon","MEDICATION RECONCILIATION COMPLET")="" 210 S GT(5,"HasMedRecon","Medication Reconcilation Complete")="" 211 I $$TXTALL^C0QNOTES(.G,.GT,DFN) D ; SEARCH ALL NOTES FOR MED RECON 212 . S HASRECON=1 213 ;N ZT 214 ;S ZT="MEDICATION RECONCILIATION COMPLET" 215 ;I $$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) D ; 216 ;. S HASRECON=1 217 ;E D ; 218 ;. S ZT="Medication Reconcilation Complete" 219 ;. I $$NTTXT^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",ZT,DFN) D ; 220 ;. . S HASRECON=1 221 ;I $$HFYN^C0QHF("MEDS HAVE BEEN REVIEWED",DFN) S HASRECON=1 222 I HASRECON D ; 223 . S C0QLIST("HasMedRecon",DFN)="" 224 E S C0QLIST("NoMedRecon",DFN)="" 225 Q 226 ; 227 RECON2 ; USE HEALTH FACTORS FOR MEDICATION RECONCILIATION 228 I $$HASNTYN^C0QNOTES("MED/SURG NURSING ADMISSION ASSESSMENT",DFN) D ; 229 . S C0QLIST("XferOfCare",DFN)="" ; transfer of care patient 230 I $$HFYN^C0QHF(DFN,"Medication Reconciliation Completed: Yes") D ; 231 . S C0QLIST("HasMedRecon",DFN)="" 232 E S C0QLIST("NoMedRecon",DFN)="" 233 Q 234 ; 235 ADVDIR ; ADVANCE DIRECTIVE 236 ; 237 I $$AGE^C0QUTIL(DFN)>64 D ; ONLY FOR PATIENTS 65 AND OLDER 238 . S C0QLIST("Over65",DFN)="" 239 . I $$HASNTYN^C0QNOTES("ADVANCE DIRECTIVE",DFN) D ; 240 . . S C0QLIST("HasAdvanceDirective",DFN)="" 241 . E D ; 242 . . S C0QLIST("NoAdvanceDirective",DFN)="" 243 Q 244 ; 245 SMOKING ; 246 I $$INLIST("HasSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STATUS CHECK 247 . S C0QLIST("HasSmokingStatus",DFN)="" 248 . S C0QLIST("Over12",DFN)="" 249 I $$INLIST("NoSmokingStatus",DFN) D Q ; ALREADY HAS SMOKING STATUS CHECK 250 . S C0QLIST("NoSmokingStatus",DFN)="" 251 . S C0QLIST("Over12",DFN)="" 252 N C0QSMOKE,C0QSYN 253 S C0QSYN=0 254 I $$AGE^C0QUTIL(DFN)<13 Q ; DON'T CHECK UNDER AGE 13 132 255 D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE 133 256 ; PATIENT IN THE CATEGORY OF TOBACCO 134 I $D(C0QSMOKE) S C0QLIST("HasSmokingStatus",DFN)="" 257 I $D(C0QSMOKE) S C0QSYN=1 258 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco <1 Yr Ago") 259 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco > 20 Yrs Ago") 260 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 1-5 Yrs Ago") 261 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 10-20 Yrs Ago") 262 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smokeless Tobacco: 5-10 Yrs Ago") 263 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking") 264 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking < 1 Yr Ago") 265 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking > 20 Yrs Ago") 266 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 1-5 Yrs Ago") 267 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 10-20 Yrs Ago") 268 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Quit Smoking: 5-10 Yrs Ago") 269 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") 270 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 1-5 YRS AGO") 271 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 10-20 YRS AGO") 272 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: 5-10 YRS AGO") 273 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: < 1 YR AGO") 274 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS: > 20 YRS AGO") 275 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER") 276 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 10-20 YRS") 277 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER 20+ YRS") 278 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR") 279 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER < 1 YR AGO") 280 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER > 20 YRS AGO") 281 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS") 282 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 1-5 YRS AGO") 283 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 10-20 YRS AGO") 284 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS") 285 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKER: 5-10 YRS AGO") 286 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"PREVIOUS SMOKELESS TOBACCO USER") 287 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") 288 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") 289 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") 290 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") 291 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") 292 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") 293 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") 294 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") 295 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") 296 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") 297 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") 298 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") 299 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") 300 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") 301 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") 302 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") 303 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") 304 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") 305 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") 306 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking Cessation (OPH)") 307 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") 308 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") 309 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") 310 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") 311 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") 312 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") 313 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") 314 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") 315 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") 316 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") 317 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") 318 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") 319 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") 320 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") 321 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") 322 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") 323 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") 324 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") 325 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") 326 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") 327 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") 328 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") 329 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") 330 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") 331 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") 332 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") 333 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") 334 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") 335 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") 336 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") 337 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") 338 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") 339 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") 340 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") 341 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") 342 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") 343 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") 344 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") 345 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") 346 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") 347 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") 348 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") 349 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") 350 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") 351 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") 352 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") 353 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") 354 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") 355 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") 356 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") 357 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") 358 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") 359 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") 360 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") 361 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") 362 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") 363 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") 364 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") 365 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") 366 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"LIFETIME NON-SMOKER") 367 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smokeless Tobacco User") 368 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker") 369 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Former Smoker (PMH)") 370 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoke Exposure/2nd Hand Exposure") 371 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 1-5 Yrs") 372 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 10-20 Yrs") 373 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For 5-10 Yrs") 374 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For < 1 Yr") 375 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoked For > 20 Yrs") 376 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Tobacco User") 377 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 1-5 Yrs") 378 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 10-20 Yrs") 379 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for 5-10 Yrs") 380 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for < 1 Yr") 381 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smokeless Used for > 20 Yrs") 382 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoker (HPI)") 383 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (FMH)") 384 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Smoking (PMH)") 385 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker") 386 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Smoker (PMH)") 387 S:'C0QSYN C0QSYN=$$HFYN^C0QHF(DFN,"Non-Tobacco User") 388 S C0QLIST("Over12",DFN)="" 389 N GT 390 S GT(1,"HasSmokingStatus","SMOK")="" 391 S GT(2,"HasSmokingStatus","Smok")="" 392 S GT(3,"HasSmokingStatus","smok")="" 393 ;N ZT 394 ;S ZT="Smok" 395 ;S:'C0QSYN C0QSYN=$$NTTXT^C0QNOTES("ER NURSE NOTE",ZT,DFN) ; 396 I 'C0QSYN D ; 397 . N G 398 . S OK=$$TXTALL^C0QNOTES(.G,.GT,DFN) 399 . I $D(G) S C0QSYN=1 400 I C0QSYN S C0QLIST("HasSmokingStatus",DFN)="" 135 401 E S C0QLIST("NoSmokingStatus",DFN)="" 136 402 Q … … 146 412 . E S C0QLIST("HasVitalSigns",DFN)="" 147 413 Q 414 ; 415 VTE1 ; VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL 416 ; 417 I $$HFYN^C0QHF(DFN,"VTE PROPHYLAXIS WITHIN 24HRS OF ARRIVAL") D ; 418 . S C0QLIST("HasVTE24",DFN)="" 419 E S C0QLIST("NoVTE24",DFN)="" 420 Q 421 ; 422 EDTIME ; CHECK FOR EMERGENCY DEPT TIME FACTORS 423 N FOUND 424 S FOUND=0 425 I $$HFYN^C0QHF(DFN,"ED ARRIVAL TIME") S FOUND=1 426 I '$$HFYN^C0QHF(DFN,"ED DEPARTURE TIME") S FOUND=0 427 I '$$HFYN^C0QHF(DFN,"TIME DECISION TO ADMIT MADE") S FOUND=0 428 I FOUND D ; 429 . S C0QLIST("HasEDtime",DFN)="" 430 E S C0QLIST("NoEDtime",DFN)="" 431 Q 432 ; 433 INLIST(ZLIST,DFN) ; EXTRINSIC FOR IS PATIENT ALREADY IN LIST ZLIST 434 N ZL,ZR 435 S ZL=$O(^C0Q(301,"CATTR",ZLIST,"")) ; IEN OF LIST IN C0Q PATIENT LIST FILE 436 I ZL="" Q 0 ; LIST DOES NOT EXIST 437 S ZR=0 ; ASSUME NOT IN LIST 438 I $D(^C0Q(301,ZL,1,"B",DFN)) S ZR=1 ; PATIENT IS IN LIST 439 Q ZR 148 440 ; 149 441 PRINT ; PRINT TO SCREEN … … 203 495 I $G(RACEDSC)="" S DEMOYN=0 204 496 I $G(ETHNDSC)="" S DEMOYN=0 205 I DEMOYN S C0QLIST("HasDemographics",DFN)=""206 E S C0QLIST("FailedDemographics",DFN)=""497 ;I DEMOYN S C0QLIST("HasDemographics",DFN)="" 498 ;E S C0QLIST("FailedDemographics",DFN)="" 207 499 ;S G1("Gender")=PTSEX 208 500 ;S G1("DateOfBirth")=PTDOB … … 217 509 I ALDESC["No Allergy" S C0QLIST("NoAllergy",DFN)="" 218 510 E S C0QLIST("HasAllergy",DFN)="" 219 I $D(MDITEM) D ;220 . S C0QLIST("HasMed",DFN)=""221 E S G1("NoMed",DFN)=""511 ;I $D(MDITEM) D ; 512 ;. S C0QLIST("HasMed",DFN)="" 513 ;E S G1("NoMed",DFN)="" 222 514 ;S G1("MedDescription")=$G(MDDESC) 223 515 Q … … 237 529 . S DTE=$O(^DGPM("B",DTE)) 238 530 . Q:'DTE 239 . Q: DTE<3110703531 . Q:$P(DTE,".")<3110703 240 532 . S EXDTE=$$FMTE^XLFDT(DTE) 241 533 . N PTFM S PTFM="" … … 244 536 . . Q:'PTFM 245 537 . . S DFN=$P(^DGPM(PTFM,0),U,3) 538 . . S C0QLIST("Patient",DFN)="" 246 539 . . D DEMO 247 540 . . D PROBLEM 248 541 . . D ALLERGY 249 . . D MEDS 542 . . D MEDS4 543 . . D RECON2 544 . . D ADVDIR 250 545 . . D SMOKING 251 546 . . D VITALS 547 . . D VTE1 548 . . D EDTIME 252 549 . . I C0QPR D PRINT 253 550 . . I C0QSS D SS -
qrda/C0Q/trunk/p/C0QSET.m
r1232 r1335 1 1 C0QSET ;GPL - SET OPERATIONS ON LISTS ;818/11 8:50pm 2 ;;1.0;MU PACKAGE;;;Build 192 ;;1.0;MU PACKAGE;;;Build 23 3 3 ; 4 4 ;2011 George Lilly glilly@glilly.net - Licensed under the terms of the GNU -
qrda/C0Q/trunk/p/C0QUPDT.m
r1232 r1335 1 1 C0QUPDT ; GPL - Quality Reporting List Update Routines ;8/29/11 17:05 2 ;;0.1;C0Q;nopatch;noreleasedate;Build 192 ;;0.1;C0Q;nopatch;noreleasedate;Build 23 3 3 ;Copyright 2009 George Lilly. Licensed under the terms of the GNU 4 4 ;General Public License See attached copy of the License. … … 27 27 RLSTFN() Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE 28 28 RLSTPFN() Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE 29 C0QPLF() Q 1130580001.301 ; C0Q PATIENT LIST FILE 29 30 C0QALFN() Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ; 30 31 ; … … 39 40 N ZI S ZI="" 40 41 N C0QM ; FOR HOLDING THE MEASURES IN THE SET 41 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES 42 I $$GET1^DIQ($$C0QMFN,MSET_",",.05,"I")="Y" D Q ; IS IT LOCKED? 43 . W !,"ERROR MEASURE SET IS LOCKED, EXITING" 44 D LIST^DIC($$C0QMMFN,","_MSET_",",".01I;1.2I;2.2I") ; GET ALL THE MEASURES 42 45 D DELIST("C0QM") 43 46 N ZII S ZII="" 44 47 F S ZII=$O(C0QM(ZII)) Q:ZII="" D ; FOR EACH MEASURE 48 . N C0QNL,C0QDL,C0QFLTN,C0QFLTD 49 . S C0QFLTN=$P(C0QM(ZII),U,3) ;IEN OF NUMERATOR FILTER LIST 50 . S C0QFLTD=$P(C0QM(ZII),U,4) ; IEN OF DENOMINATOR FILTER LIST 45 51 . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE 46 52 . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER … … 60 66 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS 61 67 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QNL,30,"B")) ; REMINDER LIST PATIENTS 68 . I C0QFLTN'="" D ; USE A NUMERATOR FILTER LIST 69 . . N ZNEW 70 . . S ZNEW=$NA(^C0Q(301,C0QFLTN,1,"B")) ; B INDEX OF FILTER LIST 71 . . K C0QFLTRD 72 . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) 73 . . S C0QNEW="C0QFLTRD" 62 74 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST 63 75 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET … … 105 117 . E D ; USE THE REMINDER PACKAGE PATIENT LISTS 106 118 . . S C0QNEW=$NA(^PXRMXP(810.5,C0QDL,30,"B")) ; REMINDER LIST PATIENTS 119 . I C0QFLTD'="" D ; USE A DENOMINATOR FILTER LIST 120 . . N ZNEW 121 . . S ZNEW=$NA(^C0Q(301,C0QFLTD,1,"B")) ; B INDEX OF FILTER LIST 122 . . K C0QFLTRD 123 . . D AND^C0QSET("C0QFLTRD",ZNEW,C0QNEW) 124 . . S C0QNEW="C0QFLTRD" 107 125 . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST 108 126 . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET … … 144 162 . I $D(C0QFDA) D UPDIE ; PROCESS 145 163 . N C0QPCT ; PERCENT 146 . I C0QDCNT>0 D ; 147 . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0) 164 . D ; 165 . . I C0QDCNT>0 D ; 166 . . . S C0QPCT=$J(100*C0QNCNT/C0QDCNT,0,0) 167 . . E S C0QPCT=0 148 168 . . K C0QFDA 149 169 . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT … … 154 174 ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE 155 175 ; ADDED A B INDEX @RTN@("B",INTERNAL VALUE,IEN)=EXTERNAL VALUE 156 N ZI,IV,EV,ZDI,ZIEN 176 N ZI,IV,EV,ZDI,ZIEN,FLTN,FLTD 157 177 S ZI="" 158 178 S ZDI=$NA(^TMP("DILIST",$J)) … … 161 181 . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE 162 182 . S IV=$G(@ZDI@("ID",ZI,.01)) ; INTERNAL VALUE 183 . S FLTN=$G(@ZDI@("ID",ZI,1.2)) ; NUMERATOR FILTER LIST 184 . S FLTD=$G(@ZDI@("ID",ZI,2.2)) ; DENOMINATOR FILTER LIST 163 185 . S ZIEN=@ZDI@(2,ZI) ; IEN 164 . S @RTN@(ZIEN)=IV_"^"_EV 186 . S @RTN@(ZIEN)=IV_"^"_EV_"^"_FLTN_"^"_FLTD 165 187 . ;S @RTN@("B",IV,ZIEN)=EV 166 188 Q
Note:
See TracChangeset
for help on using the changeset viewer.