Changeset 246 for ccr/trunk


Ignore:
Timestamp:
Oct 28, 2008, 8:14:30 PM (16 years ago)
Author:
George Lilly
Message:

added Alerts to GPLRIMA

Location:
ccr/trunk/p
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLALER2.m

    r236 r246  
    8989 . . S ARVUID=$$GET1^DIQ(120.83,ARIEN,"VUID")
    9090 . S @ALTVMAP@("ALERTREACTIOINDESCRIPTIONTEXT")=ARDES
    91  . S @ALTVMAP@("ALERTREACTIONCODEVALUE")=ARVUID
    92  . S @ALTVMAP@("ALERTREACTIONCODESYSTEM")="VUID"
     91 . I ARVUID'="" D  ; IF REACTION VUID IS NOT NULL
     92 . . S @ALTVMAP@("ALERTREACTIONCODEVALUE")=ARVUID
     93 . . S @ALTVMAP@("ALERTREACTIONCODESYSTEM")="VUID"
     94 . E  D  ; IF IT IS NULL DON'T SET CODE SYSTEM
     95 . . S @ALTVMAP@("ALERTREACTIONCODEVALUE")=""
     96 . . S @ALTVMAP@("ALERTREACTIONCODESYSTEM")=""
    9397 . S ALTARYTMP=$NA(@ALTTARYTMP@(ALTCNT))
    9498 . K @ALTARYTMP
  • ccr/trunk/p/GPLRIMA.m

    r176 r246  
    6565    . I $D(^TMP("GPLCCR",$J,"MEDMAP",1)) D  ; MEDS VARS EXISTS
    6666    . . M @RIMBASE@("VARS",RIMDFN,"MEDS")=^TMP("GPLCCR",$J,"MEDMAP")
     67    . I $D(^TMP("GPLALERT",$J,"ALERTS",1,"ALERTOBJECTID")) D  ; ALERTS EXIST
     68    . . W "FOUND ALERT VARS",!
     69    . . M @RIMBASE@("VARS",RIMDFN,"ALERTS")=^TMP("GPLALERT",$J,"ALERTS")
    6770    . K ^TMP("GPLCCR",$J) ; KILL WORK AREA FOR CCR BUILDING
    6871    . ;
     
    108111    . . . I $P(ZR(ZI),"^",2)'="" D APOST("SATTR","RIMTBL","MEDSCODE") ;CODES
    109112    . ; D PATD^GPLRIMA(2,"MEDS","MEDPRODUCTNAMECODEVALUE") CHECK FOR MED CODES
    110     D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED
     113    I $D(@SBASE@("ALERTS",1)) D  ; IF THE PATIENT HAS ALERTS
     114    . D APOST("SATTR","RIMTBL","ALERTS")
     115    . N ZR,ZI
     116    . D GETPA(.ZR,SDFN,"ALERTS","ALERTAGENTPRODUCTCODEVALUE") ;REACTANT CODES
     117    . I ZR(0)>0 D  ; VAR LOOKUP WAS GOOD, CHECK FOR NON=NULL RETURN
     118    . . F ZI=1:1:ZR(0) D  ; LOOP THROUGH RETURNED VAR^VALUE PAIRS
     119    . . . I $P(ZR(ZI),"^",2)'="" D APOST("SATTR","RIMTBL","ALERTSSCODE") ;CODES
     120    ; D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED
    111121    W "ATTRIBUTES: ",SATTR,!
    112122    Q SATTR
     
    286296      D APUSH(RIMTBL,"MEDSDATE")
    287297      D APUSH(RIMTBL,"MEDSNODATE")
     298      D APUSH(RIMTBL,"ALERTS")
     299      D APUSH(RIMTBL,"ALERTSCODE")
    288300      Q
    289301      ;
Note: See TracChangeset for help on using the changeset viewer.