Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<encounterDiagnoses> & <encounterDiagnosesByObs>

Data entry widgets that ship with Coreapps module bundled within the Core Apps module (and not HTML Form Entry) for recording encounter diagnoses with auto-completion. Can It can record multiple diagnoses marking them as presumed/confirmed and/or primary/secondary. Either of encounterDiagnoses or encounterDiagnosesByObs tag <encounterDiagnoses>  or <encounterDiagnosesByObs>  tag can be used at-most once in an HTML form.

...

  • required: Specifies that the diagnoses field must be completed/filled.
    • OPTIONAL
    • Example: <encounterDiagnoses required="true"/> 
    • Value: "true", "false"
    • Default: false
  • selectedDiagnosesTarget: Specifies which div container id where the id of the <div>  container where the selected diagnoses are displayed. 
    • REQUIRED
    • Example:
      <encounterDiagnoses selectedDiagnosesTarget="encounter-diagnoses-target"/> 
      <div id="encounter-diagnoses-target"></div> 
    • Value: can be any valid HTML safe id
    • Default: There is no default for this and therefore should be provided as illustrated in the above example.
  • preferredCodingSource: This is used at the front-end/UI. Specifies the source used to filter concept codes for display on the primary and/or secondary diagnoses selectedto notify the user that choices that are presented to him through the autocomplete don't pertain to a preferred source.
    • OPTIONAL
    • As of version Core Apps 1.23.0
    • Example: 
      <encounterDiagnoses preferredCodingSource="ICD-10-WHO"/> 
    • Value: A valid concept source name, e.g "ICD-10-WHO", "CIEL", "ICPC2", ... etc.
    • Default: "ICD-10-WHO"
  • diagnosisConceptClasses: Specifies one or more concept classes in a form of a comma separated string to search in. Can be used together with diagnosisConceptSources
    • OPTIONAL
    • As of version 1.23.0
    • ExampleExamples
      <encounterDiagnoses diagnosisConceptClasses="Diagnosis"/> 
      <encounterDiagnoses diagnosisConceptClasses="Diagnosis,Finding"/> 
    • Value: A valid concept class e.g "Diagnosis", list of classes "Diagnosis,Finding"
  • diagnosisConceptSources: Specifies one or more concept sources in a form of a comma separated string to search in. Can be used together and works well with diagnosisConceptClasses
    • OPTIONAL
    • As of version 1.23.0
    • ExampleExamples
      <encounterDiagnoses diagnosisConceptSources="CIEL"/> 
      <encounterDiagnoses diagnosisConceptSources="CIEL,ICPC2"/> 
      <encounterDiagnoses diagnosisConceptSources="0"/>  which  means that the default globally defined concept sources are not used to search in>
      NOTE: pointing to a null concept source ensures that no default will be used, it will remove the concept sources as a space for the search. 
      <encounterDiagnoses diagnosisConceptSources=""/>
      NOTE: pointing to an empty concept source will lead to using the defaults.
    • Value: A valid concept sources e.g "ICD-10-WHO", list of sources "CIEL,ICPC2" or "0" (zero)
    • Default: "ICD-10-WHO"
  • diagnosisSets: Specifies the concept sets of diagnoses to search from. Can be one or more comma separated string of UUIDs, concept mappings (e.g CIEL:160170) or combination of both representing the sets. This when provided, overrides the default globally configured set of sets with of diagnoses to search from.
    • OPTIONAL
    • As of version 1.23.0
    • ExampleExamples: 
      <encounterDiagnoses diagnosisSets="160170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,160169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"/> 
      <encounterDiagnoses diagnosisSets="CIEL:160170,CIEL:160169"/> 
      <encounterDiagnoses diagnosisSets="CIEL:160170,160170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"/> 
      <encounterDiagnoses diagnosisSets="0"/> 
      NOTE: pointing to a null concept set ensures that no default will be used, it will remove the concept sets as a space for the search.
      <encounterDiagnoses diagnosisSets=""/> 
      NOTE: pointing to a empty concept set will lead to using the defaults.
    • Value: comma separated string of UUID or Concept Mappings or both or "0". When "0" (zero) is used, this means that the default globally defined concept sets are not used to search in.
    • Default: concepts contained in the sets globally defined by a set of sets concept (CIEL:160167 or 160167AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA).

...

    • IMPORTANT NOTEWhen the diagnosisSets

...

    •   is specified either through global defaults or provided in this HFE tag, the name search for diagnoses within classes and/or sources is bypassed. This means that the name search only operates within those sets, such that the classes and/or sources are ignored. To globally define diagnosis concepts sets and/or diagnosis concept sources, edit the emr.concept.diagnosisSetOfSets and emrapi.conceptSourcesForDiagnosisSearch global properties respectively.

Example

...

Usages

The following examples are identical to using the <encounterDiagnosesByObs/> tag  tag.

Code Block
html
html
<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisConceptSources="ICD-10-WHO"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisConceptClasses="Diagnosis"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisConceptClasses="Diagnosis" diagnosisConceptSources="0"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisSets="CIEL:160170,CIEL:160169"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisSets="CIEL:160170,CIEL:160169"/>

<encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target" preferredCodingSource="ICD-10-WHO" diagnosisSets="160170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,160169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"/>

...

  • default: Sets default value for the widget.
    • OPTIONAL
    • Example: <encounterLocation default="2"/>
    • Example: <encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/>
    • Example: <encounterLocation default="SystemDefault"/>
    • Value: Location ID, Location UUID, Location Name. Since 1.9.5 we also support "GlobalProperty:xyz" and "UserProperty:xyz" where xyz is the name of a global property or user property, whose value must be equal to a legal location value using one of the supported formats. Since 2.0.3 we also support "SessionAttribute:xyz" where xyz is the name of an HttpSession attribute, whose value must be a location, or a String using one of the supported formats. Since 2.3 we support "SystemDefault" to set the default to the configured system default.
    • Default: None
  • order: Determines which locations appear in the list, and specifies the order in which they appear.
    • OPTIONAL
    • Example: <encounterLocation order="2,7,4"/>
    • Value: Comma separated list of Location IDs, Location UUIDs, or Location Names
    • Default: All non-retired locations in alphabetical order
  • tags: Limits the locations that appear in the list to locations tags with one or more the specified tags
    • Since 2.1.3
    • OPTIONAL
    • Example: <encounterLocation tags="Admission Location, 1" />
    • Value: Comma separated list of Location Tags IDs or Location tag Names
    • Cannot be used in conjunction with the order attribute
  • required: Defaults to true when not specified. When false the form can be submitted without specifying a location 
  • type: Specifies the input element to display (i.e a dropdown vs autocomplete); shows a dropdown by default if type is not specified
    • Since 1.11
    • OPTIONAL
    • Example: <encounterLocation type="autocomplete"/>
    • Value:  "autocomplete"
    • Default: dropdown

Example Usage

Code Block
html
html
<encounterLocation/>                                    <!-- a list of all locations, sorted alphabetically by name -->
<encounterLocation default="2"/>                        <!-- a list of all locations, sorted alphabetically by name, with location 2 selected by default -->
<encounterLocation default="GlobalProperty:defLoc"/>    <!-- a list of all locations, sorted alphabetically by name, with the location specified in the "defLoc" global property selected by default -->
<encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/> <!-- uses the currently logged in location, per the Reference App --> 
<encounterLocation order="2,7,4"/>                      <!-- a list of the specified locations, by id -->
<encounterLocation order="Rwinkwavu,Kirehe,Mulindi"/>   <!-- a list of the specified locations, by name -->
<encounterLocation type="autocomplete"/>                <!-- an autocomplete field for location selection, with prepopulated list of locations -->

...

  • required: Defaults to true when not specified. When false the form can be submitted without specifying a provider 
  • type: Specifies the input element to display (i.e a dropdown vs autocomplete); shows a dropdown by default if type is not specified
    • Since 1.11
    • OPTIONAL
    • Example: <encounterProvider type="autocomplete"/>
    • Value:  "autocomplete"
    • Default: dropdown

Example Usage

Code Block
html
html
<encounterProvider/>                       <!-- a list of all users -->
<encounterProvider default="djaz"/>        <!-- a list of all users, with the user whose username is djaz selected -->
<encounterProvider default="6"/>           <!-- a list of all users, with the user whose userId is 6 selected -->
<encounterProvider default="currentUser"/> <!-- a list of all users, with the current user selected -->
<encounterProvider role="Provider"/>       <!-- a list of those users with the Provider role -->
<encounterProvider persons="username1,username2"/>   <!-- a list of those 2 Persons who are users with usernames username1 and username2 -->
<encounterProvider type="autocomplete"/>             <!-- an autocomplete field for provider selection, with pre populated list of providers-->

...

  • default: Sets default provider for the widget (id or uuid of a Provider, or "currentUser"). 
    • If you specify "currentUser" but the currently-logged-in user does not have a Provider record associated with their Person record, nothing happens. (If that user has more than one Provider record, one is chosen arbitrarily.)
  • count: number of potential providers for the specified role 
    • Example:  the number of dropdown widgets to render) 
    • Default is 1
  • providerWidgetSeparator:  The html that should separate each provider selection widget if count > 1
    • Default:  ", "
    • Since:  htmlformentry version 3.10.0
    • Example:  

      Code Block
      languagexml
                      <div class="provider-grid">
                          <div>
                              <encounterProviderAndRole encounterRole="98bf2792-3f0a-4388-81bb-c78b29c0df92"
                                                        providerRoles="7207ba62-027f-4f9b-be67-a9f7a8a3abcc"
                                                        autocompleteProvider="true" required="false" count="2" providerWidgetSeparator="&lt;/div&gt;&lt;div&gt;"/>
                          </div>
                      </div>


  • encounterRole:
    • When specified, this tag displays a widget for choosing a provider, and assigns it to the role indicated by this parameter. 
    • If you do not specify this attribute, then the tag will also display a widget to choose an encounter role for the provider.
    • Value:  id or uuid of an encounterRole 
  • providerRoles:  Specify the role assigned to the provider
    • OPTIONAL
    • Example:  <encounterProviderAndRole providerRoles="8" />
    • Value:  Comma separated list of provider role id or uuid
    • Requires that the Provider Management module be installed
    • since HFE 1.9 Extensions 1.2
    • providerRoles doesn't (currently) work with autocompleteProvider="true".  
      Jira
      serverOpenMRS JIRA
      serverId45c5771b-fa4b-3e43-b34a-c19dc45ccc95
      keyHTML-622

  • required: when true, the form cannot be submitted unless you have chosen a provider
  • autocompleteProvider: When true, the provider widget is rendered in autocomplete search box in which user is expected to type the few characters used to search for a particular provider (s).
    • OPTIONAL
    • When omitted it defaults to false.
    • Value: true or false
    • Example: <encounterProviderAndRole autocompleteProvider="true"/>
    • since HFE 1.9 Extensions 1.6
  • providerMatchMode: Used in conjunction with autocompleteProvider attribute to specify the position to match search text in provider identifier/names.
    • OPTIONAL
    • Values: START, END, ANYWHERE (Default is START)
    • Example: <encounterProviderAndRole autocompleteProvider="true" providerMatchMode="ANYWHERE" />
    • Since HFE 1.9 Extensions 1.6

Example Usage

Code Block
<encounterProviderAndRole/>                                   <!-- dropdown of encounter roles : dropdown of providers -->
<encounterProviderAndRole default="currentUser"/>             <!-- dropdown of encounter roles : dropdown of providers with one chosen by default -->
<encounterProviderAndRole encounterRole="1" required="true"/> <!-- dropdown of providers, required for submission -->
<encounterProviderAndRole encounterRole="2" default="3"/>     <!-- dropdown of providers, with one chosen by default -->

<encounterProviderAndRole encounterRole="2" count="2"/>       <!-- display 2 dropdown of providers, for encounter role 2 -->
<encounterProviderAndRole autocompleteProvider="true" encounterRole="1" /> <!--display an autocomplete search box for provider-->

...

  • types: comma-separated list of encounterTypes to display in the select list, referenced by id, uuid, or name
  • default: the default encounterType, referenced by id, uuid or name

Example Usage

Code Block
<encounterType types="25,24,9,23,20,14,18,22,19,13,10,17,26,11,12,16,21,15,27" default="CLINIC MOBILE" />

...

In edit mode only, for an existing encounter, renders a voided checkbox that allows you to void the encounter.  There are no tag arguments.  Available in htmlformentry1.7.4.  This tag does not render anything when entering a new form, or when viewing an existing encounter (viewing the encounter implies already implies that the encounter is not voided).

Example Usage

Code Block
<encounterVoided/>

...

  • logicTestA logic expression represents a logic test.
    • OPTIONAL
    • Example: <excludeIf logicTest="GENDER = F"/> - A logic test to see if the patient's gender is female
  • velocityTestA velocity expression represents a velocity test.
    • OPTIONAL
    • Example: <excludeIf velocityTest="$patient.gender == 'F' "/> - A velocity test to see if the patient's gender is female.

Example Usage

Code Block
html
html
<htmlform>
     <table border="0" width="100%">
        <tr><td><includeIf logicTest="GENDER = F">This shows a logic test for a woman</includeIf> </td></tr>
        <tr><td><includeIf velocityTest="$patient.gender == 'F' ">This shows a velocity test for a woman</includeIf> </td></tr>
        <tr><td><excludeIf logicTest="GENDER = F">This won't show for a logic test for a woman</excludeIf> </td></tr>
        <tr><td><excludeIf velocityTest="$patient.gender == 'F' ">This won't show for a velocity test for a woman</excludeIf> </td></tr>
     </table>
   </htmlform>

...

Once the cause of death and other reason text fields are filled out and submitted for a certain patient, the death obs can't be undone. However it is possible to change the reason for exit field back to an answer other than "Patient Died", so the exit observation can be edited back. Then it will not display the death fields' entries but the death obs still exists. It is also possible to edit the cause of death and other reason fields too.

Example Usage

Code Block
<exitFromCare/>

...

  • modein which mode to include the content
    • REQUIRED
    • allowed values: "ENTER", "EDIT", "VIEW" (not case-sensitive)
    • Example: <ifMode mode="ENTER">...</ifMode>
  • includewhether to include or exclude the content based on the mode
    • allowed values: true or false
    • default: true

Example Usage

Code Block
html
html
<htmlform>
    <obs conceptId="5089" id="weight"/>
    <ifMode mode="ENTER">
        <script type="text/javascript">
            getField("weight.value").change(function() { window.alert("You entered a weight"); });
        </script>
    </ifMode>


    <ifMode mode="EDIT">
        This will only be displayed in edit mode.
    </ifMode>


    <ifMode mode="EDIT" include="false">
       This is NOT be displayed when in edit mode, but will be displayed in all other modes.
    </ifMode>

</htmlform>

...

  • vaccineConceptId: which vaccine for that instance of the tag (Stores as CIEL:984 - Immunizations)
    • REQUIRED
    • Example: <immunization vaccineConceptId="783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="1" />
    • Value: UUID of concept, concept number, or concept mapping

Example Usage

Code Block
html
html
	<section headerLabel="2. Vaccines">
            <table class="baseline-aligned">
              <tr>
                <td style="text-align:right;">BCG</td>
                <td>
                    <immunization showDate="true" id="bcg" vaccineConceptId="886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="1" label="" />
                </td>
              </tr><tr>
                <td style="text-align:right;">POLIO 0</td>
                <td>
                    <immunization showDate="true" id="polio0" vaccineConceptId="783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="0" label="" />
                </td>
              </tr><tr>
                <td style="text-align:right;">POLIO 1</td>
                <td>
                    <immunization showDate="true" id="polio1" vaccineConceptId="CIEL:783" sequenceNumber="1" label="" />
                </td>
              </tr><tr>
                <td style="text-align:right;">POLIO 2</td>
                <td>
                    <immunization showDate="true" id="polio2" vaccineConceptId="783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="2" label=""/>
                </td>
              </tr><tr>
                <td style="text-align:right;">POLIO 3</td>
                <td>
                    <immunization showDate="true" id="polio3" vaccineConceptId="783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="3" label=""/>
                </td>
              </tr><tr>
                <td style="text-align:right;">POLIO 4</td>
                <td>
                    <immunization showDate="true" id="polio4" vaccineConceptId="783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" sequenceNumber="4" label=""/>
                </td>
               </tr>
           </table>
	</section>

...

  • complexExpression
    • OPTIONAL
    • Example: <lookup complexExpression="#foreach( $addr in $patient.addresses ) $!addr.cityVillage <br/> #end"/>
    • Value: Valid complex velocity expression
    • Default: None
  • class
    • OPTIONAL
    • Example: <lookup class="value" ... />
    • Value: Valid velocity class
    • Default: None
  • expression
    • OPTIONAL
    • Example: <lookup expression="patient.personName"/>
    • Value: Valid velocity expression
    • Default: None

Example Usage

Code Block
html
html
<lookup expression="patient.personName"/> this will translate to the velocity expression $\!{patient.personName}
<lookup expression="patient.personName.givenName"/>
<lookup expression="patient.personName.familyName"/>
<lookup expression="patient.getPatientIdentifier(5)"/> this will get the patient's first identifier with Identifier Type Id of 5
<lookup expression="patient.birthdate"/>
<lookup expression="patient.age"/>
<lookup expression="patient.gender" codePrefix="gender_"/>
<lookup complexExpression="#foreach( $addr in $patient.addresses ) $\!addr.cityVillage <br/> #end"/>
<lookup class="value" .../>   this will produce <span>result of expression</span>
<lookup expression="personAttributes.get('Tribe')"/> this will get the patient's 'Tribe' person attribute
<lookup expression="patient.personAddress.address1"/> this will get the address1 field of the patient's preferred address
<lookup expression="patient.personAddress.cityVillage"/> this will get the city field of the patient's preferred address
<lookup expression="fn.getConcept('110').description"/> returns description of concept ID 21. Ticket # 478
<lookup expression="fn.getConcept('CIEL:1647').name"/> returns the name of the concept with CIEL mapping of 1647
<lookup complexExpression="#foreach ( $relationship in $relationshipList )
    #if( $relationship.relationshipType.bIsToA == 'Parent' )
          #if( !($relationship.personB.patientId == $patient.patientId ))
             #if( $relationship.personB.gender == 'F' )
                   $relationship.personB.personName
             #end
          #end
    #end
#end "/> this will get the patient's mother's name
<lookup complexExpression="
&#60;img src=&#34;http://www.someserver.com/somepath/barcode.php?string=${patient.getPatientIdentifier(1)}&#34;/&#62;
" /> this loads a dynamic image (This requires the us of ASCII character codes because the quote and less-than symbols are illegal.)
<lookup complexExpression="$fn.latestObs(6527).valueCoded.name"/> this shows the concept name of the latest coded value for concept # 6527.
<lookup expression="visit.startDatetime"/> this shows the start date of the current visit
<lookup complexExpression="#foreach($encounterProvider in $fn.latestEncounter('2549af50-75c8-4aeb-87ca-4bb2cef6c69a').encounterProviders) $encounterProvider.provider.person.personName #end" /> this gets the names of the providers in the latest encounter of the specified type 

...

Prior to release 2.6, the only way to define macros was as a properties-style text block within the body of the macros tag.  This is maintained beyond 2.6 for backwards compatibility.  An example of this can be seen below:

Example Usage

Code Block
html
html
<htmlform>
    <macros>
        lightgrey=#e0e0e0
        lightblue=#e0e0ff
        darkblue=#4444ff
    </macros>
    <div style="background-color: $lightblue">This is a pleasant light blue color</div>
</htmlform>

...

  • key:  The name by which the macro should be referred to in the form.  A key of "lightblue" would be referred to with the syntax "$lightblue".
    • REQUIRED
    • Example: <macro key="color" value="#e0e0ff" />
    • Value: Any quoted string.
    • Default: None
  • value:  The value to assign to the macro
    • REQUIRED if no expression attribute is present
    • Example: <macro key="color" value="#e0e0ff" />
    • Value: Any quoted string.
    • Default: None
  • expression:  A velocity expression that can be evaluated into the macro value
    • REQUIRED if no value attribute is present
    • Example: <macro key="color" expression="fn.globalProperty('mymodule.theme.color')" />
    • Value: Any valid velocity expression (see <lookup> tag for reference)
    • Default: None

Example Usage

Code Block
html
html
<htmlform>
    <macros>
        <macro key="backgroundColor" value="#e0e0e0"/>
		<macro key="weight" expression="fn.globalProperty('concept.weight')"/>
    </macros>
    <div style="background-color: $backgroundColor">Weight:  <obs conceptId="$weight"/></div>
</htmlform>

...

  • groupingConceptId: ID of the associated concept
    • REQUIRED
    • Examples:
      • <obsgroup groupingConceptId="2214">
      • <obsgroup groupingConceptId="XYZ:HT">
      • <obsgroup groupingConceptId="0cbe2ed3-cd5f-4f46-9459-26127c9265ab">
    • Value: Any valid concept integer ID, concept mapping pair, or concept uuid.
    • Default: None
  • label: an optional display label for the ObsGroup; This will not show up in the form itself, but can be used to customize column headers in data exports, for example.
    • OPTIONAL
    • Default: None
    • Example
      • <obsgroup groupingConceptId="0cbe2ed3-cd5f-4f46-9459-26127c9265ab" label="Primary Diagnosis">
  • showIfEmpty: when set to false, when viewing a form, the obsgroup tag and its contents will produce no output if the encounter you are viewing contains no matching obs group
    • OPTIONAL
    • Default: true
    • Example
      • <repeat ...> <obsgroup groupingConceptId="123" showIfEmpty="false">...</obsgroup></repeat> 

Related Tags

Example Usage

Code Block
html
html
<obsgroup groupingConceptId="1234">
    <obs conceptId="1234" answerConceptId="123" answerLabel="Other"/>
    <obs conceptId="987" labelText="specify:"/>
</obsgroup>

You can wrap an obsgroup tag anywhere in the html, generally speaking, as long as it is still a well-formed xml document.

This is okay:
    <table>
        <tr>
            <obsgroup groupingConceptId="1234">
                <td><obs conceptId="5089" labelText="Weight:"/></td>
                <td><obs conceptId="5090" labelText="Height:"/></td>
            </obsgroup>
        </tr>
    </table>

This will break:
    <obsgroup groupingConceptId="1234">
        <table>
            <tr>
                <td><obs conceptId="5089" labelText="Weight:"/></td>
                <td><obs conceptId="5090" labelText="Height:"/></td>
            </obsgroup>
        </tr>
    </table>

...

  • required: (currently only applies to patient identifier fields)
    • Example: <patient field="identifier" identifierType="2" required="false" />
    • Default: true 

Example Usage

Code Block
html
html
<patient field="name"/> <!-- displays the name fields -->
<patient field="identifier" identifierTypeId="2"/>  <!-- displays identifier field for identifier type 2 - input is validated accordingly  -->

...

  • type: this is the relationship_type_id (or UUID) for the relationship that should be created for the selected person.
    • REQUIRED
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" />
      • <relationship type="0cbe2ed3-cd5f-4f46-9459-26127c9265ab" whoAmI="A" changeExistingRelationship="true" />
    • Value: Any valid relationship type ID or UUID for a relationship type
    • Default: NONE
  • whoAmI:this is the side of the relationship the patient the form is being entered on is. For example in a Parent to Child relationship, if the form is being filled out for the child then the whoAmI value should be set to "B" whereas if the form is being filled out for the parent then the whoAmI value should be set to "A"
    • REQUIRED
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" />
      • <relationship type="1" whoAmI="B" changeExistingRelationship="true" />
    • Value: "A" or "B"
    • Default: NONE
  • changeExistingRelationship: this attribute determines if new relationships should be added in addition to existing relationships or should replace the existing relationships of that type. So if this value is set to true, any existing relationships of that type will be replaced. If the attribute is set to false then a new relationship will be added in addition to any existing relationships.
    • REQUIRED
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="false" />
    • Value: "true" or "false"
    • Default: NONE
  • required: this is used for validation, and if true the form will not be able to be submitted without the required relationships existing for the patient. The code checks to see if the patient already has relationships existing, so validation will not fail if the required relationship types were set up prior to entering the form (in this situation the data entry clerk can edit or add new relationships or just ignore the question). The relationship widget displays to the user all existing relationships (for the types we care about in the tag), so the data entry clerk should be able to decide if entry on this question is needed.
    • OPTIONAL
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" required="true" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" required="false" />
    • Value: "true" or "false"
    • Default: false
  • requireAttributes: this attribute restricts the search results based on person_attributes. This attribute takes in a comma separated list of attributes. Each attribute can be entered as a name value pair (separated by a ',' for example Health Center:Rwinkwavu Health Center. Alternatively the attribute value can be entered in the format of ${currentPatientAttribute("Health Center")}, in this case the relationship tag will retrieve the value of Health Center attribute for the patient of the form and use this value as the valueto match. The value for the attribute is optional, and if left out then the search will return any people that possess the specified person_attribute.  If multiple attributes are specified, only persons that match allof the specified attributes are displayed.
    • OPTIONAL
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" requireAttributes="Health Center:Rwinkwavu Health Center" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" requireAttributes="Health Center:${currentPatientAttribute("Health Center")}" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" requireAttributes="Health Center" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" requireAttributes="Health Center:Florida,Citizenship:USA" />
    • Value: any valid person attribute type and optionally the value the person attribute should have.
    • Default: NONE
  • programIds: this attribute allows the search results to be filtered based on program enrollment. So this takes in a comma separated list of the program ids (or UUIDs). This can be used in conjunction with the personAttributes if necessary. If multiple programs are specified, only patients in allof the specified programs are displayed.
    • OPTIONAL
    • Examples
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" programIds="1" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" programIds="1,5" />
      • <relationship type="1" whoAmI="A" changeExistingRelationship="true" programIds="0cbe2ed3-cd5f-4f46-9459-26127c9265ab" />
    • Value: Any valid program ID, program UUID or underlying concept name
    • Default: NONE
  • display: This attribute determines which widget is displayed to the user to pick the person for the relationship. A value of “search” will present the user with a popup search box, allow them to enter a search term then select from the returned list. All searches in the tag search are based on person not patient, however you can search on patient identifiers and it will work. A value of “dropDown” presents the people in a simple drop down. If the drop down list is used when a large number of people are returned then this slows down the loading of the form, so drop down box option can only be used in conjunction with the requireAttributes and/or programId fields.
    • OPTIONAL
    • Examples
      • <relationship type="1" ="1" whoAmI="A" changeExistingRelationship="true" display="search" />
      • <relationship type="1" ="1" whoAmI="A" changeExistingRelationship="true" display="dropDown" />
    • Value: "search" or "dropDown"
    • Default: search

Example Usage

Code Block
<relationship type="21" whoAmI="A" required="true" changeExistingRelationship="false"
	requireAttributes="HealthCenter:${currentPatientAttribute("Health Center")" programIds="3"display="search" labelText=”label” />

...

  • Used within a repeat tag to render code. Within the render tag you can also specify attributes that can be used as keys during substitution.

Example Usage

Code Block
html
html
<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>

...

                                  

Example Usage

Code Block
html
html
<repeat with="['664','No Complaints'],['832','Weight Loss'],['777','Nausea']">
<obs conceptId="1069" answerConceptId="{0}" answerLabel="{1}" style="checkbox" /><br/>
</repeat>

would render as:

<obs conceptId="1069" answerConceptId="644" answerLabel="No Complaints" style="checkbox" /><br/>
<obs conceptId="1069" answerConceptId="832" answerLabel="Weight Loss" style="checkbox" /><br/>
<obs conceptId="1069" answerConceptId="777" answerLabel="Nausea" style="checkbox" /><br/>




...

  • headerCode: Allows you specify the header label using a code that references message.properties or the translation mappings in the form itself.
    • OPTIONAL
    • Example: ???
    • Value: ????
    • Default: None.
  • headerLabel: The label to use in the section header.
    • OPTIONAL
    • Example: <section headerLabel="1. Information démographique">
    • Value: Any quoted string
    • Default: None.
  • headerStyle: Allows you to override the default style for the section header. (Treated as a CSS class.)
    • OPTIONAL
    • Value: Valid CSS class names
    • Default: sectionHeader
  • sectionStyle: Allows you to override the default style for the section. (Treated as a CSS class.)
    • OPTIONAL
    • Value: Valid CSS class names
    • Default: section
  • sectionTag: Lets you specify what tag should be used for the section
    • OPTIONAL
    • Value: Valid HTML tag name
    • Default: div
    • Since: 2.0.3
  • headerTag: Lets you specify what tag should be used for the section header
    • OPTIONAL
    • Value: Valid HTML tag name
    • Default: span
    • Since: 2.0.3

Example Usage

If you want to use HTML 5 section tags, do something like this:

...

  • locale: ????
    • REQUIRED
    • Example: <variant locale="en" value="night sweats"/>
    • Value: A valid two letter locale value. E.g. "ar", "en", "es", "fr"
    • Default: None
  • value: The value to be assigned to the code.
    • REQUIRED
    • Example: <variant locale="en" value="night sweats"/>
    • Value: Any quoted string.
    • Default: None

Example Usage

Code Block
html
html
<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"/>
or
<lookup expression="fn.message('night_sweats')"/>

...

You are required to specify one of javascript, css, or fragment.

Example Usage

Code Block
<uiInclude provider="uicommons" javascript="angular.min.js"/>
<uiInclude provider="coreapps" javascript="diagnoses/diagnoses.js"/>

...