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