MED DEBUGING

This commit is contained in:
george 2008-10-07 14:56:53 +00:00
parent 8bb7f131c2
commit dd0aa22f48
1 changed files with 5 additions and 2 deletions

View File

@ -35,7 +35,8 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS
. S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML
. S MEDCNT=@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. S MEDCNT=MEDCNT+@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. W MEDCNT,!
. W "HAS ACTIVE OP MEDS",!
N PENDINGXML,MEDPENDING
S PENDINGXML="MEDPENDING" ;NAME FOR ARRAY
@ -45,7 +46,8 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. I @MEDOUTXML@(0)>0 D ; IF WE NEED TO COMBINE MEDS
. . D INSINNER^GPLXPATH(MEDOUTXML,PENDINGXML) ;ADD PENDING TO ACTIVE
. E D CP^GPLXPATH(PENDINGXML,MEDOUTXML) ; NO ACTIVE MEDS, JUST COPY
. S MEDCNT=@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. S MEDCNT=MEDCNT+@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. W MEDCNT,!
. W "HAS OP PENDING MEDS",!
N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF
D ACTIVE^ORWPS(.MEDRSLT,DFN)
@ -76,6 +78,7 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
F ZI=1:1:ZA(0) D ; FOR EACH MED
. I DEBUG W "ZI IS ",ZI,!
. S MEDVMAP=$NA(@MEDTVMAP@(ZI+MEDCNT)) ; START PAST OP ACTIVE MEDS
. W ZI," ",MEDCNT,!
. K @MEDVMAP
. I DEBUG W "VMAP= ",MEDVMAP,!
. S ZJ=$P(ZA(ZI),U,1) ; INDEX OF FIRST LINE OF MED IN MEDRSLT