exam-manager.app.main ===================== .. py:module:: exam-manager.app.main .. autoapi-nested-parse:: Exam manager main file. Attributes ---------- .. autoapisummary:: exam-manager.app.main.ORIGINS exam-manager.app.main.app Functions --------- .. autoapisummary:: exam-manager.app.main.custom_http_exception_handler exam-manager.app.main.validation_exception_handler exam-manager.app.main.startup exam-manager.app.main.shutdown exam-manager.app.main.readiness exam-manager.app.main.get_dicom Module Contents --------------- .. py:data:: ORIGINS :value: ['http://localhost:8080', 'https://localhost:8443'] .. py:data:: app .. py:function:: custom_http_exception_handler(request, exc) :async: Add logging for http exceptions. https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers .. py:function:: validation_exception_handler(request, exc) :async: Add logging for fastAPI's automatic input validation exceptions. https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers .. py:function:: startup() :async: Statup exam-tree microservice. Raises ------ HTTPException 500: Device table does not exist HTTPException 500: Workflow table does not exist .. py:function:: shutdown() -> None :async: Shutdown function. .. py:function:: readiness() -> dict :async: Readiness health endpoint. Returns ------- Status dictionary Raises ------ HTTPException 500: Any of the exam-tree tables does not exist .. py:function:: get_dicom(result_id: uuid.UUID | str) -> fastapi.responses.FileResponse :async: 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