source: WorldVistAEHR/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORTSK03.m@ 1556

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1RORTSK03 ;HCIOFO/SG - TASK MANAGER OVERFLOW CODE ; 8/30/05 8:34am
2 ;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
3 ;
4 Q
5 ;
6 ;***** PREPARE THE TASK PARAMETERS
7 ;
8 ; .PARAMS Reference to a local array that contains
9 ; the task parameters
10 ;
11 ; Return Values:
12 ; <0 Error code
13 ; 0 Ok
14 ;
15PARAMS(PARAMS) ;
16 N I,NAME,NODE,SUBS,TMP
17 S I=""
18 F S I=$O(PARAMS(I)) Q:I="" D
19 . S NAME=$TR($P(PARAMS(I),"=")," ") Q:NAME=""
20 . S TMP=$P(NAME,"(") Q:TMP=""
21 . S NODE="RORTSK(""PARAMS"","""_TMP_""""
22 . S TMP=$P(NAME,"(",2,999)
23 . S NODE=$S(TMP'="":NODE_","_TMP,1:NODE_")")
24 . S @NODE=$$TRIM^XLFSTR($P(PARAMS(I),"=",2,999))
25 Q 0
26 ;
27 ;***** FORMATS THE TASK INFORMATION FOR $$TASKINFO^RORTSK02
28 ;
29 ; OFFSET Offset for the subscripts
30 ; .INFO Reference to a local variable (output):
31 ; IENS The second subscript in the RORBUF array
32 ; .RORBUF Referrence to a local variable containing output
33 ; of the GETS^DIQ procedure
34 ; FLAGS Characters controlling behavior of the function
35 ;
36 ; Return Values:
37 ; <0 Error code
38 ; 0 Ok
39 ;
40FRMTI(OFFSET,INFO,IENS,RORBUF,FLAGS) ;
41 N I,TMP,ZTCPU,ZTSK
42 ;--- Task Type
43 I $G(RORBUF(798.8,IENS,.02,"I"))'="" D
44 . S I=OFFSET+2,INFO(I)=RORBUF(798.8,IENS,.02,"I")
45 . S:FLAGS["E" $P(INFO(I),U,2)=$G(RORBUF(798.8,IENS,.02,"E"))
46 ;--- Registry
47 I $G(RORBUF(798.8,IENS,.03,"I"))'="" D
48 . S I=OFFSET+3,INFO(I)=RORBUF(798.8,IENS,.03,"I")
49 . S:FLAGS["E" $P(INFO(I),U,2)=$G(RORBUF(798.8,IENS,.03,"E"))
50 ;--- Report
51 S TMP=+$G(RORBUF(798.8,IENS,.04,"I"))
52 I TMP>0 S TMP=$$RPCODE^RORUTL08(TMP) I TMP'="" D
53 . S I=OFFSET+4,INFO(I)=TMP
54 . S:FLAGS["E" $P(INFO(I),U,2)=$G(RORBUF(798.8,IENS,.04,"E"))
55 ;--- Description
56 S INFO(OFFSET+5)=$G(RORBUF(798.8,IENS,.05,"I"))
57 ;--- Creation Time
58 I $G(RORBUF(798.8,IENS,.07,"I"))'="" D
59 . S INFO(OFFSET+7)=RORBUF(798.8,IENS,.07,"I")
60 ;--- User
61 I $G(RORBUF(798.8,IENS,.08,"I"))'="" D
62 . S I=OFFSET+8,INFO(I)=RORBUF(798.8,IENS,.08,"I")
63 . S:FLAGS["E" $P(INFO(I),U,2)=$G(RORBUF(798.8,IENS,.08,"E"))
64 ;--- Completion Time
65 I $G(RORBUF(798.8,IENS,2.02,"I"))'="" D
66 . S INFO(OFFSET+9)=RORBUF(798.8,IENS,2.02,"I")
67 ;--- Progress Percentage
68 S TMP=$G(RORBUF(798.8,IENS,4,"I"))
69 S INFO(OFFSET+10)=$S(TMP'="":$J(TMP,0,2),1:"")
70 ;--- Scheduled to Run at
71 S ZTSK=TASK D ISQED^%ZTLOAD
72 I $G(ZTSK(0)),$D(ZTSK("D"))#10 D
73 . S INFO(OFFSET+11)=$$HTFM^XLFDT(ZTSK("D"))
74 ;--- Task Log
75 S INFO(OFFSET+12)=$G(RORBUF(798.8,IENS,2.03,"I"))
76 ;--- Job Number
77 S INFO(OFFSET+13)=$G(RORBUF(798.8,IENS,2.04,"I"))
78 ;--- User Comment
79 S INFO(OFFSET+14)=$G(RORBUF(798.8,IENS,1.01,"I"))
80 Q 0
Note: See TracBrowser for help on using the repository browser.