source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHIQR.m@ 1608

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1DVBHIQR ;ISC-ALBANY/PKE/PHH-Process HINQ response ; 3/23/06 7:48am
2 ;;4.0;HINQ;**32,49,57**;03/25/92
3TEM ;ENTER FROM PRINT TEMPLATE.
4 S DVBCS=0,DVBECS=1 K DVBERCS
5 F DVBSZ=0:0 S DVBSZ=$O(^DVB(395.5,DFN,"RS",DVBSZ)) S:DVBSZ X(DVBSZ)=^(DVBSZ,0) D SC^DVBHQST Q:$G(DVBERCS) Q:'DVBSZ!$D(DVBCSE)
6 K M,DVBCS,DVBSZ,DVBECS Q:'$D(X(1))!($D(DVBERCS))
7A D:'$D(DT) DT^DICRW I $D(X(1)),$E(X(1),1,4)'="HINQ" G NETERR
8 ;
9 I $D(X)#2,$E(X,1,4)="HINQ" S DVBREQST=$E(X,24,$L(X)-8) K:'$L(DVBREQST) DVBREQST
10 ;
11 D CHK ;if 5th char is 2 but no name, claim #, change 5th char to "C"
12 ;I $A($E(X(1),26,34))'>$A(" "),($A($E(X(1),44,50))'>$A(" ")) D CHK
13 ;
14 G Q:'$D(X(1)) I "456789ABCDNUVWZ"'[$E(X(1),5) G ^DVBHQR1:$E(X(1),5)=2,EN^DVBHQR3:$E(X(1),5)="N",EN^DVBHQR3:$E(X(1),5)="M",Q:$E(X(1),1,4)'="HINQ"
15 ;
16 S Y=$E(X(1),5) D ERR S DVBERR=Y,Y=$F(X(1),"NNNN"),DVBERR1=$S(Y:$E(X(1),1,Y-2),1:X(1))
17 ;
18HINQ S DFN=+$E(X(1),8,21) I $D(DUZ) S XMDUZ=DUZ
19 E S XMDUZ=0
20 G Q
21ERR ;
22 I Y=" " S Y="No VBA response available - please try again later."
23 I "B"[Y S Y="Network/Database Problem" Q
24 I "C"[Y D RETRY Q
25 I Y=6 S Y="Invalid Employee number Not AUTHORIZED" Q
26 I Y=9 S Y="PASSWORD missing or invalid" Q
27 I Y="X" S Y="Station # does not match Station # of password " Q
28 I Y="Y" S Y="Employee Number in New Person file doesn't match the # in VBA security record" Q
29 I Y="Z" S Y="User not assigned to the HINQ application." Q
30 ;
31 S Y=$S(Y=4:"File in alert, NOT available",Y=5:"NO C&P record found ",Y=7:"SS # missing or invalid.",Y=8:"NAME missing or invalid.",1:Y) Q:Y'?1U
32 ;
33 S Y=$S(Y="A":"File NOT available",Y="D":"SENSITIVE File no access authorized",Y="U":"Unsuccessful read of password or sensitive file",Y="V":"Invalid CLAIM NUMBER",Y="W":"Invalid SERVICE NUMBER",1:Y)
34 Q
35Q K DVBOTM,DVBV,DVBOXMZ,DVBIXMZ,XMORIG QUIT
36 ;
37NETERR ;
38 S:'$D(DVBZ) DVBZ=^DVB(395.5,DFN,"HQ") S XMORIG=DUZ,XMDUZ=.5,XMSUB="IDCU Response for ",DVBREQUE="",DFN=+$E(DVBZ,10,21),DVBNETER=X(1) Q
39 G Q
40RETRY S Y=" "
41 I $P(X(1),"[TRY]",2) Q
42 N DVBZZ
43 S DVBZZ=$S($G(DVBZ0)]"":DVBZ0,$G(DVBZ1)]"":DVBZ1,1:"")
44 I DVBZZ["SS",(DVBZZ["CN") S Y="No record matches input. Check data and try again via 'Individual HINQ'." Q
45 I DVBZZ'["SS" S Y="SSN."
46 I DVBZZ'["CN" S Y="CN."
47 I DVBZZ["SN" S Y="CN OR SSN."
48 S X(1)=$P(X(1),"[TRY]")
49 I $E(X(1),5)="C" S Y="No Record matches data requested, Retry using "_Y
50 E S Y="Can NOT identify with this data, Retry using "_Y
51 S Y=Y_" via 'Individual HINQ'." Q
52 ;
53CHK ;if a response has 2 for the 5th char but no name or CN, change
54 ;the 5th char to "C"
55 I $E(X(1),5)=2,($A($E(X(1),26,34))'>$A(" ")),($A($E(X(1),44,50))'>$A(" ")) S $E(X(1),5)="C"
56 Q
Note: See TracBrowser for help on using the repository browser.