Changeset 1232 for qrda


Ignore:
Timestamp:
Sep 2, 2011, 5:18:06 PM (13 years ago)
Author:
George Lilly
Message:

added smoking status and cpoe calculation

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

Legend:

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

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

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

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

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

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

    r1230 r1232  
    11C0QMAIN ; GPL - Quality Reporting Main Processing ;10/13/10  17:05
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 14
     2        ;;0.1;C0Q;nopatch;noreleasedate;Build 19
    33        ;Copyright 2009 George Lilly.  Licensed under the terms of the GNU
    44        ;General Public License See attached copy of the License.
  • qrda/C0Q/trunk/p/C0QPQRI.m

    r1230 r1232  
    11C0QPQRI   ; GPL - GENERATES A PQRI XML FILE ;6/14/11  17:05
    2         ;;0.1;C0C;nopatch;noreleasedate;Build 14
     2        ;;0.1;C0C;nopatch;noreleasedate;Build 19
    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

    r1230 r1232  
    11C0QPRML ;JJOH/ZAG/GPL - Patient Reminder List ;7/5/11 8:50pm
    2         ;;1.0;MU PACKAGE;;;Build 14
     2        ;;1.0;MU PACKAGE;;;Build 19
    33        ;
    44        ;2011 Zach Gonzales<zach@linux.com> - Licensed under the terms of the GNU
     
    2727        N G1 ; ONE SET OF VALUES - RNF1 FORMAT
    2828        ; INITIALIZE LISTS
     29        ; this is done so that if there are no matching patients, the patient list
     30        ; will be zeroed out
    2931        S C0QLIST("HasDemographics")=""
    3032        S C0QLIST("Patient")=""
     
    3234        S C0QLIST("HasAllergy")=""
    3335        S C0QLIST("HasMed")=""
     36        S C0QLIST("HasVitalSigns")=""
     37        S C0QLIST("HasMedOrders")=""
     38        S C0QLIST("HasSmokingStatus")=""
    3439        D ALL ; all currently admitted patients in the hospital
    3540        D DIS ; all patients discharged since the reporting period began
     
    5459        . . . D ALLERGY
    5560        . . . D MEDS
     61        . . . D SMOKING
     62        . . . D VITALS
    5663        . . . I C0QPR D PRINT
    5764        . . . I C0QSS D SS
     
    7784        . Q:'ETHN
    7885        . S ETHNDSC=$P($G(^DIC(10.2,ETHN,0)),U) ;ethnincity description
    79         S RB=$P(^DPT(DFN,.101),U) ;room and bed
     86        S RB=$P($G(^DPT(DFN,.101)),U) ;room and bed
    8087        Q
    8188        ;
     
    97104        ;
    98105MEDS    ; MEDICATIONS
    99         D COVER^ORWPS(.MEDSL,DFN)
    100         S MDCNT=""
    101         F  S MDCNT=$O(MEDSL(MDCNT)) Q:MDCNT=""  D
    102         . Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE"  ;active medications only
    103         . S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
    104         . S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
     106        ;
     107        I DFN=97 D  Q  ;
     108        . S MDCNT=271
    105109        K MEDSL
     110        D EN^C0CNHIN(.MEDSL,DFN,"MED;") ; GET THE MEDS FROM THE NHIN API
     111        ; can't use COVER^ORWPS even though it's fast.. we need to detect
     112        ; if the medications are Inpatient to compute the CPOE measure
     113        ; we will use the NHINV routines for this purpose
     114        ;D COVER^ORWPS(.MEDSL,DFN)
     115        S MDCNT="" S HASINP=0
     116        F  S MDCNT=$O(MEDSL("med",MDCNT)) Q:MDCNT=""  D
     117        . ;Q:$P(MEDSL(MDCNT),U,4)'="ACTIVE"  ;active medications only
     118        . Q:MEDSL("med",MDCNT,"status@value")'="active"
     119        . ;S MDDESC=$P(MEDSL(MDCNT),U,2) ;medication description
     120        . S MDDESC=$G(MEDSL("med",MDCNT,"products.product@name"))
     121        . ;S MDITEM=$P($G(MEDSL(MDCNT)),U,3)
     122        . S MDITEM=$G(MEDSL("med",MDCNT,"sig")) ; i think this is what meditem is
     123        . I MEDSL("med",MDCNT,"vaType@value")="I" S HASINP=1
     124        I HASINP D  ; THE PATIENT HAS AN INPATIENT MED
     125        . S C0QLIST("HasMedOrders",DFN)="" ; an inpatient drug indicates CPOE
     126        E  S C0QLIST("NoMedOrders",DFN)="" ; this will be different for outpatient
     127        K MEDSL
     128        Q
     129        ;
     130SMOKING ;
     131        N C0QSMOKE
     132        D HFCAT^C0QHF(.C0QSMOKE,DFN,"TOBACCO") ; GET ALL HEALTH FACTORS FOR THE
     133        ; PATIENT IN THE CATEGORY OF TOBACCO
     134        I $D(C0QSMOKE) S C0QLIST("HasSmokingStatus",DFN)=""
     135        E  S C0QLIST("NoSmokingStatus",DFN)=""
     136        Q
     137        ;
     138VITALS  ;
     139        ;
     140        N C0QSDT,C0QEDT
     141        D DT^DILF(,"JULY 3,2011",.C0QSDT) ; START DATE
     142        D DT^DILF(,"T",.C0QEDT) ; END DATE TODAY
     143        D VITALS^ORQQVI(.VITRSLT,DFN,C0QSDT,C0QEDT) ; CALL FAST VITALS
     144        I $D(VITRSLT) D  ;ZWR VITRSLT B  ;
     145        . I VITRSLT(1)["No vitals found." S C0QLIST("NoVitalSigns",DFN)=""
     146        . E  S C0QLIST("HasVitalSigns",DFN)=""
    106147        Q
    107148        ;
     
    207248        . . D ALLERGY
    208249        . . D MEDS
     250        . . D SMOKING
     251        . . D VITALS
    209252        . . I C0QPR D PRINT
    210253        . . I C0QSS D SS
  • qrda/C0Q/trunk/p/C0QSET.m

    r1230 r1232  
    11C0QSET  ;GPL - SET OPERATIONS ON LISTS ;818/11 8:50pm
    2         ;;1.0;MU PACKAGE;;;Build 14
     2        ;;1.0;MU PACKAGE;;;Build 19
    33        ;
    44        ;2011 George Lilly glilly@glilly.net - Licensed under the terms of the GNU
Note: See TracChangeset for help on using the changeset viewer.