source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSONFI.m@ 975

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

revised back to 6/30/08 version

File size: 2.6 KB
Line 
1PSONFI ;BIR/MHA - dispense drug/orderable item text display ; 09/13/00
2 ;;7.0;OUTPATIENT PHARMACY;**46,94,131**;DEC 1997
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 ;
8NFI ;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
12DDTX ;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)
181 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 ",!!
28HLD K DIR S DIR(0)="E" D ^DIR K DIR
29 Q
30DIN(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
39RV ;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 Q
46TD N N1,N2,N3,N4,TX,NX S NX="PSSDIN"
47 W @IOF
48 I NFI="O" D OIT
49 I NFI="D" D DDT
50 I NFI="Y" D DDT,OIT
51 Q
52OIT ;
53 S N1="OI",TX="Orderable Item Text:" D TXT
54 Q
55DDT ;
56 S N1="DD",TX="Dispense Drug Text:" D TXT
57 Q
58TXT ;
59 W !,TX
60TXD K ^UTILITY($J,"W")
61 S N2="" F S N2=$O(^TMP(NX,$J,N1,N2)) Q:'N2!($D(DIRUT)) D
62 .S N3="" F S N3=$O(^TMP(NX,$J,N1,N2,N3)) Q:'N3!($D(DIRUT)) D
63 ..S N4="" F S N4=$O(^TMP(NX,$J,N1,N2,N3,N4)) Q:'N4!($D(DIRUT)) D
64 ...W !?5,^TMP(NX,$J,N1,N2,N3,N4) I $Y>20 W ! D HLD Q:$D(DIRUT) W @IOF
65 W ! K ^UTILITY($J,"W") Q
Note: See TracBrowser for help on using the repository browser.