source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJDDUT2.m@ 1240

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

initial load of WorldVistAEHR

File size: 5.1 KB
Line 
1PSJDDUT2 ;BIR/LDT-INPATIENT MEDICATIONS DD UTILITY ;21 AUG 97 / 7:56 AM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 ;
4ENDLP ;Called from Inpatient User Parameters file (53.45), Label Printer
5 ;field .07 (Replaces ENDLP^PSGSET)
6 S PSGION=$S($D(ION):ION,1:"HOME") K %ZIS S %ZIS="QN",IOP=X D ^%ZIS I POP S IOP=PSGION D ^%ZIS K %ZIS,IOP,PSGION S X="" Q
7 D EN^DDIOL($S(X=$E(ION,1,$L(X)):$E(ION,$L(X)+1,$L(ION)),1:" "_ION),"","?0") S X=ION D ^%ZISC K %ZIS,PSGION,IOP Q
8 ;
9ADTM ;Called from Unit Dose Multiple of the Pharmacy Patient file (55.06),
10 ;Admin Times field 41
11 S PSJHLP(1)="THE TIMES MUST BE TWO (2) OR FOUR (4) DIGITS, SEPARATED WITH DASHES"
12 S PSJHLP(2)="(-), AND BE IN ASCENDING ORDER. (IE. 01-05-13)"
13 D WRITE
14 Q
15 ;
16 ;
17SITE ;Called from Inpatient Site file (59.4), field .01 (Replaces ^PSGRPNT)
18 S Q=0 F QQ=-1:1 S Q=$O(^PS(59.4,Q)) Q:'Q
19 I 'QQ S PSJHLP(1)="THIS IS YOUR ONLY SITE!",PSJHLP(1,"F")="$C(7),!!",PSJHLP(2)="(You must create another site before you can delete this one.)",PSJHLP(2,"F")="!" D WRITE Q
20 ;
21ENMARD() ; validate MAR SELECTION DEFAULT string in WARD PARMS file (59.6).
22 ;(Replaces ENMARD^PSJUTL())
23 N PSJANS,PSJX1,PSJX2,RANGE,Q
24 S RANGE="1:6" F PSJX1=1:1:6 S RANGE(PSJX1)=""
25 S:$E(X)="-" X=+RANGE_X S:$E($L(X))="-" X=X_$P(RANGE,":",2)
26 S PSJANS="" F Q=1:1:$L(X,",") S PSJX1=$P(X,",",Q) D FS Q:'$D(PSJANS)
27 Q:'$G(PSJANS) 0
28 S PSJANS=$E(PSJANS,1,$L(PSJANS)-1) F Q=1:1:$L(PSJANS,",") D Q:'$D(PSJANS)
29 .I $P(PSJANS,",",Q)=1,$L(PSJANS,",")>1 D EN^DDIOL("All Medications (1) may not be selected in combination with other types.","","!!") K PSJANS Q
30 .D EN^DDIOL($P(PSJANS,",",Q)_" - "_$P($T(@$P(PSJANS,",",Q)),";;",2),"","!?47")
31 S:$G(PSJANS) X=PSJANS Q $G(PSJANS)
32 ;
33FS ;
34 I $S(PSJX1?1.N1"-"1.N:0,PSJX1'?1.N:1,'$D(RANGE(PSJX1)):1,1:","_PSJANS[PSJX1) K PSJANS Q
35 I PSJX1'["-" S PSJANS=PSJANS_PSJX1_"," Q
36 S PSJX2=+PSJX1,PSJANS=PSJANS_PSJX2_","
37 F S PSJX2=$O(RANGE(PSJX2)) K:$S(X="":1,","_PSJANS[PSJX2:1,1:PSJX2>$P(PSJX1,"-",2)) PSJANS Q:'$D(PSJANS) S PSJANS=PSJANS_PSJX2_"," Q:PSJX2=$P(PSJX1,"-",2)
38 Q
39 ;
40ENMARDH ;Help text for MAR default answer. (Replaces ENMARDH^PSJUTL)
41 S PSJHLP(1)="Enter the number corresponding to the type of orders to be included on"
42 S PSJHLP(1,"F")="!!?2"
43 S PSJHLP(2)="MARs printed for this ward. Multiple types (except 1) may be selected"
44 S PSJHLP(3)="using ""-"" or "","" as delimiters."
45 S PSJHLP(4)="Choose from: "
46 S PSJHLP(4,"F")="!!"
47 S PSJHLP(5)="1 - All Medications"
48 S PSJHLP(5,"F")="!?13"
49 S PSJHLP(6)="2 - Non-IV Medications only"
50 S PSJHLP(6,"F")="!?13"
51 S PSJHLP(7)="3 - IV Piggybacks"
52 S PSJHLP(7,"F")="!?13"
53 S PSJHLP(8)="4 - LVPs"
54 S PSJHLP(8,"F")="!?13"
55 S PSJHLP(9)="5 - TPNs"
56 S PSJHLP(9,"F")="!?13"
57 S PSJHLP(10)="6 - Chemotherapy Medications (IV)"
58 S PSJHLP(10,"F")="!?13"
59 D WRITE
60 Q
61 ;
62ENSTH ;Executable help for type of schedule. (Replaces ENSTH^PSJSV0)
63 N PSJX S PSJX=1
64 S PSJHLP(PSJX)="The TYPE OF SCHEDULE determines how the schedule will be processed."
65 S PSJHLP(PSJX,"F")="!!?2",PSJX=PSJX+1
66 S PSJHLP(PSJX)="A CONTINUOUS schedule is one in which an action is to take place on a"
67 S PSJHLP(PSJX,"F")="!!?2",PSJX=PSJX+1
68 S PSJHLP(PSJX)="regular basis, such as 'three times a day' or 'once every two days'."
69 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
70 S PSJHLP(PSJX)="A DAY OF THE WEEK schedule is one in which the action is to take"
71 S PSJHLP(PSJX,"F")="!?2",PSJX=PSJX+1
72 S PSJHLP(PSJX)="place only on specific days of the week. This type of schedule"
73 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
74 S PSJHLP(PSJX)="should have admin times entered with it. If not, the start time of"
75 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
76 S PSJHLP(PSJX)="the order is used as the admin time. Whenever this type is chosen,"
77 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
78 S PSJHLP(PSJX)="the name of the schedule must be in the form of 'MO-WE-FR'."
79 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
80 G:$S('$D(PSJPP):1,PSJPP="":1,1:PSJPP="PSJ") HOT
81 S PSJHLP(PSJX)="A DAY OF THE WEEK-RANGE schedule is one in which the action to take"
82 S PSJHLP(PSJX,"F")="!?2",PSJX=PSJX+1
83 S PSJHLP(PSJX)="place only on specific days of the week, but at no specific time of"
84 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
85 S PSJHLP(PSJX)="day (no admin times). Whenever this type is chosen, the name of the"
86 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
87 S PSJHLP(PSJX)="schedule must be in the form of 'MO-WE-FR'."
88 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
89HOT S PSJHLP(PSJX)="A ONE-TIME schedule is one in which the action is to take place once"
90 S PSJHLP(PSJX,"F")="!?2",PSJX=PSJX+1
91 S PSJHLP(PSJX)="only at a specific date and time."
92 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
93 I $S('$D(PSJPP):1,PSJPP="":1,1:PSJPP="PSJ") D WRITE Q
94 S PSJHLP(PSJX)="A RANGE schedule is one in which the action will take place within a"
95 S PSJHLP(PSJX,"F")="!?2",PSJX=PSJX+1
96 S PSJHLP(PSJX)="given date range."
97 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
98 S PSJHLP(PSJX)="A SHIFT schedule is one in which the action will take place within a"
99 S PSJHLP(PSJX,"F")="!?2",PSJX=PSJX+1
100 S PSJHLP(PSJX)="given range of times of day."
101 S PSJHLP(PSJX,"F")="!",PSJX=PSJX+1
102 D WRITE
103 Q
104WRITE ;Calls EN^DDIOL to write text
105 D EN^DDIOL(.PSJHLP) K PSJHLP
106 Q
1071 ;;All Medications
1082 ;;Non-IV Medications only
1093 ;;IV Piggybacks
1104 ;;LVPs
1115 ;;TPNs
1126 ;;Chemotherapy Medications (IV)
Note: See TracBrowser for help on using the repository browser.