From dd0aa22f489ac7e46279019cd132655e2cd915b9 Mon Sep 17 00:00:00 2001 From: george Date: Tue, 7 Oct 2008 14:56:53 +0000 Subject: [PATCH] MED DEBUGING --- p/CCRMEDS.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/p/CCRMEDS.m b/p/CCRMEDS.m index 7af6fc9..8c561f5 100644 --- a/p/CCRMEDS.m +++ b/p/CCRMEDS.m @@ -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