I have a Patient resource at this url: http://localhost:49911/fhir/Patient/PHFId1
and DocumentReference resource with the following element:
<subject>
<reference value=" http://localhost:49911/fhir/Patient/PHFId1" />
</subject>
I want to be able to get a list of all DocumentReferences belonging to a certain patient but everything I have tried either returns no results, or else returns all Document References on the system. Some of the variations I have tried include:
fhir/Patient/PHFId1/DocumentReference (404 Not Found)
fhir/DocumentReference?subject:Patient=PHFId1 (no results)
fhir/DocumentReference?fhir/Patient/PHFId1 (no results)
fhir/DocumentReference?subject.reference=PHFId1 (no results)
What am I doing wrong? It must be a common use case to require a list of all documents relating to a Patient. Perhaps I have set up the linkage incorrectly by using the subject element?
Thanks in advance