source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSIVORV2.m@ 1078

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1PSIVORV2 ;BIR/MLM-VIEW AN ORDER (PHARMACY) ;20 Jul 98 / 2:22 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**15,81**;16 DEC 97
3 ;
4 Q
5 ;***
6 ;V5.0 will be using ^PSJLIFN instead. Other sub-modules in this routine
7 ;are being used by IPF...
8 ;***
9EN ; Display order with numbers.
10 D EN^PSJLIORD(DFN,ON) Q
11 N PSIVNUM S PSIVNUM=1
12 ;
13ENNONUM(DFN,PSJORD) ; Display order with no numbers.
14 S UL80="",$P(UL80,"=",80)=""
15 W:'$G(PSJPRF)&($Y) @IOF W !!,"Patient: ",VADM(1)," (",$P(VADM(2),U,2),")",?52,"Wt (kg): ",PSJPWT," ",PSJPWTD
16 W !?3,"Ward: ",$S(VAIN(4):$P(VAIN(4),U,2),1:"OUTPATIENT"),?52,"Ht (cm): ",PSJPHT," ",PSJPWTD
17 W !,?1,"Status: ",$$CODES^PSIVUTL(P(17),$S(P("PON")'["V":53.1,1:55.01),$S(P("PON")'["V":28,1:100)) W:P("PON")["V" ?47,"Order number: ",+P("PON") W !,UL80,!
18 ;
19ENPRO ; Profile view.
20 N PSIVAC,Y,PSGEBN,PSGLI,PSJSTAR,PSIV531
21 S (PSGEBN,PSGLI)=""
22 S PSIVAC="C",P("PON")=ON
23 S PSIVUP=+$$GTPCI^PSIVUTL
24 S P("OT")=$S(P(4)="A":"F",P(4)="H":"H",1:"I")
25 NEW PSJL
26 N PSIVNUM S PSIVNUM=1
27 I P("OT")="I" D
28 . S PSJSTAR="(1)^(4)^(5)^(6)^(7)^(9)^(10)"
29 . D ^PSJLIVMD
30 I P("OT")'="I" D
31 . S PSJSTAR="(1)^(2)^(3)^(4)^(5)^(6)^(7)^(9)"
32 . D ^PSJLIVFD
33 NEW PSIVX
34 F PSIVX=0:0 S PSIVX=$O(^TMP("PSJI",$J,PSIVX)) Q:'PSIVX W !,^(PSIVX,0)
35 K ^TMP("PSJI",$J)
36 Q
37LONG(Y) ; Display long fields.
38 F X=1:1:$L(Y," ") D:$X+$L($P(Y," ",X))>$S(LN<11:42,1:80) RC W ?5,$P(Y," ",X)," "
39 Q ""
40WTPC ; Write provider comments.
41 W ?3,Y,!
42 ;
43PAUSE ;Hold display if end screen, do FF if eop.
44 I $E(IOST)="C",($Y#IOSL)>20 N DIR,X,Y S DIR(0)="E" D ^DIR Q:$D(DUOUT)!$D(DTOUT) W !
45 Q
46 ;
47RC ; Print field by line number
48 N X,Y S LN=LN+1 D:LN<11 @LN W !
49 Q
50 ;
511 ; Type
52 W ?56,"Type: " S X=$$CODES^PSIVUTL(P(4),53.1,53) W $S($E(X)="C":"CHEMO",1:X),$S(P(23)'="":" ("_P(23)_")",1:""),$S(P(5)=1:" (I)",P(5)=0:"(C)",1:"")
53 Q
54 ;
552 ;Syringe Size
56 W:P("SYRS")]"" ?51,"Syr. Size: ",$E(P("SYRS"),1,13) W:$L(P("SYRS"))>13 "..."
57 Q
58 ;
593 ; IV Room
60 W ?53,"IV Room: ",$P(P("IVRM"),U,2)
61 Q
62 ;
634 ; Start Date
64 S X="" I $D(PSIVNUM) S:P("DTYP") X=$S(P(17)="P"!(PSIVAC="PN"):" ",1:"*")_$S(P("DTYP")=1:"(12)",$E(P("OT"))="I":"(10)",1:"(8)")
65 W ?48-$L(X),X,?50,"Start Date: ",$$WDTE^PSIVUTL(P(2))
66 Q
67 ;
685 ; Stop Date
69 S X="" I $D(PSIVNUM) S:P("DTYP") X=$S(P(17)="P"!(PSIVAC="PN"):" ",1:"*")_$S(P("DTYP")=1:"(13)",$E(P("OT"))="I":"(11)",1:"(9)")
70 W ?48-$L(X),X,?51,"Stop Date: ",$$WDTE^PSIVUTL(P(3))
71 Q
72 ;
736 ; Log-in Date
74 W ?50,"Login Date: ",$$WDTE^PSIVUTL(P("LOG"))
75 Q
76 ;
777 ; Last fill date.
78 S Y=$$WDTE^PSIVUTL(P("LF")) W ?51,"Last Fill: ",$S(Y="******":"** Not printed **",1:Y)
79 Q
80 ;
818 ;Last fill qty.
82 W ?52,"Quantity: ",+P("LFA")
83 Q
84 ;
859 ; Entry Code
86 W ?50,"Entry Code: ",$S($P(P("CLRK"),U,2)]"":$E($P(P("CLRK"),U,2),1,18),1:"*** Undefined")
87 Q
88 ;
8910 ; Provider
90 S X="" I $D(PSIVNUM),P("DTYP") S X=$S(PSIVAC="PN":" ",1:"*")_$S(P("DTYP")=1:"(14)",$E(P("OT"))="I":"(12)",1:"(10)") ;I P(17)="P",(+P("CLRK")=+P(6)) S X=""
91 W ?48-$L(X),X,?52,"Provider: ",$S($P(P(6),U,2)]"":$E($P(P(6),U,2),1,18),1:"*** Undefined")
92 Q
93ENNH(ON) ;
94 I ON'["V" D GT531^PSIVORFA(DFN,ON) S:P(4)="" P(4)="P",(P(2),P(3))="" N PSIV531 S PSIV531=1
95 I ON["V" D GT55^PSIVORFB
96 N UL S UL="",$P(UL,"-",70)="" W !!,?5,UL,!,?5,"Patient: ",PSGP(0),?54,"Status: ",$S(P(17)="DE":"DC (EDIT)",1:$$CODES^PSIVUTL(P(17),$S(ON'["V":53.1,1:55.01),$S(ON'["V":28,1:100))),!
97 D ENPRO
98 Q
Note: See TracBrowser for help on using the repository browser.