Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Elie BATAILLE
chom
Commits
04fd8d9f
Commit
04fd8d9f
authored
Oct 11, 2020
by
Elie BATAILLE
Browse files
Adding number of hospital admissions
parent
093d91c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/CHOM/MedicalBundle/Controller/CategorieController.php
View file @
04fd8d9f
...
...
@@ -129,6 +129,7 @@ class CategorieController extends Controller{
$stats
[
'm'
]
=
0
;
$stats
[
'f'
]
=
0
;
$stats
[
'hosp'
]
=
0
;
$stats
[
'entrees_hosp'
]
=
0
;
$stats
[
'age_m'
]
=
array
();
$stats
[
'age_f'
]
=
array
();
$stats
[
'age'
]
=
array
();
...
...
@@ -142,6 +143,9 @@ class CategorieController extends Controller{
if
(
$interval
->
invert
===
0
){
$stats
[
'hosp'
]
+=
(
int
)
(
$interval
->
format
(
'%a'
))
+
1
;
}
if
(
$hosp
->
getDateDebut
()
>=
$dateDebut
&&
$hosp
->
getDateDebut
()
<=
$dateFin
){
$stats
[
'entrees_hosp'
]
+=
1
;
}
}
if
(
$patient
->
getDateNaissance
()
!==
null
){
$stats
[
'age_'
.
$patient
->
getSexe
()][]
=
(
int
)
(
$patient
->
getDateNaissance
()
->
diff
(
$now
)
->
y
);
...
...
src/CHOM/MedicalBundle/Resources/views/Categorie/stats.html.twig
View file @
04fd8d9f
<ul>
{%
if
hosp
%}
<li>
Nombre de jours d'hospitalisation :
{{
stats.hosp
|
default
(
0
)
}}
</li>
<li>
Nombre d'entrées en hospitalisation :
{{
stats.entrees_hosp
|
default
(
0
)
}}
</li>
{%
endif
%}
{%
for
key
,
value
in
{
'all'
:
'Hommes et femmes'
,
'm'
:
'Hommes'
,
'f'
:
'Femmes'
}
%}
<li>
{{
value
}}
:
</li>
...
...
@@ -15,4 +16,4 @@
<li>
Âge : premier quartile :
{{
stats.q1
|
default
(
'Non défini'
)
}}
</li>
<li>
Âge médian :
{{
stats.q2
|
default
(
'Non défini'
)
}}
</li>
<li>
Âge : troisième quartile :
{{
stats.q3
|
default
(
'Non défini'
)
}}
</li>
</ul>
\ No newline at end of file
</ul>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment