source: WorldVistAEHR/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFEB.m@ 846

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

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1RMPFEB ;DDC/KAW-CLOSE TRANSMISSION BATCH; [ 06/16/95 3:06 PM ]
2 ;;2.0;REMOTE ORDER/ENTRY SYSTEM;;JUN 16, 1995
3RMPFSET I '$D(RMPFMENU) D MENU^RMPFUTL I '$D(RMPFMENU) W !!,$C(7),"*** A MENU SELECTION MUST BE MADE ***" Q ;;RMPFMENU must be defined
4 I '$D(RMPFSTAN)!'$D(RMPFDAT)!'$D(RMPFSYS) D ^RMPFUTL Q:'$D(RMPFSTAN)!'$D(RMPFDAT)!'$D(RMPFSYS)
5 W @IOF,!!,"CLOSE TRANSMISSION BATCH"
6START W !!,"Currently Open Batch:",! F I=1:1:21 W "-"
7A0 S RMPFBT=0
8A1 F S RMPFBT=$O(^RMPF(791812,"C",1,RMPFBT)) Q:'RMPFBT I $D(^RMPF(791812,RMPFBT,0)) S S0=^(0),M=$P(S0,U,9) S:M M=$P($G(^RMPF(791810.5,M,0)),U,2) S:M="" M=0 I $P(S0,U,8)=RMPFSTAP,M=RMPFMENU Q
9 I 'RMPFBT D MSG1 G END
10 S S0=^RMPF(791812,RMPFBT,0)
11 G A1:$P(S0,U,2)'=1 S Y=$P(S0,U,1) D DD^%DT
12 S D=Y,N=$P(S0,U,4) W !!,"Date/Time Opened: ",D
13 W !?1,"Number in Batch: ",N
14A4 W !!,"Display batch entries? YES// " D READ G END:$D(RMPFOUT)
15A41 I $D(RMPFQUT) W !!,"Type <Y> or <RETURN> to display entries in the batch or <N> to continue." G A4
16 S:Y="" Y="Y" I "YyNn"'[Y S RMPFQUT="" G A41
17 G MSG:"Nn"[Y
18A42 D ^RMPFDB1
19MSG W !!,"By closing this batch, you will make the batch available for transmission",!,"to the VA Denver Distribution Center."
20A6 W !!,"Close this batch? NO// " D READ
21 G END:$D(RMPFOUT)
22A61 I $D(RMPFQUT) W !!,"Enter <Y> to close the batch, <N> or <RETURN> to exit." G MSG
23 S:Y="" Y="N" I "YyNn"'[Y S RMPFQUT="" G A61
24 G END:"Nn"[Y
25CLOSE S X="NOW",%DT="T" D ^%DT
26 L ^RMPF(791812,RMPFBT)
27 S $P(^RMPF(791812,RMPFBT,0),U,2)=2,$P(^(0),U,3)=Y,$P(^(0),U,5)=DUZ
28 S ^RMPF(791812,"C",2,RMPFBT)="" K ^RMPF(791812,"C",1,RMPFBT)
29 L
30 W:'$D(ZTSK) !!?29,"*** BATCH CLOSED ***"
31A7 D AUTOQ^RMPFQT
32END K RMPFBT,RMPFBJ,RMPFB,%DT,SG,S0,D,I,N,X,Y
33 K %,T,D,D0,DA,DI,DIC,DIE,DQ,DR,II,N,XMINST Q
34MSG1 W !!,"*** NO OPEN BATCH ***" Q
35DELETE ;;input: RMPFB
36 ;;output: None
37 W !!,"Enter Order Numbers Separated by Commas: "
38 D READ G DELETEE:$D(RMPFOUT)
39DELE I $D(RMPFQUT) W !!,"Select the number(s) to the left of the orders you wish to delete.",!,"Separate numbers with commas." G DELETE
40 G DELETEE:Y=""
41 F I=1:1 S X=$P(Y,",",I) Q:X="" I '$D(RMPFB(X)) S RMPFQUT="" Q
42 G DELE:$D(RMPFQUT) S SG=Y W !!
43 F I=1:1 S RX=$P(SG,",",I) Q:RX="" I $D(RMPFB(RX)) S RMPFBJ=RMPFB(RX) I $D(^RMPF(791812,RMPFBT,101,RMPFBJ,0)) S RMPFX=$P(^(0),U,1) D DEL^RMPFER
44DELETEE K RMPFQUT,SG,RX,I,X,Y,RMPFB Q
45READ K RMPFOUT,RMPFQUT
46 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
47 I Y?1"^".E S (RMPFOUT,Y)="" Q
48 S:Y?1"?".E (RMPFQUT,Y)=""
49 Q
Note: See TracBrowser for help on using the repository browser.