From 40551e4f371bec30222bf5d58c6be92974a4861c Mon Sep 17 00:00:00 2001 From: george Date: Wed, 6 Aug 2008 17:29:59 +0000 Subject: [PATCH] moved CCD Problems HTML narrative to the template --- p/GPLCCD1.m | 7 +++++++ p/GPLPROBS.m | 27 +++++++++++---------------- p/GPLUNIT.m | 12 ++++++------ 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/p/GPLCCD1.m b/p/GPLCCD1.m index ec72798..0d6d556 100644 --- a/p/GPLCCD1.m +++ b/p/GPLCCD1.m @@ -207,6 +207,13 @@ MARKUP ; ;; ;; ;; + ;; + ;; + ;; + ;; + ;; + ;;
ConditionEffective DatesCondition Status
@@PROBLEMDESCRIPTION@@@@PROBLEMDATEOFONSET@@Active
+ ;;
;; ;; ;;
diff --git a/p/GPLPROBS.m b/p/GPLPROBS.m index 861e687..1e09651 100644 --- a/p/GPLPROBS.m +++ b/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="" - . 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="" ; END OF COL AND ROW - . . D PUSH^GPLXPATH("HTMP",ZX) - . D PUSH^GPLXPATH("HTMP","
ConditionEffective DatesCondition Status
" ; BEGIN ROW AND COL - . . S ZX=ZX_@VMAP@("PROBLEMDESCRIPTION") - . . S ZX=ZX_"" ; 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="" ; NEXT COL - . . S ZX=ZX_"Active" ; WE ONLY DO ACTIVE - . . S ZX=ZX_"
") ; 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 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 - diff --git a/p/GPLUNIT.m b/p/GPLUNIT.m index 24635fe..589b56e 100644 --- a/p/GPLUNIT.m +++ b/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