Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Page tree

Versions Compared

Key

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

...

  • drugNames: Determines which drug names appear in the list
    • REQUIRED
    • Example: <drugOrder drugNames='kaletra' />
    • Value: Comma separated list of drug id, drug name, drug UUID
    • Default: None
  • validateDose: Sets whether or not to validate the dose value (min, max of the dose)
    • OPTIONAL
    • Example: <drugOrder drugNames='kaletra' validateDose='true' />
    • Value: true or false
    • Default: false
  • instructionsLabel: Renders a text box for entering instructions for the drug order.
    • OPTIONAL
    • Example: <drugOrder drugNames="d4T 30,d4T 40" validateDose="true" instructionsLabel="Drug Order Instructions: "/>
    • Value: any text label for the instructions field
    • Default:none
  • drugLabels: This allows you to change the drug names that are displayed in the drop-down drug list. There have to be an equal number of drugLabels as drugNames to use this attribute, although validation will catch this if you forget.  
    • OPTIONAL
    • Example: <drugOrder drugNames="RIF 300,RHEZ,PZA 500,NVP Susp" drugLabels="RIF,RZ, PZ, NVP Syrup" />
    • Value: a comma-delimited set of drug names.  Names will be applied to the drugs in the drugName attribute, in order.
    • Default: none
    • NOTE: Adding Drug Type Headers to the dropdown list:  Also, I added a hacky syntax to the drugName attribute what can allow you to put drug type headers in the drugName dropdown widget. To insert a drug type header into the drug list, in the drugName list, you just insert the header with the forward-slash '/' character at the beginning and end of the drugName. For example, this is a valid tag: <drugOrder drugNames="RIF 300,RHEZ,PZA 500,/Syrups/,NVP Susp" drugLabels="RIF,RZ, PZ, NVP Syrup" hideDoseAndFrequency="true"/>. You'll notice that the drugNames attribue has 5 entries and the drugLabels attribute has only four labels. This works because the /Syrups/ isn't a real drug, so it isn't considered during validation. Finally, I've added validation that doesn't allow you to select a drug type header as a drug.
  • hideDoseAndFrequency:  Allows you to hide the dose and frequency text boxes that are rendered by the tag by default
    • OPTIONAL
    • Example: <drugOrder drugNames="RIF 300,RHEZ,PZA 500,/Syrups/,NVP Susp" drugLabels="RIF,RZ, PZ, NVP Syrup"  hideDoseAndFrequency="true"/>
    • Value: true/false
    • Default: false
    • NOTE: If this tag is used the drug order will be submitted using the drug strength from the concept drug definition. 
  • checkbox: This renders a checkbox for choosing to create a drugOrder for a single drug listed in the drugName attribute. Works nicely with the "hideDoseAndFrequency" tag above.  This tag will only be applied if there is EXACTLY one drug listed in drugName, and the select attribute is set to "true".
    • OPTIONAL
    • Example: <drugOrder drugNames="Terizidone (Trd)" drugLabels="TRD" checkbox="true" hideDoseAndFrequency="true"/>
    • Value:true/false
    • Default: false
  • discontinuedReasonConceptId: This creates a drop-down of coded reasons for discontinuing a regimen. This covers the valueCoded reason for discontinuing a regimen, and I'm currently waiting on a bug fix to 1.6+ to be able to support a text field for 'other' for discontinueReasonText.
    • OPTIONAL
    • Example: <drugOrder drugNames="d4T 30,d4T 40" validateDose="true" instructionsLabel="INSTRUCTIONS:" discontinuedReasonConceptId="1252"/>
    • Value:  a valid conceptId or uuid for the concept representing the reason for discontinuing drug question.  This concept must have conceptAnswers.
    • Default: none
  • showOrderDuration: This creates a text field that allows you to say what the duration of the order should be.  This, then, is applied as an autoExpireDate.
    • OPTIONAL
    • Example <drugOrder drugNames="Nelfinavir,Tenofovir (TDF)" showOrderDuration="true" /> 
    • Value:  true/false
    • Default: false
  • defaultDose:This sets a default dose that will be pre-entered in the drug order entry widget
    • OPTIONAL
    • Example <drugOrder drugNames="Ibuprofen" defaultDose="250"/>
    • Value: empty string or a string that can be converted to a Double
    • Default: none
  • toggle: For checkbox style fields only, specify the id of a div or span that you wish to hide or disable depending on whether the checkbox is checked or not.
    • OPTIONAL
    • The toggle attribute accepts two syntaxes (see below).
      • Basic: The basic syntax simply accepts the DOM id of the target div or span:
      • Code Block
        html
        html
        <obs conceptId="12" answerConceptId="116" answerLabel="Patient has a hat" style="checkbox" toggle="hatColors"/>
        
        <div id="hatColors">
           What color is your hat?
           <obs conceptId="101" answerConceptIds="309,374,377" answerLabels="red,green,blue" style="radio"/><br/>
           <obs conceptId="103" answerConceptId="394" answerLabel="Hat is warm" style="checkbox" id="hatWarmInd"/>
        </div>
      • Advanced: The more advanced syntax accepts a JSON structure with the attributes: id and style. The "id" attribute is the DOM id of target div/span that you wish to hide or disable. The "style" attribute accepts either "hide" (default) or "dim". The "hide" style completely hides the target div/span until the checkbox is checked. The "dim" style greys-out and disables the child components of the target div/span until the checkbox is checked.
      • Code Block
        html
        html
        <obs conceptId="12" answerConceptId="116" answerLabel="Patient has a hat" style="checkbox" toggle="{id: 'hatColors', style: 'dim'}"/>
        
        <div id="hatColors">
           What color is your hat?
           <obs conceptId="101" answerConceptIds="309,374,377" answerLabels="red,green,blue" style="radio"/><br/>
           <obs conceptId="103" answerConceptId="394" answerLabel="Hat is warm" style="checkbox" id="hatWarmInd"/>
        </div>
      • Advanced:  This syntax accepts the same toggle attribute but works with repeat tags, obsgroups, and tables.
      • Code Block
                    <repeat>
                        <template>
                            <obsgroup groupingConceptId="PIH:Family planning construct">
                                <tr>
                                    <td id="{comment}-fp">
                                        <obs conceptId="CIEL:374"
                                             answerConceptId="{fpMethod}"
                                             style="checkbox"
                                             toggle="{id: '{comment}-date', style: 'dim'}"
                                        />
                                    </td>
                                    <td class="{comment}-date">
                                        <obs conceptId="CIEL:163757"/>
                                    </td>
                                    <td class="{comment}-date">
                                        <obs conceptId="CIEL:163758"/>
                                    </td>
                                </tr>
                            </obsgroup>
                        </template>
                        <render fpMethod="CIEL:780" comment="Pill"/>
                        <render fpMethod="PIH:907" comment="Depo-provera"/>
                        <render fpMethod="CIEL:5622" comment="Other"/>
                    </repeat>
        
    • Version: Available since version 1.11.0

...