{% extends "base.html" %} {% block title %}Appointment Details - Vera Medical CRM{% endblock %} {% block content %}

Appointment Details

Case #{{ appointment['file_case_id'] or 'N/A' }}

Date & Time

Appointment Date

{{ appointment['appointment_date']|format_date }}

Time

{{ appointment['appointment_time'] or 'Not set' }}

Case & Claimant

Claimant Name

{{ appointment['claimant_first_name'] }} {{ appointment['claimant_last_name'] }}

{% if appointment['client_company_name'] %}

Client

{{ appointment['client_company_name'] }}

{% endif %}

Doctor & Location

Doctor/Specialist

{{ appointment['doctor_name'] or 'Not assigned' }}

Specialist Number

{{ appointment['specialist_number'] or 'N/A' }}

{% if appointment['location'] %}

Location

{{ appointment['location'] }}

{% endif %}

Assessment Details

Service Code

{{ appointment['service_code'] or 'N/A' }}

Assessment Type

{{ appointment['assessment_type'] or 'N/A' }}

{% if appointment['description'] %}

Description

{{ appointment['description'] }}

{% endif %}

Status & Important Dates

Status

{% if appointment['status'] == 'scheduled' %} Scheduled {% elif appointment['status'] == 'completed' %} Completed {% elif appointment['status'] == 'cancelled' %} Cancelled {% elif appointment['status'] == 'no-show' %} No-Show {% endif %}

Invoiced

{% if appointment['invoiced'] == 1 %} Yes {% else %} No {% endif %}
{% if appointment['reference'] %}

Reference Number

{{ appointment['reference'] }}

{% endif %}

Date Confirmed

{{ appointment['date_confirmed']|format_date }}

Date Received

{{ appointment['date_received']|format_date }}

Date Released

{{ appointment['date_released']|format_date }}

{% set pil_received = appointment.get('pil_instructions_received') %} {% set loi_received = appointment.get('loi_received') %} {% if pil_received or loi_received %}

PIL Instructions & LOI

{% if appointment.get('pil_instructions_received') %}

PIL Instructions Received

{{ 'Yes' if appointment['pil_instructions_received'] == 1 else 'No' }}

{% endif %} {% if appointment.get('pil_instruction_type') %}

PIL Instruction Type

{{ appointment['pil_instruction_type'] }}

{% endif %} {% if appointment.get('loi_received') %}

LOI Received

{{ 'Yes' if appointment['loi_received'] == 1 else 'No' }}

{% endif %} {% if appointment.get('loi_received_date') %}

LOI Received Date

{{ appointment['loi_received_date']|format_date }}

{% endif %}
{% endif %}

Confirmation Letters ({{ confirmation_letters|length if confirmation_letters else 0 }})

{% if confirmation_letters and confirmation_letters|length > 0 %}
    {% for letter in confirmation_letters %}
  • {% if letter['file_type'] == 'pdf' %} {% elif letter['file_type'] in ['doc', 'docx'] %} {% else %} {% endif %} {{ letter['file_name'] }}
    {% if letter['report_date'] %}

    Date: {{ letter['report_date']|format_date }}

    {% endif %} {% if letter['notes'] %}

    Notes: {{ letter['notes'] }}

    {% endif %}

    Uploaded by {{ letter['uploaded_by'] or 'System' }} on {{ letter['uploaded_at'][:10] if letter['uploaded_at'] else '' }}

  • {% endfor %}
{% else %}

No confirmation letters uploaded yet

{% endif %}
{% set report_deadline = appointment.get('report_deadline_date') %} {% set report_due = appointment.get('report_due_date') %} {% if report_deadline or report_due %}

Report Tracking

{% if appointment.get('report_deadline_date') %}

Report Deadline Date

{{ appointment['report_deadline_date']|format_date }}

{% endif %} {% if appointment.get('report_due_date') %}

Report Due Date

{{ appointment['report_due_date']|format_date }}

{% endif %}
{% endif %} {% set conf_deposit = appointment.get('confirmation_deposit_letter_sent') %} {% set conf_doctor = appointment.get('confirmation_sent_to_doctor') %} {% set in_cal = appointment.get('in_calendar') %} {% if conf_deposit is not none or conf_doctor is not none or in_cal is not none %}

Confirmation Tracking

{% if appointment.get('confirmation_deposit_letter_sent') is not none %}

Confirmation Deposit Letter to Client

{{ 'Yes' if appointment['confirmation_deposit_letter_sent'] == 1 else 'No' }}

{% if appointment.get('confirmation_deposit_letter_date') %}

{{ appointment['confirmation_deposit_letter_date']|format_date }}

{% endif %}
{% endif %} {% if appointment.get('confirmation_sent_to_doctor') is not none %}

Confirmation Sent to Doctor

{{ 'Yes' if appointment['confirmation_sent_to_doctor'] == 1 else 'No' }}

{% if appointment.get('confirmation_sent_to_doctor_date') %}

{{ appointment['confirmation_sent_to_doctor_date']|format_date }}

{% endif %}
{% endif %} {% if appointment.get('in_calendar') is not none %}

In Calendar

{{ 'Yes' if appointment['in_calendar'] == 1 else 'No' }}

{% endif %}
{% endif %} {% set ret_required = appointment.get('retainer_required') %} {% set atp_req = appointment.get('atp_requested_on') %} {% if ret_required is not none or atp_req %}

Retainer & ATP Tracking

{% if appointment.get('retainer_required') is not none %}

Retainer Required

{{ 'Yes' if appointment['retainer_required'] == 1 else 'No' }}

{% endif %} {% if appointment.get('retainer_requested_on') %}

Retainer Requested On

{{ appointment['retainer_requested_on']|format_date }}

{% endif %} {% if appointment.get('retainer_received_on') %}

Retainer Received On

{{ appointment['retainer_received_on']|format_date }}

{% endif %} {% if appointment.get('retainer_amount') %}

Retainer Amount

${{ "%.2f"|format(appointment['retainer_amount']) }} CAD

{% endif %} {% if appointment.get('atp_requested_on') %}

ATP Requested On

{{ appointment['atp_requested_on']|format_date }}

{% endif %} {% if appointment.get('atp_received_on') %}

ATP Received On

{{ appointment['atp_received_on']|format_date }}

{% endif %}
{% endif %}

Additional Services ({{ additional_services|length if additional_services else 0 }})

Add Service
{% if additional_services %}
{% for service in additional_services %}
{{ service['service_type']|replace('_', ' ')|title }} {% if service['present'] == 1 %} Present{% else %} Not Present{% endif %}
{% if service['name'] %}

Name: {{ service['name'] }}

{% endif %} {% if service['company'] %}

Company: {{ service['company'] }}

{% endif %} {% if service['language'] %}

Language: {{ service['language'] }}

{% endif %} {% if service['travel_details'] %}
Travel Details:
{{ service['travel_details']|replace('\n', '
')|safe }}
{% endif %}
{% endfor %}
{% else %}

No additional services added

{% endif %}

Meds Documentation ({{ meds|length }})

{% if meds %}
    {% for med in meds %}
  • {% if med['file_type'] == 'pdf' %} {% elif med['file_type'] in ['doc', 'docx'] %} {% else %} {% endif %} {{ med['file_name'] }}
    {% if med.get('notes') or med.get('description') %}

    {{ med.get('notes') or med.get('description') }}

    {% endif %}

    {{ med['uploaded_at'][:10] if med['uploaded_at'] else '' }}

  • {% endfor %}
{% else %}

No meds documentation uploaded

{% endif %}
{% if appointment['notes'] %}

Notes

{{ appointment['notes'] }}

{% endif %}

Attached Letters ({{ letters|length }})

{% if letters %}
    {% for letter in letters %}
  • {% if letter['file_type'] == 'pdf' %} {% elif letter['file_type'] in ['doc', 'docx'] %} {% else %} {% endif %} {{ letter['file_name'] }}
    {% if letter['letter_type'] %} {{ letter['letter_type']|title }} {% endif %} {% if letter['description'] %}

    {{ letter['description'] }}

    {% endif %}

    {{ letter['uploaded_at'][:10] if letter['uploaded_at'] else '' }}

  • {% endfor %}
{% else %}

No letters attached

{% endif %}
{% if medical_docs %}

Medical Documentation ({{ medical_docs|length }})

    {% for doc in medical_docs %}
  • {% if doc['file_type'] == 'pdf' %} {% elif doc['file_type'] in ['doc', 'docx'] %} {% else %} {% endif %} {{ doc['file_name'] }}
    {% if doc['receipt_method'] %}

    Received: {{ doc['receipt_method']|title }}

    {% endif %} {% if doc['documents_received_date'] %}

    Date: {{ doc['documents_received_date']|format_date }}

    {% endif %}

    {{ doc['uploaded_at'][:10] if doc['uploaded_at'] else '' }}

  • {% endfor %}
{% endif %}
{% endblock %}