Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OOPSPC11

OOPSPC11.m

Go to the documentation of this file.
OOPSPC11 ;HIRMFO/YH-EMPLOYEE'S DATA, CA1 FORM ;6/12/98
 ;;2.0;ASISTS;;Jun 03, 2002
 ;EMPLOYEE DATA
 ;EMPLOYEE'S DATA
 S OOPSDATA=$P($G(^OOPS(2260,IEN,0)),"^",2)
 W !,"PU1.3,25.4,LB"_OOPSDATA_"#;" ;NAME
 S OOPSDATA=$G(^OOPS(2260,IEN,"2162A"))
 S OOPSP=$P(OOPSDATA,"^") I OOPSP'["-" S OOPSP=$E(OOPSP,1,3)_"-"_$E(OOPSP,4,5)_"-"_$E(OOPSP,6,13)
 W !,"PU16.8,25.3;LB"_OOPSP_"#;" ;SSN
 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
 S OOPSP=$P(OOPSDATA,"^",3) W !,$S(OOPSP=1:"PU7.2,24.5;LBX#;",OOPSP=2:"PU8.6,24.5;LBX#;",1:"") ;SEX
 N PHN
 S PHN=$TR($P(OOPSDATA,"^",8),"/-*#","")
 W !,"PU10.8,24.6;LB"_$E(PHN,1,3)_"-"_$E(PHN,4,6)_"-",$E(PHN,7,10)_"#;"
 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
 I $P(OOPSDATA,"^",4)'="" W !,"PU1.3,23.6;LB"_$P(OOPSDATA,"^",4)_"#;"
 I $P(OOPSDATA,"^",5)'="" W !,"PU1.3,22.6;LB"_$P(OOPSDATA,"^",5)_"#;"
 I $D(^DIC(5,+$P(OOPSDATA,"^",6),0)) W !,"LB, "_$P(^DIC(5,+$P(OOPSDATA,"^",6),0),"^")_"   "_$P(OOPSDATA,"^",7)_"#;" ;ADDRESS
 S OOPSP=+$P($G(^OOPS(2260,IEN,"CA1A")),"^",8) ;DEPENDENTS
 I OOPSP>0,OOPSP<7 D
 . 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:"")
 I OOPSP=7 W !,"PU16.9,23.6;LBX#;PU16.9,23.2;LBX#;PU16.9,22.8;LBX#;"
 W !,"PU1.3,21;LB"_$P($G(^OOPS(2260,IEN,"CA1A")),"^",9)_"#;" ;WHERE INJURY OCCURRED
 ; Patch 11 - this should print field 109, not 4
 ; S OOPSP=$P($G(^OOPS(2260,IEN,0)),"^",5) I OOPSP'="" D
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1A"))
 S OOPSP=$P(OOPSDATA,"^",10) I OOPSP'="" D
 . D WDATE^OOPSPUT1($P(OOPSP,"."),"1.4,19.8","2.3,19.8","3.2,19.8")
 . 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
 ; S OOPSDATA=$G(^OOPS(2260,IEN,"CA1A"))  ; moved above patch 11
 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
 W !,"PU11.6,20;LB"_$P(OOPSDATA,"^",12)_"#;" ;OCCUPATION
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1B"))
 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
 ; patch 8 - added block 14
 S OOPSNOI=$$GET1^DIQ(2260,IEN,"62:1")
 S OCC=$$GET1^DIQ(2260,IEN,15,"E")
 S OCC=$S(OCC<2200:"G"_OCC,(OCC>2499&(OCC<9001)):"W"_OCC,(OCC=9999):"Z"_OCC,1:"")
 S OOPSTYP=$$GET1^DIQ(2260,IEN,"123:1")
 S OOPSSOR=$$GET1^DIQ(2260,IEN,"124:1")
 W "PU17.4,17.8;LB"_OCC_"#;"     ; OCCUPATION CODE
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1C")) W !,"PU1.3,16.8;LB"_$E(OOPSDATA,1,60)_"#;"  ; 1st line NATURE OF INJURY
 W "PU16.8,16.8;LB"_OOPSTYP_"#;"_"PU18.9,16.8;LB"_OOPSSOR_"#;" ;TYP/SORCE
 W "PU1.3,15.8;LB"_$E(OOPSDATA,61,100)_"#;" ;NATURE OF INJURY
 W "PU16.8,15.8;LB"_OOPSNOI_"#;"  ; NOI CODE
 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:"")
 K OOPSNOI,OCC,OOPSTYP,OOPSSOR
 ;
 ; Patch 8 - added Employee signature, date signed to CA1
 N X,X1,X2,STR,VER
 S STR=$G(^OOPS(2260,IEN,"CA")),VER=$P(STR,"^",9),X=$P(STR,"^",7)
 I $G(VER)=1&($G(X)'="") D
 . S X1=$$GET1^DIQ(2260,IEN,119,"I"),X2=$$CA1SUM^OOPSUTL6()
 . D DE^XUSHSHP
 . W !,"PU9.6,10.7;LB/ES/ "_X_"#;"
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1ES"))
 I $P(OOPSDATA,"^",2)'="",+$P(OOPSDATA,"^",3)>0 W !,"PU17.6,10.7;LB"_$$FMTE^XLFDT($P(OOPSDATA,"^",3),1)_"#;" ;DATE SIGNED
 ;
 ; Patch 8 - Witness information - only send the first witness entered
 N WITN
 S WITN=$O(^OOPS(2260,IEN,"CA1W",0))
 I '$G(WITN) K I,J Q
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1W",WITN,1))
 W !,"PU1.5,7.0;LB"_OOPSDATA_"#;"
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1W",WITN,0))
 W !,"PU1.5,3.9;LB"_$P(OOPSDATA,U)_"#;"_"PU17.9,3.9;LB"_$$FMTE^XLFDT($P(OOPSDATA,U,6),1)_"#;"
 W !,"PU1.5,3.2;LB"_$P(OOPSDATA,U,2)_"#;"   ; Witness address
 W !,"PU8.2,3.2;LB"_$P(OOPSDATA,U,3)_"#;"   ; Witness City
 W !,"PU13.4,3.2;LB"_$E($P($G(^DIC(5,+$P(OOPSDATA,U,4),0)),U),1,20)_"#;"
 W !,"PU17.9,3.2;LB"_$E($P(OOPSDATA,U,5),1,5)_"#;"
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1D"))
 W !,"PU1,3.9;LB"_$P(OOPSDATA,"^")_"#;"
 K I,J Q