Changeset 266 for ccr


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

integrate LABS with ANALYZEGPLRIMA attribute categories

Location:
ccr/trunk/p
Files:
4 edited

Legend:

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

    r256 r266  
    3333 ; DEFINE MAPPING
    3434 N ALTTVMAP,ALTVMAP,ALTTARYTMP,ALTARYTMP
    35  S ALTTVMAP=$NA(^TMP("GPLALERT",$J,"ALERTS"))
    36  S ALTTARYTMP=$NA(^TMP("GPLALERT",$J,"ALERTSARYTMP"))
     35 S ALTTVMAP=$NA(^TMP("GPLCCR",$J,"ALERTS"))
     36 S ALTTARYTMP=$NA(^TMP("GPLCCR",$J,"ALERTSARYTMP"))
    3737 K @ALTTVMAP,@ALTTARYTMP
    3838 N ALTTMP,ALTCNT S ALTG=$NA(GMRAL),ALTCNT=1
  • ccr/trunk/p/GPLCCR.m

    r262 r266  
    109109    . ; W OXML,!
    110110    . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL
    111     . I DEBUG W "RUNNING ",CALL,!
     111    . W "RUNNING ",CALL,!
    112112    . X CALL
    113113    . ; NOW INSERT THE RESULTS IN THE CCR BUFFER
     
    134134    D PUSH^GPLXPATH(TAB,"EXTRACT;CCRMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
    135135    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITAL;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
    136     I TESTLAB D PUSH^GPLXPATH(TAB,"EXTRACT;GPLLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""GPLCCR"",$J,DFN,""RESULTS"")")
     136    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""GPLCCR"",$J,DFN,""RESULTS"")")
    137137    I TESTALERT D PUSH^GPLXPATH(TAB,"EXTRACT;GPLALERT;//ContinuityOfCareRecord/Body/Alerts;^TMP(""GPLCCR"",$J,DFN,""ALERTS"")")
    138138    Q
  • ccr/trunk/p/GPLLABS.m

    r265 r266  
    1818 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    1919           ;
    20 EXTRACT(DFN) ; EXTRACT LABS INTO PROVIDED XML TEMPLATE
     20EXTRACT(ILXML,DFN,OLXML) ; EXTRACT LABS INTO THE C0CLVAR GLOBAL
    2121 ;
    2222 ; LABXML AND LABOUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
     
    2525 ;
    2626 D GHL7 ; GET HL7 MESSAGE FOR THIS PATIENT
    27  S C0CLB=$NA(^TMP("GPLCCR",$J,"LABS")) ; BASE GLB FOR LABS VARS
     27 S C0CLB=$NA(^TMP("GPLCCR",$J,"RESULTS")) ; BASE GLB FOR LABS VARS
    2828 K @C0CLB ; CLEAR OUT OLD VARS IF ANY
    2929 S C0CSILENT=1 ; SURPRESS LISTING
    3030 D LIST ; EXTRACT THE VARIABLES
     31 K C0CSILENT ; RESET SILENT FLAG
     32 I $D(OLXML) S @OLXML@(0)=0 ; EXTRACT DOES NOT PRODUCE XML... SEE MAP^GPLLABS
    3133 Q
    3234     ;
     
    4749 ; N C0CI,C0CJ,C0COBT,C0CHB,C0CVAR
    4850 ; D EXTRACT^GPLLABS(1)
    49  I '$D(C0CLB) S C0CLB=$NA(^TMP("GPLCCR",$J,"LABS")) ; BASE GLB FOR LABS VARS
     51 I '$D(C0CLB) S C0CLB=$NA(^TMP("GPLCCR",$J,"RESULTS")) ; BASE GLB FOR LABS VARS
    5052 I '$D(C0CSILENT) S C0CSILENT=0
    5153 I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT
     
    9799 . . W C0CI," ",C0CTYP,!
    98100 . ; S C0CI=$O(@C0CHB@(C0CI))
    99  K ^TMP("GPLRIM","VARS",DFN,"LABS")
    100  M ^TMP("GPLRIM","VARS",DFN,"LABS")=@C0CLB
     101 ;K ^TMP("GPLRIM","VARS",DFN,"RESULTS")
     102 ;M ^TMP("GPLRIM","VARS",DFN,"RESULTS")=@C0CLB
    101103 Q
    102104LTYP(OSEG,OTYP,OVARA,OC0CSILENT) ;
  • 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.