source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHQZ4.m@ 691

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1DVBHQZ4 ;ISC-ALBANY/PKE-enter in Suspense File ; 8/25/87 16:05 ;
2 ;;V4.0;HINQ;;03/25/92
3 D DIV,TELL,FIND G EX
4 Q
5FIND S DIC="^DPT(",DIC(0)="AEMQZ" D ^DIC Q:+Y'>0 S DFN=+Y D VER W:$D(DVBVER) !,?20,"Verified" W:'$D(DVBVER) !,?15 D EN^DVBHQUT G FIND
6 Q ;G EX
7 ;
8EN I $D(^DVB(395.5,DFN,0)),"PNEA"[$P(^(0),U,4) W !,$C(7),"A HINQ Request has already been made for this patient",!,"Do you wish to make another Request"
9 E W !,"Do you wish to request a HINQ inquiry "
10AGAIN S %=2 D YN^DICN I %=1 S DVBDIV=0 D EN^DVBHQUT G EX1
11 I %Y'["?" G EX1
12 D H1 G AGAIN
13 ;
14EX K DFN,%
15EX1 K X,%Y,C,D0,D1,DA,DVBO,DI,DIC,DIE,DK,DL,DOW,DR,Z,DVBDIV,DVBDIVN,Y,DVBVER,DVBSTOP,DVBKEY,DVBTIM,DVBGO,DVBZ,DVBNUM,DVBP QUIT
16 ;
17VER K DVBVER I $D(DFN),$D(^DPT(DFN,.361)),$P(^(.361),"^",1)="V" S DVBVER="" Q
18 Q
19 ;
20DIV S DVBDIV=0 I $D(^DVB(395,1,"HQ")),$P(^("HQ"),U,13) S DVBDIV=$P(^DG(43,1,"GL"),U,3) I DVBDIV
21 E Q
22 S DIC(0)="AZEQMN",DIC="^DG(40.8,",DIC("A")="Select Medical Center Division: ",DIC("B")=DVBDIV
23 S X=DVBDIV D ^DIC I +Y>0 S DVBDIV=+Y,DVBDIVN=$S($D(Y(0,0)):Y(0,0),1:$P(Y,U,2))
24 K DIC("A"),DIC("B") Q
25 ;
26TELL I DVBDIV,$D(DVBDIVN) W !,"The HINQ response will show the '"_DVBDIVN_"' division",!
27 Q
28 ;
29HINQ I $D(DUZ)#2'=1 W !,"DUZ not defined",! Q
30 I $D(^VA(200,DUZ,.1)) S DVBNUM=$P(^(.1),U,9) I DVBNUM
31 E W !," HINQ Employee Number not in New Person file",!," Notify System Manager",! Q
32 S DVBGO=0
33 W !!,"Select patients, enter your Password and HINQ requests will be sent",!
34 ;
35 D DIV,TELL,AGN G EX
36 ;
37AGN S DIC="^DPT(",DIC(0)="AEMQZ" D ^DIC I +Y>0 S DVBGO=DVBGO+1,DFN=+Y D VER W:$D(DVBVER) !,?25,"Verified"
38 G:Y'>0 PAS
39 I $D(^DVB(395.5,DFN,0)),"PNE"[$P(^(0),U,4) W !,$C(7),"A HINQ Request has already been made for this patient",!,"Do you wish to make another Request"
40 E D ^DVBHQUT G AGN
41ASK S %=2 D YN^DICN I %=1 S DVBGO=DVBGO+1 D ^DVBHQUT G AGN
42 I %Y["?" D H2 G ASK
43 I %=2 S DVBGO=DVBGO-1 G AGN
44PAS I DVBGO>0 W ! D PASS^DVBHQDB
45 Q ;G EX
46 ;
47H1 W !!,"Answer 'Y'es to enter a Request in the HINQ suspense File" D H3 Q
48 ;
49H2 W !!,"Answer 'Y'es to enter a Request in the HINQ suspense File" W:DVBDIV !,"The HINQ responses will show the '"_DVBDIVN_"' Division"
50 W !,"When you enter the HINQ password all 'P'ending requests in the",!,"HINQ suspense file will be processed"
51 ;
52H3 W !!,"Do you wish to request a HINQ inquiry " Q
Note: See TracBrowser for help on using the repository browser.