/
moncompte.php
161 lines (138 loc) · 7.63 KB
/
moncompte.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?
/*
Dr Warehouse is a document oriented data warehouse for clinicians.
Copyright (C) 2017 Nicolas Garcelon
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact : Nicolas Garcelon - nicolas.garcelon@institutimagine.org
Institut Imagine
24 boulevard du Montparnasse
75015 Paris
France
*/
include "head.php";
include "menu.php";
session_write_close();
$req="select mail from dwh_user where user_num=$user_num_session ";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$mail_session=$r['MAIL'];
/* nb de requetes faites */
$req="select count(*) as NB_REQUETES from DWH_QUERY where user_num=$user_num_session ";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_requetes=$r['NB_REQUETES'];
/* nb distincts dossiers patients consultes */
$req="select count(distinct patient_num) as NB_PATIENT_CONSULTES from DWH_LOG_PATIENT where user_num=$user_num_session and log_context='dossier'";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_patient_consultes=$r['NB_PATIENT_CONSULTES'];
/* nb de cohorte creees par vous*/
$req="select count(* ) as NB_COHORTE_CREEES from DWH_COHORT where user_num=$user_num_session";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_cohorte_creees=$r['NB_COHORTE_CREEES'];
/* nb de cohortes auxquelles vous etes associés */
$req="select count(*) as NB_COHORTE_ASSOCIES from DWH_COHORT where cohort_num in (select cohort_num from DWH_COHORT_USER_RIGHT where user_num=$user_num_session) and user_num!=$user_num_session";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_cohorte_associes=$r['NB_COHORTE_ASSOCIES'];
/* nb de patients inclus dans vos cohortes*/
$req="select count(*) as NB_PATIENT_INCLUS_COHORTE from DWH_COHORT_RESULT where cohort_num in (select cohort_num from DWH_COHORT where user_num=$user_num_session)";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_patient_inclus=$r['NB_PATIENT_INCLUS_COHORTE'];
/* nb de patients inclus par vous*/
$req="select count(*) as NB_PATIENT_INCLUS_PAR_MOI from DWH_COHORT_RESULT where user_num_add=$user_num_session";
$sel=oci_parse($dbh,$req);
oci_execute($sel);
$r=oci_fetch_array($sel,OCI_RETURN_NULLS+OCI_ASSOC);
$nb_patient_inclus_par_moi=$r['NB_PATIENT_INCLUS_PAR_MOI'];
?>
<style>
.mes_stats {
float:left;
font-size:24px;
padding-left: 20px;
padding-top: 20px;
position: relative;
text-align: left;
}
</style>
<h1><? print get_translation('MY_ACCOUNT','Mon Compte'); ?></h1>
<div class="div_accueil">
<h1>
<img style="vertical-align: middle" src="images/health7.png">
<? print get_translation('MY_PROFILE','Mon profil'); ?>
</h1>
<? afficher_mes_droits ($user_num_session); ?>
</div>
<div class="div_accueil">
<h1>
<img style="vertical-align: middle" src="images/graph.png"><? print get_translation('MY_STATISTICS','Mes stats'); ?>
</h1>
<img src="images/search_64.png" width="32" style="vertical-align:middle"> <? print $nb_requetes." ".get_translation('QUERY','requêtes')."<br><br>";?>
<img src="images/medic-folder.png" width="32" style="vertical-align:middle"> <? print $nb_patient_consultes." ".get_translation('CONSULTED_PATIENTS_RECORDS','dossiers patients consultés')."<br><br>";?>
<img src="images/mine2.png" width="32" style="vertical-align:middle"> <? print $nb_cohorte_creees." ".get_translation('CREATED_BY_YOU','cohortes créées par vous')."<br><br>";?>
<img src="images/mine2.png" width="32" style="vertical-align:middle"> <? print $nb_cohorte_associes." ".get_translation('USER_ASSOCIATED_COHORTS','cohortes auxquelles vous êtes associé')."<br><br>";?>
<img src="images/inclure_patient_cohorte.png" width="32" style="vertical-align:middle"> <? print $nb_patient_inclus." ".get_translation('INCLUDED_PATIENTS_IN_YOUR_COHORTS','patients inclus dans vos cohortes')."<br><br>";?>
<img src="images/inclure_patient_cohorte.png" width="32" style="vertical-align:middle"> <? print $nb_patient_inclus_par_moi." ".get_translation('PATIENTS_INCLUDED_BY_YOU','patients inclus pas vous')."<br><br>"; ?>
</div>
<div class="div_accueil">
<h1>
<img style="vertical-align: middle" src="images/health7.png">
<? print get_translation('MY_COORDINATES','Mes coordonnées'); ?>
</h1>
<span style="line-height:2;">
<? print get_translation('EMAIL','Email'); ?> :
<?
$user_mail_session=$_SESSION[$GLOBALS['PREFIX_INSTANCE_DWH'].'_dwh_mail'];
$user_mail_session_value=$_SESSION[$GLOBALS['PREFIX_INSTANCE_DWH'].'_dwh_mail'];
if ($user_mail_session_value=='') {
$user_mail_session=get_translation('ADD_AN_EMAIL','Add an email');
}
?>
<span id=id_span_user_mail style="display:inline" onclick="plier('id_span_user_mail');deplier('id_span_modifier_user_mail','inline');"><? print $user_mail_session; ?></span>
<span id=id_span_modifier_user_mail style="display:none">
<input type="text" size="30" id="id_input_user_mail" name="email" title="<? print $user_mail_session; ?>" value="<? print $user_mail_session_value; ?>">
<input type=button class="input_texte" value="<? print get_translation('SAVE','Sauver'); ?>" onclick="modifier_user_mail();">
</span>
<br>
<? print get_translation('TELEPHONE_SHORT','Tel'); ?> :
<?
$user_phone_number_session=$_SESSION[$GLOBALS['PREFIX_INSTANCE_DWH'].'_dwh_user_phone_number'];
$user_phone_number_session_value=$_SESSION[$GLOBALS['PREFIX_INSTANCE_DWH'].'_dwh_user_phone_number'];
if ($user_phone_number_session_value=='') {
$user_phone_number_session=get_translation('ADD_A_PHONE_NUMBER','Ajouter un numéro de téléphone');
}
?>
<span id=id_span_user_phone_number style="display:inline" onclick="plier('id_span_user_phone_number');deplier('id_span_modifier_user_phone_number','inline');"><? print $user_phone_number_session; ?></span>
<span id=id_span_modifier_user_phone_number style="display:none">
<input type="text" size="30" id="id_input_user_phone_number" name="phone_number" title="<? print $user_phone_number_session; ?>" value="<? print $user_phone_number_session_value; ?>">
<input type=button class="input_texte" value="<? print get_translation('SAVE','Sauver'); ?>" onclick="modifier_user_phone_number();">
</span>
<br>
<? print get_translation('MODIFY_MY_LOCAL_PASSWORD','Modifier mon mot de passe local'); ?> :
<span id=id_span_passwd_1 style="display:inline"><input type="password" id="id_mon_password1"> <input type=button value=valider class="input_texte" onclick="plier('id_span_passwd_1');deplier('id_span_passwd_2','inline');"></span>
<span id=id_span_passwd_2 style="display:none"><? print get_translation('SECOND_INPUT_CONFIRMATION','2ieme saisie'); ?> <input type="password" id="id_mon_password2"> <input type=button class="input_texte" value="<? print get_translation('CONFIRM_MODIFICATION_PASSWORD','Confirmer'); ?>" onclick="modifier_passwd('');"></span>
<br>
<span id="id_modifmdp_result"></span>
<br>
</span>
<? affiche_mes_services (); ?>
</div>
<? save_log_page($user_num_session,'moncompte'); ?>
<? include "foot.php"; ?>