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.

...

  • allowFutureDates: When set to true allows obsDatetime to be in the future. (Has no effect on valueDatetime.)
    • OPTIONAL
    • Example: <obs conceptId="5096" dateLabel="Date measured:" allowFutureDates="true" />
    • Value: "true" or "false"
    • Default: False - Only past dates are allowed by default.
  • answerCodes: Allows you to reference labels by a messages.properties codes or a codes in the translation mappings defined in the form.
    • OPTIONAL
    • Example: ???
    • Value ??
    • Default: ?????
  • answerClasses: Renders as a dropdown all Concepts with specified ConceptClass, ordered by Concept Name
    • OPTIONAL
    • Example: <obs conceptId="1296" answerClasses="Drug"/>
    • Value: Valid ConceptClass
    • Default: None
  • answerConceptId: Concept reference corresponding to the coded answer for the question. Frequently used with checkboxes.
    • OPTIONAL
    • Examples:
      • <obs conceptId="3509" answerConceptId="2070" answerLabel="l'hôpital" style="checkbox" />
      • <obs conceptId="3509" answerConceptId="XYZ:HT" answerLabel="l'hôpital" style="checkbox" />
      • <obs conceptId="3509" answerConceptId="0cbe2ed3-cd5f-4f46-9459-26127c9265ab" answerLabel="l'hôpital" style="checkbox" />
    • Value: A valid Concept Integer ID, Concept Mapping, or Concept uuid.
    • Default: None
  • 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"/>
    • Value: Quoted, comma separated list of valid Concept Integer IDs, Concept Mappings, or Concept uuid's.
    • Default: None
  • answerLabel: Sets the text to display after the object. Used with checkboxes.
    • OPTIONAL
    • Example: <obs conceptId="3509" answerConceptId="2070" answerLabel="l'hôpital" style="checkbox" />
    • Value: Any quoted string
    • Default: None
  • answerLabels: Sets the text to display after the objects. Used with radio buttons or dropdowns.
    • OPTIONAL
    • Example: <obs conceptId="3201" labelText="" answerConceptIds="1065,1066" style="radio" answerLabels="oui,non" />
    • Value: Comma separated list.
    • Default: None
  • answers: Values to be stored as the answer for a radio button or dropdown. NOT used when answers are concepts - see answerConceptIds in that case
    • OPTIONAL
    • Example: <obs conceptId="123" labelText="Education" answers="0,6,8" answerLabels="None,1-6,7-8" style="radio"/>
    • Value: Comma-separated list
    • Default: None
  • cols: Number of columns in the textarea (implies style="textarea").
    • OPTIONAL
    • Example: <obs conceptId="3221" rows="7" cols="60" />
    • Value: Positive integer.
    • Default: None
  • conceptId: Integer ID, Concept Mapping, or Concept uuid of the concept to which the obs widget is linked. The datatype of this concept drives the behavior of the widget.
    • REQUIRED
    • Examples:<obs conceptId="6135" /><obs conceptId="XYZ:HT" /><obs conceptId="0cbe2ed3-cd5f-4f46-9459-26127c9265ab" />
    • Value: Valid Concept Integer ID, Concept Mapping, or Concept uuid.
    • Default: None
  • conceptIds:  It & It is possible to create an obs tag where you're choosing the 'question' for a predefined answerConceptId.  This attribute can't be used in the same obs tag as the usual 'conceptId' attribute, and for the moment requires an answerConceptId.  Here is an example of valid usage of this attribute:

...

  • &nbsp.
    • OPTIONAL
    • Example: <obs conceptIds="1441,3017,2474"

...

    • answerConceptId="656"

...

    • labelText="ISONIAZID"/>

...

    • (Renders

...

    • as

...

    • a

...

    • dropdown

...

    • list

...

    • of

...

    • drug

...

    • sensitivity

...

    • results

...

    • for

...

    • the

...

    • drug

...

    • isoniazid.

...

    •  The resulting

...

    • obs

...

    • has,

...

    • for

...

    • example,'WEAKLY

...

    • POSITIVE'

...

    • for

...

    • the

...

    • concept,

...

    • and

...

    • Isoniazid

...

    • as

...

    • the

...

    • conceptAnswer.

...

    • )
    • Default: None
  • dateLabel: Text to display after the obs.value widget and before the obs.datetime widget. Specifying this implies showDate="true".
    • OPTIONAL
    • Example: <obs conceptId="5497" labelText="Most recent CD4:" dateLabel="Date of test:"/>
    • Value: Any quoted string
    • Default: None
  • defaultDatetime: (since version 1.7.4)  Specify a default value for an Obs of type date, time, or datetime.
    • OPTIONAL
    • Values: "now" to use the current date and time; "today" to use the current date with time 00:00;  a specific date in the format yyyy-MM-dd-HH-mm
    • Examples: <obs conceptId="5497" labelText="Sample test time:" defaultDatetime="now"/> <obs conceptId="5498" labelText="Request date:" defaultDatetime="today"/> <obs conceptId="5499" labelText="Last updated:" defaultDatetime="2011-04-18-23-05"/>
    • Default: None
  • defaultObsDatetime: (since version 1.7.4)  Every Obs has a datetime attribute to record when the Obs was made. This tag specifies a default datetime for an Obs of any type. If you also specify showDate="true" to display a datepicker for the obs.datetime , the datepicker will show this default. 
    • OPTIONAL
    • Values: "now" to use the current date and time; "today" to use the current date with time 00:00;  a specific date in the format yyyy-MM-dd-HH-mm
    • Examples: <obs conceptId="6000" labelText="Appearance:" defaultObsDatetime="now"/> <obs conceptId="6001" labelText="Appearance:" defaultObsDatetime="today"/> <obs conceptId="6002" labelText="Appearance:" defaultObsDatetime="2011-04-18-23-05"/>
    • Default: None
  • id: label that you can use to refer to this obs in javascript on the page
    • OPTIONAL
    • Example: <obs conceptId="5089" id="weight"/><obs conceptId="5090" id="height"/> <script>var bmi = getValue('weight.value') / Math.pow(getValue('height.value'), 2);</script>
    • Value: string
    • Default: None
    • Since 1.6.8
  • labelCode: Allows you to reference a label by a messages.properties code or a code in the translation mappings defined in the form.
    • OPTIONAL
    • Example: <obs conceptId="1234" labelCode="night_sweats"/>
    • Value: If referencing a translation mapping, the value for the labelCode attribute must be a valid name as defined within the <code> tag.
    • Default: None
  • labelNameTag: "default" will delegate to Concept.getBestName(Context.getLocale()). Currently that's the only legal tag.
    • OPTIONAL
    • Example: ?????
    • Value: "default"
    • Default: None
  • labelText: Sets the label that goes before the widget.
    • OPTIONAL
    • Example: <obs conceptId="3355" labelText="cause de décès:" />
    • Value: Any quoted string
    • Default: None
  • noLabel: Defines the label for the "no" option for all styles with a "no" parameter. Commonly used to change label from "No" to "non"
    • OPTIONAL
    • Example: <obs conceptId="6689" style="yes_no" noLabel="non" yesLabel="oui" />
    • Value: Any quoted string.
    • Default: "No"
  • required: Sets this field as a required field
    • OPTIONAL
    • Example: <obs conceptId="3453" required="true" />
    • Value: True or false
  • role: Limits the person drop-down list to only include persons who have an associated User account with specified Role
    • OPTIONAL
    • Only affects when style="person"
    • Example: <obs concept="PIH: Name of Rehabilitation educator" style="person" role="Rehab educator" />
    • Default: Provider 
  • rows: Number of rows in the textarea (implies style="textarea")
    • OPTIONAL
    • Example: <obs conceptId="3221" rows="7" cols="60" />
    • Value: Positive Integer
    • Default: None
  • showDate: Sets whether or not to show a date widget to set the obs.datetime for this obs
    • OPTIONAL
    • Example: <obs conceptId="3232" showDate="true" />
    • Value: True or false
    • Default: False
  • size: Specifies the size of a text field.
    • OPTIONAL
    • Example: <obs conceptId="2216" labelText="Résultats: " size="80" />
    • Value: Positive integer
    • Default:?
  • 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"
    • Default: Driven by datatype of associated concept.
  • value: When set to "false", a checked checkbox signifies a value of false for the concept. It inverts the normal relationship where a checked checkbox signifies "true".
    • OPTIONAL
    • Example: <obs conceptId="2146" style="checkbox" value="false" />
    • Value: True or false
    • Default: True
  • yesLabel: Defines the label for the "yes" option for all styles with a "yes" parameter. Commonly used to change label from "Yes" to "Oui"
    • OPTIONAL
    • Example: <obs conceptId="6689" style="yes_no" noLabel="non" yesLabel="oui" />
    • Value: Any quoted string.
    • Default: "Yes"
      Code Block

...