Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
inventario
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Luis Gordillo Ruiz
inventario
Commits
966b39a2
Commit
966b39a2
authored
Jun 05, 2025
by
Jose Luis Gordillo Ruiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eliminamos la vieja versión de la gráfica de datos por paciente.
parent
9dc13d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
92 deletions
+3
-92
dinamyc.py
+3
-92
No files found.
dinamyc.py
View file @
966b39a2
...
@@ -183,7 +183,7 @@ app.layout = html.Div(children=[
...
@@ -183,7 +183,7 @@ app.layout = html.Div(children=[
#gráfica
#gráfica
html
.
Div
(
children
=
[
dcc
.
Graph
(
id
=
"gauges"
)],)
html
.
Div
(
children
=
[
dcc
.
Graph
(
id
=
"gauges"
)],)
],
style
=
{
'display'
:
'flex'
,
'flexDirection'
:
'row'
},
className
=
"wrapper"
),
],
style
=
{
'display'
:
'flex'
,
'flexDirection'
:
'row'
},
className
=
"wrapper"
),
# segundo 'panel': datos existentes por paciente.
working in progress
# segundo 'panel': datos existentes por paciente.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
[
html
.
H1
(
"Cantidad de datos registrados por paciente"
,
className
=
"header-title2"
),
html
.
H1
(
"Cantidad de datos registrados por paciente"
,
className
=
"header-title2"
),
# controles. 1 renglon, dos columnas.
# controles. 1 renglon, dos columnas.
...
@@ -222,46 +222,6 @@ app.layout = html.Div(children=[
...
@@ -222,46 +222,6 @@ app.layout = html.Div(children=[
],
style
=
{
"display"
:
"flex"
,
"flexDirection"
:
"row"
},),
],
style
=
{
"display"
:
"flex"
,
"flexDirection"
:
"row"
},),
dcc
.
Graph
(
id
=
"datos_por_paciente"
),
dcc
.
Graph
(
id
=
"datos_por_paciente"
),
],
className
=
"wrapper"
),
],
className
=
"wrapper"
),
# segundo 'panel': datos existentes por paciente. legajo.
html
.
Div
(
children
=
[
html
.
H1
(
"Cantidad de datos por paciente"
,
className
=
"header-title2"
),
# controles. 1 renglon, dos columnas.
html
.
Div
(
children
=
[
#dropdown etapa. columna izquierda.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
"Etapa"
,
className
=
"menu-title"
),
dcc
.
Dropdown
(
id
=
"etapaDet"
,
options
=
[
{
"label"
:
1
,
"value"
:
1
},
{
"label"
:
2
,
"value"
:
2
},
{
"label"
:
3
,
"value"
:
3
},
],
value
=
1
,
clearable
=
False
,
searchable
=
False
,
className
=
"dropdown"
,
),
],
className
=
"wrapper"
),
# dropdown fuente. columna derecha.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
"Fuente"
,
className
=
"menu-title"
),
dcc
.
Dropdown
(
id
=
"medidaDet"
,
options
=
[
{
"label"
:
"Comidas"
,
"value"
:
1
},
{
"label"
:
"Glucómetro"
,
"value"
:
2
},
],
value
=
1
,
clearable
=
False
,
searchable
=
False
,
className
=
"dropdown"
,
),
],
className
=
"wrapper"
,),
],
style
=
{
"display"
:
"flex"
,
"flexDirection"
:
"row"
},),
dcc
.
Graph
(
id
=
"detalle_figura"
),
],
className
=
"wrapper"
),
# gráficas de visitas
# gráficas de visitas
html
.
Div
(
children
=
[
html
.
Div
(
children
=
[
html
.
H1
(
"Visitas / Secuenciaciones"
,
className
=
"header-title2"
),
html
.
H1
(
"Visitas / Secuenciaciones"
,
className
=
"header-title2"
),
...
@@ -431,18 +391,15 @@ def update_datos_por_paciente(etapa, fuente):
...
@@ -431,18 +391,15 @@ def update_datos_por_paciente(etapa, fuente):
return
figura
return
figura
@app.callback
(
@app.callback
(
Output
(
"detalle_figura"
,
"figure"
),
Output
(
"multi-visitas"
,
"figure"
),
Output
(
"multi-visitas"
,
"figure"
),
Output
(
"detalle_pruebas"
,
"figure"
),
Output
(
"detalle_pruebas"
,
"figure"
),
Output
(
"mesurables"
,
"figure"
),
Output
(
"mesurables"
,
"figure"
),
Input
(
"medidaDet"
,
"value"
),
Input
(
"etapaDet"
,
"value"
),
Input
(
"visitaSel"
,
"value"
),
Input
(
"visitaSel"
,
"value"
),
Input
(
"visitaPruebas"
,
"value"
),
Input
(
"visitaPruebas"
,
"value"
),
Input
(
"mesurableEt"
,
"value"
),
Input
(
"mesurableEt"
,
"value"
),
)
)
def
update_charts
(
medidaDet
,
etapaDet
,
visitaSel
,
visitaPruebas
,
mesurableEt
):
def
update_charts
(
visitaSel
,
visitaPruebas
,
mesurableEt
):
contados
=
{}
contados
=
{}
total_data
=
len
(
data
.
index
)
total_data
=
len
(
data
.
index
)
...
@@ -459,52 +416,6 @@ def update_charts( medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
...
@@ -459,52 +416,6 @@ def update_charts( medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
numbers
=
{
'suffix'
:
'
%
'
,
'valueformat'
:
'.2f'
}
numbers
=
{
'suffix'
:
'
%
'
,
'valueformat'
:
'.2f'
}
modes
=
"number+gauge"
modes
=
"number+gauge"
if
etapaDet
==
99
:
etapaDet
=
"out"
else
:
etapaDet
=
"e"
+
str
(
etapaDet
)
etapalab
=
"etapa "
if
medidaDet
==
1
:
medCadena
=
"Comidas_"
title
=
"Comidas"
if
medidaDet
==
2
:
medCadena
=
"NDias_glucosa_"
title
=
"Glucómetro"
if
medidaDet
==
4
:
medCadena
=
"visita"
etapalab
=
" "
title
=
"Visitas"
if
etapaDet
==
"out"
:
etapaDet
=
"4"
else
:
etapaDet
=
etapaDet
.
replace
(
'e'
,
''
)
medCadena
=
medCadena
+
etapaDet
temp
=
data
.
sort_values
(
medCadena
)
detalle_figura
=
{
"data"
:
[
{
"x"
:
temp
[
"paciente"
],
"y"
:
temp
[
medCadena
],
#"type": "histogram",
#"xticks": temp["paciente"],
"histnorm"
:
"percent"
,
"name"
:
"Comidas"
,
#"orientation": "v",
},
#{ "x": temp["Comidas_e1"], "type": "histogram"},
],
"layout"
:
{
#"title": {"text": title + " " + etapalab + str(etapaDet)},
"xaxis"
:
{
"title"
:
{
"text"
:
"rango de "
+
medCadena
}},
"yaxis"
:
{
"title"
:
{
"text"
:
"
%
de pacientes"
}},
"bargap"
:
"0.05"
}
}
...
@@ -608,7 +519,7 @@ def update_charts( medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
...
@@ -608,7 +519,7 @@ def update_charts( medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
}
}
}
}
return
detalle_figura
,
multiV
,
detalle_pruebas
,
mesurables
return
multiV
,
detalle_pruebas
,
mesurables
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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