245 lines
11 KiB
HTML
245 lines
11 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}Confirm Delete Admission | {{ block.super }}{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ block.super }}
|
|
<style>
|
|
.impact-assessment {
|
|
border-left: 4px solid #f59c1a;
|
|
padding-left: 15px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.alternative-action {
|
|
border-left: 4px solid #2d353c;
|
|
padding-left: 15px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.patient-info {
|
|
background-color: rgba(45, 53, 60, 0.05);
|
|
border-radius: 5px;
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.warning-text {
|
|
color: #ff5b57;
|
|
font-weight: 500;
|
|
}
|
|
.confirm-checkbox {
|
|
margin-top: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
<ol class="breadcrumb float-xl-end">
|
|
<li class="breadcrumb-item"><a href="{% url 'core:dashboard' %}">Home</a></li>
|
|
<li class="breadcrumb-item"><a href="{% url 'inpatients:dashboard' %}">Inpatients</a></li>
|
|
<li class="breadcrumb-item"><a href="{% url 'inpatients:admission_list' %}">Admissions</a></li>
|
|
<li class="breadcrumb-item"><a href="{% url 'inpatients:admission_detail' pk=admission.pk %}">{{ admission.patient.get_full_name }}</a></li>
|
|
<li class="breadcrumb-item active">Confirm Delete</li>
|
|
</ol>
|
|
{% endblock %}
|
|
|
|
{% block page_header %}
|
|
<h1 class="page-header">Confirm Admission Deletion <small>Review before proceeding</small></h1>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-xl-8">
|
|
<div class="panel panel-inverse">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title">Delete Admission Record</h4>
|
|
<div class="panel-heading-btn">
|
|
<a href="javascript:;" class="btn btn-xs btn-icon btn-default" data-toggle="panel-expand"><i class="fa fa-expand"></i></a>
|
|
<a href="javascript:;" class="btn btn-xs btn-icon btn-warning" data-toggle="panel-collapse"><i class="fa fa-minus"></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="alert alert-danger">
|
|
<h4><i class="fa fa-exclamation-triangle"></i> Warning!</h4>
|
|
<p>You are about to permanently delete this admission record. This action <strong>cannot be undone</strong>.</p>
|
|
</div>
|
|
|
|
<div class="patient-info">
|
|
<h5>Patient Information</h5>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<p><strong>Name:</strong> {{ admission.patient.get_full_name }}</p>
|
|
<p><strong>MRN:</strong> {{ admission.patient.mrn }}</p>
|
|
<p><strong>Date of Birth:</strong> {{ admission.patient.date_of_birth|date:"M d, Y" }}</p>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<p><strong>Admission Date:</strong> {{ admission.admission_datetime|date:"M d, Y H:i" }}</p>
|
|
<p><strong>Current Ward:</strong> {{ admission.current_ward.name|default:"Not assigned" }}</p>
|
|
<p><strong>Current Bed:</strong> {{ admission.current_bed.bed_number|default:"Not assigned" }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="impact-assessment">
|
|
<h5>Impact Assessment</h5>
|
|
<p>Deleting this admission will have the following impacts:</p>
|
|
<ul>
|
|
{% if admission.current_bed %}
|
|
<li>The assigned bed ({{ admission.current_bed.bed_number }} in {{ admission.current_ward.name }}) will be marked as available</li>
|
|
{% endif %}
|
|
<li>All transfers associated with this admission will be deleted</li>
|
|
<li>All surgery schedules associated with this admission will be deleted</li>
|
|
{% if admission.discharge_summary %}
|
|
<li>The discharge summary will be deleted</li>
|
|
{% endif %}
|
|
<li>All clinical notes referencing this admission will lose their context</li>
|
|
<li>Billing records associated with this admission will be orphaned</li>
|
|
</ul>
|
|
<p class="warning-text">This action may violate healthcare record retention policies. Ensure you have proper authorization.</p>
|
|
</div>
|
|
|
|
<div class="alternative-action">
|
|
<h5>Alternative Actions</h5>
|
|
<p>Instead of deleting this admission, consider:</p>
|
|
<ul>
|
|
<li>Updating the admission status to "Cancelled" if it was created in error</li>
|
|
<li>Discharging the patient if they are no longer in the facility</li>
|
|
<li>Transferring the patient to another ward if needed</li>
|
|
<li>Adding a note to the admission record explaining any issues</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="confirm-checkbox">
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="checkbox" id="confirm_delete" name="confirm_delete" required>
|
|
<label class="form-check-label" for="confirm_delete">
|
|
I understand the consequences and confirm that I want to permanently delete this admission record.
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="delete_reason" class="form-label">Reason for Deletion <span class="text-danger">*</span></label>
|
|
<textarea class="form-control" id="delete_reason" name="delete_reason" rows="3" required placeholder="Please provide a detailed reason for deleting this admission record"></textarea>
|
|
<div class="form-text">This reason will be logged in the audit trail.</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<a href="{% url 'inpatients:admission_detail' pk=admission.pk %}" class="btn btn-secondary btn-lg d-block w-100">
|
|
<i class="fa fa-arrow-left"></i> Cancel
|
|
</a>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<button type="submit" class="btn btn-danger btn-lg d-block w-100">
|
|
<i class="fa fa-trash"></i> Delete Admission
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-xl-4">
|
|
<div class="panel panel-inverse">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title">Admission Details</h4>
|
|
<div class="panel-heading-btn">
|
|
<a href="javascript:;" class="btn btn-xs btn-icon btn-default" data-toggle="panel-expand"><i class="fa fa-expand"></i></a>
|
|
<a href="javascript:;" class="btn btn-xs btn-icon btn-warning" data-toggle="panel-collapse"><i class="fa fa-minus"></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped m-b-0">
|
|
<tbody>
|
|
<tr>
|
|
<th width="35%">Admission ID</th>
|
|
<td>{{ admission.admission_id }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Status</th>
|
|
<td>
|
|
<span class="badge bg-{{ admission.status|lower }}">
|
|
{{ admission.get_status_display }}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admission Type</th>
|
|
<td>{{ admission.get_admission_type_display }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admission Source</th>
|
|
<td>{{ admission.get_admission_source_display }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Priority</th>
|
|
<td>{{ admission.get_priority_display }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admitting Physician</th>
|
|
<td>{{ admission.admitting_physician.get_full_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Attending Physician</th>
|
|
<td>{{ admission.attending_physician.get_full_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Chief Complaint</th>
|
|
<td>{{ admission.chief_complaint }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admitting Diagnosis</th>
|
|
<td>{{ admission.admitting_diagnosis }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Est. Length of Stay</th>
|
|
<td>{{ admission.estimated_length_of_stay }} days</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Insurance Verified</th>
|
|
<td>
|
|
{% if admission.insurance_verified %}
|
|
<span class="badge bg-success">Yes</span>
|
|
{% else %}
|
|
<span class="badge bg-danger">No</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Authorization #</th>
|
|
<td>{{ admission.authorization_number|default:"N/A" }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
{{ block.super }}
|
|
<script>
|
|
$(document).ready(function() {
|
|
// Disable submit button until checkbox is checked
|
|
$('#confirm_delete').change(function() {
|
|
if($(this).is(':checked')) {
|
|
$('button[type="submit"]').prop('disabled', false);
|
|
} else {
|
|
$('button[type="submit"]').prop('disabled', true);
|
|
}
|
|
});
|
|
|
|
// Initially disable submit button
|
|
$('button[type="submit"]').prop('disabled', true);
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|