Custom Forms Development Tips and Tricks PRESENTED BY

Embed Size (px)

Citation preview

  • Slide 1
  • Custom Forms Development Tips and Tricks PRESENTED BY
  • Slide 2
  • The content of this presentation represents the views of the author and presenters. GE, the GE Monogram, Centricity and Imagination at Work are trademarks of General Electric Company.
  • Slide 3
  • Ortho NorthEast An Orthopedic practice founded in 1962 12 locations throughout northeast Indiana 26 physicians, 7 anesthesiologists, 13 CRNAs, 24 mid-levels, 14 PT/OT Part ownership of orthopedic hospital, MRI center, and ambulatory surgery center
  • Slide 4
  • Presenters Mike Baeske, Software Applications Specialist Team Leader, Ortho NorthEast Tom Pawlik, Supervisor, Surgical Services / EMR Workflow & Design Specialist, Ortho NorthEast
  • Slide 5
  • The Two Key Elements of Building Advanced Forms CONFIGURING THE FORM LAYOUT Controls the flow of the workflow Provides the ability to make mandatory questions Capable of enforcing data integrity DEVELOPING MEL CODING Automated events can be triggered based on data Can enable action buttons to perform multiple tasks Provides filtering, formatting, and other more sophisticated functionalities
  • Slide 6
  • Visibility Regions Shows objects based on conditions being met:
  • Slide 7
  • Visibility Regions
  • Slide 8
  • Conditions Conditions are evaluation statements that return a Boolean value of true or false (Examples: x>1, y 3, etc) For multiple conditions, the keywords and and or can be used in conjunction with parenthesis Example: (x>=1 and x 0
  • Slide 9
  • Visibility Sections Similarly to visibility regions, sections can be configured to have visibility conditions
  • Slide 10
  • Overlapping Visibility Areas Visibility areas can be placed on top of other visibility areas Conditions should be mutually exclusive; otherwise, objects can overlap and behave unintendedly Visibility sections can contain other visibility sections or regions, but visibility regions cannot contain visibility section.
  • Slide 11
  • Slide 12
  • Opposing Lists If two listboxes have the same values, it is possible to configure them as opposing lists. Opposing list will automatically unselect an answer if they get selected on the other listbox
  • Slide 13
  • Enabling Controls Controls can be enabled / disabled based on conditions to enforce mandatory data entry:
  • Slide 14
  • Enforcing Data Rules Configuring Data Masks will enforce certain formatting rules when users fill in the object: MEL coding can potentially enforce more specific rules with the help of visibility regions and enabling components
  • Slide 15
  • Page Close Handlers MEL coding can be triggered when a user tries to navigate away from a page via page close handlers In CPS, will not catch when a user goes to end an update. Must enable page close handlers in Visual Form Editor Options
  • Slide 16
  • Control Structures: If Statement If statements test to see if a condition is true or false and execute the corresponding coding when appropriate if (modifier "") then modifier = modifier + "|NC" else modifier = "NC" endif
  • Slide 17 0 "Left " case match(modifiers,"RT")>0 "Right " case match(modifiers,"50")>0 "Bilat " else "" endcond">
  • Control Structures: Case Statement Case statements provide a concise way to accommodate to coding situations where only one action should be taken, but there are more than two possible scenarios to handle cond case match(modifiers,"LT")>0 "Left " case match(modifiers,"RT")>0 "Right " case match(modifiers,"50")>0 "Bilat " else "" endcond
  • Slide 18
  • Watcher Statements Automated events can be triggered by watcher statements, which are control structures with an ! in front of it. Objects in the condition statement will trigger an evaluation every time the object is touched Example: {! if (DOCUMENT.DATE_ON_ORDER == "") then DOCUMENT.DATE_ON_ORDER = sub(str(DOCUMENT.CLINICALDATE),1,10) else "" endif}
  • Slide 19
  • Chart Text Suppression Blocks Chart Text is generated from the translation tab of form controls: Suppression blocks can be configured so that text only shows up when one of the components between the start and end is modified:
  • Slide 20
  • Navigation Buttons Action buttons can be used to insert new forms into the document and open ones already present, saving staff time The Visual Form Editor has a prebuilt connection type: or MEL coding can be used and potentially perform other actions at the same time:
  • Slide 21
  • Variables Data can be stored and referenced in objects called variables Example: X=1 5+X =6 Variables can be pulled into translation, action buttons, and handouts CAUTION: Once a document is put on hold, variables are erased. (Coder Note: Type casting is dynamic, no declaration of type needed.)
  • Slide 22
  • Dynamic Labels Using Variables Labels can dynamically generate when they are associated with a variable and this configuration is set: Watcher statements will normally be used to populate the label variable: ! if (lastobsdate("weight")=="") then weightLabel="Weight:" else weightLabel="Weight("+lastobsdate("weight")+"):" endif
  • Slide 23
  • Variable Scope Two types of variables: Global and Local Global Default scope for variables Shared among all functions, forms, and handouts Local Must be explicitly called in variable declaration Can only be referenced within segment of coding
  • Slide 24 "") then result = sub(PATIENT.MIDDLENAME,1,1) else result = """>
  • Local Variable Example { fn returnMiddleInitial(){ local result if (PATIENT.MIDDLENAME"") then result = sub(PATIENT.MIDDLENAME,1,1) else result = "" endif return result }}
  • Slide 25
  • Arrays Arrays are custom storage that can contain multiple elements An array can be built using the array() function Example: local bodyPartsArray = array("head","shoulder","knee","toe") To retrieve a value in an array, reference the array name with [] surrounding the position that needs to be retrieved (Example: bodyPartsArray[1]="head") An element in an array can be a subarray, so bodyPartsArray[1][1] would retrieve the first element in the first element of the bodyPartsArray
  • Slide 26
  • Converting Text into Arrays The getfield() function can take text and convert it into an array based on a delimiting character The second argument specifies which character denotes a new element should be made The third argument specifies what should be ignored as white space Example: local bodyPartsArray = getfield("head,shoulder,knee,toe", ",", "")
  • Slide 27
  • Loops To process every element in array, there are two forms of loops in MEL: while and for While Loop For Loop while counterX 0) then local index for index=1, index
  • Variable Arguments Example: { fn concatText(){ local numberOfParameters, result result="" numberOfParameters=getnargs() if (numberOfParameters>0) then local index for index=1, index