testing CCRMEDS3

This commit is contained in:
george 2008-10-28 00:17:14 +00:00
parent c9d44ff84f
commit fc1c853582
1 changed files with 10 additions and 5 deletions

View File

@ -152,8 +152,12 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEM
. ; --- END OF DIRECTIONS ---
. ;
. ; S @MAP@("MEDPTINSTRUCTIONS","F")="52.41^105"
. S @MAP@("MEDPTINSTRUCTIONS")=MED(10,1) ; WP Field
. S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MED(14,1) ; WP Field
. I $D(MED(10,1)) D ;
. . S @MAP@("MEDPTINSTRUCTIONS")=MED(10,1) ; WP Field
. E S @MAP@("MEDPTINSTRUCTIONS")=""
. I $D(MED(14,1)) D ;
. . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MED(14,1) ; WP Field
. E S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=""
. S @MAP@("MEDRFNO")=""
. N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"MAPPED"))
. K @RESULT
@ -170,9 +174,10 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEM
. . . S MDZNA=$NA(@MAP@("M","DIRECTIONS",MDZ1))
. . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2)
. . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication")
. 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
D PARY^GPLXPAT(OUTXML) ;LETS LOOK AT IT
. I MEDFIRST D ;
. . S MEDFIRST=0 ; RESET FIRST FLAG
. . D CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy
. D:'MEDFIRST INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER FIRST, INSERT INNER XML
N MEDTMP,MEDI
D MISSING^GPLXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
I MEDTMP(0)>0 D ; IF THERE ARE MISSING VARS - MARKED AS @@X@@