RORHDT ;HCIOFO/SG - HISTORICAL DATA EXTRACTION ; 3/14/06 10:54am
;;1.5;CLINICAL CASE REGISTRIES;**1**;Feb 17, 2006;Build 24
;
; RORHDT -------------- HISTORICAL DATA EXTRACTION DESCRIPTOR
;
; RORHDT("BHS") If this node has a non-zero value, the
; $$COMMIT^RORHDT05 function outputs a BHS
; segment before writing the data from the
; ^TMP("HLS",$J) node. Then it kills the
; RORHDT("BHS") node.
;
; See also descriptions of the ^TMP("RORHDT") node in the ^ROR01
; routine.
;
Q
;
;***** (RE)CREATES A DATA EXTRACTION TASK TABLE
CREATE ;
N RORERRDL ; Default error location
N RORERROR ; Error processing data
N RORPARM ; Application parameters
;
N HDEIEN,RC
S RORPARM("ERR")=1
;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
D CLEAR^RORERR("CREATE^RORHDT")
;--- Select a data extraction
S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
Q:'HDEIEN
;--- Request a confirmation
S RC=$$CREATE^RORHDTAC(HDEIEN)
I RC G:RC<0 ERROR Q
;--- Create a new task table
S RC=$$CREATE^RORHDT02(HDEIEN) G:RC<0 ERROR
W:'RC !,"New task table has been created."
Q
;
;***** EDITS THE EXTRACTION DEFINITION
EDITHDE ;
N DA,DIE,DIDEL,DR,DTOUT,NATIONAL
;--- Select a data extraction
S DA=$$SELHDE^RORHDTUT("A",,.NATIONAL) G:DA<0 ERROR
Q:'DA
;--- Edit the parameters
S DIE=$$ROOT^DILFD(799.6)
S DR="[RORHDT EDIT "_$S(NATIONAL:"NATIONAL EXTRACT]",1:"EXTRACTION]")
W ! D ^DIE
Q
;
;***** DISPLAYS THE ERRORS
ERROR ;
D DSPSTK^RORERR()
Q
;
;***** DISPLAYS THE LATEST LOG OF THE TASK
LOG ;
N RORERRDL ; Default error location
N RORERROR ; Error processing data
N RORPARM ; Application parameters
;
N HDEIEN,POP,RC,TASKIEN
S RORPARM("ERR")=1
;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
D CLEAR^RORERR("LOG^RORHDT")
;--- Select data extraction and task
S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
Q:'HDEIEN
S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
Q:'TASKIEN
;--- Display the log
S RC=$$LOG^RORHDT01(HDEIEN,TASKIEN) G:RC<0 ERROR
Q
;
;***** STARTS A DATA EXTRACTION TASK
START ;
N RORERRDL ; Default error location
N RORERROR ; Error processing data
N RORPARM ; Application parameters
;
N FAM,HDEIEN,RC,SDT,TASKIEN
S RORPARM("ERR")=1
;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
D CLEAR^RORERR("START^RORHDT")
;--- Select data extraction and task
S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
Q:'HDEIEN
S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
Q:'TASKIEN
;--- Double-check the task status, and request confirmation(s)
;--- and start date/time for the task from the user
S RC=$$START^RORHDTAC(HDEIEN,TASKIEN,.FAM,.SDT)
I RC G:RC<0 ERROR Q
;--- Start the task
S RC=$$START^RORHDT03(HDEIEN,TASKIEN,FAM,SDT) G:RC<0 ERROR
Q
;
;***** DISPLAYS DATA EXTRACTION STATUS
STATUS ;
N RORERRDL ; Default error location
N RORERROR ; Error processing data
N RORPARM ; Application parameters
;
N DIR,HDEIEN,POP,RC,TMP
S RORPARM("ERR")=1
;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
D CLEAR^RORERR("STATUS^RORHDT")
;--- Select a data extraction
S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
Q:'HDEIEN
;--- Display status of the data extraction
S RC=$$STATUS^RORHDT01(HDEIEN)
W ! D PAGE^RORHDTUT(),^%ZISC G:RC<0 ERROR
Q
;
;***** STOPS A DATA EXTRACTION TASK
STOP ;
N RORERRDL ; Default error location
N RORERROR ; Error processing data
N RORPARM ; Application parameters
;
N HDEIEN,RC,TASKIEN
S RORPARM("ERR")=1
;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
D CLEAR^RORERR("STOP^RORHDT")
;--- Select data extraction and task
S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
Q:'HDEIEN
S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
Q:'TASKIEN
;--- Stop the task
S RC=$$STOP^RORHDTAC(HDEIEN,TASKIEN)
I RC G:RC<0 ERROR Q
S RC=$$STOP^RORHDT03(HDEIEN,TASKIEN) G:RC<0 ERROR
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRORHDT 4257 printed Oct 16, 2024@17:42:24 Page 2
RORHDT ;HCIOFO/SG - HISTORICAL DATA EXTRACTION ; 3/14/06 10:54am
+1 ;;1.5;CLINICAL CASE REGISTRIES;**1**;Feb 17, 2006;Build 24
+2 ;
+3 ; RORHDT -------------- HISTORICAL DATA EXTRACTION DESCRIPTOR
+4 ;
+5 ; RORHDT("BHS") If this node has a non-zero value, the
+6 ; $$COMMIT^RORHDT05 function outputs a BHS
+7 ; segment before writing the data from the
+8 ; ^TMP("HLS",$J) node. Then it kills the
+9 ; RORHDT("BHS") node.
+10 ;
+11 ; See also descriptions of the ^TMP("RORHDT") node in the ^ROR01
+12 ; routine.
+13 ;
+14 QUIT
+15 ;
+16 ;***** (RE)CREATES A DATA EXTRACTION TASK TABLE
CREATE ;
+1 ; Default error location
NEW RORERRDL
+2 ; Error processing data
NEW RORERROR
+3 ; Application parameters
NEW RORPARM
+4 ;
+5 NEW HDEIEN,RC
+6 SET RORPARM("ERR")=1
+7 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
+8 DO CLEAR^RORERR("CREATE^RORHDT")
+9 ;--- Select a data extraction
+10 SET HDEIEN=$$SELHDE^RORHDTUT()
if HDEIEN<0
GOTO ERROR
+11 if 'HDEIEN
QUIT
+12 ;--- Request a confirmation
+13 SET RC=$$CREATE^RORHDTAC(HDEIEN)
+14 IF RC
if RC<0
GOTO ERROR
QUIT
+15 ;--- Create a new task table
+16 SET RC=$$CREATE^RORHDT02(HDEIEN)
if RC<0
GOTO ERROR
+17 if 'RC
WRITE !,"New task table has been created."
+18 QUIT
+19 ;
+20 ;***** EDITS THE EXTRACTION DEFINITION
EDITHDE ;
+1 NEW DA,DIE,DIDEL,DR,DTOUT,NATIONAL
+2 ;--- Select a data extraction
+3 SET DA=$$SELHDE^RORHDTUT("A",,.NATIONAL)
if DA<0
GOTO ERROR
+4 if 'DA
QUIT
+5 ;--- Edit the parameters
+6 SET DIE=$$ROOT^DILFD(799.6)
+7 SET DR="[RORHDT EDIT "_$SELECT(NATIONAL:"NATIONAL EXTRACT]",1:"EXTRACTION]")
+8 WRITE !
DO ^DIE
+9 QUIT
+10 ;
+11 ;***** DISPLAYS THE ERRORS
ERROR ;
+1 DO DSPSTK^RORERR()
+2 QUIT
+3 ;
+4 ;***** DISPLAYS THE LATEST LOG OF THE TASK
LOG ;
+1 ; Default error location
NEW RORERRDL
+2 ; Error processing data
NEW RORERROR
+3 ; Application parameters
NEW RORPARM
+4 ;
+5 NEW HDEIEN,POP,RC,TASKIEN
+6 SET RORPARM("ERR")=1
+7 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
+8 DO CLEAR^RORERR("LOG^RORHDT")
+9 ;--- Select data extraction and task
+10 SET HDEIEN=$$SELHDE^RORHDTUT()
if HDEIEN<0
GOTO ERROR
+11 if 'HDEIEN
QUIT
+12 SET TASKIEN=$$SELTASK^RORHDTUT(HDEIEN)
if TASKIEN<0
GOTO ERROR
+13 if 'TASKIEN
QUIT
+14 ;--- Display the log
+15 SET RC=$$LOG^RORHDT01(HDEIEN,TASKIEN)
if RC<0
GOTO ERROR
+16 QUIT
+17 ;
+18 ;***** STARTS A DATA EXTRACTION TASK
START ;
+1 ; Default error location
NEW RORERRDL
+2 ; Error processing data
NEW RORERROR
+3 ; Application parameters
NEW RORPARM
+4 ;
+5 NEW FAM,HDEIEN,RC,SDT,TASKIEN
+6 SET RORPARM("ERR")=1
+7 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
+8 DO CLEAR^RORERR("START^RORHDT")
+9 ;--- Select data extraction and task
+10 SET HDEIEN=$$SELHDE^RORHDTUT()
if HDEIEN<0
GOTO ERROR
+11 if 'HDEIEN
QUIT
+12 SET TASKIEN=$$SELTASK^RORHDTUT(HDEIEN)
if TASKIEN<0
GOTO ERROR
+13 if 'TASKIEN
QUIT
+14 ;--- Double-check the task status, and request confirmation(s)
+15 ;--- and start date/time for the task from the user
+16 SET RC=$$START^RORHDTAC(HDEIEN,TASKIEN,.FAM,.SDT)
+17 IF RC
if RC<0
GOTO ERROR
QUIT
+18 ;--- Start the task
+19 SET RC=$$START^RORHDT03(HDEIEN,TASKIEN,FAM,SDT)
if RC<0
GOTO ERROR
+20 QUIT
+21 ;
+22 ;***** DISPLAYS DATA EXTRACTION STATUS
STATUS ;
+1 ; Default error location
NEW RORERRDL
+2 ; Error processing data
NEW RORERROR
+3 ; Application parameters
NEW RORPARM
+4 ;
+5 NEW DIR,HDEIEN,POP,RC,TMP
+6 SET RORPARM("ERR")=1
+7 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
+8 DO CLEAR^RORERR("STATUS^RORHDT")
+9 ;--- Select a data extraction
+10 SET HDEIEN=$$SELHDE^RORHDTUT()
if HDEIEN<0
GOTO ERROR
+11 if 'HDEIEN
QUIT
+12 ;--- Display status of the data extraction
+13 SET RC=$$STATUS^RORHDT01(HDEIEN)
+14 WRITE !
DO PAGE^RORHDTUT()
DO ^%ZISC
if RC<0
GOTO ERROR
+15 QUIT
+16 ;
+17 ;***** STOPS A DATA EXTRACTION TASK
STOP ;
+1 ; Default error location
NEW RORERRDL
+2 ; Error processing data
NEW RORERROR
+3 ; Application parameters
NEW RORPARM
+4 ;
+5 NEW HDEIEN,RC,TASKIEN
+6 SET RORPARM("ERR")=1
+7 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
+8 DO CLEAR^RORERR("STOP^RORHDT")
+9 ;--- Select data extraction and task
+10 SET HDEIEN=$$SELHDE^RORHDTUT()
if HDEIEN<0
GOTO ERROR
+11 if 'HDEIEN
QUIT
+12 SET TASKIEN=$$SELTASK^RORHDTUT(HDEIEN)
if TASKIEN<0
GOTO ERROR
+13 if 'TASKIEN
QUIT
+14 ;--- Stop the task
+15 SET RC=$$STOP^RORHDTAC(HDEIEN,TASKIEN)
+16 IF RC
if RC<0
GOTO ERROR
QUIT
+17 SET RC=$$STOP^RORHDT03(HDEIEN,TASKIEN)
if RC<0
GOTO ERROR
+18 QUIT