Versions Compared

Key

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

Reference for writing HTML for the Html Form Entry Module

...

  • required: Specifies that the diagnoses field must be completed/filled.
    • OPTIONAL
    • Example: <encounterDiagnoses required="true"/> 
    • Value: "true", "false"
    • Default: false
  • selectedDiagnosesTarget: Specifies 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 to 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
    • Examples: 
      <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
    • Examples: 
      <encounterDiagnoses diagnosisConceptSources="CIEL"/> 
      <encounterDiagnoses diagnosisConceptSources="CIEL,ICPC2"/> 
      <encounterDiagnoses diagnosisConceptSources="0"/>
      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 of diagnoses to search from.
    • OPTIONAL
    • As of version 1.23.0
    • Examples:
      <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 NOTE: When 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.

...

  • 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.)
  • encounterRole: Use the given encounterRole  instead of rendering a dropdown.
    • If the encounterRole  attribute is not provided, the widget renders as a pair of dropdowns. The first allows selecting from a list of providers; the second allows selecting from a list of encounter roles. If the encounterRole  attribute is provided, the encounter role dropdown is omitted; the provider is added to the encounter with the encounter role given as the value of this attribute.
    • Value:  id or uuid of an encounterRole 
  • providerRoles:  Limit the list of possible providers to those with any of the specified providerRoles 
    • 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
  • 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).
    • Value: true or false
    • Default: 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.
    • Values: START, END, ANYWHERE (Default is START)
    • Example: <encounterProviderAndRole autocompleteProvider="true" providerMatchMode="ANYWHERE" />
    • Since HFE 1.9 Extensions 1.6
  • count: Repeat this widget count  times. See the "Note" below.
    • Default: 1
  • providerWidgetSeparator: If using count , this HTML is inserted in between each widget.
    • Default:  ", "
    • Since:  htmlformentry version 3.10.0
    • Example:  

      Code Block
      <div class="provider-grid">
          <div>
              <encounterProviderAndRole
      			encounterRole="98bf2792-3f0a-4388-81bb-c78b29c0df92"
      			count="2"
      			providerWidgetSeparator="&lt;/div&gt;&lt;div&gt;"/>
          </div>
      </div>


...

  • answerConceptIds: Concept references corresponding to the coded answers for the question. Used with radio buttons and dropdowns.
    • OPTIONAL
    • Examples:
      • <obs conceptId="1319" labelText="Toiture/Roofing: " answerConceptIds="1320,1321,1316" answerLabels="tole,tache,beton"/>
      • <obs conceptId="1319" labelText="Toiture/Roofing: " answerConceptIds="XYZ:HT,ABC:QQ,QWE:TR" answerLabels="tole,tache,beton"/>
      • <obs conceptId="1319" labelText="Toiture/Roofing: " answerConceptIds="5ecb88f3-cd5f-4f46-9459-26127c9265ab,74e3ded1-cd4f-4f4b-9459-26127c9265ab,0cbe2ed3-cd5f-4f46-9459-26127c9265ab" answerLabels="tole,tache,beton"/>
      • <obs conceptId="1319" labelText="Toiture/Roofing: " answerConceptIds="1320,ABC:QQ,0cbe2ed3-cd5f-4f46-9459-26127c9265ab" answerLabels="tole,tache,beton"/>
      • <obs conceptId="3509" answerConceptIds="org.openmrs.module.mymod.Dictionary.YES,org.openmrs.module.mymod.Dictionary.NO" answerLabels="Yes,No" />
    • Value: Quoted, comma separated list of valid Concept Integer IDs, Concept Mappings, Concept UUIDs or fully qualified constant names.
    • Default: None
  • answerConceptSetIds:  Concept reference allowing coded answers for the question where the coded answers are assigned from one or more concept set.  Use with autocomplete. (Added in Version 3.0)
    • OPTIONAL
    • Examples:
      • <obs conceptId="PIH:Mental health diagnosis (coded)" answerConceptSetIds="PIH:HUM Mental Health diagnosis set" labelText="Diagnosis" style="autocomplete" />

    • Value: Quoted, comma separated list of valid Concept Integer IDs, Concept Mappings, Concept UUIDs or fully qualified constant names.
    • Default: None
  • answerDrugId: Drug reference corresponding to the coded Drug answer for the question. The obs renders as a checkbox, and if it's checked then the obs is saved as: obs.concept_id=conceptId, obs.value_coded=Concept ID of the concept associated with the Drug specified; obs.value_drug=the ID(integer) of the drug specified
    • OPTIONAL
    • Example: <obs conceptId="PIH:MEDICATION ORDERS" answerDrugId="4534a926-8dc4-440b-bdf9-f9e96d282a28" />
    • Value: the UUID of the Drug
    • Version: since 3.9.0
  • answerDrugs: for coded concepts, if true, displays an autocomplete widget to pick a drug as the obs value
    • OPTIONAL
    • Example: <obs conceptId="1234" answerDrugs="true" />
    • Value: true or false
    • Default: false
    • Version: since 2.1.6
  • answerDrugIds: A comma-separated list of drugs referenced by uuid; renders a dropdown the allows the user to choose one of those drugs; when saved, that drug is saved as Obs value_drug (and the related concept as Obs value_coded); the names of the drugs are used as a label, but can be overwritten using the answerLabels attribute
    • OPTIONAL
    • Example:  <obs conceptId="CIEL:1282" answerDrugIds="78f95d38-dfbe-11e9-8a34-2a2ae2dbcce4,78f95e78-dfbe-11e9-8a34-2a2ae2dbcce4,78f95bc6-dfbe-11e9-8a34-2a2ae2dbcce4" answerLabels="Atazanavir,Lopinavir,Zivoduvine" />
    • Version: since 3.12.0

...

  • style: Specifies the type of input element (radio, checkbox, dropdown, yes/no, etc.) that displays on the form.
    • OPTIONAL
    • Example: <obs conceptId="6689" style="yes_no" noLabel="non" yesLabel="oui" />
    • Value: "radio", "checkbox", "dropdown", "yes_no", "no_yes", "yes_no_dropdown", "no_yes_dropdown", "textarea", "autocomplete", "location", "person", "provider", "provider_radio" (v.5.3.0), "provider_dropdown" (v.5.3.0),  "location_radio" (v.5.3.0), "location_dropdown" (v.5.3.0)
    • Default: Driven by datatype of associated concept.

...