batch processing and options
This commit is contained in:
parent
86bdacf231
commit
b72c3c4357
12
p/C0CBAT.m
12
p/C0CBAT.m
|
@ -27,7 +27,9 @@ STOP ; STOP A CURRENTLY RUNNING BATCH JOB
|
||||||
H 10 ; WAIT TEN SECONDS FOR SIGNAL TO BE RECEIVED
|
H 10 ; WAIT TEN SECONDS FOR SIGNAL TO BE RECEIVED
|
||||||
I '$D(^TMP("C0CBAT","STOP")) D ; SIGNAL RECEIVED
|
I '$D(^TMP("C0CBAT","STOP")) D ; SIGNAL RECEIVED
|
||||||
. W "CCR BATCH JOB TERMINATING",!
|
. 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
|
Q
|
||||||
;
|
;
|
||||||
START ; STARTS A TAKSMAN CCR BATCH JOB - FOR USE IN A MENU OPTION
|
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 C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
|
||||||
. S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
|
. 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_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
|
||||||
|
. S C0CFDA(C0CBF,C0CIEN_",",5)=C0CBCUR ; LAST RECORD PROCESSED
|
||||||
. D UPDIE ;
|
. D UPDIE ;
|
||||||
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
|
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
|
||||||
. . S C0CSTOP=1
|
. . S C0CSTOP=1
|
||||||
|
@ -111,7 +114,7 @@ EN ; BATCH ENTRY POINT
|
||||||
F S C0CBCUR=$O(@C0CBS@(C0CBCUR)) Q:(C0CSTOP)!(C0CBCUR="") D ; SUBS LIST
|
F S C0CBCUR=$O(@C0CBS@(C0CBCUR)) Q:(C0CSTOP)!(C0CBCUR="") D ; SUBS LIST
|
||||||
. I $D(@C0CBH@(C0CBCUR)) Q ; SKIP IF IN HOT LIST - ALREADY DONE
|
. I $D(@C0CBH@(C0CBCUR)) Q ; SKIP IF IN HOT LIST - ALREADY DONE
|
||||||
. D ANALYZE^C0CRIMA(C0CBCUR,1,"LABLIMIT:T-760^VITLIMIT:T-760")
|
. 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 PUTRIM^C0CFM2(C0CBCUR)
|
||||||
. . D XPAT^C0CCCR(C0CBCUR) ; IF VARIABLES HAVE CHANGED GENERATE CCR
|
. . D XPAT^C0CCCR(C0CBCUR) ; IF VARIABLES HAVE CHANGED GENERATE CCR
|
||||||
. . K C0CFDA
|
. . K C0CFDA
|
||||||
|
@ -129,11 +132,16 @@ EN ; BATCH ENTRY POINT
|
||||||
. S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
|
. S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
|
||||||
. S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
|
. 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_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
|
||||||
|
. S C0CFDA(C0CBF,C0CIEN_",",5)=C0CBCUR ;
|
||||||
. D UPDIE ;
|
. D UPDIE ;
|
||||||
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
|
. I $D(^TMP("C0CBAT","STOP")) D ; IF STOP SIGNAL DETECTED
|
||||||
. . S C0CSTOP=1
|
. . S C0CSTOP=1
|
||||||
. . K ^TMP("C0CBAT","STOP") ; SIGNAL RECEIVED
|
. . K ^TMP("C0CBAT","STOP") ; SIGNAL RECEIVED
|
||||||
. H 1 ; GIVE IT A BREAK
|
. 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")
|
K ^TMP("C0CBAT","RUNNING")
|
||||||
Q
|
Q
|
||||||
;
|
;
|
||||||
|
|
|
@ -42,7 +42,7 @@ XPAT(DFN,XPARMS,DIR,FN) ; EXPORT ONE PATIENT TO A FILE
|
||||||
S ONAM=UFN
|
S ONAM=UFN
|
||||||
I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_22.xml"
|
I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_22.xml"
|
||||||
S ODIRGLB=$NA(^TMP("C0CCCR","ODIR"))
|
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(^TMP("GPLCCR","ODIR")) S @ODIRGLB=^TMP("GPLCCR","ODIR")
|
||||||
I '$D(@ODIRGLB) D ; IF NOT ODIR HAS BEEN SET
|
I '$D(@ODIRGLB) D ; IF NOT ODIR HAS BEEN SET
|
||||||
. W "Warning.. please set ^TMP(""C0CCCR"",""ODIR"")=""output path""",! Q
|
. W "Warning.. please set ^TMP(""C0CCCR"",""ODIR"")=""output path""",! Q
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue