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
47863643
Commit
47863643
authored
Jun 05, 2025
by
Jose Luis Gordillo Ruiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cobertura de protocolos en multiplot
parent
2504b1af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
dinamyc.py
+19
-14
No files found.
dinamyc.py
View file @
47863643
...
...
@@ -2,6 +2,7 @@ import pandas as pd
from
dash
import
Dash
,
Input
,
Output
,
dcc
,
html
import
plotly.graph_objects
as
go
import
plotly.express
as
px
from
plotly.subplots
import
make_subplots
import
requests
import
numpy
as
np
import
flask
...
...
@@ -395,26 +396,30 @@ def update_datos_por_paciente(etapa, fuente):
Output
(
"cobertura_protocolo"
,
"figure"
),
Input
(
"select_vis_protocolo"
,
"value"
)
)
def
update_por_protocol
(
visita
):
def
update_por_protocolo
(
visita
):
lcol
=
1
lrow
=
1
df1
=
visitas_datos
[
visita
-
1
]
protocolos
=
{
"pyhsiological"
:
[
"pas
s
"
,
"pad"
,
"ipaq"
,
"stress"
,
"hadsa"
,
"hadsd"
],
"pyhsiological"
:
[
"pas"
,
"pad"
,
"ipaq"
,
"stress"
,
"hadsa"
,
"hadsd"
],
"tolerance_curves"
:
[
"Pan"
,
"Gelatina"
,
"Glucosa"
],
"corporal_composition"
:
[
"mmkg"
,
"mmekg"
,
"mgkg"
,
"mlgkg"
,
"percent_mg"
,
"gv"
],
"biochemical"
:[
"hba1c"
,
"glucose"
,
"ct"
,
"tag"
,
"ldl"
,
"hdl"
,
"pcr"
,
"alt"
,
"ast"
,
"homa"
,
"insuline"
],
"antropometric"
:
[
"imc"
,
"weight"
,
"waist_circunference"
]
}
cuentas
=
100
*
df1
.
replace
(
""
,
np
.
nan
)
.
count
()
/
len
(
df1
)
figura
=
{
"data"
:
[
{
"x"
:
cuentas
.
index
,
"y"
:
cuentas
,
"type"
:
"bar"
,
}
],
"antropometric"
:
[
"imc"
,
"weight"
,
"waist_circumference"
]
}
figura
=
make_subplots
(
rows
=
2
,
cols
=
3
,
vertical_spacing
=
0.25
)
for
protocolo
in
protocolos
.
keys
():
columnas
=
list
(
set
(
df1
.
columns
)
.
intersection
(
set
(
protocolos
[
protocolo
])))
cuentas
=
100
*
df1
[
columnas
]
.
replace
(
""
,
np
.
nan
)
.
count
()
/
len
(
df1
)
figura
.
add_trace
(
go
.
Bar
(
x
=
cuentas
.
index
,
y
=
cuentas
),
row
=
lrow
,
col
=
lcol
,
)
lcol
=
lcol
+
1
if
lcol
>
3
:
lcol
=
1
lrow
=
lrow
+
1
return
figura
@app.callback
(
...
...
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