added placeholders in GPLMEDS.m for values
added comment in GPLCCR.m describing order of CCR Body added processing of MEDS in GPLCCR.m (commented out)
This commit is contained in:
parent
89cbb25a0c
commit
cb206995de
|
@ -99,7 +99,9 @@ CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT
|
||||||
INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
|
INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
|
||||||
; TAB IS PASSED BY NAME
|
; TAB IS PASSED BY NAME
|
||||||
W "TAB= ",TAB,!
|
W "TAB= ",TAB,!
|
||||||
|
; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS
|
||||||
D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""GPLCCR"",$J,DFN,""PROBLEMS"")")
|
D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""GPLCCR"",$J,DFN,""PROBLEMS"")")
|
||||||
|
;D PUSH^GPLXPATH(TAB,"EXTRACT;GPLMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
|
||||||
D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
|
D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
|
||||||
Q
|
Q
|
||||||
;
|
;
|
||||||
|
|
68
p/GPLMEDS.m
68
p/GPLMEDS.m
|
@ -1,4 +1,4 @@
|
||||||
GPLVITALS ; CCDCCR/CJE - CCR/CCD PROCESSING FOR MEDICATIONS ; 07/16/08
|
GPLMEDS ; CCDCCR/CJE - CCR/CCD PROCESSING FOR MEDICATIONS ; 07/16/08
|
||||||
;;0.1;CCDCCR;;JUL 16,2008;
|
;;0.1;CCDCCR;;JUL 16,2008;
|
||||||
;Copyright 2008 WorldVistA. Licensed under the terms of the GNU
|
;Copyright 2008 WorldVistA. Licensed under the terms of the GNU
|
||||||
;General Public License See attached copy of the License.
|
;General Public License See attached copy of the License.
|
||||||
|
@ -27,31 +27,49 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML T
|
||||||
; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE
|
; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE
|
||||||
;
|
;
|
||||||
N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF
|
N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF
|
||||||
; REPLACE ME WITH MEDS RPC!!
|
D ACTIVE^ORWPS(.MEDRSLT,DFN)
|
||||||
|
ZWR MEDRSLT
|
||||||
|
Q
|
||||||
I '$D(MEDRSLT(1)) W "ERROR RUNNINIG MEDICATIONS RPC",! Q
|
I '$D(MEDRSLT(1)) W "ERROR RUNNINIG MEDICATIONS RPC",! Q
|
||||||
; ZWR RPCRSLT
|
S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS"))
|
||||||
S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"VITALS"))
|
S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
|
||||||
S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"VITALARYTMP"))
|
F J=1:1 Q:'$D(MEDRSLT(J)) D ; FOR EACH MEDICATION IN THE LIST
|
||||||
F J=1:1:MEDRSLT(1) D ; FOR EACH MEDICATION IN THE LIST
|
. S MEDVMAP=$NA(@MEDTVMAP@(J))
|
||||||
. I $D(MEDRSLT(J)) D
|
. K @MEDVMAP
|
||||||
. . S MEDVMAP=$NA(@MEDTVMAP@(J))
|
. I DEBUG W "VMAP= ",VMAP,!
|
||||||
. . K @MEDVMAP
|
. S MEDPTMP=MEDRSLT(J) ; PULL OUT MEDICATION FROM RPC RETURN ARRAY
|
||||||
. . I DEBUG W "VMAP= ",VMAP,!
|
. S @MEDVMAP@("MEDICATIONOBJECTID")="MED"_J ; UNIQUE OBJID FOR MEDICATION
|
||||||
. . S MEDPTMP=MEDRSLT(J) ; PULL OUT MEDICATION FROM RPC RETURN ARRAY
|
. ; PROCESSING FOR MEDS GOES HERE
|
||||||
. . S @MEDVMAP@("MEDDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR MEDICATION
|
. S @MEDVMAP@("MEDICATIONDATETIMETEXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT")
|
||||||
. . ; PROCESSING FOR MEDS GOES HERE
|
. S @MEDVMAP@("MEDICATIONDATETIMEAGE")="TEST2"
|
||||||
. . S MEDARYTMP=$NA(@MEDTARYTMP@(J))
|
. S @MEDVMAP@("MEDICATIONDATETIMEAGEUNITS")="TEST3"
|
||||||
. . K @MEDARYTMP
|
. S @MEDVMAP@("MEDICATIONTYPETEXT")="TEST4"
|
||||||
. . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
|
. S @MEDVMAP@("MEDICATIONSTATUSTEXT")=$P(MEDPTMP,"^",10)
|
||||||
. . I J=1 D ; FIRST ONE IS JUST A COPY
|
. S @MEDVMAP@("MEDICATIONSOURCEACTORID")="TEST6"
|
||||||
. . . ; W "FIRST ONE",!
|
. S @MEDVMAP@("MEDICATIONPRODUCTNAMETEXT")="TEST7"
|
||||||
. . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
|
. S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVALUE")="TEST8"
|
||||||
. . . ; W "OUTXML ",OUTXML,!
|
. S @MEDVMAP@("MEDICATIONPRODUCTNAMECODINGINGSYSTEM")="TEST9"
|
||||||
. . I J>1 D ; AFTER THE FIRST, INSERT INNER XML
|
. S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVERSION")="TEST10"
|
||||||
. . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
|
. S @MEDVMAP@("MEDICATIONBRANDNAMETEXT")="TEST11"
|
||||||
; ZWR ^TMP($J,"VITALS",*)
|
. S @MEDVMAP@("MEDICATIONBRANDNAMECODEVALUE")="TEST12"
|
||||||
; ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
|
. S @MEDVMAP@("MEDICATIONBRANDNAMECODINGSYSTEM")="TEST13"
|
||||||
; ZWR @OUTXML
|
. S @MEDVMAP@("MEDICATIONBRANDNAMECODEVERSION")="TEST14"
|
||||||
|
. S @MEDVMAP@("MEDICATIONSTRENGTHVALUE")="TEST15"
|
||||||
|
. S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")="TEST16"
|
||||||
|
. S @MEDVMAP@("MEDICATIONFORMTEXT")="TEST17"
|
||||||
|
. S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")="TEST18"
|
||||||
|
. S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")="TEST19"
|
||||||
|
. S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")="TEST20"
|
||||||
|
. S @MEDVMAP@("MEDICATIONDIRECTIONFREQUENCYVALUE")="TEST21"
|
||||||
|
. S J=J+3
|
||||||
|
. S MEDARYTMP=$NA(@MEDTARYTMP@(J))
|
||||||
|
. K @MEDARYTMP
|
||||||
|
. D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
|
||||||
|
. I J=1 D ; FIRST ONE IS JUST A COPY
|
||||||
|
. . ; W "FIRST ONE",!
|
||||||
|
. . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
|
||||||
|
. I J>1 D ; AFTER THE FIRST, INSERT INNER XML
|
||||||
|
. . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
|
||||||
N MEDTMP,I
|
N MEDTMP,I
|
||||||
D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
|
D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
|
||||||
I MEDTMP(0)>0 D ; IF THERE ARE MISSING VARS - MARKED AS @@X@@
|
I MEDTMP(0)>0 D ; IF THERE ARE MISSING VARS - MARKED AS @@X@@
|
||||||
|
|
Loading…
Reference in New Issue