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

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

initial load of FOIAVistA 6/30/08 version

File size: 5.6 KB
Line 
1IBXSC8H3 ; ;10/29/04
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(^("TX")) S %Z=^("TX") S %=$P(%Z,U,8) S:%]"" DE(20)=% S %=$P(%Z,U,9) S:%]"" DE(23)=%
5 I $D(^("U2")) S %Z=^("U2") S %=$P(%Z,U,11) S:%]"" DE(1)=% S %=$P(%Z,U,12) S:%]"" DE(2)=% S %=$P(%Z,U,13) S:%]"" DE(5)=% S %=$P(%Z,U,14) S:%]"" DE(10)=% S %=$P(%Z,U,15) S:%]"" DE(11)=% S %=$P(%Z,U,16) S:%]"" DE(12)=%
6 I $D(^("UF2")) S %Z=^("UF2") S %=$P(%Z,U,2) S:%]"" DE(16)=%
7 I $D(^("UF31")) S %Z=^("UF31") S %=$P(%Z,U,3) S:%]"" DE(8)=%
8 K %Z Q
9 ;
10W W !?DL+DL-2,DLB_": "
11 Q
12O D W W Y W:$X>45 !?9
13 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
14 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
15TR R X:DTIME E S (DTOUT,X)=U W $C(7)
16 Q
17A K DQ(DQ) S DQ=DQ+1
18B G @DQ
19RE G PR:$D(DE(DQ)) D W,TR
20N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
21RD G QS:X?."?" I X["^" D D G ^DIE17
22 I X="@" D D G Z^DIE2
23 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
24T 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
25 K DDER G X
26P 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
27 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
28 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
29V D @("X"_DQ) K YS
30Z 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
31X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
32 S X="?BAD"
33QS S DZ=X D D,QQ^DIEQ G B
34D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
35Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
36PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
37R 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
38 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
39 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
40RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
41I I DV'["I",DV'["#" G RD
42 D E^DIE0 G RD:$D(X),PR
43 Q
44SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
45 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
46 D ^DIR I 'DDER S %=Y(0),X=Y
47 Q
48SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
49 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
50 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
51 Q
52NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
53KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
54BEGIN S DNM="IBXSC8H3",DQ=1
551 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW="U2;11",DV="S",DU="",DLB="NON-VA CARE TYPE",DIFLD=233
56 S DU="1:FEE BASIS, NON-LAB;2:FEE BASIS, LAB;3:NON-FEE BASIS, NON-LAB;4:NON-FEE BASIS, LAB;"
57 G RE
58X1 Q
592 S DW="U2;12",DV="F",DU="",DLB="NON-VA CARE ID #",DIFLD=234
60 G RE
61X2 K:$L(X)>15!($L(X)<1) X
62 I $D(X),X'?.ANP K X
63 Q
64 ;
653 S DQ=4 ;@842
664 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
67X4 S:"24"'[$P($G(^DGCR(399,DA,"U2")),U,11) Y="@85"
68 Q
695 S DW="U2;13",DV="F",DU="",DLB="LAB CLIA NUMBER",DIFLD=235
70 S X=$$CLIANVA^IBCEP8(DA)
71 S Y=X
72 G Y
73X5 K:$L(X)>15!($L(X)<1) X
74 I $D(X),X'?.ANP K X
75 Q
76 ;
776 S DQ=7 ;@85
787 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=7 D X7 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
79X7 S:IBDR20'["85" Y="@86"
80 Q
818 S DW="UF31;3",DV="F",DU="",DLB="FORM LOC 19-UNSPECIFIED DATA",DIFLD=459
82 G RE
83X8 K:$L(X)>80!($L(X)<1) X
84 I $D(X),X'?.ANP K X
85 Q
86 ;
879 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
88X9 D ASK19^IBCEU3(DA)
89 Q
9010 S DW="U2;14",DV="S",DU="",DLB="HOMEBOUND",DIFLD=236
91 S DU="0:NO;1:YES;"
92 G RE
93X10 Q
9411 S DW="U2;15",DV="D",DU="",DLB="DATE LAST SEEN",DIFLD=237
95 G RE
96X11 S %DT="EX" D ^%DT S X=Y K:Y<1 X
97 Q
98 ;
9912 S DW="U2;16",DV="F",DU="",DLB="SPECIAL PROGRAM INDICATOR",DIFLD=238
100 S X=$S($$WNRBILL^IBEFUNC(DA):"31",1:"")
101 S Y=X
102 G Y
103X12 K:$L(X)>2!($L(X)<1) X
104 I $D(X),X'?.ANP K X
105 Q
106 ;
10713 S DQ=14 ;@86
10814 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
109X14 S:IBDR20'["86" Y="@99"
110 Q
11115 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=15 D X15 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
112X15 I $$NSAME^IBCSC8H(DA) S Y="@861"
113 Q
11416 S DW="UF2;2",DV="*S",DU="",DLB="PRINT FACILITY DATA IN BOX 32",DIFLD=401
115 S DU="1:YES;"
116 G RE
117X16 Q
11817 S DQ=18 ;@861
11918 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
120X18 I '$P($G(^DGCR(399,DA,"TX")),U,8),'$$TXMT^IBCEF4(DA) S Y="@862"
121 Q
12219 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
123X19 I $$REQMRA^IBEFUNC(DA) S Y="@8611"
124 Q
12520 S DW="TX;8",DV="S",DU="",DLB="FORCE CLAIM TO PRINT",DIFLD=27
126 S DU="0:NO FORCED PRINT;1:FORCE LOCAL PRINT;2:FORCE CLEARINGHOUSE PRINT;"
127 S Y="NO FORCED PRINT"
128 G Y
129X20 Q
13021 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=21 D X21 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
131X21 S Y="@862"
132 Q
13322 S DQ=23 ;@8611
13423 S DW="TX;9",DV="S",DU="",DLB="FORCE PRINT MRA SECONDARY",DIFLD=28
135 S DU="0:NO FORCED PRINT;1:MEDICARE SECONDARY FORCE LOCAL PRINT;"
136 S Y="NO FORCED PRINT"
137 G Y
138X23 Q
13924 S DQ=25 ;@862
14025 S DQ=26 ;@99
14126 G 0^DIE17
Note: See TracBrowser for help on using the repository browser.