1.22k likes | 1.23k Views
MUSE 2016 Rules for PCS and OM in 6.x. Presented by: Joe Cocuzzo Sr. Vice President Report Writing Services. Session Overview. Rule Dictionary Overview of sections How to navigate Order Management Order Rules Print Rules Adding a rule to a query on an order Patient Care System
E N D
MUSE 2016Rules for PCS and OM in 6.x Presented by: Joe Cocuzzo Sr. Vice President Report Writing Services
Session Overview • Rule Dictionary • Overview of sections • How to navigate • Order Management • Order Rules • Print Rules • Adding a rule to a query on an order • Patient Care System • Require Rules • Message Rules • Calculate Rules • Suppress Rules • Skip Rules
Rule Dictionary Path to the Rule Dictionary: Info Systems, MIS, Dictionaries, Administrative, Rule (M-AT), Rule
Rule Dictionary Main Copy From provides a lookup of rule dictionary Select New to create. Switch to Edit mode after first file. Categories: Determines the data fields that are available to use in your rule
Flowsheet Rule Caching https://customer.meditech.com/en/d/prwpcs/pages/pcs6basnilrespifyesmsg.htm
Rule Dictionary Variables • Variables to be used in the rule: • External variables are available outside the scope of the rule • Description – Free Text, not required • NewQueryResponse defaults in, used in OM rISules(eg. if you need to check user response to invoke logic) • Fields: • Available fields depends on Category selected on Main screen
Rule Dictionary Variables Examples of field lookup One thing to note: If you select fields and then try to go back and change your rule Category, you will not be able to until you remove the fields from the Field section
M/AT Design ?features? Design philosophy vs usability Descriptions rather than mnemonics shown on lookups and screens. Input may appear to be possible, but blocked with no reason shown.
Rule Dictionary Rule Editor • Start with a blank slate, build rule here • The Rule consists of multiple lines of programming commands that are executed in order
Rule Dictionary Rule Editor • Use Enter Line to start each new line • As you select from one box, the next one pops up to the right with the next set of choices • As you continue selecting items, the rule built so far shows up in the current value box
Rule Dictionary Rule Editor • Undo – backs you up one menu (one box, from right to left) • Back Space – wipes out the last value (example above would remove “DAY” variable) • Cancel Line – cancels the current line you are working on, but prompts first to make sure • End Line – completes line
Rule Dictionary Rule Editor • If you need to edit, insert or remove a line, first select the line by clicking in Line number section • Insert will allow you to enter a line above the current one • Edit will allow you to change the current line • Remove will delete the whole line • To continue on, use Enter Line and you will create the next line in the rule • Move Up and Down are helpful when you enter a line, and then realize you should have inserted it earlier. They allow you to move full lines of code up or down the list.
Rule Dictionary Rule Editor • Expression • Compute allows you to create calculations and assign variables • Set Program Result establishes the end result of the rule. You might set a program result equal to a value stored in a variable, or simply Ok or NotOk to indicate certain things • Create List allows you to make a list of values into a list. Values can be variables, fields, free text, etc. The list can be used for various things, including passing arguments to a built-in function
Rule Dictionary Rule Editor • Message/Dialog Box • Create pop up message boxes that need to be acknowledged before user can move on • Create message boxes that require a Yes or No response. • Create message boxes that offer a multiple choice response • The last two require an additional query to store the response
Rule Dictionary Rule Editor • String Manipulation • Format allows you to convert a value to a different format (eg. convert from internal date to external date format) • Extract allows you to pull out a certain portion of a string (for example, pulling the first two characters from a time field to get the hour) • Join allows you to concatenate values into one value • Locate allows you to find a specific value in a string • Length returns the number of characters in a field
Rule Dictionary Rule Editor • If/Then • Allows you to create If/Then/Else logic • Can have as many Else If conditions as needed • Can execute multiple statements (commands) for each condition • Need to End the If statement If Statement Format: If Condition Exists Then Execute This Statement Else If Second Condition Exists Then Execute This Statement End If
Rule Dictionary Rule Editor • Notes • Can create notes about the rule • Notes do not get carried over to a new rule if this one is copied
Order Rule Cannot Order on Weekends Rule to prevent ordering on weekends
Order Rule Cannot Order on Weekends Setup variables and fields: Returns: Mon, Tue, Wed, etc.
Order Rule Cannot Order on Weekends Create the message to display Evaluate the day of week and set variable to Ok or NotOk Create a list containing the two variables {RESULT,MSG} Set program result
What Order Rule Should Return LIST of two items in one variable: {RESULT,MSG} looks like queued string RESULT = OK, allow entry/filing RESULT = NotOk, reject entry/filing MSG = message to display
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends
Order Rule Cannot Order on Weekends Create the message to display Evaluate the day of week and set variable to Ok or NotOk Create a list containing the two variables {RESULT,MSG} Set program result
Order Rule Cannot Order on Weekends Add Rule to Associations Tab of Order Dictionary Scroll down to:
Order Rule Cannot Order on Weekends Message when we try to order on weekend:
Service Date to DOW Can it be done?? https://customer.meditech.com/en/d/prwrd/pages/rd6basmatrulefunctions.htm
Guess Not! Same Hospital (6.07) Report Rules have more format options than “Regular” rules
Yes it can - IF{A?8N^D D$4^Y,D%3$2^M,D%5^D, IF{Y<1900!(Y=1900&(M*1<3)) D+1^D}, IF{M<03 Y-1801;Y-1800}^Y, Y\4*365+(Y/4*1461)+(M+9\12^M\5\2*31)+(M\5/2*61)+(M/5*153)+D-1-2\7+1};
Order Rule Only order for women and children Restrict ordering by age and sex
Order Rule Only order for women and children Setup three variables This time add patient age and sex fields
Order Rule Only order for women and children
Order Rule Only order for women and children When evaluating Sex, it is type “Choice”, not “Free Text”
Order Rule Only order for women and children Order Dictionary, Associations Section:
Order Rule Only order for women and children
Order Rule Message based on response Query for Same Day Consult (Y/N) – if Y and Day is Sunday, pop up a message to call Community Dietician.
Order Rule Message based on response Use the NewQueryResponse variable to evaluate what the user just entered
Order Rule Message based on response • Two message types: • FYI • Critical