source: WorldVistAEHR/trunk/r/ASISTS-OOPS/OOPSDOL2.m@ 775

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

initial load of WorldVistAEHR

File size: 8.0 KB
Line 
1OOPSDOL2 ;WIOFO/CAH-CA2 EXTRACT FOR DOL ;3/15/00
2 ;;2.0;ASISTS;;Jun 03, 2002
3EN ; Entry
4 N OCC,NAME,FN,KK,D62,D126,D226,D227
5 S OOPSAR("CA")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA")))
6 S OOPSAR("CA2A")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2A")))
7 S OOPSAR("CA2B")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2B")))
8 S OOPSAR("CA2C")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2C",0)))
9 S OOPSAR("CA2D")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2D",0)))
10 S OOPSAR("CA2E")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2E",0)))
11 S OOPSAR("CA2ES")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2ES")))
12 S OOPSAR("CA2F")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2F",0)))
13 S OOPSAR("CA2G")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2G",0)))
14 S OOPSAR("CA2H")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2H")))
15 S OOPSAR("CA2I")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2I")))
16 S OOPSAR("CA2J")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2J")))
17 S OOPSAR("CA2K")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2K",0)))
18 S OOPSAR("CA2L")=$$UP^OOPSUTL4($G(^OOPS(2260,OOPDA,"CA2L")))
19OP02 ; Seg OP02
20 K OPX
21 N OFF
22 S OFF=$$GET1^DIQ(2260,OOPDA,"73:1")
23 S OPX="OP02^"_$E("00",$L(OFF)+1,2)_OFF
24 S OPX=OPX_U_$P(OOPSAR("CA2I"),U,1)_U_$P(OOPSAR("CA2I"),U,2)
25 S OPX=OPX_U_$P(OOPSAR("CA2I"),U,3)_U_$$GET1^DIQ(2260,OOPDA,"240:1")
26 S OPX=OPX_U_$E($P(OOPSAR("CA2I"),U,5),1,5)_U_$P(OOPSAR("CA2H"),U,1)
27 S OPX=OPX_U_$P(OOPSAR("CA2H"),U,2)_U_$P(OOPSAR("CA2H"),U,3)
28 S OPX=OPX_U_$$GET1^DIQ(2260,OOPDA,"233:1")_U_$E($P(OOPSAR("CA2H"),U,5),1,5)
29 S OPX=OPX_U_U_U_"^|"
30 D STORE^OOPSDOLX
31OP03 ; Seg OP03
32 K OPX
33 S OPX="OP03^"_$$GET1^DIQ(2260,OOPDA,60,"E")
34 S OPX=OPX_U_$P(OOPSAR("CA"),U,5)
35 S D62=$$GET1^DIQ(2260,OOPDA,"62:1")
36 S D126=$$GET1^DIQ(2260,OOPDA,"126:1")
37 S D226=$$GET1^DIQ(2260,OOPDA,"226:1")
38 S D227=$$GET1^DIQ(2260,OOPDA,"227:1")
39 S OPX=OPX_U_$E("000",$L(D226)+1,3)_D226
40 S OPX=OPX_U_$E("0000",$L(D227)+1,4)_D227
41 S OPX=OPX_U_$E("00",$L(D62)+1,2)_D62
42 S OPX=OPX_U_$E("00",$L(D126)+1,2)_D126
43 S OPX=OPX_U_$$DC^OOPSUTL3($P(OOPSAR("CA2J"),U,8))
44 S NAME=$$GET1^DIQ(2260,OOPDA,"265:.01"),FN=$P(NAME,",",2)
45 S OPX=OPX_U_$E($P(NAME,","),1,20)
46 F KK=1:0:1 Q:$E(FN,KK)'=" " S FN=$E(FN,KK+1,$L(FN))
47 S OPX=OPX_U_$E($P(FN," "),1,10)_U_$E($P(FN," ",2),1,10)
48 S OPX=OPX_U_$P(OOPSAR("CA2H"),U,8)_U_$$MKNUM^OOPSUTL2($P(OOPSAR("CA2H"),U,9))
49 S OPX=OPX_U_$$DC^OOPSUTL3($P(OOPSAR("CA2ES"),U,6))
50 S OPX=OPX_U_$$DC^OOPSUTL3($P(OOPSAR("CA2J"),U,6))_U_"^|"
51 D STORE^OOPSDOLX
52OP04 ; Seg OP04
53 K OPX
54 N CAT,GRADE,STEP
55 S CAT=$$GET1^DIQ(2260,OOPDA,2,"I")
56 S GRADE=$P(OOPSAR("2162A"),U,12),STEP=$P(OOPSAR("2162A"),U,13)
57 I STEP="N" S STEP=" N" ; special case on step = N
58 S OPX="OP04^"_$$DC^OOPSUTL3($P(OOPSAR("CA2ES"),U,3))
59 I $P(OOPSAR("CA2J"),U,9) D
60 .S Y=$P(OOPSAR("CA2J"),U,9) D DD^%DT S Y=$P($TR(Y,":",""),"@",2)
61 .S OPX=OPX_U_$$DC^OOPSUTL3($P($P(OOPSAR("CA2J"),U,9),"."))_Y
62 I '$P(OOPSAR("CA2J"),U,9) S OPX=OPX_U
63 I $P(OOPSAR("CA2J"),U,12) D
64 .S Y=$P(OOPSAR("CA2J"),U,12) D DD^%DT S Y=$P($TR(Y,":",""),"@",2)
65 .S OPX=OPX_U_$$DC^OOPSUTL3($P($P(OOPSAR("CA2J"),U,12),"."))_Y
66 I '$P(OOPSAR("CA2J"),U,12) S OPX=OPX_U
67 S OPX=OPX_"^^^"_$P(OOPSAR("CA2J"),U,7)
68 S OPX=OPX_U_$E($P(OOPSAR(0),U,13),1,2)
69 ;V2.0 1/9/02 - fix Grade/Step, send nill if Volunteer or Fee Basis
70 I (CAT=2)!($$GET1^DIQ(2260,OOPDA,63)="OT") S OPX=OPX_U_""
71 E S OPX=OPX_U_$E("00",$L(GRADE)+1,2)_GRADE
72 I (CAT=2)!($$GET1^DIQ(2260,OOPDA,63)="OT") S OPX=OPX_U_""
73 E S OPX=OPX_U_$E("00",$L(STEP)+1,2)_STEP
74 I $P(OOPSAR("CA2A"),U,8)=1!($P(OOPSAR("CA2A"),U,8)=4)!($P(OOPSAR("CA2A"),U,8)=5)!($P(OOPSAR("CA2A"),U,8)=7) S OPX=OPX_U_"Y"
75 E S OPX=OPX_U_"N"
76 I $P(OOPSAR("CA2A"),U,8)=2!($P(OOPSAR("CA2A"),U,8)=4)!($P(OOPSAR("CA2A"),U,8)=6)!($P(OOPSAR("CA2A"),U,8)=7) S OPX=OPX_U_"Y"
77 E S OPX=OPX_U_"N"
78 I $P(OOPSAR("CA2A"),U,8)=3!($P(OOPSAR("CA2A"),U,8)=5)!($P(OOPSAR("CA2A"),U,8)=6)!($P(OOPSAR("CA2A"),U,8)=7) S OPX=OPX_U_"Y"
79 E S OPX=OPX_U_"N"
80 S OPX=OPX_U_"Y^Y^Y^Y"
81 S OPX=OPX_U_"^^ASISTS^C2^Y"
82 S OPX=OPX_U ;Date of this Notice
83 S OPX=OPX_U_$P(OOPSAR("CA2B"),U) ;Illness Occurred Location
84 S OPX=OPX_U_$P(OOPSAR("CA2B"),U,2) ;Illness Occurred Address
85 S OPX=OPX_U_$P(OOPSAR("CA2B"),U,3) ;Illness Occurred City
86 S OPX=OPX_U_$$GET1^DIQ(2260,OOPDA,"212:1") ;Illness Occurred State
87 S OPX=OPX_U_$E($P(OOPSAR("CA2B"),U,5),1,5)_"^|"
88 D STORE^OOPSDOLX
89OP05 ; Seg OP05
90 K OPX
91 S OPX="OP05^"_$P(OOPSAR("CA2L"),U)_U_$P(OOPSAR("CA2L"),U,2)
92 S OPX=OPX_U_$P(OOPSAR("CA2L"),U,3)_U_$P(OOPSAR("CA2L"),U,4)
93 S OPX=OPX_U_$$GET1^DIQ(2260,OOPDA,"262:1")_U_$E($P(OOPSAR("CA2L"),U,6),1,5)
94 I $P(OOPSAR("CA2J"),U)'="" S OPX=OPX_U_1
95 E S OPX=OPX_U
96 S NAME=$P(OOPSAR("CA2J"),U),FN=$P(NAME,",",2)
97 F KK=1:0:1 Q:$E(FN,KK)'=" " S FN=$E(FN,KK+1,$L(FN))
98 S OPX=OPX_U_$E($P(NAME,","),1,20)_U_$E($P(FN," "),1,10)_U_$E($P(FN," ",2),1,10)
99 I $P(OOPSAR("CA2J"),U)'="" S OPX=OPX_U_$$GET1^DIQ(2260,OOPDA,"270:1")
100 I $P(OOPSAR("CA2J"),U,2)'="" D
101 .S OPX=OPX_U_$P(OOPSAR("CA2J"),U,2)_U_$P(OOPSAR("CA2J"),U,3)
102 .S OPX=OPX_U_$$GET1^DIQ(2260,OOPDA,"248:1")_U_$E($P(OOPSAR("CA2J"),U,5),1,5)
103 I $P(OOPSAR("CA2J"),U,2)="" S OPX=OPX_"^^^^"
104 S OPX=OPX_U_"^^|"
105 D STORE^OOPSDOLX
106OP06 ; Seg OP06
107 S DATA=$$CONV^OOPSUTL5($P(OOPSAR("CA2I"),U,8))
108 K OPX
109 S OPX="OP06"
110 F X=1:1:7 D ;Loop for seven days of the week
111 .I DATA[X D
112 ..S OPX=OPX_U_"Y"
113 ..S OPX=OPX_U_$$HM^OOPSUTL3($P(OOPSAR("CA2I"),U,6))_U_$$HM^OOPSUTL3($P(OOPSAR("CA2I"),U,7))
114 .I DATA'[X S OPX=OPX_"^N^^"
115 ; Generate Occ Code for DOL transfer
116 S OCC=$$GET1^DIQ(2260,OOPDA,15) ; Occupation code from PAID
117 S OCC=$S(OCC<2300:"G"_OCC,(OCC>2499&(OCC<9001)):"W"_OCC,(OCC=9999):"Z"_OCC,1:"")
118 S OPX=OPX_U_OCC_U_$P(OOPSAR("CA2A"),U,9)_"^|"
119 D STORE^OOPSDOLX
120OP07 ; Seg OP07 RELATIONSHIP OF ILLNESS TO EMP (Word Processing)
121 I $G(OOPSAR("CA2C"))'="",($P(OOPSAR("CA2C"),U,4)'=0) D
122 . S OPFLD=216,SEG="OP07"
123 . D WP^OOPSDOLX
124OP08 ; Seg OP08
125 K OPX
126 S OPX="OP08^^^^^^^"
127 I $P(OOPSAR("CA2L"),U,7)'="" S OPX=OPX_97_U
128 E S OPX=OPX_U
129 ; patch 11 - moved Witness indicator to correct piece
130 S OPX=OPX_"N^^^^^^^^^^^|"
131 D STORE^OOPSDOLX
132OP13 ; Seg OP13 Nature of Disease/Illness (Word Processing)
133 I $G(OOPSAR("CA2D"))'="",($P(OOPSAR("CA2D"),U,4)'=0) D
134 .S OPFLD=217,SEG="OP13"
135 .D WP^OOPSDOLX
136OP14 ;Seg OP14 Supervisor Exception
137 S S97=$P(OOPSAR("CA2L"),U,7) ; patch 11, don't send if only a space
138 I (S97'=""),(S97'=" ") D
139 .K OPX
140 .S OPX="OP14^1^1^"_S97_"^|" ;Supervisor Exception
141 .D STORE^OOPSDOLX
142 K S97
143OP15 ; Seg OP15
144 K OPX
145 S OPX="OP15^"_$$DC^OOPSUTL3($P(OOPSAR("CA2J"),U,11))
146 S OPX=OPX_U_$$DC^OOPSUTL3($P(OOPSAR("CA2B"),U,6))
147 S OPX=OPX_U_$$DC^OOPSUTL3($P(OOPSAR("CA2B"),U,7))
148 S OPX=OPX_U_$$DC^OOPSUTL3($P($P(OOPSAR("CA2J"),U,10),"."))
149 S Y=$P(OOPSAR("CA2J"),U,10) D DD^%DT S Y=$P($TR(Y,":",""),"@",2)
150 S OPX=OPX_Y
151 I $G(OOPSAR("CA2C"))'="",($P(OOPSAR("CA2C"),U,4)'=0) S OPX=OPX_U_"Y"
152 E S OPX=OPX_U_"N"
153 I $G(OOPSAR("CA2K"))'="",($P(OOPSAR("CA2K"),U,4)'=0) S OPX=OPX_U_"Y"
154 E S OPX=OPX_U_"N"
155 I $G(OOPSAR("CA2E"))'="",($P(OOPSAR("CA2E"),U,4)'=0) S OPX=OPX_U_"Y"
156 E S OPX=OPX_U_"N"
157 I $G(OOPSAR("CA2G"))'="",($P(OOPSAR("CA2G"),U,4)'=0) S OPX=OPX_U_"Y"
158 E S OPX=OPX_U_"N"
159 I $G(OOPSAR("CA2F"))'="",($P(OOPSAR("CA2F"),U,4)'=0) S OPX=OPX_U_"Y^|"
160 E S OPX=OPX_U_"N^|"
161 D STORE^OOPSDOLX
162OP16 ; Seg OP16 Work Duty Changed (Word Processing)
163 I $G(OOPSAR("CA2K"))'="",($P(OOPSAR("CA2K"),U,4)'=0) D
164 .S OPFLD=257,SEG="OP16"
165 .D WP^OOPSDOLX
166OP17 ; Seg OP17 Claim not Filed (Word Processing)
167 I $G(OOPSAR("CA2E"))'="",($P(OOPSAR("CA2E"),U,4)'=0) D
168 .S OPFLD=218,SEG="OP17"
169 .D WP^OOPSDOLX
170OP18 ; Seg OP18 Medical Report Delay (Word Processing)
171 I $G(OOPSAR("CA2G"))'="",($P(OOPSAR("CA2G"),U,4)'=0) D
172 .S OPFLD=220,SEG="OP18"
173 .D WP^OOPSDOLX
174OP19 ; Seg OP19 Employee Statement Delayed (Word Processing)
175 I $G(OOPSAR("CA2F"))'="",($P(OOPSAR("CA2F"),U,4)'=0) D
176 .S OPFLD=219,SEG="OP19"
177 .D WP^OOPSDOLX
178OP20 ; Seg OP20
179 K OPX
180 I $P(OOPSAR("2162B"),U,4)'="" D
181 .S OPX="OP20^"_"P"_U_$$GET1^DIQ(2260,OOPDA,"30:1")_"^|" D STORE^OOPSDOLX
182 .Q
183 ; Only send Primary Body part at this time - per AAC 6/30/2000
184 ; I $P(OOPSAR("2162B"),U,8)'="" D
185 ; . N OPX
186 ; . S OPX="OP20^"_"S"_U_$$GET1^DIQ(2260,OOPDA,"30.1:1")_"^|" D STORE^OOPSDOLX
187 ; . Q
188OP21 ; Seg OP21 Define for future use
189OP22 ; Seg OP22 Define for future use
190EXIT ; exit the routine
191 K IEN,DATA,MAX
192 Q
Note: See TracBrowser for help on using the repository browser.