Fact Relationship
The FACT_RELATIONSHIP table contains records about the relationships between facts stored as records in any table of the CDM. Relationships can be defined between facts from the same domain (table), or different domains.
Examples of Fact Relationships include:
- Person relationships (parent-child)
- Care Site relationships (hierarchical organizational structure of facilities within a health system)
- Indication relationship (between drug exposures and associated conditions)
- Usage relationships (of devices during the course of an associated procedure)
- Facts derived from one another (measurements derived from an associated specimen)
Field | Required | Type | FK Table | Description |
---|---|---|---|---|
domain_concept_id_1 | Yes | bigint | CONCEPT | The concept representing the domain of fact one, from which the corresponding table can be inferred. |
fact_id_1 | Yes | bigint | The unique identifier in the table corresponding to the domain of fact one. | |
domain_concept_id_2 | Yes | bigint | CONCEPT | The concept representing the domain of fact two, from which the corresponding table can be inferred. |
fact_id_2 | Yes | bigint | The unique identifier in the table corresponding to the domain of fact two. | |
relationship_concept_id | Yes | bigint | CONCEPT | A foreign key to a Standard Concept ID in the Standardized Vocabularies, representing the kind of relationship. |
last_updated_datetime | Yes | datetime | Initially this is the time the row was written to OMOP. If the row is subsequently updated, it then becomes the most recent update time. | |
deleted_datetime | No | datetime | NULL
initially. Set to the time when the row was marked for deletion. A value in this column sent to the central data source will result in this row being deleted (by person_id) from the combined dataset. Deletions only need to be sent once. |
Conventions
-
All relationships are directional, and each relationship is represented twice symmetrically within the FACT_RELATIONSHIP table. For example, for two Persons where person_id = 1 is the mother of person_id = 2, then two records are created:
domain_concept_id_1 fact_id_1 domain_concept_id_2 fact_id_2 relationship_concept_id 56|Person
1 56|Person
2 4248584|Mother
56|Person
2 56|Person
1 4285883|Child