- Timestamp:
- Nov 9, 2008, 11:56:39 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLALERT.m
r256 r266 33 33 ; DEFINE MAPPING 34 34 N ALTTVMAP,ALTVMAP,ALTTARYTMP,ALTARYTMP 35 S ALTTVMAP=$NA(^TMP("GPL ALERT",$J,"ALERTS"))36 S ALTTARYTMP=$NA(^TMP("GPL ALERT",$J,"ALERTSARYTMP"))35 S ALTTVMAP=$NA(^TMP("GPLCCR",$J,"ALERTS")) 36 S ALTTARYTMP=$NA(^TMP("GPLCCR",$J,"ALERTSARYTMP")) 37 37 K @ALTTVMAP,@ALTTARYTMP 38 38 N ALTTMP,ALTCNT S ALTG=$NA(GMRAL),ALTCNT=1 -
ccr/trunk/p/GPLCCR.m
r262 r266 109 109 . ; W OXML,! 110 110 . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL 111 . I DEBUGW "RUNNING ",CALL,!111 . W "RUNNING ",CALL,! 112 112 . X CALL 113 113 . ; NOW INSERT THE RESULTS IN THE CCR BUFFER … … 134 134 D PUSH^GPLXPATH(TAB,"EXTRACT;CCRMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")") 135 135 D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITAL;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")") 136 I TESTLABD 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"")") 137 137 I TESTALERT D PUSH^GPLXPATH(TAB,"EXTRACT;GPLALERT;//ContinuityOfCareRecord/Body/Alerts;^TMP(""GPLCCR"",$J,DFN,""ALERTS"")") 138 138 Q -
ccr/trunk/p/GPLLABS.m
r265 r266 18 18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 19 ; 20 EXTRACT( DFN) ; EXTRACT LABS INTO PROVIDED XML TEMPLATE20 EXTRACT(ILXML,DFN,OLXML) ; EXTRACT LABS INTO THE C0CLVAR GLOBAL 21 21 ; 22 22 ; LABXML AND LABOUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED … … 25 25 ; 26 26 D GHL7 ; GET HL7 MESSAGE FOR THIS PATIENT 27 S C0CLB=$NA(^TMP("GPLCCR",$J," LABS")) ; BASE GLB FOR LABS VARS27 S C0CLB=$NA(^TMP("GPLCCR",$J,"RESULTS")) ; BASE GLB FOR LABS VARS 28 28 K @C0CLB ; CLEAR OUT OLD VARS IF ANY 29 29 S C0CSILENT=1 ; SURPRESS LISTING 30 30 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 31 33 Q 32 34 ; … … 47 49 ; N C0CI,C0CJ,C0COBT,C0CHB,C0CVAR 48 50 ; D EXTRACT^GPLLABS(1) 49 I '$D(C0CLB) S C0CLB=$NA(^TMP("GPLCCR",$J," LABS")) ; BASE GLB FOR LABS VARS51 I '$D(C0CLB) S C0CLB=$NA(^TMP("GPLCCR",$J,"RESULTS")) ; BASE GLB FOR LABS VARS 50 52 I '$D(C0CSILENT) S C0CSILENT=0 51 53 I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT … … 97 99 . . W C0CI," ",C0CTYP,! 98 100 . ; S C0CI=$O(@C0CHB@(C0CI)) 99 K ^TMP("GPLRIM","VARS",DFN,"LABS")100 M ^TMP("GPLRIM","VARS",DFN,"LABS")=@C0CLB101 ;K ^TMP("GPLRIM","VARS",DFN,"RESULTS") 102 ;M ^TMP("GPLRIM","VARS",DFN,"RESULTS")=@C0CLB 101 103 Q 102 104 LTYP(OSEG,OTYP,OVARA,OC0CSILENT) ; -
ccr/trunk/p/GPLRIMA.m
r265 r266 65 65 . I $D(^TMP("GPLCCR",$J,"MEDMAP",1)) D ; MEDS VARS EXISTS 66 66 . . M @RIMBASE@("VARS",RIMDFN,"MEDS")=^TMP("GPLCCR",$J,"MEDMAP") 67 . I $D(^TMP("GPL ALERT",$J,"ALERTS",1,"ALERTOBJECTID")) D ; ALERTS EXIST67 . I $D(^TMP("GPLCCR",$J,"ALERTS",1,"ALERTOBJECTID")) D ; ALERTS EXIST 68 68 . . 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") 70 73 . K ^TMP("GPLCCR",$J) ; KILL WORK AREA FOR CCR BUILDING 71 74 . ; … … 118 121 . . F ZI=1:1:ZR(0) D ; LOOP THROUGH RETURNED VAR^VALUE PAIRS 119 122 . . . 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 120 131 ; D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED 121 132 W "ATTRIBUTES: ",SATTR,! … … 298 309 D APUSH(RIMTBL,"ALERTS") 299 310 D APUSH(RIMTBL,"ALERTSCODE") 311 D APUSH(RIMTBL,"RESULTS") 312 D APUSH(RIMTBL,"LABSLN") 300 313 Q 301 314 ;
Note:
See TracChangeset
for help on using the changeset viewer.