{% extends "base.html" %} {% load static %} {% block title %}Bill {{ object.bill_number }} - {{ block.super }}{% endblock %} {% block content %}

Medical Bill {{ object.bill_number }}

Back to List {% if object.status == 'DRAFT' %} Edit Bill {% endif %}
{% if object.status == 'OVERDUE' %}
Overdue Bill
This bill is {{ object.days_outstanding }} days overdue. Please follow up with the patient or consider collections.
{% elif object.status == 'DRAFT' %}
Draft Bill
This bill is still in draft status. Review and submit when ready.
{% elif object.status == 'PAID' %}
Paid in Full
This bill has been paid in full on {{ object.paid_date|date:"M d, Y" }}.
{% endif %}
Patient Information
Patient Name: {{ object.patient.get_full_name }}
MRN: {{ object.patient.mrn }}
Date of Birth: {{ object.patient.date_of_birth|date:"M d, Y" }}
Phone: {{ object.patient.phone_number|default:"-" }}
Address: {% if object.patient.address %} {{ object.patient.address }}
{{ object.patient.city }}, {{ object.patient.state }} {{ object.patient.zip_code }} {% else %} - {% endif %}
Email: {{ object.patient.email|default:"-" }}
Insurance: {% if object.patient.primary_insurance %} {{ object.patient.primary_insurance.insurance_company }} {% else %} No insurance on file {% endif %}
Bill Details
Bill Number: {{ object.bill_number }}
Bill Date: {{ object.bill_date|date:"M d, Y" }}
Due Date: {% if object.due_date %} {{ object.due_date|date:"M d, Y" }} {% if object.is_overdue %} Overdue {% endif %} {% else %} - {% endif %}
Status: {% if object.status == 'DRAFT' %} Draft {% elif object.status == 'PENDING' %} Pending {% elif object.status == 'SUBMITTED' %} Submitted {% elif object.status == 'PARTIAL_PAID' %} Partially Paid {% elif object.status == 'PAID' %} Paid {% elif object.status == 'OVERDUE' %} Overdue {% elif object.status == 'COLLECTIONS' %} Collections {% elif object.status == 'WRITTEN_OFF' %} Written Off {% elif object.status == 'CANCELLED' %} Cancelled {% endif %}
Billing Provider: {{ object.billing_provider|default:"-" }}
Related Encounter: {% if object.encounter %} {{ object.encounter.encounter_number }} {% else %} - {% endif %}
Created: {{ object.created_at|date:"M d, Y g:i A" }}
Last Updated: {{ object.updated_at|date:"M d, Y g:i A" }}
{% if object.notes %}
Notes:

{{ object.notes }}

{% endif %}
Line Items
{% for line_item in object.line_items.all %} {% empty %} {% endfor %}
Service Code Description Quantity Unit Price Total
{{ line_item.service_code }} {{ line_item.service_description }} {{ line_item.quantity }} ê{{ line_item.unit_price|floatformat:'2g' }} ê{{ line_item.total_price|floatformat:'2g' }}
No line items found for this bill.
Payment History
{% if object.status not in 'PAID,CANCELLED,WRITTEN_OFF' %} Record Payment {% endif %}
{% for payment in object.payments.all %} {% empty %} {% endfor %}
Payment Number Date Method Amount Status Reference Actions
{{ payment.payment_number }} {{ payment.payment_date|date:"M d, Y" }} {{ payment.get_payment_method_display }} ê{{ payment.payment_amount|floatformat:'2g' }} {% if payment.status == 'PENDING' %} Pending {% elif payment.status == 'PROCESSING' %} Processing {% elif payment.status == 'COMPLETED' %} Completed {% elif payment.status == 'FAILED' %} Failed {% elif payment.status == 'REFUNDED' %} Refunded {% endif %} {{ payment.reference_number|default:"-" }}
No payments recorded for this bill.
Insurance Claims
{% if object.patient.primary_insurance and object.status not in 'CANCELLED,WRITTEN_OFF' %} Submit Claim {% endif %}
{% for claim in object.insurance_claims.all %} {% empty %} {% endfor %}
Claim Number Insurance Company Submit Date Billed Amount Approved Amount Status Actions
{{ claim.claim_number }} {{ claim.insurance_info.insurance_company }} {% if claim.submission_date %} {{ claim.submission_date|date:"M d, Y" }} {% else %} Not submitted {% endif %} ê{{ claim.billed_amount|floatformat:'2g' }} {% if claim.approved_amount %} ê{{ claim.approved_amount|floatformat:'2g' }} {% else %} - {% endif %} {% if claim.status == 'DRAFT' %} Draft {% elif claim.status == 'SUBMITTED' %} Submitted {% elif claim.status == 'PENDING' %} Pending {% elif claim.status == 'APPROVED' %} Approved {% elif claim.status == 'PARTIALLY_APPROVED' %} Partially Approved {% elif claim.status == 'DENIED' %} Denied {% elif claim.status == 'PAID' %} Paid {% elif claim.status == 'APPEALED' %} Appealed {% endif %}
No insurance claims submitted for this bill.
Bill Summary
Subtotal: ê{{ object.subtotal|floatformat:'2g' }}
Vat: ê{{ object.tax_amount|floatformat:'2g' }}
Discount: ê{{ object.discount_amount|floatformat:'2g' }}

Total Amount: ê{{ object.total_amount|floatformat:'2g' }}
Paid Amount: ê{{ object.paid_amount|floatformat:2 }}

Balance Due: ê{{ object.balance_amount|floatformat:'2g' }}
Quick Actions
{% if object.status not in 'PAID,CANCELLED,WRITTEN_OFF' %} Record Payment {% endif %} {% if object.patient.primary_insurance and object.status not in 'CANCELLED,WRITTEN_OFF' %} Submit Claim {% endif %} Print Bill Email Bill {% if object.status == 'DRAFT' %} Edit Bill {% endif %}
Activity Timeline
Bill Created

{{ object.created_at|date:"M d, Y g:i A" }}

{% if object.status != 'DRAFT' %}
Bill Submitted

{{ object.submitted_at|date:"M d, Y g:i A"|default:"Unknown" }}

{% endif %} {% for payment in object.payment_set.all %}
Payment Received

ê{{ payment.payment_amount|floatformat:'2g' }} via {{ payment.get_payment_method_display }}
{{ payment.payment_date|date:"M d, Y g:i A" }}

{% endfor %} {% if object.status == 'PAID' %}
Paid in Full

{{ object.paid_date|date:"M d, Y g:i A"|default:"Unknown" }}

{% endif %}
{% endblock %}