source: WorldVistAEHR/trunk/r/ASISTS-OOPS/OOPSPC11.m@ 1306

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

initial load of WorldVistAEHR

File size: 4.2 KB
Line 
1OOPSPC11 ;HIRMFO/YH-EMPLOYEE'S DATA, CA1 FORM ;6/12/98
2 ;;2.0;ASISTS;;Jun 03, 2002
3 ;EMPLOYEE DATA
4 ;EMPLOYEE'S DATA
5 S OOPSDATA=$P($G(^OOPS(2260,IEN,0)),"^",2)
6 W !,"PU1.3,25.4,LB"_OOPSDATA_"#;" ;NAME
7 S OOPSDATA=$G(^OOPS(2260,IEN,"2162A"))
8 S OOPSP=$P(OOPSDATA,"^") I OOPSP'["-" S OOPSP=$E(OOPSP,1,3)_"-"_$E(OOPSP,4,5)_"-"_$E(OOPSP,6,13)
9 W !,"PU16.8,25.3;LB"_OOPSP_"#;" ;SSN
10 S OOPSP=$P(OOPSDATA,"^",2) I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"3.4,24.6","4.3,24.6","5.2,24.6") ;DATE OF BIRTH
11 S OOPSP=$P(OOPSDATA,"^",3) W !,$S(OOPSP=1:"PU7.2,24.5;LBX#;",OOPSP=2:"PU8.6,24.5;LBX#;",1:"") ;SEX
12 N PHN
13 S PHN=$TR($P(OOPSDATA,"^",8),"/-*#","")
14 W !,"PU10.8,24.6;LB"_$E(PHN,1,3)_"-"_$E(PHN,4,6)_"-",$E(PHN,7,10)_"#;"
15 S OOPSP=$P(OOPSDATA,"^",12) I OOPSP'="" W !,"PU18.4,24.6;LB"_+OOPSP_"#;PU19.8,24.6;LB"_$P(OOPSDATA,"^",13)_"#;" ;GRADE AND STEP
16 I $P(OOPSDATA,"^",4)'="" W !,"PU1.3,23.6;LB"_$P(OOPSDATA,"^",4)_"#;"
17 I $P(OOPSDATA,"^",5)'="" W !,"PU1.3,22.6;LB"_$P(OOPSDATA,"^",5)_"#;"
18 I $D(^DIC(5,+$P(OOPSDATA,"^",6),0)) W !,"LB, "_$P(^DIC(5,+$P(OOPSDATA,"^",6),0),"^")_" "_$P(OOPSDATA,"^",7)_"#;" ;ADDRESS
19 S OOPSP=+$P($G(^OOPS(2260,IEN,"CA1A")),"^",8) ;DEPENDENTS
20 I OOPSP>0,OOPSP<7 D
21 . W !,$S(OOPSP=1:"PU16.9,23.6;LBX#;",OOPSP=2:"PU16.9,23.2;LBX#;",OOPSP=3:"PU16.9,22.8;LBX#;",OOPSP=4:"PU16.9,23.6;LBX#;PU16.9,23.2;LBX#;",OOPSP=5:"PU16.9,23.6;LBX#;PU16.9,22.8;LBX#;",OOPSP=6:"PU16.9,23.2;LBX#;PU16.9,22.8;LBX#;",1:"")
22 I OOPSP=7 W !,"PU16.9,23.6;LBX#;PU16.9,23.2;LBX#;PU16.9,22.8;LBX#;"
23 W !,"PU1.3,21;LB"_$P($G(^OOPS(2260,IEN,"CA1A")),"^",9)_"#;" ;WHERE INJURY OCCURRED
24 ; Patch 11 - this should print field 109, not 4
25 ; S OOPSP=$P($G(^OOPS(2260,IEN,0)),"^",5) I OOPSP'="" D
26 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1A"))
27 S OOPSP=$P(OOPSDATA,"^",10) I OOPSP'="" D
28 . D WDATE^OOPSPUT1($P(OOPSP,"."),"1.4,19.8","2.3,19.8","3.2,19.8")
29 . D WTIME^OOPSPUT1($P(OOPSP,".",2)_"0000","6.5,20.1","6.5,19.7","4.8,20","5.8,20") ;D/T INJURY OCCURED
30 ; S OOPSDATA=$G(^OOPS(2260,IEN,"CA1A")) ; moved above patch 11
31 S OOPSP=$P(OOPSDATA,"^",11) I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"8.3,19.8","9.2,19.8","10,19.8") ;DATE OF NOTICE
32 W !,"PU11.6,20;LB"_$P(OOPSDATA,"^",12)_"#;" ;OCCUPATION
33 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1B"))
34 S OOPSP=$P(OOPSDATA,"^") I OOPSP'="" W !,"PU1.3,18.8;LB"_$E(OOPSP,1,86)_"#;","PU1.3,18.2;LB"_$E(OOPSP,87,150)_"#;","PU1.3,17.8;LB"_$E(OOPSP,151,200)_"#;" ;CAUSE OF INJURY
35 ; patch 8 - added block 14
36 S OOPSNOI=$$GET1^DIQ(2260,IEN,"62:1")
37 S OCC=$$GET1^DIQ(2260,IEN,15,"E")
38 S OCC=$S(OCC<2200:"G"_OCC,(OCC>2499&(OCC<9001)):"W"_OCC,(OCC=9999):"Z"_OCC,1:"")
39 S OOPSTYP=$$GET1^DIQ(2260,IEN,"123:1")
40 S OOPSSOR=$$GET1^DIQ(2260,IEN,"124:1")
41 W "PU17.4,17.8;LB"_OCC_"#;" ; OCCUPATION CODE
42 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1C")) W !,"PU1.3,16.8;LB"_$E(OOPSDATA,1,60)_"#;" ; 1st line NATURE OF INJURY
43 W "PU16.8,16.8;LB"_OOPSTYP_"#;"_"PU18.9,16.8;LB"_OOPSSOR_"#;" ;TYP/SORCE
44 W "PU1.3,15.8;LB"_$E(OOPSDATA,61,100)_"#;" ;NATURE OF INJURY
45 W "PU16.8,15.8;LB"_OOPSNOI_"#;" ; NOI CODE
46 S OOPSP=$P($G(^OOPS(2260,IEN,"CA1A")),"^",13) W !,$S(OOPSP["COP":"PU1.5,13.5;LBX#;",OOPSP["L":"PU1.5,12.4;LBX#;",1:"")
47 K OOPSNOI,OCC,OOPSTYP,OOPSSOR
48 ;
49 ; Patch 8 - added Employee signature, date signed to CA1
50 N X,X1,X2,STR,VER
51 S STR=$G(^OOPS(2260,IEN,"CA")),VER=$P(STR,"^",9),X=$P(STR,"^",7)
52 I $G(VER)=1&($G(X)'="") D
53 . S X1=$$GET1^DIQ(2260,IEN,119,"I"),X2=$$CA1SUM^OOPSUTL6()
54 . D DE^XUSHSHP
55 . W !,"PU9.6,10.7;LB/ES/ "_X_"#;"
56 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1ES"))
57 I $P(OOPSDATA,"^",2)'="",+$P(OOPSDATA,"^",3)>0 W !,"PU17.6,10.7;LB"_$$FMTE^XLFDT($P(OOPSDATA,"^",3),1)_"#;" ;DATE SIGNED
58 ;
59 ; Patch 8 - Witness information - only send the first witness entered
60 N WITN
61 S WITN=$O(^OOPS(2260,IEN,"CA1W",0))
62 I '$G(WITN) K I,J Q
63 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1W",WITN,1))
64 W !,"PU1.5,7.0;LB"_OOPSDATA_"#;"
65 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1W",WITN,0))
66 W !,"PU1.5,3.9;LB"_$P(OOPSDATA,U)_"#;"_"PU17.9,3.9;LB"_$$FMTE^XLFDT($P(OOPSDATA,U,6),1)_"#;"
67 W !,"PU1.5,3.2;LB"_$P(OOPSDATA,U,2)_"#;" ; Witness address
68 W !,"PU8.2,3.2;LB"_$P(OOPSDATA,U,3)_"#;" ; Witness City
69 W !,"PU13.4,3.2;LB"_$E($P($G(^DIC(5,+$P(OOPSDATA,U,4),0)),U),1,20)_"#;"
70 W !,"PU17.9,3.2;LB"_$E($P(OOPSDATA,U,5),1,5)_"#;"
71 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1D"))
72 W !,"PU1,3.9;LB"_$P(OOPSDATA,"^")_"#;"
73 K I,J Q
Note: See TracBrowser for help on using the repository browser.