From 9ee51a273f21539dba3d3d69be4be9071daa537f Mon Sep 17 00:00:00 2001 From: Spayralbe Date: Mon, 13 Jan 2025 15:05:46 +0100 Subject: [PATCH] Make stem table start_datetime nullable --- src/omop_cdm/dynamic/cdm531/clinical_data.py | 2 +- src/omop_cdm/dynamic/cdm54/clinical_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/omop_cdm/dynamic/cdm531/clinical_data.py b/src/omop_cdm/dynamic/cdm531/clinical_data.py index 87b684e..2d456a5 100644 --- a/src/omop_cdm/dynamic/cdm531/clinical_data.py +++ b/src/omop_cdm/dynamic/cdm531/clinical_data.py @@ -789,7 +789,7 @@ class BaseStemTableCdm531: person_id: Mapped[int] = mapped_column(ForeignKey(FK_PERSON_ID), index=True, sort_order=300) concept_id: Mapped[int] = mapped_column(ForeignKey(FK_CONCEPT_ID), index=True, sort_order=400) start_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=500) - start_datetime: Mapped[datetime.datetime] = mapped_column(DateTime, sort_order=600) + start_datetime: Mapped[Optional[datetime.datetime]] = mapped_column(DateTime, sort_order=600) end_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=700) end_datetime: Mapped[Optional[datetime.datetime]] = mapped_column(DateTime, sort_order=800) verbatim_end_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=900) diff --git a/src/omop_cdm/dynamic/cdm54/clinical_data.py b/src/omop_cdm/dynamic/cdm54/clinical_data.py index 04cbeb1..ae94459 100644 --- a/src/omop_cdm/dynamic/cdm54/clinical_data.py +++ b/src/omop_cdm/dynamic/cdm54/clinical_data.py @@ -824,7 +824,7 @@ class BaseStemTableCdm54: person_id: Mapped[int] = mapped_column(ForeignKey(FK_PERSON_ID), index=True, sort_order=300) concept_id: Mapped[int] = mapped_column(ForeignKey(FK_CONCEPT_ID), index=True, sort_order=400) start_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=500) - start_datetime: Mapped[datetime.datetime] = mapped_column(DateTime, sort_order=600) + start_datetime: Mapped[Optional[datetime.datetime]] = mapped_column(DateTime, sort_order=600) end_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=700) end_datetime: Mapped[Optional[datetime.datetime]] = mapped_column(DateTime, sort_order=800) verbatim_end_date: Mapped[Optional[datetime.date]] = mapped_column(Date, sort_order=900)