IBXS8 ; GENERATED FROM 'IB SCREEN8' INPUT TEMPLATE(#514), FILE 399;11/02/18
D DE G BEGIN
DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))=""
I $D(^("DEN")) S %Z=^("DEN") S %=$P(%Z,U,1) S:%]"" DE(48)=% S %=$P(%Z,U,2) S:%]"" DE(49)=% S %=$P(%Z,U,3) S:%]"" DE(50)=% S %=$P(%Z,U,4) S:%]"" DE(52)=%
I $D(^("U2")) S %Z=^("U2") S %=$P(%Z,U,14) S:%]"" DE(37)=% S %=$P(%Z,U,15) S:%]"" DE(40)=% S %=$P(%Z,U,16) S:%]"" DE(33)=%,DE(34)=%
I $D(^("U4")) S %Z=^("U4") S %=$P(%Z,U,1) S:%]"" DE(4)=% S %=$P(%Z,U,2) S:%]"" DE(7)=%,DE(61)=% S %=$P(%Z,U,3) S:%]"" DE(9)=% S %=$P(%Z,U,4) S:%]"" DE(24)=% S %=$P(%Z,U,5) S:%]"" DE(25)=% S %=$P(%Z,U,7) S:%]"" DE(15)=%
I S %=$P(%Z,U,8) S:%]"" DE(16)=% S %=$P(%Z,U,9) S:%]"" DE(10)=% S %=$P(%Z,U,10) S:%]"" DE(11)=% S %=$P(%Z,U,11) S:%]"" DE(12)=% S %=$P(%Z,U,13) S:%]"" DE(29)=% S %=$P(%Z,U,14) S:%]"" DE(30)=%
I $D(^("U8")) S %Z=^("U8") S %=$P(%Z,U,1) S:%]"" DE(21)=%,DE(58)=% S %=$P(%Z,U,2) S:%]"" DE(19)=%,DE(55)=% S %=$P(%Z,U,3) S:%]"" DE(20)=%,DE(56)=%
K %Z Q
;
W W !?DL+DL-2,DLB_": "
Q
O D W W Y W:$X>45 !?9
I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 K X S X("FIELD")=DIFLD,X("FILE")=DP W " ("_$$EZBLD^DIALOG(710,.X)_")" K X S X="" Q ;**
TR Q:DV["K"&(DUZ(0)'="@") R X:DTIME E S (DTOUT,X)=U W $C(7)
Q
A K DQ(DQ) S DQ=DQ+1
B G @DQ
RE G A:DV["K"&(DUZ(0)'["@"),PR:$D(DE(DQ)) D W,TR
N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
RD G QS:X?."?" I X["^" D D G ^DIE17
I X="@" D D G Z^DIE2
I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
T G M^DIE17:DV,^DIE3:DV["V",P:DV'["S" I X?.ANP D SET^DIED I 'DDER G V
K DDER G X
P I DV["P" S DIC=U_DU,DIC(0)=$E("EN",$D(DB(DQ))+1)_"M"_$E("L",DV'["'") S:DIC(0)["L" DLAYGO=+$P(DV,"P",2) G:DV["*" AST^DIED D NOSCR^DIED S X=+Y,DIC=DIE G X:X<0
G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
V D @("X"_DQ) K YS
UNIQ I DV["U",$D(X),DIFLD=.01 K % M %=@(DIE_"""B"",X)") K %(DA) K:$O(%(0)) X
Z K DIC("S"),DLAYGO I $D(X),X'=U D:$G(DE(DW,"INDEX")) SAVEVALS G:'$$KEYCHK UNIQFERR^DIE17 S DG(DW)=X S:DV["d" ^DISV(DUZ,"DIE",DLB)=X G A
X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
S X="?BAD"
QS S DZ=X D D,QQ^DIEQ G B
D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
R I DG["P",@("$D(^"_X_"0))") S X=+$P(^(0),U,2) G RP:'$D(^(Y,0)) S Y=$P(^(0),U),X=$P(^DD(X,.01,0),U,3),DG=$P(^(0),U,2) G R
I DG["V",+Y,$P(Y,";",2)["(",$D(@(U_$P(Y,";",2)_"0)")) S X=+$P(^(0),U,2) G RP:'$D(^(+Y,0)) S Y=$P(^(0),U) I $D(^DD(+X,.01,0)) S DG=$P(^(0),U,2),X=$P(^(0),U,3) G R
X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") I %]"" S Y=$S($G(DUZ("LANG"))'>1:%,'DIFLD:%,1:$$SET^DIQ(DP,DIFLD,Y))
RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
I I DV'["I",DV'["#" G RD
D E^DIE0 G RD:$D(X),PR
Q
SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
Q
NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
BEGIN S DNM="IBXS8",DQ=1
N DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR K DIEFIRE,DIEBADK S DIEZTMP=$$GETTMP^DIKC1("DIEZ")
M DIEZAR=^DIE(514,"AR") S DICRREC="TRIG^DIE17"
S:$D(DTIME)[0 DTIME=300 S D0=DA,DIIENS=DA_",",DIEZ=514,U="^"
1 S DQ=2 ;@81
2 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=2 D X2 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X2 I $$FT^IBCEF(IBIFN)=7 S Y="@801"
Q
3 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=3 D X3 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X3 S:IBDR20'["81" Y="@82"
Q
4 S DW="U4;1",DV="NJ18,2",DU="",DIFLD=260,DLB="COB Non-Covered Charge Amt"
G RE
X4 S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>999999999999999)!(X<0) X
Q
;
5 S DQ=6 ;@82
6 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 D X6 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X6 S:IBDR20'["82" Y="@83"
Q
7 S DW="U4;2",DV="FXJ50",DU="",DIFLD=261,DLB="Claim Number"
G RE
X7 K:$L(X)>50!($L(X)<1)!($TR(X," ")="")!($E(X)=" ") X
I $D(X),X'?.ANP K X
Q
;
8 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=8 D X8 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X8 S:IBT=3 Y="@84"
Q
9 S DW="U4;3",DV="D",DU="",DIFLD=262,DLB="Date of 1st Contact"
G RE
X9 S %DT="E" D ^%DT S X=Y K:Y<1 X
Q
;
10 S DW="U4;9",DV="F",DU="",DIFLD=268,DLB="Contact Name"
G RE
X10 K:$L(X)>60!($L(X)<1) X
I $D(X),X'?.ANP K X
Q
;
11 S DW="U4;10",DV="NJ10,0",DU="",DIFLD=269,DLB="Contact Phone"
G RE
X11 K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"."1N.N) X
Q
;
12 S DW="U4;11",DV="NJ10,0",DU="",DIFLD=269.1,DLB="Contact Phone Extension"
G RE
X12 K:+X'=X!(X>9999999999)!(X<1)!(X?.E1"."1.N) X
Q
;
13 S DQ=14 ;@83
14 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=14 D X14 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X14 S:IBDR20'["83" Y="@84"
Q
15 S DW="U4;7",DV="P81'",DU="",DIFLD=266,DLB="Primary Code"
S DU="ICPT("
G RE
X15 Q
16 S DW="U4;8",DV="P81'",DU="",DIFLD=267,DLB="Secondary Code"
S DU="ICPT("
G RE
X16 Q
17 S DQ=18 ;@84
18 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=18 D X18 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X18 S:IBDR20'["84" Y="@85"
Q
19 S DW="U8;2",DV="*P353.3'",DU="",DIFLD=285,DLB="Report Type"
S DU="IBE(353.3,"
G RE
X19 S DIC("S")="I $$RTYPOK^IBCEU(X,DA)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
Q
;
20 S DW="U8;3",DV="S",DU="",DIFLD=286,DLB="Transmission Method"
S DU="AA:Available on Request at Provider Site;BM:By Mail;EL:Electronically Only;EM:E-Mail;FT:File Transfer;FX:By Fax;"
G RE
X20 Q
21 S DW="U8;1",DV="F",DU="",DIFLD=284,DLB="Attachment Control #"
G RE
X21 K:$L(X)>30!($L(X)<1) X
I $D(X),X'?.ANP K X
Q
;
22 S DQ=23 ;@85
23 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=23 D X23 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X23 S:IBDR20'["85" Y="@86"
Q
24 S DW="U4;4",DV="DX",DU="",DIFLD=263,DLB="Disability Start Date"
G RE
X24 S %DT="E" D ^%DT S X=Y K:DT<X X I $D(X),$P($G(^DGCR(399,DA,"U4")),U,5)'="",X>$P($G(^DGCR(399,DA,"U4")),U,5) K X
Q
;
25 S DW="U4;5",DV="DX",DU="",DIFLD=264,DLB="Disability End Date"
G RE
X25 S %DT="E" D ^%DT S X=Y K:DT<X X I $D(X),X<$P($G(^DGCR(399,DA,"U4")),U,4) K X
Q
;
26 S DQ=27 ;@86
27 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=27 D X27 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X27 S:IBDR20'["86" Y="@87"
Q
28 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=28 D X28 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X28 S:$P($G(^DGCR(399,DA,0)),U,19)=3 Y="@87"
Q
29 S DW="U4;13",DV="DX",DU="",DIFLD=282,DLB="Assumed Care Date"
G RE
X29 S %DT="E" D ^%DT S X=Y K:DT<X X I $D(X),$P($G(^DGCR(399,DA,"U4")),U,14)'="",X>$P($G(^DGCR(399,DA,"U4")),U,14) K X
Q
;
30 S DW="U4;14",DV="DX",DU="",DIFLD=283,DLB="Relinquished Care Date"
G RE
X30 S %DT="E" D ^%DT S X=Y K:DT<X X I $D(X),X<$P($G(^DGCR(399,DA,"U4")),U,13) K X
Q
;
31 S DQ=32 ;@87
32 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=32 D X32 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X32 S:IBDR20'["87" Y="@88"
Q
33 S DW="U2;16",DV="S",DU="",DIFLD=238,DLB=$$LABEL^DIALOGZ(DP,DIFLD)
S DU="01:EPSDT/CHAP;02:Phys Handicapped Children Program;03:Special Fed Funding;05:Disability;07:Induced Abortion - Danger to Life;08:Induced Abortion - Rape or Incest;09:2nd Opinion/Surgery;"
S X=$S($P($G(^DGCR(399,DA,"U2")),U,16)'="":$P($G(^DGCR(399,DA,"U2")),U,16),$$WNRBILL^IBEFUNC(DA):"31",1:"")
S Y=X
S X=Y,DB(DQ)=1,DE(DW,"4/")="" G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
G RD:X="@",Z
X33 Q
34 S DW="U2;16",DV="S",DU="",DIFLD=238,DLB="Special Program"
S DU="01:EPSDT/CHAP;02:Phys Handicapped Children Program;03:Special Fed Funding;05:Disability;07:Induced Abortion - Danger to Life;08:Induced Abortion - Rape or Incest;09:2nd Opinion/Surgery;"
G RE
X34 Q
35 S DQ=36 ;@88
36 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=36 D X36 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X36 S:IBDR20'["88" Y="@89"
Q
37 S DW="U2;14",DV="S",DU="",DIFLD=236,DLB="Homebound"
S DU="0:NO;1:YES;"
G RE
X37 Q
38 S DQ=39 ;@89
39 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=39 D X39 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X39 S:IBDR20'["89" Y="@899"
Q
40 S DW="U2;15",DV="D",DU="",DIFLD=237,DLB="Date Last Seen"
G RE
X40 S %DT="EX" D ^%DT S X=Y K:Y<1 X
Q
;
41 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=41 D X41 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X41 S Y="@899"
Q
42 S DQ=43 ;@801
43 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=43 D X43 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X43 S $Y=3
Q
44 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=44 D X44 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X44 S:IBDR20'["81" Y="@802"
Q
45 S D=0 K DE(1) ;96
S DIFLD=96,DGO="^IBXS81",DC="2^399.096IA^DEN1^",DV="399.096MNJ2,0",DW="0;1",DOW=$$LABEL^DIALOGZ(DP,DIFLD),DLB=$P($$EZBLD^DIALOG(8042,DOW),": ") S:D DC=DC_D
G RE:D I $D(DSC(399.096))#2,$P(DSC(399.096),"I $D(^UTILITY(",1)="" X DSC(399.096) S D=$O(^(0)) S:D="" D=-1 G M45
S D=$S($D(^DGCR(399,DA,"DEN1",0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
M45 I D>0 S DC=DC_D I $D(^DGCR(399,DA,"DEN1",+D,0)) S DE(45)=$P(^(0),U,1)
G RE
R45 D DE
S D=$S($D(^DGCR(399,DA,"DEN1",0)):$P(^(0),U,3,4),1:1) G 45+1
;
46 S DQ=47 ;@802
47 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=47 D X47 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X47 S:IBDR20'["82" Y="@803"
Q
48 S DW="DEN;1",DV="D",DU="",DIFLD=92,DLB="Banding Date"
G RE
X48 S %DT="EX" D ^%DT S X=Y K:Y<1 X
Q
;
49 S DW="DEN;2",DV="NJ15,0",DU="",DIFLD=93,DLB="Treatment Months Count"
G RE
X49 K:+X'=X!(X>999999999999999)!(X<0)!(X?.E1"."1N.N) X
Q
;
50 S DW="DEN;3",DV="NJ15,0",DU="",DIFLD=94,DLB="Treatment Months Remaining Count"
G RE
X50 K:+X'=X!(X>999999999999999)!(X<0)!(X?.E1"."1N.N) X
Q
;
51 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=51 D X51 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X51 I $P($G(^DGCR(399,DA,"DEN")),U,2)'="",$P($G(^("DEN")),U,3)'="" S Y="@803"
Q
52 S DW="DEN;4",DV="S",DU="",DIFLD=95,DLB="Treatment Indicator"
S DU="1:YES;"
G RE
X52 Q
53 S DQ=54 ;@803
54 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=54 D X54 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X54 S:IBDR20'["83" Y="@804"
Q
55 S DW="U8;2",DV="*P353.3'",DU="",DIFLD=285,DLB="Report Type"
S DU="IBE(353.3,"
G RE
X55 S DIC("S")="I $$RTYPOK^IBCEU(X,DA)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
Q
;
56 S DW="U8;3",DV="S",DU="",DIFLD=286,DLB="Transmission Method"
S DU="AA:Available on Request at Provider Site;BM:By Mail;EL:Electronically Only;EM:E-Mail;FT:File Transfer;FX:By Fax;"
G RE
X56 Q
57 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=57 D X57 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X57 S:$P($G(^DGCR(399,DA,"U8")),U,3)="AA" Y="@804"
Q
58 S DW="U8;1",DV="F",DU="",DIFLD=284,DLB="Attachment Control #"
G RE
X58 K:$L(X)>30!($L(X)<1) X
I $D(X),X'?.ANP K X
Q
;
59 S DQ=60 ;@804
60 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=60 D X60 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
X60 S:IBDR20'["84" Y="@899"
Q
61 S DW="U4;2",DV="FXJ50",DU="",DIFLD=261,DLB="Claim Number"
G RE
X61 K:$L(X)>50!($L(X)<1)!($TR(X," ")="")!($E(X)=" ") X
I $D(X),X'?.ANP K X
Q
;
62 S DQ=63 ;@899
63 G 0^DIE17
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBXS8 12018 printed Nov 22, 2024@17:40:46 Page 2
IBXS8 ; GENERATED FROM 'IB SCREEN8' INPUT TEMPLATE(#514), FILE 399;11/02/18
+1 DO DE
GOTO BEGIN
DE SET DIE="^DGCR(399,"
SET DIC=DIE
SET DP=399
SET DL=1
SET DIEL=0
SET DU=""
KILL DG,DE,DB
if $ORDER(^DGCR(399,DA,""))=""
QUIT
+1 IF $DATA(^("DEN"))
SET %Z=^("DEN")
SET %=$PIECE(%Z,U,1)
if %]""
SET DE(48)=%
SET %=$PIECE(%Z,U,2)
if %]""
SET DE(49)=%
SET %=$PIECE(%Z,U,3)
if %]""
SET DE(50)=%
SET %=$PIECE(%Z,U,4)
if %]""
SET DE(52)=%
+2 IF $DATA(^("U2"))
SET %Z=^("U2")
SET %=$PIECE(%Z,U,14)
if %]""
SET DE(37)=%
SET %=$PIECE(%Z,U,15)
if %]""
SET DE(40)=%
SET %=$PIECE(%Z,U,16)
if %]""
SET DE(33)=%
SET DE(34)=%
+3 IF $DATA(^("U4"))
SET %Z=^("U4")
SET %=$PIECE(%Z,U,1)
if %]""
SET DE(4)=%
SET %=$PIECE(%Z,U,2)
if %]""
SET DE(7)=%
SET DE(61)=%
SET %=$PIECE(%Z,U,3)
if %]""
SET DE(9)=%
SET %=$PIECE(%Z,U,4)
if %]""
SET DE(24)=%
SET %=$PIECE(%Z,U,5)
if %]""
SET DE(25)=%
SET %=$PIECE(%Z,U,7)
if %]""
SET DE(15)=%
+4 IF $TEST
SET %=$PIECE(%Z,U,8)
if %]""
SET DE(16)=%
SET %=$PIECE(%Z,U,9)
if %]""
SET DE(10)=%
SET %=$PIECE(%Z,U,10)
if %]""
SET DE(11)=%
SET %=$PIECE(%Z,U,11)
if %]""
SET DE(12)=%
SET %=$PIECE(%Z,U,13)
if %]""
SET DE(29)=%
SET %=$PIECE(%Z,U,14)
if %]""
SET DE(30)=%
+5 IF $DATA(^("U8"))
SET %Z=^("U8")
SET %=$PIECE(%Z,U,1)
if %]""
SET DE(21)=%
SET DE(58)=%
SET %=$PIECE(%Z,U,2)
if %]""
SET DE(19)=%
SET DE(55)=%
SET %=$PIECE(%Z,U,3)
if %]""
SET DE(20)=%
SET DE(56)=%
+6 KILL %Z
QUIT
+7 ;
W WRITE !?DL+DL-2,DLB_": "
+1 QUIT
O DO W
WRITE Y
if $X>45
WRITE !?9
+1 IF $LENGTH(Y)>19
IF 'DV
IF DV'["I"
IF (DV["F"!(DV["K"))
GOTO RW^DIR2
+2 ;**
if Y]""
WRITE "// "
IF 'DV
IF DV["I"
IF $DATA(DE(DQ))#2
KILL X
SET X("FIELD")=DIFLD
SET X("FILE")=DP
WRITE " ("_$$EZBLD^DIALOG(710,.X)_")"
KILL X
SET X=""
QUIT
TR if DV["K"&(DUZ(0)'="@")
QUIT
READ X:DTIME
IF '$TEST
SET (DTOUT,X)=U
WRITE $CHAR(7)
+1 QUIT
A KILL DQ(DQ)
SET DQ=DQ+1
B GOTO @DQ
RE if DV["K"&(DUZ(0)'["@")
GOTO A
if $DATA(DE(DQ))
GOTO PR
DO W
DO TR
N IF X=""
if $DATA(^DD("KEY","F",DP,DIFLD))
GOTO NKEY
if DV'["R"
GOTO A
if 'DV
GOTO X
if D'>0
GOTO X
GOTO A
RD if X?."?"
GOTO QS
IF X["^"
DO D
GOTO ^DIE17
+1 IF X="@"
DO D
GOTO Z^DIE2
+2 IF X=" "
IF DV["d"
IF DV'["P"
IF $DATA(^DISV(DUZ,"DIE",DLB))
SET X=^(DLB)
IF DV'["D"
IF DV'["S"
WRITE " "_X
T if DV
GOTO M^DIE17
if DV["V"
GOTO ^DIE3
if DV'["S"
GOTO P
IF X?.ANP
DO SET^DIED
IF 'DDER
GOTO V
+1 KILL DDER
GOTO X
P IF DV["P"
SET DIC=U_DU
SET DIC(0)=$EXTRACT("EN",$DATA(DB(DQ))+1)_"M"_$EXTRACT("L",DV'["'")
if DIC(0)["L"
SET DLAYGO=+$PIECE(DV,"P",2)
if DV["*"
GOTO AST^DIED
DO NOSCR^DIED
SET X=+Y
SET DIC=DIE
if X<0
GOTO X
+1 if DV'["N"
GOTO V
DO D
IF $LENGTH($PIECE(X,"."))>24
KILL X
GOTO Z
+2 IF $PIECE(DQ(DQ),U,5)'["$"
IF X?.1"-".N.1".".N
IF $PIECE(DQ(DQ),U,5,99)["+X'=X"
SET X=+X
V DO @("X"_DQ)
KILL YS
UNIQ IF DV["U"
IF $DATA(X)
IF DIFLD=.01
KILL %
MERGE %=@(DIE_"""B"",X)")
KILL %(DA)
if $ORDER(%(0))
KILL X
Z KILL DIC("S"),DLAYGO
IF $DATA(X)
IF X'=U
if $GET(DE(DW,"INDEX"))
DO SAVEVALS
if '$$KEYCHK
GOTO UNIQFERR^DIE17
SET DG(DW)=X
if DV["d"
SET ^DISV(DUZ,"DIE",DLB)=X
GOTO A
X if '$DATA(ZTQUEUED)
WRITE $CHAR(7),"??"
IF $DATA(DB(DQ))
GOTO Z^DIE17
+1 SET X="?BAD"
QS SET DZ=X
DO D
DO QQ^DIEQ
GOTO B
D SET D=DIFLD
SET DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$PIECE($TEXT(@("X"_DQ))," ",2,99)
QUIT
Y IF '$DATA(DE(DQ))
DO O
if "@"'[X
GOTO RD
if DV'["R"&(X="@")
GOTO A
if X="@"
GOTO X
SET X=Y
GOTO N
PR SET DG=DV
SET Y=DE(DQ)
SET X=DU
IF $DATA(DQ(DQ,2))
XECUTE DQ(DQ,2)
GOTO RP
R IF DG["P"
IF @("$D(^"_X_"0))")
SET X=+$PIECE(^(0),U,2)
if '$DATA(^(Y,0))
GOTO RP
SET Y=$PIECE(^(0),U)
SET X=$PIECE(^DD(X,.01,0),U,3)
SET DG=$PIECE(^(0),U,2)
GOTO R
+1 IF DG["V"
IF +Y
IF $PIECE(Y,";",2)["("
IF $DATA(@(U_$PIECE(Y,";",2)_"0)"))
SET X=+$PIECE(^(0),U,2)
if '$DATA(^(+Y,0))
GOTO RP
SET Y=$PIECE(^(0),U)
IF $DATA(^DD(+X,.01,0))
SET DG=$PIECE(^(0),U,2)
SET X=$PIECE(^(0),U,3)
GOTO R
+2 if DG["D"
XECUTE ^DD("DD")
IF DG["S"
SET %=$PIECE($PIECE(";"_X,";"_Y_":",2),";")
IF %]""
SET Y=$SELECT($GET(DUZ("LANG"))'>1:%,'DIFLD:%,1:$$SET^DIQ(DP,DIFLD,Y))
RP DO O
IF X=""
SET X=DE(DQ)
if 'DV
GOTO A
if DC<2
GOTO A
GOTO N^DIE17
I IF DV'["I"
IF DV'["#"
GOTO RD
+1 DO E^DIE0
if $DATA(X)
GOTO RD
GOTO PR
+2 QUIT
SAVEVALS SET @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$GET(DE(DQ))
if $DATA(^("F"))[0
SET ^("F")=$GET(DE(DQ))
+1 IF $DATA(DE(DW,"4/"))
SET @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
+2 IF '$TEST
KILL @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
+3 QUIT
NKEY if '$DATA(ZTQUEUED)
WRITE "?? Required key field"
SET X="?BAD"
GOTO QS
KEYCHK() if $GET(DE(DW,"KEY"))=""
QUIT 1
QUIT @DE(DW,"KEY")
BEGIN SET DNM="IBXS8"
SET DQ=1
+1 NEW DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR
KILL DIEFIRE,DIEBADK
SET DIEZTMP=$$GETTMP^DIKC1("DIEZ")
+2 MERGE DIEZAR=^DIE(514,"AR")
SET DICRREC="TRIG^DIE17"
+3 if $DATA(DTIME)[0
SET DTIME=300
SET D0=DA
SET DIIENS=DA_","
SET DIEZ=514
SET U="^"
1 ;@81
SET DQ=2
2 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=2
DO X2
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X2 IF $$FT^IBCEF(IBIFN)=7
SET Y="@801"
+1 QUIT
3 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=3
DO X3
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X3 if IBDR20'["81"
SET Y="@82"
+1 QUIT
4 SET DW="U4;1"
SET DV="NJ18,2"
SET DU=""
SET DIFLD=260
SET DLB="COB Non-Covered Charge Amt"
+1 GOTO RE
X4 if X["$"
SET X=$PIECE(X,"$",2)
if X'?.N.1".".2N!(X>999999999999999)!(X<0)
KILL X
+1 QUIT
+2 ;
5 ;@82
SET DQ=6
6 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=6
DO X6
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X6 if IBDR20'["82"
SET Y="@83"
+1 QUIT
7 SET DW="U4;2"
SET DV="FXJ50"
SET DU=""
SET DIFLD=261
SET DLB="Claim Number"
+1 GOTO RE
X7 if $LENGTH(X)>50!($LENGTH(X)<1)!($TRANSLATE(X," ")="")!($EXTRACT(X)=" ")
KILL X
+1 IF $DATA(X)
IF X'?.ANP
KILL X
+2 QUIT
+3 ;
8 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=8
DO X8
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X8 if IBT=3
SET Y="@84"
+1 QUIT
9 SET DW="U4;3"
SET DV="D"
SET DU=""
SET DIFLD=262
SET DLB="Date of 1st Contact"
+1 GOTO RE
X9 SET %DT="E"
DO ^%DT
SET X=Y
if Y<1
KILL X
+1 QUIT
+2 ;
10 SET DW="U4;9"
SET DV="F"
SET DU=""
SET DIFLD=268
SET DLB="Contact Name"
+1 GOTO RE
X10 if $LENGTH(X)>60!($LENGTH(X)<1)
KILL X
+1 IF $DATA(X)
IF X'?.ANP
KILL X
+2 QUIT
+3 ;
11 SET DW="U4;10"
SET DV="NJ10,0"
SET DU=""
SET DIFLD=269
SET DLB="Contact Phone"
+1 GOTO RE
X11 if +X'=X!(X>9999999999)!(X<0)!(X?.E1"."1N.N)
KILL X
+1 QUIT
+2 ;
12 SET DW="U4;11"
SET DV="NJ10,0"
SET DU=""
SET DIFLD=269.1
SET DLB="Contact Phone Extension"
+1 GOTO RE
X12 if +X'=X!(X>9999999999)!(X<1)!(X?.E1"."1.N)
KILL X
+1 QUIT
+2 ;
13 ;@83
SET DQ=14
14 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=14
DO X14
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X14 if IBDR20'["83"
SET Y="@84"
+1 QUIT
15 SET DW="U4;7"
SET DV="P81'"
SET DU=""
SET DIFLD=266
SET DLB="Primary Code"
+1 SET DU="ICPT("
+2 GOTO RE
X15 QUIT
16 SET DW="U4;8"
SET DV="P81'"
SET DU=""
SET DIFLD=267
SET DLB="Secondary Code"
+1 SET DU="ICPT("
+2 GOTO RE
X16 QUIT
17 ;@84
SET DQ=18
18 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=18
DO X18
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X18 if IBDR20'["84"
SET Y="@85"
+1 QUIT
19 SET DW="U8;2"
SET DV="*P353.3'"
SET DU=""
SET DIFLD=285
SET DLB="Report Type"
+1 SET DU="IBE(353.3,"
+2 GOTO RE
X19 SET DIC("S")="I $$RTYPOK^IBCEU(X,DA)"
DO ^DIC
KILL DIC
SET DIC=DIE
SET X=+Y
if Y<0
KILL X
+1 QUIT
+2 ;
20 SET DW="U8;3"
SET DV="S"
SET DU=""
SET DIFLD=286
SET DLB="Transmission Method"
+1 SET DU="AA:Available on Request at Provider Site;BM:By Mail;EL:Electronically Only;EM:E-Mail;FT:File Transfer;FX:By Fax;"
+2 GOTO RE
X20 QUIT
21 SET DW="U8;1"
SET DV="F"
SET DU=""
SET DIFLD=284
SET DLB="Attachment Control #"
+1 GOTO RE
X21 if $LENGTH(X)>30!($LENGTH(X)<1)
KILL X
+1 IF $DATA(X)
IF X'?.ANP
KILL X
+2 QUIT
+3 ;
22 ;@85
SET DQ=23
23 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=23
DO X23
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X23 if IBDR20'["85"
SET Y="@86"
+1 QUIT
24 SET DW="U4;4"
SET DV="DX"
SET DU=""
SET DIFLD=263
SET DLB="Disability Start Date"
+1 GOTO RE
X24 SET %DT="E"
DO ^%DT
SET X=Y
if DT<X
KILL X
IF $DATA(X)
IF $PIECE($GET(^DGCR(399,DA,"U4")),U,5)'=""
IF X>$PIECE($GET(^DGCR(399,DA,"U4")),U,5)
KILL X
+1 QUIT
+2 ;
25 SET DW="U4;5"
SET DV="DX"
SET DU=""
SET DIFLD=264
SET DLB="Disability End Date"
+1 GOTO RE
X25 SET %DT="E"
DO ^%DT
SET X=Y
if DT<X
KILL X
IF $DATA(X)
IF X<$PIECE($GET(^DGCR(399,DA,"U4")),U,4)
KILL X
+1 QUIT
+2 ;
26 ;@86
SET DQ=27
27 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=27
DO X27
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X27 if IBDR20'["86"
SET Y="@87"
+1 QUIT
28 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=28
DO X28
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X28 if $PIECE($GET(^DGCR(399,DA,0)),U,19)=3
SET Y="@87"
+1 QUIT
29 SET DW="U4;13"
SET DV="DX"
SET DU=""
SET DIFLD=282
SET DLB="Assumed Care Date"
+1 GOTO RE
X29 SET %DT="E"
DO ^%DT
SET X=Y
if DT<X
KILL X
IF $DATA(X)
IF $PIECE($GET(^DGCR(399,DA,"U4")),U,14)'=""
IF X>$PIECE($GET(^DGCR(399,DA,"U4")),U,14)
KILL X
+1 QUIT
+2 ;
30 SET DW="U4;14"
SET DV="DX"
SET DU=""
SET DIFLD=283
SET DLB="Relinquished Care Date"
+1 GOTO RE
X30 SET %DT="E"
DO ^%DT
SET X=Y
if DT<X
KILL X
IF $DATA(X)
IF X<$PIECE($GET(^DGCR(399,DA,"U4")),U,13)
KILL X
+1 QUIT
+2 ;
31 ;@87
SET DQ=32
32 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=32
DO X32
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X32 if IBDR20'["87"
SET Y="@88"
+1 QUIT
33 SET DW="U2;16"
SET DV="S"
SET DU=""
SET DIFLD=238
SET DLB=$$LABEL^DIALOGZ(DP,DIFLD)
+1 SET DU="01:EPSDT/CHAP;02:Phys Handicapped Children Program;03:Special Fed Funding;05:Disability;07:Induced Abortion - Danger to Life;08:Induced Abortion - Rape or Incest;09:2nd Opinion/Surgery;"
+2 SET X=$SELECT($PIECE($GET(^DGCR(399,DA,"U2")),U,16)'="":$PIECE($GET(^DGCR(399,DA,"U2")),U,16),$$WNRBILL^IBEFUNC(DA):"31",1:"")
+3 SET Y=X
+4 SET X=Y
SET DB(DQ)=1
SET DE(DW,"4/")=""
if X=""
if DV
GOTO N^DIE17
GOTO A
IF $DATA(DE(DQ))
IF DV["I"!(DV["#")
DO E^DIE0
if '$DATA(X)
GOTO A
+5 if X="@"
GOTO RD
GOTO Z
X33 QUIT
34 SET DW="U2;16"
SET DV="S"
SET DU=""
SET DIFLD=238
SET DLB="Special Program"
+1 SET DU="01:EPSDT/CHAP;02:Phys Handicapped Children Program;03:Special Fed Funding;05:Disability;07:Induced Abortion - Danger to Life;08:Induced Abortion - Rape or Incest;09:2nd Opinion/Surgery;"
+2 GOTO RE
X34 QUIT
35 ;@88
SET DQ=36
36 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=36
DO X36
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X36 if IBDR20'["88"
SET Y="@89"
+1 QUIT
37 SET DW="U2;14"
SET DV="S"
SET DU=""
SET DIFLD=236
SET DLB="Homebound"
+1 SET DU="0:NO;1:YES;"
+2 GOTO RE
X37 QUIT
38 ;@89
SET DQ=39
39 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=39
DO X39
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X39 if IBDR20'["89"
SET Y="@899"
+1 QUIT
40 SET DW="U2;15"
SET DV="D"
SET DU=""
SET DIFLD=237
SET DLB="Date Last Seen"
+1 GOTO RE
X40 SET %DT="EX"
DO ^%DT
SET X=Y
if Y<1
KILL X
+1 QUIT
+2 ;
41 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=41
DO X41
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X41 SET Y="@899"
+1 QUIT
42 ;@801
SET DQ=43
43 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=43
DO X43
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X43 SET $Y=3
+1 QUIT
44 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=44
DO X44
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X44 if IBDR20'["81"
SET Y="@802"
+1 QUIT
45 ;96
SET D=0
KILL DE(1)
+1 SET DIFLD=96
SET DGO="^IBXS81"
SET DC="2^399.096IA^DEN1^"
SET DV="399.096MNJ2,0"
SET DW="0;1"
SET DOW=$$LABEL^DIALOGZ(DP,DIFLD)
SET DLB=$PIECE($$EZBLD^DIALOG(8042,DOW),": ")
if D
SET DC=DC_D
+2 if D
GOTO RE
IF $DATA(DSC(399.096))#2
IF $PIECE(DSC(399.096),"I $D(^UTILITY(",1)=""
XECUTE DSC(399.096)
SET D=$ORDER(^(0))
if D=""
SET D=-1
GOTO M45
+3 SET D=$SELECT($DATA(^DGCR(399,DA,"DEN1",0)):$PIECE(^(0),U,3,4),$ORDER(^(0))'="":$ORDER(^(0)),1:-1)
M45 IF D>0
SET DC=DC_D
IF $DATA(^DGCR(399,DA,"DEN1",+D,0))
SET DE(45)=$PIECE(^(0),U,1)
+1 GOTO RE
R45 DO DE
+1 SET D=$SELECT($DATA(^DGCR(399,DA,"DEN1",0)):$PIECE(^(0),U,3,4),1:1)
GOTO 45+1
+2 ;
46 ;@802
SET DQ=47
47 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=47
DO X47
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X47 if IBDR20'["82"
SET Y="@803"
+1 QUIT
48 SET DW="DEN;1"
SET DV="D"
SET DU=""
SET DIFLD=92
SET DLB="Banding Date"
+1 GOTO RE
X48 SET %DT="EX"
DO ^%DT
SET X=Y
if Y<1
KILL X
+1 QUIT
+2 ;
49 SET DW="DEN;2"
SET DV="NJ15,0"
SET DU=""
SET DIFLD=93
SET DLB="Treatment Months Count"
+1 GOTO RE
X49 if +X'=X!(X>999999999999999)!(X<0)!(X?.E1"."1N.N)
KILL X
+1 QUIT
+2 ;
50 SET DW="DEN;3"
SET DV="NJ15,0"
SET DU=""
SET DIFLD=94
SET DLB="Treatment Months Remaining Count"
+1 GOTO RE
X50 if +X'=X!(X>999999999999999)!(X<0)!(X?.E1"."1N.N)
KILL X
+1 QUIT
+2 ;
51 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=51
DO X51
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X51 IF $PIECE($GET(^DGCR(399,DA,"DEN")),U,2)'=""
IF $PIECE($GET(^("DEN")),U,3)'=""
SET Y="@803"
+1 QUIT
52 SET DW="DEN;4"
SET DV="S"
SET DU=""
SET DIFLD=95
SET DLB="Treatment Indicator"
+1 SET DU="1:YES;"
+2 GOTO RE
X52 QUIT
53 ;@803
SET DQ=54
54 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=54
DO X54
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X54 if IBDR20'["83"
SET Y="@804"
+1 QUIT
55 SET DW="U8;2"
SET DV="*P353.3'"
SET DU=""
SET DIFLD=285
SET DLB="Report Type"
+1 SET DU="IBE(353.3,"
+2 GOTO RE
X55 SET DIC("S")="I $$RTYPOK^IBCEU(X,DA)"
DO ^DIC
KILL DIC
SET DIC=DIE
SET X=+Y
if Y<0
KILL X
+1 QUIT
+2 ;
56 SET DW="U8;3"
SET DV="S"
SET DU=""
SET DIFLD=286
SET DLB="Transmission Method"
+1 SET DU="AA:Available on Request at Provider Site;BM:By Mail;EL:Electronically Only;EM:E-Mail;FT:File Transfer;FX:By Fax;"
+2 GOTO RE
X56 QUIT
57 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=57
DO X57
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X57 if $PIECE($GET(^DGCR(399,DA,"U8")),U,3)="AA"
SET Y="@804"
+1 QUIT
58 SET DW="U8;1"
SET DV="F"
SET DU=""
SET DIFLD=284
SET DLB="Attachment Control #"
+1 GOTO RE
X58 if $LENGTH(X)>30!($LENGTH(X)<1)
KILL X
+1 IF $DATA(X)
IF X'?.ANP
KILL X
+2 QUIT
+3 ;
59 ;@804
SET DQ=60
60 if $DATA(DG)>9
DO F^DIE17
DO DE
SET Y=U
SET DQ=60
DO X60
if $DATA(DIEFIRE)#2
DO FIREREC^DIE17
if $DATA(Y)[0
GOTO A
if Y=U
GOTO A
SET X=Y
SET DIC(0)="F"
SET DW=DQ
GOTO OUT^DIE17
X60 if IBDR20'["84"
SET Y="@899"
+1 QUIT
61 SET DW="U4;2"
SET DV="FXJ50"
SET DU=""
SET DIFLD=261
SET DLB="Claim Number"
+1 GOTO RE
X61 if $LENGTH(X)>50!($LENGTH(X)<1)!($TRANSLATE(X," ")="")!($EXTRACT(X)=" ")
KILL X
+1 IF $DATA(X)
IF X'?.ANP
KILL X
+2 QUIT
+3 ;
62 ;@899
SET DQ=63
63 GOTO 0^DIE17