From 4da383b2849de59a61a320bf5e4a790b7fc8658a Mon Sep 17 00:00:00 2001 From: george Date: Tue, 7 Oct 2008 16:26:38 +0000 Subject: [PATCH] MEDS DEBUGGING --- p/CCRMEDS.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p/CCRMEDS.m b/p/CCRMEDS.m index 34f2576..0de1b4e 100644 --- a/p/CCRMEDS.m +++ b/p/CCRMEDS.m @@ -64,7 +64,7 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE M GPLMEDS=MEDRSLT S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) - I 'HASOP K @MEDTVMAP,@MEDTARYTMP + ; I 'HASOP K @MEDTVMAP,@MEDTARYTMP KILL MOVED TO TOP OF ROUTINE ; FIRST GO THROUGH MEDRSLT ARRAY AND COUNT MEDS AND LINES IN MEDS ; ZA(0) IS TOTAL NUMBER OF MEDS ZA(ZI) IS LINES IN MED ZI N ZA,ZI,ZJ,ZK,ZN S (ZI,ZJ,ZK,ZN)=0 ; ZI IS MED NUMBER, ZJ IS LINE IN MED @@ -87,9 +87,9 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE . S MEDPTMP=MEDRSLT(ZJ) ; PULL OUT FIRST LINE OF MED . I $P(MEDPTMP,U,1)?1"~OP" Q ; SKIP OP ACTIVE AND PENDING . S MEDCNT=MEDCNT+1 ; WE ARE GOING TO ADD A MED - . S MEDVMAP=$NA(@MEDTVMAP@(ZI+MEDCNT)) ; START PAST OP ACTIVE MEDS + . S MEDVMAP=$NA(@MEDTVMAP@(MEDCNT)) ; START PAST OP ACTIVE MEDS . S @MEDTVMAP@(0)=@MEDTVMAP@(0)+1 ; ADDING A MED HERE - . S @MEDVMAP@("MEDOBJECTID")="MED"_(ZI+MEDCNT) ; UNIQUE OBJID FOR MEDS + . S @MEDVMAP@("MEDOBJECTID")="MED"_(MEDCNT) ; UNIQUE OBJID FOR MEDS . I $P(MEDPTMP,"^",11)="" S @MEDVMAP@("MEDISSUEDATETXT")="" . E S @MEDVMAP@("MEDISSUEDATETXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE . S @MEDVMAP@("MEDISSUEDATE")=""