Notes
Slide Show
Outline
1
Facilitate, Integrate, Validate, Communicate
  • Designing Forms that Streamline and Improve Care


  • Michael Thompson, MD


  • Logical Innovations, LLC
2
Advanced Development Concepts
  • Data validation
  • Providing decision support
  • Working with clinical lists
  • Customizing chart note translation
  • Integrating multiple forms
    • Improving user interface
    • SOAP note translation
  • Sharing functions between forms
  • A picture is worth a thousand words…
  • A few words about sharing
  • Reference – Shortcuts / MEL
3
Implementing Data Validation
  • Enforce a valid range for numeric data entry
  • Available through Advanced Options tab
  • Provide a warning or prevent invalid data entry
  • Applies to all efforts to enter data in the update (not just within the form)
4
Providing User Feedback
  • There are many ways to provide feedback
  • Watcher expressions provide automatic feedback
  • Buttons trigger evaluation of data at the users request
  • Common methods of displaying feedback are through data display items or message boxes
5
Data Display
  • Do not require user to respond
  • Can be more easily missed or ignored
  • Using a different font or text color can make them more visible
6
Message Boxes
  • Require user response
  • ? User is more likely to pay attention
  • Annoying if they appear too frequently
  • Use for more “serious” warnings
7
Modifying Clinical Lists
  • Add problems, medications or orders
  • Facilitate commonly performed operations
  • Choose changes that are related to the form (e.g. diabetes medications or orders from a diabetes form)
  • Can be triggered from buttons or functions
  • Can also add assessments for problems
8
Using Buttons to
Edit Clinical Lists
  • RUNPROCESS buttons can automatically add common medications, problems or orders to the clinical lists


9
Add Medication
  • Enter information to create a MEL expression
  • Fields can be linked to other items in the form
  • Medication names / DDID numbers pulled from database
10
Add Problem
  • Enter information to create a MEL expression
  • Fields can be linked to other items in the form
  • Problems / codes pulled from the database
11
Add Order
  • Enter information to create a MEL expression
  • Fields can be linked to other items in the form
  • Orders / Diagnoses pulled from the database
12
Adding Problem Assessment
  • Allows a way to track changes in a problem over time
  • Can include a comment
  • Must correctly identify an existing problem in patient’s problem list based on:
    • Problem type
    • Problem description
    • Problem code
13
Customizing Form Translation
  • Changing the item translation
  • Narrative translation with suppression blocks
  • Conditionally suppressing translation of items
14
Customizing translation – cmft( )
  • By default all items on their own line
  • Creates a list rather than a readable note
  • Modify the cfmt( ) expression to eliminate the newline character in each item
  • Can also add period / spacing after items using posttext parameter
  • cfmt(expression, format[, pretext][, pretext format]
  • [, posttext][, posttext format])
15
Customizing translation – cmft( )
An Example
  • Change the default translation:


  • {CFMT(OBSANY("HEIGHT"), "", "Height (inches):  ", "B", "
  • ")}


  • To the custom translation:


  • {CFMT(OBSANY("HEIGHT"), "", "Ht: ", "B", " in  ")}
16
Suppression Blocks – Part 1
  • Suppression blocks suppress the translation for all items if no data is entered in the block of items
  • This can be used to place a label at the beginning of a group and a newline at the end
    • Display multiple items on a single line
    • Create paragraph formatting
17
Suppression Blocks – Part 1
An Example
  • Create a suppression block for the group of vital signs items
  • Change the translation for the last item in the vital signs as follows:


  • {CFMT(OBSNOW("BP DIASTOLIC"), "", "/", "B", "") + "
  • "}


  • The new chart translation will be:


  • Vital Signs
  • Ht: 70 in  Wt: 148 lbs  BMI: 21.31  T: 98 F  R: 16  P: 88  BP: 124/76


  • And the next item will always be on the following line…
18
Suppression Blocks – Part 2
  • Some items (e.g. default previous or data displays) may trigger a suppression block to display even if changes are not made.
  • This behavior can be changed in the advanced options page – Item Generated Condition
19
Suppression Blocks – Part 3
  • At other times you may want to suppress a group of items based on an external condition
  • Use any conditional statement
  • This configuration is done in the item which is the beginning of the suppression block
  • The following example suppresses a group of physical exam items in an asthma form if the general physical exam form is loaded (to avoid duplication)
20
Integrating Multiple Forms
  • Dynamically add generic and problem based forms to visit
  • Facilitate navigation between forms
  • Create an integrated translation (based on SOAP note format)
21
Adding Forms to the Update
  • Use a listbox to display available forms
  • Could be dynamic to offer different forms based on age, gender, problem list, etc…
  • A button launches the selected forms
22
Navigating Between Forms
  • Use a dynamic dropdown to select from a list of forms
  • A button then opens the selected form
23
Integrated Translation
  • Configure forms as containers / servers in Visual Form Editor
  • A container, if present, will display chart translation for all servers
  • Servers will display translation if no container, but will allow container to display if available
24
Integrated Translation
  • Multiple forms loaded
  • However, all information displayed by Vital Signs form
25
Function Libraries
  • Function toolbar allows quick integration of standard MEL functions or functions from user defined libraries
  • User defined libraries decrease form size and allow changes to functions in a single place
  • Library functions added through a text component and included in clinical kit
26
Function Libraries
  • Syntax coloring of MEL expressions
  • Comment allows for explanation / reference
  • F1 key will open data symbols help if cursor is on a standard MEL function
27
Data Symbols Reference
28
A Picture is Worth a Thousand Words…
  • What would you like to see?
29
A Word On Sharing…
  • Sharing resources
    • Logician User Group Interactive site
      • http://www.logicianusers.com/lug
    • Logician User Group bulletin board
      • http://www.logicianusers.com/boards
    • ? KnowledgeBank
      • http://knowledge.medicalogic.com


  • Advantages to sharing forms
    • Receive feedback from others that use them
    • Allows more users / patients to benefit from your efforts
    • (If I’m going to spend a day on building a form why should only 3 people be using it…)
30
Reference - Shortcuts
  • Using the shift key when moving an item will force it to be placed to the right of the item the anchor is over
  • Up and down arrows move through items on the page
  • Ctrl + Up arrow moves to the group an item is contained in (row, section, visibility region)
31
Shortcuts (Continued)
  • Pressing F1 when the cursor is on a Standard MEL (e.g. str( ) will bring up an explanation of that function)
  • “Opposing list boxes” prevent user from selecting same option for positive/negative
  • Aligning items through the Tools pulldown
  • All items on a line can also be made the same size
32
Reference
MEL Made Simple
  • Very basic programming language
  • Variables
  • Operators
  • Boolean expressions
  • Conditional statements
  • Commenting
  • Functions
  • MEL “watcher” expressions
33
Variables
  • Observation Terms – Stored in database permanently
  • DOCUMENT variables – Stored in database until update is signed
  • Local
    • For use in a single function / expression
    • Preferable to global in most cases
  • Global
    • Can be used to store information for sharing
    • Default type for all variables
    • Not stored when user leaves an update
34
Operators (Calculation)
  • ^ Exponential
  • * Multiply
  • / Divide
  • + Add (or concatenate for strings)
  • - Subtract
  • = Assignment operator
35
Operators (Comparison)
  • Evaluate to TRUE or FALSE
  • == Equality
  • <> Not equal
  • < Less than
  • <= Less than or equal
  • > Greater than
  • >= Greater than or equal
36
Boolean Expressions
  • Used to control flow:


  • AND Evaluates to true only if both sides are true
  • OR Evaluates to true if either side is true
  • NOT Reverses result of expression
  • ( ) Specify evaluation order


37
Controlling Flow (IF)
  • IF (condition) THEN (execute)
  • ELSE (execute) ENDIF
  • TRUE/FALSE statement after IF determines what statement to execute
  • If TRUE, statements after THEN will be executed
  • If FALSE, statements after ELSE are executed (ELSE statement optional)
  • ENDIF must be present
38
Controlling Flow (WHILE)
  • WHILE (condition) DO
  • (execute)
  • ENDWHILE


  • Loop to repeat an action multiple times
  • Condition should eventually evaluate to FALSE or loop may never end (see below)
  • BREAK will stop execution
  • CONTINUE will immediately start next iteration
39
Controlling Flow (FOR)
  • FOR (execute), (condition), (expression) DO
  • (execute)
  • ENDFOR


  • Similar to WHILE, but has 2 additional statements to execute
  • First expression executed prior to starting
  • Second expression is executed at end of each loop
  • BREAK and CONTINUE as with WHILE


40
Controlling Flow (COND)
  • COND
  • CASE (condition)
  • (execute)
  • CASE (condition)
  • (execute)
  • …
  • ENDCOND


  • Starts series of conditional “cases”
  • Similar to IF, but used where there are more than two possible cases


41
Comments
  • /* Begin Comment
  • */ End Comment
  • // Comment until the end of the line
  • Important to enhance “readability” of complex expressions
  • Allows other developers to understand the thought process
  • Can also help when going back to look at code in the future
  • “Nesting” of statements can also be used to enhance readability and prevent missed syntax
42
Standard MEL Functions
  • There is a library of standard MEL functions
  • Definitions can be found in the Data Symbols help file (included with CPO EMR 5.6)
  • This can also be downloaded as a .pdf document from the web at:
    • http://support.medicalogic.com/logician/55/documentation.html
43
Putting it all together
  • Functions – Used to string together multiple statements for execution
    • fn FunctionName(parameter list)
    • {
    • (execute)
    • }
  • MEL expressions
    • Enclosed by braces { }
    • Triggered by changes in the variables / terms in the expression
    • ! Will trigger an expression when the form is loaded
  • There is no “right” way to structure functions (if it works, it works…)
44
Example Function
  • /* Calculates Body Mass Index based on observation terms Weight and Height. Will use previous values from Height, but must have new value for Weight. Returns empty string ("") if valid height and weight do not exist. */


  • fn fnCalcBMI( )
  • {
  • IF (OBSNOW("WEIGHT") == "" OR OBSANY("HEIGHT") == "" OR OBSANY("HEIGHT") <= 0) THEN
  • return ""
  • ENDIF


  • return (OBSNOW("WEIGHT") / 2.2) / ((OBSANY("HEIGHT")  / 39.4) ^2)
  • }
45
Example MEL expression
  • {
  • !OBSNOW(“BMI”, fnCalcBMI())
  • OBSNOW(“HEIGHT”)
  • OBSNOW(“WEIGHT”)
  • }
  • ! Causes expression to be evaluated when form loads
  • OBSNOW(“HEIGHT”) and OBSNOW(“WEIGHT”) trigger evaluation when height or weight values change
46
Avoiding MEL Pitfalls
  • Make sure that all conditional statements are terminated (ENDIF, ENDFOR, …)
  • Make sure that all braces, parentheses and quotations are opened and closed
  • Check for invalid variables before using (e.g. Make sure a number is not 0 before dividing)
47
Troubleshooting MEL
  • Error messages returned are often ambiguous and may not indicate the location of the error
  • A MEL trace will store all statements executed in the file TRACEMEL.TXT which is stored in the root directory (C:\)
  • Press Ctrl+Alt+M to start/stop tracing
  • Search for ERROR to find the problem
  • This will (usually) occur directly after the statement that caused the problem
  • Delete the trace file periodically (or it will be huge)