source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/PRCATA1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 7.3 KB
Line 
1PRCATA1 ; ;08/03/99
2 D DE G BEGIN
3DE S DIE="^PRCA(430,",DIC=DIE,DP=430,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^PRCA(430,DA,""))=""
4 I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,3) S:%]"" DE(10)=% S %=$P(%Z,U,5) S:%]"" DE(7)=% S %=$P(%Z,U,8) S:%]"" DE(23)=% S %=$P(%Z,U,10) S:%]"" DE(20)=% S %=$P(%Z,U,19) S:%]"" DE(3)=% S %=$P(%Z,U,20) S:%]"" DE(5)=%
5 I $D(^(6)) S %Z=^(6) S %=$P(%Z,U,1) S:%]"" DE(17)=% S %=$P(%Z,U,2) S:%]"" DE(18)=% S %=$P(%Z,U,3) S:%]"" DE(19)=% S %=$P(%Z,U,7) S:%]"" DE(15)=%
6 I $D(^(7)) S %Z=^(7) S %=$P(%Z,U,1) S:%]"" DE(11)=% S %=$P(%Z,U,2) S:%]"" DE(13)=% S %=$P(%Z,U,3) S:%]"" DE(14)=%
7 I $D(^(100)) S %Z=^(100) S %=$P(%Z,U,2) S:%]"" DE(21)=%
8 I $D(^(202)) S %Z=^(202) S %=$P(%Z,U,10) S:%]"" DE(1)=% S %=$P(%Z,U,11) S:%]"" DE(2)=%
9 K %Z Q
10 ;
11W W !?DL+DL-2,DLB_": "
12 Q
13O D W W Y W:$X>45 !?9
14 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
15 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
16TR R X:DTIME E S (DTOUT,X)=U W $C(7)
17 Q
18A K DQ(DQ) S DQ=DQ+1
19B G @DQ
20RE G PR:$D(DE(DQ)) D W,TR
21N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
22RD G QS:X?."?" I X["^" D D G ^DIE17
23 I X="@" D D G Z^DIE2
24 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
25T 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
26 K DDER G X
27P 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) I DV'["*" D ^DIC S X=+Y,DIC=DIE G X:X<0
28 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
29 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
30V D @("X"_DQ) K YS
31Z 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
32X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
33 S X="?BAD"
34QS S DZ=X D D,QQ^DIEQ G B
35D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
36Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
37PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
38R 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
39 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
40 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
41RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
42I I DV'["I",DV'["#" G RD
43 D E^DIE0 G RD:$D(X),PR
44 Q
45SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
46 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
47 D ^DIR I 'DDER S %=Y(0),X=Y
48 Q
49SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"N")=X,^("O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
50 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
51 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
52 Q
53NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
54KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
55BEGIN S DNM="PRCATA1",DQ=1
561 S DW="202;10",DV="F",DU="",DLB="EMPLOYEE ID NUMBER",DIFLD=248
57 G RE
58X1 K:$L(X)>11!($L(X)<3) X
59 I $D(X),X'?.ANP K X
60 Q
61 ;
622 S DW="202;11",DV="F",DU="",DLB="EMPLOYER LOCATION",DIFLD=249
63 G RE
64X2 K:$L(X)>40!($L(X)<3) X
65 I $D(X),X'?.ANP K X
66 Q
67 ;
683 S DW="0;19",DV="P36'",DU="",DLB="SECONDARY INSURANCE CARRIER",DIFLD=19
69 S DU="DIC(36,"
70 G RE
71X3 Q
724 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
73X4 S:X="" Y="@4"
74 Q
755 S DW="0;20",DV="P36'",DU="",DLB="TERTIARY INSURANCE CARRIER",DIFLD=19.1
76 S DU="DIC(36,"
77 G RE
78X5 Q
796 S DQ=7 ;@4
807 S DW="0;5",DV="R*P430.6'OX",DU="",DLB="BILL RESULTING FROM",DIFLD=4.5
81 S DQ(7,2)="S Y(0)=Y I $D(^PRCA(430.6,+Y,0)) S Y=$P(^PRCA(430.6,+Y,0),U,2)"
82 S DU="PRCA(430.6,"
83 G RE
84X7 S DIC("S")="S Z0=$P(^PRCA(430,DA,0),U,2) Q:+Z0'>0 S Z0=$P(^PRCA(430.2,Z0,0),U,6) I ($P(^PRCA(430.6,Y,0),U,4)[Z0)!($P(^(0),U,4)[""X"")" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
85 Q
86 ;
878 S D=0 K DE(1) ;1
88 S DIFLD=1,DGO="^PRCATA2",DC="7^430.01IA^2^",DV="430.01MRFX",DW="0;1",DOW="FISCAL YEAR",DLB="Select "_DOW S:D DC=DC_D
89 G RE:D I $D(DSC(430.01))#2,$P(DSC(430.01),"I $D(^UTILITY(",1)="" X DSC(430.01) S D=$O(^(0)) S:D="" D=-1 G M8
90 S D=$S($D(^PRCA(430,DA,2,0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
91M8 I D>0 S DC=DC_D I $D(^PRCA(430,DA,2,+D,0)) S DE(8)=$P(^(0),U,1)
92 S X=$$FY^RCFN01(DT)
93 S Y=X
94 G Y
95R8 D DE
96 S D=$S($D(^PRCA(430,DA,2,0)):$P(^(0),U,3,4),1:1) G 8+1
97 ;
989 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
99X9 D CP^PRCABIL1
100 Q
10110 S DW="0;3",DV="RNJ9,2X",DU="",DLB="TOTAL ORIGINAL AMOUNT",DIFLD=3
102 S DE(DW)="C10^PRCATA1"
103 G RE
104C10 G C10S:$D(DE(10))[0 K DB
105 S X=DE(10),DIC=DIE
106 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^PRCA(430,D0,7)):^(7),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DIU-X X ^DD(430,3,1,1,2.4)
107C10S S X="" Q:DG(DQ)=X K DB
108 S X=DG(DQ),DIC=DIE
109 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^PRCA(430,D0,7)):^(7),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DIU+DIV X ^DD(430,3,1,1,1.4)
110 Q
111X10 S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>999999.99)!(X<0) X
112 Q
113 ;
11411 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW="7;1",DV="RNJ10,2",DU="",DLB="PRINCIPAL BALANCE",DIFLD=71
115 G RE
116X11 S:X["$" X=$P(X,"$",2) K:X'?."-".N.1".".2N!(X>9999999.99)!(X<-999999.99) X
117 Q
118 ;
11912 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
120X12 S:"PC"'[PRCAT Y="@7"
121 Q
12213 S DW="7;2",DV="NJ8,2",DU="",DLB="INTEREST BALANCE",DIFLD=72
123 G RE
124X13 S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>99999.99)!(X<0) X
125 Q
126 ;
12714 S DW="7;3",DV="NJ8,2",DU="",DLB="ADMINISTRATIVE COST BALANCE",DIFLD=73
128 G RE
129X14 S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>99999.99)!(X<0) X
130 Q
131 ;
13215 S DW="6;7",DV="D",DU="",DLB="LAST INT/ADM CHARGE DATE",DIFLD=67
133 G RE
134X15 S %DT="E" D ^%DT S X=Y K:Y<1 X
135 Q
136 ;
13716 S DQ=17 ;@7
13817 S DW="6;1",DV="D",DU="",DLB="LETTER1",DIFLD=61
139 G RE
140X17 S %DT="ET" D ^%DT S X=Y K:Y<1 X
141 Q
142 ;
14318 S DW="6;2",DV="D",DU="",DLB="LETTER2",DIFLD=62
144 G RE
145X18 S %DT="ET" D ^%DT S X=Y K:Y<1 X
146 Q
147 ;
14819 S DW="6;3",DV="D",DU="",DLB="LETTER3",DIFLD=63
149 G RE
150X19 S %DT="ET" D ^%DT S X=Y K:Y<1 X
151 Q
152 ;
15320 S DW="0;10",DV="RDX",DU="",DLB="DATE BILL PREPARED",DIFLD=10
154 G RE
155X20 S %DT="E" D ^%DT S X=Y K:Y<1!(X>DT) X
156 Q
157 ;
15821 S DW="100;2",DV="RP49'",DU="",DLB="SERVICE",DIFLD=101
159 S DU="DIC(49,"
160 G RE
161X21 Q
16222 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=22 D X22 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
163X22 S PRCAOLD=""
164 Q
16523 S DW="0;8",DV="R*P430.3'X",DU="",DLB="CURRENT STATUS",DIFLD=8
166 S DE(DW)="C23^PRCATA1"
167 S DU="PRCA(430.3,"
168 G RE
169C23 G C23S:$D(DE(23))[0 K DB
170 S X=DE(23),DIC=DIE
171 K ^PRCA(430,"AC",$E(X,1,30),DA)
172 S X=DE(23),DIC=DIE
173 I $P(^PRCA(430,DA,0),"^",9) K ^PRCA(430,"AS",$P(^PRCA(430,DA,0),"^",9),X,DA)
174 S X=DE(23),DIC=DIE
175 ;
176 S X=DE(23),DIC=DIE
177 ;
178 S X=DE(23),DIC=DIE
179 I $P(^PRCA(430,DA,0),U,14) K ^PRCA(430,"ASDT",X,$P($P(^PRCA(430,DA,0),U,14),"."),DA)
180C23S S X="" Q:DG(DQ)=X K DB
181 D ^PRCATA3
182 Q
183X23 D CKSTAT^PRCAUT3
184 Q
185 ;
18624 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
187X24 S $P(^PRCA(430,D0,0),U,12)=$S($D(PRCA("SITE")):PRCA("SITE"),1:"")
188 Q
18925 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=25 D X25 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
190X25 K PRCAOLD
191 Q
19226 G 0^DIE17
Note: See TracBrowser for help on using the repository browser.