Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$populate on Questionnaire with a subject=Patient/A1 results in a reference of Patient/Patient/A1 #6201

Open
jwhiteside27 opened this issue Aug 7, 2024 · 1 comment

Comments

@jwhiteside27
Copy link

When using the populate operation against a questionnaire and supplying a Patient reference e.g.

https://FHIRSERVER.COM/fhir/Questionnaire/OSA/$populate?subject=Patient/A1

the QuestionnaireResponse returned provides a reference of
"reference": "Patient/Patient/A1"

If I omit the Patient/ element from the $populate operation I get the correct reference of
"reference": "Patient/A1"

However, the FHRI documentation - http://hl7.org/fhir/R4/questionnaireresponse.html states that the subject is of type Reference(any) so I should be able to assign a questionnaire to other individuals such as a Practitioner or RelatedPerson.

If I try and $populate a Questionnaire to a RelatedPerson e.g.

https://FHIRSERVER.COM/fhir/Questionnaire/OSA/$populate?subject=RelatedPerson/A1

I receive a QuestionnaireResponse reference of
"reference": "Patient/RelatedPerson/A1"

Can you please clarify if this is a bug or the Clinical Reasoning module is only intended to assign questionnaires to Patients - which is not documented, and in the FHIR documentation appears to be restrictive against the specification.

  • HAPI FHIR Version
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]

This testing was performed using POSTman with the JPA Server 7.0.2 using FHIR R4.

@jwhiteside27
Copy link
Author

jwhiteside27 commented Aug 22, 2024

Additional to the reference issue above, The Questionnaire resource contained within the QuestionnaireResponse Resource is generated with an ID equal to that of the subject in the $populate call, e.g. server/Questionnaire/OSA/$populate?subject=Patient/ID1

results in...
{
"resourceType": "QuestionnaireResponse",
"id": "ID1-response",
"contained": [
{
"resourceType": "Questionnaire",
"id": "ID1",
"meta": {
"source": "#w1Plno23WNoP4RT6"
},

Surely the ID of the contained resource should be that of the Questionnaire itself (in this case OSA) rather than the id of the patient (ID1)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant