MEDS DEBUGGING

This commit is contained in:
george 2008-10-07 15:05:30 +00:00
parent dd0aa22f48
commit 7a08629ad7
1 changed files with 5 additions and 2 deletions

View File

@ -32,10 +32,13 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
; NON-VA MEDS IN EXTRACT^CCRMEDS3 ; NON-VA MEDS IN EXTRACT^CCRMEDS3
; INPATIENT MEDS IN EXTRACT^CCRMEDS4 ; INPATIENT MEDS IN EXTRACT^CCRMEDS4
; ALL OTHERS HERE ; ALL OTHERS HERE
S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP"))
S @MEDTVMAP@(0)=0 ; INITIALIZE NUMBER OF MEDS PROCESSED
S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS
. S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML . S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML
. S MEDCNT=MEDCNT+@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP . S MEDCNT=MEDCNT+@MEDTVMAP@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. W MEDCNT,! . W MEDCNT,!
. W "HAS ACTIVE OP MEDS",! . W "HAS ACTIVE OP MEDS",!
N PENDINGXML,MEDPENDING N PENDINGXML,MEDPENDING
@ -46,7 +49,7 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. I @MEDOUTXML@(0)>0 D ; IF WE NEED TO COMBINE MEDS . I @MEDOUTXML@(0)>0 D ; IF WE NEED TO COMBINE MEDS
. . D INSINNER^GPLXPATH(MEDOUTXML,PENDINGXML) ;ADD PENDING TO ACTIVE . . D INSINNER^GPLXPATH(MEDOUTXML,PENDINGXML) ;ADD PENDING TO ACTIVE
. E D CP^GPLXPATH(PENDINGXML,MEDOUTXML) ; NO ACTIVE MEDS, JUST COPY . E D CP^GPLXPATH(PENDINGXML,MEDOUTXML) ; NO ACTIVE MEDS, JUST COPY
. S MEDCNT=MEDCNT+@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP . S MEDCNT=MEDCNT+@MEDTVMAP@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. W MEDCNT,! . W MEDCNT,!
. W "HAS OP PENDING MEDS",! . W "HAS OP PENDING MEDS",!
N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF