From 04b65dcbfbe9d3c0dc686fd99e4d35a33abbbf37 Mon Sep 17 00:00:00 2001 From: george Date: Thu, 22 Jan 2009 14:36:12 +0000 Subject: [PATCH] integration of CCRMEDS6 for RPMS on flag C0CTESTMEDS --- p/C0CRPMS.m | 12 ++++++++++++ p/CCRMEDS.m | 5 ++++- p/CCRUNIT.m | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/p/C0CRPMS.m b/p/C0CRPMS.m index 386f05c..375b067 100644 --- a/p/C0CRPMS.m +++ b/p/C0CRPMS.m @@ -77,4 +77,16 @@ GETNV(C0CDFN) ;GET MANY VISITS . D ^APCDVD . K APCDCLN,APCDCAT,APCDDATE,APCDLOC,APCDVSIT,APCDLOOK,APCDTYPE Q + ; +GETTBL(C0CTBL) ; SCAN FOR AND DISPLAY PATIENTS IN A RIMTBL, PASSED BY VALUE + ; + N ZG S ZG=$NA(^TMP("GPLRIM","RIMTBL","PATS",C0CTBL)) + N C0CG S C0CG="" + N C0CQ S C0CQ=0 + F S C0CG=$O(@ZG@(C0CG),-1) Q:(C0CG="") D ; + . W "PAT: ",C0CG,! + . D GETNV^C0CRPMS(C0CG) + . K X R X + . I X="Q" S C0CQ=1 ; QUIT IF Q + Q ; \ No newline at end of file diff --git a/p/CCRMEDS.m b/p/CCRMEDS.m index c03dc6c..b483154 100644 --- a/p/CCRMEDS.m +++ b/p/CCRMEDS.m @@ -37,7 +37,10 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE S @MEDTVMAP@(0)=0 ; INITIALIZE NUMBER OF MEDS PROCESSED S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) K @MEDTARYTMP ; KILL XML ARRAY - I $G(DUZ("AG"))="I" G USERPC ; FOR RPMS, USE THE RPC FOR MEDS + I $G(DUZ("AG"))="I" D Q ; + . I '$D(C0CTESTMEDS) G USERPC ; DELETE THIS LINE AFTER TESTING IS DONE + . D EXTRACT^CCRMEDS6(MEDXML,DFN,MEDOUTXML) + . I @MEDOUTXML@(0)=0 D USERPC ; FOR RPMS, USE THE RPC FOR MEDS D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS . S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML diff --git a/p/CCRUNIT.m b/p/CCRUNIT.m index a7f3df0..9812102 100644 --- a/p/CCRUNIT.m +++ b/p/CCRUNIT.m @@ -17,4 +17,5 @@ MEDS W "OUTXML will be ^TMP($J,""OUT"")",! N OUTXML S OUTXML=$NA(^TMP($J,"OUT")) D EXTRACT^CCRMEDS6("INXML",DFN,OUTXML) + D FILEOUT^C0CRNF(OUTXML,"TESTMEDS.xml") Q