FHIR Chat · Definition-based extraction with extensions · questionnaire

Stream: questionnaire

Topic: Definition-based extraction with extensions


view this post on Zulip Nitin Sabale (Mar 22 2022 at 11:49):

When using definition based extraction to extract resources, what will be the right way to add definition for a questionnaire where resource can be extracted with extensions.

Ex. Following is an sample questionnaire
{
"type" : "Questionnaire",
...
"item":[
{
"type": "choice",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop Down"
}
],
}
}
],
"definition" : "???????",
"linkId": "religion",
"text": "Religion",
"answerOption": [
{
"valueCoding": {
"code": "1013",
"display": "Christian",
"system": "http://terminology.hl7.org/CodeSystem/v3-ReligiousAffiliation"
}
},
{
"valueCoding": {
"code": "1023",
"display": "Islam",
"system": "http://terminology.hl7.org/CodeSystem/v3-ReligiousAffiliation"
}
},
]
}
]

}

Patient(http://build.fhir.org/ig/WorldHealthOrganization/smart-anc/StructureDefinition-anc-patient.html) resource has field patient-religion which is an extension.
Now I wanted to know what value I need to put in the definition field(??????), to get the answer extracted?

Let me know if there are any working examples which I can look at. anc-patient.PNG

view this post on Zulip Lloyd McKenzie (Mar 22 2022 at 13:39):

I don't think we've talked about this. My leaning would be for the FHIRPath to allow the 'extension' element - so you could use extension('whatever').value. Can you submit a tracker item for us to talk about this and make it explicit in the spec?

view this post on Zulip Brian Postlethwaite (Mar 22 2022 at 20:44):

It's the value from the elementdefinition.id in the referenced StructureDefinition isn't it?

view this post on Zulip Brian Postlethwaite (Mar 22 2022 at 20:47):

https://sqlonfhir-r4.azurewebsites.net/fhir/Questionnaire/prac-ext-demo/_history/11?_format=html

view this post on Zulip Brian Postlethwaite (Mar 22 2022 at 20:49):

If you use that form and create some a QR you can try out the $extract on that server.

view this post on Zulip Brian Postlethwaite (Mar 22 2022 at 20:52):

https://sqlonfhir-r4.azurewebsites.net/fhir/QuestionnaireResponse/a0680f7c05bf407093e9993897832729

view this post on Zulip Brian Postlethwaite (Mar 22 2022 at 20:53):

https://sqlonfhir-r4.azurewebsites.net/fhir/QuestionnaireResponse/a0680f7c05bf407093e9993897832729/$extract

view this post on Zulip Kashyap Jois (Mar 24 2022 at 08:54):

Lloyd McKenzie said:

I don't think we've talked about this. My leaning would be for the FHIRPath to allow the 'extension' element - so you could use extension('whatever').value. Can you submit a tracker item for us to talk about this and make it explicit in the spec?

Hi @Lloyd McKenzie , should we raise a tracker item in Jira?

view this post on Zulip Kashyap Jois (Mar 24 2022 at 11:09):

Brian Postlethwaite said:

It's the value from the elementdefinition.id in the referenced StructureDefinition isn't it?

Thanks, the example that you shared with the server works! We did some debugging and found that the implementation of the extraction piece in android fhir sdk is restricted to fields present in the resource .java:class (i.e. org.hl7.fhir.r4.model.*) . So that means extensions cant be extracted using splicing since it is not supported in the SDK.

cc: @Jing Tang

view this post on Zulip Lloyd McKenzie (Mar 24 2022 at 16:17):

@Kashyap Jois - yes please


Last updated: Apr 12 2022 at 19:14 UTC