1 | PSONFI ;BIR/MHA - dispense drug/orderable item text display ;09/13/00
|
---|
2 | ;;7.0;OUTPATIENT PHARMACY;**46,94,131,225**;DEC 1997;Build 29
|
---|
3 | ;External reference to PSSDIN is supported by DBIA 3166
|
---|
4 | ;External reference to ^PS(50.606 is supported by DBIA 2174
|
---|
5 | ;External reference to ^PS(50.7 is supported by DBIA 2223
|
---|
6 | ;External reference to ^PSDRUG( is supported by DBIA 221
|
---|
7 | ;
|
---|
8 | NFI ;display restriction/guidelines
|
---|
9 | D EN^PSSDIN(PSODRUG("OI"),PSODRUG("IEN")) S NFI=$$PROMPT^PSSDIN
|
---|
10 | I NFI]"","ODY"[NFI D TD^PSONFI S DIR(0)="E" D ^DIR K DIR
|
---|
11 | K NFI Q
|
---|
12 | DDTX ;Display drug text for the hidden action DIN
|
---|
13 | N OI,DD
|
---|
14 | S:$D(PSODRUG("OI")) OI=PSODRUG("OI") S:$D(PSODRUG("IEN")) DD=PSODRUG("IEN")
|
---|
15 | I $G(OI),$G(DD) G 1
|
---|
16 | I $D(PSORNSV),$G(PSORNSV)]"" S OI=+$P(OR0,"^",8),DD=+$P(OR0,"^",9) G 1
|
---|
17 | S OI=+RXOR,DD=+$P(RX0,"^",6)
|
---|
18 | 1 S OI=$S($G(OI):OI,1:""),DD=$S($G(DD):DD,1:"")
|
---|
19 | D EN^PSSDIN(OI,DD)
|
---|
20 | N N1,N2,N3,N4,TX,NX S NX="PSSDIN"
|
---|
21 | W @IOF,!!,"Drug restriction/guideline info:",!!
|
---|
22 | W !,"Orderable Item: "_$P(^PS(50.7,OI,0),"^")_" "_$P(^PS(50.606,$P(^(0),"^",2),0),"^")_$S($P(^PS(50.7,OI,0),"^",12):" ***(N/F)***",1:""),!!
|
---|
23 | I $O(^TMP("PSSDIN",$J,"OI",0)) S N1="OI" D TXD
|
---|
24 | W:'$O(^TMP("PSSDIN",$J,"OI",0)) ?5,"No information available ",!!
|
---|
25 | I $G(DD),$D(^PSDRUG(DD,0)) W !,"Drug: "_$P(^PSDRUG(DD,0),"^")_$S($P(^PSDRUG(DD,0),"^",9):" ***(N/F)***",1:""),!! D
|
---|
26 | .I $O(^TMP("PSSDIN",$J,"DD",0)) S N1="DD" D TXD
|
---|
27 | .W:'$O(^TMP("PSSDIN",$J,"DD",0)) ?5,"No information available ",!!
|
---|
28 | HLD K DIR S DIR(0)="E" D ^DIR K DIR
|
---|
29 | Q
|
---|
30 | DIN(OI,DD) ;Setup DIN indicator
|
---|
31 | S (NFIO,NFID)=""
|
---|
32 | I $D(OI),$G(OI) S:$P($G(^PS(50.7,OI,0)),"^",12) NFIO=" ***(N/F)***"
|
---|
33 | I $D(DD),$G(DD) S:$P($G(^PSDRUG(DD,0)),"^",9) NFID=" ***(N/F)***"
|
---|
34 | D EN^PSSDIN(OI,DD)
|
---|
35 | S:$O(^TMP("PSSDIN",$J,"OI",0)) NFIO=NFIO_" <DIN>"
|
---|
36 | S:$O(^TMP("PSSDIN",$J,"DD",0)) NFID=NFID_" <DIN>"
|
---|
37 | K ^TMP("PSSDIN",$J) Q
|
---|
38 | Q
|
---|
39 | RV ;reverse video
|
---|
40 | I $G(PKID),$G(PKIE)]"" D
|
---|
41 | .I $O(^PS(52.41,ORD,"OBX",0)) D CNTRL^VALM10(1,1,13,IORVON,IORVOFF,0),RV^PSOPKIV1 Q
|
---|
42 | .D CNTRL^VALM10(1,1,$L(PKIE),IORVON,IORVOFF,0)
|
---|
43 | D:$G(NFIO) CNTRL^VALM10(+NFIO,$P(NFIO,",",2),5,IORVON,IORVOFF,0)
|
---|
44 | D:$G(NFID) CNTRL^VALM10(+NFID,$P(NFID,",",2),5,IORVON,IORVOFF,0)
|
---|
45 | K NFIO,NFID,PKID
|
---|
46 | ;- Reverses video for the words "Flagged" and "Unflagged"
|
---|
47 | N L
|
---|
48 | F L=1:1:VALMCNT D
|
---|
49 | . D:$D(FLAGLINE(L)) CNTRL^VALM10(L,1,FLAGLINE(L),IORVON,IORVOFF,0)
|
---|
50 | Q
|
---|
51 | ;
|
---|
52 | TD N N1,N2,N3,N4,TX,NX S NX="PSSDIN"
|
---|
53 | W @IOF
|
---|
54 | I NFI="O" D OIT
|
---|
55 | I NFI="D" D DDT
|
---|
56 | I NFI="Y" D DDT,OIT
|
---|
57 | Q
|
---|
58 | OIT ;
|
---|
59 | S N1="OI",TX="Orderable Item Text:" D TXT
|
---|
60 | Q
|
---|
61 | DDT ;
|
---|
62 | S N1="DD",TX="Dispense Drug Text:" D TXT
|
---|
63 | Q
|
---|
64 | TXT ;
|
---|
65 | W !,TX
|
---|
66 | TXD K ^UTILITY($J,"W")
|
---|
67 | S N2="" F S N2=$O(^TMP(NX,$J,N1,N2)) Q:'N2!($D(DIRUT)) D
|
---|
68 | .S N3="" F S N3=$O(^TMP(NX,$J,N1,N2,N3)) Q:'N3!($D(DIRUT)) D
|
---|
69 | ..S N4="" F S N4=$O(^TMP(NX,$J,N1,N2,N3,N4)) Q:'N4!($D(DIRUT)) D
|
---|
70 | ...W !?5,^TMP(NX,$J,N1,N2,N3,N4) I $Y>20 W ! D HLD Q:$D(DIRUT) W @IOF
|
---|
71 | W ! K ^UTILITY($J,"W")
|
---|
72 | Q
|
---|