revisions for RPC processing

This commit is contained in:
george 2009-05-30 20:57:19 +00:00
parent f1cc873ad6
commit e1cad5df1b
2 changed files with 99268 additions and 2 deletions

View File

@ -32,12 +32,14 @@ XPAT(DFN,XPARMS,DIR,FN) ; EXPORT ONE PATIENT TO A FILE
; DIR IS THE DIRECTORY, DEFAULTS IF NULL TO ^TMP("C0CCCR","ODIR") ; DIR IS THE DIRECTORY, DEFAULTS IF NULL TO ^TMP("C0CCCR","ODIR")
; FN IS FILE NAME, DEFAULTS IF NULL ; FN IS FILE NAME, DEFAULTS IF NULL
N CCRGLO,UDIR,UFN N CCRGLO,UDIR,UFN
S C0CNRPC=1 ; FLAG FOR NOT AN RPC CALL - FOR DEBUGGING THE RPC
I '$D(DIR) S UDIR="" I '$D(DIR) S UDIR=""
E S UDIR=DIR E S UDIR=DIR
I '$D(FN) S UFN="" ; IF FILENAME IS NOT PASSED I '$D(FN) S UFN="" ; IF FILENAME IS NOT PASSED
E S UFN=FN E S UFN=FN
I '$D(XPARMS) S XPARMS="" I '$D(XPARMS) S XPARMS=""
D CCRRPC(.CCRGLO,DFN,XPARMS,"CCR") N C0CRTN ; RETURN ARRAY
D CCRRPC(.CCRRTN,DFN,XPARMS,"CCR")
S OARY=$NA(^TMP("C0CCCR",$J,DFN,"CCR",1)) S OARY=$NA(^TMP("C0CCCR",$J,DFN,"CCR",1))
S ONAM=UFN S ONAM=UFN
I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_0.xml" I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_0.xml"
@ -78,6 +80,7 @@ CCRRPC(CCRGRTN,DFN,CCRPARMS,CCRPART) ;RPC ENTRY POINT FOR CCR OUTPUT
S CCD=0 ; NEED THIS FLAG TO DISTINGUISH FROM CCD S CCD=0 ; NEED THIS FLAG TO DISTINGUISH FROM CCD
I '$D(CCRPARMS) S CCRPARMS="" I '$D(CCRPARMS) S CCRPARMS=""
I '$D(CCRPART) S CCRPART="CCR" I '$D(CCRPART) S CCRPART="CCR"
I '$D(C0CNRPC) S ^TMP("C0CRPC",$H,"CALL",DFN,CCRPARMS,CCRPART)=""
D SET^C0CPARMS(CCRPARMS) ;SET PARAMETERS WITH CCRPARMS AS OVERRIDES D SET^C0CPARMS(CCRPARMS) ;SET PARAMETERS WITH CCRPARMS AS OVERRIDES
I '$D(TESTLAB) S TESTLAB=0 ; FLAG FOR TESTING RESULTS SECTION I '$D(TESTLAB) S TESTLAB=0 ; FLAG FOR TESTING RESULTS SECTION
I '$D(TESTALERT) S TESTALERT=1 ; FLAG FOR TESTING ALERTS SECTION I '$D(TESTALERT) S TESTALERT=1 ; FLAG FOR TESTING ALERTS SECTION
@ -86,7 +89,7 @@ CCRRPC(CCRGRTN,DFN,CCRPARMS,CCRPART) ;RPC ENTRY POINT FOR CCR OUTPUT
S CCRGLO=$NA(^TMP("C0CCCR",$J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR S CCRGLO=$NA(^TMP("C0CCCR",$J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
S ACTGLO=$NA(^TMP("C0CCCR",$J,DFN,"ACTORS")) ; GLOBAL FOR ALL ACTORS S ACTGLO=$NA(^TMP("C0CCCR",$J,DFN,"ACTORS")) ; GLOBAL FOR ALL ACTORS
; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC
S CCRGRTN=$NA(^TMP("C0CCCR",$J,DFN,CCRPART)) ; RTN GLO NM OF PART OR ALL M CCRGRTN=^TMP("C0CCCR",$J,DFN,CCRPART) ; RTN GLOBAL OF PART OR ALL
D LOAD^C0CCCR0(TGLOBAL) ; LOAD THE CCR TEMPLATE D LOAD^C0CCCR0(TGLOBAL) ; LOAD THE CCR TEMPLATE
D CP^C0CXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL D CP^C0CXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL
; ;
@ -130,6 +133,7 @@ CCRRPC(CCRGRTN,DFN,CCRPARMS,CCRPART) ;RPC ENTRY POINT FOR CCR OUTPUT
. S J=$$TRIM^C0CXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS . S J=$$TRIM^C0CXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS
. I DEBUG W "TRIMMED",J,! . I DEBUG W "TRIMMED",J,!
. I J=0 S DONE=1 ; DONE WHEN TRIM RETURNS FALSE . I J=0 S DONE=1 ; DONE WHEN TRIM RETURNS FALSE
I '$D(C0CNRPC) S ^TMP("C0CRPC",$H,"RESULT",CCRGRTN(0))=""
Q Q
; ;
INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS

99262
p/C0C_1_0_0_T9.KID Normal file

File diff suppressed because it is too large Load Diff