unresolvable fk cycles between concept and concept_class
还没有人认领这个 Issue。
评估
调研方向
从 ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_ddl.sql 的第 422 行和第 444 行附近开始,然后检查 OMOPCDM_postgresql_5.4_constraints.sql 中第 156 行和第 159 行附近对应的外键定义。确定 schema 是否提供了能够保留这两个约束的受支持插入路径;记录经过验证的操作步骤或所需的 schema 修正,并提供一个可复现的示例,展示可以插入 concept 和 concept_class 数据。
由索引模型根据 Issue 内容生成。
描述
Howdy lovely CDM Community,
i am new to all this and i am in the process to create a bunch of python representations for the OMOP-CDM Model (https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models) .
Now i ran into a problem with the CDM schema leaving me scratching my head:
In 5.4 we have the table concept which has a NOT NULL-able foreign key that references concept_class
FK Col
concept_class_idinconcept: https://github.com/OHDSI/CommonDataModel/blob/main/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_ddl.sql#L422FK definition: https://github.com/OHDSI/CommonDataModel/blob/main/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql#L156
At the same time we have a NOT NULL-able foreign key in concept_class that references concept
FK Col
concept_class_concept_idinconcept_class- https://github.com/OHDSI/CommonDataModel/blob/main/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_ddl.sql#L444FK definition: https://github.com/OHDSI/CommonDataModel/blob/main/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql#L159
The problem is if i want to create a new row in concept i need an existing concept_class to reference but if i want to create concept_class i need an existing concept to reference but if i want to create a new concept... you get the point :)
How am i supposed to insert concept data without having some cumbersome scripts that will disable constraints under certain circumstances (which runs against the whole idea of having a data model with constraints in the first place)
I could not find any information on how to solve this in a cleanly manner. if anyone has any hints for me, I would be very grateful. cheers.
- 主要语言
- HTML
- 星标
- 1.1k
- 派生
- 515
- 平均合并
- 10 天 13 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OHDSI/CommonDataModel 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 74/100
OHDSI/CommonDataModel#802 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
OHDSI/CommonDataModel#799 ·
-
fix: mark cohort_definition_id as primary key in cohort_definition table for v5.3 and v5.4可能已有人在做 @rtmalikian 于 142 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
OHDSI/CommonDataModel#787 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
OHDSI/CommonDataModel#784 ·
-
难度 3/5 1-2 天 新手友好度 55/100
OHDSI/CommonDataModel#823 ·
查看 OHDSI/CommonDataModel 的全部 Issue
相似的 Issue
-
Redis and Postgres persister integration tests fail when re-run against the same databases可能已有人在做 @YongGoose 今天认领。 未关闭status/needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 3 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
TomBursch/kitchenowl#1209 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRuby未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Add: ESP 2 RS未关闭approved check:passed feeds:add
难度 1/5 1 小时以内 新手友好度 67/100