source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHQDE.m@ 949

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

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1DVBHQDE ;ISC-ALBANY/PKE-generate HINQ direct ; 7/19/05 9:43pm
2 ;;4.0;HINQ;**52,49,55**;03/25/92
3 G EN
4RD R Y:DTIME IF I Y'="^",Y'["?" S:Y'="" X1(N)=Y S:Y="@" X1(N)="" S:Y="SS"&(N>2) X1(N)=X1(2) Q
5 S N=0 Q
6 ;
7EN ;D EN^DVBHQTM I $D(DVBSTOP) K DVBSTOP Q
8 F Z=1:1:4 S X1(Z)=""
9 S Y=-1 K Y(0)
10NAM ;DVB*4*49 - name queries no longer accepted
11 S X1(1)=""
12 ;
13 ;with DVB*4*49 only one number can be entered - first choice CN,
14 ;then SSN, then SN
15TXT W !,"Enter one of the following numbers - Social Security Number, Claim Number",!,"or Service Number."
16 W !
17 D SS
18 I Y?9N G EDIT
19 I Y="^" Q
20 D CNUM
21 I Y?8.9N G EDIT
22 I Y="^" Q
23 D SNUM
24 G EDIT
25 Q
26SS W !,"Social Security: ",X1(2)_$S($L(X1(2)):"// ",1:"") S N=2 D RD G SS:Y="@" I Y["?" S H=3 D HELP G SS
27 Q:'N
28 I X1(2)'="",X1(2)'?9N S X1(2)="" W $C(7) S H=4 D HELP S H=3 D HELP G SS G SS
29 Q
30 ;
31CNUM W !,"Claim Number: ",X1(3)_$S($L(X1(3)):"// ",1:"") S N=3 D RD G CNUM:Y="@" I Y["?" S H=10 D HELP G CNUM
32 Q:'N
33 I X1(3)'="",(X1(3)'?1N.N!($L(X1(3))<1)!($L(X1(3))>9)) S X1(3)="" S H=6 D HELP S H=7 D HELP G CNUM
34 Q
35 ;
36SNUM W !,"Service Number : ",X1(4)_$S($L(X1(4)):"// ",1:"") S N=4 D RD G SNUM:Y="@" S T=$L(X1(4)) I Y["?" S H=7 D HELP G SNUM
37 Q:'N
38 I X1(4)'="",(X1(4)'?1N.N!($L(X1(4))<4)!($L(X1(4))>9)) S X1(4)="" W $C(7) S H=8 D HELP S H=7 D HELP G SNUM
39 Q
40 ;
41EDIT W !,?4," OK " S %=1 D YN^DICN
42 Q:%Y="^" G:"Yy"[%Y CHK
43 G:"Nn"[$E(%Y_1) NAM
44 I %Y["?" W ?17 S H=9 D HELP G EDIT
45 Q
46 ;
47CHK I X1(1)="",X1(2)="",X1(3)="",X1(4)="" Q
48 S $P(Y(0),U,1)=X1(1)
49 S $P(Y(0),U,9)=X1(2)
50 S DVBCN=X1(3)
51 S DVBSN=X1(4)
52 ;
53PASS X ^%ZOSF("EOFF") R !,"Enter HINQ PASSWORD: ",DVBP:DTIME X ^%ZOSF("EON") S:'$T DVBP="^" Q:'$T!("^."[DVBP) S X=DVBP X ^DD("FUNC",13,1) S DVBP=X I DVBP'?4E W !,*7,"Please enter 4 characters." G PASS
54 ;VBA has changed the format of the HINQ password to allow numbers and
55 ;special characters - DVB*4*55,ERC
56 ;
57BYPASS S DFN="XXXZ"
58 N I,I1,I2,I3,I4,I5
59 I '$D(Y(0)) S Y=-1 Q
60 S DVBNAM=$P(Y(0),"^",1),I=$P(DVBNAM,","),I2=$P(DVBNAM,",",2)
61 F J=$L(I):-1:0 Q:$E(I,J)?1A S I=$E(I,1,J-1)
62 F J=1:1 Q:$F(I," ")=0 S K=$F(I," "),I4=$E(I,K,99),I=$E(I,1,K-2)
63 I $D(I4),$L(I4)<4 S I5=""
64 E I $D(I4),$L(I4)>3 I "SRJRIII"[$P(I4," ",2) S:"SRJRIII"'[$P(I4," ") I5=$P(I4," ") S I4=$P(I4," ",2)
65 I $D(I4),I4=" " K I4
66 I $D(I4) F J=$L(I4):-1:0 Q:$E(I4,J)'=" " S I4=$E(I4,1,J-1)
67 I '$D(I5),$D(I4) S I5=I4 K I4
68 F J=0:0 Q:$E(I2)'=" " S I2=$E(I2,2,99)
69 F J=$L(I2):-1:0 Q:$E(I2,J)'=" " S I2=$E(I2,1,J-1)
70 I I2[" " S I3=$P(I2," ",2,99),I2=$P(I2," ") F J=0:0 Q:$E(I3)'=" " S I3=$E(I3,2,99)
71 I '$D(I4),$D(I3) S I4=$P(I3," ",2),I3=$P(I3," ",1)
72 S DVBNAM=I_$S($D(I5):I5,1:"")_","_I2_$S($D(I3):","_I3,1:"")_$S($D(I4):","_I4,1:"")
73 I DVBNAM["'" S DVBNAM=$P(DVBNAM,"'")_$P(DVBNAM,"'",2)
74 I DVBNAM["." S DVBNAM=$P(DVBNAM,".")_$P(DVBNAM,".",2)
75 I DVBNAM["(" S DVBNAM=$P(DVBNAM,"(")
76 I DVBNAM?1"," S DVBNAM=""
77 S:DVBNAM]"" DVBNAM="NM"_$E(DVBNAM,1,30)_"/"
78 I $D(^DVB(395,1,0)) S DVBSTN=$P(^DVB(395,1,0),U,2) Q:'DVBSTN
79 E W !,*7,"Station number not defined in HINQ Parameters file." Q
80ST ;;;CHANGED P TO E FOR TESTING NEW STRING
81 S DVBZ="HINQ"_DVBSTN_" "_"E"_$S($P(Y(0),"^",9)]""&($P(Y(0),"^",9)'["P"):"SS"_$P(Y(0),"^",9),1:"")_DVBNAM
82CN S I=DVBCN G SN:I="" F J=1:1 Q:$L(I)'<8 S I=0_I
83 S:$L(I)=8 I=" "_I S DVBZ=DVBZ_"CN"_I
84SN S I=DVBSN G VDI:I="" F J=1:1 Q:$L(I)'<8 S I=0_I
85 S:$L(I)=8 I=" "_I S DVBZ=DVBZ_"SN"_I
86 ;
87VDI S DVBZ=DVBZ_DVBNUM_DVBP,DVBZ=$E(DVBZ,1,9)_" "_$E(DVBZ,10,999)
88 ;
89 S Y=0 K %Y,I,I1,I2,I3,I4,I5,DVBNAM,DVBSTN,DVBTGT,Y(0) QUIT
90 ;
91HELP W " ",$P($T(HELP+H),";;",2) K H Q
92 ;;Enter last name,first name up to 30 characters
93 ;;At the last prompt ' OK ? YES// ' you may enter No to edit
94 ;;Enter 9 digits only
95 ;;Bad SSN
96 ;;Enter 1-9 digits or SS for Social Security
97 ;;Bad Claim #
98 ;;Enter 4-9 digits or SS for Social Security
99 ;;Bad Service #
100 ;;Enter No to edit data Return to continue
101 ;;Identifying Number must be 1 - 9 digits
Note: See TracBrowser for help on using the repository browser.