Reports are stored in the Report model:
type:BONE_SCAN|BRAIN_SCANimageUrl: location of the uploaded scanpdfUrl: optional generated PDF outputpreliminaryDiagnosis: optional text output from AIisAiGenerated: whether it was generated by an AI pipeline
This repo currently contains the database schema for reports. The AI pipeline itself (model hosting, inference, storage, PDF generation) should be implemented and wired to API endpoints.
Common integration responsibilities:
- Upload handling (store image in a file store or object storage)
- Calling the AI inference service
- Persisting inference outputs back to
Report - Optional: generating a PDF report and storing its URL
- Create report record for a patient
- Upload scan / attach
imageUrl - Trigger AI inference
- Retrieve report list and report details
Keep the API consistent with prisma/schema.prisma.