source: FOIAVistA/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORHDT.m@ 1492

Last change on this file since 1492 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1RORHDT ;HCIOFO/SG - HISTORICAL DATA EXTRACTION ; 3/14/06 10:54am
2 ;;1.5;CLINICAL CASE REGISTRIES;**1**;Feb 17, 2006;Build 24
3 ;
4 ; RORHDT -------------- HISTORICAL DATA EXTRACTION DESCRIPTOR
5 ;
6 ; RORHDT("BHS") If this node has a non-zero value, the
7 ; $$COMMIT^RORHDT05 function outputs a BHS
8 ; segment before writing the data from the
9 ; ^TMP("HLS",$J) node. Then it kills the
10 ; RORHDT("BHS") node.
11 ;
12 ; See also descriptions of the ^TMP("RORHDT") node in the ^ROR01
13 ; routine.
14 ;
15 Q
16 ;
17 ;***** (RE)CREATES A DATA EXTRACTION TASK TABLE
18CREATE ;
19 N RORERRDL ; Default error location
20 N RORERROR ; Error processing data
21 N RORPARM ; Application parameters
22 ;
23 N HDEIEN,RC
24 S RORPARM("ERR")=1
25 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
26 D CLEAR^RORERR("CREATE^RORHDT")
27 ;--- Select a data extraction
28 S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
29 Q:'HDEIEN
30 ;--- Request a confirmation
31 S RC=$$CREATE^RORHDTAC(HDEIEN)
32 I RC G:RC<0 ERROR Q
33 ;--- Create a new task table
34 S RC=$$CREATE^RORHDT02(HDEIEN) G:RC<0 ERROR
35 W:'RC !,"New task table has been created."
36 Q
37 ;
38 ;***** EDITS THE EXTRACTION DEFINITION
39EDITHDE ;
40 N DA,DIE,DIDEL,DR,DTOUT,NATIONAL
41 ;--- Select a data extraction
42 S DA=$$SELHDE^RORHDTUT("A",,.NATIONAL) G:DA<0 ERROR
43 Q:'DA
44 ;--- Edit the parameters
45 S DIE=$$ROOT^DILFD(799.6)
46 S DR="[RORHDT EDIT "_$S(NATIONAL:"NATIONAL EXTRACT]",1:"EXTRACTION]")
47 W ! D ^DIE
48 Q
49 ;
50 ;***** DISPLAYS THE ERRORS
51ERROR ;
52 D DSPSTK^RORERR()
53 Q
54 ;
55 ;***** DISPLAYS THE LATEST LOG OF THE TASK
56LOG ;
57 N RORERRDL ; Default error location
58 N RORERROR ; Error processing data
59 N RORPARM ; Application parameters
60 ;
61 N HDEIEN,POP,RC,TASKIEN
62 S RORPARM("ERR")=1
63 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
64 D CLEAR^RORERR("LOG^RORHDT")
65 ;--- Select data extraction and task
66 S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
67 Q:'HDEIEN
68 S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
69 Q:'TASKIEN
70 ;--- Display the log
71 S RC=$$LOG^RORHDT01(HDEIEN,TASKIEN) G:RC<0 ERROR
72 Q
73 ;
74 ;***** STARTS A DATA EXTRACTION TASK
75START ;
76 N RORERRDL ; Default error location
77 N RORERROR ; Error processing data
78 N RORPARM ; Application parameters
79 ;
80 N FAM,HDEIEN,RC,SDT,TASKIEN
81 S RORPARM("ERR")=1
82 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
83 D CLEAR^RORERR("START^RORHDT")
84 ;--- Select data extraction and task
85 S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
86 Q:'HDEIEN
87 S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
88 Q:'TASKIEN
89 ;--- Double-check the task status, and request confirmation(s)
90 ;--- and start date/time for the task from the user
91 S RC=$$START^RORHDTAC(HDEIEN,TASKIEN,.FAM,.SDT)
92 I RC G:RC<0 ERROR Q
93 ;--- Start the task
94 S RC=$$START^RORHDT03(HDEIEN,TASKIEN,FAM,SDT) G:RC<0 ERROR
95 Q
96 ;
97 ;***** DISPLAYS DATA EXTRACTION STATUS
98STATUS ;
99 N RORERRDL ; Default error location
100 N RORERROR ; Error processing data
101 N RORPARM ; Application parameters
102 ;
103 N DIR,HDEIEN,POP,RC,TMP
104 S RORPARM("ERR")=1
105 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
106 D CLEAR^RORERR("STATUS^RORHDT")
107 ;--- Select a data extraction
108 S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
109 Q:'HDEIEN
110 ;--- Display status of the data extraction
111 S RC=$$STATUS^RORHDT01(HDEIEN)
112 W ! D PAGE^RORHDTUT(),^%ZISC G:RC<0 ERROR
113 Q
114 ;
115 ;***** STOPS A DATA EXTRACTION TASK
116STOP ;
117 N RORERRDL ; Default error location
118 N RORERROR ; Error processing data
119 N RORPARM ; Application parameters
120 ;
121 N HDEIEN,RC,TASKIEN
122 S RORPARM("ERR")=1
123 ;S RORPARM("DEBUG")=2 ; Remove the first ';' to start in debug mode
124 D CLEAR^RORERR("STOP^RORHDT")
125 ;--- Select data extraction and task
126 S HDEIEN=$$SELHDE^RORHDTUT() G:HDEIEN<0 ERROR
127 Q:'HDEIEN
128 S TASKIEN=$$SELTASK^RORHDTUT(HDEIEN) G:TASKIEN<0 ERROR
129 Q:'TASKIEN
130 ;--- Stop the task
131 S RC=$$STOP^RORHDTAC(HDEIEN,TASKIEN)
132 I RC G:RC<0 ERROR Q
133 S RC=$$STOP^RORHDT03(HDEIEN,TASKIEN) G:RC<0 ERROR
134 Q
Note: See TracBrowser for help on using the repository browser.