source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSORENW2.m@ 703

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1PSORENW2 ;IHS/DSD/JCM - displays renew rx information for edit ; 12/09/92 10:14 am
2 ;;7.0;OUTPATIENT PHARMACY;**46,103**;DEC 1997
3 ; This routine displays the entered new rx information and
4 ; asks if correct, if not allows editing of the data.
5 ;------------------------------------------------------------
6START ;
7 S (PSORENW("DFLG"),PSORENW2("QFLG"))=0
8 D DISPLAY ; Displays information
9 D ASK G:PSORENW2("QFLG")!PSORENW("DFLG") END
10EN D EDIT
11 G:'$G(PSORX("FN")) START
12END D EOJ
13 Q
14 ;------------------------------------------------------------
15DISPLAY ;
16 W !!,"Rx # ",PSORENW("NRX #")
17 W ?23,$E(PSORENW("FILL DATE"),4,5),"/",$E(PSORENW("FILL DATE"),6,7),"/",$E(PSORENW("FILL DATE"),2,3)
18 W !,$G(PSORX("NAME")),?30,"#",PSORENW("QTY")
19 S X=PSORENW("SIG") D SIGONE^PSOHELP W !,$E($G(INS1),2,250),!!,$S($G(PSODRUG("TRADE NAME"))]"":PSODRUG("TRADE NAME"),1:PSODRUG("NAME"))
20 W !,PSORENW("PROVIDER NAME"),?25,PSORX("CLERK CODE")
21 W !,"# of Refills: ",PSORENW("# OF REFILLS"),!
22 Q
23 ;
24ASK ;
25 K DIR,X,Y
26 S DIR("A")="Is this correct",DIR(0)="Y",DIR("B")=$S(+$G(PSEXDT):"NO",1:"YES") D ^DIR K DIR
27 I $D(DIRUT) S PSORENW("DFLG")=1 G ASKX
28 I Y,+$G(PSEXDT) D K PSOELSE G ASKX
29 .K PSOELSE I $G(POERR) S PSOELSE=1 D
30 ..S Y=PSORENW("FILL DATE") X ^DD("DD") S VALMSG=Y_" fill date is greater than possible expiration date of "
31 ..S Y=$P(PSEXDT,"^",2) X ^DD("DD") S VALMSG=VALMSG_Y_"."
32 .I '$G(PSOELSE) D
33 ..S Y=PSORENW("FILL DATE") X ^DD("DD") W !!,$C(7),Y_" fill date is greater than possible expiration date of "
34 ..S Y=$P(PSEXDT,"^",2) X ^DD("DD") W Y_".",!
35 I Y S PSORENW2("QFLG")=1
36ASKX K X,Y,DIRUT,DTOUT,DUOUT,SIG
37 Q
38 ;
39EDIT ;
40 S PSORX("EDIT")=1
41 D INIT^PSORENW3,EN^PSOORNE4(.PSORENW),STOP^PSORENW1 ;D EN^PSORENW2
42 ;D ^PSORENW3
43 S PSORENW("DFLG")=0
44 Q
45 ;
46EOJ ;
47 K PSORENW2,PSORX("EDIT"),PSORENW("EDIT"),PSOQUIT
48 Q
Note: See TracBrowser for help on using the repository browser.