Skip to content

Unable to Query Extensions Values #1303

@kreddys

Description

@kreddys

Description

When attempting to query FHIR extensions using ViewDefinition, the expected results are not returned. However, the same FHIRPath works correctly in FHIRPath.js.

Steps to Reproduce

  1. Use the following Patient resource sample:
{
    "resourceType": "Patient",
    "id": "1238",
    "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": "2186-5",
                        "display": "Not Hispanic or Latino"
                    }
                },
                {
                    "url": "text",
                    "valueString": "Not Hispanic or Latino"
                }
            ]
        }
    ]
}
  1. Use the following ViewDefinition query:
{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "text": "Minimal ViewDefinition for testing extensions",
  "fhirVersion": ["4.0"],
  "select": [
    {
      "column": [
        {
          "path": "getResourceKey()",
          "name": "id"
        },
        {
          "path": "extension.where(url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').extension.where(url = 'ombCategory').valueCoding.display",
          "name": "extension_debug"
        }
      ]
    }
  ],
  "name": "patient_minimal",
  "status": "draft",
  "resource": "Patient"
}
  1. Test in views tab (or) Run Full Pipeline:

Expected Outcome

  • The FHIRPath should correctly return Not Hispanic or Latino.
  • This works in FHIRPath.js, but not in fhir-data-pipes.

Actual Outcome

  • The FHIRPath returns null for extension_debug column

Request for Assistance

Please help determine if this is an issue with fhir-data-pipes ViewDefinition processing or if there is a mistake in the query format.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions