Ignore:
Timestamp:
Jan 4, 2012, 4:37:42 PM (13 years ago)
Author:
George Lilly
Message:

latest C0Q changes with parameters

File:
1 edited

Legend:

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

    r1232 r1335  
    11C0QUPDT ; GPL - Quality Reporting List Update Routines ;8/29/11  17:05
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 19
     2        ;;0.1;C0Q;nopatch;noreleasedate;Build 23
    33        ;Copyright 2009 George Lilly.  Licensed under the terms of the GNU
    44        ;General Public License See attached copy of the License.
     
    2727RLSTFN()        Q 810.5 ; FN FOR REMINDER PATIENT LIST FILE
    2828RLSTPFN()       Q 810.53 ; FN FOR REMINDER PATIENT LIST PATIENT SUBFILE
     29C0QPLF()        Q 1130580001.301 ; C0Q PATIENT LIST FILE
    2930C0QALFN()       Q 1130580001.311 ; FILE NUMBER FOR C0Q PATIENT LIST PATIENT SUBFILE ;
    3031        ;
     
    3940        N ZI S ZI=""
    4041        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
    4245        D DELIST("C0QM")
    4346        N ZII S ZII=""
    4447        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
    4551        . S ZI=$P(C0QM(ZII),U,1) ; IEN OF THE MEASURE IN THE C0Q QUALITY MEAS FILE
    4652        . S C0QNL=$$GET1^DIQ($$C0QQFN,ZI_",",1,"I") ; NUMERATOR POINTER
     
    6066        . E  D  ; USE THE REMINDER PACKAGE PATIENT LISTS
    6167        . . 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"
    6274        . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
    6375        . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,1,"B")) ; NUMERATOR LIST IN MEASURE SET
     
    105117        . E  D  ; USE THE REMINDER PACKAGE PATIENT LISTS
    106118        . . 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"
    107125        . N C0QOLD ; REFERENCE FOR OLD PATIENT LIST
    108126        . S C0QOLD=$NA(^C0Q(201,MSET,5,ZII,3,"B")) ; DENOMINATOR LIST IN MEASURE SET
     
    144162        . I $D(C0QFDA) D UPDIE ; PROCESS
    145163        . 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
    148168        . . K C0QFDA
    149169        . . S C0QFDA($$C0QMMFN(),ZII_","_MSET_",",3)=C0QPCT ; PERCENT
     
    154174        ; @RTN@(IEN)=INTERNAL VALUE^EXTERNAL VALUE
    155175        ; 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
    157177        S ZI=""
    158178        S ZDI=$NA(^TMP("DILIST",$J))
     
    161181        . S EV=@ZDI@(1,ZI) ;EXTERNAL VALUE
    162182        . 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
    163185        . S ZIEN=@ZDI@(2,ZI) ; IEN
    164         . S @RTN@(ZIEN)=IV_"^"_EV
     186        . S @RTN@(ZIEN)=IV_"^"_EV_"^"_FLTN_"^"_FLTD
    165187        . ;S @RTN@("B",IV,ZIEN)=EV
    166188        Q
Note: See TracChangeset for help on using the changeset viewer.