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

<encounterDiagnoses></encounterDiagnoses> after <obsGroup></obsGroup> with empty obs throws validation error

    XMLWordPrintable

Details

    • Bug
    • Status: Approved
    • Must
    • Resolution: Fixed
    • Reference Application 2.9.0
    • Core Apps
    • None
    • M

    Description

      1. Environment
      • Ref App 2.9
      • Core Apps 1.22.0
      • Core 2.2
      2. Steps to reproduce

      Stacking <encounterDiagnoses/> together with <obsgroup/> with a use case such as shown below throws ValidationException when used with OpenMRS Core 2.2.x and form submitted with empty values for the obs group members. An example form to reproduce this is in the attachments section.

      <htmlform>	
           .......
           <obsgroup groupingConceptId=....>		
                <obs conceptId=..../> 
                .......
                .......	
           </obsgroup>
           ......	
           <encounterDiagnoses/>	
      </htmlform>
      
       3. Proposed solution

      <encounterDiagnoses/> submission handler should delegate to 

      HtmlFormEntryService.applyActions()
      

       when saving an encounter to take care of empty obs.

       An example with failing test can be found here.

      Gliffy Diagrams

        Attachments

          Activity

            People

              ruhanga Nathan Ruhanga
              ruhanga Nathan Ruhanga
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: