app.dal.protocol_dal#
Data access layer (DAL) between fastapi endpoint and sql database.
Functions#
|
Create new protocol. |
|
Get protocol by id. |
|
Get all protocols assigned to a certain patient. |
Get all protocol templates. |
|
|
Delete protocol by id. Also deletes associated tasks. |
|
Update existing protocol entry. |
Module Contents#
- async app.dal.protocol_dal.add_protocol_data(payload: scanhub_libraries.models.BaseProtocol, creator: str) app.db.postgres.Protocol#
Create new protocol.
- async app.dal.protocol_dal.get_protocol_data(protocol_id: uuid.UUID) app.db.postgres.Protocol | None#
Get protocol by id.
- async app.dal.protocol_dal.get_all_protocol_data(patient_id: uuid.UUID) list[app.db.postgres.Protocol]#
Get all protocols assigned to a certain patient.
- async app.dal.protocol_dal.get_all_protocol_template_data() list[app.db.postgres.Protocol]#
Get all protocol templates.
- async app.dal.protocol_dal.delete_protocol_data(protocol_id: uuid.UUID) bool#
Delete protocol by id. Also deletes associated tasks.
- async app.dal.protocol_dal.update_protocol_data(protocol_id: uuid.UUID, payload: scanhub_libraries.models.BaseProtocol) app.db.postgres.Protocol | None#
Update existing protocol entry.