0

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

1 Answers1

0

The search syntax you've used is only correct in the second line, but other than that you're not doing anything wrong. This is a known issue in the Spark server (see https://github.com/furore-fhir/spark/issues/6).

Mirjam Baltus
  • 2,035
  • 9
  • 13