[613] | 1 | PSIVORH ;BIR/MLM-MAIN DRIVER FOR IV HYPERALS - OE/RR INTERFACE ;09 FEB 93 / 10:02 AM
|
---|
| 2 | ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
|
---|
| 3 | ;
|
---|
| 4 | EN ; Entry point called by IV Hyperal protocol.
|
---|
| 5 | S X=ORACTION,PSIVAC="O"_$S(X="N":"N",X=1:"E",X=2:"R",X=4:"H",X=6:"D",X="8":"S",1:"") S:X'=5&(X'=7) PSIVUP=+$$GTPCI^PSIVUTL
|
---|
| 6 | S DFN=+ORVP,X=ORACTION I X=5!(X=7)!(X=8) D @ORACTION Q
|
---|
| 7 | D ENCPP^PSIVOREN Q:'PSJIVORF!('PSJORF) D EN1,DONE^PSIVORA1
|
---|
| 8 | Q
|
---|
| 9 | ;
|
---|
| 10 | EN1 ; Take action on existing order.
|
---|
| 11 | I ORGY>8 D @ORGY Q
|
---|
| 12 | I '$G(ORPK) W !,"INSUFFICIENT INFORMATION, CANNOT CONTINUE." S OREND=1 Q
|
---|
| 13 | I ORPK["V",($P($G(^PS(55,DFN,"IV",+ORPK,0)),U,17)="O") D ONCALL^PSIVORV1 Q
|
---|
| 14 | S PSJORD=ORPK,PSJORSTS=ORSTS L +@$S(PSJORD["V":"^PS(55,DFN,""IV"",+PSJORD)",1:"^PS(53.1,+PSJORD)"):1 E W $C(7),!!,"This order is being edited by another user." S OREND=1 Q
|
---|
| 15 | D @ORACTION L -@$S(PSJORD["V":"^PS(55,DFN,""IV"",+PSJORD)",1:"^PS(53.1,+PSJORD)")
|
---|
| 16 | Q
|
---|
| 17 | ;
|
---|
| 18 | NEW ; Enter a new IV Hyperal order.
|
---|
| 19 | W !!,"HYPERAL ORDER ENTRY NOT AVAILABLE",!
|
---|
| 20 | Q
|
---|
| 21 | ;
|
---|
| 22 | 1 ; Edit an existing order.
|
---|
| 23 | W !!,"EDIT OF HYPERAL ORDERS NOT AVAILABLE",!
|
---|
| 24 | Q
|
---|
| 25 | ;
|
---|
| 26 | 2 ; Renew
|
---|
| 27 | W !!,"RENEWAL OF HYPERAL ORDERS NOT AVAILABLE",!
|
---|
| 28 | Q
|
---|
| 29 | ;
|
---|
| 30 | 3 ; Flag
|
---|
| 31 | Q
|
---|
| 32 | ;
|
---|
| 33 | 4 ; Hold
|
---|
| 34 | W !!,"HOLD OF HYPERAL ORDERS NOT AVAILABLE",!
|
---|
| 35 | Q
|
---|
| 36 | ;
|
---|
| 37 | 5 ; Event
|
---|
| 38 | D 5^PSIVORA
|
---|
| 39 | Q
|
---|
| 40 | ;
|
---|
| 41 | 6 ; Cancel - Delete pending or unreleased orders from Nonverified orders
|
---|
| 42 | ; (53.1) and Orders (100) files.
|
---|
| 43 | I ORSTS=1 W $C(7),!,"This order has already been DISCONTINUED." Q
|
---|
| 44 | W !!,"CANCEL HYPERAL ORDERS NOT AVAILABLE",! Q
|
---|
| 45 | Q
|
---|
| 46 | ;
|
---|
| 47 | 7 ; Purge
|
---|
| 48 | D 7^PSIVORA
|
---|
| 49 | Q
|
---|
| 50 | ;
|
---|
| 51 | 8 ; Print
|
---|
| 52 | K DIR S DIR(0)="E" D ^DIR K DIR I $D(DUOUT)!'($D(ORPK)) S OREND=1 Q
|
---|
| 53 | S:'$G(PSIVUP) PSIVUP=+$$GTPCI^PSIVUTL S:'$D(PSIVAC) PSIVAC="OS" S (ON,ON55)=ORPK,DFN=+ORVP D @$S(ON["V":"GT55^PSIVORFB",1:"GT531^PSIVORFA("_DFN_","""_ON_""")"),ENDT^PSIVORV1
|
---|
| 54 | Q
|
---|
| 55 | ;
|
---|
| 56 | 9 ; release order (status=incomplete in 53.1, pending in 100)
|
---|
| 57 | S X=ORACTION I X=4!(X=6) D @ORACTION Q
|
---|
| 58 | G:"36"'[ORSTS 9^PSIVORA
|
---|
| 59 | Q
|
---|
| 60 | ;
|
---|
| 61 | 10 ; Verify
|
---|
| 62 | Q
|
---|