CCRMEDS yet again

This commit is contained in:
sam 2008-09-22 02:09:17 +00:00
parent 9c30ed5e09
commit bb13c4df44
2 changed files with 5 additions and 4 deletions

View File

@ -83,6 +83,7 @@ EXTRACT(INXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. N NDFDATA M NDFDATA=^TMP($J,"CONC",MEDIEN)
. N NDFIEN S NDFIEN=$P(NDFDATA(20),U)
. N VAPROD S VAPROD=$P(NDFDATA(22),U)
. B:NDFIEN=""
. N CONCDATA S CONCDATA=$$CPRS^PSNAPIS(NDFIEN,VAPROD)
. S @MAP@("MEDFORMTEXT")=$P(CONCDATA,U,1)
. S @MAP@("MEDCONCVALUE")=$P(CONCDATA,U,3)
@ -158,7 +159,7 @@ EXTRACT(INXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. S @MAP@("MEDRFNO")=MED(9)
. N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"RESULT"))
. K @RESULT
. D MAP^GPLXPATH(INXML,MAP,RESULT)
. D MAP^GPLXPATH($NA(INXML),MAP,RESULT)
. D:MEDCOUNT=1 CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy
. D:MEDCOUNT>1 INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML
N MEDTMP,MEDI

View File

@ -12,10 +12,10 @@ MEDS
W "XPATH is: "_XPATH,!
W "Getting Med Template into INXML using",!
W "QUERY^GPLXPATH(T,XPATH,""INXML"")",!!
N INXML
D QUERY^GPLXPATH(T,XPATH,"INXML")
W "Executing EXTRACT^CCRMEDS(""INXML"",DFN,OUTXML)",!
B
W "Executing EXTRACT^CCRMEDS(INXML,DFN,OUTXML)",!
W "OUTXML will be ^TMP($J,""OUT"")",!
N OUTXML S OUTXML=$NA(^TMP($J,"OUT"))
D EXTRACT^CCRMEDS("INXML",DFN,OUTXML)
D EXTRACT^CCRMEDS(.INXML,DFN,OUTXML)
Q