{% extends "base.html" %} {% load static %} {% block title %}Delete Encounter - {{ block.super }}{% endblock %} {% block content %}

Delete Encounter

Permanent Deletion Warning

You are about to permanently delete this encounter and all associated data. This action cannot be undone.

Encounter Information
Encounter ID:
{{ object.encounter_id }}
Patient:
{{ object.patient.get_full_name }}
MRN: {{ object.patient.mrn }}
Provider:
{{ object.provider.get_full_name }}
Type:
{{ object.get_encounter_type_display }}
Start Date:
{{ object.start_datetime|date:"M d, Y H:i" }}
End Date:
{% if object.end_datetime %} {{ object.end_datetime|date:"M d, Y H:i" }} {% else %} Ongoing {% endif %}
Status:
{{ object.get_status_display }}
Location:
{{ object.location|default:"Not specified" }}
{% if object.chief_complaint %}
Chief Complaint:
{{ object.chief_complaint }}
{% endif %}
Deletion Impact Assessment
Data That Will Be Deleted:
  • Encounter record and metadata
  • Associated vital signs ({{ object.vital_signs.count }})
  • Clinical notes ({{ object.clinical_notes.count }})
  • Procedure records
  • Medication orders
  • Lab orders and results
  • Imaging orders and results
  • Billing information
Data That Will Be Preserved:
  • Patient demographic information
  • Patient medical history
  • Other encounters for this patient
  • Provider information
  • Audit logs (deletion will be recorded)
{% if deletion_restrictions %}
Deletion Restrictions
Cannot Delete Encounter

This encounter cannot be deleted due to the following restrictions:

    {% for restriction in deletion_restrictions %}
  • {{ restriction.type }}: {{ restriction.message }}
  • {% endfor %}
Suggestion: Consider marking the encounter as cancelled instead of deleting it to maintain data integrity.
{% endif %}
{% if not deletion_restrictions %}
Confirm Deletion
{% csrf_token %}
Cancel
{% else %}
Deletion Blocked

This encounter cannot be deleted due to system restrictions.

Return to Encounter
{% endif %}
Audit Information
Created:
{{ object.created_at|date:"M d, Y H:i" }}
Created By:
{{ object.created_by.get_full_name|default:object.created_by.username }}
Last Modified:
{{ object.updated_at|date:"M d, Y H:i" }}
Modified By:
{{ object.updated_by.get_full_name|default:object.updated_by.username }}
Deletion will be logged in the audit trail with your user information and timestamp.
{% endblock %}