This is the basic information you need to create a simple form using the the Html_Form_Entry_Module.
[edit]
The htmlform tag
Your entire form must be wrapped in an htmlform tag<htmlform>
tag
No Format |
---|
<htmlform> ...stuff goes here... |
...
</htmlform> |
...
|
Required elements
A form is required to ask for the datetime, location, and provider, and it must have a submit button. For a complete reference on these tags see Tag Reference Page
No Format |
---|
<htmlform> |
...
Date: <encounterDate default="today"/> <br/> |
...
Location: <encounterLocation/> <br/> |
...
Provider: <encounterProvider role="Provider"/> <br/> |
...
...stuff goes here... |
...
<submit/> |
...
</htmlform> |
...
|
Section Tag
The <section> tag lets you break your form, and corresponding form schema, into sections. For a complete reference on this tag see Tag Reference Page
No Format |
---|
<section headerLabel="section1"> |
...
... |
...
</section> |
...
<section headerLabel="section2"> |
...
... |
...
</section> |
[edit]
Obs Tag
The form wouldn't be much without being to enter observations. For a complete reference on this tag see Tag Reference Page
No Format |
---|
<obs conceptId="5089" labelText="Weight" /> |
...
<obs conceptId="5090" labelText="Height" /> |
...
|
Velocity expressions
The lookup tag allows you to evaluate velocity expressions. For a complete reference on these tags see Tag Reference Page
No Format |
---|
<lookup expression="patient.personName"/> to display the patient's name |
...
<lookup expression="patient.gender"/> to display the patient's gender |
...
<lookup expression="patient.age"/> to display the patient's age |
...
<lookup expression="patient.getPatientIdentifier(5)"/> to display the patient's identifier of the type with id=5 |
...
<lookup complexExpression="#foreach( $addr in $patient.addresses ) $\!addr.cityVillage <br/> #end"/> to display the city/village of each of the patient's addresses |
...
|
Putting it all together
A very basic form to enter height and weight observations could look like:
No Format |
---|
<htmlform> |
...
<section headerLabel="1. Encounter Details"> |
...
Date: <encounterDate default="today"/> <br/> |
...
Location: <encounterLocation/> <br/> |
...
Physician: <encounterProvider role="Provider"/> <br/> |
...
<br/> |
...
</section> |
...
<section headerLabel="2. Demographic Info"> |
...
<span>Nom du patient: <lookup expression="patient.personName"/></span> |
...
<span>No. Dossier: <lookup complexExpression="#foreach( $patId in $patientIdentifiers.get("PIH ID") ) $\!patId #end"/></span><br/> |
...
<span>Sexe: <lookup expression="patient.gender" codePrefix="gender_"/></span> |
...
<span>(a) Date de naissance: <lookup expression="patient.birthdate"/></span> |
...
<span>(b) Age: <lookup expression="patient.age"/></span> |
...
</section> |
...
<section headerLabel="3. Vital Signs"> |
...
<obs conceptId="5089" labelText="Weight" /> (kg) |
...
<obs conceptId="5090" labelText="Height" /> (cm) |
...
</section> |
...
<br/><br/> |
...
<submit/> |
...
</htmlform> |
...
|
Additional Information
See HTML_Form_Entry_Module_HTML_Reference for complete documentation on the tags listed above, additional information on the <obs> tag and the related <obsGroup>, and details on more advanced features like macros, repeating templates, and enrolling patients in programs.[edit]
Tips for making new forms
...