-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include information on mechanical ventilation patients; closes #2
- Loading branch information
Showing
4 changed files
with
377 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
patients <- DBI::dbGetQuery(conn, "SELECT * FROM patients_patient") | ||
centers <- DBI::dbGetQuery(conn, "SELECT * FROM centers_center") | ||
gender <- DBI::dbGetQuery(conn, "SELECT * FROM patients_gender") | ||
caregiver <- DBI::dbGetQuery(conn, "SELECT * FROM patients_caregiver") | ||
condition <- DBI::dbGetQuery(conn, "SELECT * FROM patients_patientcondition") | ||
profession <- DBI::dbGetQuery(conn, "SELECT * FROM patients_profession") | ||
education <- DBI::dbGetQuery(conn, "SELECT * FROM patients_education") | ||
visit <- DBI::dbGetQuery(conn, "SELECT * FROM patients_patientvisit") |> | ||
dplyr::mutate( | ||
visit_date = lubridate::as_date(visit_date) | ||
) | ||
bad_habit <- DBI::dbGetQuery(conn, "SELECT * FROM patients_badhabit") | ||
underlying_disease <- DBI::dbGetQuery(conn, "SELECT * FROM patients_underlyingdisease") | ||
cardiopathy <- DBI::dbGetQuery(conn, "SELECT * FROM patients_cardiopathy") | ||
device_testing_info <- DBI::dbGetQuery(conn, "SELECT * FROM patients_devicetestinginfo") | ||
mv_type <- DBI::dbGetQuery(conn, "SELECT * FROM patients_mvtype") | ||
mask_type <- DBI::dbGetQuery(conn, "SELECT * FROM patients_masktype") | ||
device_selection <- DBI::dbGetQuery(conn, "SELECT * FROM patients_deviceselection") | ||
check_cause <- DBI::dbGetQuery(conn, "SELECT * FROM patients_checkcause") | ||
checked_by <- DBI::dbGetQuery(conn, "SELECT * FROM patients_checkedby") | ||
ventilation_type <- DBI::dbGetQuery(conn, "SELECT * FROM patients_ventilationtype") | ||
breath_and_sleep_test <- DBI::dbGetQuery(conn, "SELECT * FROM patients_breathandsleeptest") | ||
breath_and_sleep_test_clinical_symptoms <- DBI::dbGetQuery(conn, "SELECT * FROM patients_breathandsleeptest_clinical_symptoms") | ||
clinical_symptom <- DBI::dbGetQuery(conn, "SELECT * FROM patients_clinicalsymptom") | ||
|
||
characteristics <- DBI::dbGetQuery( | ||
conn = conn, | ||
statement = "SELECT * FROM patients_patientcharacteristics" | ||
patients <- suppressWarnings(DBI::dbReadTable(conn, "patients_patient")) | ||
centers <- suppressWarnings(DBI::dbReadTable(conn, "centers_center")) | ||
gender <- suppressWarnings(DBI::dbReadTable(conn, "patients_gender")) | ||
caregiver <- suppressWarnings(DBI::dbReadTable(conn, "patients_caregiver")) | ||
condition <- suppressWarnings(DBI::dbReadTable(conn, "patients_patientcondition")) | ||
profession <- suppressWarnings(DBI::dbReadTable(conn, "patients_profession")) | ||
education <- suppressWarnings(DBI::dbReadTable(conn, "patients_education")) | ||
visit <- suppressWarnings( | ||
DBI::dbReadTable(conn, "patients_patientvisit") |> | ||
dplyr::mutate( | ||
visit_date = lubridate::as_date(visit_date) | ||
) | ||
) | ||
bad_habit <- suppressWarnings(DBI::dbReadTable(conn, "patients_badhabit")) | ||
underlying_disease <- suppressWarnings(DBI::dbReadTable(conn, "patients_underlyingdisease")) | ||
cardiopathy <- suppressWarnings(DBI::dbGetQuery(conn, "SELECT * FROM patients_cardiopathy")) | ||
device_testing_info <- suppressWarnings(DBI::dbReadTable(conn, "patients_devicetestinginfo")) | ||
mv_type <- suppressWarnings(DBI::dbReadTable(conn, "patients_mvtype")) | ||
mask_type <- suppressWarnings(DBI::dbReadTable(conn, "patients_masktype")) | ||
device_selection <- suppressWarnings(DBI::dbReadTable(conn, "patients_deviceselection")) | ||
check_cause <- suppressWarnings(DBI::dbReadTable(conn, "patients_checkcause")) | ||
checked_by <- suppressWarnings(DBI::dbReadTable(conn, "patients_checkedby")) | ||
ventilation_type <- suppressWarnings(DBI::dbReadTable(conn, "patients_ventilationtype")) | ||
breath_and_sleep_test <- suppressWarnings(DBI::dbReadTable(conn, "patients_breathandsleeptest")) | ||
breath_and_sleep_test_clinical_symptoms <- suppressWarnings(DBI::dbReadTable(conn, "patients_breathandsleeptest_clinical_symptoms")) | ||
clinical_symptom <- suppressWarnings(DBI::dbReadTable(conn, "patients_clinicalsymptom")) | ||
period_of_usage <- suppressWarnings(DBI::dbReadTable(conn, "patients_periodofusage")) | ||
treatment_provider <- suppressWarnings(DBI::dbReadTable(conn, "patients_treatmentprovider")) | ||
xoth <- suppressWarnings(DBI::dbReadTable(conn, "patients_xoth")) | ||
ventilation_reason <- suppressWarnings(DBI::dbReadTable(conn, "patients_ventilationreason")) | ||
ventilation_status <- suppressWarnings(DBI::dbReadTable(conn, "patients_ventilationstatus")) | ||
ventilation_type <- suppressWarnings(DBI::dbReadTable(conn, "patients_ventilationtype")) | ||
invasive_system_estimation <- suppressWarnings(DBI::dbReadTable(conn, "patients_invasivesystemestimation")) | ||
tracheostomy_type <- DBI::dbReadTable(conn, "patients_tracheostomytype") | ||
|
||
patient_ventilation <- DBI::dbGetQuery( | ||
conn = conn, | ||
statement = "SELECT * FROM patients_patientventilation" | ||
) | ||
characteristics <- suppressWarnings(DBI::dbReadTable(conn, "patients_patientcharacteristics")) | ||
patient_ventilation <- suppressWarnings(DBI::dbReadTable(conn, "patients_patientventilation")) | ||
|
||
message("Loaded all required tables from database...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.