Presentation is loading. Please wait.

Presentation is loading. Please wait.

Custom Forms Development Tips and Tricks PRESENTED BY.

Similar presentations


Presentation on theme: "Custom Forms Development Tips and Tricks PRESENTED BY."— Presentation transcript:

1 Custom Forms Development Tips and Tricks PRESENTED BY

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.

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

4 Presenters Mike Baeske, Software Applications Specialist – Team Leader, Ortho NorthEast Tom Pawlik, Supervisor, Surgical Services / EMR Workflow & Design Specialist, Ortho NorthEast

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

6 Visibility Regions Shows objects based on conditions being met:

7 Visibility Regions

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

9 Visibility Sections Similarly to visibility regions, sections can be configured to have visibility conditions

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.

11

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

13 Enabling Controls Controls can be enabled / disabled based on conditions to enforce mandatory data entry:

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

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

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

17 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

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}

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:

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:

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.)

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

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

24 Local Variable Example { fn returnMiddleInitial(){ local result if (PATIENT.MIDDLENAME<>"") then result = sub(PATIENT.MIDDLENAME,1,1) else result = "" endif return result }}

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

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", ",", "")

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<=size(bodyPartsArray) do results=results+bodyPartsArray[counterX] counterX=counterX+1 endwhile for counterX=1, counterX<=size(bodyPartsArray), counterX=counterX+1 do results=results+bodyPartsArray[counterX] endfor

28 Functions Functions are reusable segments of coding They are declared with fn and always have parentheses after the name Example: {fn lastInitial(){ sub(PATIENT.LASTNAME,1,1) }} A function will automatically return the last value in it or the “return” keyword can force a value out

29 Functions Values can be passed into a function via arguments between the parenthesis: Using arguments provides reusability of functions. Altering an array that was passed in as an argument will modify the array outside of the function. {fn thirdpersonposs(SEX){ local pronoun If SEX == "Female" then pronoun = "her" else pronoun = "his" endif return pronoun}}

30 Functions Variable arguments can be retrieved with the getnargs and getarg functions Functions are shared between forms and handouts, which can cause issues if different functions have the same name The version of the function that was last loaded into the document will override the previous versions

31 Variable Arguments Example: { fn concatText(){ local numberOfParameters, result result="" numberOfParameters=getnargs() if (numberOfParameters>0) then local index for index=1, index<=numberOfParameters, index=index+1 do if (getarg(index)<>"") then result=result+getarg(index) else endif endfor else endif return result }

32 Dynamic Lists List and dropdown boxes can be populated with information based on embedded coding or functions Allows filtering and formatting beyond traditional GE functions

33 Observations Observations provide structured data that can be pulled from previous documents into new ones OBSNOW() will retrieve the current value if using only one argument and write to the observation with two arguments Example: OBSNOW("WEIGHT") returns the new weight value OBSNOW("WEIGHT","150") makes the current value of weight 150 To erase a new observation from the document, do not use OBSNOW("WEIGHT",""), a document object with no value can clear it OBSNOW("WEIGHT",DOCUMENT.BLANK) Note: calling OBSNOW will trigger all other OBSNOWs to reevaluate and can impact performance

34 Observations LAST_SIGNED_OBS_VALUE can retrieve previous signed observation values LASTOBSVALUE can retrieve past or current observations Previous values cannot be deleted with MEL coding, but using a predefined value like "EMPTY OBSERVATION" could help ignore unwanted data LIST_OBS can pull every value saved to an observation term LASTOBSVALUEBYUSER and LASTOBSVALUEBYLOC could potentially be useful, depending on an organization's workflow

35 Observations When selecting observations to use, inquiries can determine if an obsterm is already being used: New observations can be requested from GE

36 Pop Up Messages There are two functions that can generate pop up messages userok() and useryesno() Userok() will display a message only, while useryesno() can retrieve a response

37 Automatic Flags MEL_SEND_FLAG() used to send automatic flag (Not present in older versions of EMR / CPS) Requires recipient’s login name Example: MEL_SEND_FLAG("Flag",, 'Normal', str(._todaysdate),,,'Update','')

38 Eval Statements The Eval function can be used to convert text into MEL coding Can be useful when needing to go through multiple DOCUMENT objects that follow the same naming convention. DOCUMENT objects must be configured to be shared between forms:

39 Eval Example { fn nextOrderLine(componentName,numberOfBoxes){ //determines which edit box is free with the format of DOCUMENT. number local result =0 local foundBox=0 for counter=1,counter<=val(numberOfBoxes) and foundBox==0,counter=counter+1 do if (eval('DOCUMENT.'+componentName+str(counter))=="") then result=counter foundBox=1 else endif endfor if (result==0) then result="" else endif return result }

40 Family Health History Entry To meet Meaningful Use Stage 2 CQR reporting, the family history needs to be saved with SNOMED codes using the MEL_ADD_FHX function Example: MEL_ADD_FHX("Stroke","1","275104002") //(1=Mother) MEL_RELATIVES_FHX will show the relationship numbers MEL_LIST_FHX_AFTER displays which family histories are already entered

41 Referencing External Objects RunShellOpen() function can be used to open web pages, server files, or launch applications When launching an application, the second argument passes values to the application, but uses spaces as delimiter replacestr(messageBody," ","_") is one way to compensate, if application switches spaces back Examples: RUNSHELLOPEN("http://home/filename") RUNSHELLOPEN("TriageSchedPref.vbs","1","\\\server\one\VBScripts")

42 QUESTIONS ? Mike Baeske mbaeske@orthone.com Tom Pawlik tpawlik@orthone.com


Download ppt "Custom Forms Development Tips and Tricks PRESENTED BY."

Similar presentations


Ads by Google