Changeset 1230 for qrda


Ignore:
Timestamp:
Aug 30, 2011, 1:51:06 PM (13 years ago)
Author:
George Lilly
Message:

update instead of delete old patient lists for performance

Location:
qrda/C0Q/trunk
Files:
1 added
9 edited

Legend:

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

    r1223 r1230  
    11C0QERTIM        ; Time from admission to leaving a hospital location ;
    2         ;;0.1;C0Q;;;Build 13
     2        ;;0.1;C0Q;;;Build 14
    33EN      ;Get Location
    44        S DIC=42,DIC(0)="AEMQ" D ^DIC I Y<1 G EXIT
  • qrda/C0Q/trunk/p/C0QGMRAD.m

    r1223 r1230  
    11C0QGMRAD        ;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 13
     2        ;;4.0;Adverse Reaction Tracking;**2,10**;Mar 29, 1996;Build 14
    33EN1     ; ENTRY TO GATHER PATIENT A/AR DATA
    44        ;INPUT VARIABLES:
  • qrda/C0Q/trunk/p/C0QGMTSA.m

    r1223 r1230  
    11C0QGMTSA        ; SLC/DLT,KER - Brief Adverse Reaction/Allergy ; 02/27/2002
    2         ;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 13
     2        ;;2.7;Health Summary;**28,49**;Oct 20, 1995;Build 14
    33        ;                 
    44        ; External References
  • qrda/C0Q/trunk/p/C0QGMTSG.m

    r1223 r1230  
    11C0QGMTSG        ; SLC/DLT,KER - Allergies ; 01/06/2003
    2         ;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 13
     2        ;;2.7;Health Summary;**9,28,49,58**;Oct 20, 1995;Build 14
    33        ;                 
    44        ; External References
  • qrda/C0Q/trunk/p/C0QIMMUN.m

    r1223 r1230  
    11C0QIMMUN        ;Prep Immunization Order data for HL7 Message creation ;
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 13
     2        ;;0.1;C0Q;nopatch;noreleasedate;Build 14
    33        ;  ^XTMP("C0QIMMUN",0)=purge date^create date
    44        ;  ^XTMP("C0QIMMUN",order_date,order#,item_name)=item_value
  • qrda/C0Q/trunk/p/C0QMAIN.m

    r1223 r1230  
    11C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10  17:05
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 13
     2        ;;0.1;C0Q;nopatch;noreleasedate;Build 14
    33        ;Copyright 2009 George Lilly.  Licensed under the terms of the GNU
    44        ;General Public License See attached copy of the License.
     
    138138        I Y<1 Q  ; EXIT
    139139        N MSIEN S MSIEN=+Y
    140         D C0QRPC(.G,MSIEN)
     140        ;D C0QRPC(.G,MSIEN)
     141               D UPDATE^C0QUPDT(.G,MSIEN)
    141142        Q
    142143        ;
     
    175176        D LIST^DIC($$C0QMMFN,","_MSET_",",".01I") ; GET ALL THE MEASURES
    176177        D DELIST("C0QM")
    177         N ZII S ZII=""
    178         F  S ZII=$O(C0QM(ZII)) Q:ZII=""  D  ; FOR EACH MEASURE
     178        N ZII S ZII=0
     179        F  S ZII=$O(C0QM(ZII)) Q:+ZII=0  D  ; FOR EACH MEASURE
    179180        . D CLEARMEA(MSET,ZII) ; FIRST CLEAR OUT THE MEASURE
    180181        K C0QM
  • qrda/C0Q/trunk/p/C0QPQRI.m

    r1223 r1230  
    11C0QPQRI   ; GPL - GENERATES A PQRI XML FILE ;6/14/11  17:05
    2         ;;0.1;C0C;nopatch;noreleasedate;Build 13
     2        ;;0.1;C0C;nopatch;noreleasedate;Build 14
    33        ;Copyright 2011 George Lilly.  Licensed under the terms of the GNU
    44        ;General Public License See attached copy of the License.
  • qrda/C0Q/trunk/p/C0QPRML.m

    r1223 r1230  
    11C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm
    2         ;;1.0;MU PACKAGE;;;Build 13
     2        ;;1.0;MU PACKAGE;;;Build 14
    33        ;
    44        ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU
     
    2626        I '$D(C0QPL) S C0QPL=1 ;default do create patient lists
    2727        N G1 ; ONE SET OF VALUES - RNF1 FORMAT
     28        ; INITIALIZE LISTS
     29        S C0QLIST("HasDemographics")=""
     30        S C0QLIST("Patient")=""
     31        S C0QLIST("HasProblem")=""
     32        S C0QLIST("HasAllergy")=""
     33        S C0QLIST("HasMed")=""
    2834        D ALL ; all currently admitted patients in the hospital
    2935        D DIS ; all patients discharged since the reporting period began
    3036        I C0QSS ZWR GRSLT
    31         I C0QPL D FILE ; FILE THE PATIENT LISTS
     37        I C0QPL D  ;
     38        . D FILE ; FILE THE PATIENT LISTS
     39        . D UPDATE^C0QUPDT(.G,8) ; UPDATE THE MU MEASUREMENT SET
    3240        Q
    3341        ;
     
    216224        . I ZN="" D  Q  ; OOPS
    217225        . . W !,"ERROR, ATTRIBUTE NOT FOUND IN PATIENT LIST FILE:"_ZI
    218         . S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN
     226        . ;S ZN=$$KLNCR(ZN) ; KILL AND RECREATE RECORD ZN
     227        . N C0QNEW,C0QOLD,C0QRSLT
     228        . S C0QNEW=$NA(C0QLIST(ZI)) ; THE NEW PATIENT LIST
     229        . S C0QOLD=$NA(^C0Q(301,ZN,1,"B")) ; THE OLD PATIENT LIST
     230        . D UNITY^C0QSET("C0QRSLT",C0QNEW,C0QOLD) ; FIND WHAT'S NEW
     231        . N ZJ,ZK
     232        . ; FIRST, DELETE THE OLD ONES - NO LONGER IN THE LIST
    219233        . K C0QFDA
    220         . N ZJ,ZC
    221         . S ZJ="" S ZC=1
    222         . F  S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ=""  D  ; FOR EACH PAT IN LIST
    223         . . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ
    224         . . S ZC=ZC+1
    225         . D UPDIE
    226         . W !,"FOUND:"_ZI
     234        . S ZJ=""
     235        . F  S ZJ=$O(C0QRSLT(2,ZJ)) Q:ZJ=""  D  ; MARKED WITH A 2 FROM UNITY
     236        . . S ZK=$O(@C0QOLD@(ZJ,"")) ; GET THE IEN OF THE RECORD TO DELETE
     237        . . I ZK="" D  Q  ; OOPS SHOULDN'T HAPPEN
     238        . . . W !,"INTERNAL ERROR FINDING A PATIENT TO DELETE"
     239        . . . B
     240        . . S C0QFDA(LFN,ZK_","_ZN_",",.01)="@"
     241        . I $D(C0QFDA) D UPDIE ; PROCESS THE DELETIONS
     242        . ; SECOND, PROCESS THE ADDITIONS
     243        . K C0QFDA
     244        . S ZJ="" S ZK=1
     245        . F  S ZJ=$O(C0QRSLT(0,ZJ)) Q:ZJ=""  D  ; PATIENTS TO ADD ARE MARKED WITH 0
     246        . . S C0QFDA(LFN,"+"_ZK_","_ZN_",",.01)=ZJ
     247        . . S ZK=ZK+1
     248        . I $D(C0QFDA) D UPDIE ; PROCESS THE ADDITIONS
     249        ;. Q
     250        ;. K C0QFDA
     251        ;. N ZJ,ZC
     252        ;. S ZJ="" S ZC=1
     253        ;. F  S ZJ=$O(C0QLIST(ZI,ZJ)) Q:ZJ=""  D  ; FOR EACH PAT IN LIST
     254        ;. . S C0QFDA(LFN,"?+"_ZC_","_ZN_",",.01)=ZJ
     255        ;. . S ZC=ZC+1
     256        ;. D UPDIE
     257        ;. W !,"FOUND:"_ZI
    227258        Q
    228259        ;
  • qrda/C0Q/trunk/p/C0QSET.m

    r1223 r1230  
    11C0QSET  ;GPL - SET OPERATIONS ON LISTS ;818/11 8:50pm
    2         ;;1.0;MU PACKAGE;;;Build 13
     2        ;;1.0;MU PACKAGE;;;Build 14
    33        ;
    44        ;2011 George Lilly glilly@glilly.net - Licensed under the terms of the GNU
     
    5151        ; @ZRTN@(2,Z)="" ; Z IS EXTRA IN OLD - WOULD BEED TO BE DELETED FOR UNITY
    5252        N C0QD ; TEMP WORK ARRAY
     53        N ZN S ZN=0 ; COUNT
    5354        N ZI S ZI=0
    5455        F  S ZI=$O(@ZNEW@(ZI)) Q:+ZI=0  D  ; FOR EACH ITEM IN NEW
    5556        . S C0QD(ZI)=0 ; SET THEM ALL AS 0 MEANING NEW
     57        . S ZN=ZN+1
     58        S @ZRTN@("COUNT")=ZN ; NEW FILE COUNT
    5659        S ZI=0
    5760        F  S ZI=$O(@ZOLD@(ZI)) Q:+ZI=0  D  ; FOR EACH ITEM IN OLD
Note: See TracChangeset for help on using the changeset viewer.