source: WorldVistAEHR/trunk/r/BAR_CODE_MED_ADMIN-ALPB-PSB/PSBODO.m@ 1789

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1PSBODO ;BIRMINGHAM/EFC-BCMA UNIT DOSE VIRTUAL DUE LIST FUNCTIONS ;Mar 2004
2 ;;3.0;BAR CODE MED ADMIN;**5,21,24,38**;Mar 2004;Build 8
3 ;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; Reference/IA
6 ; EN^PSJBCMA2/2830
7EN ;
8 ;
9 ; Description:
10 ; Returns a display for a selected order when double clicked on the VDL
11 ;
12 N PSBGBL,DFN
13 S PSBGBL=$NAME(^TMP("PSBO",$J,"B"))
14 F S PSBGBL=$Q(@PSBGBL) Q:PSBGBL="" Q:$QS(PSBGBL,2)'=$J Q:$QS(PSBGBL,1)'["PSBO" D
15 .S DFN=$QS(PSBGBL,5)
16 .D DISPORD
17 Q
18 ;
19DISPORD ;
20 N PSBGBL,PSBOI,PSBHDR,PSJGLO
21 S PSBOI=$$GET1^DIQ(53.69,PSBRPT_",",.09)
22 D EN^PSJBCMA2(DFN,PSBOI)
23 S PSJGLO="^TMP(""PSJ"""_","_$J
24 D CLEAN^PSBVT
25 D PSJ1^PSBVT(DFN,PSBOI)
26 S PSBHDR(1)="BCMA - Display Order" D PT^PSBOHDR(DFN,.PSBHDR) W !
27 I '$G(PSBONX) W !,"Invalid Order"
28 D:$G(PSBONX)
29 .W !,"Orderable Item: ",PSBOITX
30 .I PSBONX["V" W !,"Infusion Rate: ",PSBIFR
31 .I PSBONX'["V" W !,"Dosage Ordered: ",PSBDOSE
32 .W ?40,"Start: ",PSBOSTX
33 .W !?40,"Stop: ",PSBOSPX
34 .W !,"Med Route: ",PSBMR
35 .W !,"Schedule Type: ",PSBSCHTX
36 .I PSBONX'["V" W ?40,"Self Med: ",PSBSMX
37 .W:PSBSM !?40,"Hosp Sup: ",PSBSMX
38 .W:PSBSCH'="" !,"Schedule: ",PSBSCH
39 .I PSBONX'["V" W !,"Admin Times: ",PSBADST
40 .I PSBONX["V",((PSBIVT="P")!(PSBISYR=1)) W !,"Admin Times: ",PSBADST
41 .W !,"Provider: ",PSBMDX
42 .I $E(PSBOTXT,1)="!" S $E(PSBOTXT,1)=""
43 .W !,"Spec Inst: ",PSBOTXT
44 .W !
45 .I $D(PSBDDA(1)) D
46 ..W !,"Dispense Drugs",!,"Drug Name",?40,"Units",?50,"Inactive Date"
47 ..W !,$TR($J("",75)," ","-")
48 ..F Y=0:0 S Y=$O(PSBDDA(Y)) Q:'Y D
49 ...S X=$P(PSBDDA(Y),U,4)
50 ...W !,$P(PSBDDA(Y),U,3),?40,$S(X]"":X,1:1)
51 ...S X=$P(PSBDDA(Y),U,5) Q:'X
52 ...W ?50,$E(X,4,5),"/",$E(X,6,7),"/",(1700+$E(X,1,3))
53 .I $D(PSBADA(1)) D
54 ..W !!,"Additives",!,"Name",?40,"Strength"
55 ..W !,$TR($J("",75)," ","-")
56 ..F Y=0:0 S Y=$O(PSBADA(Y)) Q:'Y D
57 ...W !,$P(PSBADA(Y),U,3),?40,$P(PSBADA(Y),U,4)
58 .I $D(PSBSOLA(1)) D
59 ..W !!,"Solution",!,"Name",?40,"Volume"
60 ..W !,$TR($J("",75)," ","-")
61 ..F Y=0:0 S Y=$O(PSBSOLA(Y)) Q:'Y D
62 ...W !,$P(PSBSOLA(Y),U,3),?40,$P(PSBSOLA(Y),U,4)
63 .I $P(@(PSJGLO_","_0_")"),U,1)'=-1 D
64 ..W !,$TR($J("",75)," ","-")
65 ..W !,"Pharmacy Activity Log: "
66 ..F I=1:1:$P(@(PSJGLO_","_0_")"),U,4) D
67 ...W !?9,"Date: ",$$FMTE^XLFDT($P(@(PSJGLO_","_I_","_1_")"),U,1)),?35,"User: ",$P(@(PSJGLO_","_I_","_1_")"),U,2)
68 ...W !?5,"Activity: ",$P(@(PSJGLO_","_I_","_1_")"),U,4)
69 ...I $D(@(PSJGLO_","_I_","_2_")")) W !?8,"Field: ",$P(@(PSJGLO_","_I_","_1_")"),U,3),!?5,"Old Data: ",@(PSJGLO_","_I_","_2_")")
70 ...I $D(@(PSJGLO_","_I_","_3_")")) W !?7,"Reason: ",@(PSJGLO_","_I_","_3_")")
71 ...W !
72 W !!
73 D CLEAN^PSBVT K @(PSJGLO_")")
74 Q
Note: See TracBrowser for help on using the repository browser.