In the case of an existing visit, since it is already associated to a patient, when adding encounters, the encounter widget should allow restricting the results to the same patient to stop users from carelessly adding invalid encounters belonging to other patients.
- Add a patientId attribute to the tag and edit the encounter call back in OpenmrsAutoComplete.js to take in an argument for the patientId
- If the attribute is specified the autocomplete should be auto populated with results when the input field gains focus
- Add a DWREncounterService method that takes in a patientId
- Update the visitForm to make use of the new attribute