Skip to content

omop-alchemy currently enforces a shared ValueMixin rule requiring at least one of value_as_number or value_as_concept_id to be set #25

Description

@gkennos

This is too strict for OMOP CDM v5.4 and blocks valid rows in observation and measurement.

The current mixin adds:

  • a DB check constraint: value_as_number IS NOT NULL OR value_as_concept_id IS NOT NULL
  • an assignment-time validator raising ValueError("At least one of value_as_number or value_as_concept_id must be set")

This rule is inherited by:

  • Observation
  • Measurement
  • Metadata

For Observation, OMOP allows the value to be represented via:

  • value_as_concept_id
  • value_as_number
  • value_as_string

For Measurement, OMOP does not require a captured result value on every row. As a result, valid CDM rows can be rejected by the ORM even though they conform to OMOP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions