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

Cohort Membership: Resolve design inconsistents

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Medium

    Description

      Break the following tasks into subtasks or other tickets that are ready for work:

      1. Make these methods behave like typical Java Collection of membership (excluding voided memberships):

      • contains(Integer patientId) - true if any non-voided membership for patient
      • size() - total number of non-voided memberships
      • isEmpty() - true if size() == 0

      2. Refactor getMemberships() to exclude voided memberships.

      3. Add methods for interacting with active memberships directly at Cohort level:

      • hasActiveMembership(Integer patientId) - true if has active membership for patient
      • activeMembershipSize() - number of active memberships
      • hasNoActiveMemberships() - true if activeMembershipSize() == 0

      4. Implement CohortMembership.equals() to return true if patient, start, end end dates match

      Will not be covered by this ticket:

      • Is "voided" really necessary for CohortMemberships?
      • Unclear what the union, intersect and subtract utility method should do; ie, do they take the dates into account?  (I believe right now they don't.)

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                fruether Fred Rue
                mogoodrich Mark Goodrich
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: