source: WorldVistAEHR/trunk/r/EQUIPMENT_TURN_IN_REQUEST-PRCN/PRCNTICN.m@ 1744

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1PRCNTICN ;SSI/SEB-Cancel equipment turn-in request ;[ 02/25/97 5:10 PM ]
2 ;;1.0;PRCN;**2,3**;Sep 13, 1996
3 W @IOF S DIC("A")="Enter TRANSACTION #: ",DIC="^PRCN(413.1,",DIC(0)="AEQ"
4 S PRCNPPM=0 I $D(^XUSEC("PRCNPPM",DUZ)) S PRCNPPM=1
5 I 'PRCNPPM S DIC("S")="I $P(^(0),U,2)=DUZ&($P(^(0),U,7)=4)!($P(^(0),U,7)=1)"
6 I PRCNPPM S DIC("S")="I $P(^(0),U,7)'=20&($P(^(0),U,7)'=24)"
7 D ^DIC
8 K DIC("S") G EXIT:+Y<0 S D0=+Y,PRCNDATA=^PRCN(413.1,D0,0),NUM=$P(Y,U,2)
9PR ; Prints the data for this transaction
10 S PCMR=$P(PRCNDATA,U,6),PREQ=$P(PRCNDATA,U,2),PSER=$P(PRCNDATA,U,3)
11 W !!,"Service: " W:PSER'="" $P($G(^DIC(49,PSER,0)),U),?41,"CMR Official: "
12 I PCMR'="" W $P(^VA(200,PCMR,0),U)
13 W !,"Requestor: " S Y=$P(PRCNDATA,U,4)\1
14 D DD^%DT W:PREQ $P(^VA(200,PREQ,0),U) W ?41,"Date entered: ",Y
15 W !,"Line Items:" S D1=0
16 F S D1=$O(^PRCN(413.1,D0,1,D1)) Q:'D1 D
17 . S PD1=$P(^PRCN(413.1,D0,1,D1,0),U)
18 . W !,?5,"Number: ",D1,?41,"Description: ",$P(^ENG(6914,PD1,0),U,2)
19 W !,"CMR Explanation:" S D1=0
20 F S D1=$O(^PRCN(413.1,D0,2,D1)) Q:D1'?1N.N W !,?4,^PRCN(413.1,D0,2,D1,0)
21ASK ; Ask if user is certain he/she wants to cancel request
22 W !!,"Are you sure you want to cancel this turn-in" S %=2 D YN^DICN
23 I %=2 W !!,"OK, the turn-in was not cancelled." G EQUIP
24 I %=0 W !,"Please enter 'Y' to cancel the Turn-in request" G ASK
25 S DIE=413.1,DA=D0,DR="6////^S X=20;7////^S X=DT" D ^DIE
26 W !!,"Transaction #",DA," has been cancelled."
27 S D1=0 F S D1=$O(^PRCN(413.1,DA,1,D1)) Q:'D1 D
28 . S PTR=$P(^PRCN(413.1,DA,1,D1,0),U) K ^PRCN(413.1,"AB",PTR,DA,D1)
29EQUIP ; If there is an equip. request associated with this, prompt to cancel
30 G EXIT:"^"[$P(^PRCN(413.1,D0,0),U,9)
31 S DA=$P(^PRCN(413.1,D0,0),U,9),%=2
32QS W !!,"Do you want to cancel the corresponding equipment request"
33 D YN^DICN I %=2 W !!,"OK, the equipment request was not cancelled." G EXIT
34 I %=0 W !,"Please enter 'Y' to cancel the equipment request." G QS
35 S DIE=413,DR="6////^S X=20;7////^S X=DT" D ^DIE
36 W !!,"Equipment request #",$P(^PRCN(413,DA,0),U)," cancelled."
37EXIT ; Kill variables and quit
38 K DIC,DIE,D0,D1,DA,DR,X,Y,ST,TRN,NUM,C,PRCNDATA,%,PRCNPPM
39 Q
Note: See TracBrowser for help on using the repository browser.