Immunizations running and integrated (but without codes)

This commit is contained in:
george 2009-02-03 19:22:52 +00:00
parent 0ec1bf7602
commit 1737150301
2 changed files with 21 additions and 3 deletions

View File

@ -134,6 +134,7 @@ INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
D PUSH^GPLXPATH(TAB,"EXTRACT;CCRMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITAL;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
D PUSH^GPLXPATH(TAB,"MAP;GPLLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""GPLCCR"",$J,DFN,""RESULTS"")")
D PUSH^GPLXPATH(TAB,"MAP;GPLIMMU;//ContinuityOfCareRecord/Body/Immunizations;^TMP(""GPLCCR"",$J,DFN,""IMMUNE"")")
I TESTALERT D PUSH^GPLXPATH(TAB,"EXTRACT;GPLALERT;//ContinuityOfCareRecord/Body/Alerts;^TMP(""GPLCCR"",$J,DFN,""ALERTS"")")
Q
;

View File

@ -20,6 +20,24 @@ GPLIMMU ; CCDCCR/GPL - CCR/CCD PROCESSING FOR IMMUNIZATIONS ; 2/2/09
;
; PROCESS THE IMMUNIZATIONS SECTION OF THE CCR
;
MAP(IPXML,DFN,OUTXML) ; MAP IMMUNIZATIONS
;
N C0CZV,C0CZVI ; TO STORE MAPPED VARIABLES
N C0CZT ; TMP ARRAY OF MAPPED XML
S C0CZV=$NA(^TMP("GPLCCR",$J,"IMMUNE")) ; TEMP STORAGE FOR VARIABLES
D EXTRACT(IPXML,DFN,OUTXML) ;EXTRACT THE VARIABLES
B
N C0CZI,C0CZIC ; COUNT OF IMMUNIZATIONS
S C0CZIC=@C0CZV@(0) ; TOTAL FROM VARIABLE ARRAY
F C0CZI=1:1:C0CZIC D ;FOR EACH IMMUNIZATION
. S C0CZVI=$NA(@C0CZV@(C0CZI)) ;THIS IMMUNIZATION
. D MAP^GPLXPATH(IPXML,C0CZVI,"C0CZT") ;MAP THE VARIABLES TO XML
. I C0CZI=1 D ; FIRST ONE
. . D CP^GPLXPATH("C0CZT",OUTXML) ;JUST COPY RESULTS
. E D ;NOT THE FIRST
. . D INSINNER^GPLXPATH(OUTXML,"C0CZT")
Q
;
EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
;
; INXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
@ -29,7 +47,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
; INSERT^GPLXPATH IS USED TO APPEND THE PROBLEMS TO THE OUTPUT
;
N RPCRSLT,J,K,PTMP,X,VMAP,TBU
S TVMAP=$NA(^TMP("GPLCCR",$J,"IMMUVALS"))
S TVMAP=$NA(^TMP("GPLCCR",$J,"IMMUNE"))
S TARYTMP=$NA(^TMP("GPLCCR",$J,"IMMUARYTMP"))
S IMMA=$NA(^TMP("PXI",$J)) ;
K @IMMA ; CLEAR OUT PREVIOUS RESULTS
@ -59,7 +77,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
. . S @VMAP@("IMMUNEDATETIMETYPETEXT")="Immunization Date" ; ALL ARE THE SAME
. . S @VMAP@("IMMUNEDATETIME")=C0CT ;FORMATTED DATE/TIME
. . S C0CIP=$$ZVALUEI^C0CRNF("ENCOUNTER PROVIDER","C0CI") ;IEN OF PROVIDER
. . S @VMAP@("IMMUNESOURCEACTORID")="ACTORPROVIDOR_"_C0CIP
. . S @VMAP@("IMMUNESOURCEACTORID")="ACTORPROVIDER_"_C0CIP
. . S C0CIIEN=$$ZVALUEI^C0CRNF("IMMUNIZATION","C0CI") ;IEN OF IMMUNIZATION
. . ; FOR LOOKING UP THE CODE (TBD GPL)
. . S C0CIN=$$ZVALUE^C0CRNF("IMMUNIZATION","C0CI") ;NAME OF IMMUNIZATION
@ -67,7 +85,6 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
. . S @VMAP@("IMMUNEPRODUCTNAMETEXT")=C0CIN ;NAME
. . S @VMAP@("IMMUNEPRODUCTCODE")="" ;FIX THIS
. . S @VMAP@("IMMUNEPRODUCTCODESYSTEM")="" ;FIX THIS
B
Q
. S VMAP=$NA(@TVMAP@(J))
. K @VMAP