{% extends "base.html" %} {% load static %} {% block title %}Prescription {{ prescription.prescription_number }} - {{ block.super }}{% endblock %} {% block content %}

Prescription {{ prescription.prescription_number }}

{% if prescription.status == 'PENDING' %} {% elif prescription.status == 'VERIFIED' %} {% endif %} Edit
{% if prescription.status == 'PENDING' %}
Pending Verification - This prescription requires pharmacist verification before dispensing.
{% elif prescription.status == 'EXPIRED' %}
Expired Prescription - This prescription expired on {{ prescription.expiration_date }}.
{% elif prescription.is_expired %}
Expiring Soon - This prescription will expire on {{ prescription.expiration_date }}.
{% endif %}
Prescription Overview
{{ prescription.prescription_number }}
{% if prescription.status == 'PENDING' %} Pending Verification {% elif prescription.status == 'VERIFIED' %} Verified - Ready to Dispense {% elif prescription.status == 'DISPENSED' %} Dispensed {% elif prescription.status == 'COMPLETED' %} Completed {% elif prescription.status == 'CANCELLED' %} Cancelled {% elif prescription.status == 'EXPIRED' %} Expired {% else %} {{ prescription.get_status_display }} {% endif %}
{{ prescription.date_prescribed|date:"M d, Y g:i A" }}
{{ prescription.expiration_date|date:"M d, Y" }}
{% if prescription.electronic_prescription %} Yes {% if prescription.e_prescription_id %} ID: {{ prescription.e_prescription_id }} {% endif %} {% else %} No {% endif %}
{% if prescription.prior_authorization_required %}
Required {% if prescription.prior_authorization_number %} Number: {{ prescription.prior_authorization_number }} {% endif %} {% if prescription.prior_authorization_expiry %} Expires: {{ prescription.prior_authorization_expiry|date:"M d, Y" }} {% endif %}
{% endif %}
{% if prescription.dispense_as_written %} Dispense As Written (DAW) {% elif prescription.generic_substitution_allowed %} Allowed {% else %} Not Allowed {% endif %}
Medication Information
{% if prescription.medication.is_controlled_substance %} {% else %} {% endif %}

{{ prescription.medication.generic_name }}

{% if prescription.medication.brand_name %}

Brand: {{ prescription.medication.brand_name }}

{% endif %}

Strength: {{ prescription.medication.strength }} {{ prescription.medication.get_unit_of_measure_display }}

Form: {{ prescription.medication.get_dosage_form_display }}

{% if prescription.medication.ndc_number %}

NDC: {{ prescription.medication.ndc_number }}

{% endif %}
{% if prescription.medication.is_controlled_substance %}
Controlled Substance: {{ prescription.medication.get_controlled_substance_schedule_display }}
{% endif %}
Drug Classification

Class: {{ prescription.medication.drug_class }}

Formulary: {{ prescription.medication.get_formulary_status_display }}

{% if prescription.medication.manufacturer %}

Manufacturer: {{ prescription.medication.manufacturer }}

{% endif %}
Dosing Instructions
{{ prescription.quantity_prescribed }} {{ prescription.get_quantity_unit_display }}
{{ prescription.frequency }}
{% if prescription.duration %}
{{ prescription.duration }}
{% endif %}
{{ prescription.refills_remaining }} of {{ prescription.refills_authorized }} remaining {% if prescription.refills_remaining == 0 %} No Refills {% endif %}
{% if prescription.indication %}
{{ prescription.indication }}
{% endif %}
{{ prescription.dosage_instructions }}
{% if prescription.patient_instructions %}
{{ prescription.patient_instructions }}
{% endif %} {% if prescription.pharmacy_notes %}
{{ prescription.pharmacy_notes }}
{% endif %}
{% if drug_interactions %}
Drug Interactions
{% for interaction in drug_interactions %}
{{ interaction.get_severity_display }} Interaction

With: {{ interaction.interacting_medication.display_name }}

{{ interaction.description }}

{{ interaction.get_severity_display }}
{% endfor %}
{% endif %} {% if dispense_records %}
Dispense History
{% for record in dispense_records %} {% endfor %}
Date Dispensed Quantity Days Supply Dispensed By Status
{{ record.dispensed_datetime|date:"M d, Y g:i A" }} {{ record.quantity_dispensed }} {{ record.get_quantity_unit_display }} {{ record.days_supply }} days {{ record.dispensed_by.get_full_name }} {{ record.get_status_display }}
{% endif %}
Patient Information
{{ prescription.patient.first_name.0 }}{{ prescription.patient.last_name.0 }}
{{ prescription.patient.get_full_name }}
MRN: {{ prescription.patient.mrn }}
DOB: {{ prescription.patient.date_of_birth|date:"M d, Y" }} ({{ prescription.patient.age }} years old)
Gender: {{ prescription.patient.get_gender_display }}
{% if prescription.patient.phone %}
Phone: {{ prescription.patient.phone }}
{% endif %} {% if prescription.patient.email %}
Email: {{ prescription.patient.email }}
{% endif %}
Prescriber Information
{{ prescription.prescriber.first_name.0 }}{{ prescription.prescriber.last_name.0 }}
{{ prescription.prescriber.get_full_name }}
{{ prescription.prescriber.profile.title|default:"Physician" }}
{% if prescription.prescriber.profile.license_number %}
License: {{ prescription.prescriber.profile.license_number }}
{% endif %} {% if prescription.prescriber.profile.dea_number %}
DEA: {{ prescription.prescriber.profile.dea_number }}
{% endif %} {% if prescription.prescriber.profile.npi_number %}
NPI: {{ prescription.prescriber.profile.npi_number }}
{% endif %}
{% if prescription.verified %}
Verification
Verified By: {{ prescription.verified_by.get_full_name }}
Verified On: {{ prescription.verified_datetime|date:"M d, Y g:i A" }}
Verified
{% endif %}
Quick Actions
{% if prescription.status == 'PENDING' %} {% elif prescription.status == 'VERIFIED' %} {% endif %} {% if prescription.refills_remaining > 0 %} {% endif %}
{% endblock %}