source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC3.m@ 1572

Last change on this file since 1572 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 8.4 KB
Line 
1IBXSC3 ; GENERATED FROM 'IB SCREEN3' INPUT TEMPLATE(#574), FILE 399;02/03/08
2 D DE G BEGIN
3DE 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 ;
8W W !?DL+DL-2,DLB_": "
9 Q
10O 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
13TR R X:DTIME E S (DTOUT,X)=U W $C(7)
14 Q
15A K DQ(DQ) S DQ=DQ+1
16B G @DQ
17RE G PR:$D(DE(DQ)) D W,TR
18N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
19RD 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
22T 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
24P 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
27V D @("X"_DQ) K YS
28Z 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
29X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
30 S X="?BAD"
31QS S DZ=X D D,QQ^DIEQ G B
32D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
33Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
34PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
35R 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=%
38RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
39I I DV'["I",DV'["#" G RD
40 D E^DIE0 G RD:$D(X),PR
41 Q
42SET 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
46SAVEVALS 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
50NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
51KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
52BEGIN 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="^"
561 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
57X1 S:$G(IBCNRTN) Y="@313" K IBCNRTN
58 Q
592 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
60X2 S:IBDR20'["31" Y="@31"
61 Q
623 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
66C3 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)
73C3S 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)=""
80C3F1 Q
81X3 S DIC("S")="I '$P(^(0),U,3)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
82 Q
83 ;
844 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
85X4 S:'+$P(^IBE(350.9,1,1),U,22) Y="@314"
86 Q
875 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
88X5 S DIPA("FT1")=$P($G(^DGCR(399,DA,0)),U,19)
89 Q
906 S DQ=7 ;@5
917 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
95C7 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,"","")
106C7S 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,"","")
117C7F1 Q
118X7 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 ;
1218 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
122X8 S DIPA("FT")=$P($G(^DGCR(399,DA,0)),U,19)
123 Q
1249 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
125X9 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
12710 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
128X10 W !,*7,"Must be a printable national form type"
129 Q
13011 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
137C11 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,"","")
148C11S 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,"","")
159C11F1 Q
160X11 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 ;
16312 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
164X12 S Y="@5"
165 Q
16613 S DQ=14 ;@10
16714 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
168X14 D FTPRV^IBCEU5(DA)
169 Q
17015 S DQ=16 ;@314
17116 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
172X16 S X=$P(^DGCR(399,DA,0),U,11)
173 Q
17417 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
175X17 S Y="@"_$S(X']"":31,X="p":31,X="o":311,1:310)
176 Q
17718 S DQ=19 ;@310
17819 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
179X19 D 1^IBCSCH1 S Y="@"_$S(IBADI=-1:31,'IBADI:312,1:33)
180 Q
18120 S DQ=21 ;@313
18221 S DQ=22 ;@312
18322 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
187C22 G C22S:$D(DE(22))[0 K DB
188 D ^IBXSC31
189C22S S X="" G:DG(DQ)=X C22F1 K DB
190 D ^IBXSC32
191C22F1 S DIEZRXR(399,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
192 F DIXR=139 S DIEZRXR(399,DIXR)=""
193 Q
194X22 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 ;
19823 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
199X23 I X'="" S:$E(IBVV,9) IBVV=$E(IBVV,1,8)_"0"
200 Q
20124 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
202X24 S:X="" Y="@998"
203 Q
20425 D:$D(DG)>9 F^DIE17 G ^IBXSC33
Note: See TracBrowser for help on using the repository browser.