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

Delete Medication {{ object.name }}

Confirm Medication Deletion

Medication to be Deleted
Generic Name: {{ object.generic_name }}
Brand Name: {{ object.brand_name|default:"Not specified" }}
Strength: {{ object.strength }}
Dosage Form: {{ object.get_dosage_form_display }}
Route: {{ object.get_route_display }}
Manufacturer: {{ object.manufacturer|default:"Not specified" }}
NDC Number: {{ object.ndc_number|default:"Not specified" }}
Category: {{ object.get_category_display }}
Status: {% if object.is_active %} Active {% else %} Inactive {% endif %}
{% if object.is_controlled %} Controlled Substance - Schedule {{ object.controlled_schedule }} {% endif %} {% if object.is_high_alert %} High Alert {% endif %}
Impact Assessment
Potential Issues:
    {% if object.prescriptions.exists %}
  • {{ object.prescriptions.count }} active prescription(s)
  • {% endif %} {% if object.inventory_items.exists %}
  • {{ object.inventory_items.count }} inventory record(s)
  • {% endif %} {% if object.is_controlled %}
  • Controlled substance requires special handling
  • {% endif %} {% if object.is_high_alert %}
  • High alert medication
  • {% endif %} {% if object.is_active %}
  • Currently active in formulary
  • {% endif %}
Related Records:
  • Prescriptions: {{ object.prescriptions.count }}
  • Inventory items: {{ object.inventory_items.count }}
  • Dispensing records: {{ object.dispensing_records.count }}
  • {% if object.drug_interactions.exists %}
  • Drug interactions: {{ object.drug_interactions.count }}
  • {% endif %}
{% if object.prescriptions.exists %}
Critical Warning

This medication has {{ object.prescriptions.count }} active prescription(s). Deleting it may:

  • Disrupt patient care and medication therapy
  • Create gaps in prescription history
  • Affect pharmacy workflow and dispensing
  • Impact insurance claims and billing
  • Remove important clinical documentation

Consider marking as inactive instead of deleting.

{% endif %} {% if object.is_controlled %}
Controlled Substance Warning

This medication is a Schedule {{ object.controlled_schedule }} controlled substance. Deletion must be properly documented for DEA compliance and audit purposes.

{% endif %} {% if object.is_high_alert %}
High Alert Medication Warning

This is a high alert medication that requires special safety protocols. Deletion may affect safety procedures and clinical guidelines.

{% endif %} {% if object.inventory_items.exists %}
Inventory Warning

This medication has {{ object.inventory_items.count }} inventory record(s). Deleting the medication may affect inventory tracking and stock management.

{% endif %}
Alternative Actions

Instead of deleting this medication, consider these alternatives:

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

Deletion Guidelines

Important Guidelines
  • Medication deletions are permanent and cannot be undone
  • All deletions are logged for audit purposes
  • Consider deactivation instead of deletion
  • Controlled substances require special documentation
  • Active prescriptions should be handled first
  • Inventory records may be affected
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

Active Prescriptions {{ object.prescriptions.count }}
Inventory Records {{ object.inventory_items.count }}
Dispensing Records {{ object.dispensing_records.count }}
{% if object.drug_interactions.exists %}
Drug Interactions {{ object.drug_interactions.count }}
{% endif %}

Medication Properties

{% if object.is_controlled %} Controlled - Schedule {{ object.controlled_schedule }} {% endif %} {% if object.is_high_alert %} High Alert {% endif %} {% if object.requires_refrigeration %} Refrigeration Required {% endif %} {% if object.is_generic %} Generic Available {% endif %} {% if object.is_active %} Active {% else %} Inactive {% endif %}
{% endblock %} {% block js %} {% endblock %}