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

Dispensing Record {{ object.prescription.prescription_number }} - {{ object.prescription.patient.get_full_name }}

Dispensing Information

{% if object.status == 'pending' or object.status == 'in_progress' %} Edit {% endif %}
Status
{% if object.status == 'pending' %}
Pending
Awaiting dispensing
{% elif object.status == 'in_progress' %}
In Progress
Currently being processed
{% elif object.status == 'dispensed' %}
Dispensed
{{ object.dispensed_date|date:"M d, Y H:i" }}
{% elif object.status == 'partial' %}
Partial Fill
{{ object.quantity_dispensed }}/{{ object.quantity_prescribed }}
{% elif object.status == 'rejected' %}
Rejected
{{ object.rejection_reason }}
{% elif object.status == 'cancelled' %}
Cancelled
{{ object.cancelled_date|date:"M d, Y H:i" }}
{% endif %}
Priority
{% if object.priority == 'urgent' %}
Urgent
Immediate attention required
{% elif object.priority == 'high' %}
High
High priority processing
{% elif object.priority == 'normal' %}
Normal
Standard processing
{% elif object.priority == 'low' %}
Low
Low priority processing
{% endif %}
Prescription Information
Prescription Number: {{ object.prescription.prescription_number }}
Prescriber: {{ object.prescription.prescriber.get_full_name }}
Date Prescribed: {{ object.prescription.date_prescribed|date:"M d, Y" }}
DEA Number: {{ object.prescription.prescriber.dea_number|default:"Not specified" }}
Quantity Prescribed: {{ object.quantity_prescribed }} {{ object.medication.unit }}
Days Supply: {{ object.days_supply }} days
Refills Remaining: {{ object.prescription.refills_remaining }}
Directions: {{ object.prescription.directions }}
Patient Information
Name: {{ object.prescription.patient.get_full_name }}
Date of Birth: {{ object.prescription.patient.date_of_birth|date:"M d, Y" }}
Age: {{ object.prescription.patient.age }} years
Gender: {{ object.prescription.patient.get_gender_display }}
Phone: {{ object.prescription.patient.phone_number|default:"Not provided" }}
Address: {{ object.prescription.patient.address|default:"Not provided" }}
Insurance: {{ object.prescription.patient.insurance_info|default:"Not provided" }}
{% if object.prescription.patient.allergies.exists %} Allergies:
{% for allergy in object.prescription.patient.allergies.all %} {{ allergy.allergen }} {% endfor %}
{% else %} Allergies: No known allergies {% endif %}
Medication Information
Generic Name: {{ object.medication.generic_name }}
Brand Name: {{ object.medication.brand_name|default:"Not specified" }}
Strength: {{ object.medication.strength }}
Dosage Form: {{ object.medication.dosage_form }}
NDC Number: {{ object.medication.ndc_number|default:"Not specified" }}
Manufacturer: {{ object.medication.manufacturer|default:"Not specified" }}
Lot Number: {{ object.lot_number|default:"Not specified" }}
Expiration Date: {{ object.expiration_date|date:"M d, Y"|default:"Not specified" }}
{% if object.medication.is_controlled %} Controlled Substance (Schedule {{ object.medication.controlled_schedule }}) {% endif %} {% if object.medication.is_high_alert %} High Alert Medication {% endif %} {% if object.medication.requires_refrigeration %} Refrigeration Required {% endif %} {% if object.medication.is_generic %} Generic {% endif %}
Dispensing Details
Quantity Dispensed: {{ object.quantity_dispensed }} {{ object.medication.unit }}
Quantity Prescribed: {{ object.quantity_prescribed }} {{ object.medication.unit }}
Pharmacist: {{ object.pharmacist.get_full_name|default:"Not assigned" }}
License Number: {{ object.pharmacist.license_number|default:"Not specified" }}
Dispensed Date: {{ object.dispensed_date|date:"M d, Y H:i"|default:"Not dispensed" }}
Created Date: {{ object.created_at|date:"M d, Y H:i" }}
Last Updated: {{ object.updated_at|date:"M d, Y H:i" }}
{% if object.is_partial_fill %} Partial Fill {% else %} Complete Fill {% endif %}
{% if object.notes or object.pharmacist_notes %}
Notes and Comments
{% if object.notes %}
General Notes:
{{ object.notes }}
{% endif %} {% if object.pharmacist_notes %}
Pharmacist Notes:
{{ object.pharmacist_notes }}
{% endif %} {% if object.rejection_reason %}
Rejection Reason:
{{ object.rejection_reason }}
{% endif %}
{% endif %} {% if object.drug_interactions.exists or object.allergy_alerts.exists %}
Alerts and Interactions
{% if object.drug_interactions.exists %}
Drug Interactions:
{% for interaction in object.drug_interactions.all %}
{{ interaction.severity|upper }} - {{ interaction.interacting_medication }}
{{ interaction.description }}
{% endfor %}
{% endif %} {% if object.allergy_alerts.exists %}
Allergy Alerts:
{% for alert in object.allergy_alerts.all %}
ALLERGY ALERT - {{ alert.allergen }}
{{ alert.reaction_type }} - {{ alert.severity }}
{% endfor %}
{% endif %}
{% endif %}
{% if object.status == 'pending' or object.status == 'in_progress' %} {% endif %} {% if object.status == 'dispensed' %} {% endif %}

Quick Actions

{% if object.status == 'pending' %} {% endif %} {% if object.status == 'in_progress' %} {% endif %} {% if object.status == 'dispensed' %} {% endif %}

Dispensing Summary

{{ object.quantity_dispensed }}
Dispensed
{{ object.quantity_prescribed }}
Prescribed
{{ object.days_supply }}
Days Supply
{{ object.prescription.refills_remaining }}
Refills Left

Audit Information

Created By: {{ object.created_by.get_full_name|default:"System" }}
Created Date: {{ object.created_at|date:"M d, Y H:i" }}
Last Modified: {{ object.updated_at|date:"M d, Y H:i" }}
Modified By: {{ object.updated_by.get_full_name|default:"System" }}
{% if object.dispensed_date %}
Dispensed Date: {{ object.dispensed_date|date:"M d, Y H:i" }}
{% endif %}

Related Records

{% endblock %} {% block js %} {% endblock %}