facturation: fix not billable patients details and filtering (fixes #3137).
This commit is contained in:
parent
c29af9dd9c
commit
d27b1de75b
|
@ -300,8 +300,7 @@ class Invoicing(models.Model):
|
|||
if not patient.pause:
|
||||
len_patient_invoiced_hors_pause = len_patient_invoiced_hors_pause + 1
|
||||
|
||||
patients = set(acts_not_locked.keys() + acts_not_valide.keys() + \
|
||||
acts_not_billable.keys() + acts_diagnostic.keys() + acts_treatment.keys() + \
|
||||
patients = set(acts_diagnostic.keys() + acts_treatment.keys() + \
|
||||
acts_losts.keys() + acts_pause.keys() + acts_losts_missing_policy.keys() + \
|
||||
acts_losts_missing_birthdate.keys())
|
||||
|
||||
|
@ -395,7 +394,6 @@ class Invoicing(models.Model):
|
|||
in_o.batch = b['batch']
|
||||
in_o.save()
|
||||
|
||||
pass
|
||||
if patient in acts_losts.keys():
|
||||
# TODO: More details about healthcare
|
||||
dic['losts'] = acts_losts[patient]
|
||||
|
@ -417,7 +415,6 @@ class Invoicing(models.Model):
|
|||
if dic:
|
||||
patients_stats.append((patient, dic))
|
||||
patients_stats = sorted(patients_stats, key=lambda patient: (patient[0].last_name, patient[0].first_name))
|
||||
|
||||
len_patients = len(patients_stats)
|
||||
|
||||
if commit:
|
||||
|
|
|
@ -280,36 +280,17 @@
|
|||
<h3>Dossiers concernés</h3>
|
||||
{% if invoicing.status == "open" or invoicing.status == "closed" %}
|
||||
<p id="filtre-dossiers">
|
||||
<input type="radio" name="dossiers_filter" value="pause" group="filter"><label>N'afficher que les dossiers en pause facturation.</label></input></br>
|
||||
<input type="radio" name="dossiers_filter" value="losts" group="filter"><label>N'afficher que les dossiers présentant des actes facturables non pris en charge.</label></input></br>
|
||||
<input type="radio" name="dossiers_filter" value="acts_paused" group="filter"><label>N'afficher que les dossiers présentant des actes facturables en pause facturation.</label></input></br>
|
||||
<input type="radio" name="dossiers_filter" value="missing_policy" group="filter"><label>N'afficher que les dossiers présentant des informations de sécurité sociale manquantes.</label></input></br>
|
||||
<input type="radio" name="dossiers_filter" value="missing_birthdate" group="filter"><label>N'afficher que les dossiers pour lesquels il manque une date de naissance pour le patient.</label></input></br>
|
||||
<input type="radio" name="dossiers_filter" value="pause" group="filter"><label>N'afficher que les dossiers présentant des actes facturables en pause facturation.</label></input><br/>
|
||||
<input type="radio" name="dossiers_filter" value="losts" group="filter"><label>N'afficher que les dossiers présentant des actes facturables non pris en charge.</label></input><br/>
|
||||
<input type="radio" name="dossiers_filter" value="acts_paused" group="filter"><label>N'afficher que les dossiers présentant des actes facturables en pause facturation.</label></input><br/>
|
||||
<input type="radio" name="dossiers_filter" value="missing_policy" group="filter"><label>N'afficher que les dossiers présentant des informations de sécurité sociale manquantes.</label></input><br/>
|
||||
<input type="radio" name="dossiers_filter" value="missing_birthdate" group="filter"><label>N'afficher que les dossiers pour lesquels il manque une date de naissance pour le patient.</label></input><br/>
|
||||
<input type="radio" name="dossiers_filter" value="all" group="filter" checked="checked"><label>Afficher tous les dossiers.</label></input>
|
||||
</p>
|
||||
<div id="dossiers-concernes">
|
||||
{% for patient, detail in patients_stats %}
|
||||
{% if patient.pause %}
|
||||
<div class="frame dossier not_facturable pause">
|
||||
{% else %}
|
||||
{% if "losts" in detail.keys %}
|
||||
<div class="frame dossier not_facturable losts">
|
||||
{% else %}
|
||||
{% if "acts_paused" in detail.keys %}
|
||||
<div class="frame dossier not_facturable acts_paused">
|
||||
{% else %}
|
||||
{% if "losts_missing_policy" in detail.keys %}
|
||||
<div class="frame dossier not_facturable missing_policy">
|
||||
{% else %}
|
||||
{% if "losts_missing_birthdate" in detail.keys %}
|
||||
<div class="frame dossier not_facturable missing_birthdate">
|
||||
{% else %}
|
||||
<div class="frame dossier">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="frame dossier{% if "invoices" in detail.keys and patient.pause%} not_facturable pause{% endif %}{% if "losts" in detail.keys %} not_facturable losts{% endif %}{% if "acts_paused" in detail.keys %} not_facturable acts_paused{% endif %}{% if "losts_missing_policy" in detail.keys %} not_facturable missing_policy{% endif %}{% if "losts_missing_birthdate" in detail.keys %} not_facturable missing_birthdate{% endif %}">
|
||||
|
||||
<h3><span class="patient_pk">({{ patient.pk }})</span>
|
||||
<a href="../../dossiers/{{ patient.pk }}/view" target="_blank">{% if patient.paper_id %}{{ patient.paper_id }} {% endif %} <span class="lastname">{{ patient.last_name }}</span> {{ patient.first_name }}</a></h3>
|
||||
|
|
Reference in New Issue