Changeset 266 for ccr/trunk/p/GPLRIMA.m


Ignore:
Timestamp:
Nov 9, 2008, 11:56:39 AM (16 years ago)
Author:
George Lilly
Message:

integrate LABS with ANALYZEGPLRIMA attribute categories

File:
1 edited

Legend:

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

    r265 r266  
    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
     67    . I $D(^TMP("GPLCCR",$J,"ALERTS",1,"ALERTOBJECTID")) D  ; ALERTS EXIST
    6868    . . W "FOUND ALERT VARS",!
    69     . . M @RIMBASE@("VARS",RIMDFN,"ALERTS")=^TMP("GPLALERT",$J,"ALERTS")
     69    . . M @RIMBASE@("VARS",RIMDFN,"ALERTS")=^TMP("GPLCCR",$J,"ALERTS")
     70    . I $D(^TMP("GPLCCR",$J,"RESULTS",0)) D  ; RESULTS EXIST
     71    . . W "FOUND RESULTS VARS",!
     72    . . M @RIMBASE@("VARS",RIMDFN,"RESULTS")=^TMP("GPLCCR",$J,"RESULTS")
    7073    . K ^TMP("GPLCCR",$J) ; KILL WORK AREA FOR CCR BUILDING
    7174    . ;
     
    118121    . . F ZI=1:1:ZR(0) D  ; LOOP THROUGH RETURNED VAR^VALUE PAIRS
    119122    . . . I $P(ZR(ZI),"^",2)'="" D APOST("SATTR","RIMTBL","ALERTSCODE") ;CODES
     123    I $D(@SBASE@("RESULTS",1)) D  ; IF THE PATIENT HAS LABS VARIABLES
     124    . D APOST("SATTR","RIMTBL","RESULTS")
     125    N ZR,ZI
     126    . D RPCGV(.ZR,SDFN,"RESULTS") ;CHECK FOR LABS CODES
     127    . I ZR(0)>0 D  ; VAR LOOKUP WAS GOOD, CHECK FOR NON=NULL RETURN
     128    . . F ZI=1:1:ZR(0) D  ; LOOP THROUGH RETURNED VAR^VALUE PAIRS
     129    . . . I $P(ZR(ZI),"^",2)="RESULTTESTCODINGSYSTEM" D  ;
     130    . . . I $P(ZR(ZI),"^",3)="LOINC" D APOST("SATTR","RIMTBL","LABLN") ;CODES
    120131    ; D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED
    121132    W "ATTRIBUTES: ",SATTR,!
     
    298309      D APUSH(RIMTBL,"ALERTS")
    299310      D APUSH(RIMTBL,"ALERTSCODE")
     311      D APUSH(RIMTBL,"RESULTS")
     312      D APUSH(RIMTBL,"LABSLN")
    300313      Q
    301314      ;
Note: See TracChangeset for help on using the changeset viewer.