Fixes for CCD narrative and no vitals processing

This commit is contained in:
george 2008-08-12 18:45:52 +00:00
parent 048e3cc26c
commit c0f8b2738c
2 changed files with 18 additions and 9 deletions

View File

@ -40,7 +40,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE
F J=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM IN THE LIST F J=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM IN THE LIST
. S VMAP=$NA(@TVMAP@(J)) . S VMAP=$NA(@TVMAP@(J))
. K @VMAP . K @VMAP
. I DEBUG W "VMAP= ",VMAP,! . W "VMAP= ",VMAP,!
. S PTMP=RPCRSLT(J) ; PULL OUT PROBLEM FROM RPC RETURN ARRAY . S PTMP=RPCRSLT(J) ; PULL OUT PROBLEM FROM RPC RETURN ARRAY
. S @VMAP@("PROBLEMOBJECTID")="PROBLEM"_J ; UNIQUE OBJID FOR PROBLEM . S @VMAP@("PROBLEMOBJECTID")="PROBLEM"_J ; UNIQUE OBJID FOR PROBLEM
. S @VMAP@("PROBLEMIEN")=$P(PTMP,U,1) . S @VMAP@("PROBLEMIEN")=$P(PTMP,U,1)
@ -77,18 +77,27 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE
; $$HTML^DILF( ; $$HTML^DILF(
; GENERATE THE NARITIVE HTML FOR THE CCD ; GENERATE THE NARITIVE HTML FOR THE CCD
I CCD D ; IF THIS IS FOR A CCD I CCD D ; IF THIS IS FOR A CCD
. N HTMP,HOUT,HTMLO,I,ZX . N HTMP,HOUT,HTMLO,GPLPROBI,ZX
. F I=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM . F GPLPROBI=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM
. . S VMAP=$NA(@TVMAP@(I)) . . S VMAP=$NA(@TVMAP@(GPLPROBI))
. . W "VMAP =",VMAP,!
. . D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Body/PROBLEMS-HTML","HTMP") ; GET THE HTML FROM THE TEMPLATE . . D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Body/PROBLEMS-HTML","HTMP") ; GET THE HTML FROM THE TEMPLATE
. . D UNMARK^GPLXPATH("HTMP") ; REMOVE <PROBLEMS-HTML> MARKUP . . D UNMARK^GPLXPATH("HTMP") ; REMOVE <PROBLEMS-HTML> MARKUP
. . ; D PARY^GPLXPATH("HTMP") ; PRINT IT . . ; D PARY^GPLXPATH("HTMP") ; PRINT IT
. . D MAP^GPLXPATH("HTMP",VMAP,"HOUT") ; MAP THE VARIABLES . . D MAP^GPLXPATH("HTMP",VMAP,"HOUT") ; MAP THE VARIABLES
. . ; D PARY^GPLXPATH("HOUT") ; PRINT IT AGAIN . . ; D PARY^GPLXPATH("HOUT") ; PRINT IT AGAIN
. . I I=1 D ; FIRST ONE IS JUST A COPY . . I GPLPROBI=1 D ; FIRST ONE IS JUST A COPY
. . . D CP^GPLXPATH("HOUT","HTMLO") . . . D CP^GPLXPATH("HOUT","HTMLO")
. . I I>1 D ; AFTER THE FIRST, INSERT INNER HTML . . I GPLPROBI>1 D ; AFTER THE FIRST, INSERT INNER HTML
. . . D INSINNER^GPLXPATH("HOUT","HTMLO","//") . . . W "DOING INNER",!
. . . N HTMLBLD,HTMLTMP
. . . D QUEUE^GPLXPATH("HTMLBLD","HTMLO",1,HTMLO(0)-1)
. . . D QUEUE^GPLXPATH("HTMLBLD","HOUT",2,HOUT(0)-1)
. . . D QUEUE^GPLXPATH("HTMLBLD","HTMLO",HTMLO(0),HTMLO(0))
. . . D BUILD^GPLXPATH("HTMLBLD","HTMLTMP")
. . . D CP^GPLXPATH("HTMLTMP","HTMLO")
. . . ; D INSINNER^GPLXPATH("HOUT","HTMLO","//")
. D PARY^GPLXPATH("HTMLO")
. D INSB4^GPLXPATH(OUTXML,"HTMLO") ; INSERT AT TOP OF SECTION . D INSB4^GPLXPATH(OUTXML,"HTMLO") ; INSERT AT TOP OF SECTION
N PROBSTMP,I N PROBSTMP,I
D MISSING^GPLXPATH(ARYTMP,"PROBSTMP") ; SEARCH XML FOR MISSING VARS D MISSING^GPLXPATH(ARYTMP,"PROBSTMP") ; SEARCH XML FOR MISSING VARS

View File

@ -27,8 +27,8 @@ EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE
; ;
N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF
D VITALS^ORQQVI(.VITRSLT,DFN,"","") D VITALS^ORQQVI(.VITRSLT,DFN,"","")
I '$D(VITRSLT(1)) D ; NULL RESULT FROM RPC I $P(VITRSLT(1),U,2)="No vitals found." D ; NULL RESULT FROM RPC
. W "NULL RESULT FROM VITALS RPC",! . W "NO VITALS FOUND FROM VITALS RPC",!
. S @VITOUTXML@(0)=0 . S @VITOUTXML@(0)=0
. Q . Q
; ZWR RPCRSLT ; ZWR RPCRSLT