{% extends "facturation/base.html" %} {% load url from future %} {% block appbar %}

{% if service_name == "CMPP" %} Facturation {{ invoicing.seq_id }} {% if invoicing.status == "open" %} ouverte et ayant débuté le {{ invoicing.start_date }} {% else %} {% if invoicing.status == "closed" %} fermée {% else %} validée {% endif %} couvrant la période du {{ invoicing.start_date }} au {{ invoicing.end_date }} {% endif %} {% else %} Décompte {{ invoicing.seq_id }} {% if invoicing.status == "validated" %} validé {% endif %} pour le trimestre allant du {{ invoicing.start_date }} au {{ invoicing.end_date }} {% endif %}

Retourner à la liste {% if service_name == "CMPP" %} {% if invoicing.status == "open" %}{% endif %} {% if invoicing.status == "closed" %}{% endif %} {% if invoicing.status == "validated" %} {% endif %} {% else %} {% if show_validation_btn %}{% endif %} {% if invoicing.status == "validated" %}{% endif %} {% endif %} {% endblock %} {% block content %}
{% if days_not_locked %}

Jours non verrouillés

{% endif %}

Résumé

{% if service_name == "CMPP" %} {% if invoicing.status == "open" or invoicing.status == "closed" %} {% else %} {% endif %} {% else %} {% if service_name == "CAMSP" %} {% if invoicing.status == "closed" %} {% else %} {% endif %} {% else %} {% if invoicing.status == "closed" %} {% else %} {% endif %} {% endif %} {% endif %}
{% if service_name == "CMPP" and patients_stats %}

Dossiers concernés

{% if invoicing.status == "open" or invoicing.status == "closed" %}

{% for patient, detail in patients_stats.items %} {% if patient.pause or "losts" in detail.keys or "acts_paused" in detail.keys %}
{% else %}
{% endif %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% endif %} {% if "losts" in detail.keys %}

Le dossier présente des actes facturables non pris en charge.

{% endif %} {% if "acts_paused" in detail.keys %}

Le dossier présente des actes facturables en pause facturation.

{% endif %}
    {% for key, value in detail.items %} {% if key == "invoices" %}
  • Actes facturables
      {% for invoice in value %} {% for k, v in invoice.items %} {% if k == "acts" %} {% for act, hc in v %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %} {% endif %} {% endfor %} {% endfor %}
  • {% endif %} {% if key == "losts" %}
  • Actes facturables non pris en charge
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% if key == "acts_paused" %}
  • Actes facturables en pause facturation
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% else %}
{% for patient, detail in patients_stats.items %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

    {% for key, value in detail.items %} {% if key == "invoices" %}
  • Actes facturés
      {% for invoice in value %}
    • Facture {{ invoice.number }}
        {% for act in invoice.acts.all %}
      • {{ act.get_hc_tag }} : {{ act.date }} {{ act.act_type }}
      • {% endfor %}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% endif %}
{% endif %} {% if service_name == "CAMSP" and patients_stats %}

Dossiers concernés

{% if invoicing.status == "closed" %}

{% for patient, detail in patients_stats.items %} {% if patient.pause or "acts_paused" in detail.keys %}
{% else %}
{% endif %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% endif %} {% if "acts_paused" in detail.keys %}

Le dossier présente des actes facturables en pause facturation.

{% endif %}
    {% for key, value in detail.items %} {% if key == "accepted" %}
  • Actes décomptables
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% if key == "acts_paused" %}
  • Actes décomptables en pause facturation
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% else %}
{% for patient, detail in patients_stats.items %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

    {% for key, value in detail.items %} {% if key == "accepted" %}
  • Actes décomptés
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% endif %}
{% endif %} {% if service_name == "SESSAD DYS" or service_name == "SESSAD TED" %} {% if patients_stats %}

Dossiers concernés

{% if invoicing.status == "closed" %}

{% for patient, detail in patients_stats.items %} {% if patient.pause or "acts_paused" in detail.keys %}
{% else %}
{% endif %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% endif %} {% if "acts_paused" in detail.keys %}

Le dossier présente des actes facturables en pause facturation.

{% endif %}
    {% for key, value in detail.items %} {% if key == "accepted" %}
  • Actes décomptables
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% if key == "missings" %}
  • Actes décomptables non couverts par une notification
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% if key == "acts_paused" %}
  • Actes décomptables en pause facturation
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% else %}
{% for patient, detail in patients_stats.items %}

{% if patient.paper_id %}{{ patient.paper_id }} {% endif %}({{ patient.pk }}) {{ patient.first_name }} {{ patient.last_name }}

    {% for key, value in detail.items %} {% if key == "accepted" %}
  • Actes décomptés
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% endfor %}
{% endfor %}
{% endif %}
{% endif %} {% endif %} {% endblock %} {% block dialogs %}
{% csrf_token %}
{% endblock %}