The global property visits.encounterTypeToVisitTypeMapping takes in encounter type id and visit type id pairs but this can't be used in an environment using the sync module since ids are not globally unique, the global property should be able to allow defining uuids of visit types and encounter types too. This means one can specify a encounter_type_uuid/visit_type_id or a encounter_id/visit_type_uuid or encounter_uuid/visit_uuid or encounter_id/visit_id mapping.
What needs to be done:
- Edit ExistingOrNewVisitAssignmentHandler.getVisitType(Encounter encounter) to look up encounter types and visit types by uuids
- Include unit tests to ensure that the fix is working for all the 4 various forms of mappings