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

Delete Prescription {{ object.prescription_number }}

Confirm Prescription Deletion

Prescription to be Deleted
Prescription Number: {{ object.prescription_number }}
Patient: {{ object.patient.full_name }}
Medication: {{ object.medication.name }}
Dosage: {{ object.dosage }} {{ object.dosage_unit }}
Quantity: {{ object.quantity }}
Prescriber: {{ object.prescriber.full_name }}
Status: {{ object.get_status_display }}
Date Prescribed: {{ object.date_prescribed|date:"M d, Y" }}
Due Date: {{ object.due_date|date:"M d, Y"|default:"Not specified" }}
{% if object.is_controlled %}
Controlled Substance
{% endif %}
{% if object.instructions %}
Instructions:
{{ object.instructions }}
{% endif %}
Impact Assessment
Potential Issues:
    {% if object.status == 'dispensed' %}
  • Prescription has already been dispensed
  • {% endif %} {% if object.status == 'in_progress' %}
  • Prescription is currently being processed
  • {% endif %} {% if object.is_controlled %}
  • Controlled substance requires special handling
  • {% endif %} {% if object.refills_remaining > 0 %}
  • {{ object.refills_remaining }} refill(s) remaining
  • {% endif %} {% if object.urgent %}
  • Marked as urgent prescription
  • {% endif %}
Related Records:
  • Patient: {{ object.patient.full_name }}
  • Prescriber: {{ object.prescriber.full_name }}
  • {% if object.dispensing_records.exists %}
  • {{ object.dispensing_records.count }} dispensing record(s)
  • {% endif %} {% if object.interaction_checks.exists %}
  • {{ object.interaction_checks.count }} interaction check(s)
  • {% endif %}
{% if object.status == 'dispensed' %}
Critical Warning

This prescription has already been dispensed to the patient. Deleting it may:

  • Create gaps in the patient's medication history
  • Affect insurance claims and billing records
  • Impact regulatory compliance and audit trails
  • Remove important clinical documentation

Consider marking as cancelled instead of deleting.

{% elif object.status == 'in_progress' %}
Processing Warning

This prescription is currently being processed. Deleting it may disrupt the pharmacy workflow and confuse staff members.

{% elif object.is_controlled %}
Controlled Substance Warning

This prescription contains controlled substances. Deletion must be properly documented for DEA compliance and audit purposes.

{% endif %}
Alternative Actions

Instead of deleting this prescription, consider these alternatives:

{% csrf_token %}
These notes will be recorded in the audit log.
{% if object.is_controlled %}
{% endif %}

Deletion Guidelines

Important Guidelines
  • Prescription deletions are permanent and cannot be undone
  • All deletions are logged for audit purposes
  • Consider alternatives before deleting
  • Controlled substances require special documentation
  • Dispensed prescriptions should rarely be deleted
Audit Information
User: {{ request.user.get_full_name }}
Date: {{ "now"|date:"M d, Y H:i" }}
IP Address: {{ request.META.REMOTE_ADDR }}
Session: {{ request.session.session_key|slice:":8" }}...

Related Records

Patient Records {{ object.patient.prescriptions.count }}
{% if object.dispensing_records.exists %}
Dispensing Records {{ object.dispensing_records.count }}
{% endif %} {% if object.interaction_checks.exists %}
Interaction Checks {{ object.interaction_checks.count }}
{% endif %}
Refills Remaining {{ object.refills_remaining }}
{% endblock %} {% block js %} {% endblock %}