source: FOIAVistA/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFEA1.m@ 1780

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1RMPFEA1 ;DDC/KAW-APPROVE/DISAPPROVE ORDERS; [ 06/16/95 3:06 PM ]
2 ;;2.0;REMOTE ORDER/ENTRY SYSTEM;;JUN 16, 1995
3SEL ;;input: RMPFS
4 ;;output: RMPFX,RMPFM
5 K RMPFX S RMPFM="I" S XX=$P(RMPFSYS,U,6)
6 G SELE:'$D(RMPFS)
7SEL1 W !!,"Select an order number" I XX W ", <M>ultiple Approval"
8 W " or <RETURN> to exit: " D READ G END:$D(RMPFOUT)
9SEL11 I $D(RMPFQUT) W !!,"Enter the number to the left of the order you wish to approve",!,"<RETURN> to continue." W:XX " Enter an <M> to approve multiple orders." G SEL1
10 G SELE:Y="" I XX,"Mm"[Y S RMPFM="M" G SELE
11 I '$D(RMPFS(Y)) S RMPFQUT="" G SEL11
12SEL2 S RMPFX=RMPFS(Y)
13SELE K XX,Y Q
14MULTI ;;input: RMPFM
15 ;;output:
16 G END:RMPFM'="M"
17 W !!,"Approve <A>ll orders, by <O>rdering Official, <T>ype of Order or",!,"Numbers of specific orders separated by commas. O// "
18 D READ G END:$D(RMPFOUT)
19MULTI1 I $D(RMPFQUT) D MSG G MULTI
20 S:Y="" Y="O" I "AaOoTt"'[Y&(Y'?1N.E) S RMPFQUT="" G MULTI1
21 I Y?1N.E K RMPFS1 S CT=0 D SUB G MULTI1:$D(RMPFQUT),EXIT
22 S Y=$E(Y,1),OR=$S("Aa"[Y:"A","Oo"[Y:"O",1:"T")
23 D ORD:OR="O",TYP:OR="T" G END:Y=-1
24 S (CT,RMPFX)=0
25 F IK=1:1 S RMPFX=$O(^RMPF(791810,"AC",2,RMPFX)) Q:'RMPFX S S0=$G(^RMPF(791810,RMPFX,0)) I $P(S0,U,15)=$O(^RMPF(791810.5,"C",RMPFMENU,0)),$P(S0,U,3)=2 D SUB1
26EXIT W !!,CT," Orders Added to the Batch." D CONT^RMPFEA
27END K JJ,KK,IK,OR,CT,Y,RMPFX,RMPFM,DI,I,DIE,DR,D0,DI,D,% Q
28SUB F KK=1:1 S JJ=$P(Y,",",KK) Q:JJ="" D Q:$D(RMPFQUT)
29 .I '$D(RMPFS(JJ)) S RMPFQUT="" Q
30 .S RMPFS1(RMPFS(JJ))=""
31 S RMPFX=0 F S RMPFX=$O(RMPFS1(RMPFX)) Q:'RMPFX D
32 .Q:'$D(^RMPF(791810,RMPFX,0)) S RMPFHAT="",X=$P(^(0),U,2)
33 .I X,$D(^RMPF(791810.1,X,0)) S RMPFHAT=$P(^(0),U,2)
34 .D SET^RMPFEA2 S CT=CT+1
35 Q
36SUB1 Q:'$D(^RMPF(791810,RMPFX,0)) S S0=^(0),X=$P(S0,U,2),RMPFHAT=""
37 I X,$D(^RMPF(791810.1,X,0)) S RMPFHAT=$P(^(0),U,2)
38 I OR="O" Q:$P(S0,U,8)'=RMPFAD
39 I OR="T" Q:$P(S0,U,2)'=RMPFTYP
40 D SET^RMPFEA2 S CT=CT+1
41 Q
42ORD S DIC=200,DIC(0)="AEQM" D ^DIC Q:Y=-1 S RMPFAD=+Y Q
43TYP S DIC=791810.1,DIC(0)="AEQM",DIC("S")="I '$P(^(0),U,7)"
44 D ^DIC K DIC Q:Y=-1 S RMPFTYP=+Y 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
50MSG W !!,"Enter an <A> to approve all pending orders"
51 W !?6,"an <O> or <RETURN> to approve orders for one Ordering Official"
52 W !?7,"a <T> to approve orders of one specific type"
53 W !?6,"The numbers to the left of orders, separated by commas for specific orders"
54 W !?6,"an <^> to exit." Q
Note: See TracBrowser for help on using the repository browser.