Ignore:
Timestamp:
Oct 23, 2012, 3:55:22 PM (12 years ago)
Author:
Sam Habiel
Message:

Updated C0QMU12 and created C0QMU123 for patch 6: support for Model Measure Sets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qrda/C0Q/trunk/p/C0QMU12.m

    r1577 r1581  
    1 C0QMU12 ;JJOH/ZAG/GPL - Patient Reminder List ; 10/17/12 12:52pm
    2         ;;1.0;QUALITY MEASURES;**1,5**;May 21, 2012;Build 32
     1C0QMU12 ;JJOH/ZAG/GPL - Patient Reminder List ; 10/22/12 4:29pm
     2        ;;1.0;QUALITY MEASURES;**1,5,6**;May 21, 2012;Build 32
    33        ;
    44        ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU
     
    1010C0QPFN()        Q 1130580001.401 ; PARAMETER FILE
    1111C0QPCFN()       Q 1130580001.411 ; CLINIC SUBFILE
    12 C0QMFN()        Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT FILE
     12C0QMFN()        Q 1130580001.201 ; FILE NUMBER FOR C0Q MEASUREMENT SET FILE
    1313C0QMMFN()       Q 1130580001.2011 ; FN FOR MEASURE SUBFILE
    1414INIT(ZARY,ZTYP) ; INITIALIZE THE PARAMETERS FOR BUILDING PATIENT LISTS
     
    2525        F  S ZIEN=$O(^C0Q(401,"MUTYP",ZMU,ZTYP,ZIEN)) Q:ZIEN=""  D  ;
    2626        . S ZCNT=ZCNT+1
     27        . S @ZARY@(ZCNT,"IEN")=ZIEN
    2728        . S @ZARY@(ZCNT,"MU")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.02)
    2829        . S @ZARY@(ZCNT,"TYPE")=$$GET1^DIQ($$C0QPFN,ZIEN_",",.03)
    29         . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",1,"I")
    30         . S @ZARY@(ZCNT,"InpatientMeasurementSet")=ZX
     30        . ;
     31        . ; Inpatient
     32        . S (ZX,@ZARY@(ZCNT,"InpatientMeasurementSet"))=$$GET1^DIQ($$C0QPFN,ZIEN_",",1,"I")
    3133        . S @ZARY@(ZCNT,"InpatientBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I")
    3234        . S @ZARY@(ZCNT,"InpatientEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I")
    3335        . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I")
    34         . S ZX=$$GET1^DIQ($$C0QPFN,ZIEN_",",2,"I")
    35         . S @ZARY@(ZCNT,"EPMeasurementSet")=ZX
     36        . ;
     37        . ; Outpatient
     38        . S (ZX,@ZARY@(ZCNT,"EPMeasurementSet"))=$$GET1^DIQ($$C0QPFN,ZIEN_",",2,"I")
    3639        . S @ZARY@(ZCNT,"EPBeginDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.02,"I")
    3740        . S @ZARY@(ZCNT,"EPEndDate")=$$GET1^DIQ($$C0QMFN,ZX_",",.03,"I")
    3841        . S @ZARY@(ZCNT,"EPQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",2.1,"I")
    39         . S @ZARY@(ZCNT,"InpatientQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",1.1,"I")
     42        . S @ZARY@(ZCNT,"EPModelPerfSet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",6.1,"I")
     43        . S @ZARY@(ZCNT,"EPModelQualitySet")=$$GET1^DIQ($$C0QPFN,ZIEN_",",6.2,"I")
     44        . ;
    4045        . D CLEAN^DILF
    4146        . D LIST^DIC($$C0QPCFN,","_ZIEN_",",".01I")
     
    346351        ; PREFIX WILL GO IN C0XLIST(PREFIX_"-PATIENT",DFN)=""
    347352        ; LOC IS HOSPITAL LOCATION
     353        ; Initially, make an empty list (C0Q*1.0*6)
     354        S C0QLIST(PREFIX_"Patient")=""
    348355        S ULOC=$O(^SC("B",LOC,"")) ; IEN OF HOSPITAL LOCATION
    349356        I ULOC="" D  Q  ; OOPS
     
    394401        . I $D(DEBUG) D ZWRITE^C0QUTIL("C0QLIST")
    395402        . M C0QLIST(ZYR_"EP-ALL-PATIENTS")=C0QLIST(PRE_"Patient")
     403        . ; update parameter list with filter list (1.0*6)
     404        . S C0QPARM(ZI,"FilterListName")=PRE_"Patient"
    396405        S DFN=""
    397406        S ZYR=ZYR_"EP-"
     
    413422        . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data;
    414423        . D EN^C0QMUERX($$PATLN^C0QMU12(ZYR_"HasERX")) ; Pass the eRx patient list
    415         ;
     424        ; 
    416425        N ZI S ZI=""
    417426        F  S ZI=$O(C0QPARM(ZI)) Q:ZI=""  D  ;
    418427        . N C0QDEBUG S C0QDEBUG=1 ; This causes the code to print out data;
     428        . I 'C0QPARM(ZI,"EPMeasurementSet"),C0QPARM(ZI,"EPModelPerfSet") D
     429        . . N C0QCLNC S C0QCLNC=C0QPARM(ZI,"CLINICS",1,1)
     430        . . N FLN S FLN=C0QPARM(ZI,"FilterListName")
     431        . . ;
     432        . . ; 1. BUILD New Measure Set from Model Performance Measure Set
     433        . . ; Get IEN back of the newly created measure set.
     434        . . N MSIEN ; Measure Set IEN that gets created
     435        . . S MSIEN=$$CLONE^C0QMU123(C0QPARM(ZI,"EPModelPerfSet"),C0QCLNC,0,FLN)
     436        . . ;
     437        . . ; 2. File Measure Set
     438        . . N C0QFDA S C0QFDA($$C0QPFN(),C0QPARM(ZI,"IEN")_",",2)=MSIEN
     439        . . N C0QERR
     440        . . D FILE^DIE("",$NA(C0QFDA),$NA(C0QERR))
     441        . . I $D(C0QERR) S $EC=",U1,"
     442        . . ;
     443        . . ; 3. Set this IEN to be the one in EPMeasurementSet
     444        . . S C0QPARM(ZI,"EPMeasurementSet")=MSIEN
     445        . . ; DONE
     446        . . ;
     447        . I 'C0QPARM(ZI,"EPQualitySet"),C0QPARM(ZI,"EPModelQualitySet") D
     448        . . N C0QCLNC S C0QCLNC=C0QPARM(ZI,"CLINICS",1,1)
     449        . . N FLN S FLN=C0QPARM(ZI,"FilterListName")
     450        . . ;
     451        . . ; 1. BUILD New Measure Set from Model Performance Measure Set
     452        . . ; Get IEN back of the newly created measure set.
     453        . . N MSIEN ; Measure Set IEN that gets created
     454        . . S MSIEN=$$CLONE^C0QMU123(C0QPARM(ZI,"EPModelQualitySet"),C0QCLNC,1,FLN)
     455        . . ;
     456        . . ; 2. File Measure Set
     457        . . N C0QFDA S C0QFDA($$C0QPFN(),C0QPARM(ZI,"IEN")_",",2.1)=MSIEN
     458        . . N C0QERR
     459        . . D FILE^DIE("",$NA(C0QFDA),$NA(C0QERR))
     460        . . I $D(C0QERR) S $EC=",U1,"
     461        . . ;
     462        . . ; 3. Set this IEN to be the one in EPMeasurementSet
     463        . . S C0QPARM(ZI,"EPQualitySet")=MSIEN
     464        . . ; DONE
     465        . ;
     466        . ; Quit if we still don't have measurement sets
     467        . I 'C0QPARM(ZI,"EPMeasurementSet")&('C0QPARM(ZI,"EPQualitySet")) QUIT
     468        . ;
    419469        . D UPDATE^C0QUPDT(.G,C0QPARM(ZI,"EPMeasurementSet")) ; UPDATE THE MU MEASUREMENT SET
    420470        . ; VEN/SMH -- Quality Set missing for Outpatient -- adding
Note: See TracChangeset for help on using the changeset viewer.