Categorize Docs Base V1

LangChain Hub prompt: foundation29/categorize_docs_base_v1

A
airunner_co
·May 3, 2026·
3,486 0 17
$7.99
Prompt
826 words

You will be provided with a medical document (delimited with input XML tags). Your task is to categorize the document into one of the following categories and extract ALL the relevant information that is present in the document (if any):

  • Clinical History
  • Laboratory Report
  • Hospital Discharge Note
  • Evolution and Consultation Note
  • Medical Prescription
  • Surgery Report
  • Imaging Study
  • Other

You ALWAYS ONLY have to return a JSON object with the ONLY ONE category of the document which fits the best and the relevant information. In the "patient" section extract the name, age, date of birth and gender. Do not return anything outside the JSON brackets. Example Output:

⟨ "category": "Clinical History", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "medical_history": ⟨ "previous_diseases": ["Disease1", "Disease2"], "surgeries": ["Surgery1", "Surgery2"], "allergies": ["Allergy1", "Allergy2"] ⟩, "family_history": ⟨ "hereditary_diseases": ["Disease1", "Disease2"], "family_history": ["History1", "History2"] ⟩, "current_medications": [ ⟨ "name": "Medication1", "dosage": "X mg", "frequency": "X times a day". ⟩ ], "medical_procedures": ["Procedure1", "Procedure2" ], "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

Other Examples:

⟨ "category": "Laboratory Report", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "test_date": "YYYY-MM-DD", "test_type": ⟨ "category": "Test_type", "specificity": "Blood, urine, biopsy, etc." ⟩, "key_results": [ ⟨ test_name": "Name of the test", "result": [ "Value", "Reference Value", "Observation, Normal/Anormal, etc." ] ⟩ ], "brief_interpretation": "Clinical interpretation of findings", "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

⟨ "category": "Hospital Discharge Note", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "admission_date": "YYYY-MM-DD", "discharge_date": "YYYY-MM-DD", "diagnosis_summary": [ ⟨ "diagnosis": "Diagnosis name", "detail": "Detailed description of diagnosis". ⟩ ], "treatment_performed": ⟨ "procedures": ["Procedure1", "Procedure2" ], "diagnostic_tests": ["Test1", "Test2"], "medications": ["Medication1", "Medication2"] ⟩, "medication_changes": [ ⟨ "medication": "Name of the Medication", "change": "Description of change" ⟩ ], "follow-up_plan": "Post-discharge recommendations and steps to be taken", "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

⟨ "category": "Evolution and Consultation Note", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "consultation_date": "YYYY-MM-DD", "consultation_reason": "Description of the reason for consultation", "clinical_findings": [ ⟨ "finding": "Name of the finding", "description": "Detailed description of the finding", "clinical_finding": "Detailed description of the finding", ⟩ ], "diagnosis": ⟨ "diagnostic_hypothesis": "Hypothesis or diagnostic conclusion", "details": "Additional information about the diagnosis", ⟩, "treatment_plan": ⟨ "medication": ["Medication1", "Medication2"], "references": ["Reference1", "Reference2"], "additional_tests": ["Test1", "Test2"] ⟩, "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

⟨ "category": "Medical Prescription", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "issue_date": "YYYY-MM-DD", "medication_table": [ ⟨ "medication_name": "Medication_name", "dosage": "X mg/u", "frequency": "X times per day/week", "duration": "X days/weeks", "indication": "Reason for prescribing the medicine". ⟩ ], "special_instructions": "Warnings, specific recommendations or precautions to be taken into account", "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

⟨ "category": "Surgery Report", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "surgery_date": "YYYY-MM-DD", "surgery_type": "Detailed description of the type of surgery performed", "findings": [ ⟨ "finding": "Description of the finding", "details": "Additional information about the finding". ⟩ ], "results_recommendations": ⟨ "results": "Description of the results of the surgery", "postoperative_recommendations": "Recommended post-operative care and instructions" ⟩, "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

⟨ "category": "Imaging Study", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "study_date": "YYYY-MM-DD", "image_type": "X-ray, ultrasound, MRI, etc.", "key_findings": [ ⟨ "finding_description": "Description of key finding", "location": "Location of the finding if relevant", "importance": "Clinical relevance of the finding". ⟩ ], "interpretation": "Comments and analysis by the radiologist or other specialist", "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }} ⟨"category": "Other", "document_date": "YYYY-MM-DD", "patient": {{ "name": "Patient Name", "age": "XX", "date_of_birth": "YYYY-MM-DD", "gender": "X" ⟩, "document": "Document name or purpose (anything that can help to identify the document and what it is useful for)", "complete_details": "Description of the whole document and their relevance to the patient, does not have to be inherently medical, maybe administrative or for a caregiver", "other": "All the other relevant information about the document, can be anything that does not fit in the other categories" }}

Here is the medical document to categorize and extract the relevant information:

{doc}

Remember to extract ALL the relevant information from the document. Do not leave any information out. Now, please output the category, document_date, and the relevant information of the document in a JSON format.

Output:

This prompt contains variables shown as ⟨variable_name⟩. Replace them with your own values before using.

How to Use

Use with LangChain: hub.pull("foundation29/categorize_docs_base_v1")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Research & Analysis

View All
Research & Analysis
Universal

My Blueprint

Unlock the secrets of your life’s purpose and potential. Discover your Life Path, Destiny, and hidden strengths, overcome challenges, and align with your true calling. This detailed analysis will give you insights into your personality, relationships, and career, helping you make empowered decisions and live your most authentic life. Ready to explore the path the universe has laid out for you?

A
axiomprompts$5.99
476 482
Research & Analysis
ChatGPTClaudeGemini

Formal Risk Assessment Framework

Get a comprehensive risk assessment across 5 categories with likelihood/impact ratings and mitigation strategies — plus a detailed plan for the highest-priority risk.

A
aiscribe$3.99
189 2,200
Research & Analysis
ChatGPTClaudeGemini

Data Findings to Business Insights Translator

Translate statistical findings into executive-ready business insights with plain-English summaries, action items, and visualization recommendations.

C
clearframe$8.99
178 2,000
Research & Analysis
Universal

Make the Best Life Decisions

Not sure wether you should make that big decision? Use this prompt to ask ChatGPT

S
spectrumtextFree
83 92
Research & Analysis
Universal

Find your dream career! 🚀

🌟 Unleash Your True Potential: Discover Your Perfect Vocation with your personal Career Coach 🌟 Feeling stuck in your current role? Uncertain about your career path? Let's unlock your true purpose together! I'm your personal coach, a highly experienced life and career coach with a track record of helping people just like you find their true vocation. My empathetic approach and deep understanding of human nature will put you at ease while we explore your goals, desires, and potential. Together, we'll create a personalized report that empowers you to make confident choices for your future. 🔑 What you'll experience: A compassionate coaching approach that will help you understand your unique situation Sensitive, revealing questions that build a complete profile of your personality and context Insights that lead to significant, positive, and long-lasting changes 🌈 Your outcome: A clear understanding of the perfect vocation for you Enhanced self-awareness and confidence in your professio

L
layerprompt$7.99
440 452
Research & Analysis
ChatGPTClaudeGemini

User Research Insight Synthesizer

Transform messy user research data into structured themes, evidence-backed insights, priority rankings, and specific product recommendations.

M
mindmapai$8.99
167 1,900