{% 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" and previous_validated %}{% 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 %}

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

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% if patient.pause_comment %}

Commentaire : {{ patient.pause_comment }}

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

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

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

Le dossier présente des informations de sécurité sociale manquantes.

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

Date de naissance manquante pour le patient.

{% 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 == "losts_missing_policy" %}
  • Actes facturables mais le dossier présente des informations de sécurité sociale manquantes.
      {% for act in value %}
    • {{ act.date }} {{ act.act_type }}
    • {% endfor %}
  • {% endif %} {% if key == "losts_missing_birthdate" %}
  • Actes facturables mais le patient n'a pas de date de naissance d'indiquée.
      {% 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 %}

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

    {% for key, value in detail.items %} {% if key == "invoices" %}
  • Actes facturés
      {% for invoice in value %}
    • {% if invoice.rejected %}Facture {{ invoice.number }} rejetée
        {% for act in invoice.acts.all %}
      • {{ act.date }} {{ act.act_type }}
      • {% endfor %}
      {% else %}Facture {{ invoice.number }}
        {% for act in invoice.acts.all %}
      • {{ act.get_hc_tag }} : {{ act.date }} {{ act.act_type }}
      • {% endfor %}
      {% endif %}
    • {% 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 %}

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

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% if patient.pause_comment %}

Commentaire : {{ patient.pause_comment }}

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

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

{% endif %} {% if patient in patients_missing_policy %}

Le dossier présente une information de sécurité sociale manquante.

{% 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 %}

({{ patient.pk }}) {% if patient.paper_id %}{{ patient.paper_id }} {% endif %} {{ patient.last_name }} {{ patient.first_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 %}

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

{% if patient.pause %}

Le dossier patient est en pause facturation.

{% if patient.pause_comment %}

Commentaire : {{ patient.pause_comment }}

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

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

{% endif %} {% if patient in patients_missing_policy %}

Le dossier présente une information de sécurité sociale manquante.

{% endif %} {% if patient in patients_missing_notif %}

Le dossier n'a pas de notification couvrant tous les actes.

{% 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 %}

({{ patient.pk }}) {% if patient.paper_id %}{{ patient.paper_id }} {% endif %} {{ patient.last_name }} {{ patient.first_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 %}