source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHQM1.m@ 1006

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

initial load of WorldVistAEHR

File size: 5.4 KB
Line 
1DVBHQM1 ;ISC-ALBANY/PKE/JLU-create mail message ; 8/27/05 4:18pm
2 ;;4.0;HINQ;**49**;03/25/92
3 G EN
4LIN Q:CT>200 S CT=CT+1,A1=A_CT_",0)",@A1=T1 Q
5DD S:Y Y=$S($E(Y,4,5):$P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC","^",+$E(Y,4,5))_" ",1:"")_$S($E(Y,6,7):+$E(Y,6,7)_",",1:"")_($E(Y,1,3)+1700)_$P("@"_$E(Y_0,9,10)_":"_$E(Y_"000",11,12),"^",Y[".") S:$L(Y)=10 Y=Y_" " Q
6 ;
7EN S DVBCTN=CT+1
8 I $D(DVBNAME),DVBNAME'?7" " S T1=" VBA name = "_DVBNAME D LIN
9 I $D(DVBPNAM) S T1=" Prior names =" D LIN S T1="" F I=0:0 S I=$O(DVBPNAM(I)) Q:I="" D
10 . S T1=" "_DVBPNAM(I)
11 . D LIN
12 ;I $D(DVBPNAM) D LIN
13 I $D(DVBADRLN),+DVBADRLN F G=1:1:$S(DVBADRLN<7:DVBADRLN,1:0) I $D(DVBADR(G)) S CT=CT+1,A1=A_CT_",0)",@A1=" "_$S(G=1:" Name",1:"Address")_" = "_DVBADR(G)
14 I $D(DVBZIP),DVBZIP'?9" " S T1=" ZIP = "_DVBZIP D LIN
152 ;
16 I $D(DVBVET),$P(DVBVET,U,1)'="C" S T1=" Sex = "_$S($P(DVBVET,U,3)="M":"MALE",$P(DVBVET,U,3)="F":"FEMALE",1:"")_$E(BL,1,29)_$S($P(DVBVET,U,2)=" ":"",1:"BLIND Ind.") D LIN I 1
17 E I $D(DVBBIR) S T1=" Sex = "_$S($P(DVBBIR,U,25)="M":"MALE",$P(DVBBIR,U,25)="F":"FEMALE",1:"") D LIN
18 ;
19 I $D(DVBDOB),DVBDOB?8N S M=$E(DVBDOB,1,2) D MM^DVBHQM11 S T1="Date of Birth = "_M_" "_$S(+$E(DVBDOB,3,4)>0:$E(DVBDOB,3,4)_", ",1:" ")_$E(DVBDOB,5,8) D LIN
20 I $D(DVBP(6)),$P(DVBP(6),U) S M=$E(DVBP(6),1,2) D MM^DVBHQM11 S T1="Date of Death = "_M_" "_$S(+$E(DVBP(6),3,4)>0:$E(DVBP(6),3,4)_", ",1:" ")_$E(DVBP(6),5,8) D LIN
21 ;;;I $D(DVBP(6)),$P(DVBP(6),U) S Y=$P(DVBP(6),U) D DD S T1="Date of Death = "_Y D LIN
22P6 I $P($G(DVBREF),U)'?9N I $D(DVBSSN),+DVBSSN S T1=" VBA SSN = "_DVBSSN D VSS,LIN
23P61 D P4^DVBHQM11
24 ;
25 D BLOCK^DVBHQM12
26 ;
2710 ;if DVBCSVC(2) is populated, kill DVBCSVC(1) - DVB*4*49
28 I $G(DVBCSVC(2))]"" K DVBCSVC(1)
29 I $D(DVBCSVC) S T1=" Char of Svc: " F I=0:0 S I=$O(DVBCSVC(I)) D:I="" LIN Q:I="" S Y=DVBCSVC(I) D DISCHG:I=1 S:I>1 Y=$$DISCH2(DVBCSVC(I)) S T1=T1_Y
30 ;
31 ;Additional Service is no longer being sent, DVB*4*49
32 ;
33 D P1^DVBHQM11,P5^DVBHQM11,P3^DVBHQM11
34 ;
3511 K DVBNMREC,DVBBOSRC,DVBCSVCN,DVBEODN,DVBRADN,DVBSNREC,DVBPNAM,DVBSN,DVBCSVC,DVBPOA,DVBRAD,DVBEOD,DVBPOWD,DVBTOTAS,DVBASVC,DVBNM,DVBNSVC,DVBPOW,DVBSN,DVBBOS,DVBCN,DVBDOB,DVBADRLN,DVBZIP,DVBNAM,DVBADR,DVBSSN
36 ;
37 ;I $D(DVBDXPCT) S T1=" Combined % Disability = "_+DVBDXPCT D LIN
38 ;I $D(DVBDXNO),+DVBDXNO S T1=" Disabilities = "_DVBDXNO D LIN
39 ;I $D(DVBDXX) S T1=" Additional Disabilities = "_DVBDXX D LIN
40 ;
41 S T1="DISABILITIES" D LIN
42 S T1="Combined %="_$S($D(DVBDXPCT):+DVBDXPCT,1:" ")_" "
43 S T1=T1_"Disab. in Record="_$S($D(DVBDXNO):DVBDXNO,1:" ")
44 I $G(DVBEFF)]"",DVBEFF'=" " S M=$E(DVBEFF,1,2) D MM^DVBHQM11 S DVBEFF=M_" "_$E(DVBEFF,3,4)_","_$E(DVBEFF,5,8)
45 S T1=T1_" Eff. Date of Comb. Eval.="_$G(DVBEFF)
46 D LIN S T1="" D LIN
47 I $D(DVBDX)>9 D
48 . S T1=" "
49 . S T1=T1_" Orig Curr" D LIN
50 . S T1=" SC Disability "
51 . S T1=T1_" % Extr Eff Dt Eff Dt"
52 . D LIN
53 ;
54DX I $D(DVBDX)>9 F I=0:0 S I=$O(DVBDX(I)) Q:'I!(I>DVBDXNO) S Y=DVBDX(I) D DX1 I +Y S T1=Y D LIN
55 ;
56BBIRLS I $G(DVBDXVER)="N" D ERR
57 S T1=" " D LIN
58 K DVBFL,DVBDXX,DVBDXNO,DVBDX,DVBDXPCT
59 G EN^DVBHQM2
60 ;
61SVC ;
62 ;
63DISCHG S DVBV1=Y,Y=$S(Y=1:"HONORABLE ",Y=2:"OTHER THAN HONORABLE ",Y=3:"DISHONORABLE ",Y=4:"HON VA PUR. ",Y=5:"DISHON VA PUR. ",Y=0!(Y=" "):"UNVERIFIED ",1:" ")
64 Q
65DISCH2(DVBD) ;this will handle codes from Corporate
66 ;DVBD is the code for character of discharge
67 N DVBDD
68 S DVBD=$$UP^XLFSTR(DVBD)
69 S DVBDD=$S(DVBD="HON":"Honorable",DVBD="BAD":"Bad Conduct",DVBD="DIS":"Dishonorable",DVBD="DVA":"Dis for VA Pur",DVBD="GEN":"General",DVBD="HVA":"Hon for VA Pur",DVBD="OTH":"Other than Hon",1:"")
70 I $G(DVBDD)="" S DVBDD=$S(DVBD="UNC":"Unchar",DVBD="UEL":"Unchar-Entry Lev",DVBD="UHC":"Under Hon Cond",DVBD="UNK":"Unknown",DVBD="UNS":"Unsuitable",DVBD="UNV":"Unverified",1:DVBD)
71 S DVBD=" "
72 S DVBD=DVBDD_$E(DVBD,$L(DVBDD)+1,22) ;longest str=21 chars, pad w/1 char
73 Q DVBD
74 ;
75ASVC S Z=$S(Z=0:"None",Z=1:"Wartime and/or Peacetime",Z=2:"Peacetime",Z=3:"Less than 90 days wartime, has SC disability",Z=4:"18-29 months continuous service (CH34)",Z=" ":"Not an issue",1:Z) Q
76 ;
77DX1 I '+Y!(Y["-") S Y=0 Q
78 ;I '+$P(Y,U,2) S DVBDX(I)=+Y_" - "_$E(BL,1,32)
79 I '+$P(Y,U,2) S DVBDX(I)=+Y_" - Code not in local file-see ADPAC"
80 E S DVBDX(I)=+Y_"-"_$E($P(^DIC(31,$P(Y,U,2),0),U),1,43)_$E(BL,1,43-$L($P(^(0),U)))
81 N DVBCURR,DVBORIG
82 S DVBORIG=$S($P(Y,U,5)]"":$P(Y,U,5),1:"")
83 S DVBCURR=$S($P(Y,U,6)]"":$P(Y,U,6),1:"")
84 I $G(DVBORIG)'=" ",$G(DVBORIG)]"" S M=$E(DVBORIG,1,2) D MM^DVBHQM11 S DVBORIG=M_" "_$E(DVBORIG,3,4)_","_$E(DVBORIG,5,8)
85 I $G(DVBCURR)'=" ",$G(DVBCURR)]"" S M=$E(DVBCURR,1,2) D MM^DVBHQM11 S DVBCURR=M_" "_$E(DVBCURR,3,4)_","_$E(DVBCURR,5,8)
86 S DVBDX(I)=DVBDX(I)_"-"_$S($P(Y,U,3)'["X":$P(Y,U,3),$P(Y,U,3)="X0":"100",1:"..")_"%-"_$S($P(Y,U,4)]"":$P(Y,U,4),1:" ")_"-"
87 S DVBDX(I)=DVBDX(I)_$S($G(DVBORIG)]"":DVBORIG,1:$E(BL,1,11))_"-"_$G(DVBCURR)
88 S Y=DVBDX(I)
89 Q
90 ;
91VSS I $D(DVBP(6)) S C=$P(DVBP(6),U,3) I C S T1=T1_$S(C=1:" Verified SSA",C=2:" Verified VBA",C=4:" Verified by BIRLS",C=9:" SSA Verified No Number Exists",C=0:" Un verified",C=3:" Not Required, Child Under 2",1:" "_C) K C
92 Q
93 ;
94ERR ;These are the error messages for the BIRLS only equivalent record
95 ;which is possibly not verified (DVB*4*49)
96 ;
97 S T1=" " D LIN
98 S T1=" Diagnostic Verified Indicator is NO." D LIN
99 S T1=" Verify Service Connections "_$S($D(DVBFL):"at "_DVBFL,1:"with VBA") D LIN
100 S T1=" " D LIN
101 Q
Note: See TracBrowser for help on using the repository browser.