38

Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Embed Size (px)

DESCRIPTION

Module 3 Agenda EForm Basics How to work with an EForm, basic structure and so on Item Types Labels, propositions, text fields, diagrams, numeric scales… Scripting Hiding and showing sections and calculating scores Form Memory Don’t forget this part!

Citation preview

Page 1: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…
Page 2: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Module 3: EForm Authoring

Page 3: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Module 3 Agenda

EForm BasicsHow to work with an EForm, basic structure and so on

Item TypesLabels, propositions, text fields, diagrams, numeric scales…

ScriptingHiding and showing sections and calculating scores

Form MemoryDon’t forget this part!

Page 4: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

EForm Basics• What can you do with an EForm?

Preview, complete, edit, share, export, import…

• An EForm has a ref and a title, Both need to be unique within a site but a ref can never

change Different sites can have EForms with the same ref

Used for “overriding” standard forms

• An EForm contains nested sections containing items

Page 5: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Example EForm StructureEForm (ref, title)

Main Section

MySection1

MySection3

MyItem1 (label for example)

MyItem3 (checkbox for example)

MySection2MyItem2 (text box for example)

Page 6: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

The EForm EditorAction menu

Properties pane

Toolbar (adding items, copy and

paste, etc.)

Hidden sections show in grey

Selected item shows in purple

Dynamic rich note preview

Page 7: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Item TourNo/YesNo/Yes/Not Sure

Shows the caption plus yes/no(/not sure) buttons.

CheckboxA simple checkbox. Good for lists of symptoms. Tip: use no/yes type if you need to distinguish “no” from “unchecked”.

Text field, text field (numeric only)Text area

Text responses. Minimize use on tablets as much as possible. “Area” allows multi-line responses.

Menu/Menu Allowing Multiple Selections

Drop-down menu or collection of buttons. Use the “choices” tab to add menu choices.

Label For any read-only text. Good for instructions, consent form text, etc.

Page 8: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Item TourDate Shows a calendar control.

Approximate Date/Approximate Duration

Presents menu of suitable choices. Use a hint to limit range.

Picture Displays an image file. You can upload the image in the editor.

Video Shows a YouTube video. Configure with the YouTube video key.

Page 9: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Create a Simple Pain Tool

You want to ask patients whether they are in any pain.1. Create a new EForm2. Create the form (see example on next screen)3. Try it from the patients portal4. Try it on the tablet5. Review the notes generated in the patients portal

Page 10: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Create a Simple Pain Tool

Choices: No pain

A little painSome painLots of pain

Extreme pain

Page 11: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Finishing the Item Tour

Numeric ScaleCan be used for simple numeric scales, visual/analog scales, Likert scales, etc.More on this next.

Formula

A special item that calculates an expression to generate a number or string. Used for scores, generating hyperlinks in generated notes, etc.

DiagramSpecial kind of section that requires a single picture item and a number of checkboxes that Ocean will overlay on top.

Page 12: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Numeric Scale Example• Example from HAQ questionnaire:

• Looks simple, right?

Page 13: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Numeric Scale Example Explained

The value gets captured in the note.

The point value is the point response and is

returned as the value for intermediate points. The first point determines the

lower bound.

The second choice dictates the step

size

The final point determines the max

point value. Custom labels show up on axis. Leave blank to have no

label.

Page 14: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Formulas• Formula items allow you to calculate a value based

on a script expression• Result gets inserted instead of $$ in caption and

note E.g. Severity Score for @PHQ-9: $$

Severity Score for @PHQ-9: 12• Often hidden from the patient, e.g. PHQ-9 score

We'll talk about the script later

Page 15: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Enhance our Pain ToolAdd a visual analog scale and a pain score

1. Edit your form from the previous exercise

2. Change the “pain today” menu to a numeric scale

3. Add a pain scale at the beginning with 10 points with end labels and a midpoint (5) label

4. Bonus: calculate a formula for pain score with formula being the sum of the pain scales (hint: script should be something like “myScale1.p + myScale2.p”) where myScale is the ref for each item

5. Try it out!

Page 16: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Rendering EnginesOcean Tablet: Renders in an Android app for simple touch screen patient experience

Ocean Online: Includes web questionnaires, “open” function (from EMR link or from patients tab), open studies, intake portal, referral portal, eReferral…

** You should test in both before releasing Old tablet versions may not support newer features Different form factors – lots of text tough to digest on tablet Subtle differences in layout

Page 17: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Note Formatting• If there ever was an art form for a clinician, this is it

Every clinician will have their own preference for highlight colours, grouping, line breaks, punctuation, etc.

• Dynamic rich note preview makes it easy to see notes for different responses

Page 18: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Allows you to present this note in a different order from the layout in a

section

Sets the colour of the note for positive/negative answers

Note Formatting Quick Summary

Generate a custom note for this item instead of the caption (the default)

Overrides the note for affirmative or negative answers (e.g. “Currently

smoking” instead of “Smoking: Yes”

Use keywords to set value, e.g. “@ptFirstName”

Map the patient response to a pre-set field in the EMR

(“EMRField”)

Page 19: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Keywords• Keywords allow you to insert a piece of data from

the patient object (usually from the EMR) into a caption, prepopulate a field, or replaced in generated note

• To see a list of available keywords, simply type @ and the menu will appear in the editor Caption example: “Dear Samantha” for clinic policy Prepopulate field example: First Name: @ptFirstName Note generation example: “She smokes two packs per

day” -> “@ptHeShe smokes two packs per day”• Full reference guide to keywords is in the support

portal

Page 20: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

EMRFields• Links an item to update a field in the EMR• Scenario: you want to ask a patient to confirm

their street address: Use a text area item Prepopulate the field with the keyword @ptAddress1 Set the EMRField to “address”

• Each EMR integration maps the standard EMR fields to the appropriate field in the EMR

Page 21: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Tips for Improving Form Appearance• You can use simple HTML tags in captions to make

parts bold, underlined or italicized E.g. "this <b>word</b> was bold, these <i>two

words</i> are italicized but these <u>last words</u> are underlined."

• Use "labels" for messages (not section captions, which are bolded automatically and can be overwhelming)

• You can set sections to have light grey backgrounds or borders

Page 22: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Further Enhance Pain Tool

Improve the generated note

1. Edit your form from the previous exercise

2. Bold the section headings

3. Change “how would you rate your pain” to “Self Assessed Pain Score:” with value in quotes

4. Show the score in green

5. Add a label at the beginning starting with a salutation with the patients first name (e.g. “Dear Johnny”)

6. Try it out!

Page 23: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Scripting• Scripting is very powerful and ubiquitous in Ocean

Used to show/hide sections, including/omit bits of the note, calculate scores, codify tablet behaviour and more

• Script engine build on JavaScript Tip: curly quotes don’t work in JavaScript (‘ or “ need to be

' ")

• Variables bound to session• ScriptUtil and ScriptPatient provide API

Page 24: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Basics of JavaScript• == means equals*

• != means not equals*

• || means 'or'• && means 'and'• >, >=, <, <= are the comparators that you'd expect• Brackets control order of execution• A period (.) indicates a property of something• Case matters

* Sometimes you will see "===" and "!==". That is generally the same thing. The differences are beyond the scope of this presentation but can be read about here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators

Page 25: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

The Answer Variable• Any item that's been completed by a patient has 2

useful properties, the response ('r') and the point value ('p')

• Example: myPainScale, a numeric scale with point values from 0-5 myPainScale.r Returns the value associated with the

patient's choice (always in standard language, i.e. English) myPainScale.p Returns the point value as a number

Page 26: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Script VariablesVariable Description Example Expressionpt The ScriptPatient object

with age, sex, etc.pt.isMale() && pt.getAge() >= 55

daysSinceLastCompleted The number of day since the patient last complete this form

daysSinceLastCompleted > 365

firstTime Whether or not the patient has ever completed this form

firstTime

lastCompletedTag A string “remembered” by the form last time it was completed

lastCompletedTag.indexOf('myString') != -1

Page 27: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

ScriptUtil FunctionsFunction Description Example Expressionsum, max, min Returns the sum/max/min of

point values in the sectionScriptUtil.sum(section1Ref) > 10

countAnswersMatching, countAnswersWithPointsEqualTo

The number of answers matching the value or point value in the specified section

ScriptUtil.countAnswersMatching(mySection,'other') > 0

percentComplete Returns a number between 0 and 100 representing the number of completed items in a section (including nested sections)

ScriptUtil.percentComplete('nutriSTEPQs') == 100

getKeyword Provides access to any keyword. Used for CPP access and a ‘catch-all’ for access to patient information.

ScriptUtil.getKeyword('@ptClinicDoc') == 'John Smith'

getResponse Provides access to an answer provided on a previous EForm in the same session.

ScriptUtil.getResponse('mySmokingScreenForm','isCurrentSmoker') == 'Y'

Page 28: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

ShowIf and MakeNoteIf• Every item (including sections) can have two

expressions: ShowIf: a boolean expression (i.e. that resolves to true or

false) that controls whether an item or section is shown to the patient Great for showing sections like smoking details if they

indicate that they are currently smoking MakeNoteIf: tells Ocean whether to include the answer

for that item in the generated clinical note Called "Create a note for this item" in editor Useful for fields linked to EMRFields

Page 29: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Show/Hiding in Pain ToolLet's configure our simple pain tool to hide the score formula display1. Edit your Simple Pain Tool2. Hide the formula score calculation using the Show

If Expression3. Add a bold red note "Pain not well controlled" if the

score is greater than 74. Try it!

Page 30: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

EForm Actions• Use case: if a PHQ-9 result indicates suicidal

ideation, automatically present the patient with a suicidal ideation questionnaire to collect additional information

• Mechanism is EForm Actions, which allow you to perform an action based on script expression

• Accessible via the action menu in the editor• Drag-and-drop to reorder actions

Page 31: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

XML Import/Export• XML provides an industry-standard representation

for structured data (i.e. nested data, data with tags, etc.)

• Every EForm in Ocean can be exported (in preview or the editor) and imported from XML (on the EForms tab)

• Not normally needed, but sometimes more efficient than the EForm Editor for repeated actions E.g. find/replace a string; find a particular

item by reference

Page 32: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Export, update, importLet's export our Simple Pain Tool, tweak it and upload it again.

1. Preview or edit your form and get the XML. Hint: in the browser, sometimes you need to click "view source" on the XML to get the raw XML.

2. Paste the text to a text editor. Change the title to "My Simple Pain Tool".

3. Save the file and upload it in the EForm tab.

4. Try it out!

Page 33: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Translating Forms to Other LanguagesScenario: You want your forms to appear in French for a French patient

Solution:• Step 1: Internationalize the form from the EForm tab to "FR"

This will create translation keys for all translatable text and a sample translation with the English text and a "FR: " prefix.

You can repeat this if you add more items. It won't delete any translations.• Step 2: Update the translations in the editor

Helpful Hints: viewing the XML can help you troubleshoot Image translations allow you to show different images for different

languages (i.e. if text is part of image)

Page 34: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Tablet RulesScenario: You want to ask anybody over the age of 10 whether they are smoking. You want to show this form no more than once every year

Solution: Tablet rules allow you to use a script expression to

determine whether a particular form should be shown Configured in the tablet group settings

Page 35: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Tips for Using Tablet Rules• Create a separate tablet settings group to test

your rules (drag your test tablet into the test group)

• You can add "false &&" to the beginning of any rule to disable it

• You can drag-and-drop rules to reorder them

Page 36: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Form MemoryScenario: You want to be able to show a smoking screen once a year

• RememberIf on the EForm is a script expression that tells Ocean to remember that that patient competed the form Enables script variables

daysSinceLastCompleted, firstTime, etc.

Default is false!• rememberTag is a string you can save

with the memory Useful for holding "state"

Page 37: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Exercise: Create a Rule for Your Form

Let's configure our simple pain tool to appear once a month to any patient over the age of 10

1. Update your form to rememberIf = true

2. Create a tablet rule in the tablet settings group for patients over the age of 10 and not completed in past 30 days

3. Use your tablet twice for the same patient and notice how the form is only shown the first time

4. Bonus: clear the form memory for the patient on the patients tab and try it again

Page 38: Module 3: EForm Authoring Module 3 Agenda EForm Basics How to work with an EForm, basic structure and…

Feedback Survey