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

OOPSPC21.m

Go to the documentation of this file.
OOPSPC21 ;HIRMFO/YH-SUPERVISOR'S REPORT, CA1 FORM ;6/12/98
 ;;2.0;ASISTS;;Jun 03, 2002
 ;SUPERVISOR'S REPORT
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1F"))
 S OOPSTMP1=$P(OOPSDATA,"^")_"  "_$P(OOPSDATA,"^",2)
 W !,"PU1,27.4;LB"_OOPSTMP1_"#;" K OOPSTMP1
 ; Patch 8 - agency code, 8/29/00 changed to pull from fld 70
 W "PU17.7,27.4;LB"_$$GET1^DIQ(2260,IEN,"70:.01")_"#;"
 S OOPSTMP1=$P(OOPSDATA,"^",3)_", "_$P($G(^DIC(5,+$P(OOPSDATA,"^",4),0)),"^")_"  "_$P(OOPSDATA,"^",5)_"#;"
 W !,"PU1,26.6;LB"_OOPSTMP1_"#;" K OOPSTMP1
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1M"))
 S OOPSTMP1=$P(OOPSDATA,"^")_"   "_$P(OOPSDATA,"^",2)_"  "_$P(OOPSDATA,"^",3)_", "_$P($G(^DIC(5,+$P(OOPSDATA,"^",4),0)),"^")_"  "_$P(OOPSDATA,"^",5)_"#;"
 W !,"PU1,25.7;LB"_OOPSTMP1_"#;" K OOPSTMP1
 ; Patch 8 - add retirement block 19
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA"))
 S OOPSR=$P(OOPSDATA,U,4)
 W !,$S(OOPSR=1:"PU7.2,25.1;LBX#;",OOPSR=2:"PU9.2,25.1;LBX#",OOPSR=3:"PU11.2,25.1;LBX#;",1:"")
 I OOPSR=3 W !,"PU1,24.8;LB"_$P(OOPSDATA,U,5)_"#;"
 K OOPSR
 ;
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1F"))
 S OOPSP=$P(OOPSDATA,"^",9),OOPSP=$S(OOPSP="MID":"12:00A",OOPSP="NOON":"12:00P",1:OOPSP)
 I OOPSP'="" W !,"PU3,23.6;LB"_$E(OOPSP,1,2)_"#;PU3.6,23.6;LB"_$E(OOPSP,4,5)_"#;"_$S(OOPSP["A":"PU4.1,24.2;LBX#;",OOPSP["P":"PU4.1,23.7;LBX#;",1:"")
 S OOPSP=$P(OOPSDATA,"^",10),OOPSP=$S(OOPSP="MID":"12:00A",OOPSP="NOON":"12:00P",1:OOPSP)
 I OOPSP'="" W !,"PU6.3,23.6;LB"_$E(OOPSP,1,2)_"#;PU7,23.6;LB"_$E(OOPSP,4,5)_"#;"_$S(OOPSP["A":"PU7.4,24.2;LBX#;",OOPSP["P":"PU7.4,23.7;LBX#;",1:"")
 I +$P(OOPSDATA,"^",11)>0 D WKSCHDUL^OOPSPUT1($P(OOPSDATA,"^",11),"11,23.6","12.3,23.6","13.6,23.6","14.9,23.6","16.2,23.6","17.7,23.6","18.8,23.6") ;WORK SCHEDULE
 S OOPSP=$P($G(^OOPS(2260,IEN,0)),"^",5) I OOPSP'="" D WDATE^OOPSPUT1($P(OOPSP,"."),"2.4,22.6","3.4,22.6","4.4,22.6") ;DATE OF INJURY
 S OOPSP=$P($G(^OOPS(2260,IEN,"CA1L")),"^",7) I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"7.9,22.6","8.9,22.6","9.9,22.6") ;DATE OF NOTICE RECEIVED
 S OOPSP=$P(OOPSDATA,"^",13) I OOPSP'="" D
 . D WDATE^OOPSPUT1($P(OOPSP,"."),"13.1,22.6","14.1,22.6","15,22.6") ;DATE STOPPED WORK
 . D WTIME^OOPSPUT1($P(OOPSP,".",2)_"0000","17.8,23","17.8,22.5","16.8,22.5","17.4,22.5")
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1G"))
 S OOPSP=$P(OOPSDATA,"^") I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"2.4,21.6","3.4,21.6","4.4,21.6") ;DATE PAY STOPPED
 S OOPSP=$P(OOPSDATA,"^",2) I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"8.4,21.6","9.3,21.6","10.3,21.6") ;45 DAY PERIOD BEGIN
 S OOPSP=$P(OOPSDATA,"^",3) I OOPSP'="" D
 . D WDATE^OOPSPUT1($P(OOPSP,"."),"13.4,21.6","14.4,21.6","15.4,21.6") ;DATE RETURNED TO WORK
 . D WTIME^OOPSPUT1($P(OOPSP,".",2)_"0000","18.2,21.9","18.2,21.5","17.1,21.5","17.7,21.5")
 S OOPSP=$P(OOPSDATA,"^",4)
 W !,$S(OOPSP="Y":"PU7.6,21;LBX#;",OOPSP="N":"PU9,21;LBX#;",1:"") ;INJURED PERFORMING JOB
 I OOPSP="N",$P(OOPSDATA,"^",5)'="" W !,"PU1,20;LB"_$P(OOPSDATA,"^",5)_"#;"
 S OOPSP=$P(OOPSDATA,"^",6)
 W !,$S(OOPSP="Y":"PU15,19.5;LBX#;",OOPSP="N":"PU19.2,19.5;LBX#;",1:"") ;INJURY CAUSED BY EMPLOYEE
 I OOPSP="Y",$P(OOPSDATA,"^",7)'="" W !,"PU1,18.6;LB"_$P(OOPSDATA,"^",7)_"#;"
 S OOPSP=$P(OOPSDATA,"^",8) ;INJURY CAUSED BY 3RD PARTY
 W !,$S(OOPSP="Y":"PU1,17.3;LBX#;",OOPSP="N":"PU2.7,17.3;LBX#;",1:"")
 I OOPSP="Y" D
 . S OOPSDATA=$G(^OOPS(2260,IEN,"CA1H"))
 . W !,"PU4.3,17.7;LB"_$P(OOPSDATA,"^")_"#;"
 . W !,"PU4.3,16.8;LB"_$P(OOPSDATA,"^",2)_"#;"
 . W !,"PU4.3,15.9;LB"_$P(OOPSDATA,"^",3)_$S(+$P(OOPSDATA,"^",4)>0:", "_$P(^DIC(5,+$P(OOPSDATA,"^",4),0),"^"),1:"")_"   "_$P(OOPSDATA,"^",5)_"#;"
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1I"))
 W !,"PU1,15;LB"_$P(OOPSDATA,"^")_"#;" ;NAME OF PHYSICIAN
 W !,"PU1,14.1;LB"_$P(OOPSDATA,"^",2)_"#;" ;ADDRESS OF PHYSICIAN
 W !,"PU1,13.3;LB"_$P(OOPSDATA,"^",3)_$S(+$P(OOPSDATA,"^",4)>0:", "_$P(^DIC(5,+$P(OOPSDATA,"^",4),0),"^"),1:"")_" "_$P(OOPSDATA,"^",5)_"#;" ;CITY, STATE AND ZIP CODE
 S OOPSP=$P(OOPSDATA,"^",6) I OOPSP'="" D WDATE^OOPSPUT1(OOPSP,"17,14.9","18,14.9","18.9,14.9")
 S OOPSP=$P(OOPSDATA,"^",7) ;SHOW EMPLOYEE IS DISABLED FOR WORK
 W !,$S(OOPSP="Y":"PU17.4,14.1;LBX#;",OOPSP="N":"PU18.8,14.1;LBX#;",1:"")
 S OOPSP=$P(OOPSDATA,"^",8)
L35 ;YOUR KNOWLEDGE AGREE WITH STATEMENTS OF EMPLOYEE AND/OR WITNESS
 W !,$S(OOPSP="Y":"PU15.8,12.7;LBX#;",OOPSP="N":"PU17.1,12.7;LBX#;",1:"")
 S OOPSNODE="CA1J",OOPSDIWL=1,OOPSDIWR="",OOPSDIWF="C90",OOPSBS=3
 S OOPSSEL="W !,$S(II=1:""PU1,12.4;LB"",II=2:""PU1,12;LB"",II=3:""PU1,11.6;LB"",1:"""")_$G(^UTILITY($J,""W"",1,II,0))_""#"""
 S OOPSAT="W !,""PU1,12.3;LBSee Attached#;"""
 S OOPSLBL="35. Does your knowledge of the facts about this injury agree with statements of the employee and/or witness?"
 I $D(^OOPS(2260,IEN,OOPSNODE,0)) D
 .D WP^OOPSPCA(OOPSDIWL,OOPSDIWR,OOPSDIWF,OOPSBS,OOPSNODE,OOPSSEL,OOPSAT,OOPSLBL)
L36 ;IF THE EMPLOYING AGENCY CONTROVERTS CONTINUATION OF PAY, STATE THE REASON
 S OOPSNODE="CA1K",OOPSDIWL=1,OOPSDIWR="",OOPSDIWF="C65",OOPSBS=3
 S OOPSSEL="W !,$S(II=1:""PU1,10.6;LB"",II=2:""PU1,10.2;LB"",II=3:""PU1,9.8;1LB"",1:"""")_$G(^UTILITY($J,""W"",1,II,0))_""#"""
 S OOPSAT="W !,""PU1,10.5;LBSee Attached#;"""
 S OOPSLBL="36. If the employing agency controverts continuation of pay, state the reason in detail."
 I $D(^OOPS(2260,IEN,OOPSNODE,0)) D
 .D WP^OOPSPCA(OOPSDIWL,OOPSDIWR,OOPSDIWF,OOPSBS,OOPSNODE,OOPSSEL,OOPSAT,OOPSLBL)
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1L"))
 ; Patch 8 - changed PAY RATE PER logic to get external value
 S OOPSP=$$GET1^DIQ(2260,IEN,167,"E")
 W !,"PU15.2,9.9;LB"_$P(OOPSDATA,"^")_"#;PU18.7,9.9;LB"_OOPSP_"#;" K OOPSP  ;PAY RATE
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1ES"))
 W !,"PU1,7.1;LB"_$P($G(^OOPS(2260,IEN,"CA1L")),"^",3)_"#;"
 S OOPSP=$P($G(^VA(200,+$P(OOPSDATA,"^",4),0)),"^")
 W !,"PU1,6.2;LB"_OOPSP_"#;"
 I $P(OOPSDATA,"^",5)'="" W !,"PU1,5.4;LB/ES/ "_OOPSP_"#;"
 I $P(OOPSDATA,"^",6)'="" W !,"PU12.9,5.4;LB"_$$FMTE^XLFDT($P(OOPSDATA,"^",6),1)_"#;"
 S OOPSDATA=$G(^OOPS(2260,IEN,"CA1L"))
 W !,"PU1,4.7;LB"_$P(OOPSDATA,"^",4)_"#;PU12.9,4.7;LB"_$P(OOPSDATA,"^",5)_"#;"
 S OOPSP=+$P(OOPSDATA,"^",6)
 W !,$S(OOPSP=1:"PU4.7,4.3;LBX#;",OOPSP=2:"PU4.7,3.9;LBX#;",OOPSP=3:"PU4.7,3.5;LBX#;",OOPSP=4:"PU4.7,3.1;LBX#;",1:"")
 Q