Skip to content

Refactor EQ-5D-5L pipeline: route dimension responses to Observation, VAS/index to Measurement, and remove hardcoded linkId-to-concept mappings #3047

Description

@csafreen

Update the EQ-5D-5L processing pipeline so that data from the EQ-5D-5L QuestionnaireResponse is split correctly across FHIR-derived tables, and the StructureMap sources concept mappings dynamically from the Questionnaire resource rather than hardcoding them.

Requirements:

Data routing
The 5 dimension responses (mobility, self-care, usual activities, pain/discomfort, anxiety/depression) from the EQ-5D-5L QuestionnaireResponse → written to the Observation table, one row per dimension.
The VAS (visual analogue scale) score → written to the Measurement table.
The calculated index value (from the country-specific value set, per prior ticket) → written to the Measurement table.
Remove hardcoded concept IDs from the StructureMap
The StructureMap currently hardcodes concept IDs per linkId for the 5 dimensions, VAS, and index value — this must be removed.
Concept mappings must instead be sourced from the Questionnaire FHIR resource itself (e.g., via item.code on each question, or a defined extension), so the StructureMap resolves the target concept dynamically at transform time based on the linkId → Questionnaire.item.code lookup.
This ensures the Questionnaire resource is the single source of truth for linkId-to-concept mapping, and the StructureMap remains reusable/maintainable without code changes if linkIds or concepts change.
Pipeline updates
Update pipeline logic to:
Parse the Questionnaire resource alongside the QuestionnaireResponse to resolve linkId → concept mappings dynamically.
Route the 5 dimension answers to Observation with correct concept mapping.
Route VAS and index value to Measurement with correct concept mapping.
Preserve the earlier requirement: index value calculation using country-specific EQ-5D-5L value set, with overwrite behavior on re-run for a different country code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions