moved CCD Problems HTML narrative to the template
This commit is contained in:
parent
53950bfbb9
commit
40551e4f37
|
@ -207,6 +207,13 @@ MARKUP ;<MARKUP>
|
||||||
;;</serviceEvent>
|
;;</serviceEvent>
|
||||||
;;</documentationOf>
|
;;</documentationOf>
|
||||||
;;<Body>
|
;;<Body>
|
||||||
|
;;<PROBLEMS-HTML>
|
||||||
|
;;<text><table border="1" width="100%"><thead><tr><th>Condition</th><th>Effective Dates</th><th>Condition Status</th></tr></thead><tbody>
|
||||||
|
;;<tr><td>@@PROBLEMDESCRIPTION@@</td>
|
||||||
|
;;<td>@@PROBLEMDATEOFONSET@@</td>
|
||||||
|
;;<td>Active</td></tr>
|
||||||
|
;;</tbody></table></text>
|
||||||
|
;;</PROBLEMS-HTML>
|
||||||
;;<Problems>
|
;;<Problems>
|
||||||
;;<component>
|
;;<component>
|
||||||
;;<section>
|
;;<section>
|
||||||
|
|
27
p/GPLPROBS.m
27
p/GPLPROBS.m
|
@ -74,24 +74,19 @@ 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,I,ZX
|
. N HTMP,HOUT,HTMLO,I,ZX
|
||||||
. S ZX="<text><table border=""1"" width=""100%""><thead><tr><th>Condition</th><th>Effective Dates</th><th>Condition Status</th></tr></thead><tbody>"
|
|
||||||
. D PUSH^GPLXPATH("HTMP",ZX) ; HEADER OF THE TABLE
|
|
||||||
. F I=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM
|
. F I=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM
|
||||||
. . S VMAP=$NA(@TVMAP@(I))
|
. . S VMAP=$NA(@TVMAP@(I))
|
||||||
. . S ZX="<tr><td>" ; BEGIN ROW AND COL
|
. . D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Body/PROBLEMS-HTML","HTMP") ; GET THE HTML FROM THE TEMPLATE
|
||||||
. . S ZX=ZX_@VMAP@("PROBLEMDESCRIPTION")
|
. . D UNMARK^GPLXPATH("HTMP") ; REMOVE <PROBLEMS-HTML> MARKUP
|
||||||
. . S ZX=ZX_"</td><td>" ; NEXT COL
|
. . ; D PARY^GPLXPATH("HTMP") ; PRINT IT
|
||||||
. . D PUSH^GPLXPATH("HTMP",ZX) ; ADD TO BUFFER
|
. . D MAP^GPLXPATH("HTMP",VMAP,"HOUT") ; MAP THE VARIABLES
|
||||||
. . S ZX=@VMAP@("PROBLEMDATEOFONSET")
|
. . ; D PARY^GPLXPATH("HOUT") ; PRINT IT AGAIN
|
||||||
. . I ZX="" S ZX="Unknown" ; SET TO UNKNOWN
|
. . I I=1 D ; FIRST ONE IS JUST A COPY
|
||||||
. . D PUSH^GPLXPATH("HTMP",ZX)
|
. . . D CP^GPLXPATH("HOUT","HTMLO")
|
||||||
. . S ZX="</td><td>" ; NEXT COL
|
. . I I>1 D ; AFTER THE FIRST, INSERT INNER HTML
|
||||||
. . S ZX=ZX_"Active" ; WE ONLY DO ACTIVE
|
. . . D INSINNER^GPLXPATH("HOUT","HTMLO","//")
|
||||||
. . S ZX=ZX_"</td></tr>" ; END OF COL AND ROW
|
. D INSB4^GPLXPATH(OUTXML,"HTMLO") ; INSERT AT TOP OF SECTION
|
||||||
. . D PUSH^GPLXPATH("HTMP",ZX)
|
|
||||||
. D PUSH^GPLXPATH("HTMP","</tbody></table></text>") ; END TABLE
|
|
||||||
. D INSB4^GPLXPATH(OUTXML,"HTMP") ; 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
|
||||||
I PROBSTMP(0)>0 D ; IF THERE ARE MISSING VARS -
|
I PROBSTMP(0)>0 D ; IF THERE ARE MISSING VARS -
|
||||||
|
|
12
p/GPLUNIT.m
12
p/GPLUNIT.m
|
@ -68,7 +68,7 @@ ZLOAD(ZARY,ROUTINE) ; load tests into ZARY which is passed by reference
|
||||||
Q
|
Q
|
||||||
;
|
;
|
||||||
ZTEST(ZARY,WHICH) ; try out the tests using a passed array ZTEST
|
ZTEST(ZARY,WHICH) ; try out the tests using a passed array ZTEST
|
||||||
N I,ZX,ZR,ZP
|
N ZI,ZX,ZR,ZP
|
||||||
S DEBUG=0
|
S DEBUG=0
|
||||||
; I WHICH="ALL" D Q ; RUN ALL THE TESTS
|
; I WHICH="ALL" D Q ; RUN ALL THE TESTS
|
||||||
; . W "DOING ALL",!
|
; . W "DOING ALL",!
|
||||||
|
@ -84,16 +84,16 @@ ZTEST(ZARY,WHICH) ; try out the tests using a passed array ZTEST
|
||||||
N FIRST,LAST
|
N FIRST,LAST
|
||||||
S FIRST=$P(ZARY(WHICH),"^",1)
|
S FIRST=$P(ZARY(WHICH),"^",1)
|
||||||
S LAST=$P(ZARY(WHICH),"^",2)
|
S LAST=$P(ZARY(WHICH),"^",2)
|
||||||
F I=FIRST:1:LAST D
|
F ZI=FIRST:1:LAST D
|
||||||
. I ZARY(I)?1">"1.E D ; NOT A TEST, JUST RUN THE STATEMENT
|
. I ZARY(ZI)?1">"1.E D ; NOT A TEST, JUST RUN THE STATEMENT
|
||||||
. . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
|
. . S ZP=$E(ZARY(ZI),2,$L(ZARY(ZI)))
|
||||||
. . ; W ZP,!
|
. . ; W ZP,!
|
||||||
. . S ZX=ZP
|
. . S ZX=ZP
|
||||||
. . W "RUNNING: "_ZP
|
. . W "RUNNING: "_ZP
|
||||||
. . X ZX
|
. . X ZX
|
||||||
. . W "..SUCCESS: ",WHICH,!
|
. . W "..SUCCESS: ",WHICH,!
|
||||||
. I ZARY(I)?1"?"1.E D ; THIS IS A TEST
|
. I ZARY(ZI)?1"?"1.E D ; THIS IS A TEST
|
||||||
. . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
|
. . S ZP=$E(ZARY(ZI),2,$L(ZARY(ZI)))
|
||||||
. . S ZX="S ZR="_ZP
|
. . S ZX="S ZR="_ZP
|
||||||
. . W "TRYING: "_ZP
|
. . W "TRYING: "_ZP
|
||||||
. . X ZX
|
. . X ZX
|
||||||
|
|
Loading…
Reference in New Issue