1 | FBCTV3 ; ;06/29/07
|
---|
2 | D DE G BEGIN
|
---|
3 | DE S DIE="^FBAAV(",DIC=DIE,DP=161.2,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^FBAAV(DA,""))=""
|
---|
4 | I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,17) S:%]"" DE(1)=% S %=$P(%Z,U,18) S:%]"" DE(2)=%
|
---|
5 | I $D(^(1)) S %Z=^(1) S %=$P(%Z,U,1) S:%]"" DE(5)=% S %=$P(%Z,U,10) S:%]"" DE(6)=%,DE(7)=%
|
---|
6 | I $D(^("AMS")) S %Z=^("AMS") S %=$P(%Z,U,1) S:%]"" DE(11)=% S %=$P(%Z,U,2) S:%]"" DE(13)=% S %=$P(%Z,U,3) S:%]"" DE(14)=% S %=$P(%Z,U,4) S:%]"" DE(15)=% S %=$P(%Z,U,5) S:%]"" DE(16)=% S %=$P(%Z,U,6) S:%]"" DE(17)=%
|
---|
7 | K %Z Q
|
---|
8 | ;
|
---|
9 | W W !?DL+DL-2,DLB_": "
|
---|
10 | Q
|
---|
11 | O D W W Y W:$X>45 !?9
|
---|
12 | I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
|
---|
13 | W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
|
---|
14 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
15 | Q
|
---|
16 | A K DQ(DQ) S DQ=DQ+1
|
---|
17 | B G @DQ
|
---|
18 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
19 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
20 | RD G QS:X?."?" I X["^" D D G ^DIE17
|
---|
21 | I X="@" D D G Z^DIE2
|
---|
22 | I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
|
---|
23 | 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
|
---|
24 | K DDER G X
|
---|
25 | 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
|
---|
26 | G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
|
---|
27 | I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
|
---|
28 | V D @("X"_DQ) K YS
|
---|
29 | 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
|
---|
30 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
31 | S X="?BAD"
|
---|
32 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
33 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
34 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
35 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
36 | 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
|
---|
37 | 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
|
---|
38 | X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
|
---|
39 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
40 | I I DV'["I",DV'["#" G RD
|
---|
41 | D E^DIE0 G RD:$D(X),PR
|
---|
42 | Q
|
---|
43 | SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
|
---|
44 | I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
|
---|
45 | D ^DIR I 'DDER S %=Y(0),X=Y
|
---|
46 | Q
|
---|
47 | SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
|
---|
48 | I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
|
---|
49 | E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
|
---|
50 | Q
|
---|
51 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
52 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
53 | BEGIN S DNM="FBCTV3",DQ=1
|
---|
54 | 1 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW="0;17",DV="F",DU="",DLB="MEDICARE ID NUMBER",DIFLD=22
|
---|
55 | S X=$P(Z1,U,17)
|
---|
56 | S Y=X
|
---|
57 | 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)
|
---|
58 | G RD:X="@",Z
|
---|
59 | X1 Q
|
---|
60 | 2 S DW="0;18",DV="F",DU="",DLB="MAIL ROUTE CODE",DIFLD=5.18
|
---|
61 | S X=$P(Z1,U,18)
|
---|
62 | S Y=X
|
---|
63 | 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)
|
---|
64 | G RD:X="@",Z
|
---|
65 | X2 Q
|
---|
66 | 3 S DQ=4 ;@10
|
---|
67 | 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
|
---|
68 | X4 S:'$D(Z3) Y="@20"
|
---|
69 | Q
|
---|
70 | 5 S DW="1;1",DV="F",DU="",DLB="PHONE NUMBER",DIFLD=14
|
---|
71 | S X=$P(Z3,U,1)
|
---|
72 | S Y=X
|
---|
73 | 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)
|
---|
74 | G RD:X="@",Z
|
---|
75 | X5 Q
|
---|
76 | 6 S DW="1;10",DV="S",DU="",DLB="BUSINESS TYPE (FPDS)",DIFLD=24
|
---|
77 | S DU="1:SMALL BUSINESS;2:LARGE BUSINESS;3:OUTSIDE U.S.;4:OTHER ENTITIES;"
|
---|
78 | S Y="@"
|
---|
79 | 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)
|
---|
80 | G RD:X="@",Z
|
---|
81 | X6 Q
|
---|
82 | 7 S DW="1;10",DV="S",DU="",DLB="BUSINESS TYPE (FPDS)",DIFLD=24
|
---|
83 | S DU="1:SMALL BUSINESS;2:LARGE BUSINESS;3:OUTSIDE U.S.;4:OTHER ENTITIES;"
|
---|
84 | S X=$P(Z3,U,10)
|
---|
85 | S Y=X
|
---|
86 | 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)
|
---|
87 | G RD:X="@",Z
|
---|
88 | X7 Q
|
---|
89 | 8 S DQ=9 ;@20
|
---|
90 | 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
|
---|
91 | X9 S:'$D(Z4) Y=""
|
---|
92 | Q
|
---|
93 | 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
|
---|
94 | X10 S:$G(FBTMPCK) Y="@30"
|
---|
95 | Q
|
---|
96 | 11 S DW="AMS;1",DV="FX",DU="",DLB="AUSTIN NAME FIELD",DIFLD=30.01
|
---|
97 | S DE(DW)="C11^FBCTV3"
|
---|
98 | S X=$P(Z4,U)
|
---|
99 | S Y=X
|
---|
100 | 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)
|
---|
101 | G RD:X="@",Z
|
---|
102 | C11 G C11S:$D(DE(11))[0 K DB
|
---|
103 | S X=DE(11),DIC=DIE
|
---|
104 | K ^FBAAV("D",$E(X,1,30),DA)
|
---|
105 | C11S S X="" G:DG(DQ)=X C11F1 K DB
|
---|
106 | S X=DG(DQ),DIC=DIE
|
---|
107 | S ^FBAAV("D",$E(X,1,30),DA)=""
|
---|
108 | C11F1 Q
|
---|
109 | X11 Q
|
---|
110 | 12 S DQ=13 ;@30
|
---|
111 | 13 D:$D(DG)>9 F^DIE17,DE S DQ=13,DW="AMS;2",DV="FXO",DU="",DLB="PRICER EXEMPT",DIFLD=30.02
|
---|
112 | S DQ(13,2)="S Y(0)=Y D OUTYN^FBAAUTL3"
|
---|
113 | S X=$P(Z4,U,2)
|
---|
114 | S Y=X
|
---|
115 | 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)
|
---|
116 | G RD:X="@",Z
|
---|
117 | X13 Q
|
---|
118 | 14 S DW="AMS;3",DV="FXO",DU="",DLB="1099 VENDOR",DIFLD=30.03
|
---|
119 | S DQ(14,2)="S Y(0)=Y D OUTYN^FBAAUTL3"
|
---|
120 | S X=$P(Z4,U,3)
|
---|
121 | S Y=X
|
---|
122 | 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)
|
---|
123 | G RD:X="@",Z
|
---|
124 | X14 Q
|
---|
125 | 15 S DW="AMS;4",DV="S",DU="",DLB="FMS VENDOR TYPE",DIFLD=30.04
|
---|
126 | S DU="C:commercial;I:individual;F:federal;"
|
---|
127 | S X=$P(Z4,U,4)
|
---|
128 | S Y=X
|
---|
129 | 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)
|
---|
130 | G RD:X="@",Z
|
---|
131 | X15 Q
|
---|
132 | 16 S DW="AMS;5",DV="S",DU="",DLB="PROVIDER CODE",DIFLD=30.05
|
---|
133 | S DU="B:both;V:vendor only;P:provider only;"
|
---|
134 | S X=$P(Z4,U,5)
|
---|
135 | S Y=X
|
---|
136 | 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)
|
---|
137 | G RD:X="@",Z
|
---|
138 | X16 Q
|
---|
139 | 17 S DW="AMS;6",DV="RS",DU="",DLB="TAX ID/SSN FLAG",DIFLD=30.06
|
---|
140 | S DU="T:TAX ID NUMBER;S:SSN NUMBER;"
|
---|
141 | S X=$P(Z4,U,6)
|
---|
142 | S Y=X
|
---|
143 | 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)
|
---|
144 | G RD:X="@",Z
|
---|
145 | X17 Q
|
---|
146 | 18 G 0^DIE17
|
---|