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

When creating a visit automatically because an encounter is created, we need a flexible way to setting visit.location different from the encounter's location

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Non-Essential
    • Resolution: Change Implemented
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Complexity:
      Medium

      Description

      (Either add this functionality to ExistingOrNewVisitAssignmentHandler in core, or else to a new class in the visit management module.)

      We should support the use case where the patient has an encounter an "Hospital Xyz Ward A" but we want this to create a visit at "Hospital Xyz" rather than in the specific ward.

      I propose supporting a configuration property on the handler that is a LocationTag. Then when creating the new visit, we'd step up through the location hierarchy from encounter.location until we find one with the specified tag. ("Hospital" in our example.) If you don't find a location in the hierarchy with that tag, just use encounter.location.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: