source: WorldVistAEHR/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFDB.m@ 1211

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1RMPFDB ;DDC/KAW-DISPLAY TRANSMISSION BATCH; [ 09/03/97 3:41 PM ]
2 ;;2.0;REMOTE ORDER/ENTRY SYSTEM;**8**;MAY 30, 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,!,"DISPLAY TRANSMISSION BATCH" K ZTSK
6 I '$D(^RMPF(791812,"C")) W !!,"*** NO BATCHES HAVE BEEN CREATED ***" G END
7 S X=0 F I=1:1 S X=$O(^RMPF(791812,"C",1,X)) Q:'X I X,$D(^RMPF(791812,X,0)),$P(^(0),U,8)=RMPFSTAP S M=$P(^(0),U,9) S:M M=$P($G(^RMPF(791810.5,M,0)),U,2) S:M="" M=1 I M=RMPFMENU Q
8 G A1:X
9A0 W !!,"No open batches.",!!,"Display another batch? NO// "
10 D READ G END:$D(RMPFOUT)
11A01 I $D(RMPFQUT) W !!,"Type <Y> to see a list of batches, <N> or <RETURN> to exit." G A0
12 G END:Y=""!("Nn"[Y) I "Yy"'[Y S RMPFQUT="" G A01
13 G A2
14A1 W !!,"Display currently open batch? " D READ G END:$D(RMPFOUT)
15A11 I $D(RMPFQUT) W !!,"Enter <Y> to display the currently open batch,",!?6,"<N> to view a list of batches no longer open or",!?6,"<RETURN> to exit." G A1
16 G END:Y="" S Y=$E(Y,1) I "YyNn"'[Y S RMPFQUT="" G A11
17 I "Yy"[Y S RMPFBT=X G GO
18A2 K RMPFBT D DISP G END:$D(RMPFOUT),GO:$D(RMPFBT)
19 I '$D(RMPFB) W !!,"*** NO BATCHES EXIST ***" G END
20 D SEL G END:$D(RMPFOUT)!'$D(RMPFBT)
21GO K RMPFB D ^RMPFDB1 G END:$D(RMPFOUT),RMPFSET:$D(ZTSK) D CONT^RMPFDB1
22 I '$D(RMPFOUT) G RMPFSET
23END K RMPFBT,ZTRTN,ZTSAVE,ZTDESC,RMPFOUT,RMPFQUT,RMPFT,RMPFB,POP
24 K RMPFDOD,ZTSK,%T,%DT,I,X,Y,M Q
25READ K RMPFOUT,RMPFQUT
26 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
27 I Y?1"^".E S (RMPFOUT,Y)="" Q
28 S:Y?1"?".E (RMPFQUT,Y)=""
29 Q
30DISP ;; input: RMPFS(opt.)
31 ;;output: RMPFB
32 D HEAD1 S (CT,A)=0 K RMPFB,RMPFBT
33D1 S A=$O(^RMPF(791812,"AC",A)) G D3:'A S B=0
34D2 S B=$O(^RMPF(791812,"AC",A,B)) G D1:'B
35 G D2:'$D(^RMPF(791812,B,0)) S S0=^(0) G D2:$P(S0,U,8)'=RMPFSTAP
36 S M=$P(S0,U,9) S:M M=$P(^RMPF(791810.5,M,0),U,2) S:M="" M=0 G D2:M'=RMPFMENU
37 S Y=$P(S0,U,1) D DD^%DT S RMPFBDT=Y
38 S X=$P(S0,U,2) I $D(RMPFS) G D2:'$D(RMPFS(X))
39 S RMPFBST=$S(X=1:"OPEN",X=2:"CLOSED",X=3:"TRANSMITTED",X=4:"QUEUED FOR TRANSMISSION",1:"")
40 S RMPFBNA=$P(S0,U,4),(RMPFBTC,RMPFBUS)="" G D2:RMPFBST="OPEN"
41 S Y=$P(S0,U,3) I Y?7N.E D DD^%DT S RMPFBTC=Y
42 S X=$P(S0,U,5) I X,$D(^VA(200,X,0)) S RMPFBUS=$P(^(0),U,1)
43 S CT=CT+1 I $Y>20 D SEL G D3:$D(RMPFOUT),D3:$D(RMPFBT) D HEAD1
44 W !,$J(CT,2),". ",RMPFBDT,?24,$E(RMPFBST,1,15),?41,$J(RMPFBNA,3),?46,RMPFBTC,?66,$E(RMPFBUS,1,14) S RMPFB(CT)=B
45 G D2
46D3 K A,B,M,X,Y,%DT,CT,S0,RMPFBDT,RMPFBST,RMPFBNA,RMPFBTC,RMPFBUS Q
47SEL K RMPFBT W !!,"Select Batch Number: " D READ G SELE:$D(RMPFOUT)
48SEL1 I $D(RMPFQUT) W !!,"Enter the number to the left of the batch you wish to choose or",!?10,"<RETURN> to continue." G SEL
49 G SELE:Y="" I '$D(RMPFB(Y)) S RMPFQUT="" G SEL1
50 S RMPFBT=RMPFB(Y)
51SELE K Y Q
52HEAD1 W @IOF,!?23,"REMOTE ORDER/ENTRY ORDER BATCHES"
53 W !?42,"#"
54 W !," #",?5,"Batch Date/Time",?25,"Batch Status",?41,"Act",?47,"Date/Time Closed",?68,"Closed By"
55 W !,"---",?4,"------------------",?24,"---------------",?41,"---",?46,"------------------",?66,"--------------"
56 Q
Note: See TracBrowser for help on using the repository browser.