When you do a patient search using the getPatient method and an exact identifier match, the result Patient object returned only contains the patient identifier searched for, not all the identifiers for that patient.
This bug first appeared in 1.11.x and appears to happen at the Hibernate level... I tracked it down to these PatientSearchCriteria method:
I confirmed that when doing a exact identifier search the following criteria is generated:
After the criteria.list() the resulting Patient object contains only a single identifier (in this case "Y2AX43") no matter how many identifiers the patient has.
The main patient REST object uses this search, so, concretely, if you make a call like:
The resulting object returns will contain an "identifiers" section with only that identifier, not all the patient's identifiers. This seems incorrect.