app.api.db#
Patient database ORM model definition.
Attributes#
Classes#
Patient ORM model. |
Functions#
|
Initialize database. |
Module Contents#
- app.api.db.Base: sqlalchemy.ext.declarative.DeclarativeMeta#
- app.api.db.postgres_user_filepath = '/run/secrets/patient_database_postgres_user'#
- app.api.db.postgres_password_filepath = '/run/secrets/patient_database_postgres_password'#
- app.api.db.postgres_db_name_filepath = '/run/secrets/patient_database_postgres_db_name'#
- app.api.db.postgres_user#
- app.api.db.init_db() None#
Initialize database.
- class app.api.db.Patient#
Bases:
BasePatient ORM model.
- __tablename__ = 'patients'#
- __table_args__#
- patient_id: sqlalchemy.orm.Mapped[uuid.UUID]#
- first_name: sqlalchemy.orm.Mapped[str]#
- last_name: sqlalchemy.orm.Mapped[str]#
- birth_date: sqlalchemy.orm.Mapped[datetime.date]#
- sex: sqlalchemy.orm.Mapped[scanhub_libraries.models.Gender]#
- height: sqlalchemy.orm.Mapped[float]#
- weight: sqlalchemy.orm.Mapped[float]#
- issuer: sqlalchemy.orm.Mapped[str]#
- status: sqlalchemy.orm.Mapped[scanhub_libraries.models.ItemStatus]#
- comment: sqlalchemy.orm.Mapped[str]#
- datetime_created: sqlalchemy.orm.Mapped[datetime.datetime]#
- datetime_updated: sqlalchemy.orm.Mapped[datetime.datetime]#