fix for RESULTTESTFLAG

This commit is contained in:
george 2008-11-12 14:14:51 +00:00
parent 9a31d412c7
commit fb0a474ee5
1 changed files with 5 additions and 4 deletions

View File

@ -43,7 +43,8 @@ RPCMAP(RTN,DFN,RMIVAR,RMIXML) ; RPC ENTRY POINT FOR MAPPING RESULTS
I '$D(DEBUG) S DEBUG=0 ; DEFAULT NO DEBUGGING
I RMIXML="" D ; INPUT XML NOT PASSED
. D LOAD^GPLCCR0("C0CT0") ; LOAD ENTIRE CCR TEMPLATE
. D QUERY^GPLXPATH("C0CT0","//ContinuityOfCareRecord/Body/Results","C0CT")
. D QUERY^GPLXPATH("C0CT0","//ContinuityOfCareRecord/Body/Results","C0CT0R")
. S C0CT="C0CT0R" ; NAME OF EXTRACTED RESULTS TEMPLATE
E S C0CT=RMIXML ; WE ARE PASSED THE RESULTS PART OF THE TEMPLATE
I RMIVAR="" D ; LOCATION OF VARIABLES NOT PASSED
. S C0CV=$NA(^TMP("GPLRIM","VARS",DFN,"RESULTS")) ;DEFAULT VARIABLE LOCATION
@ -127,7 +128,7 @@ LIST ; LIST THE HL7 MESSAGE; ALSO, EXTRACT THE RESULT VARIABLES TO C0CLB
I '$D(C0CQT) S C0CQT=0
I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT
I '$D(^KVAI(0)) D SETTBL ; INITIALIZE LAB TABLE
I ^KBAI(0)'="V1" D SETTBL ; NEED NEWEST VERSION
I ^KBAI(0)'="V2" D SETTBL ; NEED NEWEST VERSION
I '$D(^TMP("HLS",$J,1)) D GHL7 ; GET HL7 MGS IF NOT ALREADY DONE
S C0CTAB=$NA(^KBAI) ; BASE OF OBX TABLE
S C0CHB=$NA(^TMP("HLS",$J))
@ -141,8 +142,8 @@ LIST ; LIST THE HL7 MESSAGE; ALSO, EXTRACT THE RESULT VARIABLES TO C0CLB
. I C0CTYP="OBR" D ; BEGINNING OF NEW SECTION
. . S @C0CLB@(0)=@C0CLB@(0)+1 ; INCREMENT COUNT
. . S C0CLI=@C0CLB@(0) ; INDEX FOR THIS RESULT
. . S @C0CLB@(C0CLI,"RESULTOBJECTID")="RESULT_"_C0CLI
. . M @C0CLB@(C0CLI)=C0CVAR ; PERSIST THE OBR VARS
. . S @C0CLB@(C0CLI,"RESULTOBJECTID")="RESULT_"_C0CLI
. . S C0CLOBX=0 ; MARK THE BEGINNING OF A NEW SECTION
. I C0CTYP="OBX" D ; SPECIAL CASE FOR OBX3
. . ; RESULTTESTCODEVALUE
@ -321,6 +322,6 @@ SETTBL ;
S X("OBX","OBX16")="16^00584^Responsible Observer"
S X("OBX","OBX17")="17^00936^Observation Method"
M ^KBAI=X ; SET VALUES IN ^KBAI
S ^KBAI(0)="V1"
S ^KBAI(0)="V2"
Q
;