970 likes | 999 Views
MUSE 2016 Report Designer Rules and Functions. Presented by: Joe Cocuzzo Sr Vice President Report Writing Services. Topics. Rule Dictionary Overview of sections How to navigate Example EDM Reports to Demonstrate the Following: Sorting on a field from another record
E N D
MUSE 2016Report DesignerRules and Functions Presented by: Joe Cocuzzo Sr Vice President Report Writing Services
Topics • Rule Dictionary • Overview of sections • How to navigate • Example EDM Reports to Demonstrate the Following: • Sorting on a field from another record • Creating basic statistics/counts • How to prompt for Show/Hide detail • Subscripting • Building a horizontal list of selection criteria • Looping EDM activity • Building lists • Using functions to format dates and calculate elapsed time • Converting times to HH:MM • Calculating averages
Rule Dictionary Main Copy From provides a lookup of rule dictionary Name will default to mnemonic, but can be edited Keywords can be assigned and used to search for rules Bottom section will be populated with names of reports the rule is used in
Rule Editor Main • Variables: • Free text • Internal Variables - Only available for the duration that the rule runs. • e_Variables (External Variables – Are available outside the scope of the rule (eg. can access from other rules, place on report picture, etc. V0 is automatically in the list, and mapped to the main record OID
Rule Editor Fields For looping a record within the rule Fields to be used in the rule For pulling query responses
Rule Editor Rule • Start with a blank slate, build rule here • The Rule consists of multiple lines of programming commands that are executed in order Can save rules as Final or Draft. The first time it is saved, it must be a Final version.
Rule Editor Rule • 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 Editor Rule • Undo – backs you up one action (or one box, from right to left) • Back Space – wipes out the last value • Cancel Line – cancels the current line you are working on, but prompts first to make sure • End Line – completes line
Rule Editor Rule • 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 Editor Rule • 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/Insert/Join 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 Editor Rule • Message • Create pop up message boxes that need to be acknowledged before user can move on
Rule Editor Rule • 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 Editor Rule • Do/If/Then • Create Do Loops to loop a record • Allows you to create If/Then/Else logic • Can execute multiple statements (commands) for each condition • Can have nested statements • Need to End an If or Do statement If Statement Format: If Condition Exists Then Execute This Statement Else If Second Condition Exists Then Execute This Statement End If
Arrivals By Chief Complaint Sorting on a Field from Another Record
Arrivals By Chief Complaint Sorting on a Field from Another Record The main fields we wish to display are in RegAcct, so that is our Main Detail Record
Arrivals By Chief Complaint Sorting on a Field from Another Record When we try to sort on Chief Complaint, we cannot find it because it is in EdmAcct, and only RegAcct fields are available
Arrivals By Chief Complaint Sorting on a Field from Another Record
Arrivals By Chief Complaint Sorting on a Field from Another Record
Arrivals By Chief Complaint Sorting on a Field from Another Record EDM Complaint Dictionary The mnemonic will be stored for each account For our report, we want to pull the Name from the Complaint Dictionary
Arrivals By Chief Complaint Sorting on a Field from Another Record
Arrivals By Chief Complaint Sorting on a Field from Another Record EdmAcct.ChiefComplaint(EdmAcct.OID) = ED.EARACHE EdmComplaint.Name(ED.EARACHE) = Earache
Demo of EE Rule IsRwMuseRuleDemo -- Shell report in Reg Add computed sort field (Advanced Mode) c_some_field Add rule Add variables to rule Add EDM 2 fields to rule fields tab Write Lines of Logic in Rule Editor
Statistics Report Detail/Summary Report First we need basic fields to get report started
Statistics Report Detail/Summary Report Build rule on entry of Detail section to collect stats and get ER discharge disposition
Statistics Report Detail/Summary Report
Statistics Report Detail/Summary Report
Statistics Report Detail/Summary Report
Statistics Report Detail/Summary Report
Statistics Report Detail/Summary Report Now that e_Variables are created, we can add them to the list:
Statistics Report Detail/Summary Report Setup Report Picture Add a Print Condition - Show Rows, Click on Row, and Edit
Statistics Report Detail/Summary Report Setup Report Picture Add a Print Condition - Show Rows, Click on Row, and Edit
Statistics Report Detail/Summary Report
Statistics Report Detail/Summary Report Now we can add the e_Variable to the Selects: Must be identified as External Variable
Statistics Report Detail/Summary Report
Provider Report Select By Multiple Providers Prompt for physician and select when either ED or PCP List of selection criteria Disposition for ED account
Provider Report Select By Multiple Providers Need to prompt for physician and check two fields (ED and PCP provider fields) • We cannot add prompts for ED and PCP providers to select screen and tell it to select the record if either or both match • We need to prompt for the physicians, and have it ignore that list of selection criteria while we perform our logic
Provider Report Select By Multiple Providers
Provider Report Select By Multiple Providers For Physicians prompt Select prompt
Provider Report Select By Multiple Providers Rule on Physician Prompt
Provider Report Select By Multiple Providers • Physicians entered by user will be stored in a list. • Offset allows us to pull values out of a list. • Offset 0 is the first value, offset 1 is the second value, etc. • By setting the program result to the first value entered, this expression will always be true • --- NOTE, can use Ignore List operator 6.07+ release
Provider Report Select By Multiple Providers Rule on second field, c_Select, to select the record only if one of the physicians matches the list:
Provider Report Select By Multiple Providers
Provider Report Select By Multiple Providers Loop through the physicians the user entered using offset, and determine if they are equal to either the ED or PCP e_Physician Offset 0 = DBORG e_Physician Offset 1 = AAROUNI e_Physician Offset 2 = ABERG etc.
Provider Report Select By Multiple Providers Determining Disposition for the ED portion of the visit:
Provider Report Select By Multiple Providers
Provider Report Select By Multiple Providers Mnemonic of Discharge Disposition will be stored for account, we want to pull Name for our report Subscript A patient can have multiple discharge dispositions, so there are two subscripts Subscript
Provider Report Select By Multiple Providers
Provider Report Select By Multiple Providers • ER populates the TYPE variable and becomes the subscript for which discharge disposition we want from the account • The patient’s discharge disposition for ER then populates variable DISP • DISP is a mnemonic, so we then use it as a subscript to get the full name
Provider Report Select By Multiple Providers Getting a horizontal list of physician names that were selected:
Provider Report Select By Multiple Providers