[623] | 1 | IBXSC3 ; GENERATED FROM 'IB SCREEN3' INPUT TEMPLATE(#574), FILE 399;12/27/07
|
---|
[613] | 2 | D DE G BEGIN
|
---|
| 3 | DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))=""
|
---|
| 4 | I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,7) S:%]"" DE(3)=% S %=$P(%Z,U,19) S:%]"" DE(7)=%,DE(11)=%
|
---|
| 5 | I $D(^("M")) S %Z=^("M") S %=$P(%Z,U,12) S:%]"" DE(22)=%
|
---|
| 6 | K %Z Q
|
---|
| 7 | ;
|
---|
| 8 | W W !?DL+DL-2,DLB_": "
|
---|
| 9 | Q
|
---|
| 10 | O D W W Y W:$X>45 !?9
|
---|
| 11 | I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
|
---|
| 12 | W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
|
---|
| 13 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
| 14 | Q
|
---|
| 15 | A K DQ(DQ) S DQ=DQ+1
|
---|
| 16 | B G @DQ
|
---|
| 17 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
| 18 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
| 19 | RD G QS:X?."?" I X["^" D D G ^DIE17
|
---|
| 20 | I X="@" D D G Z^DIE2
|
---|
| 21 | I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
|
---|
| 22 | T G M^DIE17:DV,^DIE3:DV["V",P:DV'["S" X:$D(^DD(DP,DIFLD,12.1)) ^(12.1) I X?.ANP D SET I 'DDER X:$D(DIC("S")) DIC("S") I W:'$D(DB(DQ)) " "_% G V
|
---|
| 23 | K DDER G X
|
---|
| 24 | 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
|
---|
| 25 | G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
|
---|
| 26 | I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
|
---|
| 27 | V D @("X"_DQ) K YS
|
---|
| 28 | 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
|
---|
| 29 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
| 30 | S X="?BAD"
|
---|
| 31 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
| 32 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
| 33 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
| 34 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
| 35 | 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
|
---|
| 36 | 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
|
---|
| 37 | X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
|
---|
| 38 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
| 39 | I I DV'["I",DV'["#" G RD
|
---|
| 40 | D E^DIE0 G RD:$D(X),PR
|
---|
| 41 | Q
|
---|
| 42 | SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
|
---|
| 43 | I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
|
---|
| 44 | D ^DIR I 'DDER S %=Y(0),X=Y
|
---|
| 45 | Q
|
---|
| 46 | SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
|
---|
| 47 | I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
|
---|
| 48 | E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
|
---|
| 49 | Q
|
---|
| 50 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
| 51 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
| 52 | BEGIN S DNM="IBXSC3",DQ=1
|
---|
| 53 | N DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR K DIEFIRE,DIEBADK S DIEZTMP=$$GETTMP^DIKC1("DIEZ")
|
---|
| 54 | M DIEZAR=^DIE(574,"AR") S DICRREC="TRIG^DIE17"
|
---|
| 55 | S:$D(DTIME)[0 DTIME=300 S D0=DA,DIIENS=DA_",",DIEZ=574,U="^"
|
---|
| 56 | 1 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=1 D X1 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
|
---|
| 57 | X1 S:$G(IBCNRTN) Y="@313" K IBCNRTN
|
---|
| 58 | Q
|
---|
| 59 | 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
|
---|
| 60 | X2 S:IBDR20'["31" Y="@31"
|
---|
| 61 | Q
|
---|
| 62 | 3 S DW="0;7",DV="R*P399.3'",DU="",DLB="RATE TYPE",DIFLD=.07
|
---|
| 63 | S DE(DW)="C3^IBXSC3"
|
---|
| 64 | S DU="DGCR(399.3,"
|
---|
| 65 | G RE
|
---|
| 66 | C3 G C3S:$D(DE(3))[0 K DB
|
---|
| 67 | S X=DE(3),DIC=DIE
|
---|
| 68 | X ^DD(399,.07,1,1,2.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=0 X ^DD(399,.07,1,1,2.4)
|
---|
| 69 | S X=DE(3),DIC=DIE
|
---|
| 70 | ;
|
---|
| 71 | S X=DE(3),DIC=DIE
|
---|
| 72 | K ^DGCR(399,"AD",$E(X,1,30),DA)
|
---|
| 73 | C3S S X="" G:DG(DQ)=X C3F1 K DB
|
---|
| 74 | S X=DG(DQ),DIC=DIE
|
---|
| 75 | X ^DD(399,.07,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=1 X ^DD(399,.07,1,1,1.4)
|
---|
| 76 | S X=DG(DQ),DIC=DIE
|
---|
| 77 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X=DIV S X=$P(^DGCR(399.3,$P(^DGCR(399,DA,0),U,7),0),U,7) X ^DD(399,.07,1,2,1.4)
|
---|
| 78 | S X=DG(DQ),DIC=DIE
|
---|
| 79 | S ^DGCR(399,"AD",$E(X,1,30),DA)=""
|
---|
| 80 | C3F1 Q
|
---|
| 81 | X3 S DIC("S")="I '$P(^(0),U,3)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
|
---|
| 82 | Q
|
---|
| 83 | ;
|
---|
| 84 | 4 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=4 D X4 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
|
---|
| 85 | X4 S:'+$P(^IBE(350.9,1,1),U,22) Y="@314"
|
---|
| 86 | Q
|
---|
| 87 | 5 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=5 D X5 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
|
---|
| 88 | X5 S DIPA("FT1")=$P($G(^DGCR(399,DA,0)),U,19)
|
---|
| 89 | Q
|
---|
| 90 | 6 S DQ=7 ;@5
|
---|
| 91 | 7 D:$D(DG)>9 F^DIE17,DE S DQ=7,DW="0;19",DV="R*P353'",DU="",DLB="FORM TYPE",DIFLD=.19
|
---|
| 92 | S DE(DW)="C7^IBXSC3"
|
---|
| 93 | S DU="IBE(353,"
|
---|
| 94 | G RE
|
---|
| 95 | C7 G C7S:$D(DE(7))[0 K DB
|
---|
| 96 | S X=DE(7),DIC=DIE
|
---|
| 97 | ;
|
---|
| 98 | S X=DE(7),DIC=DIE
|
---|
| 99 | S DGRVRCAL=2
|
---|
| 100 | S X=DE(7),DIC=DIE
|
---|
| 101 | D ALLID^IBCEP3(DA,.19,2)
|
---|
| 102 | S X=DE(7),DIC=DIE
|
---|
| 103 | ;
|
---|
| 104 | S X=DE(7),DIC=DIE
|
---|
| 105 | D ATTREND^IBCU1(DA,"","")
|
---|
| 106 | C7S S X="" G:DG(DQ)=X C7F1 K DB
|
---|
| 107 | S X=DG(DQ),DIC=DIE
|
---|
| 108 | X ^DD(399,.19,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=5 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,9)=DIV,DIH=399,DIG=.09 D ^DICR
|
---|
| 109 | S X=DG(DQ),DIC=DIE
|
---|
| 110 | S DGRVRCAL=1
|
---|
| 111 | S X=DG(DQ),DIC=DIE
|
---|
| 112 | D ALLID^IBCEP3(DA,.19,1)
|
---|
| 113 | S X=DG(DQ),DIC=DIE
|
---|
| 114 | D BILLPNS^IBCU(DA)
|
---|
| 115 | S X=DG(DQ),DIC=DIE
|
---|
| 116 | D ATTREND^IBCU1(DA,"","")
|
---|
| 117 | C7F1 Q
|
---|
| 118 | X7 S DIC("S")="N Z S Z=$G(^IBE(353,Y,2)) I $P(Z,U,2)=""P"",$P(Z,U,4)" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X
|
---|
| 119 | Q
|
---|
| 120 | ;
|
---|
| 121 | 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
|
---|
| 122 | X8 S DIPA("FT")=$P($G(^DGCR(399,DA,0)),U,19)
|
---|
| 123 | Q
|
---|
| 124 | 9 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=9 D X9 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
|
---|
| 125 | X9 I $P($G(^IBE(353,+DIPA("FT"),2)),U,2)="P",$P($G(^(2)),U,4) S DIPA("FT1")=DIPA("FT") D CKFT^IBCIUT1(IBIFN) S Y="@10"
|
---|
| 126 | Q
|
---|
| 127 | 10 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=10 D X10 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
|
---|
| 128 | X10 W !,*7,"Must be a printable national form type"
|
---|
| 129 | Q
|
---|
| 130 | 11 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW="0;19",DV="R*P353'",DU="",DLB="FORM TYPE",DIFLD=.19
|
---|
| 131 | S DE(DW)="C11^IBXSC3"
|
---|
| 132 | S DU="IBE(353,"
|
---|
| 133 | S X=$G(DIPA("FT1"))
|
---|
| 134 | S Y=X
|
---|
| 135 | S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
|
---|
| 136 | G RD
|
---|
| 137 | C11 G C11S:$D(DE(11))[0 K DB
|
---|
| 138 | S X=DE(11),DIC=DIE
|
---|
| 139 | ;
|
---|
| 140 | S X=DE(11),DIC=DIE
|
---|
| 141 | S DGRVRCAL=2
|
---|
| 142 | S X=DE(11),DIC=DIE
|
---|
| 143 | D ALLID^IBCEP3(DA,.19,2)
|
---|
| 144 | S X=DE(11),DIC=DIE
|
---|
| 145 | ;
|
---|
| 146 | S X=DE(11),DIC=DIE
|
---|
| 147 | D ATTREND^IBCU1(DA,"","")
|
---|
| 148 | C11S S X="" G:DG(DQ)=X C11F1 K DB
|
---|
| 149 | S X=DG(DQ),DIC=DIE
|
---|
| 150 | X ^DD(399,.19,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=5 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,9)=DIV,DIH=399,DIG=.09 D ^DICR
|
---|
| 151 | S X=DG(DQ),DIC=DIE
|
---|
| 152 | S DGRVRCAL=1
|
---|
| 153 | S X=DG(DQ),DIC=DIE
|
---|
| 154 | D ALLID^IBCEP3(DA,.19,1)
|
---|
| 155 | S X=DG(DQ),DIC=DIE
|
---|
| 156 | D BILLPNS^IBCU(DA)
|
---|
| 157 | S X=DG(DQ),DIC=DIE
|
---|
| 158 | D ATTREND^IBCU1(DA,"","")
|
---|
| 159 | C11F1 Q
|
---|
| 160 | X11 S DIC("S")="N Z S Z=$G(^IBE(353,Y,2)) I $P(Z,U,2)=""P"",$P(Z,U,4)" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X
|
---|
| 161 | Q
|
---|
| 162 | ;
|
---|
| 163 | 12 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=12 D X12 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
|
---|
| 164 | X12 S Y="@5"
|
---|
| 165 | Q
|
---|
| 166 | 13 S DQ=14 ;@10
|
---|
| 167 | 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
|
---|
| 168 | X14 D FTPRV^IBCEU5(DA)
|
---|
| 169 | Q
|
---|
| 170 | 15 S DQ=16 ;@314
|
---|
| 171 | 16 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=16 D X16 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
|
---|
| 172 | X16 S X=$P(^DGCR(399,DA,0),U,11)
|
---|
| 173 | Q
|
---|
| 174 | 17 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=17 D X17 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
|
---|
| 175 | X17 S Y="@"_$S(X']"":31,X="p":31,X="o":311,1:310)
|
---|
| 176 | Q
|
---|
| 177 | 18 S DQ=19 ;@310
|
---|
| 178 | 19 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=19 D X19 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
|
---|
| 179 | X19 D 1^IBCSCH1 S Y="@"_$S(IBADI=-1:31,'IBADI:312,1:33)
|
---|
| 180 | Q
|
---|
| 181 | 20 S DQ=21 ;@313
|
---|
| 182 | 21 S DQ=22 ;@312
|
---|
| 183 | 22 D:$D(DG)>9 F^DIE17,DE S DQ=22,DW="M;12",DV="FXO",DU="",DLB="PRIMARY INSURANCE POLICY",DIFLD=112
|
---|
| 184 | S DQ(22,2)="S Y(0)=Y S Y=$$TRANS^IBCNS2($G(DA,D0),Y)"
|
---|
| 185 | S DE(DW)="C22^IBXSC3",DE(DW,"INDEX")=1
|
---|
| 186 | G RE
|
---|
| 187 | C22 G C22S:$D(DE(22))[0 K DB
|
---|
| 188 | D ^IBXSC31
|
---|
| 189 | C22S S X="" G:DG(DQ)=X C22F1 K DB
|
---|
| 190 | D ^IBXSC32
|
---|
| 191 | C22F1 S DIEZRXR(399,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
| 192 | F DIXR=139 S DIEZRXR(399,DIXR)=""
|
---|
| 193 | Q
|
---|
| 194 | X22 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>20!($L(X)<1) X D:$D(X) DD^IBCNS2(X,DA,1)
|
---|
| 195 | I $D(X),X'?.ANP K X
|
---|
| 196 | Q
|
---|
| 197 | ;
|
---|
| 198 | 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
|
---|
| 199 | X23 I X'="" S:$E(IBVV,9) IBVV=$E(IBVV,1,8)_"0"
|
---|
| 200 | Q
|
---|
| 201 | 24 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=24 D X24 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
|
---|
| 202 | X24 S:X="" Y="@998"
|
---|
| 203 | Q
|
---|
| 204 | 25 D:$D(DG)>9 F^DIE17 G ^IBXSC33
|
---|