Skip to content

REDCap Record LinkML Schema

The single source of truth for the REDCap record representation — the actual shape of REDCap record data — as opposed to the data dictionary that describes it (see the sibling redcap_data_dictionary schema). REDCap's record model is a record (record_id) that, in longitudinal and/or repeating projects, contains repeating-instrument instances identified by (redcap_repeat_instrument, redcap_repeat_instance). This schema models that model in the two serializations the data uses: 1. FLAT — the native flat export (REDCap API content=record, type=flat, or the CSV/JSON download): a list of rows, one row per (record, event, repeat-instrument, repeat-instance), with all field variables side by side and an empty string for any field outside the row's instrument. FlatRecord models that row.

  1. STRUCTURED — the lossless record-grouped serialization: one object per record_id with its repeating-instrument instances nested in a repeated_elements list. StructuredRecord is the root and RepeatedElement is the (instrument, instance) wrapper. This is REDCap's own record model serialized hierarchically rather than as flat rows — a faithful re-grouping that adds and loses nothing. The lossless conversion between the two serializations is linkml_redcap.record.grouping.

Both serializations, and the conversion between them, are vendor-neutral: they depend only on REDCap's record/repeat model, so this package is useful to any REDCap user, not just RareLink. The structured envelope is deliberately generic and convention-free — it does NOT bucket fields into typed instrument classes, impose variable-naming rules, or define ontology/Phenopacket mappings. That semantic layer is the consuming project's job (the typed instrument classes that specialise StructuredRecord / RepeatedElement) and rarelink's job (the conventions and the Phenopacket/FHIR engine). Nothing RareLink-specific is defined or duplicated here. Scope (v1): the type=flat data, in its flat and structured serializations. REDCap's type=eav export (a long, one-datapoint-per-row entity-attribute- value format) and its CDISC ODM/XML hierarchy (a different event→form→item nesting) are out of scope; the structural slots here are the same discriminators EAV uses, so an EavRecord could be added later additively. Typing principle: REDCap exports every value as a string and uses an empty string for "no value". This schema provides a typed primitive for each REDCap value space (the date/time/number redcap_* types and the built-in enums) so a project's schema can give every field a defined range — never a bare string where REDCap actually constrains the value, and never Any.

URI: https://w3id.org/linkml/redcap-record

Name: redcap_record

Classes

Class Description
FlatRecord One row of a REDCap flat record export — a single element of the JSON export ...
RepeatedElement One instance of a repeating instrument inside a StructuredRecord, carryin...
StructuredRecord Root of the structured (record-grouped) serialization: one object per ``recor...

Slots

Slot Description
record_id The REDCap record identifier — the project's first field (primary key)
redcap_data_access_group The Data Access Group (DAG) the record belongs to, when DAGs are enabled and ...
redcap_event_name The unique event name of the row, for longitudinal projects
redcap_repeat_instance The 1-based instance number of the repeating instrument
redcap_repeat_instrument The machine name (form_name) of the repeating instrument this row / eleme...
redcap_survey_identifier The survey participant identifier, present on rows captured through a public ...
repeated_elements The repeating-instrument instances of a structured record, as a single list t...

Enumerations

Enumeration Description
CheckboxState The per-option export value of a REDCap checkbox field
FormCompleteStatus REDCap's universal completion-status value space, used by the ``_c...
TrueFalse Value space of a REDCap built-in truefalse field
YesNo Value space of a REDCap built-in yesno field

Types

Type Description
Boolean A binary (true or false) value
Curie a compact URI
Date a date (year, month and day) in an idealized calendar
DateOrDatetime Either a date or a datetime
Datetime The combination of a date and time
Decimal A real number with arbitrary precision that conforms to the xsd:decimal speci...
Double A real number that conforms to the xsd:double specification
Float A real number that conforms to the xsd:float specification
Integer An integer
Jsonpath A string encoding a JSON Path
Jsonpointer A string encoding a JSON Pointer
Ncname Prefix part of CURIE
Nodeidentifier A URI, CURIE or BNODE that represents a node in a model
Objectidentifier A URI or CURIE that represents an object in the model
RedcapDate A REDCap date_ymd value (YYYY-MM-DD) or an empty string
RedcapDatetime A REDCap datetime_ymd value (YYYY-MM-DD HH:MM, optionally with seconds an...
RedcapEmail A REDCap email-validated value or an empty string
RedcapInteger A REDCap integer-validated value (raw string) or an empty string
RedcapNumber A REDCap number-validated value with a dot decimal separator (raw string)...
RedcapTime A REDCap time value (HH:MM) or an empty string
Sparqlpath A string encoding a SPARQL Property Path
String A character string
Time A time object represents a (local) time of day, independent of any particular...
Uri a complete URI
Uriorcurie a URI or a CURIE

Subsets

Subset Description