Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2896

change functionality of isObsGrouping method to return hasGroupMembers(true) instead of hasGroupMembers(false)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.9.0, OpenMRS 1.9.1, 1.9 Road Map Sprint 2, 1.9 Road Map Sprint 3, Platform 1.10.0
    • Fix Version/s: OpenMRS 1.9.0, Platform 1.10.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      In 1.9.0, the default parameter-less obs.hasGroupMembers() and obs.isObsGrouping() methods return true if the obs in question havs 1 or more non-voided member obs.

      This seems like the right behavior for hasGroupMembers (and there also now a hasGroupMembers(Boolean includeVoided) if you want to override this behavior) but I would think perhaps that obs.isObsGrouping() should return true if the obs in question has 1 or more members obs of any type, voided or non-voided.

      The logic is like this... if you have an obs that has two child obs that are both voided, even though I would say it "has no group members" I would still consider it "an obs grouping".

      The fix would be as simple as changing the isObsGrouping() method to return hasGroupMembers(true) instead of hasGroupMembers(false) and then to update any relevant unit tests accordingly.

      This change would need to be made in the 1.9.x and trunk branches.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  mogoodrich Mark Goodrich
                  Reporter:
                  mogoodrich Mark Goodrich
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: