openmrs: htmlforms

24
OpenMRS: htmlforms Ellen Ball [email protected] May 28, 2014

Upload: lnball

Post on 30-Jul-2015

89 views

Category:

Healthcare


0 download

TRANSCRIPT

Page 1: OpenMRS: htmlforms

OpenMRS: htmlforms

Ellen [email protected] 28, 2014

Page 2: OpenMRS: htmlforms

Table of contentsWhy htmlforms?Building htmlformTesting checklistAdvanced goodiesReferences

Page 3: OpenMRS: htmlforms

Why htmlforms?

• Complete control of layout• All html tags allowed• Non-proprietary• Integrated within OpenMRS• Runs with any web browser• Runs on Ubuntu, Mac, Windows, etc.• Easy to troubleshoot• Layout benefits of a webpage

Page 4: OpenMRS: htmlforms
Page 5: OpenMRS: htmlforms
Page 6: OpenMRS: htmlforms

Basic html tags

<p>Hello world!</p><b>bold</b><i>italics</i><center>Hello South Africa</center>

References http://www.w3schools.comhttp://www.w3schools.com/tags/default.asp Examples: http://www.w3schools.com/html/default.asp

Page 7: OpenMRS: htmlforms

Basic htmlform tags

All htmlforms require the following tags:

<htmlform>

<encounterDate />

<encounterLocation />

<obs conceptId=“x" />

<encounterProvider role="Provider" />

<submit />

Page 8: OpenMRS: htmlforms

Simple htmlform Example 1

<htmlform>

<p>Date of encounter: <encounterDate /> </p>

<p>Health center: <encounterLocation /> </p>

<p>Chest xray finding: <obs conceptId="12" /> </p>

<p>Clinician's name:<encounterProvider role="Provider" /></p>

<p><submit /></p>

</htmlform>

Page 9: OpenMRS: htmlforms

Observation (obs) tagnumeric

Free text box<obs conceptId="5497" labelText=“CD4:“ />

Free text box with observation date<obs conceptId="5497" labelText=“CD4:" dateLabel="Date:"/>

Page 10: OpenMRS: htmlforms

Observation (obs) tagselect one

Radio buttons<obs conceptId="123" labelText="Education" answers="0,6,8" answerLabels="None,1-6,7-8" style="radio"/>

Dropdown<obs conceptId="123" labelText="Education" answers="0,6,8" answerLabels="None,1-6,7-8" style="dropdown"/>

Page 11: OpenMRS: htmlforms

Observation (obs) tagselect one or more

Checkbox

Occupation?<obs conceptId="1304" answerConceptId="1309" answerLabel="unemployed / chômeur" style="checkbox" />

<obs conceptId="1304" answerConceptId="2446" answerLabel="retired / retraité" style="checkbox" />

<obs conceptId="1304" answerConceptId="1306" answerLabel="farmer / cultivateur" style="checkbox" />

Page 12: OpenMRS: htmlforms

Observation (obs) tagusing classes

A list of drugs can be shown using this tag:<obs conceptId="1296" answerClasses="Drug"

style="autocomplete"/>

Page 13: OpenMRS: htmlforms

Advanced htmlform tags

Create patient Date of birth Home address

RelationshipsDrug orderProgram, workflow, and states

Page 14: OpenMRS: htmlforms

Advanced htmlform tags

<encounterProvider role=“Pediatrician” />

<enrollInProgram programId=“1” />

<excludeIf logicTest="GENDER = F"/>

<section headerLabel=“1: History”></section>

Page 15: OpenMRS: htmlforms

Alternatives to concept id

Concepts can be specified with concept id, concept map, or uuid.<obs conceptId="3509" answerConceptId="2070“ style="checkbox" /><obs conceptId="3509" answerConceptId="PIH:Height“ style="checkbox" /><obs conceptId="3509" answerConceptId="0cbe2ed3-cd5f-4f46-9459-26127c9265ab“ style="checkbox" />

Page 16: OpenMRS: htmlforms

Checklist for implementing form

Build the htmlform from paper Compare the paper form to the htmlform

Include PaperId on htmlformReview form schema Enter form with a test patient View the entered formEdit the entered formConfirm program enrollment (if used)

Confirm the provider listConfirm drugs (if used)Test with different browsers

Page 17: OpenMRS: htmlforms

htmlform schemapart 1

“View” from the “Manage htmlform forms” page

Page 18: OpenMRS: htmlforms

htmlform schemapart 2

Useful for testing concepts

Page 19: OpenMRS: htmlforms

Advanced htmlform:Repeat template

<repeat>    <template>        <obsgroup groupingConceptId="1295">            <tr>                <td><obs conceptId="1297" answerConceptId="{concept}" answerLabel="{effect}" labelText=""/></td>                <td><obs conceptId="3063"/></td>                <td><obs conceptId="1300"/></td>                <td><obs conceptId="1643"/></td>            </tr>        </obsgroup>    </template>    <render concept="6355" effect="Nausées/vomissements"/>    <render concept="16" effect="Diarrhée"/>    <render concept="80" effect="Arthralgie"/>    <render concept="877" effect="Etourdissements et/ou vertiges"/></repeat>

Page 20: OpenMRS: htmlforms

Advanced htmlform:Language translation

<translations defaultLocale="en">    <code name="night_sweats">        <variant locale="en" value="night sweats"/>        <variant locale="fr" value="sueurs nocturnes"/>    </code></translations> And then in the body of the form: <obs conceptId="1234" labelCode="night_sweats"/>

Page 21: OpenMRS: htmlforms

Advanced htmlform:Dates

Only past dates are allowed<obs conceptId="1234" labelCode=“Date of last examination"/>

Past or future dates are permitted:<obs conceptId="1234" labelCode=“Next appointment“ allowFutureDates="true“ />

Page 22: OpenMRS: htmlforms

Advanced htmlformLookup

<lookup class="value" expression="patientIdentifiers.get(&quot;IMB ID&quot;)" />

<lookup class="value" expression="patient.personName.familyName" />

<lookup class="value" expression="patient.personName.givenName" />

Page 23: OpenMRS: htmlforms

Data validation• Use concept dictionary ranges with datatype “numeric”

Page 24: OpenMRS: htmlforms

ReferencesReference guide:https://wiki.openmrs.org/display/docs/HTML+Form+Entry+Module+HTML+ReferenceForm bank:https://wiki.openmrs.org/display/RES/Form+BankFlowsheet (video):https://www.youtube.com/watch?v=DfnjSRCo-ZYTraining materials:https://wiki.openmrs.org/display/RES/Htmlform+Implementers+TrainingJavaScript examples:https://wiki.openmrs.org/display/docs/HTML+Form+Entry+JavaScript+Reference