source: FOIAVistA/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFDS.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1RMPFDS ;DDC/KAW-LIST ORDERS BY PATIENT OR STATUS; [ 08/25/97 12:03 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,!!,"LIST ORDERS BY PATIENT OR STATUS"
6 S Y=DT D DD^%DT S RMPFDAT=Y
7A1 W !!,"List Orders by <P>atient or by <S>tatus: "
8 D READ G END:$D(RMPFOUT)
9A11 I $D(RMPFQUT) W !!,"Enter a <P> to display a list of orders for a patient or",!?5,"an <S> to display all orders with a chosen status." G A1
10 G END:Y="" S Y=$E(Y,1) I "PpSs"'[Y S RMPFQUT="" G A11
11 S RMPFORD=$S("Pp"[Y:"P",1:"S") G PAT:RMPFORD="P"
12STAT W !!,"Enter an <*> to Display ALL Orders or",!,"Enter One or More of the Following Statuses Separated by Commas:",! S (CT,X)=0 K RMPFP
13 F S X=$O(^RMPF(791810.2,X)) Q:X="" D
14 .Q:'$D(^RMPF(791810.2,X,0)) S A=$P(^(0),U,1),B=$P(^(0),U,2),C=$P(^(0),U,10)
15 .I RMPFMENU=10,C Q
16 .I B'="" W !?5,"<",B,"> ",?11,A S CT=CT+1
17S1 W !!,"Select Status(es): " D READ G END:$D(RMPFOUT)
18S11 I $D(RMPFQUT) W !!,"Enter the letter of the status you wish to print or <*> to print all status." H 1 G STAT
19 G A1:Y="" I Y="*" S RMPFP=Y G S2
20 F I=1:1 S X=$P(Y,",",I) Q:X="" D G S11:$D(RMPFQUT)
21 .I '$D(^RMPF(791810.2,"C",X)) S RMPFQUT="" Q
22 .S Z=$O(^RMPF(791810.2,"C",X,0)) I Z S RMPFP(Z)=""
23 .Q
24 G A1:'$D(RMPFP)
25S2 K RMPFOO W !!,"Print for <A>ll or <S>elected Ordering Officials: ALL// "
26 D READ G END:$D(RMPFOUT)
27S21 I $D(RMPFQUT) W !!,"Enter an <A> to print orders for ALL Ordering Officials",!?6,"an <S> to select an ordering official" G S2
28 S:Y="" Y="A" S Y=$E(Y,1) I "AaSs"'[Y S RMPFQUT="" G S21
29 G TYP:"Aa"[Y
30S3 W ! S DIC="^VA(200,",DIC(0)="AEQM",DIC("A")="Select Ordering Official: "
31 D ^DIC G S2:Y=-1 S RMPFOO=+Y K DIC G TYP
32PAT W ! S DIC=2,DIC(0)="AEQM" D ^DIC G END:Y=-1 S DFN=+Y
33 S RMPFTP="P" G DISP
34TYP W !!,"Display <P>atient, <S>tation or <B>oth Types of Orders: B// "
35 D READ G END:$D(RMPFOUT)
36TYP1 I $D(RMPFQUT) W !!,"Enter a <P> to display only patient type orders,",!?5,"an <S> to display only station type orders,",!?8,"<B> or <RETURN> to display both types." G TYP
37 S:Y="" Y="B" S Y=$E(Y,1) I "BbPpSs"'[Y S RMPFQUT="" G TYP1
38 S RMPFTP=$S("Bb"[Y:"B","Pp"[Y:"P",1:"S")
39DISP D ^RMPFDS1 G RMPFSET:$D(RMPFOUT)
40 I IOST?1"P-".E W @IOF
41 E D CONT^RMPFDS1 G END:$D(RMPFOUT),RMPFSET
42END K RMPFORD,RMPFTP,RMPFS,RMPFOUT,RMPFQUT,DIC,DFN,RMPFCX,RMPFP,RMPFO
43 K RMPFOO,DIPGM,DISYS,CT,S0,%,%Y,%XX,%YY,A,B,C,I,J,Y,X,Z Q
44READ K RMPFOUT,RMPFQUT
45 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
46 I Y?1"^".E S (RMPFOUT,Y)="" Q
47 S:Y?1"?".E (RMPFQUT,Y)=""
48 Q
Note: See TracBrowser for help on using the repository browser.