According to the docs, you should be able to search for all encounters of a patient with /Encounter?patient.identifier=XYZ. However, when attempting this query https://openmrs-spa.org/openmrs/ws/fhir/Encounter?patient.identifier=8673ee4f-e2ab-4077-ba55-4980f408773e you can an error showing patient.identifier can not be handled.
On reviewing the code, we have a small bug at https://github.com/openmrs/openmrs-module-fhir/blob/master/omod/src/main/java/org/openmrs/module/fhir/providers/RestfulEncounterResourceProvider.java#L82. The parameter name should be :
Thanks to James Agnew for his assistance with debugging.