See the #TODO in search_fhir_patient4.py
A number of patient attributes are recorded as extensions.
A query needs to be formulated which queries for a specific value of a specific patient attribute (extension).
Suggest we do not rely on positional references to extensions in the way I did in the code above. We should be compare this with an example of how this equivalent query would be done in native FHIR e.g. via fhirpy.
"extension": [
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
"extension": [
{
"url": "ombCategory",
"valueCoding": {
"system": "urn:oid:2.16.840.1.113883.6.238",
"code": "2135-2",
"display": "Hispanic or Latino"
}
},
{
"url": "text",
"valueString": "Hispanic or Latino"
}
]
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
"extension": [
{
"url": "ombCategory",
"valueCoding": {
"system": "urn:oid:2.16.840.1.113883.6.238",
"code": "2106-3",
"display": "White"
}
},
{
"url": "text",
"valueString": "White"
}
]
}
]
See the #TODO in search_fhir_patient4.py
A number of patient attributes are recorded as extensions.
A query needs to be formulated which queries for a specific value of a specific patient attribute (extension).
Suggest we do not rely on positional references to extensions in the way I did in the code above. We should be compare this with an example of how this equivalent query would be done in native FHIR e.g. via fhirpy.