source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGPER.m@ 1096

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1PSGPER ;BIR/CML3-PRINTS PRE-EXCHANGE NEEDS REPORT ;04 JAN 95 / 5:08 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**95,115,127,133**;16 DEC 97
3 ;
4 S PSGPERRF=0
5DEV ;
6 S PSGION=ION
7DEV1 ;
8 Q:'$$DEFON^PSGPER1
9 S D=$G(PSGPXDEV) S:'D D=$P(PSJSYSW0,U,29) S:D="" D="HOME" S IOP=$S(D:"`"_D,1:D) K %ZIS S %ZIS="NQ" D ^%ZIS S D=$G(ION)
10 K IOP,%ZIS,IO("Q"),ION S %ZIS="QM",%ZIS("A")="Select DEVICE for PRE-EXCHANGE UNITS REPORT: ",%ZIS("B")=D D ^%ZIS K %ZIS
11 I POP D POP G:%=1 DEV1 G DONE
12 I $G(ION)]"",D'=ION D CURDEF
13 I $D(IO("Q")) K ZTSAVE S PSGTIR="^PSGPER0",ZTDESC="PRE-EXCHANGE UNITS REPORT",ZTDTH=$H,ZTSAVE("PSGPXN")="" D ENTSK^PSGTI G:'$D(ZTSK) DEV K ZTSK G OUT
14 D ENP^PSGPER0:'$G(PSGPXPT),ENPAT^PSGPER0:$G(PSGPXPT),AG
15 I %=1 S PSGPERRF=1 G DEV
16 ;
17DONE ;
18 S DIK="^PS(53.4,",DA=PSGPXN D ^DIK
19 ;
20OUT ;
21 K PSGPERRF,PSGPXN
22 Q:$G(PSJCOM)!$G(PSJPREX)
23 N PSJSYSW0,PSGVBW,PSJPWD,PSJSYSL D Q
24 . D:'$G(PSGPXPT) ENIVKV^PSGSETU
25 ;
26POP ;
27 S %=2 W:'PSGPERRF !!,"IF A DEVICE IS NOT CHOSEN, NO REPORT WILL BE RUN AND THE DATA WILL NO LONGER BE RETRIEVABLE THROUGH THIS REPORT."
28 I 'PSGPERRF F W !,"Do you want another chance to choose a device" S %=1 D YN^DICN Q:% W !?3,"Enter 'YES' to choose a device to print. Enter 'NO' to quit now."
29 I %'=1 S IOP=PSGION D ^%ZIS S %=2
30 Q
31 ;
32AG ;
33 F W !!,"DO YOU NEED TO PRINT THIS REPORT AGAIN" S %=2 D YN^DICN Q:% D AGMSG
34 Q
35 ;
36AGMSG ;
37 I %Y'?1."?" W $C(7)," ANSWER 'YES' OR 'NO' (Entry required)" Q
38 W !," Enter 'YES' to print this report again. Enter 'NO' (or an '^') to quit",!,"now. PLEASE NOTE that you will NOT be able to retrieve this data at a later",!,"date. You should print this information now." Q
39CURDEF ;
40 Q:$G(PSGPXDEV)=0
41 K DIC,DR,DA,X,Y,DIE S DIC="^%ZIS(1,",DIC(0)="SOX",X=ION D ^DIC Q:'($G(Y)>0)
42 N D S D=+$G(Y)
43 F W !!,"Keep ",ION," as the PRE-EXCHANGE REPORT DEVICE for this session" S %=0 D YN^DICN S PSGPXDEV=$S(%=1:D,1:0) Q:% D DEFMSG
44 I $G(Y) S $P(PSJSYSW0,"^",29)=+Y
45 K DIC,DR,DA,X,Y,DIE
46 Q
47 ;
48DEFMSG ;
49 I %Y'?1."?" W !,$C(7)," ANSWER 'YES' OR 'NO' (Entry required)" Q
50 W !!," Enter 'YES' to make ",ION," the PRE-EXCHANGE REPORT default DEVICE"
51 W !," for the current session. PLEASE NOTE that this will override the ward"
52 W !," default PRE-EXCHANGE REPORT DEVICE for this session only."
53 Q
Note: See TracBrowser for help on using the repository browser.