source: WorldVistAEHR/trunk/r/REMOTE_ORDER_ENTRY_SYSTEM-RMPF-RMPJ/RMPFET.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1RMPFET ;DDC/KAW-ENTER/EDIT PATIENT ORDERS; [ 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,"ENTER/EDIT PATIENT ORDERS",!
6PAT W ! S DIC=2,DIC(0)="AEQM" D ^DIC G END:Y=-1 S DFN=+Y D PAT^RMPFUTL
7 D DISP^RMPFDD,CONT G END:$D(RMPFOUT)
8SELECT I '$D(RMPFTE),$D(DFN) D ^RMPFDD2
9 S (RMPFORD,RMPFTP)="P" D ^RMPFDS1 G END:$D(RMPFOUT)
10 K RMPFX G ADD:'RMPFCX
11 D SEL G END:$D(RMPFOUT),PAT:RMPFSEL1=""
12 G ADD:"Aa"[RMPFSEL1,RMPFSET:'$D(RMPFX)
13ADDEDIT S S0=^RMPF(791810,RMPFX,0),RMPFST=$P(S0,U,3),RMPFTYP=$P(S0,U,2)
14 S RMPFHAT="" I RMPFTYP,$D(^RMPF(791810.1,RMPFTYP,0)) S RMPFHAT=$P(^(0),U,2)
15 S X="" I RMPFST,$D(^RMPF(791810.2,RMPFST,0)) S X=$P(^(0),U,2)
16 S:"IPED"[X RMPFEDIT="" N RMPFHAT,RMPFTYP,RMPFST,RMPFTP,RMPFTE
17 D ^RMPFDT1 G END:$D(RMPFOUT) K RMPFEDIT
18 D ^RMPFET0 G END:$D(RMPFOUT) I $D(RMPFSEL),RMPFSEL="E" G ADD
19 I $D(RMPFSEL),"Dd"[RMPFSEL K RMPFTE G SELECT
20 G ADDEDIT:$D(RMPFSEL)!$D(RMPFQUT) I '$D(RMPFX) K RMPFTE G SELECT
21ADD D ^RMPFET1 G END:$D(RMPFOUT),RMPFSET:'$D(RMPFX),ADDEDIT
22END K DFN,RMPFNAM,RMPFDOB,RMPFSSN,RMPFE,RMPFCX,RMPFSEL,RMPFO,RMPFS
23 K RMPFTP,RMPFEDIT,RMPFTYP,RMPFHAT,RMPFST,RMPFY1,L,%Y,RMPFORD,D1,RMPFO
24 K RMPFOUT,RMPFQUT,RMPFSEL1,RMPFTE,ZZ,ST,RMPFMOD
25 K %,%DT,POP,AB,DA,DR,CX,CN,C,I,X,Y,CM,M,ZY,DIE,DI,DQ,DIC,D0,%,DISYS Q
26CONT F I=1:1 Q:$Y>21 W !
27 W !,"Enter <RETURN> to continue or <^> to exit: " D READ
28 G CONT:$D(RMPFQUT) K RMPFS,CX,X,I Q
29READ K RMPFOUT,RMPFQUT
30 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
31 I Y?1"^".E S (RMPFOUT,Y)="" Q
32 S:Y?1"?".E (RMPFQUT,Y)=""
33 Q
34SEL ;;Select action to be taken on order
35 ;; input: RMPFS (opt.)
36 ;;output: RMPFX,RMPFSEL1
37 K RMPFX I '$D(RMPFS) S RMPFSEL1="A" G SELE
38 F I=1:1 Q:$Y>21 W !
39SEL1 W !,"Select a Number to edit, <A>dd or <RETURN> to exit: " D READ
40 G SELE:$D(RMPFOUT)
41SEL2 I $D(RMPFQUT) W !!,"Enter the number to the left of the order you wish to edit",!?5,"<A> to add a new order or",!?5,"<RETURN> to continue." G SEL1
42 S RMPFSEL1=Y G SELE:RMPFSEL1="",SELE:"Aa"[RMPFSEL1
43 I '$D(RMPFS(Y)) S RMPFQUT="" G SEL2
44 S RMPFX=RMPFS(Y)
45SELE K RMPFS,X,Y,I Q
Note: See TracBrowser for help on using the repository browser.