Esempio n. 1
0
def RiskCalc():
    nav = Navbar()
    footer = Footer()
    body = dbc.Container(
        get_lang('language-calc-mortality') +
        get_page_desc('page-desc-mortality') +
        get_labs_indicator('lab_values_indicator') +
        get_feature_cards('features-mortality') +
        get_submit_button('submit-features-calc') +
        get_results_card('score-calculator-card-body', 'calc-input-error') +
        get_inputed_vals('imputed-text-mortality') +
        get_personal_visual('visual-1-mortality') +
        get_model_desc('mortality-model-desc') +
        get_feature_importance('feature-importance-bar-graph'),
        className="page-body")

    layout = html.Div([nav, body, footer], className="site")
    return layout
oxygen_in_mort = "SaO2" in cols_no_labs_mort or 'ABG: Oxygen Saturation (SaO2)' in cols_no_labs_mort
oxygen_in_mort_labs = "SaO2" in cols_labs_mort or 'ABG: Oxygen Saturation (SaO2)' in cols_labs_mort
oxygen_mort_ind = get_oxygen_ind(no_labs_features_mort["numeric"])

body = dbc.Container(
        get_lang('language-calc-mortality') + \
        get_page_desc('page-desc-mortality') + \
        get_labs_indicator('lab_values_indicator') + \
        get_feature_cards('features-mortality') + \
        get_submit_button('submit-features-calc') + \
        get_results_card('score-calculator-card-body','calc-input-error') + \
        get_inputed_vals('imputed-text-mortality') + \
        get_personal_visual('visual-1-mortality') + \
        get_model_desc('mortality-model-desc') + \
        get_feature_importance('feature-importance-bar-graph'),
        className="page-body"
    )


def RiskCalc():
    layout = html.Div([nav, body, footer], className="site")
    return layout


def valid_input_mort(labs, feature_vals, language):
    if labs:
        features = labs_features_mort
        imputer = labs_imputer_mort
    else:
        features = no_labs_features_mort
oxygen_in_infec = "SaO2" in cols_no_labs_infec or 'ABG: Oxygen Saturation (SaO2)' in cols_no_labs_infec
oxygen_in_infec_labs = "SaO2" in cols_labs_infec or 'ABG: Oxygen Saturation (SaO2)' in cols_labs_infec
oxygen_infec_ind = get_oxygen_ind(no_labs_features_infec["numeric"])

body = dbc.Container(
    get_lang('language-calc-infection') + \
    get_page_desc('page-desc-infection') + \
    get_labs_indicator('lab_values_indicator_infection') + \
    get_feature_cards('features-infection') + \
    get_submit_button('submit-features-calc-infection') + \
    get_results_card('score-calculator-card-body-infection','calc-input-error-infection') + \
    get_inputed_vals('imputed-text-infection') + \
    get_personal_visual('visual-1-infection') + \
    get_model_desc('infection-model-desc') + \
    get_feature_importance('feature-importance-bar-graph-infection'),
    className="page-body"
)


def InfectionRiskCalc():
    layout = html.Div([nav, body, footer], className="site")
    return layout


def valid_input_infec(labs, feature_vals, language):
    if labs:
        features = labs_features_infec
        imputer = labs_imputer_infec
    else:
        features = no_labs_features_infec