[613] | 1 | DVBHT1 ;ISC-ALBANY/PKE/PHH - HINQ alert parser ; 3/23/06 8:04am
|
---|
| 2 | ;;4.0;HINQ;**12,15,20,43,49,57**;03/25/92
|
---|
| 3 | ;
|
---|
| 4 | ; cn foldloc sc diag comb% chk a&a hb pension disablity
|
---|
| 5 | ; .313,.312/.314,.3731/2.05,.302,.36295,.36205,.36215,.36235,.3025
|
---|
| 6 | Q
|
---|
| 7 | ;S DVBDATAT(+Y)="",DVBDATA=DVBDATA_"^"_Y
|
---|
| 8 | MSG S DVBDATA(+Y)="",DVBDATA=$S($L(DVBDATA)>100:DVBDATA,$P(DVBDATA,"^",16):DVBDATA,1:DVBDATA_"^"_Y) Q
|
---|
| 9 | ;
|
---|
| 10 | ;check on return from HINQUP processing
|
---|
| 11 | ACHK S DVBNOALR=""
|
---|
| 12 | ;called from batch or direct
|
---|
| 13 | EN Q:'$D(DFN) Q:'DFN
|
---|
| 14 | N X,Y,I,M,N,P
|
---|
| 15 | S DVBDATA="^^^^^^^^^"
|
---|
| 16 | EDT ; DX,DIQ,AA,ENTIT,COMB,CN,FOLD,CHECK
|
---|
| 17 | ;
|
---|
| 18 | D DX,DIQ,AA,ENTIT,COMB,CN,FOLD,CHECK
|
---|
| 19 | I DVBDATA'="^^^^^^^^^" DO
|
---|
| 20 | .I '$D(DVBNOALR) D ALERT^DVBHT Q
|
---|
| 21 | .S (I,Y)=0 F S Y=$O(DVBDATA(Y)) Q:'Y DO
|
---|
| 22 | ..S $P(DVBDATA,"^",I+1)=Y,I=I+1
|
---|
| 23 | .K DVBNOALR
|
---|
| 24 | K DVBENT,DVBSCONN
|
---|
| 25 | Q
|
---|
| 26 | ;
|
---|
| 27 | DX Q:'$D(DVBDX) Q:'$D(DVBDXNO)
|
---|
| 28 | S (DVBDXNO,I)=0 F S I=$O(DVBDX(I)) Q:I="" S DVBDXNO=DVBDXNO+1
|
---|
| 29 | K M F I=1:1:DVBDXNO D
|
---|
| 30 | .S M(I)=$P(DVBDX(I),U,2,3)
|
---|
| 31 | .I M(I)["X0" S $P(M(I),U,2)="100"
|
---|
| 32 | .S $P(M(I),U,2)=+$P(M(I),U,2)
|
---|
| 33 | .S $P(M(I),U,3)=1
|
---|
| 34 | .I $P(DVBDX(I),U,4)]"" S $P(M(I),U,4)=$P(DVBDX(I),U,4)
|
---|
| 35 | .I $P(DVBDX(I),U,5)]"" S $P(M(I),U,5)=$$HL7TFM^XLFDT($E($P(DVBDX(I),U,5),5,8)_$E($P(DVBDX(I),U,5),1,4))
|
---|
| 36 | .I $P(DVBDX(I),U,6)]"" S $P(M(I),U,6)=$$HL7TFM^XLFDT($E($P(DVBDX(I),U,6),5,8)_$E($P(DVBDX(I),U,6),1,4))
|
---|
| 37 | .I '$D(DVBSCONN) S DVBSCONN=$P(M(I),"^",2) Q
|
---|
| 38 | .I DVBSCONN<$P(M(I),U,2) S DVBSCONN=$P(M(I),U,2)
|
---|
| 39 | S (N,P)=0
|
---|
| 40 | F S N=$O(^DPT(DFN,.372,N)) Q:'N I $D(^(N,0)) DO
|
---|
| 41 | .S M=0
|
---|
| 42 | .F S M=$O(M(M)) Q:'M I M(M)=^(0) K M(M) Q ;tag dx+6
|
---|
| 43 | .I M Q ;sc match
|
---|
| 44 | .I $P(^(0),U,3) S P=P+1 ; tag dx+6,naked ref to ^dpt(dfn,.372,n,0)
|
---|
| 45 | I P S Y="3-SC Disabilities" D VER
|
---|
| 46 | I $D(M)>9 S Y="3+SC Disabilities" D VER
|
---|
| 47 | K I,M,N,P Q
|
---|
| 48 | ;
|
---|
| 49 | VER ;with DVB*4*49 no BIRLS only records & Dx, Verified not sent
|
---|
| 50 | D MSG Q
|
---|
| 51 | ;
|
---|
| 52 | DIQ ;K DVBDIQ(2)
|
---|
| 53 | F LP2=.361,.302,.3025,.312,.313,.314,.36205,.36215,.36235,.36295 S X="DVBDIQ(2,"_DFN_","_LP2_")" K @X
|
---|
| 54 | S DR=".302;.3025;.312;.313;.314;.361;.36205;.36215;.36235;.36295"
|
---|
| 55 | DIQDR S DIC="^DPT(",DA=DFN,DIQ(0)="E",DIQ="DVBDIQ(" D EN^DIQ1 Q
|
---|
| 56 | ;
|
---|
| 57 | ; I V=0 HBa/oA&A term V=1 Hospitlize pay HB, A&A entitled
|
---|
| 58 | ; I V=2 A&A V=3 HB V=" " HB a/o A&A not granted
|
---|
| 59 | AA I $D(DVBAAHB) S V1=DVBAAHB S V=V1 S:V1>3&(V1<8) V=V1-4
|
---|
| 60 | I '$D(DVBAAHB) S V=9
|
---|
| 61 | I $D(DVBBAS(1)),$P(DVBBAS(1),"^",6)="E" S V=0 ;terminated pending purge
|
---|
| 62 | I DVBDIQ(2,DFN,.36205,"E")="YES","0 9"[V S Y="5-A&A" D MSG
|
---|
| 63 | I DVBDIQ(2,DFN,.36205,"E")'="YES","12"[V S Y="5+A&A" D MSG
|
---|
| 64 | ;
|
---|
| 65 | I DVBDIQ(2,DFN,.36215,"E")="YES","0 9"[V S Y="5-HB" D MSG
|
---|
| 66 | I DVBDIQ(2,DFN,.36215,"E")'="YES","13"[V S Y="5+HB" D MSG
|
---|
| 67 | Q
|
---|
| 68 | ;
|
---|
| 69 | ;compensation, pension
|
---|
| 70 | ENTIT S DVBENT=" " I $D(DVBP(1)) S T1=$P(DVBP(1),U,4) D
|
---|
| 71 | . I T1'="" S DVBENT=$S(T1="01":"Compensation",T1="0L":"Pension",1:" ")
|
---|
| 72 | S Y=0
|
---|
| 73 | I DVBDIQ(2,DFN,.36235,"E")="YES" DO
|
---|
| 74 | .;terminated pending purge
|
---|
| 75 | .I $G(DVBCHECK)'>0,$G(DVBDXNO)>0 S DVBENT=" "
|
---|
| 76 | .;all record types now "A", so had to check if no VA Check and has
|
---|
| 77 | .;SC disabilities instead of checking for type "E" record - DVB*4*49
|
---|
| 78 | .I DVBENT["Pension" Q
|
---|
| 79 | .S Y="5-Pension"
|
---|
| 80 | E I DVBENT["Pension" S Y="5+Pension"
|
---|
| 81 | I Y D MSG
|
---|
| 82 | ;
|
---|
| 83 | S Y=0
|
---|
| 84 | I DVBDIQ(2,DFN,.3025,"E")="YES" DO
|
---|
| 85 | .I DVBENT["ompensation" Q
|
---|
| 86 | .I DVBENT["Disability" Q
|
---|
| 87 | .S Y="5-Compensation"
|
---|
| 88 | E I DVBENT'=" " DO
|
---|
| 89 | .I DVBENT["ompensation"!(DVBENT["Disability") S Y="5+Compensation"
|
---|
| 90 | I Y D MSG
|
---|
| 91 | Q
|
---|
| 92 | ;DVBSCONN is biggest SC disability
|
---|
| 93 | COMB I '$D(DVBSCONN) S Y=""
|
---|
| 94 | E DO
|
---|
| 95 | .S Y=DVBSCONN
|
---|
| 96 | .I $D(DVBCAP) Q ;birls
|
---|
| 97 | .I DVBENT["Pension" Q
|
---|
| 98 | .S Y=$S($D(DVBDXPCT):$S(+DVBDXPCT?1N.N:+DVBDXPCT,1:DVBSCONN))
|
---|
| 99 | .S DVBSCONN=Y
|
---|
| 100 | I +DVBDIQ(2,DFN,.302,"E")=+Y S Y=0
|
---|
| 101 | E DO
|
---|
| 102 | .S Y=0
|
---|
| 103 | .;c&p
|
---|
| 104 | .I '$D(DVBSCONN)!(DVBENT["ompensation")!(DVBENT["Disability") DO Q
|
---|
| 105 | . .S Y="5?SC Combined %"
|
---|
| 106 | .;birls,pension
|
---|
| 107 | .I DVBDIQ(2,DFN,.361,"E")["SERVICE CONNECTED",DVBSCONN>49 Q
|
---|
| 108 | .I DVBDIQ(2,DFN,.361,"E")["SC LESS THAN",DVBSCONN<50 Q
|
---|
| 109 | .S Y="5?SC Combined %"
|
---|
| 110 | I Y D MSG
|
---|
| 111 | K DVBALERT,DVBSCONN
|
---|
| 112 | Q
|
---|
| 113 | ;
|
---|
| 114 | CN I +DVBDIQ(2,DFN,.313,"E")=$S($D(DVBCN):+DVBCN,1:0)
|
---|
| 115 | E S Y="2?Claim #" D MSG
|
---|
| 116 | Q
|
---|
| 117 | ; --check in xman
|
---|
| 118 | FOLD Q:'$D(DVBFL) S Y=0
|
---|
| 119 | I $G(DVBFL)=" " S DVBFL=""
|
---|
| 120 | I '$D(DVBDIQ(2,DFN,.314,"E")) DO
|
---|
| 121 | .I +DVBDIQ(2,DFN,.312,"E")=$S($D(DVBFL):+DVBFL,1:0) Q
|
---|
| 122 | .S Y="2?Folder Location"
|
---|
| 123 | E DO ;pims v5.3 y => abc_ro, 323, or ""
|
---|
| 124 | .S Y=$S($D(DVBFL):$S($P(DVBFL,"- ",2)]"":$P(DVBFL,"- ",2),1:DVBFL),1:"")
|
---|
| 125 | .I DVBDIQ(2,DFN,.314,"E")=Y Q
|
---|
| 126 | .S Y="2?Folder Location"
|
---|
| 127 | I Y D MSG
|
---|
| 128 | Q
|
---|
| 129 | ;
|
---|
| 130 | CHECK S Y=0
|
---|
| 131 | I $D(DVBDIQ(2,DFN,.36295,"E")) DO ;pims v5.3
|
---|
| 132 | .I $D(DVBBAS(1)),$L($P(DVBBAS(1),"^",20)) S Y=$P(DVBBAS(1),"^",20)
|
---|
| 133 | .I +DVBDIQ(2,DFN,.36295,"E")=+$S(Y:Y*12,$D(DVBCHECK):DVBCHECK*12,1:"") S Y=0 Q
|
---|
| 134 | .S Y="5?VA Check/Net Award"
|
---|
| 135 | I Y D MSG
|
---|
| 136 | Q
|
---|