batch processing and options

This commit is contained in:
george 2009-05-05 21:24:14 +00:00
parent 86bdacf231
commit b72c3c4357
3 changed files with 97439 additions and 3 deletions

View File

@ -27,7 +27,9 @@ STOP ; STOP A CURRENTLY RUNNING BATCH JOB
H 10 ; WAIT TEN SECONDS FOR SIGNAL TO BE RECEIVED
I '$D(^TMP("C0CBAT","STOP")) D ; SIGNAL RECEIVED
. W "CCR BATCH JOB TERMINATING",!
E K ^TMP("C0CBAT","STOP") ; STOP SIGNALING
E D ;
. K ^TMP("C0CBAT","STOP") ; STOP SIGNALING
. W !,"BATCH PROCESSING APPARENTLY NOT RUNNING",!
Q
;
START ; STARTS A TAKSMAN CCR BATCH JOB - FOR USE IN A MENU OPTION
@ -103,6 +105,7 @@ EN ; BATCH ENTRY POINT
. S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
. S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
. S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
. S C0CFDA(C0CBF,C0CIEN_",",5)=C0CBCUR ; LAST RECORD PROCESSED
. D UPDIE ;
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
. . S C0CSTOP=1
@ -111,7 +114,7 @@ EN ; BATCH ENTRY POINT
F S C0CBCUR=$O(@C0CBS@(C0CBCUR)) Q:(C0CSTOP)!(C0CBCUR="") D ; SUBS LIST
. I $D(@C0CBH@(C0CBCUR)) Q ; SKIP IF IN HOT LIST - ALREADY DONE
. D ANALYZE^C0CRIMA(C0CBCUR,1,"LABLIMIT:T-760^VITLIMIT:T-760")
. I $G(C0CCHK) D ;
. I $G(C0CCHK) D ; IF CHECKSUMS HAVE CHANGED
. . D PUTRIM^C0CFM2(C0CBCUR)
. . D XPAT^C0CCCR(C0CBCUR) ; IF VARIABLES HAVE CHANGED GENERATE CCR
. . K C0CFDA
@ -129,11 +132,16 @@ EN ; BATCH ENTRY POINT
. S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
. S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
. S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
. S C0CFDA(C0CBF,C0CIEN_",",5)=C0CBCUR ;
. D UPDIE ;
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
. . S C0CSTOP=1
. . K ^TMP("C0CBAT","STOP") ; SIGNAL RECEIVED
. H 1 ; GIVE IT A BREAK
I (C0CSTOP) S C0CDISP="KILLED"
E S C0CDISP="FINISHED"
S C0CFDA(C0CBF,C0CIEN_",",6)=C0CDISP
D UPDIE ; SET DISPOSITION FIELD
K ^TMP("C0CBAT","RUNNING")
Q
;

View File

@ -42,7 +42,7 @@ XPAT(DFN,XPARMS,DIR,FN) ; EXPORT ONE PATIENT TO A FILE
S ONAM=UFN
I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_22.xml"
S ODIRGLB=$NA(^TMP("C0CCCR","ODIR"))
S ^TMP("C0CCCR","FNAME",DFN)=UFN ; FILE NAME FOR BATCH USE
S ^TMP("C0CCCR","FNAME",DFN)=ONAM ; FILE NAME FOR BATCH USE
I $D(^TMP("GPLCCR","ODIR")) S @ODIRGLB=^TMP("GPLCCR","ODIR")
I '$D(@ODIRGLB) D ; IF NOT ODIR HAS BEEN SET
. W "Warning.. please set ^TMP(""C0CCCR"",""ODIR"")=""output path""",! Q

97428
p/C0C_1_0_22_T1.KID Normal file

File diff suppressed because it is too large Load Diff