{# email_clinician.html #}
{% extends 'base_email.html' %}

{% comment %}
    template parameters:
        consent_mode (object)
        contact_request (object)
        patient_lookup (object)
        settings (object)
        study (object)
        url_yes (string)
        url_no (string)
        url_maybe (string)
{% endcomment %}

{% block content %}

    <p>Dear {{ patient_lookup.clinician_salutation }},</p>

    <p>Based on anonymised information in the CPFT Research Database, one
    of our research teams has identified the following patient of yours as
    potentially eligible for a study that they are conducting:</p>

    {% include "patient_table.html" with patient_lookup=patient_lookup consent_mode=consent_mode verbose=True %}
    
    <p>The study is:</p>
    {% include "study_table.html" with study=study contact_request=contact_request to_clinician=True include_details=False include_clinician_form=False %}

    {% include "discharged_phrase.html" %}

    {% if contact_request.is_extra_form %}
        <p><em>If the patient might be interested, the researchers would
        specifically like your involvement, and have provided an additional
        form for you to complete.</em></p>
    {% endif %}

    <div class="action">
        <b>Please click on ONE of the following buttons to respond to the
        request.</b>
    </div>

    {% if not contact_request.is_extra_form %}
        <div id="response_yes" class="response_button">
            <a href="{{ url_yes|safe }}">Yes, ask the patient on my behalf</a>
        </div>
    {% endif %}

    <div id="response_maybe" class="response_button">
        <a href="{{ url_maybe|safe }}">
            {% if contact_request.is_extra_form %}
                Yes, I’ll ask the patient<br>
                <i>or</i><br>
            {% endif %}
            Something else<br>
            <i>or</i><br>
            Tell me more
        </a>
    </div>

    <div id="response_no" class="response_button">
        <a href="{{ url_no|safe }}">No, I veto for clinical reasons</a>
    </div>

    <p>
        Click “Tell me more” for links to full study details, and
        information about this system. Donations will be made to local
        mental health charities as a result of your participation.
    </p>
    <p>
        <b>Don’t reply to this e-mail.</b>
        If you’d like help, please telephone the Research Database Manager,
        {{ settings.RDBM_NAME }}, on {{ settings.RDBM_TELEPHONE }}, or e-mail
        <a href="mailto:{{ settings.RDBM_EMAIL }}">{{ settings.RDBM_EMAIL }}</a>.
    </p>
    <p>
        <b>If you’re not one of this patient’s clinicians,</b> we
        apologize. Please (1) ask your secretary to correct the patient’s
        electronic records in this respect, and (2) report the contact
        request code to the Research Database Manager (details above),
        so that they can create a new request to the correct clinician.
    </p>

    <p>Many thanks for your help!</p>

    <p>Yours sincerely,</p>

    <p><i>The CPFT Research Database Computer</i></p>

    <p>P.S. Sorry this is an automated e-mail. A computer has generated
    this e-mail as part of a process that restricts access to confidential
    patient-identifiable information.</p>

{% endblock %}
