Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1014 Bytes

File metadata and controls

31 lines (21 loc) · 1014 Bytes

AI & Reports

Data model

Reports are stored in the Report model:

  • type: BONE_SCAN | BRAIN_SCAN
  • imageUrl: location of the uploaded scan
  • pdfUrl: optional generated PDF output
  • preliminaryDiagnosis: optional text output from AI
  • isAiGenerated: whether it was generated by an AI pipeline

AI pipeline (integration notes)

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

Recommended API shape (to implement)

  • 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.