source: FOIAVistA/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSJSV0.m@ 1754

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1PSSJSV0 ;BIR/CML3,WRT-SCHEDULE VALIDATION CONT. ; 08/21/97 8:26
2 ;;1.0;PHARMACY DATA MANAGEMENT;;9/30/97
3 ;
4ENPSJI ; inquire for Inpatient Meds
5 S PSJPP="PSJ"
6 ;
7ENI ; inquire
8 R !!,"Select STANDARD SCHEDULE: ",X:DTIME W:'$T $C(7) I "^"[X!'$T K X,PSJPP Q
9 I X?1."?" W !!?2,"Enter a standard schedule to view the information pertaining to that schedule."
10 K DIC S DIC("W")="S Z=$P(^(0),""^"",5) W "" "",$S(Z=""O"":""(ONE-TIME)"",Z=""R"":""(RANGE)"",Z=""S"":$P(^(0),""^"",6),$P(^(0),""^"",2)]"""":$P(^(0),""^"",2),$P(^(0),""^"",3):$P(^(0),""^"",3)_"" minutes"",1:"""") K Z"
11 S DIC="^PS(51.1,",DIC(0)="EQSZ",D="AP"_PSJPP D IX^DIC K DIC G:Y'>0 ENI
12 S X=$P(Y(0),"^",5) W !!?2,"Schedule: ",$P(Y(0),"^"),?58,"Type: ",$S("C"[X:"CONTINUOUS",X="D":"DAY OF THE WEEK",X="O":"ONE-TIME",X="S":"SHIFT",X="R":"RANGE",1:X) G:"C"'[X&(X'="S") ENI
13 I "C"[X,$P(Y(0),"^",2)]"" W !?2,"Standard Admin Times: ",$P(Y(0),"^",2) W:$P(Y(0),U,7) !?2,"Max Days for Orders: ",$P(Y(0),U,7)
14 E I "C"[X,$P(Y(0),"^",3) W !?2,"Frequency (in minutes): ",$P(Y(0),"^",3)
15 I X="S",$P(Y(0),"^",5)]"" W !,"Standard Shifts: ",$P(Y(0),"^",5)
16 I $O(^PS(51.1,+Y,PSJPP'="PSJ"+1,0))
17 I F Q=0:0 S Q=$O(^PS(51.1,+Y,PSJPP'="PSJ"+1,Q)) Q:'Q I $D(^(Q,0)) S Z=^(0) W !!?2,"Location: ",$S('$D(^SC(Q,0)):Q_";SC(",$P(^(0),"^")]"":$P(^(0),"^"),1:Q_";SC("),!?2,$S(X="S":"Shift: ",1:"Admin Times: "),$P(Z,"^",X="S"+2)
18 K Q,Y,Z G ENI
19 ;
20ENSVH ; show help
21 I X="?" W !?5,"Enter a schedule for this order."
22 I X?2."?" F Q=1:1:8 W !?3,$P($T(SCHT+Q),";",3) I Q=3,X="??" Q
23 W:X="??" !?3,"..."
24 I R !,"(Press RETURN to continue.) ",Q:DTIME W:'$T $C(7) S:'$T Q="^" Q:Q="^"
25 S DIC="^PS(51.1,",DIC(0)="E",DIC("S")="I $P(^(0),""^"",4)="""_PSJPP_"""",DIC("W")="D DICW^PSSJSV0"
26 D ^DIC K DIC Q
27 ;
28SCHT ;
29 ;; This is the frequency that the action of the order is to take place over
30 ;;the life of the order. The schedule may have various forms, such as 'ONCE',
31 ;;'STAT', 'DAILY', 'Q8H', 'QOD', 'Q5XD', and 'MO-WE-FR@09'.
32 ;; Please note that unexact schedules, such as 'Q4-6H' may not produce the
33 ;;desired results.
34 ;; Also, when entering a schedule involving days of the week, you need not
35 ;;enter the entire name of each day, but you must enter at least the first two
36 ;;letters of each day.
37 ;
38DICW ;
39 ; PSSJEEU CALLS THIS-IT LOOKS AT FILE 51.1
40 S Z=$P(^(0),"^",5),Z=$S(Z="O":-1,Z="S":1,Z="R":-2,1:0) W:Z " ",$S(Z>0:"SHIFT",Z=-2:"RANGE",1:"ONE-TIME") I Z'<0,$D(PSJW),$D(^(PSJPP'="PSJ"+1,PSJW,0)),$P(^(0),"^",Z+2)]"" W " ",$P(^(0),"^",Z+2) Q
41 W " ",$P(^PS(51.1,+Y,0),"^",Z*4+2) Q
42 ;
43ENSTH ; executable help for type of schedule
44 W !!?2,"The TYPE OF SCHEDULE determines how the schedule will be processed."
45 W !!?2,"A CONTINUOUS schedule is one in which an action is to take place on a regular",!,"basis, such as 'three times a day' or 'once every two days'."
46 W !?2,"A DAY OF THE WEEK schedule is one in which the action is to take place only",!,"on specific days of the week. This type of schedule should have admin times",!,"entered with it. If not, the start time of the order is used as the"
47 W " admin",!,"time. Whenever this type is chosen, the name of the schedule must be in the",!,"form of 'MO-WE-FR'." G:$S('$D(PSJPP):1,PSJPP="":1,1:PSJPP="PSJ") HOT
48 W !?2,"A DAY OF THE WEEK-RANGE schedule is one in which the action to take place",!,"only on specific days of the week, but at no specific time of day (no admin",!,"times). Whenever this type is chosen, the name of the schedule must be in "
49 W "the",!,"form of 'MO-WE-FR'."
50HOT W !?2,"A ONE-TIME schedule is one in which the action is to take place once only",!,"at a specific date and time." I $S('$D(PSJPP):1,PSJPP="":1,1:PSJPP="PSJ") Q
51 W !?2,"A RANGE schedule is one in which the action will take place within a given",!,"date range."
52 W !?2,"A SHIFT schedule is one in which the action will take place within a given",!,"range of times of day." Q
Note: See TracBrowser for help on using the repository browser.