Chest X-ray Report Generation

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}

Chat about Report

Ask questions based *only* on the generated report. {% if report and not chatbot_available %}
Chatbot (Llama 3.1) is not available or failed to load. Please check server logs.
{% endif %}
Generate a report first to enable chat.
{% if report and chatbot_available %}
Welcome! Ask me about the findings, impression, or specific details in the report above.
{% endif %}
Example Questions:

Generate Report

Allowed formats: PNG, JPG, JPEG. Filename format like '...-View-Age-Gender-Ethnicity.png' helps extract patient info.
Adjusts the maximum length of the generated report (default: 100).
{% if report or image_data %}
{% if patient_info %}

Patient Information

View: {{ patient_info.view | e }} | Age: {{ patient_info.age | e }} | Gender: {{ patient_info.gender | e }} | Ethnicity: {{ patient_info.ethnicity | e }}

{% elif image_data %}

Patient information could not be parsed from the filename.

{% endif %}
{% if image_data %}

Uploaded Image

Uploaded Chest X-ray
Hover over image to zoom (on desktop).
{% endif %} {% if report %}

Generated Report

{{ report | safe if report.count('<') > 0 else report | e }}
{% elif image_data %}

Generated Report

Report generation failed. Please check the logs or try again.
{% endif %}
{% endif %} {% if report or image_data %} {# Only show notes if results exist #}

Notes for Medical Student

Copied!
{% endif %}