source: FOIAVistA/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHQR1.m@ 1119

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1DVBHQR1 ;ISC-ALBANY/PKE/JLU-parse HINQ response ;27 SEP 85 10:56 am
2 ;;4.0;HINQ;**5,32,53,49**;03/25/92
3 ; PROCESSING THE C&P RECORD AND THEN THE BIRLS RECORD
4BASIC S DFN=+$E(X(1),8,21),DVBLEN=$E(X(1),22,25),X=$E(X(1),26,999),DVBCN=$E(X,1,9)
5 ;
6 ;DVB*4*49 - claim # no longer coming as last 2 chars first
7 S $P(DVBBAS(1),U,3)=$E(X,10),$P(DVBBAS(1),U,4)=$E(X,11,12)
8 S $P(DVBBAS(1),U,5)=$E(X,13,17),$P(DVBBAS(1),U,6)="A"
9 ;all records after DVB*4*49 will be sent as type "A"
10 ;beginning of basic seg A,B,C,E,F
11 S DVBNAME=$E(X,19,25)
12 S $P(DVBBAS(1),U,8)=$E(X,26,27)
13 S $P(DVBBAS(1),U,9)=$E(X,28),$P(DVBBAS(1),U,10)=$E(X,29,33)
14 S DVBFL=$E(X,34,35)
15 I +DVBFL S Y=$S($D(^DIC(4,"D",3_DVBFL)):$O(^(3_DVBFL,"")),$D(^DIC(4,"D",4_DVBFL)):$O(^(4_DVBFL,"")),1:"") I Y S Y=$S($D(^DIC(4,Y,0)):$P(^DIC(4,Y,99),U,1)_" - "_$P(^(0),U),1:""),DVBFL=Y
16 I DVBFL="" S DVBFL="UNABLE TO DETERMINE"
17 S $P(DVBBAS(1),U,12)=$E(X,36),$P(DVBBAS(1),U,13)=$E(X,37)
18 S $P(DVBBAS(1),U,14)=$E(X,38),$P(DVBBAS(1),U,15)=$E(X,39)
19 S $P(DVBBAS(1),U,16)=$E(X,40)
20 S DVBV1=$E(X,41)
21 ;I DVBV1?1A!(DVBV1["{") S DVBV2=1 D SIGN^DVBHUTIL
22 S $P(DVBBAS(1),U,17)=DVBV1
23 S $P(DVBBAS(1),U,18)=$E(X,42)
24 I $P(DVBBAS(1),U,6)="D" S $P(DVBBAS(1),U,19)=$E(X,43),$P(DVBBAS(1),U,20)=$E(X,44,45) S L=161 D RON G STAT^DVBHQR11 ;end of BASIC D segment
25 S $P(DVBBAS(1),U,19)=$E(X,43,45)
26 S DVBV1=+$E(X,46,51)
27 I DVBV1?5N1A!(DVBV1["{") S DVBV2=6 D SIGN^DVBHUTIL Q:$G(DVBERCS)
28 S $P(DVBBAS(1),U,20)=+$E(DVBV1,1,$L(DVBV1)-2)_"."_$E(DVBV1,$L(DVBV1)-1,$L(DVBV1))
29 S L=52 D RON
30 S $P(DVBBAS(1),U,21)=$E(X,1,8)
31 S DVBV1=+$E(X,9,14)
32 I DVBV1?5N1A!(DVBV1["{") S DVBV2=6 D SIGN^DVBHUTIL Q:$G(DVBERCS)
33 S DVBCHECK=+$E(DVBV1,1,$L(DVBV1)-2)_"."_$E(DVBV1,$L(DVBV1)-1,$L(DVBV1))
34 S $P(DVBBAS(1),U,23)=$E(X,15)
35 S $P(DVBP(1),U,4)=$E(X,16,17)
36 S DVBV1=$E(X,18)
37 I DVBV1?1A!(DVBV1["{") S DVBV2=1 D SIGN^DVBHUTIL Q:$G(DVBERCS)
38 S DVBADRLN=DVBV1
39 S DVBV1=$E(X,19)
40 I DVBV1?1A!(DVBV1["{") S DVBV2=1 D SIGN^DVBHUTIL Q:$G(DVBERCS)
41 S $P(DVBBAS(1),U,26)=DVBV1
42 S $P(DVBBAS(1),U,27)=$E(X,20)
43 S DVBFIDUC=$E(X,21,22)
44 I +DVBFIDUC S Y=$S($D(^DIC(4,"D",3_DVBFIDUC)):$O(^(3_DVBFIDUC,"")),$D(^DIC(4,"D",4_DVBFIDUC)):$O(^(4_DVBFIDUC,"")),1:"") I Y S Y=$S($D(^DIC(4,Y,0)):$P(^DIC(4,Y,99),U,1)_" - "_$P(^(0),U),1:""),DVBFIDUC=Y
45 I DVBFIDUC=99 S DVBFIDUC=""
46 S $P(DVBBAS(1),U,29)=$E(X,23,24),$P(DVBBAS(1),U,30)=$E(X,25)
47 S $P(DVBBAS(1),U,31)=$E(X,26),$P(DVBBAS(1),U,32)=$E(X,27,28)
48 S $P(DVBBAS(1),U,33)=$E(X,29,30),$P(DVBBAS(1),U,34)=$E(X,31)
49 S $P(DVBBAS(1),U,35)=$E(X,32)
50 ;need to calculate power of attorney from C&P
51 S DVBPOA="0"_$E(X,33,34) D POA^DVBHQR2
52 S $P(DVBBAS(1),U,37)=$E(X,35)
53 S DVBV1=$E(X,36)
54 I DVBV1?1A!(DVBV1["{") S DVBV2=1 D SIGN^DVBHUTIL Q:$G(DVBERCS)
55 S $P(DVBBAS(1),U,38)=DVBV1
56 S $P(DVBBAS(1),U,39)=$E(X,37,41),$P(DVBBAS(1),U,40)=$E(X,42,43)
57 S $P(DVBP(1),U,5)=$E(X,44,45)
58 S $P(DVBBAS(1),U,42)=$E(X,46,47)
59 S DVBAAHB=$E(X,48)
60 S L=49 D RON
61 S $P(DVBBAS(2),U,1)=$E(X,1),$P(DVBBAS(2),U,2)=$E(X,2)
62 S $P(DVBP(1),U,8)=$E(X,3)
63 S $P(DVBBAS(2),U,4)=$E(X,4)
64 S $P(DVBBAS(2),U,5)=$E(X,5),$P(DVBBAS(2),U,6)=$E(X,6)
65 S $P(DVBBAS(2),U,7)=$E(X,7),$P(DVBBAS(2),U,8)=$E(X,8)
66 S $P(DVBBAS(2),U,9)=$E(X,9),$P(DVBBAS(2),U,10)=$E(X,10)
67 S $P(DVBP(1),U,2)=$E(X,11),$P(DVBP(1),U,1)=$E(X,12)
68 S $P(DVBP(1),U,7)=$E(X,13),$P(DVBP(1),U,6)=$E(X,14)
69 S DVBCSVC(1)=$E(X,15)
70 ;;;S DVBCSVC(1)=5
71 S $P(DVBP(1),U,3)=$E(X,16,23)
72 S $P(DVBBAS(2),U,17)=$E(X,24)
73 S $P(DVBBAS(2),U,18)=$E(X,25),$P(DVBBAS(2),U,19)=$E(X,26)
74 S DVBPOW=$E(X,27)
75 S $P(DVBBAS(2),U,21)=$E(X,28),$P(DVBBAS(2),U,22)=$E(X,29)
76 S $P(DVBBAS(2),U,23)=$E(X,30),$P(DVBBAS(2),U,24)=$E(X,31)
77 S $P(DVBBAS(2),U,25)=$E(X,32),$P(DVBBAS(2),U,26)=$E(X,33)
78 S $P(DVBBAS(2),U,27)=$E(X,34),$P(DVBBAS(2),U,28)=$E(X,35)
79 S $P(DVBBAS(2),U,29)=$E(X,36),$P(DVBBAS(2),U,30)=$E(X,37)
80 S $P(DVBBAS(2),U,31)=$E(X,38),$P(DVBBAS(2),U,32)=$E(X,39)
81 S $P(DVBBAS(2),U,33)=$E(X,40),$P(DVBBAS(2),U,34)=$E(X,41)
82 S $P(DVBBAS(2),U,35)=$E(X,42),$P(DVBBAS(2),U,36)=$E(X,43)
83 S $P(DVBBAS(2),U,37)=$E(X,44),$P(DVBBAS(2),U,38)=$E(X,45)
84 S $P(DVBBAS(2),U,39)=$E(X,46),$P(DVBBAS(2),U,40)=$E(X,47)
85 S $P(DVBBAS(2),U,41)=$E(X,48),$P(DVBBAS(2),U,42)=$E(X,49)
86 S $P(DVBBAS(2),U,43)=$E(X,50),$P(DVBBAS(2),U,44)=$E(X,51)
87 S $P(DVBBAS(2),U,45)=$E(X,52),$P(DVBBAS(2),U,46)=$E(X,53)
88 S $P(DVBBAS(2),U,47)=$E(X,54),$P(DVBBAS(2),U,48)=$E(X,55,57)
89 S $P(DVBBAS(2),U,49)=$E(X,58),$P(DVBBAS(2),U,50)=$E(X,59,61)
90 S L=62 D RON
91 ;end of basic segment A,B,C,E,F
92 ;
93 G STAT^DVBHQR11
94 ;
95RON S X=$E(X,L,999),LX=$L(X),LY=254-LX I $D(X(2)),(LX+$L(X(2)))<256 S X=X_X(2) K X(2) D RON1 Q
96 I $D(X(2)) S X=X_$E(X(2),1,LY),X(2)=$E(X(2),LY+1,999) Q
97 Q
98 ;
99RON1 F Z1=3:1:99 I $D(X(Z1)),'$D(X(Z1-1)) S X(Z1-1)=X(Z1) K X(Z1) Q:'$O(X(Z1))
100 ;;;I $D(X(3)),'$D(X(2)) S X(2)=X(3) K X(3) I $D(X(4)),'$D(X(3)) S X(3)=X(4) K X(4) I $D(X(5)),'$D(X(4)) S X(4)=X(5) K X(5)
101 QUIT
102END K NAM,NUM Q
103 Q
Note: See TracBrowser for help on using the repository browser.