Project

General

Profile

« Previous | Next » 

Revision 1f4ae3b3

Added by Serghei Mihai almost 10 years ago

patient record id grayed on all pages in order to avoid confusion

Closes #3120

View differences:

calebasse/statistics/statistics.py
672 672
        active_states = ('SUIVI', )
673 673
    else:
674 674
        active_states = ('TRAITEMENT', )
675
    patients = [(p.last_name, p.first_name, p.paper_id) \
675
    patients = [(p.last_name, p.first_name, p.paper_id, p.pk) \
676 676
        for p in PatientRecord.objects.filter(service=statistic.in_service) \
677 677
            if p.get_state_at_day(statistic.in_start_date) and \
678 678
                p.get_state_at_day(statistic.in_start_date).status.type in active_states]
679 679
    data_tables_set=[[[['En date du :', formats.date_format(statistic.in_start_date, "SHORT_DATE_FORMAT"), len(patients)]]]]
680 680
    data = []
681
    data.append(['Nom', 'Prénom', 'N° Dossier'])
681
    data.append(['Nom', 'Prénom', 'N° Dossier', 'N° dossier informatique'])
682 682
    p_list = []
683
    for ln, fn, pid in patients:
683
    for ln, fn, paper_id, pid in patients:
684 684
        ln = ln or ''
685 685
        if len(ln) > 1:
686 686
            ln = ln[0].upper() + ln[1:].lower()
687 687
        fn = fn or ''
688 688
        if len(fn) > 1:
689 689
            fn = fn[0].upper() + fn[1:].lower()
690
        p_list.append((ln, fn, str(pid or '')))
690
        p_list.append((ln, fn, str(paper_id or ''), {'data': pid, 'style': 'lightgray'}))
691 691
    data.append(sorted(p_list,
692 692
        key=lambda k: k[0]+k[1]))
693 693
    data_tables_set[0].append(data)
......
1746 1746
        self.no_synthesis = inputs.get('no_synthesis')
1747 1747

  
1748 1748
    def get_data(self):
1749
        print self.name
1749 1750
        func = globals()[self.name]
1750 1751
        data = func(self)
1751 1752
        self.data = [[[["Date du jour", "Service", "Nom statistique"],

Also available in: Unified diff