Project

General

Profile

Download (3.11 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / dossiers / states.py @ 0ae9ecd6

1
# -*- coding: utf-8 -*-
2
'''
3
    The state name is for instance the string 'CMPP_STATE_ACCUEIL'
4
    The value given in the dictionnary can only be used for display.
5
'''
6

    
7
# Generic states name
8
STATE_CHOICES = (
9
        (0, 'En contact'),
10
        (1, "Fin d'accueil"),
11
        (2, 'En diagnostic'),
12
        (3, 'En traitement'),
13
        (4, 'Clos'),
14
)
15

    
16
STATE_CHOICES_TYPE = {
17
        '0': 'ACCUEIL',
18
        '1': 'FIN_ACCUEIL',
19
        '2': 'DIAGNOSTIC',
20
        '3': 'TRAITEMENT',
21
        '4': 'CLOS',
22
        }
23

    
24
# Map Status type with a generic state name
25
STATES_MAPPING = {
26
    'ACCUEIL': STATE_CHOICES[0][1],
27
    'FIN_ACCUEIL': STATE_CHOICES[1][1],
28
    'DIAGNOSTIC': STATE_CHOICES[2][1],
29
    'TRAITEMENT': STATE_CHOICES[3][1],
30
    'CLOS': STATE_CHOICES[4][1]
31
}
32

    
33
# Use to map status type with change state buttons
34
STATES_BTN_MAPPER = {
35
        'ACCUEIL': ('reopen-patientrecord', 'Ré-accueillir'),
36
        'FIN_ACCUEIL': ('finaccueil-patientrecord', "Fin d'accueil"),
37
        'DIAGNOSTIC': ('diagnostic-patientrecord', 'En diagnostic'),
38
        'TRAITEMENT': ('traitement-patientrecord', 'En traitement'),
39
        'CLOS': ('close-patientrecord', 'Clore'),
40
        'CLOS_RDV': ('close-rdv-patientrecord', 'Clore'),
41
        'BILAN': ('bilan-patientrecord', 'En bilan'),
42
        'SURVEILLANCE': ('surveillance-patientrecord', 'En surveillance'),
43
        'SUIVI': ('suivi-patientrecord', 'En suivi'),
44
}
45

    
46
# OLD MAPPERS now manage in databases with dossiers.Status table
47

    
48
# CMPP States
49
#CMPP_STATE_ACCUEIL = "En contact"
50
#CMPP_STATE_FIN_ACCUEIL = "Fin d'accueil"
51
#CMPP_STATE_DIAGNOSTIC = "Diagnostic"
52
#CMPP_STATE_TRAITEMENT = "Traitement"
53
#CMPP_STATE_CLOS = "Clos"
54
#CMPP_STATES = {'CMPP_STATE_ACCUEIL': CMPP_STATE_ACCUEIL,
55
#    'CMPP_STATE_FIN_ACCUEIL': CMPP_STATE_FIN_ACCUEIL,
56
#    'CMPP_STATE_DIAGNOSTIC': CMPP_STATE_DIAGNOSTIC,
57
#    'CMPP_STATE_TRAITEMENT': CMPP_STATE_TRAITEMENT,
58
#    'CMPP_STATE_CLOS': CMPP_STATE_CLOS}
59
#
60
## CAMSP States
61
#CAMSP_STATE_ACCUEIL = "En contact"
62
#CAMSP_STATE_FIN_ACCUEIL = "Fin d'accueil"
63
#CAMSP_STATE_BILAN = "Bilan"
64
#CAMSP_STATE_SURVEILLANCE = "Surveillance"
65
#CAMSP_STATE_SUIVI = "Suivi"
66
#CAMSP_STATE_CLOS = "Clos"
67
#CAMSP_STATES = {'CAMSP_STATE_ACCUEIL': CAMSP_STATE_ACCUEIL,
68
#    'CAMSP_STATE_FIN_ACCUEIL': CAMSP_STATE_FIN_ACCUEIL,
69
#    'CAMSP_STATE_BILAN': CAMSP_STATE_BILAN,
70
#    'CAMSP_STATE_SURVEILLANCE': CAMSP_STATE_SURVEILLANCE,
71
#    'CAMSP_STATE_SUIVI': CAMSP_STATE_SUIVI,
72
#    'CAMSP_STATE_CLOS': CAMSP_STATE_CLOS}
73
#
74
## SESSAD States
75
#SESSAD_STATE_ACCUEIL = "En contact"
76
#SESSAD_STATE_FIN_ACCUEIL = "Fin d'accueil"
77
#SESSAD_STATE_TRAITEMENT = "Traitement"
78
#SESSAD_STATE_CLOS = "Clos"
79
#SESSAD_STATES = {'SESSAD_STATE_ACCUEIL': SESSAD_STATE_ACCUEIL,
80
#    'SESSAD_STATE_FIN_ACCUEIL': SESSAD_STATE_FIN_ACCUEIL,
81
#    'SESSAD_STATE_TRAITEMENT': SESSAD_STATE_TRAITEMENT,
82
#    'SESSAD_STATE_CLOS': SESSAD_STATE_CLOS}
83
#
84
#STATES = {'CMPP' : CMPP_STATES,
85
#    'CAMSP': CAMSP_STATES,
86
#    'SESSAD': SESSAD_STATES}
87
#
88
#STATE_ACCUEIL = {'CMPP' : 'CMPP_STATE_ACCUEIL',
89
#    'CAMSP': 'CAMSP_STATE_ACCUEIL',
90
#    'SESSAD': 'SESSAD_STATE_ACCUEIL',
91
#    }
92

    
93
#STATES_MAPPING = dict(CMPP_STATES, **CAMSP_STATES)
94
#STATES_MAPPING = dict(STATES_MAPPING, **SESSAD_STATES)
(6-6/12)