Carrot MapperDeveloper GuideInternal data structures

Internal data structures

Overview of the data structures and nomenclature

Django ORM

The Django ORM has access to the models displayed in the diagram below, which also illustrates the ForeignKey or GenericRelation links between the objects.

All models under the heading “mapping” are available in Postgresql under the public schema, e.g. public.mapping_omopfield. Models associated with OMOP are available in Postgresql under the omop schema e.g. omop.person.

Diagram

Lookup Table

NameDescriptionExample(s)Django Model
Destination FieldOutput OMOP column/field name in the CDMperson_id, condition_source_valueOmopField
Destination TableOutput OMOP table name in the CDMperson, condition_occurrenceOmopTable
Source ValueInput value of given row/cellM, FEMALE, YESScanReportValue
Source FieldInput column/field nameGOSH::sex, GOSH::ethnicityScanReportField
Source TableInput table nameGOSH:: 2costar. CoConnect_db_serologyScanReportTable
Source ReportInput Scan ReportGOSH::CO-STARSScanReport
OMOP ConceptOMOP object defining a code and concept_id with a name and domain8507 (MALE) [Gender]Concept
Term MappingAssociation between a Concept and a so-called content_object (ScanReportField or ScanReportValue)“M” -> 8507ScanReportConcept