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

OOPSUTL5.m

Go to the documentation of this file.
OOPSUTL5 ;WIOFO/CAH-Utilities Routine ;4/6/00
 ;;2.0;ASISTS;;Jun 03, 2002
VAL(IEN) ; Validation for required fields for DOL transmission
 ;
 ; Input:  IEN = Internal Entry Number of entry in file 2260
 ; Output: VAL = 1 Valid to be transmitted to DOL
 ;             = "" Invalid to be transmitted
 ;      NULL(#)= List of invalid fields
 K NULL
 N DATA,NAM,WITN,WITN0,WITN1
 S VAL=1
 F FLD=1,4,5,6,7,8,9,10,11,13,15,30,60,62,67,68,70,73 D
 .I $$GET1^DIQ(2260,IEN,FLD)="" S NULL(FLD)=$$GET1^DID(2260,FLD,"","LABEL")
 I $P($G(^OOPS(2260,IEN,"CA")),U,4)=3 D
 .I $$GET1^DIQ(2260,IEN,61)="" S NULL(61)=$$GET1^DID(2260,61,,"LABEL")
 I $$GET1^DIQ(2260,IEN,52,"I")=1 D
 .I $$GET1^DIQ(2260,IEN,146,"I")="N" D
 ..I $$GET1^DIQ(2260,IEN,147)="" S NULL(147)=$$GET1^DID(2260,147,,"LABEL")
 .I $$GET1^DIQ(2260,IEN,148,"I")="Y" D
 ..I $$GET1^DIQ(2260,IEN,149)="" S NULL(149)=$$GET1^DID(2260,149,,"LABEL")
 .F FLD=108,110,111,112,114,120,126,130,131,132,133,134,140,162,169,170,171,172,173,174,175,176,177,180,181,183,184,185 D
 ..I $$GET1^DIQ(2260,IEN,FLD)="" S NULL(FLD)=$$GET1^DID(2260,FLD,,"LABEL")
 .I $$GET1^DIQ(2260,IEN,150,"I")="Y" F FLD=151:1:155 D
 ..I $$GET1^DIQ(2260,IEN,FLD)="" S NULL(FLD)=$$GET1^DID(2260,FLD,,"LABEL")
 .I $$GET1^DIQ(2260,IEN,2,"I")=1 F FLD=166,167 D
 ..I $$GET1^DIQ(2260,IEN,FLD)="" S NULL(FLD)=$$GET1^DID(2260,FLD,,"LABEL")
 .I $P($G(^OOPS(2260,IEN,"CA1I")),U)'="" D
 ..S NAM=$P(^OOPS(2260,IEN,"CA1I"),U) I '$$NMCHK^OOPSUTL3(NAM) S NULL(156)="Invalid Physician Name format."
 ..I $$GET1^DIQ(2260,IEN,157)="" S NULL(157)=$$GET1^DID(2260,157,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,158)="" S NULL(158)=$$GET1^DID(2260,158,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,159)="" S NULL(159)=$$GET1^DID(2260,159,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,160)="" S NULL(160)=$$GET1^DID(2260,160,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,182)="" S NULL(182)=$$GET1^DID(2260,182,,"LABEL")
 .; check witness data
 .S WITN=$O(^OOPS(2260,IEN,"CA1W",0))
 .I $G(WITN) D
 ..S WITN0=$G(^OOPS(2260,IEN,"CA1W",WITN,0))
 ..S WITN1=$G(^OOPS(2260,IEN,"CA1W",WITN,1))
 ..I '$$NMCHK^OOPSUTL3($P(WITN0,U)) S NULL(125.01)="Invalid Witness Name format."
 ..I $P(WITN0,U,2)="" S NULL(125.1)=$$GET1^DID(2260.0125,1,,"LABEL")
 ..I $P(WITN0,U,3)="" S NULL(125.2)=$$GET1^DID(2260.0125,2,,"LABEL")
 ..I $P(WITN0,U,4)="" S NULL(125.3)=$$GET1^DID(2260.0125,3,,"LABEL")
 ..I $P(WITN0,U,5)="" S NULL(125.4)=$$GET1^DID(2260.0125,4,,"LABEL")
 ..I $P(WITN0,U,6)="" S NULL(125.5)=$$GET1^DID(2260.0125,5,,"LABEL")
 ..I $G(WITN1)="" S NULL(125.6)=$$GET1^DID(2260.0125,6,,"LABEL")
 .I $$WP^OOPSUTL4(165)>528 S NULL(165)=" REASON FOR CONTROVERT COP exceeds 528 character limit set by DOL."
 .I $$WP^OOPSUTL4(164)>528 S NULL(164)=" SUPERVISOR NOT AGREE EXPLAIN exceeds 528 character limit set by DOL."
 I $$GET1^DIQ(2260,IEN,52,"I")=2 D
 .F FLD=208,209,213,214,215,222,223,230,231,232,233,234,237,238,241,251,252,255,265,266,267,268,269 D
 ..I $$GET1^DIQ(2260,IEN,FLD)="" S NULL(FLD)=$$GET1^DID(2260,FLD,,"LABEL")
 .I $P($G(^OOPS(2260,IEN,"CA2J")),U)'="" D
 ..S NAM=$P(^OOPS(2260,IEN,"CA2J"),U) I '$$NMCHK^OOPSUTL3(NAM) S NULL(245)="Invalid Physician Name format."
 ..I $$GET1^DIQ(2260,IEN,246)="" S NULL(246)=$$GET1^DID(2260,246,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,247)="" S NULL(247)=$$GET1^DID(2260,247,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,248)="" S NULL(248)=$$GET1^DID(2260,248,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,249)="" S NULL(249)=$$GET1^DID(2260,249,,"LABEL")
 ..I $$GET1^DIQ(2260,IEN,270)="" S NULL(270)=$$GET1^DID(2260,270,,"LABEL")
 .I $$WP^OOPSUTL4(216)>528 S NULL(216)="RELATIONSHIP OF ILLNESS TO EMP exceeds 528 character limit set by DOL."
 .I $$WP^OOPSUTL4(217)>264 S NULL(217)="NATURE OF DISEASE/ILLNESS exceededs 264 character limit set by DOL."
 .I $$WP^OOPSUTL4(218)>528 S NULL(218)="CLAIM NOT FILED exceeds 528 character limit set by DOL."
 .I $$WP^OOPSUTL4(219)>528 S NULL(219)="EMPLOYEE STATEMENT DELAYED exceeds 528 character limit set by DOL."
 .I $$WP^OOPSUTL4(220)>528 S NULL(220)="MEDICAL REPORT DELAYED exceeds 528 character limit set by DOL."
 .I $$WP^OOPSUTL4(257)>528 S NULL(257)="WORK DUTY CHANGED exceeds 528 character limit set by DOL."
 ; if NULL is defined, invalid record
 I $D(NULL) S VAL=""
 K DISYS,DIW,DIW1,DIWT,DIWTC,DIWX,DN
 Q VAL
CONV(TOCON) ; CONVERT A RANGE (Ex. 1,2-4,7 to 1,2,3,4,5,7)
 ; 'TOCON' must be passed as a literal (Ex. "1,2-4,7" not 1,2-4,7) 
 ;
 ; Input: TOCON = Value to be converted
 ; Output: CONV = Converted value
 N CONV,FIRST,LAST,NUM,TEST,TEST2
 S CONV=""
 F TEST=1:1:$L(TOCON,",") D
 .S NUM=$P(TOCON,",",TEST)
 .I NUM'["-" S CONV=CONV_NUM_","
 .I NUM["-" S FIRST=$P(NUM,"-") S LAST=$P(NUM,"-",2) D
 ..F TEST2=FIRST:1:LAST S CONV=CONV_TEST2_","
 ..Q
 S CONV=$E(CONV,1,($L(CONV)-1))
 Q CONV