Skip to main content
MedMitra’s document upload system allows you to securely upload medical files that will be analyzed by AI agents to generate comprehensive clinical insights.

Supported Document Types

MedMitra supports two main categories of medical documents:

Lab Reports

Blood tests, urinalysis, metabolic panels, and other laboratory resultsFormats: PDF, CSV
Max Size: 10 MB per file

Radiology Images

X-rays, CT scans, MRI images, and other medical imagingFormats: JPEG, PNG, DICOM (.dcm)
Max Size: 50 MB per file

Uploading During Case Creation

The most common way to upload documents is during case creation.
1

Navigate to New Case

Click New Case from the dashboard or cases page.
2

Locate Upload Sections

On the right side of the form, you’ll find two upload sections:
  • Lab Reports (top)
  • Radiology Images (bottom)
3

Choose Upload Method

You have two options for uploading files:

Drag and Drop

Simply drag files from your computer and drop them into the upload area. The area will highlight when you drag files over it.
Drag and drop is the fastest way to upload multiple files at once!

Click to Browse

Click anywhere in the upload area to open your file browser, then select one or multiple files.
4

Verify File Upload

After selecting or dropping files:
  • Files appear in a list below the upload area
  • Each file shows its name, size, and type icon
  • Invalid files are rejected with an error message
// Lab Reports: PDF or CSV only
const labAllowedTypes = ['text/csv', 'application/pdf'];

// Radiology: Images and DICOM only
const radiologyAllowedTypes = [
'image/jpeg',
'image/png',
'application/dicom',
'image/dicom'
];
5

Remove Files if Needed

To remove an uploaded file before submission:
  • Click the X button next to the file name
  • The file is removed from the upload queue
  • You can upload a different file in its place
6

Submit the Case

When you click Create Case, all uploaded files are:
  1. Uploaded to Supabase Storage
  2. Linked to the case record
  3. Queued for AI processing

File Processing Pipeline

Understanding how files are processed helps you prepare better documents:

Lab Report Processing

Lab reports undergo specialized text extraction and analysis.

Supported Lab Report Formats

Best for: Standard lab results from hospitals and clinicsRequirements:
  • Text-based PDFs (not scanned images without OCR)
  • Clear, readable text
  • Standard formatting
Processing:
  • Parsed using LlamaParse technology
  • Text and structure extracted
  • Lab values and units identified
  • Reference ranges detected

What Gets Extracted

The AI extracts key information from lab reports:
  • Test names and types
  • Measured values and units
  • Reference ranges (normal values)
  • Abnormal findings and flags
  • Test dates and timestamps
  • Laboratory details

Radiology Image Processing

Radiology images are analyzed by the Vision Agent using multimodal AI.

Supported Image Formats

FormatExtensionDescriptionMax Size
JPEG.jpg, .jpegCompressed images, good for X-rays50 MB
PNG.pngLossless compression, high quality50 MB
DICOM.dcm, .dicomMedical imaging standard format50 MB

Vision Agent Analysis

For each radiology image, the Vision Agent:
1

Image Preprocessing

The image is prepared for analysis:
  • Format validation
  • Quality assessment
  • Optimal size calculation
2

AI Model Analysis

The image is sent to the LLaVA multimodal model via Groq API:
  • Visual features extracted
  • Medical patterns identified
  • Anatomical structures recognized
3

Structured Output Generation

The AI returns a structured JSON response:
{
  "findings": "Detailed description of visible findings",
  "impressions": "Clinical impressions and conclusions",
  "confidence_score": 0.92,
  "anatomical_regions": ["chest", "lungs"],
  "abnormalities_detected": ["opacity in right lung"]
}
4

Storage and Linking

The analysis is:
  • Saved to the database
  • Linked to the specific file
  • Used in comprehensive case analysis
The Vision Agent’s analysis is meant to assist clinical decision-making, not replace professional medical judgment. Always verify AI findings with your own clinical assessment.

Upload Best Practices

Before uploading lab reports:Do:
  • Use text-based PDFs when possible
  • Include complete reports with reference ranges
  • Upload recent tests first
  • Use descriptive filenames with dates
Don’t:
  • Upload scanned images without OCR
  • Submit partial or cut-off reports
  • Mix multiple patient reports in one file
  • Upload password-protected PDFs
Before uploading radiology images:Do:
  • Use high-resolution images
  • Ensure proper lighting and contrast
  • Upload DICOM files when available (highest quality)
  • Include multiple views if relevant
Don’t:
  • Upload blurry or low-quality images
  • Submit heavily compressed images
  • Include non-medical images
  • Upload images with patient identifiers visible (if privacy-restricted)
Tips for managing multiple documents:
  • Upload all files at once during case creation
  • Use consistent naming conventions
  • Group related files (e.g., all blood tests together)
  • Include dates in filenames: chest-xray-2024-03-04.jpg
  • Keep file sizes reasonable for faster upload

File Storage and Security

Your uploaded documents are handled with enterprise-grade security:

Encrypted Storage

All files are stored in Supabase Storage with encryption at rest

Access Control

Files are only accessible by the user who uploaded them

Secure Transfer

Uploads use HTTPS/TLS encryption during transfer

Audit Trail

All file access is logged for security and compliance

Technical Implementation

The upload process is handled by multiple components:
// frontend/components/forms/file-upload.tsx
const handleFileUpload = (files: FileList | null, category: string) => {
  if (!files) return;

  const allowedTypes = category === 'lab' 
    ? ['text/csv', 'application/pdf']
    : ['image/jpeg', 'image/png', 'application/dicom'];

  Array.from(files).forEach(file => {
    if (allowedTypes.includes(file.type)) {
      // Add to upload queue
      setUploadedFiles(prev => [...prev, newFile]);
    } else {
      alert(`Invalid file type for ${category}`);
    }
  });
};

Troubleshooting Upload Issues

Possible causes:
  • File size exceeds limit
  • Slow internet connection
  • Browser compatibility issues
Solutions:
  • Compress large files before uploading
  • Try a faster internet connection
  • Use a modern browser (Chrome, Firefox, Safari, Edge)
  • Upload files in smaller batches
Possible causes:
  • Incorrect file format
  • File extension doesn’t match content
  • Corrupted file
Solutions:
  • Verify file format matches supported types
  • Convert files to supported formats
  • Try re-exporting the file from the source application
  • Check file isn’t corrupted by opening it locally
Possible causes:
  • Upload still in progress
  • Browser cache issue
  • Upload failed silently
Solutions:
  • Wait for upload to complete (check browser network tab)
  • Refresh the page
  • Clear browser cache
  • Try uploading again

Upload Limits and Quotas

Current upload limits:
Limit TypeValue
Lab Report File Size10 MB
Radiology Image File Size50 MB
Files per CaseUnlimited
Total Storage per UserDepends on plan
Concurrent Uploads5 at a time
If you need higher limits for your use case, contact support to discuss enterprise options.

Next Steps

After uploading documents:

View AI Insights

Learn how to review the AI analysis of your documents

Understand SOAP Notes

Deep dive into AI-generated SOAP notes

Build docs developers (and LLMs) love