exam-manager.app.main#
Exam manager main file.
Attributes#
Functions#
|
Add logging for http exceptions. |
|
Add logging for fastAPI's automatic input validation exceptions. |
|
Statup exam-tree microservice. |
|
Shutdown function. |
|
Readiness health endpoint. |
|
Get DICOM file of a result. |
Module Contents#
- exam-manager.app.main.ORIGINS = ['http://localhost:8080', 'https://localhost:8443']#
- exam-manager.app.main.app#
- async exam-manager.app.main.custom_http_exception_handler(request, exc)#
Add logging for http exceptions.
https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers
- async exam-manager.app.main.validation_exception_handler(request, exc)#
Add logging for fastAPI’s automatic input validation exceptions.
https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers
- async exam-manager.app.main.startup()#
Statup exam-tree microservice.
Raises#
- HTTPException
500: Device table does not exist
- HTTPException
500: Workflow table does not exist
- async exam-manager.app.main.shutdown() None #
Shutdown function.
- async exam-manager.app.main.readiness() dict #
Readiness health endpoint.
Returns#
Status dictionary
Raises#
- HTTPException
500: Any of the exam-tree tables does not exist
- async exam-manager.app.main.get_dicom(result_id: uuid.UUID | str) fastapi.responses.FileResponse #
Get DICOM file of a result.
This endpoint in implemented in main without the result_router to omit the user authentification. The frontend uses cornerstone to load the image, which would need to know, how to authenticate with the backend. This is not to be done. TODO fix it!
Parameters#
- result_id
UUID of the result with the dicom.
Returns#
DICOM file response
Raises#
- HTTPException
Throws exception if result ID is unknown
- HTTPException
Throws exception if DICOM file does not exist