source: FOIAVistA/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFEA3.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1RMPFEA3 ;DDC/KAW-AUTOQUEUE MANAGER FOR TRANSMISSION BATCHES [ 06/16/95 3:06 PM ]
2 ;;2.0;REMOTE ORDER/ENTRY SYSTEM;;JUN 16, 1995
3 ;; input: RMPFBT
4 ;;output: None
5 ;;Set queue time if transmission parameter set to auto-queue
6 Q:'$D(RMPFBT) Q:$P(RMPFSYS,U,3)'="A"
7 S TM=$P(RMPFSYS,U,4) I TM="" S TM=.22
8 S X="NOW",%DT="T" D ^%DT
9 S A="."_$P(TM,".",2),B="."_$P(Y,".",2),ZTDTH=$P(DT,".",1)_A
10 I A-B<0 S X1=$P(DT,".",1),X2=1 D C^%DTC S ZTDTH=$P(X,".",1)_A
11QUE S ZTIO="",ZTDESC="AUTO-QUEUE ROES TRANSMISSION",ZTSAVE("RMPFBT")=""
12 S ZTSAVE("RMPFSTAP")="",ZTSAVE("RMPFMENU")="",ZTSAVE("RMPFSYS")=""
13 S ZTRTN="CLOSE^RMPFEB" D ^%ZTLOAD
14 S $P(^RMPF(791812,RMPFBT,0),U,10)=ZTSK
15END K TM,X,Y,A,B,ZTDTH,ZTIO,ZTDESC,ZTSAVE,ZTRTN,ZTSK Q
16REQUE ;;Reschedule the closing and transmission of a batch
17 ;; input: RMPFBT
18 ;;output: None
19 Q:'$D(RMPFBT) Q:'$D(^RMPF(791812,RMPFBT,0)) S ZTSK=$P(^(0),U,10)
20 I 'ZTSK W !!,$C(7),"*** THIS BATCH HAS NOT BEEN SCHEDULED FOR TRANSMISSION ***" G REQUEE
21 S X="NOW",%DT="T" D ^%DT S ZTDTH=Y D REQ^%ZTLOAD
22 I ZTSK(0)'=1 W !!,"*** TASK NOT REQUEUED ***"
23REQUEE K X,Y,ZTSK Q
24EMER ;;Queue or requeue emergency batch
25 ;; input: RMPFBT,RMPFCAT
26 ;;output: None
27 W !!,"This order has a delivery category of: "
28 W $S(RMPFCAT="E":"EMERGENCY",1:"PRIORITY")
29 W !!,"Do you wish to close the open batch and transmit now? YES// "
30 D READ Q:$D(RMPFOUT)
31EMER1 I $D(RMPFQUT) W !!,"Enter a <Y> or <RETURN> to close and transmit the batch immediately",!?7,"an <N> to leave the batch for later transmission." G EMER
32 S:Y="" Y="Y" S Y=$E(Y,1) I "YyNn"'[Y S RMPFQUT="" G EMER1
33 G EMERE:"Yy"'[Y
34 I $P(^RMPF(791812,RMPFBT,0),U,10) D REQUE^RMPFEA3 G EMERE
35 D CLOSE^RMPFEB
36EMERE Q
37READ K RMPFOUT,RMPFQUT
38 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
39 I Y?1"^".E S (RMPFOUT,Y)="" Q
40 S:Y?1"?".E (RMPFQUT,Y)=""
41 Q
Note: See TracBrowser for help on using the repository browser.