From c779e0dc5b82a3e7c51e3073d3192c7e13268809 Mon Sep 17 00:00:00 2001 From: george Date: Wed, 3 Sep 2008 23:54:55 +0000 Subject: [PATCH] more extraneous write cleanup --- p/GPLACTOR.m | 6 +++--- p/GPLCCR.m | 8 ++++---- p/GPLMEDS.m | 1 - p/GPLPROBS.m | 8 ++++---- p/GPLVITAL.m | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/p/GPLACTOR.m b/p/GPLACTOR.m index c9954c1..2ff28a5 100644 --- a/p/GPLACTOR.m +++ b/p/GPLACTOR.m @@ -36,7 +36,7 @@ EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE N I,J,AMAP,AOID,ATYP,AIEN D CP^GPLXPATH(IPXML,AXML) ; MAKE A COPY OF ACTORS XML D REPLACE^GPLXPATH(AXML,"","//Actors") ; DELETE THE INSIDES - W "PROCESSING ACTORS ",! + I DEBUG W "PROCESSING ACTORS ",! F I=1:1:@ALST@(0) D ; PROCESS ALL ACTORS IN THE LIST . I @ALST@(I)["@@" Q ; NOT A VALID ACTOR . S AOID=$P(@ALST@(I),"^",1) ; ACTOR OBJECT ID @@ -44,7 +44,7 @@ EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE . S AIEN=$P(@ALST@(I),"^",3) ; ACTOR RECORD NUMBER . I ATYP="" Q ; NOT A VALID ACTOR . ; - . W AOID_" "_ATYP_" "_AIEN,! + . I DEBUG W AOID_" "_ATYP_" "_AIEN,! . I ATYP="PATIENT" D ; PATIENT ACTOR TYPE . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PATIENT","ATMP") . . D PATIENT("ATMP",AIEN,AOID,"ATMP2") @@ -77,7 +77,7 @@ EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE ; PATIENT(INXML,AIEN,AOID,OUTXML) ; PROCESS A PATIENT ACTOR ; - W "PROCESSING ACTOR PATIENT ",AIEN,! + I DEBUG W "PROCESSING ACTOR PATIENT ",AIEN,! N AMAP,ZX S AMAP=$NA(^TMP($J,"AMAP")) K @AMAP diff --git a/p/GPLCCR.m b/p/GPLCCR.m index 2d6c811..ea3575d 100644 --- a/p/GPLCCR.m +++ b/p/GPLCCR.m @@ -93,7 +93,7 @@ CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT . ; K @OXML ; KILL EXPECTED OUTPUT ARRAY . ; W OXML,! . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL - . W "RUNNING ",CALL,! + . I DEBUG W "RUNNING ",CALL,! . X CALL . ; NOW INSERT THE RESULTS IN THE CCR BUFFER . I @OXML@(0)'=0 D ; THERE IS A RESULT @@ -106,13 +106,13 @@ CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT N TRIMI,J,DONE S DONE=0 F TRIMI=0:0 D Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE . S J=$$TRIM^GPLXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS - . W "TRIMMED",J,! + . I DEBUG W "TRIMMED",J,! . I J=0 S DONE=1 ; DONE WHEN TRIM RETURNS FALSE Q ; INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS ; TAB IS PASSED BY NAME - W "TAB= ",TAB,! + I DEBUG W "TAB= ",TAB,! ; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""GPLCCR"",$J,DFN,""PROBLEMS"")") D PUSH^GPLXPATH(TAB,"EXTRACT;GPLMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")") @@ -152,7 +152,7 @@ ACTLST(AXML,ACTRTN) ; RETURN THE ACTOR LIST FOR THE XML IN AXML F I=1:1:@AXML@(0) D ; SCAN ALL LINES . I @AXML@(I)?.E1"".E D ; THERE IS AN ACTOR THIS LINE . . S J=$P($P(@AXML@(I),"",2),"",1) - . . W "=>",J,! + . . I DEBUG W "=>",J,! . . I J'="" S K(J)="" ; HASHING ACTOR . . ; TO GET RID OF DUPLICATES S I="" ; GOING TO $O THROUGH THE HASH diff --git a/p/GPLMEDS.m b/p/GPLMEDS.m index e023281..546263c 100644 --- a/p/GPLMEDS.m +++ b/p/GPLMEDS.m @@ -83,7 +83,6 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE . . S @MEDVMAP@("MEDDESCRIPTIONTEXT")=$P(MEDRSLT(ZJ+1)," *",2) . I ZK>2 D ; THIRD THROUGH 2+N LINES OF MED ARE INSTRUCTIONS . . N TMPTXT S TMPTXT="" ; BUILD UP INSTRUCTION LINE - . . S ZN=0 ; DON'T KNOW WHY . . F ZN=2:1:ZK-1 D ; REMAINING LINES IN EACH MED . . . I MEDRSLT(ZJ+ZN)]"\ Sig: " D ; REMOVE THIS MARKUP . . . . S TMPTXT=TMPTXT_$P(MEDRSLT(ZJ+ZN),"\ Sig: ",2)_" " ; APPEND 2 TMPTXT diff --git a/p/GPLPROBS.m b/p/GPLPROBS.m index 1b2e7d3..38eee31 100644 --- a/p/GPLPROBS.m +++ b/p/GPLPROBS.m @@ -41,7 +41,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE F J=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM IN THE LIST . S VMAP=$NA(@TVMAP@(J)) . K @VMAP - . W "VMAP= ",VMAP,! + . I DEBUG W "VMAP= ",VMAP,! . S PTMP=RPCRSLT(J) ; PULL OUT PROBLEM FROM RPC RETURN ARRAY . S @VMAP@("PROBLEMOBJECTID")="PROBLEM"_J ; UNIQUE OBJID FOR PROBLEM . S @VMAP@("PROBLEMIEN")=$P(PTMP,U,1) @@ -81,7 +81,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE . N HTMP,HOUT,HTMLO,GPLPROBI,ZX . F GPLPROBI=1:1:RPCRSLT(0) D ; FOR EACH PROBLEM . . S VMAP=$NA(@TVMAP@(GPLPROBI)) - . . W "VMAP =",VMAP,! + . . I DEBUG W "VMAP =",VMAP,! . . 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 @@ -90,7 +90,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE . . I GPLPROBI=1 D ; FIRST ONE IS JUST A COPY . . . D CP^GPLXPATH("HOUT","HTMLO") . . I GPLPROBI>1 D ; AFTER THE FIRST, INSERT INNER HTML - . . . W "DOING INNER",! + . . . I DEBUG W "DOING INNER",! . . . N HTMLBLD,HTMLTMP . . . D QUEUE^GPLXPATH("HTMLBLD","HTMLO",1,HTMLO(0)-1) . . . D QUEUE^GPLXPATH("HTMLBLD","HOUT",2,HOUT(0)-1) @@ -104,7 +104,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE D MISSING^GPLXPATH(ARYTMP,"PROBSTMP") ; SEARCH XML FOR MISSING VARS I PROBSTMP(0)>0 D ; IF THERE ARE MISSING VARS - . ; STRINGS MARKED AS @@X@@ - . W "PROBLEMS Missing list: ",! + . W !,"PROBLEMS Missing list: ",! . F I=1:1:PROBSTMP(0) W PROBSTMP(I),! Q ; diff --git a/p/GPLVITAL.m b/p/GPLVITAL.m index 3ba53fb..a6074f2 100644 --- a/p/GPLVITAL.m +++ b/p/GPLVITAL.m @@ -170,7 +170,7 @@ EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE . . I J=1 D ; FIRST ONE IS JUST A COPY . . . ; W "FIRST ONE",! . . . D CP^GPLXPATH(VITARYTMP,VITOUTXML) - . . . W "VITOUTXML ",VITOUTXML,! + . . . I DEBUG W "VITOUTXML ",VITOUTXML,! . . I J>1 D ; AFTER THE FIRST, INSERT INNER XML . . . D INSINNER^GPLXPATH(VITOUTXML,VITARYTMP) ; ZWR ^TMP($J,"VITALS",*)