Hi there,
I am trying to figure out how combo-code-value-quantity for Observation should work.
Assume we have a Observation document with the following snippets:
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "85354-9",
"display": "Bood pressure panel with all children optional"
}
],
"text": "Blood pressure systolic & diastolic"
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8480-6",
"display": "Systolic blood pressure"
},
{
"system": "http://snomed.info/sct",
"code": "271649006",
"display": "Systolic blood pressure"
},
{
"system": "http://acme.org/devices/clinical-codes",
"code": "bp-s",
"display": "Systolic Blood pressure"
}
]
},
"valueQuantity": {
"value": 107,
"unit": "mmHg",
"system": "http://unitsofmeasure.org",
"code": "mm[Hg]"
},
"interpretation": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0078",
"code": "N",
"display": "normal"
}
],
"text": "Normal"
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8462-4",
"display": "Diastolic blood pressure"
}
]
},
"valueQuantity": {
"value": 60,
"unit": "mmHg",
"system": "http://unitsofmeasure.org",
"code": "mm[Hg]"
},
"interpretation": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0078",
"code": "L",
"display": "low"
}
],
"text": "Below low normal"
}
}
]
Here are some search query and expected behaviors:
combo-code-value-quantity=http://loinc.org|85354-9$107|http://unitsofmeasure.org|mm[Hg]
This should match since it’s searching by using code “blood pressure” with value 107.
combo-code-value-quantity=http://loinc.org|8480-6$107|http://unitsofmeasure.org|mm[Hg]
combo-code-value-quantity=http://snomed.info/sct|271649006$107|http://unitsofmeasure.org|mm[Hg]
These should match since it’s searching by using code “Systolic blood pressure” with value 107.
combo-code-value-quantity=http://loinc.org|8462-4$60|http://unitsofmeasure.org|mm[Hg]
This should match since it’s searching by using code “Diastolic blood pressure” with value 60.
combo-code-value-quantity=http://loinc.org|8480-6$60|http://unitsofmeasure.org|mm[Hg]
This should not match since it’s searching by using code “Systolic blood pressure” with value 60, which is not true.
Is my understanding above correct? Logically speaking, the last one should not match since Systolic value is not 60. Running the search through HAPI, it would actually match. So I am trying to figure out if my understanding is incorrect or if this is a bug in HAPI.