Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-1853

latestobsforconceptlist formats wrongly as bold label and value



    • L


      latestobsforconceptlist show bold sections in the items and not in the title.

      2. Steps to reproduce

      1) Add a new HFE form definition

      Create a new HFE form at https://qa-refapp.openmrs.org/openmrs/module/htmlformentry/htmlForms.list

      Paste the below HTML definition for the form that gets hooked to the existing 'Visit Note' encounter type:

      <htmlform formUuid="c75f120a-04ec-11e3-8780-2b40bef9a44b" formName="Target Group" formEncounterType="d7151f82-c1f3-4152-a605-2f9ea7414a79" formVersion="1.0"> 
           <style type="text/css">        #who-when-where
       {             margin-bottom: 6px;             border-bottom: 1px solid #ccc;         }
               #who-when-where p
       {             display: inline-block;             padding-right: 20px;         }
               #where > input[type=text]
       {             display: inline-block;         }
       {             color: #ff6666;             font-size: 1.1em;             display: block;         }
               <ifMode mode="VIEW" include="false">            #data-collection
       {                 display: inline-block;                 width: 58%;                 vertical-align: top;             }
       {                 display: inline-block;                 width: 40%;                 vertical-align: top;             }
       {                 margin-bottom: 20px;             }
               </ifMode>    </style> 
           <ifMode mode="VIEW" include="false">        <h2><uimessage code="referenceapplication.visitNote.title"/></h2> 
               <div id="who-when-where">            <p id="who">                <label><uimessage code="coreapps.patientDashBoard.provider"/></label>                <span><encounterProvider default="currentUser" required="true"  /></span>            </p>            <p id="when">                <label><uimessage code="coreapps.patientDashBoard.location"/></label>                <span><encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/></span>            </p>            <p id="where">                <label><uimessage code="coreapps.patientDashBoard.date"/></label>                <span><encounterDate id="encounterDate" default="now" /></span>            </p>        </div>    </ifMode> 
           <div id="data-collection"> 
               <encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target"/> 
               <p>            <label><uimessage code="coreapps.consult.freeTextComments"/></label>            <obs conceptId="CIEL:162169" style="textarea" rows="5"/>        </p> 
           </div>    <div id="data-collection"> 
               <obsgroup groupingConceptId="CIEL:5090">        <p>            <label><lookup expression="fn.getConcept('CIEL:5090').name"/></label>            <obs conceptId="CIEL:5090" style="textarea" rows="5"/>        </p>        </obsgroup> 
           <obsgroup groupingConceptId="CIEL:5089"> 
                   <label><lookup expression="fn.getConcept('CIEL:5089').name"/></label>            <p>                <obs conceptId="CIEL:5089" id="weight" showUnits="uicommons.units.kilograms" unitsCssClass="append-to-value"/>            </p>        </obsgroup> 
           </div>    <div id="encounter-diagnoses-target">    </div> 
           <ifMode mode="VIEW" include="false">        <div id="buttons">            <submit submitClass="confirm right" submitCode="general.save"/>            <button type="button" class="cancel"><uimessage code="general.cancel"/></button>        </div>    </ifMode> </htmlform>
      2) Add the form to the 'Visit Actions' menu:

      Go to https://qa-refapp.openmrs.org/openmrs/formentryapp/forms.page?app=formentryapp.forms :

      3) Configure the obsacrossencounters widget app definition

      Use this for the App ID:


      Use this as the Json definition:


              "id" : "TypesOfViolence",
              "instanceOf" : "coreapps.template.dashboardWidget",
              "description" : "mhpssDashboard.targetGroup.programType.widgetLabel",
              "order" : 220,
              "config" : {
                  "widget" : "latestobsforconceptlist",
                  "icon" : "icon-user-md",
                  "label" : "Types Of Violence",
                  "encounterTypes": "d7151f82-c1f3-4152-a605-2f9ea7414a79"
              "extensions" : [
                      "id" : "mhpssDashboard.TypesOfViolence.extension",
                      "appId" : "TypesOfViolence",
                      "extensionPointId": "patientDashboard.secondColumnFragments",
                      "extensionParams" : {
                          "provider" : "coreapps",
                          "fragment" : "dashboardwidgets/dashboardWidget"
      4) Generate data to trigger the bug
      1. Start a visit if you don’t have one.
      2. Open the new form 'Target Group'.
      3. On that form fill Height (cm) and Weight (kg), so our widget get some information.

      After saving, observe that the widget show the answer in bold but the title of the group is not bold. (they are switched)






      Gliffy Diagrams




              jfigueiredo Joel Figueiredo
              jfigueiredo Joel Figueiredo
              0 Vote for this issue
              3 Start watching this issue