Stream: implementers
Topic: Open FHIR Servers that support Contained Resource
Raheel Sayeed (Sep 28 2021 at 21:55):
I have played with a few sandboxes (Logicahealth, smart sandbox) that – although accept FHIR resources that have contained-resources but ignored the reference and return the resource __without__ the contained resource.
Any open sandbox that supports contained resource?
Josh Mandel (Sep 28 2021 at 21:57):
Wait, are you saying that these sandboxes strip contained resources from a resource when invoking the create
operation?
Lloyd McKenzie (Sep 29 2021 at 02:31):
That's generally not desired behavior...
Grahame Grieve (Sep 29 2021 at 06:10):
test.fhir.org does, but it doesn't have a sandbox arrangement
Raheel Sayeed (Sep 29 2021 at 06:46):
Okay, I tested some resources with contained.. it works on logica and smart sandboxes
However,
Creating a QuestionnaireResponse
that contains its Questionnaire
is createed but fails to retain the contained Questionnaire
. The same resource works just fine on test.fhir.org. (returns the Contained Resource). Both logica and smart sandboxes are backed by HAPI.
update: also working on http://hapi.fhir.org/baseR4/
{
"questionnaire":"#51EF8C9A-2C9D-4F9A-A70A-D7431341A067",
"subject":{
"reference":"Patient\/8d1f86a8-3284-43bd-b45e-5931948c97e4"
},
"identifier":{
"system":"http:\/\/loinc.org",
"value":"64206-6"
},
"contained":[
{
"status":"draft",
"subjectType":[
"Patient",
"Person"
],
"code":[
{
"system":"http:\/\/loinc.org",
"code":"64206-6",
"display":"Have you had any treatment for high blood pressure (hypertension) in the past 10 years?"
}
],
"identifier":[
{
"system":"http:\/\/loinc.org",
"value":"64206-6"
}
],
"title":"On Hypertensive Medication",
"id":"51EF8C9A-2C9D-4F9A-A70A-D7431341A067",
"version":"1.0",
"date":"2020-11",
"resourceType":"Questionnaire",
"name":"On Hypertensive Medication",
"item":[
{
"type":"boolean",
"text":"Are you currently taking any medications for hypertension?",
"required":true,
"linkId":"1",
"code":[
{
"display":"Have you had any treatment for high blood pressure (hypertension) in the past 10 years?",
"system":"http:\/\/loinc.org",
"code":"64206-6"
}
]
}
]
}
],
"authored":"2021-09-29T06:29:33.8823Z",
"status":"completed",
"resourceType":"QuestionnaireResponse",
"item":[
{
"text":"Are you currently taking any medications for hypertension?",
"answer":[
{
"valueBoolean":true
}
],
"linkId":"1"
}
]
}
Josh Mandel (Sep 29 2021 at 13:18):
To clarify, are you saying this behavior is specific to contained Questionnaires? (You mentioned "I tested some resources with contained.. it works on logica and smart sandboxes" above.)
Josh Mandel (Sep 29 2021 at 13:23):
https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-storage/ca/uhn/fhir/jpa/api/config/DaoConfig.html doesn't appear to mention settings specific to contained behavior, but I may be missing something. (@James Agnew, is there a setting that would tell HAPI to strip contained Questionnaires from submitted QuestionnaireResponses?)
Raheel Sayeed (Sep 29 2021 at 15:47):
Josh Mandel said:
To clarify, are you saying this behavior is specific to contained Questionnaires? (You mentioned "I tested some resources with contained.. it works on logica and smart sandboxes" above.)
Yes, appears to only be specific to contained Questionnaires within QuestionnaireResponse.
When QR contains and references a Patient resource--> works as expected, returns QR contained with patient. But not questionnaire.
Here's the response:
{
"resourceType": "QuestionnaireResponse",
"id": "1084",
"meta": {
"versionId": "1",
"lastUpdated": "2021-09-29T15:45:58.265+00:00"
},
"contained": [ {
"resourceType": "Patient",
"id": "patsub",
"identifier": [ {
"system": "http://cancer.questionnaire.org/systems/id/patientnr",
"value": "A34442332"
}, {
"type": {
"text": "Dutch BSN"
},
"system": "urn:oid:2.16.840.1.113883.2.4.6.3",
"value": "188912345"
} ],
"gender": "male",
"birthDate": "1972-11-30"
} ],
"questionnaire": "http://fhir.acme.org/Questionnaire/123|#51EF8C9A-2C9D-4F9A-A70A-D7431341A067",
"status": "completed",
"subject": {
"reference": "#patsub"
},
"authored": "2021-09-29T06:29:33.8823Z",
"item": [ {
"linkId": "1",
"text": "Are you currently taking any medications for hypertension?",
"answer": [ {
"valueBoolean": true
} ]
} ]
}
Raheel Sayeed (Sep 29 2021 at 15:52):
Tried also experimenting with the canonical reference!
Eric Haas (Sep 29 2021 at 16:58):
When I PUT or POST a QR with a contained Q to the UHN HAPI R4 Server, the contained Q is still there when I fetch it?
Raheel Sayeed (Sep 29 2021 at 18:15):
Yep! just checked, hapi.fhir.org/baseR4 definitely works. I guess it was just r4.smarthealthit.org and sandbox.logicahealth.
Last updated: Apr 12 2022 at 19:14 UTC