Skip to content

Commit

Permalink
general cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
apberesford committed Jan 26, 2024
1 parent 66baa45 commit 00d3466
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
32 changes: 21 additions & 11 deletions apps/dash-clinical-analytics/app.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, ClientsideFunction

# import dash_core_components as dcc
# import dash_html_components as html
# from dash.dependencies import Input, Output, ClientsideFunction
from dash import dcc, html, Input, Output, ClientsideFunction
import numpy as np
import pandas as pd
import datetime
Expand Down Expand Up @@ -55,7 +55,7 @@
"Sunday",
]

check_in_duration = df["Check-In Time"].describe()
check_in_duration = df["Check-In Time"].describe(datetime_is_numeric=True)

# Register all departments for callbacks
all_departments = df["Department"].unique().tolist()
Expand Down Expand Up @@ -117,10 +117,10 @@ def generate_control_card():
multi=True,
),
html.Br(),
html.Div(
id="reset-btn-outer",
children=html.Button(id="reset-btn", children="Reset", n_clicks=0),
),
# html.Div(
# id="reset-btn-outer",
# children=html.Button(id="reset-btn", children="Reset", n_clicks=0),
# ),
],
)

Expand Down Expand Up @@ -399,6 +399,8 @@ def generate_patient_table(figure_list, departments, wait_time_xrange, score_xra
]

# department_row
# print(type(departments))
# print(departments)
rows = [generate_table_row_helper(department) for department in departments]
# empty_row
empty_departments = [item for item in all_departments if item not in departments]
Expand Down Expand Up @@ -566,6 +568,10 @@ def create_table_figure(
html.B("Patient Volume"),
html.Hr(),
dcc.Graph(id="patient_volume_hm"),
html.Div(
id="reset-btn-outer",
children=html.Button(id="reset-btn", children="Show All", n_clicks=0),
),
],
),
# Patient Wait time by Department
Expand Down Expand Up @@ -728,7 +734,11 @@ def update_table(start, end, clinic, admit_type, heatmap_click, reset_click, *ar
score_selected_index,
)
figure_list.append(department_score_figure)

# print('BREAKBREAKBREAKBREAK')
# departments = np.insert(departments, 0, None)
# figure_list[0]['layout']['margin']['b'] = 1
# print(figure_list[0]['data'][0])
# print(figure_list[0]['layout']['margin']['t'])
# Put figures in table
table = generate_patient_table(
figure_list, departments, wait_time_xrange, score_xrange
Expand All @@ -738,4 +748,4 @@ def update_table(start, end, clinic, admit_type, heatmap_click, reset_click, *ar

# Run the server
if __name__ == "__main__":
app.run_server(debug=True)
app.run_server(debug=True)
6 changes: 3 additions & 3 deletions apps/dash-clinical-analytics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dash==1.0.0
dash>=1.0.0
gunicorn>=19.9.0
numpy>=1.16.2
pandas>=0.24.2
datetime==4.3
pathlib==1.0.1
datetime>=4.3
pathlib>=1.0.1
6 changes: 0 additions & 6 deletions apps/dash-manufacture-spc-dashboard/app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import pathlib
import dash
# import dash_core_components as dcc
# import dash_html_components as html
# from dash.dependencies import Input, Output, State
from dash import dash_table, Input, Output, State, html, dcc, callback
import plotly.graph_objs as go
import dash_daq as daq
Expand Down Expand Up @@ -154,7 +151,6 @@ def build_tab_1():
# Manually select metrics
html.Div(
id="set-specs-intro-container",
# className='twelve columns',
children=html.P(
"Use historical control limits to establish a benchmark, or set new values."
),
Expand All @@ -164,7 +160,6 @@ def build_tab_1():
children=[
html.Div(
id="metric-select-menu",
# className='five columns',
children=[
html.Label(id="metric-select-title", children="Select Metrics"),
html.Br(),
Expand All @@ -179,7 +174,6 @@ def build_tab_1():
),
html.Div(
id="value-setter-menu",
# className='six columns',
children=[
html.Div(id="value-setter-panel"),
html.Br(),
Expand Down

0 comments on commit 00d3466

Please sign in to comment.