Projet

Général

Profil

« Précédent | Suivant » 

Révision d27b1de7

Ajouté par Mikaël Ates il y a plus de 9 ans

facturation: fix not billable patients details and filtering (fixes #3137).

Voir les différences:

calebasse/facturation/models.py
300 300
                    if not patient.pause:
301 301
                        len_patient_invoiced_hors_pause = len_patient_invoiced_hors_pause + 1
302 302

  
303
                patients = set(acts_not_locked.keys() + acts_not_valide.keys() + \
304
                    acts_not_billable.keys() + acts_diagnostic.keys() + acts_treatment.keys() + \
303
                patients = set(acts_diagnostic.keys() + acts_treatment.keys() + \
305 304
                    acts_losts.keys() + acts_pause.keys() + acts_losts_missing_policy.keys() + \
306 305
                    acts_losts_missing_birthdate.keys())
307 306

  
......
395 394
                                in_o.batch = b['batch']
396 395
                                in_o.save()
397 396

  
398
                            pass
399 397
                    if patient in acts_losts.keys():
400 398
                        # TODO: More details about healthcare
401 399
                        dic['losts'] = acts_losts[patient]
......
417 415
                    if dic:
418 416
                        patients_stats.append((patient, dic))
419 417
                patients_stats = sorted(patients_stats, key=lambda patient: (patient[0].last_name, patient[0].first_name))
420

  
421 418
                len_patients = len(patients_stats)
422 419

  
423 420
                if commit:
calebasse/facturation/templates/facturation/detail.html
280 280
        <h3>Dossiers concernés</h3>
281 281
        {% if invoicing.status == "open" or invoicing.status == "closed" %}
282 282
        <p id="filtre-dossiers">
283
         <input type="radio" name="dossiers_filter" value="pause" group="filter"><label>N'afficher que les dossiers en pause facturation.</label></input></br>
284
         <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>
285
         <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>
286
         <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>
287
         <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>
283
         <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/>
284
         <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/>
285
         <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/>
286
         <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/>
287
         <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/>
288 288
         <input type="radio" name="dossiers_filter" value="all" group="filter" checked="checked"><label>Afficher tous les dossiers.</label></input>
289 289
        </p>
290 290
        <div id="dossiers-concernes">
291 291
        {% for patient, detail in patients_stats %}
292
            {% if patient.pause %}
293
            <div class="frame dossier not_facturable pause">
294
            {% else %}
295
              {% if "losts" in detail.keys %}
296
              <div class="frame dossier not_facturable losts">
297
              {% else %}
298
                {% if "acts_paused" in detail.keys %}
299
                <div class="frame dossier not_facturable acts_paused">
300
                {% else %}
301
                  {% if "losts_missing_policy" in detail.keys %}
302
                  <div class="frame dossier not_facturable missing_policy">
303
                  {% else %}
304
                    {% if "losts_missing_birthdate" in detail.keys %}
305
                    <div class="frame dossier not_facturable missing_birthdate">
306
                    {% else %}
307
                    <div class="frame dossier">
308
                    {% endif %}
309
                  {% endif %}
310
                {% endif %}
311
              {% endif %}
312
            {% endif %}
292

  
293
            <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 %}">
313 294

  
314 295
                <h3><span class="patient_pk">({{ patient.pk }})</span>
315 296
                  <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>

Formats disponibles : Unified diff