Skip to content

REDCap data dictionary adapter for canonical DD format #204

@amc-corey-cox

Description

@amc-corey-cox

Scope

Second adapter in the linkml-map-driven adapter family (#202 umbrella). Implements bidirectional translation between REDCap data dictionary CSV format and the canonical DD format from #191.

Builds on the shared infrastructure landed by the Frictionless adapter (codes serialization utility, CLI scaffolding, structural form of `codes`).

Deliverables

Source-format LinkML schema

LinkML schema describing the REDCap data dictionary CSV columns:

  • `Variable / Field Name`, `Form Name`, `Section Header`
  • `Field Type`, `Field Label`, `Field Note`
  • `Choices, Calculations, OR Slider Labels`
  • `Text Validation Type OR Show Slider Number`, `Text Validation Min`, `Text Validation Max`
  • `Identifier?`, `Branching Logic (Show field only if...)`, `Required Field?`
  • Plus survey-specific columns we don't strictly need but the source format must accept.

Trans-specs

  • REDCap → DD
  • DD → REDCap

Mapping notes:

  • REDCap's UI-flavored Field Type vocabulary (`radio`, `dropdown`, `checkbox`, `yesno`, `truefalse`) collapses to DD's `permissible_values`, with `checkbox` carrying an implicit `multivalued: true` (Spec B).
  • REDCap's `Text Validation Type` (email, integer, date_*, etc.) is lossy onto DD `string`/`integer`/`date`/`datetime`/`time` since DD v1 doesn't have a `format` refinement field.
  • REDCap's `Choices` encoding (`0, Female | 1, Male`) maps directly to DD codes — same pipe-and-comma style. The codes serialization utility from Frictionless Table Schema adapter for canonical DD format #203 handles parsing.

Tests

  • Test fixtures from `redcap-tools/redcap-test-datasets` (the cases in `archer/`, `case-01`, `case-07`, `case-20`).
  • Roundtrip where structurally equivalent.

Sub-issue of #202.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions