Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save neilghosh/7148df82d23e682d11ade0f45cc6101d to your computer and use it in GitHub Desktop.

Select an option

Save neilghosh/7148df82d23e682d11ade0f45cc6101d to your computer and use it in GitHub Desktop.

Organize Medical Files Prompt

Purpose

Systematically organize medical records, lab reports, bills, and consultation documents into a standardized naming convention with correct dates extracted from document content.

Key Instructions

1. Date Format Rules (CRITICAL)

  • Output Format: Always use YYYY-MM-DD (ISO 8601 standard)
  • Indian Date Format Note: In India, when dates are written with slashes (e.g., 10/11/25 or 10-11-25), they follow DD/MM/YYYY format, NOT MM/DD/YYYY (USA format)
    • Example: 10/11/25 in India = 10th November 2025 = 2025-11-10 in ISO format
    • Example: 5/12/25 in India = 5th December 2025 = 2025-12-05 in ISO format
  • Always extract dates from PDF/document content (bill date fields, consultation dates, "Prepared On" dates), NOT from filename or file modification date
  • When dates appear in document text, convert them correctly considering Indian date conventions

2. Document Type Categories

Use the following types based on document content:

Type Used For Suffix Format
Consultation Doctor visit notes, OP notes Consultation_Dr_[DoctorName]
Bill Financial charges/invoices Bill_[ServiceType] or Bill_[ServiceType]_Dr_[DoctorName]
Pharmacy Medicine/drug purchases Pharmacy_Dr_[DoctorName] or Pharmacy_[ItemName]
Lab_Report Lab test results Lab_Report_[TestName]

3. Bill Type Suffixes (Important)

  • Bill_Consultation - Consultation-only bill
  • Bill_Pharmacy - Medicine/pharmacy-only bill
  • Bill_LabTest_[TestName] - Lab test charges only
  • Bill_LabTest_Consultation - Combined lab test + consultation charges
  • Bill_[ProcedureName] - Specific procedure (e.g., Endoscopy, Colonoscopy, Manometry)
  • Bill_[Service1]_[Service2] - Multiple services on same bill

4. Naming Convention

YYYY-MM-DD_TYPE_Details.extension

Examples:

  • 2025-12-13_Consultation_Dr_[LastName].jpeg
  • 2025-12-10_Pharmacy_Dr_[LastName].jpeg
  • 2025-12-10_Bill_LabTest_Consultation.jpeg
  • 2025-11-10_Lab_Report_Manometry_Test.pdf
  • 2025-11-24_Bill_Endoscopy_Colonoscopy.pdf
  • 2025-11-10_Consultation_Endoscopy_Images.pdf

5. Document Examination Process

  1. Open each file to view actual content (do NOT rely on filename)
  2. Read the document carefully to extract:
    • Exact date (look for "Date", "Bill Date", "Prepared On", "Consultation Date" fields)
    • Document type (bill, consultation, lab report, pharmacy receipt)
    • Doctor name (if applicable)
    • Service/test name (if applicable)
  3. Convert dates using Indian DD/MM/YYYY format if written with slashes
  4. Verify details before renaming to ensure accuracy

6. Duplicate Handling

  • If duplicate files are detected (same content, different file IDs):
    • Rename original file: YYYY-MM-DD_TYPE_Details.extension
    • Rename duplicate: DUPLICATE_YYYY-MM-DD_TYPE_Details.extension
    • Optionally delete duplicate after marking to free up storage

7. Important Notes

  • Never assume date from filename - always check document content
  • Doctor names: Include last name if visible (e.g., "Dr_[LastName]")
  • Special characters: Replace spaces with underscores, remove special symbols
  • Multiple documents same date: Use sequential numbering or differentiate by service type
  • Scanned documents: If test name/date unclear from scan, number sequentially (e.g., Scanned_1, Scanned_2)

8. File Organization Benefits

  • ✓ Easy date-based searching and sorting
  • ✓ Quick identification of document type
  • ✓ Doctor/specialist tracking
  • ✓ Service/procedure tracking
  • ✓ Duplicate detection and cleanup
  • ✓ Chronological medical history

Sample Task Workflow

  1. Browse medical files folder
  2. For each file: Open → Read content → Extract date/type/details
  3. Identify and mark duplicates
  4. Rename using YYYY-MM-DD_TYPE_Details format
  5. Report duplicates and file count
  6. Verify all files follow consistent naming conventionThis prompt is now ready to copy and save for future use without any specific personal medical information!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment