-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML-835 Move basic form xml template out of application context xml …
…file (#296)
- Loading branch information
Showing
4 changed files
with
151 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<htmlform> | ||
<!-- Autogenerated example form (template from 01-Nov-2010 --> | ||
#set( $DOLLAR = '$' ) | ||
#set( $POUND = '#' ) | ||
<macros> | ||
paperFormId = (Fill this in) | ||
headerColor =#009d8e | ||
fontOnHeaderColor = white | ||
</macros> | ||
|
||
<style> | ||
.section { | ||
border: 1px solid ${DOLLAR}headerColor; | ||
padding: 2px; | ||
text-align: left; | ||
margin-bottom: 1em; | ||
} | ||
.sectionHeader { | ||
background-color: ${DOLLAR}headerColor; | ||
color: ${DOLLAR}fontOnHeaderColor; | ||
display: block; | ||
padding: 2px; | ||
font-weight: bold; | ||
} | ||
table.baseline-aligned td { | ||
vertical-align: baseline; | ||
} | ||
</style> | ||
|
||
<span style="float:right">Paper Form ID: ${DOLLAR}paperFormId</span> | ||
<h2>$htmlForm.name (v$htmlForm.form.version)</h2> | ||
|
||
<section headerLabel="1. Encounter Details"> | ||
<table class="baseline-aligned"> | ||
<tr> | ||
<td>Date:</td> | ||
<td><encounterDate default="today"/></td> | ||
</tr> | ||
<tr> | ||
<td>Location:</td> | ||
<td><encounterLocation/></td> | ||
</tr> | ||
<tr> | ||
<td>Provider:</td> | ||
<td><encounterProvider/></td> | ||
</tr> | ||
</table> | ||
</section> | ||
|
||
<section headerLabel="2. Demographic Information"> | ||
<table class="baseline-aligned"> | ||
<tr> | ||
<td>Name:</td> | ||
<td><lookup class="value" expression="patient.personName"/></td> | ||
</tr> | ||
#foreach ($idType in $identifierTypes) | ||
<tr> | ||
<td>$idType.name:</td> | ||
<td><lookup class="value" complexExpression="${POUND}foreach( ${DOLLAR}patId in ${DOLLAR}patientIdentifiers.get('$idType.name') ) ${DOLLAR}patId ${POUND}end "/></td> | ||
</tr> | ||
#end | ||
<tr> | ||
<td>Gender:</td> | ||
<td><lookup class="value" expression="patient.gender"/></td> | ||
</tr> | ||
<tr> | ||
<td>Birthdate:</td> | ||
<td> | ||
<lookup class="value" complexExpression="\#if( \$patient.birthdateEstimated ) ~\#end"/> <lookup class="value" expression="patient.birthdate"/> | ||
(Age: <lookup class="value" expression="patient.age"/>) | ||
</td> | ||
</tr> | ||
#foreach ($attrType in $personAttributeTypes) | ||
#set( $attrTypeName = $attrType.name.replaceAll("'", "") ) | ||
#set( $val = "personAttributes.get('$attrTypeName')" ) | ||
#if ( $attrType.format == "org.openmrs.Concept" ) | ||
#set( $val = "${val}.name.name" ) | ||
#end | ||
<tr> | ||
<td>$attrType.name:</td> | ||
<td><lookup class="value" expression="$val"/></td> | ||
</tr> | ||
#end | ||
</table> | ||
</section> | ||
|
||
<submit/> | ||
|
||
<!-- END OF FORM | ||
Simple examples to copy-and-paste. Full reference at http://wiki.openmrs.org/x/kg8z | ||
SECTION | ||
<section headerLabel="\#. Title"> | ||
Content | ||
</section> | ||
NUMERIC OBSERVATION | ||
<obs conceptId="id-of-numeric-concept" labelText="Label before"/> | ||
DATE OBSERVATION | ||
<obs conceptId="id-of-date-concept" labelText="Label before"/> | ||
CODED OBSERVATION | ||
(as a dropdown) | ||
<obs conceptId="id-of-coded-concept" labelText="Label before"/> | ||
(as radio buttons) | ||
<obs conceptId="id-of-coded-concept" labelText="Label before" style="radio"/> | ||
(as an autocomplete) | ||
<obs conceptId="id-of-coded-concept" labelText="Label before" style="autocomplete" answerClasses="Diagnosis"/> | ||
(as a checkbox for a specific answer) | ||
<obs conceptId="id-of-coded-concept" labelText="Label before" answerConceptId="id-of-answer-concept" answerLabel="label for answer"/> | ||
(as a dropdown with specific choices) | ||
<obs conceptId="id-of-coded-concept" labelText="Label before" answerConceptIds="concept-id-1,concept-id-2,concept-id-3" answerLabels="Label 1,Label 2, Label 3"/> | ||
FREE TEXT OBSERVATION | ||
(as a normal text field) | ||
<obs conceptId="id-of-text-concept" labelText="Label before"/> | ||
(as a textarea) | ||
<obs conceptId="id-of-text-concept" labelText="Label before" rows="4" cols="80"/> | ||
--> | ||
</htmlform> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters