From b05984fd4ebc8b7b5a39820fe9e3dd4fa0da8f11 Mon Sep 17 00:00:00 2001 From: schuemie Date: Mon, 9 Oct 2023 08:26:37 +0200 Subject: [PATCH 001/130] Renaming weekly R check yaml for consistency with rest of HADES --- .../{R_CMD_check_main_weekly.yml => R_CMD_check_main_weekly.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{R_CMD_check_main_weekly.yml => R_CMD_check_main_weekly.yaml} (100%) diff --git a/.github/workflows/R_CMD_check_main_weekly.yml b/.github/workflows/R_CMD_check_main_weekly.yaml similarity index 100% rename from .github/workflows/R_CMD_check_main_weekly.yml rename to .github/workflows/R_CMD_check_main_weekly.yaml From e163e802860580455616e0d819db89d3c029d396 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 4 Jul 2024 13:11:41 +0200 Subject: [PATCH 002/130] copy files from PHEMS repo --- project/PHEMS-mappings-main.Rproj | 13 + project/R/cdm.R | 544 ++++++ project/R/cohortCapr.R | 325 ++++ project/R/cohortCapr_md.Rmd | 346 ++++ project/R/cohortCapr_md.html | 707 ++++++++ project/R/conceptSets.R | 82 + project/R/countOccurrences.R | 62 + project/R/table_linked_to_concept_field.R | 14 + project/json/cardiacComplications_cs.json | 72 + project/json/cardiacProcedures_cs.json | 429 +++++ project/json/cohort.json | 1180 ++++++++++++++ project/json/intubation_cs.json | 21 + project/json/labTests_cs.json | 514 ++++++ project/renv.lock | 1815 +++++++++++++++++++++ project/renv/.gitignore | 7 + project/renv/activate.R | 1220 ++++++++++++++ project/renv/settings.json | 19 + 17 files changed, 7370 insertions(+) create mode 100644 project/PHEMS-mappings-main.Rproj create mode 100644 project/R/cdm.R create mode 100644 project/R/cohortCapr.R create mode 100644 project/R/cohortCapr_md.Rmd create mode 100644 project/R/cohortCapr_md.html create mode 100644 project/R/conceptSets.R create mode 100644 project/R/countOccurrences.R create mode 100644 project/R/table_linked_to_concept_field.R create mode 100644 project/json/cardiacComplications_cs.json create mode 100644 project/json/cardiacProcedures_cs.json create mode 100644 project/json/cohort.json create mode 100644 project/json/intubation_cs.json create mode 100644 project/json/labTests_cs.json create mode 100644 project/renv.lock create mode 100644 project/renv/.gitignore create mode 100644 project/renv/activate.R create mode 100644 project/renv/settings.json diff --git a/project/PHEMS-mappings-main.Rproj b/project/PHEMS-mappings-main.Rproj new file mode 100644 index 00000000..8e3c2ebc --- /dev/null +++ b/project/PHEMS-mappings-main.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX diff --git a/project/R/cdm.R b/project/R/cdm.R new file mode 100644 index 00000000..85de4b0e --- /dev/null +++ b/project/R/cdm.R @@ -0,0 +1,544 @@ +cdm <- list( + person = c( + "person_id", + "gender_concept_id", + "year_of_birth", + "month_of_birth", + "day_of_birth", + "birth_datetime", + "race_concept_id", + "ethnicity_concept_id", + "location_id", + "provider_id", + "care_site_id", + "person_source_value", + "gender_source_value", + "gender_source_concept_id", + "race_source_value", + "race_source_concept_id", + "ethnicity_source_value", + "ethnicity_source_concept_id" + ), + observation_period = c( + "observation_period_id", + "person_id", + "observation_period_start_date", + "observation_period_end_date", + "period_type_concept_id" + ), + visit_occurrence = c( + "visit_occurrence_id", + "person_id", + "visit_concept_id", + "visit_start_date", + "visit_start_datetime", + "visit_end_date", + "visit_end_datetime", + "visit_type_concept_id", + "provider_id", + "care_site_id", + "visit_source_value", + "visit_source_concept_id", + "admitting_source_concept_id", + "admitting_source_value", + "discharge_to_concept_id", + "discharge_to_source_value", + "preceding_visit_occurrence_id" + ), + visit_detail = c( + "visit_detail_id", + "person_id", + "visit_detail_concept_id", + "visit_detail_start_date", + "visit_detail_start_datetime", + "visit_detail_end_date", + "visit_detail_end_datetime", + "visit_detail_type_concept_id", + "provider_id", + "care_site_id", + "visit_detail_source_value", + "visit_detail_source_concept_id", + "admitting_source_concept_id", + "admitting_source_value", + "discharge_to_concept_id", + "discharge_to_source_value", + "preceding_visit_detail_id", + "parent_visit_detail_id", + "visit_occurrence_id" + ), + condition_occurrence = c( + "condition_occurrence_id", + "person_id", + "condition_concept_id", + "condition_start_date", + "condition_start_datetime", + "condition_end_date", + "condition_end_datetime", + "condition_type_concept_id", + "condition_status_concept_id", + "stop_reason", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "condition_source_value", + "condition_source_concept_id", + "condition_status_source_value" + ), + drug_exposure = c( + "drug_exposure_id", + "person_id", + "drug_concept_id", + "drug_exposure_start_date", + "drug_exposure_start_datetime", + "drug_exposure_end_date", + "drug_exposure_end_datetime", + "verbatim_end_date", + "drug_type_concept_id", + "stop_reason", + "refills", + "quantity", + "days_supply", + "sig", + "route_concept_id", + "lot_number", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "drug_source_value", + "drug_source_concept_id", + "route_source_value", + "dose_unit_source_value" + ), + procedure_occurrence = c( + "procedure_occurrence_id", + "person_id", + "procedure_concept_id", + "procedure_date", + "procedure_datetime", + "procedure_type_concept_id", + "modifier_concept_id", + "quantity", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "procedure_source_value", + "procedure_source_concept_id", + "modifier_source_value" + ), + device_exposure = c( + "device_exposure_id", + "person_id", + "device_concept_id", + "device_exposure_start_date", + "device_exposure_start_datetime", + "device_exposure_end_date", + "device_exposure_end_datetime", + "device_type_concept_id", + "unique_device_id", + "quantity", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "device_source_value", + "device_source_concept_id" + ), + measurement = c( + "measurement_id", + "person_id", + "measurement_concept_id", + "measurement_date", + "measurement_datetime", + "measurement_type_concept_id", + "operator_concept_id", + "value_as_number", + "value_as_concept_id", + "unit_concept_id", + "range_low", + "range_high", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "measurement_source_value", + "measurement_source_concept_id", + "unit_source_value", + "value_source_value" + ), + observation = c( + "observation_id", + "person_id", + "observation_concept_id", + "observation_date", + "observation_datetime", + "observation_type_concept_id", + "value_as_number", + "value_as_string", + "value_as_concept_id", + "qualifier_concept_id", + "unit_concept_id", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "observation_source_value", + "observation_source_concept_id", + "unit_source_value", + "qualifier_source_value" + ), + note = c( + "note_id", + "person_id", + "note_date", + "note_datetime", + "note_type_concept_id", + "note_class_concept_id", + "note_title", + "note_text", + "encoding_concept_id", + "language_concept_id", + "provider_id", + "visit_occurrence_id", + "visit_detail_id", + "note_source_value" + ), + note_nlp = c( + "note_nlp_id", + "note_id", + "section_concept_id", + "snippet", + "offset", + "lexical_variant", + "note_nlp_concept_id", + "note_nlp_source_concept_id", + "nlp_system", + "nlp_date", + "nlp_datetime", + "term_exists", + "term_temporal", + "term_modifiers" + ), + speciman = c( + "specimen_id", + "person_id", + "specimen_concept_id", + "specimen_type_concept_id", + "specimen_date", + "specimen_datetime", + "quantity", + "unit_concept_id", + "anatomic_site_concept_id", + "disease_status_concept_id", + "specimen_source_id", + "specimen_source_value", + "unit_source_value", + "anatomic_site_source_value", + "disease_status_source_value" + ), + fact_relationship = c( + "domain_concept_id_1", + "fact_id_1", + "domain_concept_id_2", + "fact_id_2", + "relationship_concept_id" + ), + survey_conduct = c( + "survey_conduct_id", + "person_id", + "survey_concept_id", + "survey_start_date", + "survey_start_datetime", + "survey_end_date", + "survey_end_datetime", + "provider_id", + "assisted_concept_id", + "respondent_type_concept_id", + "timing_concept_id", + "collection_method_concept_id", + "survey_source_value", + "survey_source_concept_id", + "validated_survey_concept_id", + "validated_survey_source_value", + "survey_version_number", + "survey_version_value" + ), + death = c( + "person_id", + "death_date", + "death_datetime", + "death_type_concept_id", + "cause_concept_id", + "cause_source_value", + "cause_source_concept_id" + ), + location = c( + "location_id", + "address_1", + "address_2", + "city", + "state", + "zip", + "county", + "location_source_value" + ), + care_site = c( + "care_site_id", + "care_site_name", + "place_of_service_concept_id", + "location_id", + "care_site_source_value", + "place_of_service_source_value" + ), + provider = c( + "provider_id", + "provider_name", + "NPI", + "DEA", + "specialty_concept_id", + "care_site_id", + "year_of_birth", + "gender_concept_id", + "provider_source_value", + "specialty_source_value", + "specialty_source_concept_id", + "gender_source_value", + "gender_source_concept_id" + ), + payer_plan_period = c( + "payer_plan_period_id", + "person_id", + "payer_concept_id", + "payer_source_value", + "payer_source_concept_id", + "plan_concept_id", + "plan_source_value", + "plan_source_concept_id", + "sponsor_concept_id", + "sponsor_source_value", + "sponsor_source_concept_id", + "family_source_value", + "family_source_concept_id", + "stop_reason_concept_id", + "stop_reason_source_value", + "stop_reason_source_concept_id" + ), + cost = c( + "cost_id", + "cost_event_id", + "cost_domain_id", + "cost_type_concept_id", + "currency_concept_id", + "total_charge", + "total_cost", + "total_paid", + "paid_by_payer", + "paid_by_patient", + "paid_patient_copay", + "paid_patient_coinsurance", + "paid_patient_deductible", + "paid_by_primary", + "paid_ingredient_cost", + "paid_dispensing_fee", + "payer_plan_period_id", + "amount_allowed", + "revenue_code_concept_id", + "revenue_code_source_value", + "drg_concept_id", + "drg_source_value" + ), + drug_era = c( + "drug_era_id", + "person_id", + "drug_concept_id", + "drug_era_start_date", + "drug_era_end_date", + "drug_exposure_count", + "gap_days" + ), + dose_era = c( + "dose_era_id", + "person_id", + "drug_concept_id", + "unit_concept_id", + "dose_value", + "dose_era_start_date", + "dose_era_end_date" + ), + condition_era = c( + "condition_era_id", + "person_id", + "condition_concept_id", + "condition_era_start_date", + "condition_era_end_date", + "condition_occurrence_count" + ), + metadata = c( + "metadata_concept_id", + "metadata_type_concept_id", + "name_as_concept_id", + "value_as_number", + "value_as_concept_id", + "value_as_string", + "value_as_datetime", + "metadata_date", + "metadata_datetime" + ), + attribute_definition = c( + "attribute_definition_id", + "attribute_name", + "attribute_description", + "attribute_type_concept_id", + "attribute_syntax" + ), + cdm_source = c( + "cdm_source_name", + "cdm_source_abbreviation", + "cdm_holder", + "source_description", + "source_documentation_reference", + "cdm_etl_reference", + "source_release_date", + "cdm_release_date", + "cdm_version", + "vocabulary_version" + ), + vocabulary = c( + "vocabulary_id", + "vocabulary_name", + "vocabulary_reference", + "vocabulary_version", + "vocabulary_concept_id" + ), + concept = c( + "concept_id", + "concept_name", + "domain_id", + "vocabulary_id", + "concept_class_id", + "standard_concept", + "concept_code", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + concept_ancestor = c( + "ancestor_concept_id", + "descendant_concept_id", + "min_levels_of_separation", + "max_levels_of_separation" + ), + concept_class = c( + "concept_class_id", + "concept_class_name", + "concept_class_concept_id" + ), + concept_relationship = c( + "concept_id_1", + "concept_id_2", + "relationship_id", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + concept_synonym = c( + "concept_id", + "concept_synonym_name", + "language_concept_id" + ), + domain = c( + "domain_id", + "domain_name", + "domain_concept_id" + ), + drug_strength = c( + "drug_concept_id", + "ingredient_concept_id", + "amount_value", + "amount_unit_concept_id", + "numerator_value", + "numerator_unit_concept_id", + "denominator_value", + "denominator_unit_concept_id", + "box_size", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + relationship = c( + "relationship_id", + "relationship_name", + "is_hierarchical", + "defines_ancestry", + "reverse_relationship_id", + "relationship_concept_id" + ), + source_to_concept_map = c( + "source_code", + "source_concept_id", + "source_vocabulary_id", + "source_code_description", + "target_concept_id", + "target_vocabulary_id", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + concept_relationship = c( + "concept_id_1", + "concept_id_2", + "relationship_id", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + relationship = c( + "relationship_id", + "relationship_name", + "defines_ancestry", + "reverse_relationship_id", + "relationship_concept_id" + ), + concept_synonym = c( + "concept_id", + "concept_synonym_name", + "language_concept_id" + ), + concept_ancestor = c( + "ancestor_concept_id", + "descendant_concept_id", + "min_levels_of_separation", + "max_levels_of_separation" + ), + source_to_concept_map = c( + "source_code", + "source_concept_id", + "source_vocabulary_id", + "source_code_description", + "target_concept_id", + "target_vocabulary_id", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + cohort = c( + "drug_concept_id", + "ingredient_concept_id", + "amount_value", + "amount_unit_concept_id", + "numerator_value", + "numerator_unit_concept_id", + "denominator_value", + "denominator_unit_concept_id", + "box_size", + "valid_start_date", + "valid_end_date", + "invalid_reason" + ), + cohort_definition = c( + "cohort_definition_id", + "cohort_definition_name", + "cohort_definition_description", + "definition_type_concept_id", + "cohort_definition_syntax", + "subject_concept_id", + "cohort_initiation_date" + ) +) + diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R new file mode 100644 index 00000000..89ac55be --- /dev/null +++ b/project/R/cohortCapr.R @@ -0,0 +1,325 @@ +## ----setup, include=FALSE----------------------------------------------------------------------------- +## knitr +knitr::opts_chunk$set(echo = TRUE) + + +## ----activate renv, include=FALSE--------------------------------------------------------------------- +## R environment activation +# Check R version +if (getRversion() != '4.4.0') { + stop("This project has been developed under R version 4.4.0. Please use this version.") +} + +# Get renv library +if (!require(renv)) { + install.packages("renv@v1.0.7") +} +# Get project path +path <- getwd() +if (!("renv" %in% list.files(path))) { + stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") +} + +## Activate renv +# renv::activate(path) + + +## ----housekeeping, echo=FALSE------------------------------------------------------------------------- +## housekeeping +# libraries +library(devtools) +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + +## ----connection details Eunomia, eval=FALSE, include=FALSE-------------------------------------------- +## ## Eunomia GI bleed data set +## connectionDetails <- Eunomia::getEunomiaConnectionDetails() + + +## ----connection details Synpuf 5%, eval=TRUE, include=TRUE-------------------------------------------- +## SYNPUF 5% (local) +# Create a new SQLite database +dbFile <- "./data/synpuf5pct.sqlite" + +# Create SQLite DB if it does not exist +if (!(file.exists(dbFile))) { + con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) + + # Read CSV files and write to SQLite database + csvDir <- "./data/synpuf5pct_20180710/" + csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) + + # Get cdm structure + source("./R/cdm.R") + + # Read data files and rite to sqlite DB + for (csvFile in csvFiles) { + tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) + df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) + DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) + } + + # Close the database connection + dbDisconnect(con) +} else { + connectionDetails <- + createConnectionDetails(dbms = "sqlite", server = dbFile) +} + + +## ----load data, messages=FALSE, echo=TRUE------------------------------------------------------------- +## Load data +# Connect to database +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPre <- vector("list", length=length(tables)) +names(lDataFramesPre) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + +cat("\n\nTABLES:\n ") +writeLines(tables, sep = "\n ") + + +## ----concept sets, echo=TRUE-------------------------------------------------------------------------- +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +# Create list of concept sets with descendants +conceptSets <- list( + labTests = cs(descendants(labTests), name = "lab_tests"), + intubation = cs(descendants(intubation), name="intubation"), + cardiacProcedures = cs(descendants(cardiacProcedures), name="cardiac_procedures"), + cardiacComplications = cs(descendants(cardiacComplications), name="cardiac_complications") +) %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") + +# Disconnect +disconnect(con) + + +## ----count occurences, echo=TRUE---------------------------------------------------------------------- +## Count occurrences of each concept in data +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +# count occurrences of each concept 'x' and print results +labTestsCounts <- + countOccurrences( + labTests, "measurement", lDataFramesPre, links + ) %>% print() +intubationCounts <- + countOccurrences( + intubation, "procedure_occurrence", lDataFramesPre, links + ) %>% print() +cardiacComplicationsCounts <- + countOccurrences( + cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + lDataFramesPre, links + ) %>% print() +cardiacProceduresCounts <- + countOccurrences( + cardiacProcedures, "procedure_occurrence", lDataFramesPre, links + ) %>% print() + + +## ----Cohort definition-------------------------------------------------------------------------------- +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients < 80 years old who have had a lab test + measurement(conceptSets$labTests, age(lt(80))), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include all cardiac surgeries + query = procedure(conceptSets$cardiacProcedures) + ) + ) + ), + exit = exit( + endStrategy = observationExit(), + censor = censoringEvents( + # exit if intubation has taken place + procedure(conceptSets$intubation) + ) + ) +) + + +## ----json and sql------------------------------------------------------------------------------------- +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) + + +## ----Save cohort and concept set json----------------------------------------------------------------- +write(chJson, paste(path, "./json/cohort.json", sep="")) +for (cs in names(conceptSets)) { + writeConceptSet( + x = conceptSets[[cs]], + path = paste("./json/", cs, "_cs.json", sep="") + ) +} + + +## ----Create and generate cohorts---------------------------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cardiac_arrest", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "main", + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts + + +## ----retrieve updated DB------------------------------------------------------------------------------ +# Establish connection +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPost <- vector("list", length=length(tables)) +names(lDataFramesPost) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + + +cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), + "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) + + +## ----cohort filter------------------------------------------------------------------------------------ +cohort_df <- list() +cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + cohort_df[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids) + } else { + cohort_df[[table]] <- lDataFramesPost[[table]] + } +} + + +## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE------------------------------------ +## new_data <- list() +## cohort_person_ids_plus <- append(cohort_person_ids, +## # draw a random sample to make 1000 people including the cohort subjects +## sample( +## unique(lDataFramesPost$person$person_id), +## # sample size = 1k +## size = 1000 - length(cohort_person_ids) +## ) +## ) +## for (table in names(lDataFramesPost)) { +## if ("person_id" %in% names(lDataFramesPost[[table]])) { +## new_data[[table]] <- +## lDataFramesPost[[table]] %>% +## dplyr::filter(person_id %in% cohort_person_ids_plus) +## } else { +## new_data[[table]] <- lDataFramesPost[[table]] +## } +## } + + +## ----Knit to R document, include=FALSE---------------------------------------------------------------- +knitr::purl( + input = './R/cohortCapr_md.Rmd', + output = './R/cohortCapr.R' +) + diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd new file mode 100644 index 00000000..09f82a52 --- /dev/null +++ b/project/R/cohortCapr_md.Rmd @@ -0,0 +1,346 @@ +--- +title: "cohortCapr markdown" +author: "Guus @TheHyve" +date: "2024-07-01" +output: html_document +--- +## Set-up knitr +```{r setup, include=FALSE} +## knitr +knitr::opts_chunk$set(echo = TRUE) +``` + +## Activate renv +```{r activate renv, include=FALSE} +## R environment activation +# Get renv library +if (!require(renv)) { + install.packages("renv@v1.0.7") +} +# Get project path +path <- getwd() +if (!("renv" %in% list.files(path))) { + stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") +} + +## Activate renv +# renv::activate(path) +``` + +## Set-up libraries +Set up the required libraries, working directory, and connection details +```{r housekeeping, echo=FALSE} +## housekeeping +# libraries +library(devtools) +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) +``` + +Connect to database +```{r connection details Eunomia, eval=TRUE, include=TRUE} +## Eunomia GI bleed data set +connectionDetails <- Eunomia::getEunomiaConnectionDetails() +``` + +```{r connection details Synpuf 5%, eval=FALSE, include=FALSE} +## SYNPUF 5% (local) +# Create a new SQLite database +dbFile <- "./data/synpuf5pct.sqlite" + +# Create SQLite DB if it does not exist +if (!(file.exists(dbFile))) { + con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) + + # Read CSV files and write to SQLite database + csvDir <- "./data/synpuf5pct_20180710/" + csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) + + # Get cdm structure + source("./R/cdm.R") + + # Read data files and rite to sqlite DB + for (csvFile in csvFiles) { + tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) + df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) + DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) + } + + # Close the database connection + dbDisconnect(con) +} else { + connectionDetails <- + createConnectionDetails(dbms = "sqlite", server = dbFile) +} +``` + +## Load data set +Use dbConnector library to specified DB and retrieve the GI bleed (default) dataset. +Load this data into a dataframe as well for inspection +```{r load data, messages=FALSE, echo=TRUE} +## Load data +# Connect to database +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPre <- vector("list", length=length(tables)) +names(lDataFramesPre) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + +cat("\n\nTABLES:\n ") +writeLines(tables, sep = "\n ") +``` + +## Concept sets +Define a measurement concept set using Capr and include all descendants +```{r concept sets, echo=TRUE} +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +# Create list of concept sets with descendants +conceptSets <- list( + labTests = cs(descendants(labTests), name = "lab_tests"), + intubation = cs(descendants(intubation), name="intubation"), + cardiacProcedures = cs(descendants(cardiacProcedures), name="cardiac_procedures"), + cardiacComplications = cs(descendants(cardiacComplications), name="cardiac_complications") +) %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") + +# Disconnect +disconnect(con) +``` + +## Included and excluded concepts +Retrieve concepts that have been included/excluded (does not capture descendants) +```{r count occurences, echo=TRUE} +## Count occurrences of each concept in data +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +# count occurrences of each concept 'x' and print results +labTestsCounts <- + countOccurrences( + labTests, "measurement", lDataFramesPre, links + ) %>% print() +intubationCounts <- + countOccurrences( + intubation, "procedure_occurrence", lDataFramesPre, links + ) %>% print() +cardiacComplicationsCounts <- + countOccurrences( + cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + lDataFramesPre, links + ) %>% print() +cardiacProceduresCounts <- + countOccurrences( + cardiacProcedures, "procedure_occurrence", lDataFramesPre, links + ) %>% print() +``` + +## Initial event cohort +People having any of the following: +any of the above measurements with continuous observation of 9999 days prior and 9999 days after event index data, +limit to first/earliest occurrence of any of the above measurements (+descendants) per person +```{r Cohort definition} +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients < 80 years old who have had a lab test + measurement(conceptSets$labTests, age(lt(80))), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include all cardiac surgeries + query = procedure(conceptSets$cardiacProcedures) + ) + ) + ), + exit = exit( + endStrategy = observationExit(), + censor = censoringEvents( + # exit if intubation has taken place + procedure(conceptSets$intubation) + ) + ) +) +``` + +## Write json expressions and sql queries +```{r json and sql} +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) +``` + +Save the cohort and concept set jsons; these can be imported into ATLAS +```{r Save cohort and concept set json} +write(chJson, paste(path, "./json/cohort.json", sep="")) +for (cs in names(conceptSets)) { + writeConceptSet( + x = conceptSets[[cs]], + path = paste("./json/", cs, "_cs.json", sep="") + ) +} +``` + +```{r Create and generate cohorts} +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cardiac_arrest", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "main", + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts +``` + +## Get updated DB after querying cohorts +```{r retrieve updated DB} +# Establish connection +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPost <- vector("list", length=length(tables)) +names(lDataFramesPost) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + + +cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), + "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) +``` + +## Filter loaded database for cohort +```{r cohort filter} +cohort_df <- list() +cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + cohort_df[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids) + } else { + cohort_df[[table]] <- lDataFramesPost[[table]] + } +} +``` + +```{r Create new dataset with 1k samples, eval=FALSE, include=FALSE} +new_data <- list() +cohort_person_ids_plus <- append(cohort_person_ids, + # draw a random sample to make 1000 people including the cohort subjects + sample( + unique(lDataFramesPost$person$person_id), + # sample size = 1k + size = 1000 - length(cohort_person_ids) + ) +) +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + new_data[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids_plus) + } else { + new_data[[table]] <- lDataFramesPost[[table]] + } +} +``` + +```{r Knit to R document, include=FALSE} +knitr::purl( + input = './R/cohortCapr_md.Rmd', + output = './R/cohortCapr.R' +) +``` \ No newline at end of file diff --git a/project/R/cohortCapr_md.html b/project/R/cohortCapr_md.html new file mode 100644 index 00000000..cc129f69 --- /dev/null +++ b/project/R/cohortCapr_md.html @@ -0,0 +1,707 @@ + + + + + + + + + + + + + + + +cohortCapr markdown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Set-up

+

Set up the required libraries, working directory, and connection +details

+
## Loading required package: devtools
+
## Warning: package 'devtools' was built under R version 4.4.1
+
## Loading required package: usethis
+
## Warning: package 'usethis' was built under R version 4.4.1
+
## Loading required package: RSQLite
+
## Warning: package 'RSQLite' was built under R version 4.4.1
+
## Loading required package: tibble
+
## Loading required package: CohortGenerator
+
## Loading required package: DatabaseConnector
+
## Loading required package: R6
+
## Loading required package: CirceR
+
## Loading required package: Capr
+
## attempting to download GiBleed
+
## attempting to extract and load: C:\Users\guusw\AppData\Local\Temp\RtmpmaCI5V/GiBleed_5.3.zip to: C:\Users\guusw\AppData\Local\Temp\RtmpmaCI5V/GiBleed_5.3.sqlite
+
+
+

Load Eunomia GI bleed dataset

+

Use dbConnector library to connect to Eunomia DB and retrieve the GI +bleed (default) dataset. Load this data into a dataframe as well for +inspection

+
# Connect to Eunomia GI bleed dataset
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# List all tables
+tables <- dbListTables(con)
+
+# Exclude sqlite_sequence (contains table information)
+tables <- tables[tables != "sqlite_sequence"]
+
+lDataFramesPre <- vector("list", length=length(tables))
+names(lDataFramesPre) <- tables
+
+# Create a data.frame for each table
+for (i in seq(along=tables)) {
+  lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
+}
+
+# Disconnect
+disconnect(con)
+
+cat("\n\nTABLES:\n  ")
+
## 
+## 
+## TABLES:
+## 
+
writeLines(tables, sep = "\n  ")
+
## attribute_definition
+##   care_site
+##   cdm_source
+##   cohort
+##   cohort_attribute
+##   cohort_definition
+##   concept
+##   concept_ancestor
+##   concept_class
+##   concept_relationship
+##   concept_synonym
+##   condition_era
+##   condition_occurrence
+##   cost
+##   death
+##   device_exposure
+##   domain
+##   dose_era
+##   drug_era
+##   drug_exposure
+##   drug_strength
+##   fact_relationship
+##   location
+##   measurement
+##   metadata
+##   note
+##   note_nlp
+##   observation
+##   observation_period
+##   payer_plan_period
+##   person
+##   procedure_occurrence
+##   provider
+##   relationship
+##   source_to_concept_map
+##   specimen
+##   visit_detail
+##   visit_occurrence
+##   vocabulary
+## 
+
+
+

Concept sets

+

Define a measurement concept set using Capr and include all +descendants

+
# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# Define list of concepts to use for concept sets
+labTestsNamed <- c(
+  "Immature WBC Count" = 4298431,  # White blood cell count
+  "Neutrophil Count concept1" = 37393856,  # Neutrophil count
+  "Neutrophil Count concept2" = 3007670,  # Neutrophil Ab [Units/volume] in Serum
+  Hemoglobin = 40762351,  # Hemoglobin [Moles/volume] in Blood
+  "Platelet Count" = 37393863,  # Platelet count
+  Hematocrit = 3009542,  # Hematocrit [Volume Fraction] of Blood
+  "INR Prothrombin Time" = 3034426,  # Prothrombin time (PT)
+  Lactate = 3047181,  # Lactate [Moles/volume] in Blood
+  Creatinine = 3051825,  # Creatinine [Mass/volume] in Blood
+  Albumin = 3024561,  # Albumin [Mass/volume] in Serum or Plasma
+  "Blood urea nitrogen" = 40762621,  # Urea nitrogen [Moles/volume] in Serum or Plasma
+  Glucose = 3013826,  # Glucose [Moles/volume] in Serum or Plasma
+  Bilirubin = 3006140,  # Bilirubin.total [Moles/volume] in Serum or Plasma
+  Sodium = 3019550,  # Sodium [Moles/volume] in Serum or Plasma
+  Potassium = 3005456,  # Potassium [Moles/volume] in Blood
+  Magnesium = 3033836,  # Magnesium [Moles/volume] in Blood
+  Chloride = 3018572,  # Chloride [Moles/volume] in Blood
+  Calcium = 3015377,  # Calcium [Moles/volume] in Serum or Plasma
+  Phosphate = 3003458,  # Phosphate [Moles/volume] in Serum or Plasma
+  CRP = 3020460,  # C reactive protein [Mass/volume] in Serum or Plasma
+  ALT = 3006923,  # Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma 
+  AST = 3013721,  # Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma 
+  "pH (venous)" = 37392672,  # Blood venous pH
+  "pH (arterial)" = 37399161,  # Blood arterial pH
+  "pCO2 (venous)" = 3021447,  # Carbon dioxide [Partial pressure] in Venous blood
+  "pCO2 (arterial)" = 3027946,  # Carbon dioxide [Partial pressure] in Arterial blood
+  "pO2 (venous)" = 3024354,  # Oxygen [Partial pressure] in Venous blood
+  "pO2 (arterial)" = 3027801,  # Oxygen [Partial pressure] in Arterial blood
+  "Bicarbonate (venous)" = 3027273,  # Bicarbonate [Moles/volume] in Venous blood
+  "Bicarbonate (arterial)" = 3008152  # Bicarbonate [Moles/volume] in Arterial blood
+)
+
+labTestsUnnamed <- unname(labTestsNamed) # Sql query breaks when using named vector to create concept set
+
+# Create concept set of lab tests including all descendants of every concept
+conceptSet <- cs(descendants(labTestsUnnamed), name = "Lab_Tests")
+
+# Load more details for INCLUDED concepts
+conceptSet <- getConceptSetDetails(conceptSet, con, "main")
+
## Warning: Input SQL has already been translated, so not translating again
+## This warning is displayed once every 8 hours.
+
# Disconnect
+disconnect(con)
+
+
+

Included and excluded concepts

+

Retrieve concepts that have been included/excluded (does not capture +descendants)

+
# Get countOccurrences function
+source(paste(path, "/R/countOccurrences.R", sep=""))
+
+# Link table names to concept_id field
+table_linked_to_concept_field <- list(
+  condition_occurrence = "condition_concept_id",
+  death = "cause_concept_id",
+  device_exposure = "device_concept_id",
+  drug_exposure = "drug_concept_id",
+  measurement = "measurement_concept_id",
+  observation = "observation_concept_id",
+  procedure_occurrence = "procedure_occurrence_concept_id",
+  specimen = "specimen_concept_id",
+  visit_occurrence = "visit_concept_id"
+)
+
+# count occurrences of each concept
+res <- countOccurrences(labTestsNamed, "measurement", lDataFramesPre, table_linked_to_concept_field)
+
+res
+
## # A tibble: 30 × 4
+##    concept_name              concept_id counts included
+##    <chr>                          <dbl>  <dbl> <lgl>   
+##  1 Hematocrit                   3009542    136 TRUE    
+##  2 Albumin                      3024561     35 TRUE    
+##  3 Sodium                       3019550     35 TRUE    
+##  4 ALT                          3006923     35 TRUE    
+##  5 AST                          3013721     35 TRUE    
+##  6 Immature WBC Count           4298431      0 FALSE   
+##  7 Neutrophil Count concept1   37393856      0 FALSE   
+##  8 Neutrophil Count concept2    3007670      0 FALSE   
+##  9 Hemoglobin                  40762351      0 FALSE   
+## 10 Platelet Count              37393863      0 FALSE   
+## # ℹ 20 more rows
+
+
+

Initial event cohort

+

People having any of the following: any of the above measurements +with continuous observation of 9999 days prior and 9999 days after event +index data, limit to first/earliest occurrence of any of the above +measurements (+descendants) per person

+
# Create cohort definition; include any patients who have had a lab test
+labTestCohort <- cohort(
+  entry = entry(
+    measurement(conceptSet, firstOccurrence()),
+    # observationWindow = continuousObservation(-9999, 9999),
+    primaryCriteriaLimit = "All"
+  ),
+  exit = exit(
+    endStrategy = observationExit()
+  )
+)
+
# Generate json for cohort
+labTestCohortJson <- labTestCohort %>%
+  toCirce() %>%
+  jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>%
+  as.character()
+
+ch <- jsonlite::fromJSON(labTestCohortJson)
+all_concept_ids <- unique(unlist(lapply(ch$ConceptSets$expression$items, function(item) item$concept$CONCEPT_ID)))
+
+# Generate cohort sql query
+sql <- CirceR::buildCohortQuery(
+  expression = CirceR::cohortExpressionFromJson(labTestCohortJson),
+  options = CirceR::createGenerateOptions(generateStats = FALSE)
+)
+
write(labTestCohortJson, paste(path, "/lab_test_cohort.json", sep=""))
+
# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# Cohorts to create
+cohortsToCreate <- tibble::tibble(
+  cohortId = 9876,
+  cohortName = "Lab_test_Cohort",
+  sql = sql
+)
+
+# Cohort tables
+cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "Lab_test_cohort")
+CohortGenerator::createCohortTables(
+  connectionDetails = connectionDetails,
+  cohortDatabaseSchema = "main",
+  cohortTableNames = cohortTableNames,
+)
+
## Connecting using SQLite driver
+
## Creating cohort tables
+## - Created table main.Lab_test_cohort
+## - Created table main.Lab_test_cohort
+## - Created table main.Lab_test_cohort_inclusion
+## - Created table main.Lab_test_cohort_inclusion_result
+## - Created table main.Lab_test_cohort_inclusion_stats
+## - Created table main.Lab_test_cohort_summary_stats
+## - Created table main.Lab_test_cohort_censor_stats
+## Creating cohort tables took 0.44secs
+
# Generate the cohorts
+cohortsGenerated <- CohortGenerator::generateCohortSet(
+  connectionDetails = connectionDetails,
+  cdmDatabaseSchema = "main",
+  cohortDatabaseSchema = "main",
+  cohortTableNames = cohortTableNames,
+  cohortDefinitionSet = cohortsToCreate
+)
+
## Connecting using SQLite driver
+
## Initiating cluster consisting only of main thread
+## 1/1- Generating cohort: Lab_test_Cohort (id = 9876)
+##   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |=====                                                                 |   8%  |                                                                              |========                                                              |  12%  |                                                                              |===========                                                           |  15%  |                                                                              |=============                                                         |  19%  |                                                                              |================                                                      |  23%  |                                                                              |===================                                                   |  27%  |                                                                              |======================                                                |  31%  |                                                                              |========================                                              |  35%  |                                                                              |===========================                                           |  38%  |                                                                              |==============================                                        |  42%  |                                                                              |================================                                      |  46%  |                                                                              |===================================                                   |  50%  |                                                                              |======================================                                |  54%  |                                                                              |========================================                              |  58%  |                                                                              |===========================================                           |  62%  |                                                                              |==============================================                        |  65%  |                                                                              |================================================                      |  69%  |                                                                              |===================================================                   |  73%  |                                                                              |======================================================                |  77%  |                                                                              |=========================================================             |  81%  |                                                                              |===========================================================           |  85%  |                                                                              |==============================================================        |  88%  |                                                                              |=================================================================     |  92%  |                                                                              |===================================================================   |  96%  |                                                                              |======================================================================| 100%
+
## Executing SQL took 0.17 secs
+
## Generating cohort set took 0.48 secs
+
# Get cohort counts
+cohortCounts <- CohortGenerator::getCohortCounts(
+  connectionDetails = connectionDetails,
+  cohortDatabaseSchema = "main",
+  cohortTable = cohortTableNames$cohortTable
+)
+
## Connecting using SQLite driver
+
## Counting cohorts took 0.101 secs
+
# Disconnect
+disconnect(con)
+
+
+cohortCounts
+
##   cohortId cohortEntries cohortSubjects
+## 1     9876           134            134
+
+
+

Get updated DB after querying cohorts

+
# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# List all tables
+tables <- dbListTables(con)
+
+# Exclude sqlite_sequence (contains table information)
+tables <- tables[tables != "sqlite_sequence"]
+
+lDataFramesPost <- vector("list", length=length(tables))
+names(lDataFramesPost) <- tables
+
+# Create a data.frame for each table
+for (i in seq(along=tables)) {
+  lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
+}
+
+# Disconnect
+disconnect(con)
+
+
+cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), 
+    "\nNumber of persons in cohort:  ", length(unique(lDataFramesPost$lab_test_cohort$subject_id)))
+
## Number of persons in dataset:  2694 
+## Number of persons in cohort:   134
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R new file mode 100644 index 00000000..83b250d6 --- /dev/null +++ b/project/R/conceptSets.R @@ -0,0 +1,82 @@ +library(Capr) + +# Define list of concepts to use for concept sets +# include all descendant concepts + +# laboratory tests +labTests <- c( + 4298431, # source: Immature WBC Count /// concept: White blood cell count + 37393856, # source: Neutrophil Count concept1 /// concept: Neutrophil count + 3007670, # source: Neutrophil Count concept2 /// concept: Neutrophil Ab [Units/volume] in Serum + 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood + 37393863, # source: Platelet Count /// concept: Platelet count + 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood + 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) + 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood + 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood + 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma + 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma + 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma + 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma + 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma + 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood + 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood + 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood + 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma + 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma + 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma + 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 37392672, # source: pH (venous) /// concept: Blood venous pH + 37399161, # source: pH (arterial) /// concept: Blood arterial pH + 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood + 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood + 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood + 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood + 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood + 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood +) + +# cardiac complications +cardiacComplications <- c( + 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis + 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration + 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome + 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest +) + +# intubation +intubation <- c( + 4202832 # source: Intubation /// concept: Intubation +) + +# cardiac procedures +cardiacProcedures <- c( + 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery + 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart + 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit + 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit + 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit + 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve + 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve + 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis + 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve + 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection + 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot + 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus + 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery + 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection + 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect + 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve + 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle + 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery + 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction + 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta + 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum + 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm + 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta + 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta + 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart +) + +cat("Sourced concept sets") diff --git a/project/R/countOccurrences.R b/project/R/countOccurrences.R new file mode 100644 index 00000000..00d12ef9 --- /dev/null +++ b/project/R/countOccurrences.R @@ -0,0 +1,62 @@ +# Function to count occurrences of each value in v within df$value, unique by person_id +countOccurrences <- function(v, tables, list_of_df, links) { + ## Checks ----- + # Argument input types + stopifnot(is.vector(v)) # v = vector of concepts in concept set + stopifnot(is.character(tables) & is.vector(tables)) # table = string with CDM table name + stopifnot(is.list(list_of_df)) # list_of_df = list of CDM tables as dataframes + stopifnot(is.list(links)) # links = links between table names and concept_id fields + + # Check the provided table is compatible with links + if (!any(tables %in% names(links))) { + warning("Table is not one of the tables listed underneath with linked concept_id fields, \nPlease provide a different table or update the table -- concept_id links. \nTerminating") + writeLines(names(links)) + break + } + + ## Function ----- + counts_persons <- c() + counts <- c() + i <- 0 + for (table in tables) { + i <- i + 1 + # Get table of choice as dataframe + df <- list_of_df[[table]] + + # Get concept_id field + concept_id_field <- links[[table]] + + # Ensure unique person_id for each value + unique_df <- df[!duplicated(df[c("person_id", concept_id_field)]), ] + + # Initialize a named vector to store counts_persons + tmp_p <- setNames(numeric(length(v)), as.character(v)) + tmp_t <- setNames(numeric(length(v)), as.character(v)) + + # Count persons and occurrences + for (val in v) { + tmp_p[as.character(val)] <- sum(unique_df[, concept_id_field] == as.character(val)) + tmp_t[as.character(val)] <- sum(df[, concept_id_field] == as.character(val)) + } + if (i == 1) { + counts_persons <- tmp_p + counts <- tmp_t + } else { + counts_persons <- counts_persons + tmp_p + counts <- counts + tmp_t + } + } + + # Tibble + res <- tibble::tibble( + concept_name = names(v), + concept_id = v, + count_persons = counts_persons, + count_occurrences = counts, + included = c(counts > 0) + ) %>% dplyr::arrange(dplyr::desc(counts)) # Arrange tibble descendingly according to counts + + return(res) +} + +cat("Sourced countOccurrences function") \ No newline at end of file diff --git a/project/R/table_linked_to_concept_field.R b/project/R/table_linked_to_concept_field.R new file mode 100644 index 00000000..a871b6cf --- /dev/null +++ b/project/R/table_linked_to_concept_field.R @@ -0,0 +1,14 @@ +# Link table names to respective concept_id field +links <- list( + condition_occurrence = "condition_concept_id", + death = "cause_concept_id", + device_exposure = "device_concept_id", + drug_exposure = "drug_concept_id", + measurement = "measurement_concept_id", + observation = "observation_concept_id", + procedure_occurrence = "procedure_concept_id", + specimen = "specimen_concept_id", + visit_occurrence = "visit_concept_id" +) + +cat("Sourced links object") \ No newline at end of file diff --git a/project/json/cardiacComplications_cs.json b/project/json/cardiacComplications_cs.json new file mode 100644 index 00000000..77d37ecc --- /dev/null +++ b/project/json/cardiacComplications_cs.json @@ -0,0 +1,72 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/json/cardiacProcedures_cs.json b/project/json/cardiacProcedures_cs.json new file mode 100644 index 00000000..f91e6c0f --- /dev/null +++ b/project/json/cardiacProcedures_cs.json @@ -0,0 +1,429 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/json/cohort.json b/project/json/cohort.json new file mode 100644 index 00000000..fa6a9899 --- /dev/null +++ b/project/json/cohort.json @@ -0,0 +1,1180 @@ +{ + "ConceptSets": [ + { + "id": 0, + "name": "lab_tests", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393856, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 1, + "name": "cardiac_complications", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 2, + "name": "cardiac_procedures", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 3, + "name": "intubation", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4202832, + "CONCEPT_NAME": "Intubation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52765003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + } + ], + "PrimaryCriteria": { + "CriteriaList": [ + { + "Measurement": { + "CodesetId": 0, + "Age": { + "Op": "lt", + "Value": 80 + } + } + } + ], + "ObservationWindow": { + "PriorDays": 0, + "PostDays": 0 + }, + "PrimaryCriteriaLimit": { + "Type": "All" + } + }, + "QualifiedLimit": { + "Type": "First" + }, + "ExpressionLimit": { + "Type": "First" + }, + "InclusionRules": [ + { + "name": "rule1", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ConditionOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + }, + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + }, + { + "name": "rule2", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 2 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + } + ], + "CensoringCriteria": [ + { + "ProcedureOccurrence": { + "CodesetId": 3 + } + } + ], + "CollapseSettings": { + "CollapseType": "ERA", + "EraPad": 0 + }, + "CensorWindow": {}, + "cdmVersionRange": ">=5.0.0" +} diff --git a/project/json/intubation_cs.json b/project/json/intubation_cs.json new file mode 100644 index 00000000..d8af3e3d --- /dev/null +++ b/project/json/intubation_cs.json @@ -0,0 +1,21 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4202832, + "CONCEPT_NAME": "Intubation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52765003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/json/labTests_cs.json b/project/json/labTests_cs.json new file mode 100644 index 00000000..17cf111e --- /dev/null +++ b/project/json/labTests_cs.json @@ -0,0 +1,514 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393856, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/renv.lock b/project/renv.lock new file mode 100644 index 00000000..cf4c8ba3 --- /dev/null +++ b/project/renv.lock @@ -0,0 +1,1815 @@ +{ + "R": { + "Version": "4.4.0", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.posit.co/cran/latest" + } + ] + }, + "Packages": { + "Capr": { + "Package": "Capr", + "Version": "2.0.8", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Capr", + "RemoteUsername": "ohdsi", + "RemoteRef": "v2.0.8", + "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", + "Requirements": [ + "CirceR", + "DBI", + "DatabaseConnector", + "R", + "SqlRender", + "checkmate", + "cli", + "digest", + "dplyr", + "fs", + "generics", + "glue", + "jsonlite", + "lubridate", + "magrittr", + "methods", + "purrr", + "readr", + "rlang", + "stringr", + "tibble", + "tidyr" + ], + "Hash": "5c14cb5c92bf80da1542420717c7c7e8" + }, + "CirceR": { + "Package": "CirceR", + "Version": "1.3.3", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "CirceR", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "30303ec28bfd3bd4deffc9f84e7b8f9ddbf93c77", + "Requirements": [ + "R", + "RJSONIO", + "rJava" + ], + "Hash": "3e9b4a57bbac2222751f20d4d59a390f" + }, + "CohortGenerator": { + "Package": "CohortGenerator", + "Version": "0.9.0", + "Source": "GitHub", + "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "CohortGenerator", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", + "Requirements": [ + "DatabaseConnector", + "ParallelLogger", + "R", + "R6", + "RJSONIO", + "SqlRender", + "bit64", + "checkmate", + "digest", + "dplyr", + "jsonlite", + "lubridate", + "readr", + "rlang", + "stringi" + ], + "Hash": "1ba1b2d91607742e1d53676af13f506f" + }, + "DBI": { + "Package": "DBI", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "065ae649b05f1ff66bb0c793107508f5" + }, + "DatabaseConnector": { + "Package": "DatabaseConnector", + "Version": "6.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "SqlRender", + "bit64", + "checkmate", + "dbplyr", + "digest", + "methods", + "rJava", + "readr", + "rlang", + "stringr", + "urltools", + "utils" + ], + "Hash": "1ef65614602c6534a6c666e872c3b647" + }, + "ParallelLogger": { + "Package": "ParallelLogger", + "Version": "3.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "jsonlite", + "methods", + "snow", + "utils", + "xml2" + ], + "Hash": "fd636fc067099b75b8ad17e9104b10f3" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RJSONIO": { + "Package": "RJSONIO", + "Version": "1.3-1.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" + ], + "Hash": "2f89abc0f88c647d3386c672632f4baf" + }, + "RSQLite": { + "Package": "RSQLite", + "Version": "2.3.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "bit64", + "blob", + "cpp11", + "memoise", + "methods", + "pkgconfig", + "plogr", + "rlang" + ], + "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "utils" + ], + "Hash": "5ea2700d21e038ace58269ecdbeb9ec0" + }, + "SqlRender": { + "Package": "SqlRender", + "Version": "1.18.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "checkmate", + "rJava", + "rlang" + ], + "Hash": "e1762de0f08b14658d74989c10e2f265" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "backports": { + "Package": "backports", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "e1e1b9d75c37401117b636b7ae50827a" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "d242abec29412ce988848d0294b208fd" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bit", + "methods", + "stats", + "utils" + ], + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "blob": { + "Package": "blob", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "rlang", + "vctrs" + ], + "Hash": "40415719b5a479b87949f3aa0aee737c" + }, + "brew": { + "Package": "brew", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8f4a384e19dccd8c65356dc096847b76" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "8644cc53f43828f19133548195d7e59e" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "callr": { + "Package": "callr", + "Version": "3.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" + }, + "checkmate": { + "Package": "checkmate", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "backports", + "utils" + ], + "Hash": "c01cab1cb0f9125211a6fc99d540e315" + }, + "cli": { + "Package": "cli", + "Version": "3.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5d8225445acb167abf7797de48b2ee3c" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "859d96e65ef198fd43e82b9628d593ef" + }, + "credentials": { + "Package": "credentials", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ], + "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + }, + "curl": { + "Package": "curl", + "Version": "5.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + }, + "dbplyr": { + "Package": "dbplyr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "R6", + "blob", + "cli", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "purrr", + "rlang", + "tibble", + "tidyr", + "tidyselect", + "utils", + "vctrs", + "withr" + ], + "Hash": "39b2e002522bfd258039ee4e889e0fd1" + }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "desc", + "ellipsis", + "fs", + "lifecycle", + "memoise", + "miniUI", + "pkgbuild", + "pkgdown", + "pkgload", + "profvis", + "rcmdcheck", + "remotes", + "rlang", + "roxygen2", + "rversions", + "sessioninfo", + "stats", + "testthat", + "tools", + "urlchecker", + "usethis", + "utils", + "withr" + ], + "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.35", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "698ece7ba5a4fa4559e3d537e7ec3d31" + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ], + "Hash": "45a6a596bf0108ee1ff16a040a2df897" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "rlang", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "rlang" + ], + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "962174cf2aeb5b9eea581522286a911f" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" + }, + "gert": { + "Package": "gert", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" + ], + "Hash": "f70d3fe2d9e7654213a946963d1591eb" + }, + "gh": { + "Package": "gh", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "gitcreds", + "glue", + "httr2", + "ini", + "jsonlite", + "lifecycle", + "rlang" + ], + "Hash": "fbbbc48eba7a6626a08bb365e44b563b" + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "04291cc45198225444a397606810ac37" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.15", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" + }, + "httr": { + "Package": "httr", + "Version": "1.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" + }, + "httr2": { + "Package": "httr2", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "curl", + "glue", + "lifecycle", + "magrittr", + "openssl", + "rappdirs", + "rlang", + "vctrs", + "withr" + ], + "Hash": "03d741c92fda96d98c3a3f22494e3b4a" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" + ], + "Hash": "e1b9c55281c5adc4dd113652d9e26768" + }, + "knitr": { + "Package": "knitr", + "Version": "1.47", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "7c99b2d55584b982717fcc0950378612" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" + }, + "lubridate": { + "Package": "lubridate", + "Version": "1.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "generics", + "methods", + "timechange" + ], + "Hash": "680ad542fbcf801442c83a6ac5a2126c" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "miniUI": { + "Package": "miniUI", + "Version": "0.1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools", + "shiny", + "utils" + ], + "Hash": "fec5f52652d60615fdb3957b3d74324a" + }, + "openssl": { + "Package": "openssl", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass" + ], + "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "a29e8e134a460a01e0ca67a4763c595b" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fs", + "httr", + "jsonlite", + "magrittr", + "memoise", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ], + "Hash": "8bf1151ed1a48328d71b937e651117a6" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "crayon", + "desc", + "fs", + "glue", + "methods", + "pkgbuild", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "876c618df5ae610be84356d5d7a5d124" + }, + "plogr": { + "Package": "plogr", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "09eb987710984fc2905c7129c7d85e65" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" + }, + "processx": { + "Package": "processx", + "Version": "3.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" + }, + "profvis": { + "Package": "profvis", + "Version": "0.3.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmlwidgets", + "purrr", + "rlang", + "stringr", + "vctrs" + ], + "Hash": "aa5a3864397ce6ae03458f98618395a1" + }, + "progress": { + "Package": "progress", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "f4625e061cb2865f111b47ff163a5ca6" + }, + "promises": { + "Package": "promises", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" + ], + "Hash": "434cd5388a3979e74be5c219bcd6e77d" + }, + "ps": { + "Package": "ps", + "Version": "1.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" + }, + "rJava": { + "Package": "rJava", + "Version": "1.0-11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "524167e771b81342f8dd7a891ed3afa8" + }, + "ragg": { + "Package": "ragg", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "systemfonts", + "textshaping" + ], + "Hash": "e3087db406e079a8a2fd87f413918ed3" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "callr", + "cli", + "curl", + "desc", + "digest", + "pkgbuild", + "prettyunits", + "rprojroot", + "sessioninfo", + "utils", + "withr", + "xopen" + ], + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" + }, + "readr": { + "Package": "readr", + "Version": "2.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "methods", + "rlang", + "tibble", + "tzdb", + "utils", + "vroom" + ], + "Hash": "9de96463d2117f6ac49980577939dfb3" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "3ee025083e66f18db6cf27b56e23e141" + }, + "renv": { + "Package": "renv", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "397b7b2a265bc5a7a06852524dabae20" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "27f9502e1cdbfa195f94e03b0f517484" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "knitr", + "methods", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "utils", + "withr", + "xml2" + ], + "Hash": "c25fe7b2d8cba73d1b63c947bf7afdb9" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96710351d642b70e8f02ddeb237c46a7" + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "curl", + "utils", + "xml2" + ], + "Hash": "a9881dfed103e83f9de151dc17002cd1" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "tools", + "utils" + ], + "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" + }, + "shiny": { + "Package": "shiny", + "Version": "1.8.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "54b26646816af9960a4c64d8ceec75d6" + }, + "snow": { + "Package": "snow", + "Version": "0.4-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "40b74690debd20c57d93d8c246b305d4" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" + }, + "stringi": { + "Package": "stringi", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "39e1144fd75428983dc3f63aa53dfa91" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "960e2ae9e09656611e0b8214ad543207" + }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle" + ], + "Hash": "213b6b8ed5afbf934843e6c3b090d418" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle", + "systemfonts" + ], + "Hash": "5142f8bc78ed3d819d26461b641627ce" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "cpp11", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ], + "Hash": "829f27b9c4919c16b593794a6344d6c0" + }, + "timechange": { + "Package": "timechange", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.51", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "d44e2fcd2e4e076f0aac540208559d1d" + }, + "triebeard": { + "Package": "triebeard", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp" + ], + "Hash": "642507a148b0dd9b5620177e0a044413" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "f561504ec2897f4d46f0c7657e488ae1" + }, + "urlchecker": { + "Package": "urlchecker", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "curl", + "tools", + "xml2" + ], + "Hash": "409328b8e1253c8d729a7836fe7f7a16" + }, + "urltools": { + "Package": "urltools", + "Version": "1.7.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "methods", + "triebeard" + ], + "Hash": "e86a704261a105f4703f653e05defa3e" + }, + "usethis": { + "Package": "usethis", + "Version": "2.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "stats", + "utils", + "whisker", + "withr", + "yaml" + ], + "Hash": "d524fd42c517035027f866064417d7e6" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "62b65c52671e6665f803ff02954446e9" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "vroom": { + "Package": "vroom", + "Version": "1.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "methods", + "progress", + "rlang", + "stats", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ], + "Hash": "390f9315bc0025be03012054103d227c" + }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" + }, + "withr": { + "Package": "withr", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics" + ], + "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.45", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "ca59c87fe305b16a9141a5874c3a7889" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "processx" + ], + "Hash": "423df1e86d5533fcb73c6b02b4923b49" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "29240487a071f535f5e5d5a323b7afbd" + }, + "zip": { + "Package": "zip", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" + } + } +} diff --git a/project/renv/.gitignore b/project/renv/.gitignore new file mode 100644 index 00000000..0ec0cbba --- /dev/null +++ b/project/renv/.gitignore @@ -0,0 +1,7 @@ +library/ +local/ +cellar/ +lock/ +python/ +sandbox/ +staging/ diff --git a/project/renv/activate.R b/project/renv/activate.R new file mode 100644 index 00000000..d13f9932 --- /dev/null +++ b/project/renv/activate.R @@ -0,0 +1,1220 @@ + +local({ + + # the requested version of renv + version <- "1.0.7" + attr(version, "sha") <- NULL + + # the project directory + project <- Sys.getenv("RENV_PROJECT") + if (!nzchar(project)) + project <- getwd() + + # use start-up diagnostics if enabled + diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") + if (diagnostics) { + start <- Sys.time() + profile <- tempfile("renv-startup-", fileext = ".Rprof") + utils::Rprof(profile) + on.exit({ + utils::Rprof(NULL) + elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L) + writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed))) + writeLines(sprintf("- Profile: %s", profile)) + print(utils::summaryRprof(profile)) + }, add = TRUE) + } + + # figure out whether the autoloader is enabled + enabled <- local({ + + # first, check config option + override <- getOption("renv.config.autoloader.enabled") + if (!is.null(override)) + return(override) + + # if we're being run in a context where R_LIBS is already set, + # don't load -- presumably we're being run as a sub-process and + # the parent process has already set up library paths for us + rcmd <- Sys.getenv("R_CMD", unset = NA) + rlibs <- Sys.getenv("R_LIBS", unset = NA) + if (!is.na(rlibs) && !is.na(rcmd)) + return(FALSE) + + # next, check environment variables + # TODO: prefer using the configuration one in the future + envvars <- c( + "RENV_CONFIG_AUTOLOADER_ENABLED", + "RENV_AUTOLOADER_ENABLED", + "RENV_ACTIVATE_PROJECT" + ) + + for (envvar in envvars) { + envval <- Sys.getenv(envvar, unset = NA) + if (!is.na(envval)) + return(tolower(envval) %in% c("true", "t", "1")) + } + + # enable by default + TRUE + + }) + + # bail if we're not enabled + if (!enabled) { + + # if we're not enabled, we might still need to manually load + # the user profile here + profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile") + if (file.exists(profile)) { + cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE") + if (tolower(cfg) %in% c("true", "t", "1")) + sys.source(profile, envir = globalenv()) + } + + return(FALSE) + + } + + # avoid recursion + if (identical(getOption("renv.autoloader.running"), TRUE)) { + warning("ignoring recursive attempt to run renv autoloader") + return(invisible(TRUE)) + } + + # signal that we're loading renv during R startup + options(renv.autoloader.running = TRUE) + on.exit(options(renv.autoloader.running = NULL), add = TRUE) + + # signal that we've consented to use renv + options(renv.consent = TRUE) + + # load the 'utils' package eagerly -- this ensures that renv shims, which + # mask 'utils' packages, will come first on the search path + library(utils, lib.loc = .Library) + + # unload renv if it's already been loaded + if ("renv" %in% loadedNamespaces()) + unloadNamespace("renv") + + # load bootstrap tools + `%||%` <- function(x, y) { + if (is.null(x)) y else x + } + + catf <- function(fmt, ..., appendLF = TRUE) { + + quiet <- getOption("renv.bootstrap.quiet", default = FALSE) + if (quiet) + return(invisible()) + + msg <- sprintf(fmt, ...) + cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") + + invisible(msg) + + } + + header <- function(label, + ..., + prefix = "#", + suffix = "-", + n = min(getOption("width"), 78)) + { + label <- sprintf(label, ...) + n <- max(n - nchar(label) - nchar(prefix) - 2L, 8L) + if (n <= 0) + return(paste(prefix, label)) + + tail <- paste(rep.int(suffix, n), collapse = "") + paste0(prefix, " ", label, " ", tail) + + } + + heredoc <- function(text, leave = 0) { + + # remove leading, trailing whitespace + trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) + + # split into lines + lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] + + # compute common indent + indent <- regexpr("[^[:space:]]", lines) + common <- min(setdiff(indent, -1L)) - leave + paste(substring(lines, common), collapse = "\n") + + } + + startswith <- function(string, prefix) { + substring(string, 1, nchar(prefix)) == prefix + } + + bootstrap <- function(version, library) { + + friendly <- renv_bootstrap_version_friendly(version) + section <- header(sprintf("Bootstrapping renv %s", friendly)) + catf(section) + + # attempt to download renv + catf("- Downloading renv ... ", appendLF = FALSE) + withCallingHandlers( + tarball <- renv_bootstrap_download(version), + error = function(err) { + catf("FAILED") + stop("failed to download:\n", conditionMessage(err)) + } + ) + catf("OK") + on.exit(unlink(tarball), add = TRUE) + + # now attempt to install + catf("- Installing renv ... ", appendLF = FALSE) + withCallingHandlers( + status <- renv_bootstrap_install(version, tarball, library), + error = function(err) { + catf("FAILED") + stop("failed to install:\n", conditionMessage(err)) + } + ) + catf("OK") + + # add empty line to break up bootstrapping from normal output + catf("") + + return(invisible()) + } + + renv_bootstrap_tests_running <- function() { + getOption("renv.tests.running", default = FALSE) + } + + renv_bootstrap_repos <- function() { + + # get CRAN repository + cran <- getOption("renv.repos.cran", "https://cloud.r-project.org") + + # check for repos override + repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) + if (!is.na(repos)) { + + # check for RSPM; if set, use a fallback repository for renv + rspm <- Sys.getenv("RSPM", unset = NA) + if (identical(rspm, repos)) + repos <- c(RSPM = rspm, CRAN = cran) + + return(repos) + + } + + # check for lockfile repositories + repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) + if (!inherits(repos, "error") && length(repos)) + return(repos) + + # retrieve current repos + repos <- getOption("repos") + + # ensure @CRAN@ entries are resolved + repos[repos == "@CRAN@"] <- cran + + # add in renv.bootstrap.repos if set + default <- c(FALLBACK = "https://cloud.r-project.org") + extra <- getOption("renv.bootstrap.repos", default = default) + repos <- c(repos, extra) + + # remove duplicates that might've snuck in + dupes <- duplicated(repos) | duplicated(names(repos)) + repos[!dupes] + + } + + renv_bootstrap_repos_lockfile <- function() { + + lockpath <- Sys.getenv("RENV_PATHS_LOCKFILE", unset = "renv.lock") + if (!file.exists(lockpath)) + return(NULL) + + lockfile <- tryCatch(renv_json_read(lockpath), error = identity) + if (inherits(lockfile, "error")) { + warning(lockfile) + return(NULL) + } + + repos <- lockfile$R$Repositories + if (length(repos) == 0) + return(NULL) + + keys <- vapply(repos, `[[`, "Name", FUN.VALUE = character(1)) + vals <- vapply(repos, `[[`, "URL", FUN.VALUE = character(1)) + names(vals) <- keys + + return(vals) + + } + + renv_bootstrap_download <- function(version) { + + sha <- attr(version, "sha", exact = TRUE) + + methods <- if (!is.null(sha)) { + + # attempting to bootstrap a development version of renv + c( + function() renv_bootstrap_download_tarball(sha), + function() renv_bootstrap_download_github(sha) + ) + + } else { + + # attempting to bootstrap a release version of renv + c( + function() renv_bootstrap_download_tarball(version), + function() renv_bootstrap_download_cran_latest(version), + function() renv_bootstrap_download_cran_archive(version) + ) + + } + + for (method in methods) { + path <- tryCatch(method(), error = identity) + if (is.character(path) && file.exists(path)) + return(path) + } + + stop("All download methods failed") + + } + + renv_bootstrap_download_impl <- function(url, destfile) { + + mode <- "wb" + + # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715 + fixup <- + Sys.info()[["sysname"]] == "Windows" && + substring(url, 1L, 5L) == "file:" + + if (fixup) + mode <- "w+b" + + args <- list( + url = url, + destfile = destfile, + mode = mode, + quiet = TRUE + ) + + if ("headers" %in% names(formals(utils::download.file))) + args$headers <- renv_bootstrap_download_custom_headers(url) + + do.call(utils::download.file, args) + + } + + renv_bootstrap_download_custom_headers <- function(url) { + + headers <- getOption("renv.download.headers") + if (is.null(headers)) + return(character()) + + if (!is.function(headers)) + stopf("'renv.download.headers' is not a function") + + headers <- headers(url) + if (length(headers) == 0L) + return(character()) + + if (is.list(headers)) + headers <- unlist(headers, recursive = FALSE, use.names = TRUE) + + ok <- + is.character(headers) && + is.character(names(headers)) && + all(nzchar(names(headers))) + + if (!ok) + stop("invocation of 'renv.download.headers' did not return a named character vector") + + headers + + } + + renv_bootstrap_download_cran_latest <- function(version) { + + spec <- renv_bootstrap_download_cran_latest_find(version) + type <- spec$type + repos <- spec$repos + + baseurl <- utils::contrib.url(repos = repos, type = type) + ext <- if (identical(type, "source")) + ".tar.gz" + else if (Sys.info()[["sysname"]] == "Windows") + ".zip" + else + ".tgz" + name <- sprintf("renv_%s%s", version, ext) + url <- paste(baseurl, name, sep = "/") + + destfile <- file.path(tempdir(), name) + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (inherits(status, "condition")) + return(FALSE) + + # report success and return + destfile + + } + + renv_bootstrap_download_cran_latest_find <- function(version) { + + # check whether binaries are supported on this system + binary <- + getOption("renv.bootstrap.binary", default = TRUE) && + !identical(.Platform$pkgType, "source") && + !identical(getOption("pkgType"), "source") && + Sys.info()[["sysname"]] %in% c("Darwin", "Windows") + + types <- c(if (binary) "binary", "source") + + # iterate over types + repositories + for (type in types) { + for (repos in renv_bootstrap_repos()) { + + # retrieve package database + db <- tryCatch( + as.data.frame( + utils::available.packages(type = type, repos = repos), + stringsAsFactors = FALSE + ), + error = identity + ) + + if (inherits(db, "error")) + next + + # check for compatible entry + entry <- db[db$Package %in% "renv" & db$Version %in% version, ] + if (nrow(entry) == 0) + next + + # found it; return spec to caller + spec <- list(entry = entry, type = type, repos = repos) + return(spec) + + } + } + + # if we got here, we failed to find renv + fmt <- "renv %s is not available from your declared package repositories" + stop(sprintf(fmt, version)) + + } + + renv_bootstrap_download_cran_archive <- function(version) { + + name <- sprintf("renv_%s.tar.gz", version) + repos <- renv_bootstrap_repos() + urls <- file.path(repos, "src/contrib/Archive/renv", name) + destfile <- file.path(tempdir(), name) + + for (url in urls) { + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (identical(status, 0L)) + return(destfile) + + } + + return(FALSE) + + } + + renv_bootstrap_download_tarball <- function(version) { + + # if the user has provided the path to a tarball via + # an environment variable, then use it + tarball <- Sys.getenv("RENV_BOOTSTRAP_TARBALL", unset = NA) + if (is.na(tarball)) + return() + + # allow directories + if (dir.exists(tarball)) { + name <- sprintf("renv_%s.tar.gz", version) + tarball <- file.path(tarball, name) + } + + # bail if it doesn't exist + if (!file.exists(tarball)) { + + # let the user know we weren't able to honour their request + fmt <- "- RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." + msg <- sprintf(fmt, tarball) + warning(msg) + + # bail + return() + + } + + catf("- Using local tarball '%s'.", tarball) + tarball + + } + + renv_bootstrap_download_github <- function(version) { + + enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") + if (!identical(enabled, "TRUE")) + return(FALSE) + + # prepare download options + pat <- Sys.getenv("GITHUB_PAT") + if (nzchar(Sys.which("curl")) && nzchar(pat)) { + fmt <- "--location --fail --header \"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + options(download.file.method = "curl", download.file.extra = extra) + on.exit(do.call(base::options, saved), add = TRUE) + } else if (nzchar(Sys.which("wget")) && nzchar(pat)) { + fmt <- "--header=\"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + options(download.file.method = "wget", download.file.extra = extra) + on.exit(do.call(base::options, saved), add = TRUE) + } + + url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) + name <- sprintf("renv_%s.tar.gz", version) + destfile <- file.path(tempdir(), name) + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (!identical(status, 0L)) + return(FALSE) + + renv_bootstrap_download_augment(destfile) + + return(destfile) + + } + + # Add Sha to DESCRIPTION. This is stop gap until #890, after which we + # can use renv::install() to fully capture metadata. + renv_bootstrap_download_augment <- function(destfile) { + sha <- renv_bootstrap_git_extract_sha1_tar(destfile) + if (is.null(sha)) { + return() + } + + # Untar + tempdir <- tempfile("renv-github-") + on.exit(unlink(tempdir, recursive = TRUE), add = TRUE) + untar(destfile, exdir = tempdir) + pkgdir <- dir(tempdir, full.names = TRUE)[[1]] + + # Modify description + desc_path <- file.path(pkgdir, "DESCRIPTION") + desc_lines <- readLines(desc_path) + remotes_fields <- c( + "RemoteType: github", + "RemoteHost: api.github.com", + "RemoteRepo: renv", + "RemoteUsername: rstudio", + "RemotePkgRef: rstudio/renv", + paste("RemoteRef: ", sha), + paste("RemoteSha: ", sha) + ) + writeLines(c(desc_lines[desc_lines != ""], remotes_fields), con = desc_path) + + # Re-tar + local({ + old <- setwd(tempdir) + on.exit(setwd(old), add = TRUE) + + tar(destfile, compression = "gzip") + }) + invisible() + } + + # Extract the commit hash from a git archive. Git archives include the SHA1 + # hash as the comment field of the tarball pax extended header + # (see https://www.kernel.org/pub/software/scm/git/docs/git-archive.html) + # For GitHub archives this should be the first header after the default one + # (512 byte) header. + renv_bootstrap_git_extract_sha1_tar <- function(bundle) { + + # open the bundle for reading + # We use gzcon for everything because (from ?gzcon) + # > Reading from a connection which does not supply a 'gzip' magic + # > header is equivalent to reading from the original connection + conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) + on.exit(close(conn)) + + # The default pax header is 512 bytes long and the first pax extended header + # with the comment should be 51 bytes long + # `52 comment=` (11 chars) + 40 byte SHA1 hash + len <- 0x200 + 0x33 + res <- rawToChar(readBin(conn, "raw", n = len)[0x201:len]) + + if (grepl("^52 comment=", res)) { + sub("52 comment=", "", res) + } else { + NULL + } + } + + renv_bootstrap_install <- function(version, tarball, library) { + + # attempt to install it into project library + dir.create(library, showWarnings = FALSE, recursive = TRUE) + output <- renv_bootstrap_install_impl(library, tarball) + + # check for successful install + status <- attr(output, "status") + if (is.null(status) || identical(status, 0L)) + return(status) + + # an error occurred; report it + header <- "installation of renv failed" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- paste(c(header, lines, output), collapse = "\n") + stop(text) + + } + + renv_bootstrap_install_impl <- function(library, tarball) { + + # invoke using system2 so we can capture and report output + bin <- R.home("bin") + exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" + R <- file.path(bin, exe) + + args <- c( + "--vanilla", "CMD", "INSTALL", "--no-multiarch", + "-l", shQuote(path.expand(library)), + shQuote(path.expand(tarball)) + ) + + system2(R, args, stdout = TRUE, stderr = TRUE) + + } + + renv_bootstrap_platform_prefix <- function() { + + # construct version prefix + version <- paste(R.version$major, R.version$minor, sep = ".") + prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") + + # include SVN revision for development versions of R + # (to avoid sharing platform-specific artefacts with released versions of R) + devel <- + identical(R.version[["status"]], "Under development (unstable)") || + identical(R.version[["nickname"]], "Unsuffered Consequences") + + if (devel) + prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") + + # build list of path components + components <- c(prefix, R.version$platform) + + # include prefix if provided by user + prefix <- renv_bootstrap_platform_prefix_impl() + if (!is.na(prefix) && nzchar(prefix)) + components <- c(prefix, components) + + # build prefix + paste(components, collapse = "/") + + } + + renv_bootstrap_platform_prefix_impl <- function() { + + # if an explicit prefix has been supplied, use it + prefix <- Sys.getenv("RENV_PATHS_PREFIX", unset = NA) + if (!is.na(prefix)) + return(prefix) + + # if the user has requested an automatic prefix, generate it + auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (is.na(auto) && getRversion() >= "4.4.0") + auto <- "TRUE" + + if (auto %in% c("TRUE", "True", "true", "1")) + return(renv_bootstrap_platform_prefix_auto()) + + # empty string on failure + "" + + } + + renv_bootstrap_platform_prefix_auto <- function() { + + prefix <- tryCatch(renv_bootstrap_platform_os(), error = identity) + if (inherits(prefix, "error") || prefix %in% "unknown") { + + msg <- paste( + "failed to infer current operating system", + "please file a bug report at https://github.com/rstudio/renv/issues", + sep = "; " + ) + + warning(msg) + + } + + prefix + + } + + renv_bootstrap_platform_os <- function() { + + sysinfo <- Sys.info() + sysname <- sysinfo[["sysname"]] + + # handle Windows + macOS up front + if (sysname == "Windows") + return("windows") + else if (sysname == "Darwin") + return("macos") + + # check for os-release files + for (file in c("/etc/os-release", "/usr/lib/os-release")) + if (file.exists(file)) + return(renv_bootstrap_platform_os_via_os_release(file, sysinfo)) + + # check for redhat-release files + if (file.exists("/etc/redhat-release")) + return(renv_bootstrap_platform_os_via_redhat_release()) + + "unknown" + + } + + renv_bootstrap_platform_os_via_os_release <- function(file, sysinfo) { + + # read /etc/os-release + release <- utils::read.table( + file = file, + sep = "=", + quote = c("\"", "'"), + col.names = c("Key", "Value"), + comment.char = "#", + stringsAsFactors = FALSE + ) + + vars <- as.list(release$Value) + names(vars) <- release$Key + + # get os name + os <- tolower(sysinfo[["sysname"]]) + + # read id + id <- "unknown" + for (field in c("ID", "ID_LIKE")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + id <- vars[[field]] + break + } + } + + # read version + version <- "unknown" + for (field in c("UBUNTU_CODENAME", "VERSION_CODENAME", "VERSION_ID", "BUILD_ID")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + version <- vars[[field]] + break + } + } + + # join together + paste(c(os, id, version), collapse = "-") + + } + + renv_bootstrap_platform_os_via_redhat_release <- function() { + + # read /etc/redhat-release + contents <- readLines("/etc/redhat-release", warn = FALSE) + + # infer id + id <- if (grepl("centos", contents, ignore.case = TRUE)) + "centos" + else if (grepl("redhat", contents, ignore.case = TRUE)) + "redhat" + else + "unknown" + + # try to find a version component (very hacky) + version <- "unknown" + + parts <- strsplit(contents, "[[:space:]]")[[1L]] + for (part in parts) { + + nv <- tryCatch(numeric_version(part), error = identity) + if (inherits(nv, "error")) + next + + version <- nv[1, 1] + break + + } + + paste(c("linux", id, version), collapse = "-") + + } + + renv_bootstrap_library_root_name <- function(project) { + + # use project name as-is if requested + asis <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT_ASIS", unset = "FALSE") + if (asis) + return(basename(project)) + + # otherwise, disambiguate based on project's path + id <- substring(renv_bootstrap_hash_text(project), 1L, 8L) + paste(basename(project), id, sep = "-") + + } + + renv_bootstrap_library_root <- function(project) { + + prefix <- renv_bootstrap_profile_prefix() + + path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) + if (!is.na(path)) + return(paste(c(path, prefix), collapse = "/")) + + path <- renv_bootstrap_library_root_impl(project) + if (!is.null(path)) { + name <- renv_bootstrap_library_root_name(project) + return(paste(c(path, prefix, name), collapse = "/")) + } + + renv_bootstrap_paths_renv("library", project = project) + + } + + renv_bootstrap_library_root_impl <- function(project) { + + root <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) + if (!is.na(root)) + return(root) + + type <- renv_bootstrap_project_type(project) + if (identical(type, "package")) { + userdir <- renv_bootstrap_user_dir() + return(file.path(userdir, "library")) + } + + } + + renv_bootstrap_validate_version <- function(version, description = NULL) { + + # resolve description file + # + # avoid passing lib.loc to `packageDescription()` below, since R will + # use the loaded version of the package by default anyhow. note that + # this function should only be called after 'renv' is loaded + # https://github.com/rstudio/renv/issues/1625 + description <- description %||% packageDescription("renv") + + # check whether requested version 'version' matches loaded version of renv + sha <- attr(version, "sha", exact = TRUE) + valid <- if (!is.null(sha)) + renv_bootstrap_validate_version_dev(sha, description) + else + renv_bootstrap_validate_version_release(version, description) + + if (valid) + return(TRUE) + + # the loaded version of renv doesn't match the requested version; + # give the user instructions on how to proceed + dev <- identical(description[["RemoteType"]], "github") + remote <- if (dev) + paste("rstudio/renv", description[["RemoteSha"]], sep = "@") + else + paste("renv", description[["Version"]], sep = "@") + + # display both loaded version + sha if available + friendly <- renv_bootstrap_version_friendly( + version = description[["Version"]], + sha = if (dev) description[["RemoteSha"]] + ) + + fmt <- heredoc(" + renv %1$s was loaded from project library, but this project is configured to use renv %2$s. + - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. + - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. + ") + catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) + + FALSE + + } + + renv_bootstrap_validate_version_dev <- function(version, description) { + expected <- description[["RemoteSha"]] + is.character(expected) && startswith(expected, version) + } + + renv_bootstrap_validate_version_release <- function(version, description) { + expected <- description[["Version"]] + is.character(expected) && identical(expected, version) + } + + renv_bootstrap_hash_text <- function(text) { + + hashfile <- tempfile("renv-hash-") + on.exit(unlink(hashfile), add = TRUE) + + writeLines(text, con = hashfile) + tools::md5sum(hashfile) + + } + + renv_bootstrap_load <- function(project, libpath, version) { + + # try to load renv from the project library + if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) + return(FALSE) + + # warn if the version of renv loaded does not match + renv_bootstrap_validate_version(version) + + # execute renv load hooks, if any + hooks <- getHook("renv::autoload") + for (hook in hooks) + if (is.function(hook)) + tryCatch(hook(), error = warnify) + + # load the project + renv::load(project) + + TRUE + + } + + renv_bootstrap_profile_load <- function(project) { + + # if RENV_PROFILE is already set, just use that + profile <- Sys.getenv("RENV_PROFILE", unset = NA) + if (!is.na(profile) && nzchar(profile)) + return(profile) + + # check for a profile file (nothing to do if it doesn't exist) + path <- renv_bootstrap_paths_renv("profile", profile = FALSE, project = project) + if (!file.exists(path)) + return(NULL) + + # read the profile, and set it if it exists + contents <- readLines(path, warn = FALSE) + if (length(contents) == 0L) + return(NULL) + + # set RENV_PROFILE + profile <- contents[[1L]] + if (!profile %in% c("", "default")) + Sys.setenv(RENV_PROFILE = profile) + + profile + + } + + renv_bootstrap_profile_prefix <- function() { + profile <- renv_bootstrap_profile_get() + if (!is.null(profile)) + return(file.path("profiles", profile, "renv")) + } + + renv_bootstrap_profile_get <- function() { + profile <- Sys.getenv("RENV_PROFILE", unset = "") + renv_bootstrap_profile_normalize(profile) + } + + renv_bootstrap_profile_set <- function(profile) { + profile <- renv_bootstrap_profile_normalize(profile) + if (is.null(profile)) + Sys.unsetenv("RENV_PROFILE") + else + Sys.setenv(RENV_PROFILE = profile) + } + + renv_bootstrap_profile_normalize <- function(profile) { + + if (is.null(profile) || profile %in% c("", "default")) + return(NULL) + + profile + + } + + renv_bootstrap_path_absolute <- function(path) { + + substr(path, 1L, 1L) %in% c("~", "/", "\\") || ( + substr(path, 1L, 1L) %in% c(letters, LETTERS) && + substr(path, 2L, 3L) %in% c(":/", ":\\") + ) + + } + + renv_bootstrap_paths_renv <- function(..., profile = TRUE, project = NULL) { + renv <- Sys.getenv("RENV_PATHS_RENV", unset = "renv") + root <- if (renv_bootstrap_path_absolute(renv)) NULL else project + prefix <- if (profile) renv_bootstrap_profile_prefix() + components <- c(root, renv, prefix, ...) + paste(components, collapse = "/") + } + + renv_bootstrap_project_type <- function(path) { + + descpath <- file.path(path, "DESCRIPTION") + if (!file.exists(descpath)) + return("unknown") + + desc <- tryCatch( + read.dcf(descpath, all = TRUE), + error = identity + ) + + if (inherits(desc, "error")) + return("unknown") + + type <- desc$Type + if (!is.null(type)) + return(tolower(type)) + + package <- desc$Package + if (!is.null(package)) + return("package") + + "unknown" + + } + + renv_bootstrap_user_dir <- function() { + dir <- renv_bootstrap_user_dir_impl() + path.expand(chartr("\\", "/", dir)) + } + + renv_bootstrap_user_dir_impl <- function() { + + # use local override if set + override <- getOption("renv.userdir.override") + if (!is.null(override)) + return(override) + + # use R_user_dir if available + tools <- asNamespace("tools") + if (is.function(tools$R_user_dir)) + return(tools$R_user_dir("renv", "cache")) + + # try using our own backfill for older versions of R + envvars <- c("R_USER_CACHE_DIR", "XDG_CACHE_HOME") + for (envvar in envvars) { + root <- Sys.getenv(envvar, unset = NA) + if (!is.na(root)) + return(file.path(root, "R/renv")) + } + + # use platform-specific default fallbacks + if (Sys.info()[["sysname"]] == "Windows") + file.path(Sys.getenv("LOCALAPPDATA"), "R/cache/R/renv") + else if (Sys.info()[["sysname"]] == "Darwin") + "~/Library/Caches/org.R-project.R/R/renv" + else + "~/.cache/R/renv" + + } + + renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) { + sha <- sha %||% attr(version, "sha", exact = TRUE) + parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L))) + paste(parts, collapse = "") + } + + renv_bootstrap_exec <- function(project, libpath, version) { + if (!renv_bootstrap_load(project, libpath, version)) + renv_bootstrap_run(version, libpath) + } + + renv_bootstrap_run <- function(version, libpath) { + + # perform bootstrap + bootstrap(version, libpath) + + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + return(renv::load(project = getwd())) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + + } + + renv_json_read <- function(file = NULL, text = NULL) { + + jlerr <- NULL + + # if jsonlite is loaded, use that instead + if ("jsonlite" %in% loadedNamespaces()) { + + json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) + if (!inherits(json, "error")) + return(json) + + jlerr <- json + + } + + # otherwise, fall back to the default JSON reader + json <- tryCatch(renv_json_read_default(file, text), error = identity) + if (!inherits(json, "error")) + return(json) + + # report an error + if (!is.null(jlerr)) + stop(jlerr) + else + stop(json) + + } + + renv_json_read_jsonlite <- function(file = NULL, text = NULL) { + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") + jsonlite::fromJSON(txt = text, simplifyVector = FALSE) + } + + renv_json_read_default <- function(file = NULL, text = NULL) { + + # find strings in the JSON + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") + pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + locs <- gregexpr(pattern, text, perl = TRUE)[[1]] + + # if any are found, replace them with placeholders + replaced <- text + strings <- character() + replacements <- character() + + if (!identical(c(locs), -1L)) { + + # get the string values + starts <- locs + ends <- locs + attr(locs, "match.length") - 1L + strings <- substring(text, starts, ends) + + # only keep those requiring escaping + strings <- grep("[[\\]{}:]", strings, perl = TRUE, value = TRUE) + + # compute replacements + replacements <- sprintf('"\032%i\032"', seq_along(strings)) + + # replace the strings + mapply(function(string, replacement) { + replaced <<- sub(string, replacement, replaced, fixed = TRUE) + }, strings, replacements) + + } + + # transform the JSON into something the R parser understands + transformed <- replaced + transformed <- gsub("{}", "`names<-`(list(), character())", transformed, fixed = TRUE) + transformed <- gsub("[[{]", "list(", transformed, perl = TRUE) + transformed <- gsub("[]}]", ")", transformed, perl = TRUE) + transformed <- gsub(":", "=", transformed, fixed = TRUE) + text <- paste(transformed, collapse = "\n") + + # parse it + json <- parse(text = text, keep.source = FALSE, srcfile = NULL)[[1L]] + + # construct map between source strings, replaced strings + map <- as.character(parse(text = strings)) + names(map) <- as.character(parse(text = replacements)) + + # convert to list + map <- as.list(map) + + # remap strings in object + remapped <- renv_json_read_remap(json, map) + + # evaluate + eval(remapped, envir = baseenv()) + + } + + renv_json_read_remap <- function(json, map) { + + # fix names + if (!is.null(names(json))) { + lhs <- match(names(json), names(map), nomatch = 0L) + rhs <- match(names(map), names(json), nomatch = 0L) + names(json)[rhs] <- map[lhs] + } + + # fix values + if (is.character(json)) + return(map[[json]] %||% json) + + # handle true, false, null + if (is.name(json)) { + text <- as.character(json) + if (text == "true") + return(TRUE) + else if (text == "false") + return(FALSE) + else if (text == "null") + return(NULL) + } + + # recurse + if (is.recursive(json)) { + for (i in seq_along(json)) { + json[i] <- list(renv_json_read_remap(json[[i]], map)) + } + } + + json + + } + + # load the renv profile, if any + renv_bootstrap_profile_load(project) + + # construct path to library root + root <- renv_bootstrap_library_root(project) + + # construct library prefix for platform + prefix <- renv_bootstrap_platform_prefix() + + # construct full libpath + libpath <- file.path(root, prefix) + + # run bootstrap code + renv_bootstrap_exec(project, libpath, version) + + invisible() + +}) diff --git a/project/renv/settings.json b/project/renv/settings.json new file mode 100644 index 00000000..ffdbb320 --- /dev/null +++ b/project/renv/settings.json @@ -0,0 +1,19 @@ +{ + "bioconductor.version": null, + "external.libraries": [], + "ignored.packages": [], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "ppm.enabled": null, + "ppm.ignored.urls": [], + "r.version": null, + "snapshot.type": "implicit", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +} From bb1ce282c426bcf93bf93595ed8e38fd6c5f2a3e Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:56:17 +0200 Subject: [PATCH 003/130] Function for checking standard concepts; add descendant record counts to countOccurences --- project/R/countOccurrences.R | 92 +++++++++++++++++++----------------- project/R/isStandard.R | 31 ++++++++++++ 2 files changed, 79 insertions(+), 44 deletions(-) create mode 100644 project/R/isStandard.R diff --git a/project/R/countOccurrences.R b/project/R/countOccurrences.R index 00d12ef9..f5caa198 100644 --- a/project/R/countOccurrences.R +++ b/project/R/countOccurrences.R @@ -1,62 +1,66 @@ -# Function to count occurrences of each value in v within df$value, unique by person_id countOccurrences <- function(v, tables, list_of_df, links) { - ## Checks ----- - # Argument input types - stopifnot(is.vector(v)) # v = vector of concepts in concept set - stopifnot(is.character(tables) & is.vector(tables)) # table = string with CDM table name - stopifnot(is.list(list_of_df)) # list_of_df = list of CDM tables as dataframes - stopifnot(is.list(links)) # links = links between table names and concept_id fields + stopifnot(is.vector(v)) + stopifnot(is.character(tables) & is.vector(tables)) + stopifnot(is.list(list_of_df)) + stopifnot(is.list(links)) - # Check the provided table is compatible with links if (!any(tables %in% names(links))) { - warning("Table is not one of the tables listed underneath with linked concept_id fields, \nPlease provide a different table or update the table -- concept_id links. \nTerminating") - writeLines(names(links)) - break + stop("Table is not one of the tables listed underneath with linked concept_id fields, \nPlease provide a different table or update the table -- concept_id links. \nTerminating") } - ## Function ----- - counts_persons <- c() - counts <- c() - i <- 0 + unique_person_ids <- vector("list", length(v)) + records <- numeric(length(v)) + records_descendant <- numeric(length(v)) + unique_person_ids_descendant <- vector("list", length(v)) + for (table in tables) { - i <- i + 1 - # Get table of choice as dataframe df <- list_of_df[[table]] - - # Get concept_id field concept_id_field <- links[[table]] + if (!all(c("person_id", concept_id_field) %in% names(df))) { + stop("Data frame does not contain expected columns.") + } + anc <- list_of_df$concept_ancestor$ancestor_concept_id + desc <- list_of_df$concept_ancestor$descendant_concept_id - # Ensure unique person_id for each value - unique_df <- df[!duplicated(df[c("person_id", concept_id_field)]), ] - - # Initialize a named vector to store counts_persons - tmp_p <- setNames(numeric(length(v)), as.character(v)) - tmp_t <- setNames(numeric(length(v)), as.character(v)) - - # Count persons and occurrences - for (val in v) { - tmp_p[as.character(val)] <- sum(unique_df[, concept_id_field] == as.character(val)) - tmp_t[as.character(val)] <- sum(df[, concept_id_field] == as.character(val)) + if (!all(c("ancestor_concept_id", "descendant_concept_id") %in% names(list_of_df$concept_ancestor))) { + stop("Concept ancestor data frame does not contain expected columns.") } - if (i == 1) { - counts_persons <- tmp_p - counts <- tmp_t - } else { - counts_persons <- counts_persons + tmp_p - counts <- counts + tmp_t + + for (i in seq_along(v)) { + val <- v[i] + direct_df <- df[df[, concept_id_field] == val, ] + desc_val <- c(anc[which(desc == val)], desc[which(anc == val)]) %>% unique() + descendant_df <- df[df[, concept_id_field] %in% desc_val, ] + + # Counting total records directly + if (nrow(direct_df) > 0) { + unique_person_ids[[i]] <- unique(c(unique_person_ids[[i]], direct_df$person_id)) + records[i] <- records[i] + nrow(direct_df) + } + + # Counting total records for descendants + if (nrow(descendant_df) > 0) { + unique_person_ids_descendant[[i]] <- unique(c(unique_person_ids_descendant[[i]], descendant_df$person_id)) + records_descendant[i] <- records_descendant[i] + nrow(descendant_df) + } } } - # Tibble + count_persons <- sapply(unique_person_ids, length) + count_records <- records + descendant_count_person <- sapply(unique_person_ids_descendant, length) + descendant_count_record <- records_descendant + res <- tibble::tibble( concept_name = names(v), concept_id = v, - count_persons = counts_persons, - count_occurrences = counts, - included = c(counts > 0) - ) %>% dplyr::arrange(dplyr::desc(counts)) # Arrange tibble descendingly according to counts + count_persons = count_persons, + count_records = count_records, + descendant_count_person = descendant_count_person, + descendant_count_record = descendant_count_record, + included = (count_records + descendant_count_record) > 0 + ) %>% + dplyr::arrange(dplyr::desc(count_records + descendant_count_record)) return(res) -} - -cat("Sourced countOccurrences function") \ No newline at end of file +} \ No newline at end of file diff --git a/project/R/isStandard.R b/project/R/isStandard.R new file mode 100644 index 00000000..f23e4d5f --- /dev/null +++ b/project/R/isStandard.R @@ -0,0 +1,31 @@ +isStandard <- function(conceptSets, df) { + concepts <- c() + conceptSet <- c() + standardness <- c() + og <- df$concept$concept_id + for (cs in names(conceptSets)) { + for (L in conceptSets[[cs]]@Expression) { + conceptSet <- append(conceptSet, cs) + concept <- L@Concept@concept_id + concepts <- append(concepts, concept) + standardness <- append(standardness, L@Concept@standard_concept %>% + gsub(pattern = 'S', replacement = 'Standard') %>% + gsub(pattern = 'C', replacement = 'Classification') + ) + if (standardness[length(standardness)] == "") { + if (concept %in% og) { + standardness[length(standardness)] <- "Non-Standard" + } else { + standardness[length(standardness)] <- "not found in data" + } + } + } + } + res <- tibble::tibble( + conceptSet = conceptSet, + concept = concepts, + standard = standardness + ) + + return(res) +} \ No newline at end of file From 66775fa68ea81b2beed53d9e58c1e07bf4b33be0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:56:38 +0200 Subject: [PATCH 004/130] knitted script --- project/R/cohortCapr.R | 161 +++++++++++++++++++---------------------- 1 file changed, 75 insertions(+), 86 deletions(-) diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R index 89ac55be..d362050d 100644 --- a/project/R/cohortCapr.R +++ b/project/R/cohortCapr.R @@ -1,21 +1,16 @@ -## ----setup, include=FALSE----------------------------------------------------------------------------- +## ----setup, include=FALSE--------------------------------------------------------------- ## knitr knitr::opts_chunk$set(echo = TRUE) -## ----activate renv, include=FALSE--------------------------------------------------------------------- +## ----activate renv, include=FALSE------------------------------------------------------- ## R environment activation -# Check R version -if (getRversion() != '4.4.0') { - stop("This project has been developed under R version 4.4.0. Please use this version.") -} - # Get renv library if (!require(renv)) { install.packages("renv@v1.0.7") } # Get project path -path <- getwd() +path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) if (!("renv" %in% list.files(path))) { stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") } @@ -24,7 +19,7 @@ if (!("renv" %in% list.files(path))) { # renv::activate(path) -## ----housekeeping, echo=FALSE------------------------------------------------------------------------- +## ----housekeeping, echo=FALSE----------------------------------------------------------- ## housekeeping # libraries library(devtools) @@ -36,43 +31,43 @@ library(CirceR) library(Capr) -## ----connection details Eunomia, eval=FALSE, include=FALSE-------------------------------------------- -## ## Eunomia GI bleed data set -## connectionDetails <- Eunomia::getEunomiaConnectionDetails() - - -## ----connection details Synpuf 5%, eval=TRUE, include=TRUE-------------------------------------------- -## SYNPUF 5% (local) -# Create a new SQLite database -dbFile <- "./data/synpuf5pct.sqlite" - -# Create SQLite DB if it does not exist -if (!(file.exists(dbFile))) { - con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) - - # Read CSV files and write to SQLite database - csvDir <- "./data/synpuf5pct_20180710/" - csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) - - # Get cdm structure - source("./R/cdm.R") - - # Read data files and rite to sqlite DB - for (csvFile in csvFiles) { - tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) - df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) - DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) - } - - # Close the database connection - dbDisconnect(con) -} else { - connectionDetails <- - createConnectionDetails(dbms = "sqlite", server = dbFile) -} +## ----connection details Eunomia, eval=TRUE, include=TRUE-------------------------------- +## Eunomia GI bleed data set +connectionDetails <- Eunomia::getEunomiaConnectionDetails() + + +## ----connection details Synpuf 5%, eval=FALSE, include=FALSE---------------------------- +## ## SYNPUF 5% (local) +## # Create a new SQLite database +## dbFile <- "./data/synpuf5pct.sqlite" +## +## # Create SQLite DB if it does not exist +## if (!(file.exists(dbFile))) { +## con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) +## +## # Read CSV files and write to SQLite database +## csvDir <- "./data/synpuf5pct_20180710/" +## csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) +## +## # Get cdm structure +## source("./R/cdm.R") +## +## # Read data files and write to sqlite DB +## for (csvFile in csvFiles) { +## tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) +## df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) +## DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) +## } +## +## # Close the database connection +## dbDisconnect(con) +## } else { +## connectionDetails <- +## createConnectionDetails(dbms = "sqlite", server = dbFile) +## } -## ----load data, messages=FALSE, echo=TRUE------------------------------------------------------------- +## ----load data, messages=FALSE, echo=TRUE----------------------------------------------- ## Load data # Connect to database con <- connect(connectionDetails) @@ -98,20 +93,15 @@ cat("\n\nTABLES:\n ") writeLines(tables, sep = "\n ") -## ----concept sets, echo=TRUE-------------------------------------------------------------------------- +## ----concept sets, echo=TRUE------------------------------------------------------------ ## Concept sets -source("./R/conceptSets.R") +source("./conceptSets.R") +# source("./connectVocabularies.R") # Establish connection con <- connect(connectionDetails) -# Create list of concept sets with descendants -conceptSets <- list( - labTests = cs(descendants(labTests), name = "lab_tests"), - intubation = cs(descendants(intubation), name="intubation"), - cardiacProcedures = cs(descendants(cardiacProcedures), name="cardiac_procedures"), - cardiacComplications = cs(descendants(cardiacComplications), name="cardiac_complications") -) %>% +conceptSets$conceptSets <- conceptSets$conceptSets %>% # Add details for all concepts (excl. descendants) lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") @@ -119,41 +109,40 @@ conceptSets <- list( disconnect(con) -## ----count occurences, echo=TRUE---------------------------------------------------------------------- +## ----count occurences, echo=TRUE-------------------------------------------------------- ## Count occurrences of each concept in data # Get countOccurrences function -source("./R/countOccurrences.R") +source("./countOccurrences.R") # Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") +source("./table_linked_to_concept_field.R") -# count occurrences of each concept 'x' and print results -labTestsCounts <- - countOccurrences( - labTests, "measurement", lDataFramesPre, links - ) %>% print() -intubationCounts <- - countOccurrences( - intubation, "procedure_occurrence", lDataFramesPre, links - ) %>% print() +# count occurrences of each concept 'x' and print results; cardiac complications as example cardiacComplicationsCounts <- countOccurrences( - cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), lDataFramesPre, links ) %>% print() -cardiacProceduresCounts <- +labTestsCounts <- countOccurrences( - cardiacProcedures, "procedure_occurrence", lDataFramesPre, links + conceptSets$concepts$labTests, c("measurement"), + lDataFramesPre, links ) %>% print() -## ----Cohort definition-------------------------------------------------------------------------------- +## ----Standard non-standard check-------------------------------------------------------- +source('./isStandard.R') +standard <- isStandard(conceptSets$conceptSets, lDataFramesPre$concept) +print(standard) + + +## ----Cohort definition------------------------------------------------------------------ ## Cohort definition # Create cohort definition ch <- cohort( entry = entry( # enter patients < 80 years old who have had a lab test - measurement(conceptSets$labTests, age(lt(80))), + measurement(conceptSets$conceptSets$labTests, age(lt(80))), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -163,19 +152,19 @@ ch <- cohort( atLeast( x = 1, # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$cardiacComplications) + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) ), atLeast( x = 1, # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$cardiacComplications) + query = procedure(conceptSets$conceptSets$cardiacComplications) ) ), withAny( atLeast( x = 1, # include all cardiac surgeries - query = procedure(conceptSets$cardiacProcedures) + query = procedure(conceptSets$conceptSets$cardiacProcedures) ) ) ), @@ -183,13 +172,13 @@ ch <- cohort( endStrategy = observationExit(), censor = censoringEvents( # exit if intubation has taken place - procedure(conceptSets$intubation) + procedure(conceptSets$conceptSets$intubation) ) ) ) -## ----json and sql------------------------------------------------------------------------------------- +## ----json and sql----------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -204,17 +193,17 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json----------------------------------------------------------------- +## ----Save cohort and concept set json--------------------------------------------------- write(chJson, paste(path, "./json/cohort.json", sep="")) -for (cs in names(conceptSets)) { +for (cs in names(conceptSets$conceptSets)) { writeConceptSet( - x = conceptSets[[cs]], - path = paste("./json/", cs, "_cs.json", sep="") + x = conceptSets$conceptSets[[cs]], + path = paste("../json/", cs, "_cs.json", sep="") ) } -## ----Create and generate cohorts---------------------------------------------------------------------- +## ----Create and generate cohorts-------------------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -256,7 +245,7 @@ disconnect(con) cohortCounts -## ----retrieve updated DB------------------------------------------------------------------------------ +## ----retrieve updated DB---------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -282,7 +271,7 @@ cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$perso "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) -## ----cohort filter------------------------------------------------------------------------------------ +## ----cohort filter---------------------------------------------------------------------- cohort_df <- list() cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id for (table in names(lDataFramesPost)) { @@ -296,7 +285,7 @@ for (table in names(lDataFramesPost)) { } -## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE------------------------------------ +## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE---------------------- ## new_data <- list() ## cohort_person_ids_plus <- append(cohort_person_ids, ## # draw a random sample to make 1000 people including the cohort subjects @@ -317,9 +306,9 @@ for (table in names(lDataFramesPost)) { ## } -## ----Knit to R document, include=FALSE---------------------------------------------------------------- +## ----Knit to R document, include=FALSE-------------------------------------------------- knitr::purl( - input = './R/cohortCapr_md.Rmd', - output = './R/cohortCapr.R' + input = './cohortCapr_md.Rmd', + output = './cohortCapr.R' ) From e3e47f4c8689897b4d6b3858afb4acad7fa77d7e Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:57:03 +0200 Subject: [PATCH 005/130] Update main code --- project/R/cohortCapr_md.Rmd | 63 +++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd index 09f82a52..e1d04a9d 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/project/R/cohortCapr_md.Rmd @@ -18,7 +18,7 @@ if (!require(renv)) { install.packages("renv@v1.0.7") } # Get project path -path <- getwd() +path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) if (!("renv" %in% list.files(path))) { stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") } @@ -63,7 +63,7 @@ if (!(file.exists(dbFile))) { # Get cdm structure source("./R/cdm.R") - # Read data files and rite to sqlite DB + # Read data files and write to sqlite DB for (csvFile in csvFiles) { tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) @@ -111,18 +111,13 @@ writeLines(tables, sep = "\n ") Define a measurement concept set using Capr and include all descendants ```{r concept sets, echo=TRUE} ## Concept sets -source("./R/conceptSets.R") +source("./conceptSets.R") +# source("./connectVocabularies.R") # Establish connection con <- connect(connectionDetails) -# Create list of concept sets with descendants -conceptSets <- list( - labTests = cs(descendants(labTests), name = "lab_tests"), - intubation = cs(descendants(intubation), name="intubation"), - cardiacProcedures = cs(descendants(cardiacProcedures), name="cardiac_procedures"), - cardiacComplications = cs(descendants(cardiacComplications), name="cardiac_complications") -) %>% +conceptSets$conceptSets <- conceptSets$conceptSets %>% # Add details for all concepts (excl. descendants) lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") @@ -135,31 +130,31 @@ Retrieve concepts that have been included/excluded (does not capture descendants ```{r count occurences, echo=TRUE} ## Count occurrences of each concept in data # Get countOccurrences function -source("./R/countOccurrences.R") +source("./countOccurrences.R") # Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") +source("./table_linked_to_concept_field.R") -# count occurrences of each concept 'x' and print results -labTestsCounts <- - countOccurrences( - labTests, "measurement", lDataFramesPre, links - ) %>% print() -intubationCounts <- - countOccurrences( - intubation, "procedure_occurrence", lDataFramesPre, links - ) %>% print() +# count occurrences of each concept 'x' and print results; cardiac complications as example cardiacComplicationsCounts <- countOccurrences( - cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), lDataFramesPre, links ) %>% print() -cardiacProceduresCounts <- +labTestsCounts <- countOccurrences( - cardiacProcedures, "procedure_occurrence", lDataFramesPre, links + conceptSets$concepts$labTests, c("measurement"), + lDataFramesPre, links ) %>% print() ``` +## Standard and non-standard concepts +```{r Standard non-standard check} +source('./isStandard.R') +standard <- isStandard(conceptSets$conceptSets, lDataFramesPre$concept) +print(standard) +``` + ## Initial event cohort People having any of the following: any of the above measurements with continuous observation of 9999 days prior and 9999 days after event index data, @@ -170,7 +165,7 @@ limit to first/earliest occurrence of any of the above measurements (+descendant ch <- cohort( entry = entry( # enter patients < 80 years old who have had a lab test - measurement(conceptSets$labTests, age(lt(80))), + measurement(conceptSets$conceptSets$labTests, age(lt(80))), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -180,19 +175,19 @@ ch <- cohort( atLeast( x = 1, # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$cardiacComplications) + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) ), atLeast( x = 1, # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$cardiacComplications) + query = procedure(conceptSets$conceptSets$cardiacComplications) ) ), withAny( atLeast( x = 1, # include all cardiac surgeries - query = procedure(conceptSets$cardiacProcedures) + query = procedure(conceptSets$conceptSets$cardiacProcedures) ) ) ), @@ -200,7 +195,7 @@ ch <- cohort( endStrategy = observationExit(), censor = censoringEvents( # exit if intubation has taken place - procedure(conceptSets$intubation) + procedure(conceptSets$conceptSets$intubation) ) ) ) @@ -225,10 +220,10 @@ sql <- CirceR::buildCohortQuery( Save the cohort and concept set jsons; these can be imported into ATLAS ```{r Save cohort and concept set json} write(chJson, paste(path, "./json/cohort.json", sep="")) -for (cs in names(conceptSets)) { +for (cs in names(conceptSets$conceptSets)) { writeConceptSet( - x = conceptSets[[cs]], - path = paste("./json/", cs, "_cs.json", sep="") + x = conceptSets$conceptSets[[cs]], + path = paste("../json/", cs, "_cs.json", sep="") ) } ``` @@ -340,7 +335,7 @@ for (table in names(lDataFramesPost)) { ```{r Knit to R document, include=FALSE} knitr::purl( - input = './R/cohortCapr_md.Rmd', - output = './R/cohortCapr.R' + input = './cohortCapr_md.Rmd', + output = './cohortCapr.R' ) ``` \ No newline at end of file From 372ef31298aa039aa23ade1ffe286d25206eecd1 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:57:49 +0200 Subject: [PATCH 006/130] update concept sets --- project/R/conceptSets.R | 157 +++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 75 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 83b250d6..207ab54d 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -1,82 +1,89 @@ library(Capr) -# Define list of concepts to use for concept sets +## Define list of concepts to use for concept sets # include all descendant concepts - # laboratory tests -labTests <- c( - 4298431, # source: Immature WBC Count /// concept: White blood cell count - 37393856, # source: Neutrophil Count concept1 /// concept: Neutrophil count - 3007670, # source: Neutrophil Count concept2 /// concept: Neutrophil Ab [Units/volume] in Serum - 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood - 37393863, # source: Platelet Count /// concept: Platelet count - 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood - 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) - 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood - 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood - 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma - 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma - 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma - 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma - 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma - 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood - 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood - 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood - 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma - 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma - 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma - 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 37392672, # source: pH (venous) /// concept: Blood venous pH - 37399161, # source: pH (arterial) /// concept: Blood arterial pH - 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood - 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood - 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood - 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood - 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood - 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood -) - -# cardiac complications -cardiacComplications <- c( - 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis - 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration - 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome - 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest -) - -# intubation -intubation <- c( - 4202832 # source: Intubation /// concept: Intubation -) - -# cardiac procedures -cardiacProcedures <- c( - 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery - 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart - 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit - 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit - 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit - 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve - 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve - 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis - 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve - 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection - 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot - 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus - 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery - 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection - 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect - 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve - 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle - 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery - 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction - 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta - 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum - 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm - 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta - 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta - 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart +conceptSets <- list( + concepts = list( + labTests = c( + 4298431, # source: Immature WBC Count /// concept: White blood cell count + 37393856, # source: Neutrophil Count concept1 /// concept: Neutrophil count + 3007670, # source: Neutrophil Count concept2 /// concept: Neutrophil Ab [Units/volume] in Serum + 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood + 37393863, # source: Platelet Count /// concept: Platelet count + 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood + 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) + 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood + 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood + 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma + 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma + 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma + 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma + 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma + 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood + 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood + 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood + 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma + 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma + 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma + 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 37392672, # source: pH (venous) /// concept: Blood venous pH + 37399161, # source: pH (arterial) /// concept: Blood arterial pH + 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood + 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood + 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood + 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood + 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood + 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood + ), + + # cardiac complications + cardiacComplications = c( + 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis + 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration + 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome + 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest + ), + + # intubation + intubation = c( + 4202832 # source: Intubation /// concept: Intubation + ), + + # cardiac procedures + cardiacProcedures = c( + 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery + 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart + 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit + 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit + 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit + 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve + 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve + 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis + 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve + 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection + 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot + 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus + 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery + 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection + 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect + 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve + 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle + 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery + 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction + 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta + 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum + 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm + 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta + 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta + 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart + ) + ) ) +conceptSets$conceptSets <- list() +for (cs in names(conceptSets$concepts)) { + conceptSets$conceptSets[[cs]] <- cs(descendants(conceptSets$concepts[[cs]]), name = cs) +} cat("Sourced concept sets") From feca1e2b473df41512b760a08c2309bb35fd2fb3 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:58:04 +0200 Subject: [PATCH 007/130] update cohort json --- project/json/cohort.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project/json/cohort.json b/project/json/cohort.json index fa6a9899..31e94831 100644 --- a/project/json/cohort.json +++ b/project/json/cohort.json @@ -2,7 +2,7 @@ "ConceptSets": [ { "id": 0, - "name": "lab_tests", + "name": "labTests", "expression": { "items": [ { @@ -520,7 +520,7 @@ }, { "id": 1, - "name": "cardiac_complications", + "name": "cardiacComplications", "expression": { "items": [ { @@ -596,7 +596,7 @@ }, { "id": 2, - "name": "cardiac_procedures", + "name": "cardiacProcedures", "expression": { "items": [ { From 899a33ed32d2c4572b431beb89db379530d696ea Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 5 Jul 2024 13:58:14 +0200 Subject: [PATCH 008/130] update renv --- project/renv.lock | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/project/renv.lock b/project/renv.lock index cf4c8ba3..81b52b23 100644 --- a/project/renv.lock +++ b/project/renv.lock @@ -92,6 +92,23 @@ ], "Hash": "1ba1b2d91607742e1d53676af13f506f" }, + "CommonDataModel": { + "Package": "CommonDataModel", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "DatabaseConnector", + "SqlRender", + "dplyr", + "rJava", + "readr", + "rmarkdown", + "stringr" + ], + "Hash": "d009324efba4c142b431202580eb09d1" + }, "DBI": { "Package": "DBI", "Version": "1.2.3", @@ -126,6 +143,26 @@ ], "Hash": "1ef65614602c6534a6c666e872c3b647" }, + "Eunomia": { + "Package": "Eunomia", + "Version": "2.0.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Eunomia", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", + "Requirements": [ + "CommonDataModel", + "DBI", + "RSQLite", + "arrow", + "readr", + "rlang" + ], + "Hash": "a4cd8b6a4182cc97a6aef3e9b0ab358e" + }, "ParallelLogger": { "Package": "ParallelLogger", "Version": "3.3.0", @@ -203,6 +240,28 @@ ], "Hash": "e1762de0f08b14658d74989c10e2f265" }, + "arrow": { + "Package": "arrow", + "Version": "16.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "assertthat", + "bit64", + "cpp11", + "glue", + "methods", + "purrr", + "rlang", + "stats", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "d9cb18a8fc53895548150650cadde3a6" + }, "askpass": { "Package": "askpass", "Version": "1.2.0", @@ -213,6 +272,16 @@ ], "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, "backports": { "Package": "backports", "Version": "1.5.0", From f699167ee3d8376956e0902cc9354bb8c5131ffb Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 11:21:51 +0200 Subject: [PATCH 009/130] update concept sets --- project/R/conceptSets.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 207ab54d..87337c77 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -2,13 +2,13 @@ library(Capr) ## Define list of concepts to use for concept sets # include all descendant concepts -# laboratory tests conceptSets <- list( concepts = list( - labTests = c( + + # laboratory tests + labTests = c( # 5.13 4298431, # source: Immature WBC Count /// concept: White blood cell count - 37393856, # source: Neutrophil Count concept1 /// concept: Neutrophil count - 3007670, # source: Neutrophil Count concept2 /// concept: Neutrophil Ab [Units/volume] in Serum + 3007670, # source: Neutrophil Count /// concept: Neutrophil Ab [Units/volume] in Serum 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood 37393863, # source: Platelet Count /// concept: Platelet count 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood From 700b2c31635e590678d8d9f698af68454eb415cf Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 11:22:12 +0200 Subject: [PATCH 010/130] update json save --- project/json/cardiacComplications_cs.json | 54 +- project/json/cardiacProcedures_cs.json | 432 +++++----- project/json/cohort.json | 935 +++++++++++----------- project/json/labTests_cs.json | 449 +++++------ 4 files changed, 918 insertions(+), 952 deletions(-) diff --git a/project/json/cardiacComplications_cs.json b/project/json/cardiacComplications_cs.json index 77d37ecc..59b4df71 100644 --- a/project/json/cardiacComplications_cs.json +++ b/project/json/cardiacComplications_cs.json @@ -3,15 +3,15 @@ { "concept": { "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Peritoneal dialysis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71192002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -20,15 +20,15 @@ { "concept": { "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Continuous venovenous hemofiltration", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233585000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -37,15 +37,15 @@ { "concept": { "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Low cardiac output syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "44088000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" }, "isExcluded": false, "includeDescendants": true, diff --git a/project/json/cardiacProcedures_cs.json b/project/json/cardiacProcedures_cs.json index f91e6c0f..57a14722 100644 --- a/project/json/cardiacProcedures_cs.json +++ b/project/json/cardiacProcedures_cs.json @@ -3,15 +3,15 @@ { "concept": { "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Transposition of coronary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384678000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -20,15 +20,15 @@ { "concept": { "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Transplantation of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32413006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -37,15 +37,15 @@ { "concept": { "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "224111000000108", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -54,15 +54,15 @@ { "concept": { "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Revision of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174885005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -71,15 +71,15 @@ { "concept": { "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428893001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -88,15 +88,15 @@ { "concept": { "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of pulmonary valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "88045004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -105,15 +105,15 @@ { "concept": { "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of mitral valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53059001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -122,15 +122,15 @@ { "concept": { "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "89814007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -139,15 +139,15 @@ { "concept": { "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of tricuspid valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384643000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -156,15 +156,15 @@ { "concept": { "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -173,15 +173,15 @@ { "concept": { "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of tetralogy of Fallot", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174814003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -190,15 +190,15 @@ { "concept": { "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of sinus venosus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174899009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -207,15 +207,15 @@ { "concept": { "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175253007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -224,15 +224,15 @@ { "concept": { "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174900004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -241,15 +241,15 @@ { "concept": { "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of ostium primum defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47195003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -258,15 +258,15 @@ { "concept": { "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of heart valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -275,15 +275,15 @@ { "concept": { "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of double outlet right ventricle", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233126007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -292,15 +292,15 @@ { "concept": { "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Removal of band from pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175261002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -309,15 +309,15 @@ { "concept": { "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "223341000000109", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -326,15 +326,15 @@ { "concept": { "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Release of vascular ring of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175341006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -343,15 +343,15 @@ { "concept": { "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447748008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -360,15 +360,15 @@ { "concept": { "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plication of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "81913003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -377,15 +377,15 @@ { "concept": { "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175338002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -394,15 +394,15 @@ { "concept": { "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plastic repair of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175337007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, diff --git a/project/json/cohort.json b/project/json/cohort.json index 31e94831..61993320 100644 --- a/project/json/cohort.json +++ b/project/json/cohort.json @@ -8,32 +8,15 @@ { "concept": { "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393856, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "White blood cell count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "767002", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -42,15 +25,15 @@ { "concept": { "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5171-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -59,15 +42,15 @@ { "concept": { "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "59260-0", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -76,15 +59,15 @@ { "concept": { "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Platelet count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1022651000000100", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -110,15 +93,15 @@ { "concept": { "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Prothrombin time - patient", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5902-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -127,15 +110,15 @@ { "concept": { "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32693-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -144,15 +127,15 @@ { "concept": { "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "38483-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -178,15 +161,15 @@ { "concept": { "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14937-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -195,15 +178,15 @@ { "concept": { "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14749-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -212,15 +195,15 @@ { "concept": { "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14631-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -246,15 +229,15 @@ { "concept": { "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6298-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -263,15 +246,15 @@ { "concept": { "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2593-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -280,15 +263,15 @@ { "concept": { "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2069-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -297,15 +280,15 @@ { "concept": { "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2000-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -314,15 +297,15 @@ { "concept": { "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14879-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -331,15 +314,15 @@ { "concept": { "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1988-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -382,15 +365,15 @@ { "concept": { "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Blood venous pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007071000000105", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -399,15 +382,15 @@ { "concept": { "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Blood arterial pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007061000000103", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -416,15 +399,15 @@ { "concept": { "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2021-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -433,15 +416,15 @@ { "concept": { "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -450,15 +433,15 @@ { "concept": { "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2705-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -467,15 +450,15 @@ { "concept": { "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2703-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -484,15 +467,15 @@ { "concept": { "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14627-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -501,15 +484,15 @@ { "concept": { "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1960-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -526,15 +509,15 @@ { "concept": { "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Peritoneal dialysis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71192002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -543,15 +526,15 @@ { "concept": { "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Continuous venovenous hemofiltration", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233585000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -560,15 +543,15 @@ { "concept": { "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Low cardiac output syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "44088000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" }, "isExcluded": false, "includeDescendants": true, @@ -602,15 +585,15 @@ { "concept": { "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Transposition of coronary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384678000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -619,15 +602,15 @@ { "concept": { "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Transplantation of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32413006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -636,15 +619,15 @@ { "concept": { "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "224111000000108", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -653,15 +636,15 @@ { "concept": { "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Revision of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174885005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -670,15 +653,15 @@ { "concept": { "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428893001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -687,15 +670,15 @@ { "concept": { "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of pulmonary valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "88045004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -704,15 +687,15 @@ { "concept": { "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Replacement of mitral valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53059001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -721,15 +704,15 @@ { "concept": { "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "89814007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -738,15 +721,15 @@ { "concept": { "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of tricuspid valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384643000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -755,15 +738,15 @@ { "concept": { "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -772,15 +755,15 @@ { "concept": { "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of tetralogy of Fallot", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174814003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -789,15 +772,15 @@ { "concept": { "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of sinus venosus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174899009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -806,15 +789,15 @@ { "concept": { "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175253007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -823,15 +806,15 @@ { "concept": { "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174900004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -840,15 +823,15 @@ { "concept": { "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of ostium primum defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47195003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -857,15 +840,15 @@ { "concept": { "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of heart valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -874,15 +857,15 @@ { "concept": { "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Repair of double outlet right ventricle", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233126007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -891,15 +874,15 @@ { "concept": { "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Removal of band from pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175261002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -908,15 +891,15 @@ { "concept": { "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "223341000000109", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -925,15 +908,15 @@ { "concept": { "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Release of vascular ring of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175341006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -942,15 +925,15 @@ { "concept": { "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447748008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -959,15 +942,15 @@ { "concept": { "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plication of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "81913003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -976,15 +959,15 @@ { "concept": { "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175338002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -993,15 +976,15 @@ { "concept": { "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Plastic repair of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175337007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, diff --git a/project/json/labTests_cs.json b/project/json/labTests_cs.json index 17cf111e..89708e11 100644 --- a/project/json/labTests_cs.json +++ b/project/json/labTests_cs.json @@ -3,32 +3,15 @@ { "concept": { "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393856, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "White blood cell count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "767002", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" }, "isExcluded": false, "includeDescendants": true, @@ -37,15 +20,15 @@ { "concept": { "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5171-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -54,15 +37,15 @@ { "concept": { "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "59260-0", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -71,15 +54,15 @@ { "concept": { "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Platelet count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1022651000000100", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -105,15 +88,15 @@ { "concept": { "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Prothrombin time - patient", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5902-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -122,15 +105,15 @@ { "concept": { "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32693-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -139,15 +122,15 @@ { "concept": { "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "38483-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -173,15 +156,15 @@ { "concept": { "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14937-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -190,15 +173,15 @@ { "concept": { "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14749-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -207,15 +190,15 @@ { "concept": { "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14631-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -241,15 +224,15 @@ { "concept": { "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6298-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -258,15 +241,15 @@ { "concept": { "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2593-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -275,15 +258,15 @@ { "concept": { "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2069-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -292,15 +275,15 @@ { "concept": { "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2000-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -309,15 +292,15 @@ { "concept": { "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14879-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -326,15 +309,15 @@ { "concept": { "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1988-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -377,15 +360,15 @@ { "concept": { "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Blood venous pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007071000000105", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -394,15 +377,15 @@ { "concept": { "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Blood arterial pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007061000000103", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" }, "isExcluded": false, "includeDescendants": true, @@ -411,15 +394,15 @@ { "concept": { "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2021-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -428,15 +411,15 @@ { "concept": { "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -445,15 +428,15 @@ { "concept": { "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2705-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -462,15 +445,15 @@ { "concept": { "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2703-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -479,15 +462,15 @@ { "concept": { "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14627-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, @@ -496,15 +479,15 @@ { "concept": { "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1960-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" }, "isExcluded": false, "includeDescendants": true, From 382aefdd8e1fb8c4c096b74f96bbe306c66bf71a Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 11:23:29 +0200 Subject: [PATCH 011/130] add PHEMS OMOP mappings (Hyve suggestions) --- .../5.10_cardiac_radiology.csv | 51 +++++++++++++++ .../phems_variable_list/5.11_cardiac_los.csv | 51 +++++++++++++++ .../phems_variable_list/5.12_additional.csv | 51 +++++++++++++++ .../5.13_laboratory_tests.csv | 61 ++++++++++++++++++ .../5.14_cardiac_complications.csv | 62 +++++++++++++++++++ .../phems_variable_list/5.15_vital_signs.csv | 62 +++++++++++++++++++ .../5.16_hsjd_clinical.csv | 62 +++++++++++++++++++ .../phems_variable_list/5.17_hsjd_surgery.csv | 62 +++++++++++++++++++ .../5.18_hsjd_hospitalisation.csv | 62 +++++++++++++++++++ .../5.19_hsjd_complication.csv | 62 +++++++++++++++++++ ...e_use_diagnoses_procedures_current_eps.csv | 62 +++++++++++++++++++ .../5.3_vis_score_medications.csv | 8 +++ .../5.4_vasopressors_inotropes.csv | 12 ++++ .../5.5_immunosuppressants.csv | 7 +++ .../5.6_antibiotic_medication.csv | 51 +++++++++++++++ .../phems_variable_list/5.7_antifungals.csv | 51 +++++++++++++++ .../5.8_antibiotic_resistance.csv | 51 +++++++++++++++ .../5.9_cardiac_surgery.csv | 51 +++++++++++++++ .../is_standard/5.10_cardiac_radiology.csv | 43 +++++++++++++ .../is_standard/5.11_cardiac_los.csv | 5 ++ .../is_standard/5.12_additional.csv | 36 +++++++++++ .../is_standard/5.13_laboratory_tests.csv | 61 ++++++++++++++++++ .../5.14_cardiac_complications.csv | 19 ++++++ .../is_standard/5.15_vital_signs.csv | 11 ++++ .../is_standard/5.16_hsjd_clinical.csv | 9 +++ .../is_standard/5.17_hsjd_surgery.csv | 9 +++ .../is_standard/5.18_hsjd_hospitalisation.csv | 11 ++++ .../is_standard/5.19_hsjd_complication.csv | 21 +++++++ ...e_use_diagnoses_procedures_current_eps.csv | 1 + .../is_standard/5.3_vis_score_medications.csv | 8 +++ .../5.4_vasopressors_inotropes.csv | 12 ++++ .../is_standard/5.5_immunosuppressants.csv | 7 +++ .../is_standard/5.6_antibiotic_medication.csv | 51 +++++++++++++++ .../is_standard/5.7_antifungals.csv | 6 ++ .../is_standard/5.8_antibiotic_resistance.csv | 11 ++++ .../is_standard/5.9_cardiac_surgery.csv | 42 +++++++++++++ 36 files changed, 1242 insertions(+) create mode 100644 project/data/phems_variable_list/5.10_cardiac_radiology.csv create mode 100644 project/data/phems_variable_list/5.11_cardiac_los.csv create mode 100644 project/data/phems_variable_list/5.12_additional.csv create mode 100644 project/data/phems_variable_list/5.13_laboratory_tests.csv create mode 100644 project/data/phems_variable_list/5.14_cardiac_complications.csv create mode 100644 project/data/phems_variable_list/5.15_vital_signs.csv create mode 100644 project/data/phems_variable_list/5.16_hsjd_clinical.csv create mode 100644 project/data/phems_variable_list/5.17_hsjd_surgery.csv create mode 100644 project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv create mode 100644 project/data/phems_variable_list/5.19_hsjd_complication.csv create mode 100644 project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv create mode 100644 project/data/phems_variable_list/5.3_vis_score_medications.csv create mode 100644 project/data/phems_variable_list/5.4_vasopressors_inotropes.csv create mode 100644 project/data/phems_variable_list/5.5_immunosuppressants.csv create mode 100644 project/data/phems_variable_list/5.6_antibiotic_medication.csv create mode 100644 project/data/phems_variable_list/5.7_antifungals.csv create mode 100644 project/data/phems_variable_list/5.8_antibiotic_resistance.csv create mode 100644 project/data/phems_variable_list/5.9_cardiac_surgery.csv create mode 100644 project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv create mode 100644 project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv create mode 100644 project/data/phems_variable_list/is_standard/5.12_additional.csv create mode 100644 project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv create mode 100644 project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv create mode 100644 project/data/phems_variable_list/is_standard/5.15_vital_signs.csv create mode 100644 project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv create mode 100644 project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv create mode 100644 project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv create mode 100644 project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv create mode 100644 project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv create mode 100644 project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv create mode 100644 project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv create mode 100644 project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv create mode 100644 project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv create mode 100644 project/data/phems_variable_list/is_standard/5.7_antifungals.csv create mode 100644 project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv create mode 100644 project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv diff --git a/project/data/phems_variable_list/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/5.10_cardiac_radiology.csv new file mode 100644 index 00000000..6a5ee613 --- /dev/null +++ b/project/data/phems_variable_list/5.10_cardiac_radiology.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825  +XR chest ,4163872  +US transoesophageal echocardiogram (toe) ,4019824  +XR abdomen ,4264477  +US cranial contents ,4083106  +24h holter monitor ,45764527  +24h holter monitor ,4140473  +US abdomen and pelvis/ US abdomen ,4305221  +US abdomen and pelvis/ US abdomen ,4261497  +MRI cardiac complex congenital ,44802640  +EEG routine portable ,4205144  +Epicardial echocardiogram ,4203365  +CT thorax with contrast ,4327032  +IR PICC line insertion ,4322380  +Event monitor ,45765560  +CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317  +IR tunnelled central venous line insertion ,40482732  +Cardiopulmonary exercise test (CPET) ,40492338  +US thorax and pleural cavity ,4093436  +US thorax and pleural cavity ,4329508  +MRI head ,4082979  +CT head ,4125350  +US urinary tract ,4125530  +Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431  +US vocal cord ,44813863  +Pacemaker/ICD device check - remote patient initiated ,4235141  +Pacemaker/ICD device check - remote device initiated ,4235141  +IR bronchoscopy ,4032404  +FL video swallow ,4345925  +IR bronchogram ,4312208  +XR chest and abdomen ,4169275  +Exercise test (non-CPET) ,4065416  +US doppler renal both ,4167052  +US neck ,4083108  +US doppler jugular vein both ,40489841  +EEG routine ,4181917  +US diaphragmatic region ,4303522  +US doppler groin both ,35622931  +US doppler groin both ,4167029  +IR tunnelled central venous line removal ,42873079  +US doppler ,35622931  +US doppler lower limb veins both ,4335392  +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.11_cardiac_los.csv b/project/data/phems_variable_list/5.11_cardiac_los.csv new file mode 100644 index 00000000..fc425a73 --- /dev/null +++ b/project/data/phems_variable_list/5.11_cardiac_los.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +ICU admission (start datetime and end datetime) ,4123933  +HDU admission (start datetime and end datetime) ,4161811  +Cardiology ward admission (start datetime and end datetime) ,36675203  +Total hospital admission (start datetime and end datetime) ,8715  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.12_additional.csv b/project/data/phems_variable_list/5.12_additional.csv new file mode 100644 index 00000000..9ed85f1e --- /dev/null +++ b/project/data/phems_variable_list/5.12_additional.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +"Outpatient appointments start datetime, end datetime ",9202  +Outpatient appointment type (telephone/ clinic visit etc.) ,5083  +Outpatient specialty ,32577  +Diagnoses ,4234469  +Systolic blood pressure ,3004249  +Systolic blood pressure ,8876  +Pupillary reaction ,4209008  +PaCO2 ,3027946  +PaCO2 ,44777602  +PaCO2 ,8876  +FiO2 ,42869590  +FiO2 ,8554  +Mechanical ventilation ,40493026  +Base Excess ,4095105  +Base Excess ,8753  +Elective ICU admission ,4123933  +"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975  +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.13_laboratory_tests.csv b/project/data/phems_variable_list/5.13_laboratory_tests.csv new file mode 100644 index 00000000..707cebf6 --- /dev/null +++ b/project/data/phems_variable_list/5.13_laboratory_tests.csv @@ -0,0 +1,61 @@ +sourceCode,concept_id +Immature WBC count ,4298431  +Immature WBC count ,8647  +Neutrophil count ,3007670  +Neutrophil count ,8647  +Hemoglobin ,40762351  +Hemoglobin ,8713  +Hemoglobin ,8636  +Platelet count ,4267147  +Platelet count ,8647  +Hematocrit ,3009542  +Hematocrit ,8554  +INR prothrombin time ,3034426  +INR prothrombin time ,8555  +Lactate ,3047181  +Lactate ,8753  +Creatinine ,3051825  +Creatinine ,8840  +Creatinine ,8749  +Albumin ,3024561  +Albumin ,8713  +Albumin ,8636  +Blood urea nitrogen ,3024641  +Blood urea nitrogen ,8753  +Glucose ,3013826  +Glucose ,8753  +Bilirubin ,3006140  +Bilirubin ,8749  +Sodium ,3019550  +Sodium ,8753  +Potassium ,3005456  +Potassium ,8753  +Magnesium ,3033836  +Magnesium ,8753  +Chloride ,3018572  +Chloride ,8753  +Calcium ,3015377  +Calcium ,8753  +Phosphate ,3003458  +Phosphate ,8753  +CRP ,3020460  +CRP ,8751  +ALT ,3006923  +ALT ,8645  +AST ,3013721  +AST ,8645  +pH (venous) ,37392672  +pH (arterial) ,37399161  +pCO2 (venous) ,3021447  +pCO2 (venous) ,8876  +pCO2 (venous) ,44777602  +pCO2 (arterial) ,3027946  +pCO2 (arterial) ,8876  +pO2 (venous) ,3024354  +pO2 (venous) ,8876  +pO2 (arterial) ,3027801  +pO2 (arterial) ,8876  +Bicarbonate (venous) ,3027273  +Bicarbonate (venous) ,8753  +Bicarbonate (arterial) ,3008152  +Bicarbonate (arterial) ,8753  diff --git a/project/data/phems_variable_list/5.14_cardiac_complications.csv b/project/data/phems_variable_list/5.14_cardiac_complications.csv new file mode 100644 index 00000000..e233950e --- /dev/null +++ b/project/data/phems_variable_list/5.14_cardiac_complications.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +ICU ward stay ,4123933  +CVL infections ,42537043  +Low cardiac output state (LCOS) - ECMO ,4185565  +,4052536  +LCOS - renal support (CVVH/ PD) ,4051330  +,4324124  +,4185565  +LCOS - Cardiac arrest ,321042  +,4185565  +LCOS - NEC requiring treatment ,4185565  +Neurological injury - infarction ,443454  +Neurological injury - seizure ,377091  +Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847  +Surgical injury - Blood Loss ,4308537  +Surgical injury - Chylothorax ,4306136  +Surgical injury - Reexplore for bleeding ,4295705  +,437312  +,442019  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv new file mode 100644 index 00000000..618f3d90 --- /dev/null +++ b/project/data/phems_variable_list/5.15_vital_signs.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +Age-dependent HR ,4239408  +Age-dependent HR ,8483  +Age-dependent RR ,4313591  +Age-dependent RR ,8483  +SBP (Systolic Blood Pressure) ,4152194  +SBP (Systolic Blood Pressure) ,8876  +DBP (Dyastolic Blood Pressure) ,4154790  +DBP (Dyastolic Blood Pressure) ,8876  +SpO2 ,4096101  +SpO2 ,8554  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/5.16_hsjd_clinical.csv new file mode 100644 index 00000000..98f662ab --- /dev/null +++ b/project/data/phems_variable_list/5.16_hsjd_clinical.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +Weight ,3025315  +Weight ,9529  +Height ,607590  +Height ,8582  +Body Surface Area (BSA) - Combination of weight and height ,4201235  +Body Surface Area (BSA) - Combination of weight and height ,8617  +Extracardiac anomalies - diagnoses ,0  +Cardiac surgeries (Interventions) ,4275564  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/5.17_hsjd_surgery.csv new file mode 100644 index 00000000..d2b96f79 --- /dev/null +++ b/project/data/phems_variable_list/5.17_hsjd_surgery.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +Aristotle's score of surgery ,0  +STAT/EACTS score of surgery ,40490494  +"Surgery start datetime, end datetime ",4301351  +"Cardiac bypass start datetime, end datetime ",4336464  +"Cross-clamping start datetime, end datetime ",4201547  +"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138  +"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  +Extubation event ,4150627  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv new file mode 100644 index 00000000..0a45b71a --- /dev/null +++ b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +Admission reason ,44803020  +ventilation ,0  +"Vasoactive infusion start datetime, end datetime ",42539650  +Type of vasoactive infusion ,0  +Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078  +VIS score of vasoactive infusion ,0  +"Postop central venous catheter in/start datetime, out/ end datetime ",4179206  +"Total ventilation start datetime, end datetime ",0  +Invasive Mechanical Ventilation LOS ,37158404  +Non-Invasive Mechanical Ventilation LOS ,4177224  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.19_hsjd_complication.csv b/project/data/phems_variable_list/5.19_hsjd_complication.csv new file mode 100644 index 00000000..0679ad0b --- /dev/null +++ b/project/data/phems_variable_list/5.19_hsjd_complication.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +intubation ,4202832  +Cardiac surgeries (interventions) ,4275564  +Sternum reopening (procedure undertaken) ,4044892  +Vocal Cord Dysfunction ,4046868  +Diaphragmatic Paralysis ,4275136  +Pneumothorax ,253796  +Tracheostomy ,44783799  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940  +Listed for heart transplantation ,609312  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv new file mode 100644 index 00000000..a759e426 --- /dev/null +++ b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -0,0 +1,62 @@ +sourceCode,concept_id +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.3_vis_score_medications.csv b/project/data/phems_variable_list/5.3_vis_score_medications.csv new file mode 100644 index 00000000..83bd4c12 --- /dev/null +++ b/project/data/phems_variable_list/5.3_vis_score_medications.csv @@ -0,0 +1,8 @@ +sourceCode,concept_id +dobutamine ,1337720  +dopamine ,1337860   +milrinone ,1368671   +epinephrine ,1343916  +vasopressin ,1507835  +norepinephrin  ,1321341  +,9688  diff --git a/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv new file mode 100644 index 00000000..3acde7fb --- /dev/null +++ b/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv @@ -0,0 +1,12 @@ +sourceCode,concept_id +Dobutamine ,1337720  +Dopamine ,1337860  +Milrinone ,1368671  +Epinephrine ,1343916  +Vasopressin ,1507835  +Norepinephrine,1321341  +Ephedrine ,1143374  +Terlipressin ,19119253  +Levosimendan ,40173184  +Isoproterenol   ,1183554  +Phenylephrine  ,1135766  diff --git a/project/data/phems_variable_list/5.5_immunosuppressants.csv b/project/data/phems_variable_list/5.5_immunosuppressants.csv new file mode 100644 index 00000000..179032ae --- /dev/null +++ b/project/data/phems_variable_list/5.5_immunosuppressants.csv @@ -0,0 +1,7 @@ +sourceCode,concept_id +Prednisolone ,1550557  +Dexamethasone ,1518254  +Hydrocortisone ,975125  +Methylprednisolone ,1506270  +Chemotherapy ,4273629  +Monoclonal Antibodies ,21603754  diff --git a/project/data/phems_variable_list/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/5.6_antibiotic_medication.csv new file mode 100644 index 00000000..271bddef --- /dev/null +++ b/project/data/phems_variable_list/5.6_antibiotic_medication.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +Prednisolone ,1550557  +Dexamethasone ,1518254  +Hydrocortisone ,975125  +Methylprednisolone ,1506270  +Chemotherapy ,4273629  +Monoclonal Antibodies ,21603754  +Penicillin ,1728416  +Ampicillin ,1717327  +Amoxicillin clavulanate ,1713332  +Amoxicillin clavulanate ,1759842  +Amoxicillin ,1713332  +Oxacillin ,1724703  +Piperacillin-Tazobactam ,1746114  +Piperacillin-Tazobactam ,1741122  +Cefazolin ,1771162  +Cefuroxime ,1778162  +Cefotaxime ,1774470  +Cefadroxil ,1769535  +Ceftazidime ,1776684  +Ceftazidime-Avibactam ,1776684  +Ceftazidime-Avibactam ,46221507  +Cefepime ,1748975  +Ceftolozane-Tazovactam ,45892599  +Ceftolozane-Tazovactam ,1741122  +Ertapenem ,1717963  +Imipenem ,1778262  +Meropenem ,1709170  +Teicoplanin ,19078399  +Vancomycin ,1707687  +Gentamicin ,45892419  +Amikacin ,1790868  +Tobramycin ,902722  +Erythromycin ,1746940  +Clarithromycin ,1750500  +Azithromycin ,1734104  +Tetracycline ,1836948  +Norfloxacin ,1721543  +Ciprofloxacin ,1797513  +Levofloxacin ,1742253  +Daptomycin ,1786617  +Clindamycin ,997881  +Fosfomycin ,956653  +Nitrofurantoin ,920293  +Rifampicin ,1763204  +Trimethoprim-Sulfamethoxazole ,1705674  +Trimethoprim-Sulfamethoxazole ,1836430  +Linezolid ,1736887  +Mupirocin ,951511  +Fusidic acid ,19010400  +Colistin ,901845  diff --git a/project/data/phems_variable_list/5.7_antifungals.csv b/project/data/phems_variable_list/5.7_antifungals.csv new file mode 100644 index 00000000..2577837c --- /dev/null +++ b/project/data/phems_variable_list/5.7_antifungals.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +Fluconazole ,1754994  +Micafungin ,19018013  +Isovuconazole ,35606695  +Andiulafungin ,19026450  +Voriconazole ,1714277  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/5.8_antibiotic_resistance.csv new file mode 100644 index 00000000..c74f57d6 --- /dev/null +++ b/project/data/phems_variable_list/5.8_antibiotic_resistance.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +MRSA ,4019195  +ESBL ,4257547  +Drug-resistant ,37017134  +Multidrug-resistant ,37017134  +Clindamycin-resistant ,37017134  +Clindamycin-resistant ,997881  +Vancomycin-resistant ,37017134  +Vancomycin-resistant ,1707687  +Erythromycin-resistant ,37017134  +Erythromycin-resistant ,1746940  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/5.9_cardiac_surgery.csv new file mode 100644 index 00000000..e819dffa --- /dev/null +++ b/project/data/phems_variable_list/5.9_cardiac_surgery.csv @@ -0,0 +1,51 @@ +sourceCode,concept_id +Unspecified repair of defect of interventricular septum ,4199899  +Extracorporeal membrane oxygenation ,4052536  +Other specified: plastic repair of aorta ,4019026  +Unspecified repair of tetralogy of fallot ,4019929  +Repositioning of transposed great arteries ,4019932  +Creation of anastomosis to pulmonary artery from vena cava ,4019237  +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525  +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380  +Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376  +Application of band to pulmonary artery ,4049734  +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751  +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127  +Open implantation of ventricular assist device ,4139214  +Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857  +Implantation of cardiac pacemaker system NEC ,4144921  +Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133  +Unspecified correction of total anomalous pulmonary  venous connection ,4017751  +Other specified other operations on ventricles of heart ,44510968  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  +Correction of persistent sinus venosus ,4020508  +Release of vascular ring of aorta ,4019028  +Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476  +Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415  +Repair of subaortic stenosis ,4018747  +Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233  +Closure of patent ductus arteriosus NEC ,4050114  +Removal of band from pulmonary artery ,4021725  +Aortic valve repair NEC ,4312194  +Plastic repair of aorta and end to end anastomosis of aorta ,4020812  +Repair of double outlet right ventricle ,4049979  +Correction of partial anomalous pulmonary venous drainage ,4018441  +Open aortic valvotomy ,4020520  +Other specified : repair of pulmonary artery ,4018926  +Plication of diaphragm ,4217615  +Relief of left ventricular outflow tract obstruction ,44790092  +Tricuspid valve repair NEC ,4293619  +Repair of tetralogy of fallot using transannular patch ,4308136  +Replacement of mitral valve NEC ,4203153  +Transposition of coronary artery NEC ,4296790  +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv new file mode 100644 index 00000000..c1fc319a --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv @@ -0,0 +1,43 @@ +,sourceCode,concept_id,standard_concept +0,US transoesophageal echocardiogram (toe) ,4019824,S +1,IR bronchoscopy ,4032404,S +2,Exercise test (non-CPET) ,4065416,S +3,FL video swallow ,4345925,S +4,US cranial contents ,4083106,S +5,US neck ,4083108,S +6,MRI head ,4082979,S +7,US thorax and pleural cavity ,4093436,S +8,CT head ,4125350,S +9,US urinary tract ,4125530,S +10,MRI cardiac complex congenital ,44802640,S +11,XR chest ,4163872,S +12,US doppler groin both ,4167029,S +13,US doppler renal both ,4167052,S +14,US abdomen and pelvis/ US abdomen ,4305221,S +15,US diaphragmatic region ,4303522,S +16,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317,S +17,XR chest and abdomen ,4169275,S +18,IR PICC line insertion ,4322380,S +19,24h holter monitor ,4140473,S +20,US thorax and pleural cavity ,4329508,S +21,US doppler lower limb veins both ,4335392,S +22,Epicardial echocardiogram ,4203365,S +23,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825,S +24,IR tunnelled central venous line insertion ,40482732,S +25,US doppler jugular vein both ,40489841,S +26,Cardiopulmonary exercise test (CPET) ,40492338,S +27,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431,S +28,IR tunnelled central venous line removal ,42873079,S +29,US abdomen and pelvis/ US abdomen ,4261497,S +30,EEG routine portable ,4205144,S +31,EEG routine ,4181917,S +32,XR abdomen ,4264477,S +33,24h holter monitor ,45764527,S +34,Event monitor ,45765560,S +35,CT thorax with contrast ,4327032,S +36,US doppler groin both ,35622931,S +37,US doppler ,35622931,S +38,US vocal cord ,44813863,S +39,IR bronchogram ,4312208,S +40,Pacemaker/ICD device check - remote patient initiated ,4235141,S +41,Pacemaker/ICD device check - remote device initiated ,4235141,S diff --git a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv new file mode 100644 index 00000000..7eaf52a8 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv @@ -0,0 +1,5 @@ +,sourceCode,concept_id,standard_concept +0,ICU admission (start datetime and end datetime) ,4123933,S +1,Total hospital admission (start datetime and end datetime) ,8715,S +2,HDU admission (start datetime and end datetime) ,4161811,S +3,Cardiology ward admission (start datetime and end datetime) ,36675203,S diff --git a/project/data/phems_variable_list/is_standard/5.12_additional.csv b/project/data/phems_variable_list/is_standard/5.12_additional.csv new file mode 100644 index 00000000..1daac819 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.12_additional.csv @@ -0,0 +1,36 @@ +,sourceCode,concept_id,standard_concept +0,Outpatient appointment type (telephone/ clinic visit etc.) ,5083,S +1,FiO2 ,42869590,S +2,PaCO2 ,3027946,S +3,Systolic blood pressure ,3004249,S +4,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462,S +5,Base Excess ,4095105,S +6,Elective ICU admission ,4123933,S +7,Diagnoses ,4234469,S +8,Mechanical ventilation ,40493026,S +9,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020,S +10,Pupillary reaction ,4209008,S +11,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134,S +12,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571,S +13,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498,S +14,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009,S +15,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957,S +16,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727,S +17,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783,S +18,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042,S +19,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112,S +20,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727,S +21,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383,S +22,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975,S +23,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207,S +24,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745,S +25,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588,S +26,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310,S +27,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319,S +28,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510,S +29,FiO2 ,8554,S +30,PaCO2 ,44777602,S +31,Systolic blood pressure ,8876,S +32,PaCO2 ,8876,S +33,Base Excess ,8753,S +34,"Outpatient appointments start datetime, end datetime ",9202,S diff --git a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv new file mode 100644 index 00000000..1bc35e63 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv @@ -0,0 +1,61 @@ +,sourceCode,concept_id,standard_concept +0,Potassium ,3005456,S +1,Chloride ,3018572,S +2,Creatinine ,3051825,S +3,Bicarbonate (venous) ,3027273,S +4,Bilirubin ,3006140,S +5,Glucose ,3013826,S +6,Phosphate ,3003458,S +7,Blood urea nitrogen ,3024641,S +8,ALT ,3006923,S +9,Albumin ,3024561,S +10,AST ,3013721,S +11,Bicarbonate (arterial) ,3008152,S +12,CRP ,3020460,S +13,Calcium ,3015377,S +14,pCO2 (arterial) ,3027946,S +15,pCO2 (venous) ,3021447,S +16,Hematocrit ,3009542,S +17,Magnesium ,3033836,S +18,pO2 (arterial) ,3027801,S +19,pO2 (venous) ,3024354,S +20,Sodium ,3019550,S +21,Lactate ,3047181,S +22,Neutrophil count ,3007670,S +23,INR prothrombin time ,3034426,S +24,Hemoglobin ,40762351,S +25,pH (arterial) ,37399161,S +26,pH (venous) ,37392672,S +27,Platelet count ,4267147,S +28,Immature WBC count ,4298431,S +29,Hematocrit ,8554,S +30,Hemoglobin ,8713,S +31,Albumin ,8713,S +32,Hemoglobin ,8636,S +33,Albumin ,8636,S +34,pCO2 (venous) ,44777602,S +35,Creatinine ,8840,S +36,CRP ,8751,S +37,pCO2 (venous) ,8876,S +38,pCO2 (arterial) ,8876,S +39,pO2 (venous) ,8876,S +40,pO2 (arterial) ,8876,S +41,Lactate ,8753,S +42,Blood urea nitrogen ,8753,S +43,Glucose ,8753,S +44,Sodium ,8753,S +45,Potassium ,8753,S +46,Magnesium ,8753,S +47,Chloride ,8753,S +48,Calcium ,8753,S +49,Phosphate ,8753,S +50,Bicarbonate (venous) ,8753,S +51,Bicarbonate (arterial) ,8753,S +52,INR prothrombin time ,8555,S +53,Immature WBC count ,8647,S +54,Neutrophil count ,8647,S +55,Platelet count ,8647,S +56,ALT ,8645,S +57,AST ,8645,S +58,Creatinine ,8749,S +59,Bilirubin ,8749,S diff --git a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv new file mode 100644 index 00000000..0eca7732 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv @@ -0,0 +1,19 @@ +,sourceCode,concept_id,standard_concept +0,,437312,S +1,,4052536,S +2,LCOS - renal support (CVVH/ PD) ,4051330,S +3,ICU ward stay ,4123933,S +4,,4324124,S +5,Surgical injury - Reexplore for bleeding ,4295705,S +6,Neurological injury - seizure ,377091,S +7,,442019,S +8,Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847,S +9,Surgical injury - Blood Loss ,4308537,S +10,LCOS - Cardiac arrest ,321042,S +11,Neurological injury - infarction ,443454,S +12,Low cardiac output state (LCOS) - ECMO ,4185565,S +13,,4185565,S +14,,4185565,S +15,LCOS - NEC requiring treatment ,4185565,S +16,CVL infections ,42537043,S +17,Surgical injury - Chylothorax ,4306136,S diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv new file mode 100644 index 00000000..394d6dec --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv @@ -0,0 +1,11 @@ +,sourceCode,concept_id,standard_concept +0,SpO2 ,4096101,S +1,SBP (Systolic Blood Pressure) ,4152194, +2,DBP (Dyastolic Blood Pressure) ,4154790, +3,Age-dependent HR ,4239408, +4,Age-dependent RR ,4313591, +5,SpO2 ,8554,S +6,Age-dependent HR ,8483,S +7,Age-dependent RR ,8483,S +8,SBP (Systolic Blood Pressure) ,8876,S +9,DBP (Dyastolic Blood Pressure) ,8876,S diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv new file mode 100644 index 00000000..22c86ec9 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv @@ -0,0 +1,9 @@ +,sourceCode,concept_id,standard_concept +0,Weight ,3025315,S +1,Extracardiac anomalies - diagnoses ,0, +2,Height ,607590, +3,Body Surface Area (BSA) - Combination of weight and height ,4201235,S +4,Cardiac surgeries (Interventions) ,4275564,S +5,Height ,8582,S +6,Weight ,9529,S +7,Body Surface Area (BSA) - Combination of weight and height ,8617,S diff --git a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv new file mode 100644 index 00000000..a5bc9568 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv @@ -0,0 +1,9 @@ +,sourceCode,concept_id,standard_concept +0,Aristotle's score of surgery ,0, +1,"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138,S +2,"Cardiac bypass start datetime, end datetime ",4336464,S +3,Extubation event ,4150627,S +4,"Cross-clamping start datetime, end datetime ",4201547,S +5,"Surgery start datetime, end datetime ",4301351,S +6,STAT/EACTS score of surgery ,40490494,S +7,"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324,S diff --git a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv new file mode 100644 index 00000000..d6875f65 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv @@ -0,0 +1,11 @@ +,sourceCode,concept_id,standard_concept +0,ventilation ,0, +1,Type of vasoactive infusion ,0, +2,VIS score of vasoactive infusion ,0, +3,"Total ventilation start datetime, end datetime ",0, +4,Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078,S +5,Invasive Mechanical Ventilation LOS ,37158404,S +6,Non-Invasive Mechanical Ventilation LOS ,4177224,S +7,Admission reason ,44803020,S +8,"Postop central venous catheter in/start datetime, out/ end datetime ",4179206,S +9,"Vasoactive infusion start datetime, end datetime ",42539650,S diff --git a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv new file mode 100644 index 00000000..8fe5c64f --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv @@ -0,0 +1,21 @@ +,sourceCode,concept_id,standard_concept +0,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437,S +1,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860,S +2,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944,S +3,Sternum reopening (procedure undertaken) ,4044892,S +4,Vocal Cord Dysfunction ,4046868,S +5,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398,S +6,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940,S +7,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741,S +8,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045,S +9,Pneumothorax ,253796,S +10,Listed for heart transplantation ,609312,S +11,intubation ,4202832,S +12,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643,S +13,Cardiac surgeries (interventions) ,4275564,S +14,Tracheostomy ,44783799,S +15,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217,S +16,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155,S +17,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448,S +18,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572,S +19,Diaphragmatic Paralysis ,4275136,S diff --git a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv new file mode 100644 index 00000000..ed9cb8b2 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -0,0 +1 @@ +,sourceCode,concept_id,standard_concept diff --git a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv new file mode 100644 index 00000000..b7109d1a --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv @@ -0,0 +1,8 @@ +,sourceCode,concept_id,standard_concept +0,vasopressin ,1507835,S +1,dobutamine ,1337720,S +2,dopamine ,1337860,S +3,epinephrine ,1343916,S +4,milrinone ,1368671,S +5,norepinephrin  ,1321341,S +6,,9688,S diff --git a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv new file mode 100644 index 00000000..eb9ac5fd --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv @@ -0,0 +1,12 @@ +,sourceCode,concept_id,standard_concept +0,Vasopressin ,1507835,S +1,Dobutamine ,1337720,S +2,Dopamine ,1337860,S +3,Ephedrine ,1143374,S +4,Epinephrine ,1343916,S +5,Milrinone ,1368671,S +6,Terlipressin ,19119253,S +7,Isoproterenol   ,1183554,S +8,Levosimendan ,40173184,S +9,Norepinephrine,1321341,S +10,Phenylephrine  ,1135766,S diff --git a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv new file mode 100644 index 00000000..bba5f8f1 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv @@ -0,0 +1,7 @@ +,sourceCode,concept_id,standard_concept +0,Monoclonal Antibodies ,21603754,C +1,Dexamethasone ,1518254,S +2,Hydrocortisone ,975125,S +3,Methylprednisolone ,1506270,S +4,Prednisolone ,1550557,S +5,Chemotherapy ,4273629,S diff --git a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv new file mode 100644 index 00000000..03b276f1 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv @@ -0,0 +1,51 @@ +,sourceCode,concept_id,standard_concept +0,Monoclonal Antibodies ,21603754,C +1,Trimethoprim-Sulfamethoxazole ,1836430,S +2,Tetracycline ,1836948,S +3,Tobramycin ,902722,S +4,Trimethoprim-Sulfamethoxazole ,1705674,S +5,Vancomycin ,1707687,S +6,Fusidic acid ,19010400,S +7,Gentamicin ,45892419,S +8,Ceftolozane-Tazovactam ,45892599,S +9,Ceftazidime-Avibactam ,46221507,S +10,Azithromycin ,1734104,S +11,Linezolid ,1736887,S +12,Cefepime ,1748975,S +13,Clarithromycin ,1750500,S +14,Cefadroxil ,1769535,S +15,Cefazolin ,1771162,S +16,Cefotaxime ,1774470,S +17,Ceftazidime ,1776684,S +18,Ceftazidime-Avibactam ,1776684,S +19,Cefuroxime ,1778162,S +20,Daptomycin ,1786617,S +21,Ciprofloxacin ,1797513,S +22,Clindamycin ,997881,S +23,Colistin ,901845,S +24,Meropenem ,1709170,S +25,Ertapenem ,1717963,S +26,Dexamethasone ,1518254,S +27,Piperacillin-Tazobactam ,1741122,S +28,Ceftolozane-Tazovactam ,1741122,S +29,Erythromycin ,1746940,S +30,Mupirocin ,951511,S +31,Fosfomycin ,956653,S +32,Amoxicillin clavulanate ,1759842,S +33,Hydrocortisone ,975125,S +34,Imipenem ,1778262,S +35,Teicoplanin ,19078399,S +36,Amikacin ,1790868,S +37,Methylprednisolone ,1506270,S +38,Amoxicillin clavulanate ,1713332,S +39,Amoxicillin ,1713332,S +40,Ampicillin ,1717327,S +41,Nitrofurantoin ,920293,S +42,Norfloxacin ,1721543,S +43,Oxacillin ,1724703,S +44,Penicillin ,1728416,S +45,Levofloxacin ,1742253,S +46,Piperacillin-Tazobactam ,1746114,S +47,Prednisolone ,1550557,S +48,Rifampicin ,1763204,S +49,Chemotherapy ,4273629,S diff --git a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv new file mode 100644 index 00000000..3237f45c --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv @@ -0,0 +1,6 @@ +,sourceCode,concept_id,standard_concept +0,Voriconazole ,1714277,S +1,Isovuconazole ,35606695,S +2,Micafungin ,19018013,S +3,Andiulafungin ,19026450,S +4,Fluconazole ,1754994,S diff --git a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv new file mode 100644 index 00000000..13ea7144 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv @@ -0,0 +1,11 @@ +,sourceCode,concept_id,standard_concept +0,Vancomycin-resistant ,1707687,S +1,Clindamycin-resistant ,997881,S +2,Erythromycin-resistant ,1746940,S +3,MRSA ,4019195,S +4,ESBL ,4257547,S +5,Drug-resistant ,37017134,S +6,Multidrug-resistant ,37017134,S +7,Clindamycin-resistant ,37017134,S +8,Vancomycin-resistant ,37017134,S +9,Erythromycin-resistant ,37017134,S diff --git a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv new file mode 100644 index 00000000..00697b5a --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv @@ -0,0 +1,42 @@ +,sourceCode,concept_id,standard_concept +0,Application of band to pulmonary artery ,4049734,S +1,Unspecified repair of tetralogy of fallot ,4019929,S +2,Repositioning of transposed great arteries ,4019932,S +3,Unspecified correction of total anomalous pulmonary  venous connection ,4017751,S +4,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376,S +5,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506,S +6,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950,S +7,Correction of persistent sinus venosus ,4020508,S +8,Correction of partial anomalous pulmonary venous drainage ,4018441,S +9,Open aortic valvotomy ,4020520,S +10,Repair of subaortic stenosis ,4018747,S +11,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233,S +12,Creation of anastomosis to pulmonary artery from vena cava ,4019237,S +13,Other specified : repair of pulmonary artery ,4018926,S +14,Removal of band from pulmonary artery ,4021725,S +15,Other specified: plastic repair of aorta ,4019026,S +16,Plastic repair of aorta and end to end anastomosis of aorta ,4020812,S +17,Release of vascular ring of aorta ,4019028,S +18,Relief of left ventricular outflow tract obstruction ,44790092,S +19,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857,S +20,Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751,S +21,Repair of double outlet right ventricle ,4049979,S +22,Closure of patent ductus arteriosus NEC ,4050114,S +23,Extracorporeal membrane oxygenation ,4052536,S +24,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415,S +25,Implantation of cardiac pacemaker system NEC ,4144921,S +26,Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127,S +27,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133,S +28,Tricuspid valve repair NEC ,4293619,S +29,Transposition of coronary artery NEC ,4296790,S +30,Open implantation of ventricular assist device ,4139214,S +31,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479,S +32,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525,S +33,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380,S +34,Unspecified repair of defect of interventricular septum ,4199899,S +35,Replacement of mitral valve NEC ,4203153,S +36,Plication of diaphragm ,4217615,S +37,Repair of tetralogy of fallot using transannular patch ,4308136,S +38,Aortic valve repair NEC ,4312194,S +39,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184,S +40,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476,S From 74599943af56ebe0762ad4a0abdb639453eda111 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 11:23:57 +0200 Subject: [PATCH 012/130] Add check for standard concepts --- project/python/isStandard.py | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 project/python/isStandard.py diff --git a/project/python/isStandard.py b/project/python/isStandard.py new file mode 100644 index 00000000..7625e14c --- /dev/null +++ b/project/python/isStandard.py @@ -0,0 +1,40 @@ +import os + +import pandas as pd + +# Read concept table from Athena vocabulary download +concept_table = pd.read_csv('./project/data/vocabs_14-May-2024/CONCEPT.csv', + sep='\t', + dtype={'concept_id': object}) +# Clean concept_id values +concept_table['concept_id'] = concept_table['concept_id'].apply(lambda x: x.strip().lower()) + +# Specify the path to the tables with the source code/terms and concept_id +tables_path = './project/data/phems_variable_list/' + +# Specify path to save results of standard/non-standard lookup +save_path = './project/data/phems_variable_list/is_standard/' + +# Get all tables with source code/terms and concept_id +tables = os.listdir(tables_path) +for table_name in tables: + # Skip non-csv files + if ".csv" not in table_name: + continue + + # Read table of source code/terms and concept_id + table = pd.read_csv( + tables_path + table_name, + dtype={'sourceCode': object, 'concept_id': object} + # Drop empty rows + ).dropna(how='all') + # Clean concept_id values + table['concept_id'] = table['concept_id'].apply(lambda x: x.strip().lower()) + + # Inner join the concept table with the table of source code/terms and concept_id + joined = concept_table.merge(table, on='concept_id', how='inner') + # Keep only relevant columns + res = joined.filter(items=['sourceCode', 'concept_id', 'standard_concept']) + + # Save the result + res.to_csv(save_path + table_name) From 6fcd12e5c957b25ab1d01cf73c1c5da701b3d959 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 11:35:44 +0200 Subject: [PATCH 013/130] index=False update for standard concept check save file --- .../is_standard/5.10_cardiac_radiology.csv | 86 ++++++------ .../is_standard/5.11_cardiac_los.csv | 10 +- .../is_standard/5.12_additional.csv | 72 +++++------ .../is_standard/5.13_laboratory_tests.csv | 122 +++++++++--------- .../5.14_cardiac_complications.csv | 38 +++--- .../is_standard/5.15_vital_signs.csv | 22 ++-- .../is_standard/5.16_hsjd_clinical.csv | 18 +-- .../is_standard/5.17_hsjd_surgery.csv | 18 +-- .../is_standard/5.18_hsjd_hospitalisation.csv | 22 ++-- .../is_standard/5.19_hsjd_complication.csv | 42 +++--- ...e_use_diagnoses_procedures_current_eps.csv | 2 +- .../is_standard/5.3_vis_score_medications.csv | 16 +-- .../5.4_vasopressors_inotropes.csv | 24 ++-- .../is_standard/5.5_immunosuppressants.csv | 14 +- .../is_standard/5.6_antibiotic_medication.csv | 102 +++++++-------- .../is_standard/5.7_antifungals.csv | 12 +- .../is_standard/5.8_antibiotic_resistance.csv | 22 ++-- .../is_standard/5.9_cardiac_surgery.csv | 84 ++++++------ project/python/isStandard.py | 13 +- 19 files changed, 371 insertions(+), 368 deletions(-) diff --git a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv index c1fc319a..9804ec81 100644 --- a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv +++ b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv @@ -1,43 +1,43 @@ -,sourceCode,concept_id,standard_concept -0,US transoesophageal echocardiogram (toe) ,4019824,S -1,IR bronchoscopy ,4032404,S -2,Exercise test (non-CPET) ,4065416,S -3,FL video swallow ,4345925,S -4,US cranial contents ,4083106,S -5,US neck ,4083108,S -6,MRI head ,4082979,S -7,US thorax and pleural cavity ,4093436,S -8,CT head ,4125350,S -9,US urinary tract ,4125530,S -10,MRI cardiac complex congenital ,44802640,S -11,XR chest ,4163872,S -12,US doppler groin both ,4167029,S -13,US doppler renal both ,4167052,S -14,US abdomen and pelvis/ US abdomen ,4305221,S -15,US diaphragmatic region ,4303522,S -16,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317,S -17,XR chest and abdomen ,4169275,S -18,IR PICC line insertion ,4322380,S -19,24h holter monitor ,4140473,S -20,US thorax and pleural cavity ,4329508,S -21,US doppler lower limb veins both ,4335392,S -22,Epicardial echocardiogram ,4203365,S -23,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825,S -24,IR tunnelled central venous line insertion ,40482732,S -25,US doppler jugular vein both ,40489841,S -26,Cardiopulmonary exercise test (CPET) ,40492338,S -27,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431,S -28,IR tunnelled central venous line removal ,42873079,S -29,US abdomen and pelvis/ US abdomen ,4261497,S -30,EEG routine portable ,4205144,S -31,EEG routine ,4181917,S -32,XR abdomen ,4264477,S -33,24h holter monitor ,45764527,S -34,Event monitor ,45765560,S -35,CT thorax with contrast ,4327032,S -36,US doppler groin both ,35622931,S -37,US doppler ,35622931,S -38,US vocal cord ,44813863,S -39,IR bronchogram ,4312208,S -40,Pacemaker/ICD device check - remote patient initiated ,4235141,S -41,Pacemaker/ICD device check - remote device initiated ,4235141,S +sourceCode,concept_id,standard_concept +US transoesophageal echocardiogram (toe) ,4019824,S +IR bronchoscopy ,4032404,S +Exercise test (non-CPET) ,4065416,S +FL video swallow ,4345925,S +US cranial contents ,4083106,S +US neck ,4083108,S +MRI head ,4082979,S +US thorax and pleural cavity ,4093436,S +CT head ,4125350,S +US urinary tract ,4125530,S +MRI cardiac complex congenital ,44802640,S +XR chest ,4163872,S +US doppler groin both ,4167029,S +US doppler renal both ,4167052,S +US abdomen and pelvis/ US abdomen ,4305221,S +US diaphragmatic region ,4303522,S +CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317,S +XR chest and abdomen ,4169275,S +IR PICC line insertion ,4322380,S +24h holter monitor ,4140473,S +US thorax and pleural cavity ,4329508,S +US doppler lower limb veins both ,4335392,S +Epicardial echocardiogram ,4203365,S +US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825,S +IR tunnelled central venous line insertion ,40482732,S +US doppler jugular vein both ,40489841,S +Cardiopulmonary exercise test (CPET) ,40492338,S +Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431,S +IR tunnelled central venous line removal ,42873079,S +US abdomen and pelvis/ US abdomen ,4261497,S +EEG routine portable ,4205144,S +EEG routine ,4181917,S +XR abdomen ,4264477,S +24h holter monitor ,45764527,S +Event monitor ,45765560,S +CT thorax with contrast ,4327032,S +US doppler groin both ,35622931,S +US doppler ,35622931,S +US vocal cord ,44813863,S +IR bronchogram ,4312208,S +Pacemaker/ICD device check - remote patient initiated ,4235141,S +Pacemaker/ICD device check - remote device initiated ,4235141,S diff --git a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv index 7eaf52a8..fe0a1fe9 100644 --- a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv +++ b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv @@ -1,5 +1,5 @@ -,sourceCode,concept_id,standard_concept -0,ICU admission (start datetime and end datetime) ,4123933,S -1,Total hospital admission (start datetime and end datetime) ,8715,S -2,HDU admission (start datetime and end datetime) ,4161811,S -3,Cardiology ward admission (start datetime and end datetime) ,36675203,S +sourceCode,concept_id,standard_concept +ICU admission (start datetime and end datetime) ,4123933,S +Total hospital admission (start datetime and end datetime) ,8715,S +HDU admission (start datetime and end datetime) ,4161811,S +Cardiology ward admission (start datetime and end datetime) ,36675203,S diff --git a/project/data/phems_variable_list/is_standard/5.12_additional.csv b/project/data/phems_variable_list/is_standard/5.12_additional.csv index 1daac819..110536fb 100644 --- a/project/data/phems_variable_list/is_standard/5.12_additional.csv +++ b/project/data/phems_variable_list/is_standard/5.12_additional.csv @@ -1,36 +1,36 @@ -,sourceCode,concept_id,standard_concept -0,Outpatient appointment type (telephone/ clinic visit etc.) ,5083,S -1,FiO2 ,42869590,S -2,PaCO2 ,3027946,S -3,Systolic blood pressure ,3004249,S -4,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462,S -5,Base Excess ,4095105,S -6,Elective ICU admission ,4123933,S -7,Diagnoses ,4234469,S -8,Mechanical ventilation ,40493026,S -9,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020,S -10,Pupillary reaction ,4209008,S -11,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134,S -12,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571,S -13,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498,S -14,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009,S -15,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957,S -16,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727,S -17,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783,S -18,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042,S -19,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112,S -20,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727,S -21,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383,S -22,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975,S -23,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207,S -24,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745,S -25,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588,S -26,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310,S -27,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319,S -28,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510,S -29,FiO2 ,8554,S -30,PaCO2 ,44777602,S -31,Systolic blood pressure ,8876,S -32,PaCO2 ,8876,S -33,Base Excess ,8753,S -34,"Outpatient appointments start datetime, end datetime ",9202,S +sourceCode,concept_id,standard_concept +Outpatient appointment type (telephone/ clinic visit etc.) ,5083,S +FiO2 ,42869590,S +PaCO2 ,3027946,S +Systolic blood pressure ,3004249,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462,S +Base Excess ,4095105,S +Elective ICU admission ,4123933,S +Diagnoses ,4234469,S +Mechanical ventilation ,40493026,S +"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020,S +Pupillary reaction ,4209008,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745,S +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310,S +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319,S +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510,S +FiO2 ,8554,S +PaCO2 ,44777602,S +Systolic blood pressure ,8876,S +PaCO2 ,8876,S +Base Excess ,8753,S +"Outpatient appointments start datetime, end datetime ",9202,S diff --git a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv index 1bc35e63..64c57e38 100644 --- a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv +++ b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv @@ -1,61 +1,61 @@ -,sourceCode,concept_id,standard_concept -0,Potassium ,3005456,S -1,Chloride ,3018572,S -2,Creatinine ,3051825,S -3,Bicarbonate (venous) ,3027273,S -4,Bilirubin ,3006140,S -5,Glucose ,3013826,S -6,Phosphate ,3003458,S -7,Blood urea nitrogen ,3024641,S -8,ALT ,3006923,S -9,Albumin ,3024561,S -10,AST ,3013721,S -11,Bicarbonate (arterial) ,3008152,S -12,CRP ,3020460,S -13,Calcium ,3015377,S -14,pCO2 (arterial) ,3027946,S -15,pCO2 (venous) ,3021447,S -16,Hematocrit ,3009542,S -17,Magnesium ,3033836,S -18,pO2 (arterial) ,3027801,S -19,pO2 (venous) ,3024354,S -20,Sodium ,3019550,S -21,Lactate ,3047181,S -22,Neutrophil count ,3007670,S -23,INR prothrombin time ,3034426,S -24,Hemoglobin ,40762351,S -25,pH (arterial) ,37399161,S -26,pH (venous) ,37392672,S -27,Platelet count ,4267147,S -28,Immature WBC count ,4298431,S -29,Hematocrit ,8554,S -30,Hemoglobin ,8713,S -31,Albumin ,8713,S -32,Hemoglobin ,8636,S -33,Albumin ,8636,S -34,pCO2 (venous) ,44777602,S -35,Creatinine ,8840,S -36,CRP ,8751,S -37,pCO2 (venous) ,8876,S -38,pCO2 (arterial) ,8876,S -39,pO2 (venous) ,8876,S -40,pO2 (arterial) ,8876,S -41,Lactate ,8753,S -42,Blood urea nitrogen ,8753,S -43,Glucose ,8753,S -44,Sodium ,8753,S -45,Potassium ,8753,S -46,Magnesium ,8753,S -47,Chloride ,8753,S -48,Calcium ,8753,S -49,Phosphate ,8753,S -50,Bicarbonate (venous) ,8753,S -51,Bicarbonate (arterial) ,8753,S -52,INR prothrombin time ,8555,S -53,Immature WBC count ,8647,S -54,Neutrophil count ,8647,S -55,Platelet count ,8647,S -56,ALT ,8645,S -57,AST ,8645,S -58,Creatinine ,8749,S -59,Bilirubin ,8749,S +sourceCode,concept_id,standard_concept +Potassium ,3005456,S +Chloride ,3018572,S +Creatinine ,3051825,S +Bicarbonate (venous) ,3027273,S +Bilirubin ,3006140,S +Glucose ,3013826,S +Phosphate ,3003458,S +Blood urea nitrogen ,3024641,S +ALT ,3006923,S +Albumin ,3024561,S +AST ,3013721,S +Bicarbonate (arterial) ,3008152,S +CRP ,3020460,S +Calcium ,3015377,S +pCO2 (arterial) ,3027946,S +pCO2 (venous) ,3021447,S +Hematocrit ,3009542,S +Magnesium ,3033836,S +pO2 (arterial) ,3027801,S +pO2 (venous) ,3024354,S +Sodium ,3019550,S +Lactate ,3047181,S +Neutrophil count ,3007670,S +INR prothrombin time ,3034426,S +Hemoglobin ,40762351,S +pH (arterial) ,37399161,S +pH (venous) ,37392672,S +Platelet count ,4267147,S +Immature WBC count ,4298431,S +Hematocrit ,8554,S +Hemoglobin ,8713,S +Albumin ,8713,S +Hemoglobin ,8636,S +Albumin ,8636,S +pCO2 (venous) ,44777602,S +Creatinine ,8840,S +CRP ,8751,S +pCO2 (venous) ,8876,S +pCO2 (arterial) ,8876,S +pO2 (venous) ,8876,S +pO2 (arterial) ,8876,S +Lactate ,8753,S +Blood urea nitrogen ,8753,S +Glucose ,8753,S +Sodium ,8753,S +Potassium ,8753,S +Magnesium ,8753,S +Chloride ,8753,S +Calcium ,8753,S +Phosphate ,8753,S +Bicarbonate (venous) ,8753,S +Bicarbonate (arterial) ,8753,S +INR prothrombin time ,8555,S +Immature WBC count ,8647,S +Neutrophil count ,8647,S +Platelet count ,8647,S +ALT ,8645,S +AST ,8645,S +Creatinine ,8749,S +Bilirubin ,8749,S diff --git a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv index 0eca7732..cd408b51 100644 --- a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv @@ -1,19 +1,19 @@ -,sourceCode,concept_id,standard_concept -0,,437312,S -1,,4052536,S -2,LCOS - renal support (CVVH/ PD) ,4051330,S -3,ICU ward stay ,4123933,S -4,,4324124,S -5,Surgical injury - Reexplore for bleeding ,4295705,S -6,Neurological injury - seizure ,377091,S -7,,442019,S -8,Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847,S -9,Surgical injury - Blood Loss ,4308537,S -10,LCOS - Cardiac arrest ,321042,S -11,Neurological injury - infarction ,443454,S -12,Low cardiac output state (LCOS) - ECMO ,4185565,S -13,,4185565,S -14,,4185565,S -15,LCOS - NEC requiring treatment ,4185565,S -16,CVL infections ,42537043,S -17,Surgical injury - Chylothorax ,4306136,S +sourceCode,concept_id,standard_concept +,437312,S +,4052536,S +LCOS - renal support (CVVH/ PD) ,4051330,S +ICU ward stay ,4123933,S +,4324124,S +Surgical injury - Reexplore for bleeding ,4295705,S +Neurological injury - seizure ,377091,S +,442019,S +Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847,S +Surgical injury - Blood Loss ,4308537,S +LCOS - Cardiac arrest ,321042,S +Neurological injury - infarction ,443454,S +Low cardiac output state (LCOS) - ECMO ,4185565,S +,4185565,S +,4185565,S +LCOS - NEC requiring treatment ,4185565,S +CVL infections ,42537043,S +Surgical injury - Chylothorax ,4306136,S diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv index 394d6dec..51bacf26 100644 --- a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv @@ -1,11 +1,11 @@ -,sourceCode,concept_id,standard_concept -0,SpO2 ,4096101,S -1,SBP (Systolic Blood Pressure) ,4152194, -2,DBP (Dyastolic Blood Pressure) ,4154790, -3,Age-dependent HR ,4239408, -4,Age-dependent RR ,4313591, -5,SpO2 ,8554,S -6,Age-dependent HR ,8483,S -7,Age-dependent RR ,8483,S -8,SBP (Systolic Blood Pressure) ,8876,S -9,DBP (Dyastolic Blood Pressure) ,8876,S +sourceCode,concept_id,standard_concept +SpO2 ,4096101,S +SBP (Systolic Blood Pressure) ,4152194, +DBP (Dyastolic Blood Pressure) ,4154790, +Age-dependent HR ,4239408, +Age-dependent RR ,4313591, +SpO2 ,8554,S +Age-dependent HR ,8483,S +Age-dependent RR ,8483,S +SBP (Systolic Blood Pressure) ,8876,S +DBP (Dyastolic Blood Pressure) ,8876,S diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv index 22c86ec9..a5732101 100644 --- a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv @@ -1,9 +1,9 @@ -,sourceCode,concept_id,standard_concept -0,Weight ,3025315,S -1,Extracardiac anomalies - diagnoses ,0, -2,Height ,607590, -3,Body Surface Area (BSA) - Combination of weight and height ,4201235,S -4,Cardiac surgeries (Interventions) ,4275564,S -5,Height ,8582,S -6,Weight ,9529,S -7,Body Surface Area (BSA) - Combination of weight and height ,8617,S +sourceCode,concept_id,standard_concept +Weight ,3025315,S +Extracardiac anomalies - diagnoses ,0, +Height ,607590, +Body Surface Area (BSA) - Combination of weight and height ,4201235,S +Cardiac surgeries (Interventions) ,4275564,S +Height ,8582,S +Weight ,9529,S +Body Surface Area (BSA) - Combination of weight and height ,8617,S diff --git a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv index a5bc9568..16aa5ffa 100644 --- a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv @@ -1,9 +1,9 @@ -,sourceCode,concept_id,standard_concept -0,Aristotle's score of surgery ,0, -1,"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138,S -2,"Cardiac bypass start datetime, end datetime ",4336464,S -3,Extubation event ,4150627,S -4,"Cross-clamping start datetime, end datetime ",4201547,S -5,"Surgery start datetime, end datetime ",4301351,S -6,STAT/EACTS score of surgery ,40490494,S -7,"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324,S +sourceCode,concept_id,standard_concept +Aristotle's score of surgery ,0, +"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138,S +"Cardiac bypass start datetime, end datetime ",4336464,S +Extubation event ,4150627,S +"Cross-clamping start datetime, end datetime ",4201547,S +"Surgery start datetime, end datetime ",4301351,S +STAT/EACTS score of surgery ,40490494,S +"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324,S diff --git a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv index d6875f65..3070895f 100644 --- a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv @@ -1,11 +1,11 @@ -,sourceCode,concept_id,standard_concept -0,ventilation ,0, -1,Type of vasoactive infusion ,0, -2,VIS score of vasoactive infusion ,0, -3,"Total ventilation start datetime, end datetime ",0, -4,Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078,S -5,Invasive Mechanical Ventilation LOS ,37158404,S -6,Non-Invasive Mechanical Ventilation LOS ,4177224,S -7,Admission reason ,44803020,S -8,"Postop central venous catheter in/start datetime, out/ end datetime ",4179206,S -9,"Vasoactive infusion start datetime, end datetime ",42539650,S +sourceCode,concept_id,standard_concept +ventilation ,0, +Type of vasoactive infusion ,0, +VIS score of vasoactive infusion ,0, +"Total ventilation start datetime, end datetime ",0, +Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078,S +Invasive Mechanical Ventilation LOS ,37158404,S +Non-Invasive Mechanical Ventilation LOS ,4177224,S +Admission reason ,44803020,S +"Postop central venous catheter in/start datetime, out/ end datetime ",4179206,S +"Vasoactive infusion start datetime, end datetime ",42539650,S diff --git a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv index 8fe5c64f..02216c63 100644 --- a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv +++ b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv @@ -1,21 +1,21 @@ -,sourceCode,concept_id,standard_concept -0,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437,S -1,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860,S -2,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944,S -3,Sternum reopening (procedure undertaken) ,4044892,S -4,Vocal Cord Dysfunction ,4046868,S -5,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398,S -6,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940,S -7,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741,S -8,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045,S -9,Pneumothorax ,253796,S -10,Listed for heart transplantation ,609312,S -11,intubation ,4202832,S -12,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643,S -13,Cardiac surgeries (interventions) ,4275564,S -14,Tracheostomy ,44783799,S -15,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217,S -16,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155,S -17,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448,S -18,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572,S -19,Diaphragmatic Paralysis ,4275136,S +sourceCode,concept_id,standard_concept +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437,S +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860,S +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944,S +Sternum reopening (procedure undertaken) ,4044892,S +Vocal Cord Dysfunction ,4046868,S +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398,S +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940,S +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741,S +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045,S +Pneumothorax ,253796,S +Listed for heart transplantation ,609312,S +intubation ,4202832,S +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643,S +Cardiac surgeries (interventions) ,4275564,S +Tracheostomy ,44783799,S +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217,S +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155,S +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448,S +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572,S +Diaphragmatic Paralysis ,4275136,S diff --git a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv index ed9cb8b2..a5c3f4c3 100644 --- a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -1 +1 @@ -,sourceCode,concept_id,standard_concept +sourceCode,concept_id,standard_concept diff --git a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv index b7109d1a..e7694dc6 100644 --- a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv +++ b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv @@ -1,8 +1,8 @@ -,sourceCode,concept_id,standard_concept -0,vasopressin ,1507835,S -1,dobutamine ,1337720,S -2,dopamine ,1337860,S -3,epinephrine ,1343916,S -4,milrinone ,1368671,S -5,norepinephrin  ,1321341,S -6,,9688,S +sourceCode,concept_id,standard_concept +vasopressin ,1507835,S +dobutamine ,1337720,S +dopamine ,1337860,S +epinephrine ,1343916,S +milrinone ,1368671,S +norepinephrin  ,1321341,S +,9688,S diff --git a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv index eb9ac5fd..64fa1e2a 100644 --- a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv +++ b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv @@ -1,12 +1,12 @@ -,sourceCode,concept_id,standard_concept -0,Vasopressin ,1507835,S -1,Dobutamine ,1337720,S -2,Dopamine ,1337860,S -3,Ephedrine ,1143374,S -4,Epinephrine ,1343916,S -5,Milrinone ,1368671,S -6,Terlipressin ,19119253,S -7,Isoproterenol   ,1183554,S -8,Levosimendan ,40173184,S -9,Norepinephrine,1321341,S -10,Phenylephrine  ,1135766,S +sourceCode,concept_id,standard_concept +Vasopressin ,1507835,S +Dobutamine ,1337720,S +Dopamine ,1337860,S +Ephedrine ,1143374,S +Epinephrine ,1343916,S +Milrinone ,1368671,S +Terlipressin ,19119253,S +Isoproterenol   ,1183554,S +Levosimendan ,40173184,S +Norepinephrine,1321341,S +Phenylephrine  ,1135766,S diff --git a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv index bba5f8f1..20cb62fc 100644 --- a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv +++ b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv @@ -1,7 +1,7 @@ -,sourceCode,concept_id,standard_concept -0,Monoclonal Antibodies ,21603754,C -1,Dexamethasone ,1518254,S -2,Hydrocortisone ,975125,S -3,Methylprednisolone ,1506270,S -4,Prednisolone ,1550557,S -5,Chemotherapy ,4273629,S +sourceCode,concept_id,standard_concept +Monoclonal Antibodies ,21603754,C +Dexamethasone ,1518254,S +Hydrocortisone ,975125,S +Methylprednisolone ,1506270,S +Prednisolone ,1550557,S +Chemotherapy ,4273629,S diff --git a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv index 03b276f1..1b417ce0 100644 --- a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv +++ b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv @@ -1,51 +1,51 @@ -,sourceCode,concept_id,standard_concept -0,Monoclonal Antibodies ,21603754,C -1,Trimethoprim-Sulfamethoxazole ,1836430,S -2,Tetracycline ,1836948,S -3,Tobramycin ,902722,S -4,Trimethoprim-Sulfamethoxazole ,1705674,S -5,Vancomycin ,1707687,S -6,Fusidic acid ,19010400,S -7,Gentamicin ,45892419,S -8,Ceftolozane-Tazovactam ,45892599,S -9,Ceftazidime-Avibactam ,46221507,S -10,Azithromycin ,1734104,S -11,Linezolid ,1736887,S -12,Cefepime ,1748975,S -13,Clarithromycin ,1750500,S -14,Cefadroxil ,1769535,S -15,Cefazolin ,1771162,S -16,Cefotaxime ,1774470,S -17,Ceftazidime ,1776684,S -18,Ceftazidime-Avibactam ,1776684,S -19,Cefuroxime ,1778162,S -20,Daptomycin ,1786617,S -21,Ciprofloxacin ,1797513,S -22,Clindamycin ,997881,S -23,Colistin ,901845,S -24,Meropenem ,1709170,S -25,Ertapenem ,1717963,S -26,Dexamethasone ,1518254,S -27,Piperacillin-Tazobactam ,1741122,S -28,Ceftolozane-Tazovactam ,1741122,S -29,Erythromycin ,1746940,S -30,Mupirocin ,951511,S -31,Fosfomycin ,956653,S -32,Amoxicillin clavulanate ,1759842,S -33,Hydrocortisone ,975125,S -34,Imipenem ,1778262,S -35,Teicoplanin ,19078399,S -36,Amikacin ,1790868,S -37,Methylprednisolone ,1506270,S -38,Amoxicillin clavulanate ,1713332,S -39,Amoxicillin ,1713332,S -40,Ampicillin ,1717327,S -41,Nitrofurantoin ,920293,S -42,Norfloxacin ,1721543,S -43,Oxacillin ,1724703,S -44,Penicillin ,1728416,S -45,Levofloxacin ,1742253,S -46,Piperacillin-Tazobactam ,1746114,S -47,Prednisolone ,1550557,S -48,Rifampicin ,1763204,S -49,Chemotherapy ,4273629,S +sourceCode,concept_id,standard_concept +Monoclonal Antibodies ,21603754,C +Trimethoprim-Sulfamethoxazole ,1836430,S +Tetracycline ,1836948,S +Tobramycin ,902722,S +Trimethoprim-Sulfamethoxazole ,1705674,S +Vancomycin ,1707687,S +Fusidic acid ,19010400,S +Gentamicin ,45892419,S +Ceftolozane-Tazovactam ,45892599,S +Ceftazidime-Avibactam ,46221507,S +Azithromycin ,1734104,S +Linezolid ,1736887,S +Cefepime ,1748975,S +Clarithromycin ,1750500,S +Cefadroxil ,1769535,S +Cefazolin ,1771162,S +Cefotaxime ,1774470,S +Ceftazidime ,1776684,S +Ceftazidime-Avibactam ,1776684,S +Cefuroxime ,1778162,S +Daptomycin ,1786617,S +Ciprofloxacin ,1797513,S +Clindamycin ,997881,S +Colistin ,901845,S +Meropenem ,1709170,S +Ertapenem ,1717963,S +Dexamethasone ,1518254,S +Piperacillin-Tazobactam ,1741122,S +Ceftolozane-Tazovactam ,1741122,S +Erythromycin ,1746940,S +Mupirocin ,951511,S +Fosfomycin ,956653,S +Amoxicillin clavulanate ,1759842,S +Hydrocortisone ,975125,S +Imipenem ,1778262,S +Teicoplanin ,19078399,S +Amikacin ,1790868,S +Methylprednisolone ,1506270,S +Amoxicillin clavulanate ,1713332,S +Amoxicillin ,1713332,S +Ampicillin ,1717327,S +Nitrofurantoin ,920293,S +Norfloxacin ,1721543,S +Oxacillin ,1724703,S +Penicillin ,1728416,S +Levofloxacin ,1742253,S +Piperacillin-Tazobactam ,1746114,S +Prednisolone ,1550557,S +Rifampicin ,1763204,S +Chemotherapy ,4273629,S diff --git a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv index 3237f45c..bacfd58f 100644 --- a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv +++ b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv @@ -1,6 +1,6 @@ -,sourceCode,concept_id,standard_concept -0,Voriconazole ,1714277,S -1,Isovuconazole ,35606695,S -2,Micafungin ,19018013,S -3,Andiulafungin ,19026450,S -4,Fluconazole ,1754994,S +sourceCode,concept_id,standard_concept +Voriconazole ,1714277,S +Isovuconazole ,35606695,S +Micafungin ,19018013,S +Andiulafungin ,19026450,S +Fluconazole ,1754994,S diff --git a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv index 13ea7144..3a06353f 100644 --- a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv +++ b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv @@ -1,11 +1,11 @@ -,sourceCode,concept_id,standard_concept -0,Vancomycin-resistant ,1707687,S -1,Clindamycin-resistant ,997881,S -2,Erythromycin-resistant ,1746940,S -3,MRSA ,4019195,S -4,ESBL ,4257547,S -5,Drug-resistant ,37017134,S -6,Multidrug-resistant ,37017134,S -7,Clindamycin-resistant ,37017134,S -8,Vancomycin-resistant ,37017134,S -9,Erythromycin-resistant ,37017134,S +sourceCode,concept_id,standard_concept +Vancomycin-resistant ,1707687,S +Clindamycin-resistant ,997881,S +Erythromycin-resistant ,1746940,S +MRSA ,4019195,S +ESBL ,4257547,S +Drug-resistant ,37017134,S +Multidrug-resistant ,37017134,S +Clindamycin-resistant ,37017134,S +Vancomycin-resistant ,37017134,S +Erythromycin-resistant ,37017134,S diff --git a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv index 00697b5a..0c6c63f6 100644 --- a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv @@ -1,42 +1,42 @@ -,sourceCode,concept_id,standard_concept -0,Application of band to pulmonary artery ,4049734,S -1,Unspecified repair of tetralogy of fallot ,4019929,S -2,Repositioning of transposed great arteries ,4019932,S -3,Unspecified correction of total anomalous pulmonary  venous connection ,4017751,S -4,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376,S -5,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506,S -6,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950,S -7,Correction of persistent sinus venosus ,4020508,S -8,Correction of partial anomalous pulmonary venous drainage ,4018441,S -9,Open aortic valvotomy ,4020520,S -10,Repair of subaortic stenosis ,4018747,S -11,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233,S -12,Creation of anastomosis to pulmonary artery from vena cava ,4019237,S -13,Other specified : repair of pulmonary artery ,4018926,S -14,Removal of band from pulmonary artery ,4021725,S -15,Other specified: plastic repair of aorta ,4019026,S -16,Plastic repair of aorta and end to end anastomosis of aorta ,4020812,S -17,Release of vascular ring of aorta ,4019028,S -18,Relief of left ventricular outflow tract obstruction ,44790092,S -19,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857,S -20,Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751,S -21,Repair of double outlet right ventricle ,4049979,S -22,Closure of patent ductus arteriosus NEC ,4050114,S -23,Extracorporeal membrane oxygenation ,4052536,S -24,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415,S -25,Implantation of cardiac pacemaker system NEC ,4144921,S -26,Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127,S -27,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133,S -28,Tricuspid valve repair NEC ,4293619,S -29,Transposition of coronary artery NEC ,4296790,S -30,Open implantation of ventricular assist device ,4139214,S -31,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479,S -32,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525,S -33,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380,S -34,Unspecified repair of defect of interventricular septum ,4199899,S -35,Replacement of mitral valve NEC ,4203153,S -36,Plication of diaphragm ,4217615,S -37,Repair of tetralogy of fallot using transannular patch ,4308136,S -38,Aortic valve repair NEC ,4312194,S -39,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184,S -40,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476,S +sourceCode,concept_id,standard_concept +Application of band to pulmonary artery ,4049734,S +Unspecified repair of tetralogy of fallot ,4019929,S +Repositioning of transposed great arteries ,4019932,S +Unspecified correction of total anomalous pulmonary  venous connection ,4017751,S +Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376,S +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506,S +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950,S +Correction of persistent sinus venosus ,4020508,S +Correction of partial anomalous pulmonary venous drainage ,4018441,S +Open aortic valvotomy ,4020520,S +Repair of subaortic stenosis ,4018747,S +Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233,S +Creation of anastomosis to pulmonary artery from vena cava ,4019237,S +Other specified : repair of pulmonary artery ,4018926,S +Removal of band from pulmonary artery ,4021725,S +Other specified: plastic repair of aorta ,4019026,S +Plastic repair of aorta and end to end anastomosis of aorta ,4020812,S +Release of vascular ring of aorta ,4019028,S +Relief of left ventricular outflow tract obstruction ,44790092,S +Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857,S +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751,S +Repair of double outlet right ventricle ,4049979,S +Closure of patent ductus arteriosus NEC ,4050114,S +Extracorporeal membrane oxygenation ,4052536,S +Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415,S +Implantation of cardiac pacemaker system NEC ,4144921,S +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127,S +Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133,S +Tricuspid valve repair NEC ,4293619,S +Transposition of coronary artery NEC ,4296790,S +Open implantation of ventricular assist device ,4139214,S +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479,S +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525,S +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380,S +Unspecified repair of defect of interventricular septum ,4199899,S +Replacement of mitral valve NEC ,4203153,S +Plication of diaphragm ,4217615,S +Repair of tetralogy of fallot using transannular patch ,4308136,S +Aortic valve repair NEC ,4312194,S +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184,S +Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476,S diff --git a/project/python/isStandard.py b/project/python/isStandard.py index 7625e14c..eb313237 100644 --- a/project/python/isStandard.py +++ b/project/python/isStandard.py @@ -7,7 +7,8 @@ sep='\t', dtype={'concept_id': object}) # Clean concept_id values -concept_table['concept_id'] = concept_table['concept_id'].apply(lambda x: x.strip().lower()) +concept_table['concept_id'] = concept_table['concept_id'].apply( + lambda x: x.strip().lower()) # Specify the path to the tables with the source code/terms and concept_id tables_path = './project/data/phems_variable_list/' @@ -26,15 +27,17 @@ table = pd.read_csv( tables_path + table_name, dtype={'sourceCode': object, 'concept_id': object} - # Drop empty rows + # Drop empty rows ).dropna(how='all') # Clean concept_id values - table['concept_id'] = table['concept_id'].apply(lambda x: x.strip().lower()) + table['concept_id'] = table['concept_id'].apply( + lambda x: x.strip().lower()) # Inner join the concept table with the table of source code/terms and concept_id joined = concept_table.merge(table, on='concept_id', how='inner') # Keep only relevant columns res = joined.filter(items=['sourceCode', 'concept_id', 'standard_concept']) - + # Save the result - res.to_csv(save_path + table_name) + print('writing standard concept check file for ' + table_name + 'to ' + save_path + table_name) + res.to_csv(save_path + table_name, index=False) From 7af95d31d4d2e62734fab28a04867fc0bfcf7648 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 13:56:36 +0200 Subject: [PATCH 014/130] replace python isStandard function with R --- project/R/isStandard.R | 88 ++++++++++++++++++++++++++---------- project/python/isStandard.py | 43 ------------------ 2 files changed, 63 insertions(+), 68 deletions(-) delete mode 100644 project/python/isStandard.py diff --git a/project/R/isStandard.R b/project/R/isStandard.R index f23e4d5f..47364749 100644 --- a/project/R/isStandard.R +++ b/project/R/isStandard.R @@ -1,31 +1,69 @@ -isStandard <- function(conceptSets, df) { - concepts <- c() - conceptSet <- c() - standardness <- c() - og <- df$concept$concept_id - for (cs in names(conceptSets)) { - for (L in conceptSets[[cs]]@Expression) { - conceptSet <- append(conceptSet, cs) - concept <- L@Concept@concept_id - concepts <- append(concepts, concept) - standardness <- append(standardness, L@Concept@standard_concept %>% - gsub(pattern = 'S', replacement = 'Standard') %>% - gsub(pattern = 'C', replacement = 'Classification') - ) - if (standardness[length(standardness)] == "") { - if (concept %in% og) { - standardness[length(standardness)] <- "Non-Standard" - } else { - standardness[length(standardness)] <- "not found in data" - } +library(readr) +library(dplyr) + +isStandard <- function(concept_table_path, data_concepts_path, save_path, write_tables = FALSE) { + # Set working directory + path <- rstudioapi::getSourceEditorContext()$path %>% + dirname() %>% + dirname() %>% + dirname() + setwd(path) + + # Read concept table + concept_table <- read_delim(concept_table_path, + delim = '\t', + col_types = cols(concept_id = col_character())) %>% + mutate(concept_id = as.character(concept_id)) %>% # Ensure concept_id is character + mutate(concept_id = tolower(trimws(concept_id))) + + # Initialize vector of non-standard (or not in vocabularies) concept ids + nonStandard <- c() + # Initialize vector of non-standard concept names + conceptNameNonStandard <- c() + # Initialize vector of source codes/terms for non-standard concepts + sourceCodeNonStandard <- c() + # Initialize vector of source tables for non-standard concepts + sourceTableNonStandard <- c() + + # Get tables + tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) + for (table_path in tables) { + table_name <- basename(table_path) + + # Read and prepare table + tb <- read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% + mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% # Replace non-breaking space with regular space + mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% + filter(!is.na(sourceCode), !is.na(concept_id)) %>% + mutate(concept_id = tolower(concept_id), + concept_id = as.character(concept_id)) + + # Join tables + joined <- inner_join(concept_table, tb, by = "concept_id") + + # Add non-standard concepts to vector + ind <- which(!(joined$standard_concept %in% c('S', 'C'))) + nonStandard <- append(nonStandard, joined$concept_id[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) + sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) + sourceTableNonStandard <- append(sourceTableNonStandard, + replicate(length(ind), table_name, simplify="vector")) + + # Save if not empty + if (write_tables == TRUE) { + if(nrow(joined) > 0) { + write_csv(joined, paste0(save_path, table_name)) + } else { + cat("No matches found for table:", table_name, "\n") } } } + # Create table of non-standard concepts res <- tibble::tibble( - conceptSet = conceptSet, - concept = concepts, - standard = standardness + concept_id = nonStandard, + concept_name = conceptNameNonStandard, + source_code = sourceCodeNonStandard, + source_table = sourceTableNonStandard ) - return(res) -} \ No newline at end of file +} diff --git a/project/python/isStandard.py b/project/python/isStandard.py deleted file mode 100644 index eb313237..00000000 --- a/project/python/isStandard.py +++ /dev/null @@ -1,43 +0,0 @@ -import os - -import pandas as pd - -# Read concept table from Athena vocabulary download -concept_table = pd.read_csv('./project/data/vocabs_14-May-2024/CONCEPT.csv', - sep='\t', - dtype={'concept_id': object}) -# Clean concept_id values -concept_table['concept_id'] = concept_table['concept_id'].apply( - lambda x: x.strip().lower()) - -# Specify the path to the tables with the source code/terms and concept_id -tables_path = './project/data/phems_variable_list/' - -# Specify path to save results of standard/non-standard lookup -save_path = './project/data/phems_variable_list/is_standard/' - -# Get all tables with source code/terms and concept_id -tables = os.listdir(tables_path) -for table_name in tables: - # Skip non-csv files - if ".csv" not in table_name: - continue - - # Read table of source code/terms and concept_id - table = pd.read_csv( - tables_path + table_name, - dtype={'sourceCode': object, 'concept_id': object} - # Drop empty rows - ).dropna(how='all') - # Clean concept_id values - table['concept_id'] = table['concept_id'].apply( - lambda x: x.strip().lower()) - - # Inner join the concept table with the table of source code/terms and concept_id - joined = concept_table.merge(table, on='concept_id', how='inner') - # Keep only relevant columns - res = joined.filter(items=['sourceCode', 'concept_id', 'standard_concept']) - - # Save the result - print('writing standard concept check file for ' + table_name + 'to ' + save_path + table_name) - res.to_csv(save_path + table_name, index=False) From 3dd93234c06195d2dabd890267f6abc246f89f7d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 16:06:08 +0200 Subject: [PATCH 015/130] update standard concept tables --- .../is_standard/5.10_cardiac_radiology.csv | 86 ++++++------ .../is_standard/5.11_cardiac_los.csv | 10 +- .../is_standard/5.12_additional.csv | 72 +++++------ .../is_standard/5.13_laboratory_tests.csv | 122 +++++++++--------- .../5.14_cardiac_complications.csv | 32 ++--- .../is_standard/5.15_vital_signs.csv | 22 ++-- .../is_standard/5.16_hsjd_clinical.csv | 18 +-- .../is_standard/5.17_hsjd_surgery.csv | 18 +-- .../is_standard/5.18_hsjd_hospitalisation.csv | 22 ++-- .../is_standard/5.19_hsjd_complication.csv | 42 +++--- .../is_standard/5.3_vis_score_medications.csv | 15 +-- .../5.4_vasopressors_inotropes.csv | 24 ++-- .../is_standard/5.5_immunosuppressants.csv | 14 +- .../is_standard/5.6_antibiotic_medication.csv | 102 +++++++-------- .../is_standard/5.7_antifungals.csv | 12 +- .../is_standard/5.8_antibiotic_resistance.csv | 22 ++-- .../is_standard/5.9_cardiac_surgery.csv | 84 ++++++------ 17 files changed, 355 insertions(+), 362 deletions(-) diff --git a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv index 9804ec81..c0939d39 100644 --- a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv +++ b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv @@ -1,43 +1,43 @@ -sourceCode,concept_id,standard_concept -US transoesophageal echocardiogram (toe) ,4019824,S -IR bronchoscopy ,4032404,S -Exercise test (non-CPET) ,4065416,S -FL video swallow ,4345925,S -US cranial contents ,4083106,S -US neck ,4083108,S -MRI head ,4082979,S -US thorax and pleural cavity ,4093436,S -CT head ,4125350,S -US urinary tract ,4125530,S -MRI cardiac complex congenital ,44802640,S -XR chest ,4163872,S -US doppler groin both ,4167029,S -US doppler renal both ,4167052,S -US abdomen and pelvis/ US abdomen ,4305221,S -US diaphragmatic region ,4303522,S -CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317,S -XR chest and abdomen ,4169275,S -IR PICC line insertion ,4322380,S -24h holter monitor ,4140473,S -US thorax and pleural cavity ,4329508,S -US doppler lower limb veins both ,4335392,S -Epicardial echocardiogram ,4203365,S -US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825,S -IR tunnelled central venous line insertion ,40482732,S -US doppler jugular vein both ,40489841,S -Cardiopulmonary exercise test (CPET) ,40492338,S -Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431,S -IR tunnelled central venous line removal ,42873079,S -US abdomen and pelvis/ US abdomen ,4261497,S -EEG routine portable ,4205144,S -EEG routine ,4181917,S -XR abdomen ,4264477,S -24h holter monitor ,45764527,S -Event monitor ,45765560,S -CT thorax with contrast ,4327032,S -US doppler groin both ,35622931,S -US doppler ,35622931,S -US vocal cord ,44813863,S -IR bronchogram ,4312208,S -Pacemaker/ICD device check - remote patient initiated ,4235141,S -Pacemaker/ICD device check - remote device initiated ,4235141,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +4019824,Transesophageal echocardiography,Procedure,SNOMED,Procedure,S,105376000,20020131,20991231,NA,US transoesophageal echocardiogram (toe) +4032404,Bronchoscopy,Procedure,SNOMED,Procedure,S,10847001,20020131,20991231,NA,IR bronchoscopy +4065416,Exercise tolerance test,Procedure,SNOMED,Procedure,S,165079009,20020131,20991231,NA,Exercise test (non-CPET) +4345925,Videofluoroscopy swallow,Procedure,SNOMED,Procedure,S,241149003,20020131,20991231,NA,FL video swallow +4083106,US scan of head,Procedure,SNOMED,Procedure,S,241449005,20020131,20991231,NA,US cranial contents +4083108,US scan of neck,Procedure,SNOMED,Procedure,S,241453007,20020131,20991231,NA,US neck +4082979,MRI of head,Procedure,SNOMED,Procedure,S,241601008,20020131,20991231,NA,MRI head +4093436,Ultrasonography of thorax,Procedure,SNOMED,Procedure,S,25850001,20020131,20991231,NA,US thorax and pleural cavity +4125350,CT of head,Procedure,SNOMED,Procedure,S,303653007,20020131,20991231,NA,CT head +4125530,US urinary tract,Procedure,SNOMED,Procedure,S,303917008,20020131,20991231,NA,US urinary tract +44802640,MRI study for cardiac congenital anomaly,Procedure,SNOMED,Procedure,S,322731000000101,20080401,20991231,NA,MRI cardiac complex congenital +4163872,Plain chest X-ray,Procedure,SNOMED,Procedure,S,399208008,20030731,20991231,NA,XR chest +4167029,Ultrasonography of inguinal region,Procedure,SNOMED,Procedure,S,418105000,20060131,20991231,NA,US doppler groin both +4167052,Doppler ultrasonography of kidney,Procedure,SNOMED,Procedure,S,418354002,20060131,20991231,NA,US doppler renal both +4305221,US scan of abdomen and pelvis,Procedure,SNOMED,Procedure,S,418394000,20060131,20991231,NA,US abdomen and pelvis/ US abdomen +4303522,US scan of diaphragm,Procedure,SNOMED,Procedure,S,418889006,20060131,20991231,NA,US diaphragmatic region +4306317,CT angiography of coronary artery with contrast,Procedure,SNOMED,Procedure,S,419545005,20060131,20991231,NA,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast +4169275,X-ray of chest and abdomen,Procedure,SNOMED,Procedure,S,420233006,20060131,20991231,NA,XR chest and abdomen +4322380,Insertion of peripherally inserted central catheter,Procedure,SNOMED,Procedure,S,425196008,20070131,20991231,NA,IR PICC line insertion +4140473,Holter extended electrocardiographic recording,Procedure,SNOMED,Procedure,S,427047002,20070731,20991231,NA,24h holter monitor +4329508,Ultrasonography of pleural cavity,Procedure,SNOMED,Procedure,S,431757007,20080731,20991231,NA,US thorax and pleural cavity +4335392,Doppler ultrasonography of vein of lower limb,Procedure,SNOMED,Procedure,S,432336004,20080731,20991231,NA,US doppler lower limb veins both +4203365,Epicardial echocardiography,Procedure,SNOMED,Procedure,S,433232009,20080731,20991231,NA,Epicardial echocardiogram +4335825,Transthoracic echocardiography,Procedure,SNOMED,Procedure,S,433236007,20080731,20991231,NA,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) +40482732,Insertion of tunneled venous catheter,Procedure,SNOMED,Procedure,S,442309004,20090731,20991231,NA,IR tunnelled central venous line insertion +40489841,Doppler ultrasonography of jugular vein,Procedure,SNOMED,Procedure,S,446849004,20110131,20991231,NA,US doppler jugular vein both +40492338,Cardiopulmonary exercise test,Procedure,SNOMED,Procedure,S,447346005,20110131,20991231,NA,Cardiopulmonary exercise test (CPET) +40488431,Interrogation of cardiac pacemaker,Procedure,SNOMED,Procedure,S,448150008,20110731,20991231,NA,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) +42873079,Removal of tunneled central venous catheter,Procedure,SNOMED,Procedure,S,450330005,20120731,20991231,NA,IR tunnelled central venous line removal +4261497,Ultrasonography of abdomen,Procedure,SNOMED,Procedure,S,45036003,20020131,20991231,NA,US abdomen and pelvis/ US abdomen +4205144,Portable electroencephalogram,Procedure,SNOMED,Procedure,S,54061003,20020131,20991231,NA,EEG routine portable +4181917,Electroencephalogram,Procedure,SNOMED,Procedure,S,54550000,20020131,20991231,NA,EEG routine +4264477,Diagnostic radiography of abdomen,Procedure,SNOMED,Procedure,S,60654006,20020131,20991231,NA,XR abdomen +45764527,Electrocardiographic Holter analyzer,Device,SNOMED,Physical Object,S,701233001,20140731,20991231,NA,24h holter monitor +45765560,Cardiovascular monitor,Device,SNOMED,Physical Object,S,702527008,20140731,20991231,NA,Event monitor +4327032,CT of thorax with contrast,Procedure,SNOMED,Procedure,S,75385009,20020131,20991231,NA,CT thorax with contrast +35622931,Doppler ultrasound,Procedure,SNOMED,Procedure,S,765172009,20180731,20991231,NA,US doppler groin both +35622931,Doppler ultrasound,Procedure,SNOMED,Procedure,S,765172009,20180731,20991231,NA,US doppler +44813863,Ultrasonography of vocal cord,Procedure,SNOMED,Procedure,S,844621000000101,20121001,20991231,NA,US vocal cord +4312208,Contrast bronchogram,Procedure,SNOMED,Procedure,S,85895003,20020131,20991231,NA,IR bronchogram +4235141,Check artificial pacemaker,Procedure,SNOMED,Procedure,S,9061001,20020131,20991231,NA,Pacemaker/ICD device check - remote patient initiated +4235141,Check artificial pacemaker,Procedure,SNOMED,Procedure,S,9061001,20020131,20991231,NA,Pacemaker/ICD device check - remote device initiated diff --git a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv index fe0a1fe9..847976b0 100644 --- a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv +++ b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv @@ -1,5 +1,5 @@ -sourceCode,concept_id,standard_concept -ICU admission (start datetime and end datetime) ,4123933,S -Total hospital admission (start datetime and end datetime) ,8715,S -HDU admission (start datetime and end datetime) ,4161811,S -Cardiology ward admission (start datetime and end datetime) ,36675203,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,ICU admission (start datetime and end datetime) +8715,Hospital admission,Observation,SNOMED,Procedure,S,32485007,20020131,20991231,NA,Total hospital admission (start datetime and end datetime) +4161811,Admission to high dependency unit,Observation,SNOMED,Procedure,S,398162007,20030731,20991231,NA,HDU admission (start datetime and end datetime) +36675203,Admission to pediatric cardiology department,Observation,SNOMED,Procedure,S,771550009,20190131,20991231,NA,Cardiology ward admission (start datetime and end datetime) diff --git a/project/data/phems_variable_list/is_standard/5.12_additional.csv b/project/data/phems_variable_list/is_standard/5.12_additional.csv index 110536fb..d98f85e4 100644 --- a/project/data/phems_variable_list/is_standard/5.12_additional.csv +++ b/project/data/phems_variable_list/is_standard/5.12_additional.csv @@ -1,36 +1,36 @@ -sourceCode,concept_id,standard_concept -Outpatient appointment type (telephone/ clinic visit etc.) ,5083,S -FiO2 ,42869590,S -PaCO2 ,3027946,S -Systolic blood pressure ,3004249,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462,S -Base Excess ,4095105,S -Elective ICU admission ,4123933,S -Diagnoses ,4234469,S -Mechanical ventilation ,40493026,S -"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020,S -Pupillary reaction ,4209008,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745,S -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310,S -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319,S -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510,S -FiO2 ,8554,S -PaCO2 ,44777602,S -Systolic blood pressure ,8876,S -PaCO2 ,8876,S -Base Excess ,8753,S -"Outpatient appointments start datetime, end datetime ",9202,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +5083,Telehealth,Visit,CMS Place of Service,Visit,S,02,20160101,20991231,NA,Outpatient appointment type (telephone/ clinic visit etc.) +42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,Measurement,LOINC,Clinical Observation,S,71835-3,20120521,20991231,NA,FiO2 +3027946,Carbon dioxide [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2019-8,19700101,20991231,NA,PaCO2 +3004249,Systolic blood pressure,Measurement,LOINC,Clinical Observation,S,8480-6,19960906,20991231,NA,Systolic blood pressure +4124462,None,Meas Value,SNOMED,Qualifier Value,S,260413007,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4095105,Base deficit measurement,Measurement,SNOMED,Procedure,S,26154000,20020131,20991231,NA,Base Excess +4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,Elective ICU admission +4234469,Diagnosis,Observation,SNOMED,Observable Entity,S,439401001,20090131,20991231,NA,Diagnoses +40493026,Mechanical ventilator,Device,SNOMED,Physical Object,S,449071006,20110731,20991231,NA,Mechanical ventilation +44803020,Primary reason for admission,Observation,SNOMED,Observable Entity,S,507151000000102,20091001,20991231,NA,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure)" +4209008,Pupillary function,Observation,SNOMED,Observable Entity,S,56777005,20020131,20991231,NA,Pupillary reaction +260134,Croup,Condition,SNOMED,Disorder,S,71186008,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +432571,Malignant lymphoma,Condition,SNOMED,Disorder,S,118600007,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4029498,Seizure disorder,Condition,SNOMED,Disorder,S,128613002,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +317009,Asthma,Condition,SNOMED,Disorder,S,195967001,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +201957,Necrotizing enterocolitis in fetus OR newborn,Condition,SNOMED,Disorder,S,2707005,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +43530727,Spontaneous cerebral hemorrhage,Condition,SNOMED,Disorder,S,291571000119106,20130731,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +29783,Severe combined immunodeficiency disease,Condition,SNOMED,Disorder,S,31323000,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +321042,Cardiac arrest,Condition,SNOMED,Disorder,S,410429000,20040731,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4165112,Bronchiolitis,Condition,SNOMED,Disorder,S,4120002,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +443727,Diabetic ketoacidosis,Condition,SNOMED,Disorder,S,420422005,20060731,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +314383,Myocarditis,Condition,SNOMED,Disorder,S,50920009,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +4245975,Hepatic failure,Condition,SNOMED,Disorder,S,59927004,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +440207,Hypoplastic left heart syndrome,Condition,SNOMED,Disorder,S,62067003,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +42537745,Bone marrow transplant present,Observation,SNOMED,Clinical Finding,S,737300001,20180131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +442588,Obstructive sleep apnea syndrome,Condition,SNOMED,Disorder,S,78275009,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +4213310,Degenerative disease of the central nervous system,Condition,SNOMED,Disorder,S,80690008,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +321319,Cardiomyopathy,Condition,SNOMED,Disorder,S,85898001,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +317510,Leukemia,Condition,SNOMED,Disorder,S,93143009,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,FiO2 +44777602,kilopascal,Unit,UCUM,Unit,S,kPa,19700101,20991231,NA,PaCO2 +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,Systolic blood pressure +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,PaCO2 +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Base Excess +9202,Outpatient Visit,Visit,Visit,Visit,S,OP,19700101,20991231,NA,"Outpatient appointments start datetime, end datetime" diff --git a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv index 64c57e38..dd0af1e4 100644 --- a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv +++ b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv @@ -1,61 +1,61 @@ -sourceCode,concept_id,standard_concept -Potassium ,3005456,S -Chloride ,3018572,S -Creatinine ,3051825,S -Bicarbonate (venous) ,3027273,S -Bilirubin ,3006140,S -Glucose ,3013826,S -Phosphate ,3003458,S -Blood urea nitrogen ,3024641,S -ALT ,3006923,S -Albumin ,3024561,S -AST ,3013721,S -Bicarbonate (arterial) ,3008152,S -CRP ,3020460,S -Calcium ,3015377,S -pCO2 (arterial) ,3027946,S -pCO2 (venous) ,3021447,S -Hematocrit ,3009542,S -Magnesium ,3033836,S -pO2 (arterial) ,3027801,S -pO2 (venous) ,3024354,S -Sodium ,3019550,S -Lactate ,3047181,S -Neutrophil count ,3007670,S -INR prothrombin time ,3034426,S -Hemoglobin ,40762351,S -pH (arterial) ,37399161,S -pH (venous) ,37392672,S -Platelet count ,4267147,S -Immature WBC count ,4298431,S -Hematocrit ,8554,S -Hemoglobin ,8713,S -Albumin ,8713,S -Hemoglobin ,8636,S -Albumin ,8636,S -pCO2 (venous) ,44777602,S -Creatinine ,8840,S -CRP ,8751,S -pCO2 (venous) ,8876,S -pCO2 (arterial) ,8876,S -pO2 (venous) ,8876,S -pO2 (arterial) ,8876,S -Lactate ,8753,S -Blood urea nitrogen ,8753,S -Glucose ,8753,S -Sodium ,8753,S -Potassium ,8753,S -Magnesium ,8753,S -Chloride ,8753,S -Calcium ,8753,S -Phosphate ,8753,S -Bicarbonate (venous) ,8753,S -Bicarbonate (arterial) ,8753,S -INR prothrombin time ,8555,S -Immature WBC count ,8647,S -Neutrophil count ,8647,S -Platelet count ,8647,S -ALT ,8645,S -AST ,8645,S -Creatinine ,8749,S -Bilirubin ,8749,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +3005456,Potassium [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,6298-4,19700101,20991231,NA,Potassium +3018572,Chloride [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,2069-3,19700101,20991231,NA,Chloride +3051825,Creatinine [Mass/volume] in Blood,Measurement,LOINC,Lab Test,S,38483-4,20041020,20991231,NA,Creatinine +3027273,Bicarbonate [Moles/volume] in Venous blood,Measurement,LOINC,Lab Test,S,14627-4,19980116,20991231,NA,Bicarbonate (venous) +3006140,Bilirubin.total [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14631-6,19700101,20991231,NA,Bilirubin +3013826,Glucose [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14749-6,19980116,20991231,NA,Glucose +3003458,Phosphate [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14879-1,19980116,20991231,NA,Phosphate +3024641,Urea nitrogen [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14937-7,19980116,20991231,NA,Blood urea nitrogen +3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1742-6,19700101,20991231,NA,ALT +3024561,Albumin [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1751-7,19700101,20991231,NA,Albumin +3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1920-8,19700101,20991231,NA,AST +3008152,Bicarbonate [Moles/volume] in Arterial blood,Measurement,LOINC,Lab Test,S,1960-4,19700101,20991231,NA,Bicarbonate (arterial) +3020460,C reactive protein [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1988-5,19700101,20991231,NA,CRP +3015377,Calcium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,2000-8,19700101,20991231,NA,Calcium +3027946,Carbon dioxide [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2019-8,19700101,20991231,NA,pCO2 (arterial) +3021447,Carbon dioxide [Partial pressure] in Venous blood,Measurement,LOINC,Lab Test,S,2021-4,19700101,20991231,NA,pCO2 (venous) +3009542,Hematocrit [Volume Fraction] of Blood,Measurement,LOINC,Lab Test,S,20570-8,19700101,20991231,NA,Hematocrit +3033836,Magnesium [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,2593-2,19700101,20991231,NA,Magnesium +3027801,Oxygen [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2703-7,19700101,20991231,NA,pO2 (arterial) +3024354,Oxygen [Partial pressure] in Venous blood,Measurement,LOINC,Lab Test,S,2705-2,19700101,20991231,NA,pO2 (venous) +3019550,Sodium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,2951-2,19700101,20991231,NA,Sodium +3047181,Lactate [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,32693-4,20021014,20991231,NA,Lactate +3007670,Neutrophil Ab [Units/volume] in Serum,Measurement,LOINC,Lab Test,S,5171-4,19700101,20991231,NA,Neutrophil count +3034426,Prothrombin time (PT),Measurement,LOINC,Lab Test,S,5902-2,19700101,20991231,NA,INR prothrombin time +40762351,Hemoglobin [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,59260-0,20100329,20991231,NA,Hemoglobin +37399161,Blood arterial pH,Measurement,SNOMED,Observable Entity,S,1007061000000103,20160401,20991231,NA,pH (arterial) +37392672,Blood venous pH,Measurement,SNOMED,Observable Entity,S,1007071000000105,20160401,20991231,NA,pH (venous) +4267147,Platelet count,Measurement,SNOMED,Procedure,S,61928009,20020131,20991231,NA,Platelet count +4298431,White blood cell count,Measurement,SNOMED,Procedure,S,767002,20020131,20991231,NA,Immature WBC count +8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,Hematocrit +8713,gram per deciliter,Unit,UCUM,Unit,S,g/dL,19700101,20991231,NA,Hemoglobin +8713,gram per deciliter,Unit,UCUM,Unit,S,g/dL,19700101,20991231,NA,Albumin +8636,gram per liter,Unit,UCUM,Unit,S,g/L,19700101,20991231,NA,Hemoglobin +8636,gram per liter,Unit,UCUM,Unit,S,g/L,19700101,20991231,NA,Albumin +44777602,kilopascal,Unit,UCUM,Unit,S,kPa,19700101,20991231,NA,pCO2 (venous) +8840,milligram per deciliter,Unit,UCUM,Unit,S,mg/dL,19700101,20991231,NA,Creatinine +8751,milligram per liter,Unit,UCUM,Unit,S,mg/L,19700101,20991231,NA,CRP +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pCO2 (venous) +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pCO2 (arterial) +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pO2 (venous) +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pO2 (arterial) +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Lactate +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Blood urea nitrogen +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Glucose +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Sodium +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Potassium +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Magnesium +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Chloride +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Calcium +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Phosphate +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Bicarbonate (venous) +8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Bicarbonate (arterial) +8555,second,Unit,UCUM,Unit,S,s,19700101,20991231,NA,INR prothrombin time +8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Immature WBC count +8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Neutrophil count +8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Platelet count +8645,unit per liter,Unit,UCUM,Unit,S,[U]/L,19700101,20991231,NA,ALT +8645,unit per liter,Unit,UCUM,Unit,S,[U]/L,19700101,20991231,NA,AST +8749,micromole per liter,Unit,UCUM,Unit,S,umol/L,19700101,20991231,NA,Creatinine +8749,micromole per liter,Unit,UCUM,Unit,S,umol/L,19700101,20991231,NA,Bilirubin diff --git a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv index cd408b51..64b3cdbd 100644 --- a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv @@ -1,19 +1,13 @@ -sourceCode,concept_id,standard_concept -,437312,S -,4052536,S -LCOS - renal support (CVVH/ PD) ,4051330,S -ICU ward stay ,4123933,S -,4324124,S -Surgical injury - Reexplore for bleeding ,4295705,S -Neurological injury - seizure ,377091,S -,442019,S -Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847,S -Surgical injury - Blood Loss ,4308537,S -LCOS - Cardiac arrest ,321042,S -Neurological injury - infarction ,443454,S -Low cardiac output state (LCOS) - ECMO ,4185565,S -,4185565,S -,4185565,S -LCOS - NEC requiring treatment ,4185565,S -CVL infections ,42537043,S -Surgical injury - Chylothorax ,4306136,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +4051330,Continuous venovenous hemofiltration,Procedure,SNOMED,Procedure,S,233585000,20020131,20991231,NA,LCOS - renal support (CVVH/ PD) +4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,ICU ward stay +4295705,Exploratory incision,Procedure,SNOMED,Procedure,S,76145000,20020131,20991231,NA,Surgical injury - Reexplore for bleeding +377091,Seizure,Condition,SNOMED,Clinical Finding,S,91175000,20020131,20991231,NA,Neurological injury - seizure +439847,Intracranial hemorrhage,Condition,SNOMED,Disorder,S,1386000,20020131,20991231,NA,Neurological injury - intracranial haemmhorage/ intracranial bleeding +4308537,Injury to blood vessel during surgery,Condition,SNOMED,Disorder,S,213266005,20020131,20991231,NA,Surgical injury - Blood Loss +321042,Cardiac arrest,Condition,SNOMED,Disorder,S,410429000,20040731,20991231,NA,LCOS - Cardiac arrest +443454,Cerebral infarction,Condition,SNOMED,Disorder,S,432504007,20080731,20991231,NA,Neurological injury - infarction +4185565,Low cardiac output syndrome,Condition,SNOMED,Disorder,S,44088000,20020131,20991231,NA,Low cardiac output state (LCOS) - ECMO +4185565,Low cardiac output syndrome,Condition,SNOMED,Disorder,S,44088000,20020131,20991231,NA,LCOS - NEC requiring treatment +42537043,CLABSI - central line associated bloodstream infection,Condition,SNOMED,Disorder,S,736152001,20180131,20991231,NA,CVL infections +4306136,Chylothorax,Condition,SNOMED,Disorder,S,83035003,20020131,20991231,NA,Surgical injury - Chylothorax diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv index 51bacf26..158c7c27 100644 --- a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv @@ -1,11 +1,11 @@ -sourceCode,concept_id,standard_concept -SpO2 ,4096101,S -SBP (Systolic Blood Pressure) ,4152194, -DBP (Dyastolic Blood Pressure) ,4154790, -Age-dependent HR ,4239408, -Age-dependent RR ,4313591, -SpO2 ,8554,S -Age-dependent HR ,8483,S -Age-dependent RR ,8483,S -SBP (Systolic Blood Pressure) ,8876,S -DBP (Dyastolic Blood Pressure) ,8876,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +4096101,Measurement of oxygen saturation at periphery,Measurement,SNOMED,Procedure,S,250554003,20020131,20991231,NA,SpO2 +4152194,Systolic blood pressure,Measurement,SNOMED,Observable Entity,NA,271649006,20020131,20991231,NA,SBP (Systolic Blood Pressure) +4154790,Diastolic blood pressure,Measurement,SNOMED,Observable Entity,NA,271650006,20020131,20991231,NA,DBP (Dyastolic Blood Pressure) +4239408,Heart rate,Measurement,SNOMED,Observable Entity,NA,364075005,20020131,20991231,NA,Age-dependent HR +4313591,Respiratory rate,Measurement,SNOMED,Observable Entity,NA,86290005,20020131,20991231,NA,Age-dependent RR +8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,SpO2 +8483,counts per minute,Unit,UCUM,Unit,S,{counts}/min,19700101,20991231,NA,Age-dependent HR +8483,counts per minute,Unit,UCUM,Unit,S,{counts}/min,19700101,20991231,NA,Age-dependent RR +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,SBP (Systolic Blood Pressure) +8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,DBP (Dyastolic Blood Pressure) diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv index a5732101..51c09f11 100644 --- a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv @@ -1,9 +1,9 @@ -sourceCode,concept_id,standard_concept -Weight ,3025315,S -Extracardiac anomalies - diagnoses ,0, -Height ,607590, -Body Surface Area (BSA) - Combination of weight and height ,4201235,S -Cardiac surgeries (Interventions) ,4275564,S -Height ,8582,S -Weight ,9529,S -Body Surface Area (BSA) - Combination of weight and height ,8617,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +3025315,Body weight,Measurement,LOINC,Clinical Observation,S,29463-7,19700101,20991231,NA,Weight +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Extracardiac anomalies - diagnoses +607590,Body height,Measurement,SNOMED,Observable Entity,NA,1153637007,20210731,20991231,NA,Height +4201235,Body surface area,Measurement,SNOMED,Observable Entity,S,301898006,20020131,20991231,NA,Body Surface Area (BSA) - Combination of weight and height +4275564,Operation on heart,Procedure,SNOMED,Procedure,S,64915003,20020131,20991231,NA,Cardiac surgeries (Interventions) +8582,centimeter,Unit,UCUM,Unit,S,cm,19700101,20991231,NA,Height +9529,kilogram,Unit,UCUM,Unit,S,kg,19700101,20991231,NA,Weight +8617,square meter,Unit,UCUM,Unit,S,m2,19700101,20991231,NA,Body Surface Area (BSA) - Combination of weight and height diff --git a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv index 16aa5ffa..e9bf646e 100644 --- a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv @@ -1,9 +1,9 @@ -sourceCode,concept_id,standard_concept -Aristotle's score of surgery ,0, -"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138,S -"Cardiac bypass start datetime, end datetime ",4336464,S -Extubation event ,4150627,S -"Cross-clamping start datetime, end datetime ",4201547,S -"Surgery start datetime, end datetime ",4301351,S -STAT/EACTS score of surgery ,40490494,S -"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Aristotle's score of surgery +44790138,Induced circulatory arrest,Procedure,SNOMED,Procedure,S,232211000000108,20061002,20991231,NA,"Deep hypothermic circulatory arrest start datetime, end datetime" +4336464,Coronary artery bypass graft,Procedure,SNOMED,Procedure,S,232717009,20020131,20991231,NA,"Cardiac bypass start datetime, end datetime" +4150627,Removal of endotracheal tube,Procedure,SNOMED,Procedure,S,271280005,20020131,20991231,NA,Extubation event +4201547,Placement of arterial cross clamp,Procedure,SNOMED,Procedure,S,301880007,20020131,20991231,NA,"Cross-clamping start datetime, end datetime" +4301351,Surgical procedure,Procedure,SNOMED,Procedure,S,387713003,20030131,20991231,NA,"Surgery start datetime, end datetime" +40490494,Society of Thoracic Surgeons risk calculator,Measurement,SNOMED,Staging / Scales,S,448586003,20110731,20991231,NA,STAT/EACTS score of surgery +4272324,Cardiopulmonary bypass operation,Procedure,SNOMED,Procedure,S,63697000,20020131,20991231,NA,"Antegrade Cerebral Perfusion start datetime, end datetime" diff --git a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv index 3070895f..ab2852cb 100644 --- a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv @@ -1,11 +1,11 @@ -sourceCode,concept_id,standard_concept -ventilation ,0, -Type of vasoactive infusion ,0, -VIS score of vasoactive infusion ,0, -"Total ventilation start datetime, end datetime ",0, -Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078,S -Invasive Mechanical Ventilation LOS ,37158404,S -Non-Invasive Mechanical Ventilation LOS ,4177224,S -Admission reason ,44803020,S -"Postop central venous catheter in/start datetime, out/ end datetime ",4179206,S -"Vasoactive infusion start datetime, end datetime ",42539650,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,ventilation +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Type of vasoactive infusion +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,VIS score of vasoactive infusion +0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,"Total ventilation start datetime, end datetime" +794078,vasoactive intestinal peptide,Drug,RxNorm,Ingredient,S,1942960,20180205,20991231,NA,Dose of vasoactive infusion (rate - mcg/kg/hr) +37158404,Invasive mechanical ventilation,Procedure,SNOMED,Procedure,S,1258985005,20221130,20991231,NA,Invasive Mechanical Ventilation LOS +4177224,Non-invasive ventilation,Procedure,SNOMED,Procedure,S,428311008,20080131,20991231,NA,Non-Invasive Mechanical Ventilation LOS +44803020,Primary reason for admission,Observation,SNOMED,Observable Entity,S,507151000000102,20091001,20991231,NA,Admission reason +4179206,Central venous catheter,Device,SNOMED,Physical Object,S,52124006,20020131,20991231,NA,"Postop central venous catheter in/start datetime, out/ end datetime" +42539650,Administration of intravenous vasoactive drug,Procedure,SNOMED,Procedure,S,736765002,20180131,20991231,NA,"Vasoactive infusion start datetime, end datetime" diff --git a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv index 02216c63..cd26514d 100644 --- a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv +++ b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv @@ -1,21 +1,21 @@ -sourceCode,concept_id,standard_concept -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437,S -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860,S -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944,S -Sternum reopening (procedure undertaken) ,4044892,S -Vocal Cord Dysfunction ,4046868,S -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398,S -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940,S -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741,S -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045,S -Pneumothorax ,253796,S -Listed for heart transplantation ,609312,S -intubation ,4202832,S -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643,S -Cardiac surgeries (interventions) ,4275564,S -Tracheostomy ,44783799,S -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217,S -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155,S -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448,S -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572,S -Diaphragmatic Paralysis ,4275136,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +46234437,ivabradine,Drug,RxNorm,Ingredient,S,1649480,20150706,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" +1354860,flecainide,Drug,RxNorm,Ingredient,S,4441,19700101,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" +1309944,amiodarone,Drug,RxNorm,Ingredient,S,703,19700101,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" +4044892,Procedure on sternum,Procedure,SNOMED,Procedure,S,129198003,20020131,20991231,NA,Sternum reopening (procedure undertaken) +4046868,Vocal cord dysfunction,Condition,SNOMED,Clinical Finding,S,134290008,20020131,20991231,NA,Vocal Cord Dysfunction +4049398,Temporary cardiac pacemaker procedure,Procedure,SNOMED,Procedure,S,233175008,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4051940,Permanent cardiac pacemaker procedure,Procedure,SNOMED,Procedure,S,233182007,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4353741,Cardioversion,Procedure,SNOMED,Procedure,S,250980009,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4117045,Atrial overdrive pacing,Procedure,SNOMED,Procedure,S,287696002,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +253796,Pneumothorax,Condition,SNOMED,Disorder,S,36118008,20020131,20991231,NA,Pneumothorax +609312,Awaiting transplantation of heart,Observation,SNOMED,Context-dependent,S,374847481000119108,20210131,20991231,NA,Listed for heart transplantation +4202832,Intubation,Procedure,SNOMED,Procedure,S,52765003,20020131,20991231,NA,intubation +315643,Tachyarrhythmia,Condition,SNOMED,Disorder,S,6285003,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4275564,Operation on heart,Procedure,SNOMED,Procedure,S,64915003,20020131,20991231,NA,Cardiac surgeries (interventions) +44783799,Exteriorization of trachea,Procedure,SNOMED,Procedure,S,697984004,20140131,20991231,NA,Tracheostomy +44784217,Cardiac arrhythmia,Condition,SNOMED,Disorder,S,698247007,20140131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4068155,Atrial arrhythmia,Condition,SNOMED,Disorder,S,17366009,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4228448,Bradyarrhythmia,Condition,SNOMED,Disorder,S,421869004,20060731,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4185572,Ventricular arrhythmia,Condition,SNOMED,Disorder,S,44103008,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4275136,Paralysis of diaphragm,Condition,SNOMED,Disorder,S,64228003,20020131,20991231,NA,Diaphragmatic Paralysis diff --git a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv index e7694dc6..2e5ba0f1 100644 --- a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv +++ b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv @@ -1,8 +1,7 @@ -sourceCode,concept_id,standard_concept -vasopressin ,1507835,S -dobutamine ,1337720,S -dopamine ,1337860,S -epinephrine ,1343916,S -milrinone ,1368671,S -norepinephrin  ,1321341,S -,9688,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +1507835,vasopressin (USP),Drug,RxNorm,Ingredient,S,11149,19700101,20991231,NA,vasopressin +1337720,dobutamine,Drug,RxNorm,Ingredient,S,3616,19700101,20991231,NA,dobutamine +1337860,dopamine,Drug,RxNorm,Ingredient,S,3628,19700101,20991231,NA,dopamine +1343916,epinephrine,Drug,RxNorm,Ingredient,S,3992,19700101,20991231,NA,epinephrine +1368671,milrinone,Drug,RxNorm,Ingredient,S,52769,19700101,20991231,NA,milrinone +1321341,norepinephrine,Drug,RxNorm,Ingredient,S,7512,19700101,20991231,NA,norepinephrin diff --git a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv index 64fa1e2a..a2487e75 100644 --- a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv +++ b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv @@ -1,12 +1,12 @@ -sourceCode,concept_id,standard_concept -Vasopressin ,1507835,S -Dobutamine ,1337720,S -Dopamine ,1337860,S -Ephedrine ,1143374,S -Epinephrine ,1343916,S -Milrinone ,1368671,S -Terlipressin ,19119253,S -Isoproterenol   ,1183554,S -Levosimendan ,40173184,S -Norepinephrine,1321341,S -Phenylephrine  ,1135766,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +1507835,vasopressin (USP),Drug,RxNorm,Ingredient,S,11149,19700101,20991231,NA,Vasopressin +1337720,dobutamine,Drug,RxNorm,Ingredient,S,3616,19700101,20991231,NA,Dobutamine +1337860,dopamine,Drug,RxNorm,Ingredient,S,3628,19700101,20991231,NA,Dopamine +1143374,ephedrine,Drug,RxNorm,Ingredient,S,3966,19700101,20991231,NA,Ephedrine +1343916,epinephrine,Drug,RxNorm,Ingredient,S,3992,19700101,20991231,NA,Epinephrine +1368671,milrinone,Drug,RxNorm,Ingredient,S,52769,19700101,20991231,NA,Milrinone +19119253,terlipressin,Drug,RxNorm,Ingredient,S,57048,19700101,20991231,NA,Terlipressin +1183554,isoproterenol,Drug,RxNorm,Ingredient,S,6054,19700101,20991231,NA,Isoproterenol +40173184,levosimendan,Drug,RxNorm,Ingredient,S,73107,20100228,20991231,NA,Levosimendan +1321341,norepinephrine,Drug,RxNorm,Ingredient,S,7512,19700101,20991231,NA,Norepinephrine +1135766,phenylephrine,Drug,RxNorm,Ingredient,S,8163,19700101,20991231,NA,Phenylephrine diff --git a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv index 20cb62fc..0776db33 100644 --- a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv +++ b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv @@ -1,7 +1,7 @@ -sourceCode,concept_id,standard_concept -Monoclonal Antibodies ,21603754,C -Dexamethasone ,1518254,S -Hydrocortisone ,975125,S -Methylprednisolone ,1506270,S -Prednisolone ,1550557,S -Chemotherapy ,4273629,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +21603754,Monoclonal antibodies,Drug,ATC,ATC 4th,C,L01XC,19700101,20991231,NA,Monoclonal Antibodies +1518254,dexamethasone,Drug,RxNorm,Ingredient,S,3264,19700101,20991231,NA,Dexamethasone +975125,hydrocortisone,Drug,RxNorm,Ingredient,S,5492,19700101,20991231,NA,Hydrocortisone +1506270,methylprednisolone,Drug,RxNorm,Ingredient,S,6902,19700101,20991231,NA,Methylprednisolone +1550557,prednisolone,Drug,RxNorm,Ingredient,S,8638,19700101,20991231,NA,Prednisolone +4273629,Chemotherapy,Procedure,SNOMED,Procedure,S,367336001,20020131,20991231,NA,Chemotherapy diff --git a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv index 1b417ce0..51626b4c 100644 --- a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv +++ b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv @@ -1,51 +1,51 @@ -sourceCode,concept_id,standard_concept -Monoclonal Antibodies ,21603754,C -Trimethoprim-Sulfamethoxazole ,1836430,S -Tetracycline ,1836948,S -Tobramycin ,902722,S -Trimethoprim-Sulfamethoxazole ,1705674,S -Vancomycin ,1707687,S -Fusidic acid ,19010400,S -Gentamicin ,45892419,S -Ceftolozane-Tazovactam ,45892599,S -Ceftazidime-Avibactam ,46221507,S -Azithromycin ,1734104,S -Linezolid ,1736887,S -Cefepime ,1748975,S -Clarithromycin ,1750500,S -Cefadroxil ,1769535,S -Cefazolin ,1771162,S -Cefotaxime ,1774470,S -Ceftazidime ,1776684,S -Ceftazidime-Avibactam ,1776684,S -Cefuroxime ,1778162,S -Daptomycin ,1786617,S -Ciprofloxacin ,1797513,S -Clindamycin ,997881,S -Colistin ,901845,S -Meropenem ,1709170,S -Ertapenem ,1717963,S -Dexamethasone ,1518254,S -Piperacillin-Tazobactam ,1741122,S -Ceftolozane-Tazovactam ,1741122,S -Erythromycin ,1746940,S -Mupirocin ,951511,S -Fosfomycin ,956653,S -Amoxicillin clavulanate ,1759842,S -Hydrocortisone ,975125,S -Imipenem ,1778262,S -Teicoplanin ,19078399,S -Amikacin ,1790868,S -Methylprednisolone ,1506270,S -Amoxicillin clavulanate ,1713332,S -Amoxicillin ,1713332,S -Ampicillin ,1717327,S -Nitrofurantoin ,920293,S -Norfloxacin ,1721543,S -Oxacillin ,1724703,S -Penicillin ,1728416,S -Levofloxacin ,1742253,S -Piperacillin-Tazobactam ,1746114,S -Prednisolone ,1550557,S -Rifampicin ,1763204,S -Chemotherapy ,4273629,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +21603754,Monoclonal antibodies,Drug,ATC,ATC 4th,C,L01XC,19700101,20991231,NA,Monoclonal Antibodies +1836430,sulfamethoxazole,Drug,RxNorm,Ingredient,S,10180,19700101,20991231,NA,Trimethoprim-Sulfamethoxazole +1836948,tetracycline,Drug,RxNorm,Ingredient,S,10395,19700101,20991231,NA,Tetracycline +902722,tobramycin,Drug,RxNorm,Ingredient,S,10627,19700101,20991231,NA,Tobramycin +1705674,trimethoprim,Drug,RxNorm,Ingredient,S,10829,19700101,20991231,NA,Trimethoprim-Sulfamethoxazole +1707687,vancomycin,Drug,RxNorm,Ingredient,S,11124,19700101,20991231,NA,Vancomycin +19010400,fusidate,Drug,RxNorm,Ingredient,S,113608,20060514,20991231,NA,Fusidic acid +45892419,gentamicin,Drug,RxNorm,Ingredient,S,1596450,20150302,20991231,NA,Gentamicin +45892599,ceftolozane,Drug,RxNorm,Ingredient,S,1597609,20150302,20991231,NA,Ceftolozane-Tazovactam +46221507,avibactam,Drug,RxNorm,Ingredient,S,1603834,20150504,20991231,NA,Ceftazidime-Avibactam +1734104,azithromycin,Drug,RxNorm,Ingredient,S,18631,19700101,20991231,NA,Azithromycin +1736887,linezolid,Drug,RxNorm,Ingredient,S,190376,19700101,20991231,NA,Linezolid +1748975,cefepime,Drug,RxNorm,Ingredient,S,20481,19700101,20991231,NA,Cefepime +1750500,clarithromycin,Drug,RxNorm,Ingredient,S,21212,19700101,20991231,NA,Clarithromycin +1769535,cefadroxil,Drug,RxNorm,Ingredient,S,2177,19700101,20991231,NA,Cefadroxil +1771162,cefazolin,Drug,RxNorm,Ingredient,S,2180,19700101,20991231,NA,Cefazolin +1774470,cefotaxime,Drug,RxNorm,Ingredient,S,2186,19700101,20991231,NA,Cefotaxime +1776684,ceftazidime,Drug,RxNorm,Ingredient,S,2191,19700101,20991231,NA,Ceftazidime +1776684,ceftazidime,Drug,RxNorm,Ingredient,S,2191,19700101,20991231,NA,Ceftazidime-Avibactam +1778162,cefuroxime,Drug,RxNorm,Ingredient,S,2194,19700101,20991231,NA,Cefuroxime +1786617,daptomycin,Drug,RxNorm,Ingredient,S,22299,19700101,20991231,NA,Daptomycin +1797513,ciprofloxacin,Drug,RxNorm,Ingredient,S,2551,19700101,20991231,NA,Ciprofloxacin +997881,clindamycin,Drug,RxNorm,Ingredient,S,2582,19700101,20991231,NA,Clindamycin +901845,colistin,Drug,RxNorm,Ingredient,S,2709,19700101,20991231,NA,Colistin +1709170,meropenem,Drug,RxNorm,Ingredient,S,29561,19700101,20991231,NA,Meropenem +1717963,ertapenem,Drug,RxNorm,Ingredient,S,325642,19700101,20991231,NA,Ertapenem +1518254,dexamethasone,Drug,RxNorm,Ingredient,S,3264,19700101,20991231,NA,Dexamethasone +1741122,tazobactam,Drug,RxNorm,Ingredient,S,37617,19700101,20991231,NA,Piperacillin-Tazobactam +1741122,tazobactam,Drug,RxNorm,Ingredient,S,37617,19700101,20991231,NA,Ceftolozane-Tazovactam +1746940,erythromycin,Drug,RxNorm,Ingredient,S,4053,19700101,20991231,NA,Erythromycin +951511,mupirocin,Drug,RxNorm,Ingredient,S,42372,19700101,20991231,NA,Mupirocin +956653,fosfomycin,Drug,RxNorm,Ingredient,S,4550,19700101,20991231,NA,Fosfomycin +1759842,clavulanate,Drug,RxNorm,Ingredient,S,48203,19700101,20991231,NA,Amoxicillin clavulanate +975125,hydrocortisone,Drug,RxNorm,Ingredient,S,5492,19700101,20991231,NA,Hydrocortisone +1778262,imipenem,Drug,RxNorm,Ingredient,S,5690,19700101,20991231,NA,Imipenem +19078399,teicoplanin,Drug,RxNorm,Ingredient,S,57021,19700101,20991231,NA,Teicoplanin +1790868,amikacin,Drug,RxNorm,Ingredient,S,641,19700101,20991231,NA,Amikacin +1506270,methylprednisolone,Drug,RxNorm,Ingredient,S,6902,19700101,20991231,NA,Methylprednisolone +1713332,amoxicillin,Drug,RxNorm,Ingredient,S,723,19700101,20991231,NA,Amoxicillin clavulanate +1713332,amoxicillin,Drug,RxNorm,Ingredient,S,723,19700101,20991231,NA,Amoxicillin +1717327,ampicillin,Drug,RxNorm,Ingredient,S,733,19700101,20991231,NA,Ampicillin +920293,nitrofurantoin,Drug,RxNorm,Ingredient,S,7454,19700101,20991231,NA,Nitrofurantoin +1721543,norfloxacin,Drug,RxNorm,Ingredient,S,7517,19700101,20991231,NA,Norfloxacin +1724703,oxacillin,Drug,RxNorm,Ingredient,S,7773,19700101,20991231,NA,Oxacillin +1728416,penicillin G,Drug,RxNorm,Ingredient,S,7980,19700101,20991231,NA,Penicillin +1742253,levofloxacin,Drug,RxNorm,Ingredient,S,82122,19700101,20991231,NA,Levofloxacin +1746114,piperacillin,Drug,RxNorm,Ingredient,S,8339,19700101,20991231,NA,Piperacillin-Tazobactam +1550557,prednisolone,Drug,RxNorm,Ingredient,S,8638,19700101,20991231,NA,Prednisolone +1763204,rifampin,Drug,RxNorm,Ingredient,S,9384,19700101,20991231,NA,Rifampicin +4273629,Chemotherapy,Procedure,SNOMED,Procedure,S,367336001,20020131,20991231,NA,Chemotherapy diff --git a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv index bacfd58f..cdd03cdc 100644 --- a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv +++ b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv @@ -1,6 +1,6 @@ -sourceCode,concept_id,standard_concept -Voriconazole ,1714277,S -Isovuconazole ,35606695,S -Micafungin ,19018013,S -Andiulafungin ,19026450,S -Fluconazole ,1754994,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +1714277,voriconazole,Drug,RxNorm,Ingredient,S,121243,19700101,20991231,NA,Voriconazole +35606695,isavuconazole,Drug,RxNorm,Ingredient,S,1720882,20160502,20991231,NA,Isovuconazole +19018013,micafungin,Drug,RxNorm,Ingredient,S,325887,20051113,20991231,NA,Micafungin +19026450,anidulafungin,Drug,RxNorm,Ingredient,S,341018,20060514,20991231,NA,Andiulafungin +1754994,fluconazole,Drug,RxNorm,Ingredient,S,4450,19700101,20991231,NA,Fluconazole diff --git a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv index 3a06353f..5e9e8db7 100644 --- a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv +++ b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv @@ -1,11 +1,11 @@ -sourceCode,concept_id,standard_concept -Vancomycin-resistant ,1707687,S -Clindamycin-resistant ,997881,S -Erythromycin-resistant ,1746940,S -MRSA ,4019195,S -ESBL ,4257547,S -Drug-resistant ,37017134,S -Multidrug-resistant ,37017134,S -Clindamycin-resistant ,37017134,S -Vancomycin-resistant ,37017134,S -Erythromycin-resistant ,37017134,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +1707687,vancomycin,Drug,RxNorm,Ingredient,S,11124,19700101,20991231,NA,Vancomycin-resistant +997881,clindamycin,Drug,RxNorm,Ingredient,S,2582,19700101,20991231,NA,Clindamycin-resistant +1746940,erythromycin,Drug,RxNorm,Ingredient,S,4053,19700101,20991231,NA,Erythromycin-resistant +4019195,Methicillin resistant Staphylococcus aureus,Observation,SNOMED,Organism,S,115329001,20020131,20991231,NA,MRSA +4257547,Extended spectrum beta-lactamase producing bacteria,Observation,SNOMED,Organism,S,409799006,20040731,20991231,NA,ESBL +37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Drug-resistant +37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Multidrug-resistant +37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Clindamycin-resistant +37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Vancomycin-resistant +37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Erythromycin-resistant diff --git a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv index 0c6c63f6..0b8dc5d9 100644 --- a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv @@ -1,42 +1,42 @@ -sourceCode,concept_id,standard_concept -Application of band to pulmonary artery ,4049734,S -Unspecified repair of tetralogy of fallot ,4019929,S -Repositioning of transposed great arteries ,4019932,S -Unspecified correction of total anomalous pulmonary  venous connection ,4017751,S -Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376,S -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506,S -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950,S -Correction of persistent sinus venosus ,4020508,S -Correction of partial anomalous pulmonary venous drainage ,4018441,S -Open aortic valvotomy ,4020520,S -Repair of subaortic stenosis ,4018747,S -Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233,S -Creation of anastomosis to pulmonary artery from vena cava ,4019237,S -Other specified : repair of pulmonary artery ,4018926,S -Removal of band from pulmonary artery ,4021725,S -Other specified: plastic repair of aorta ,4019026,S -Plastic repair of aorta and end to end anastomosis of aorta ,4020812,S -Release of vascular ring of aorta ,4019028,S -Relief of left ventricular outflow tract obstruction ,44790092,S -Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857,S -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751,S -Repair of double outlet right ventricle ,4049979,S -Closure of patent ductus arteriosus NEC ,4050114,S -Extracorporeal membrane oxygenation ,4052536,S -Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415,S -Implantation of cardiac pacemaker system NEC ,4144921,S -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127,S -Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133,S -Tricuspid valve repair NEC ,4293619,S -Transposition of coronary artery NEC ,4296790,S -Open implantation of ventricular assist device ,4139214,S -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479,S -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525,S -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380,S -Unspecified repair of defect of interventricular septum ,4199899,S -Replacement of mitral valve NEC ,4203153,S -Plication of diaphragm ,4217615,S -Repair of tetralogy of fallot using transannular patch ,4308136,S -Aortic valve repair NEC ,4312194,S -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184,S -Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476,S +concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode +4049734,Banding of pulmonary artery,Procedure,SNOMED,Procedure,S,15648005,20020131,20991231,NA,Application of band to pulmonary artery +4019929,Repair of tetralogy of Fallot,Procedure,SNOMED,Procedure,S,174814003,20020131,20991231,NA,Unspecified repair of tetralogy of fallot +4019932,Arterial switch operation,Procedure,SNOMED,Procedure,S,174826008,20020131,20991231,NA,Repositioning of transposed great arteries +4017751,Repair of total anomalous pulmonary venous connection,Procedure,SNOMED,Procedure,S,174830006,20020131,20991231,NA,Unspecified correction of total anomalous pulmonary  venous connection +4020376,Closure of defect of interatrial septum using pericardial patch,Procedure,SNOMED,Procedure,S,174845004,20020131,20991231,NA,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch +4020506,Creation of valved conduit between right ventricle of heart and pulmonary artery,Procedure,SNOMED,Procedure,S,174883003,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4019950,Revision of valved cardiac conduit,Procedure,SNOMED,Procedure,S,174885005,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4020508,Repair of sinus venosus,Procedure,SNOMED,Procedure,S,174899009,20020131,20991231,NA,Correction of persistent sinus venosus +4018441,Repair of partial anomalous pulmonary venous connection,Procedure,SNOMED,Procedure,S,174900004,20020131,20991231,NA,Correction of partial anomalous pulmonary venous drainage +4020520,Open aortic valvotomy,Procedure,SNOMED,Procedure,S,174968009,20020131,20991231,NA,Open aortic valvotomy +4018747,Operations on the left ventricular outflow tract,Procedure,SNOMED,Procedure,S,174997007,20020131,20991231,NA,Repair of subaortic stenosis +4019233,Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis,Procedure,SNOMED,Procedure,S,175236000,20020131,20991231,NA,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr +4019237,Anastomosis of vena cava to pulmonary artery,Procedure,SNOMED,Procedure,S,175249005,20020131,20991231,NA,Creation of anastomosis to pulmonary artery from vena cava +4018926,Repair of pulmonary artery,Procedure,SNOMED,Procedure,S,175253007,20020131,20991231,NA,Other specified : repair of pulmonary artery +4021725,Removal of band from pulmonary artery,Procedure,SNOMED,Procedure,S,175261002,20020131,20991231,NA,Removal of band from pulmonary artery +4019026,Plastic repair of aorta,Procedure,SNOMED,Procedure,S,175337007,20020131,20991231,NA,Other specified: plastic repair of aorta +4020812,Plastic repair of aorta and end-to-end anastomosis of aorta,Procedure,SNOMED,Procedure,S,175338002,20020131,20991231,NA,Plastic repair of aorta and end to end anastomosis of aorta +4019028,Release of vascular ring of aorta,Procedure,SNOMED,Procedure,S,175341006,20020131,20991231,NA,Release of vascular ring of aorta +44790092,Relief of left ventricular outflow tract obstruction,Procedure,SNOMED,Procedure,S,223341000000109,20061002,20991231,NA,Relief of left ventricular outflow tract obstruction +44789857,Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit,Procedure,SNOMED,Procedure,S,224111000000108,20061002,20991231,NA,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit +4336751,Allotransplant of heart,Procedure,SNOMED,Procedure,S,232973007,20020131,20991231,NA,Unspecified other transplantation of heart/allotransplantation of heart NEC +4049979,Repair of double outlet right ventricle,Procedure,SNOMED,Procedure,S,233126007,20020131,20991231,NA,Repair of double outlet right ventricle +4050114,Closure of ductus arteriosus with clip,Procedure,SNOMED,Procedure,S,233199008,20020131,20991231,NA,Closure of patent ductus arteriosus NEC +4052536,Extracorporeal membrane oxygenation,Procedure,SNOMED,Procedure,S,233573008,20020131,20991231,NA,Extracorporeal membrane oxygenation +44790415,Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty,Procedure,SNOMED,Procedure,S,233601000000100,20061002,20991231,NA,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty +4144921,Implantation of cardiac pacemaker,Procedure,SNOMED,Procedure,S,307280005,20020131,20991231,NA,Implantation of cardiac pacemaker system NEC +4137127,Transplantation of heart,Procedure,SNOMED,Procedure,S,32413006,20020131,20991231,NA,Unspecified other transplantation of heart/allotransplantation of heart NEC +44793133,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt,Procedure,SNOMED,Procedure,S,378121000000101,20090401,20991231,NA,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt +4293619,Repair of tricuspid valve,Procedure,SNOMED,Procedure,S,384643000,20030131,20991231,NA,Tricuspid valve repair NEC +4296790,Transposition of coronary artery,Procedure,SNOMED,Procedure,S,384678000,20030131,20991231,NA,Transposition of coronary artery NEC +4139214,Open implantation of cardiac ventricular assist device,Procedure,SNOMED,Procedure,S,426568003,20070731,20991231,NA,Open implantation of ventricular assist device +4178479,Replacement of valved cardiac conduit,Procedure,SNOMED,Procedure,S,428893001,20080131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +40486525,Primary repair of defect of atrioventricular septum,Procedure,SNOMED,Procedure,S,447748008,20110731,20991231,NA,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum +4187380,Repair of ostium primum defect,Procedure,SNOMED,Procedure,S,47195003,20020131,20991231,NA,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum +4199899,Closure of ventricular septal defect,Procedure,SNOMED,Procedure,S,52930005,20020131,20991231,NA,Unspecified repair of defect of interventricular septum +4203153,Replacement of mitral valve,Procedure,SNOMED,Procedure,S,53059001,20020131,20991231,NA,Replacement of mitral valve NEC +4217615,Plication of diaphragm,Procedure,SNOMED,Procedure,S,81913003,20020131,20991231,NA,Plication of diaphragm +4308136,Complete repair of tetralogy of Fallot with transannular patch,Procedure,SNOMED,Procedure,S,83698002,20020131,20991231,NA,Repair of tetralogy of fallot using transannular patch +4312194,Repair of heart valve,Procedure,SNOMED,Procedure,S,85830006,20020131,20991231,NA,Aortic valve repair NEC +4339184,Replacement of pulmonary valve,Procedure,SNOMED,Procedure,S,88045004,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4232476,Repair of ventricular septal defect with prosthesis,Procedure,SNOMED,Procedure,S,89814007,20020131,20991231,NA,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum From 2ccad5bbb256e21392eafa1723395c0fa512b793 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 16:06:27 +0200 Subject: [PATCH 016/130] update isStandard.R --- project/R/isStandard.R | 174 +++++++++++++++++++++++++---------------- 1 file changed, 105 insertions(+), 69 deletions(-) diff --git a/project/R/isStandard.R b/project/R/isStandard.R index 47364749..9790d5ea 100644 --- a/project/R/isStandard.R +++ b/project/R/isStandard.R @@ -1,69 +1,105 @@ -library(readr) -library(dplyr) - -isStandard <- function(concept_table_path, data_concepts_path, save_path, write_tables = FALSE) { - # Set working directory - path <- rstudioapi::getSourceEditorContext()$path %>% - dirname() %>% - dirname() %>% - dirname() - setwd(path) - - # Read concept table - concept_table <- read_delim(concept_table_path, - delim = '\t', - col_types = cols(concept_id = col_character())) %>% - mutate(concept_id = as.character(concept_id)) %>% # Ensure concept_id is character - mutate(concept_id = tolower(trimws(concept_id))) - - # Initialize vector of non-standard (or not in vocabularies) concept ids - nonStandard <- c() - # Initialize vector of non-standard concept names - conceptNameNonStandard <- c() - # Initialize vector of source codes/terms for non-standard concepts - sourceCodeNonStandard <- c() - # Initialize vector of source tables for non-standard concepts - sourceTableNonStandard <- c() - - # Get tables - tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) - for (table_path in tables) { - table_name <- basename(table_path) - - # Read and prepare table - tb <- read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% - mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% # Replace non-breaking space with regular space - mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% - filter(!is.na(sourceCode), !is.na(concept_id)) %>% - mutate(concept_id = tolower(concept_id), - concept_id = as.character(concept_id)) - - # Join tables - joined <- inner_join(concept_table, tb, by = "concept_id") - - # Add non-standard concepts to vector - ind <- which(!(joined$standard_concept %in% c('S', 'C'))) - nonStandard <- append(nonStandard, joined$concept_id[ind]) - conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) - sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) - sourceTableNonStandard <- append(sourceTableNonStandard, - replicate(length(ind), table_name, simplify="vector")) - - # Save if not empty - if (write_tables == TRUE) { - if(nrow(joined) > 0) { - write_csv(joined, paste0(save_path, table_name)) - } else { - cat("No matches found for table:", table_name, "\n") - } - } - } - # Create table of non-standard concepts - res <- tibble::tibble( - concept_id = nonStandard, - concept_name = conceptNameNonStandard, - source_code = sourceCodeNonStandard, - source_table = sourceTableNonStandard - ) - return(res) -} +library(readr) +library(dplyr) + +isStandard <- function(concept_table_path, data_concepts_path, save_path = NULL) { + +# Filters CONCEPT.csv from Athena vocabulary download for included concepts per +# a table of source codes and provided concepts. The accepted format is CSV files with +# at least fields 'sourceCode' to store source codes or source terms and 'concept_id' +# to store concept_ids. +# These tables are read from data_concepts_path. +# +# If a save_path is provided, results are written as filtered versions of the CONCEPT +# table to the directory save_path points to; with one table for each provided table +# of concepts. It is recommended to provide one table of concepts per source table. +# If no save_path is provided, results are not saved. +# +# The function will always return a tibble of non-standard concepts +# that can be inspected in the R environment or directly printed to the console. +# +# Arguments: +# concept_table_path: +# path to CONCEPT.csv from Athena vocabulary download +# +# data_concepts_path: +# path to directory of CSVs with fields sourceCode and concept_id +# see ./project/data/phems_variable/list/*.csv for examples +# +# save_path: +# path to directory to save filtered concept table with only included concepts +# ! Can be null if write_tables = FALSE +# +# write_tables: +# Boolean toggle for whether to save the results + + + # Set working directory + path <- rstudioapi::getSourceEditorContext()$path %>% + dirname() %>% + dirname() %>% + dirname() + original_wd <- getwd() + setwd(path) + + # Read concept table + concept_table <- read_delim(concept_table_path, + delim = '\t', + col_types = cols(concept_id = col_character())) %>% + mutate(concept_id = as.character(concept_id)) %>% # Ensure concept_id is character + mutate(concept_id = tolower(trimws(concept_id))) + + # Initialize vector of non-standard (or not in vocabularies) concept ids + nonStandard <- c() + # Initialize vector of non-standard concept names + conceptNameNonStandard <- c() + # Initialize vector of source codes/terms for non-standard concepts + sourceCodeNonStandard <- c() + # Initialize vector of source tables for non-standard concepts + sourceTableNonStandard <- c() + + # Get tables + tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) + for (table_path in tables) { + table_name <- basename(table_path) + + # Read and prepare table + tb <- read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% + mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% # Replace non-breaking space with regular space + mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% + filter(!is.na(sourceCode), !is.na(concept_id)) %>% + mutate(concept_id = tolower(concept_id), + concept_id = as.character(concept_id)) + + # Join tables + joined <- inner_join(concept_table, tb, by = "concept_id") + + # Add non-standard concept info to vectors + ind <- which(!(joined$standard_concept %in% c('S', 'C'))) + nonStandard <- append(nonStandard, joined$concept_id[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) + sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) + sourceTableNonStandard <- append(sourceTableNonStandard, + replicate(length(ind), table_name, simplify="vector")) + + # Save if not empty + if (!(is.null(save_path))) { + if(nrow(joined) > 0) { + message(paste("saving file: ", table_name)) + write_csv(joined, paste0(save_path, table_name)) + } else { + message(paste("No matches found for table:", table_name, "\n")) + } + } + } + # Create table of non-standard concepts + res <- tibble::tibble( + concept_id = nonStandard, + concept_name = conceptNameNonStandard, + source_code = sourceCodeNonStandard, + source_table = sourceTableNonStandard + ) + + # reset working directory + setwd(original_wd) + return(res) +} From 95c026cc8605f8a384a0bc733df210989622ffa6 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 16:07:00 +0200 Subject: [PATCH 017/130] update main code --- project/R/cohortCapr.R | 599 ++++++++++++++++----------------- project/R/cohortCapr_md.Rmd | 653 +++++++++++++++++------------------- 2 files changed, 597 insertions(+), 655 deletions(-) diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R index d362050d..7c8dcbb2 100644 --- a/project/R/cohortCapr.R +++ b/project/R/cohortCapr.R @@ -1,314 +1,285 @@ -## ----setup, include=FALSE--------------------------------------------------------------- -## knitr -knitr::opts_chunk$set(echo = TRUE) - - -## ----activate renv, include=FALSE------------------------------------------------------- -## R environment activation -# Get renv library -if (!require(renv)) { - install.packages("renv@v1.0.7") -} -# Get project path -path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) -if (!("renv" %in% list.files(path))) { - stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") -} - -## Activate renv -# renv::activate(path) - - -## ----housekeeping, echo=FALSE----------------------------------------------------------- -## housekeeping -# libraries -library(devtools) -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connection details Eunomia, eval=TRUE, include=TRUE-------------------------------- -## Eunomia GI bleed data set -connectionDetails <- Eunomia::getEunomiaConnectionDetails() - - -## ----connection details Synpuf 5%, eval=FALSE, include=FALSE---------------------------- -## ## SYNPUF 5% (local) -## # Create a new SQLite database -## dbFile <- "./data/synpuf5pct.sqlite" -## -## # Create SQLite DB if it does not exist -## if (!(file.exists(dbFile))) { -## con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) -## -## # Read CSV files and write to SQLite database -## csvDir <- "./data/synpuf5pct_20180710/" -## csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) -## -## # Get cdm structure -## source("./R/cdm.R") -## -## # Read data files and write to sqlite DB -## for (csvFile in csvFiles) { -## tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) -## df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) -## DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) -## } -## -## # Close the database connection -## dbDisconnect(con) -## } else { -## connectionDetails <- -## createConnectionDetails(dbms = "sqlite", server = dbFile) -## } - - -## ----load data, messages=FALSE, echo=TRUE----------------------------------------------- -## Load data -# Connect to database -con <- connect(connectionDetails) - -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPre <- vector("list", length=length(tables)) -names(lDataFramesPre) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} - -# Disconnect -disconnect(con) - -cat("\n\nTABLES:\n ") -writeLines(tables, sep = "\n ") - - -## ----concept sets, echo=TRUE------------------------------------------------------------ -## Concept sets -source("./conceptSets.R") -# source("./connectVocabularies.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") - -# Disconnect -disconnect(con) - - -## ----count occurences, echo=TRUE-------------------------------------------------------- -## Count occurrences of each concept in data -# Get countOccurrences function -source("./countOccurrences.R") - -# Get links between tables and fields as input -source("./table_linked_to_concept_field.R") - -# count occurrences of each concept 'x' and print results; cardiac complications as example -cardiacComplicationsCounts <- - countOccurrences( - conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), - lDataFramesPre, links - ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), - lDataFramesPre, links - ) %>% print() - - -## ----Standard non-standard check-------------------------------------------------------- -source('./isStandard.R') -standard <- isStandard(conceptSets$conceptSets, lDataFramesPre$concept) -print(standard) - - -## ----Cohort definition------------------------------------------------------------------ -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients < 80 years old who have had a lab test - measurement(conceptSets$conceptSets$labTests, age(lt(80))), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include all cardiac surgeries - query = procedure(conceptSets$conceptSets$cardiacProcedures) - ) - ) - ), - exit = exit( - endStrategy = observationExit(), - censor = censoringEvents( - # exit if intubation has taken place - procedure(conceptSets$conceptSets$intubation) - ) - ) -) - - -## ----json and sql----------------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json--------------------------------------------------- -write(chJson, paste(path, "./json/cohort.json", sep="")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste("../json/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts-------------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cardiac_arrest", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "main", - cohortDatabaseSchema = "main", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----retrieve updated DB---------------------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPost <- vector("list", length=length(tables)) -names(lDataFramesPost) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} - -# Disconnect -disconnect(con) - - -cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), - "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) - - -## ----cohort filter---------------------------------------------------------------------- -cohort_df <- list() -cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - cohort_df[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids) - } else { - cohort_df[[table]] <- lDataFramesPost[[table]] - } -} - - -## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE---------------------- -## new_data <- list() -## cohort_person_ids_plus <- append(cohort_person_ids, -## # draw a random sample to make 1000 people including the cohort subjects -## sample( -## unique(lDataFramesPost$person$person_id), -## # sample size = 1k -## size = 1000 - length(cohort_person_ids) -## ) -## ) -## for (table in names(lDataFramesPost)) { -## if ("person_id" %in% names(lDataFramesPost[[table]])) { -## new_data[[table]] <- -## lDataFramesPost[[table]] %>% -## dplyr::filter(person_id %in% cohort_person_ids_plus) -## } else { -## new_data[[table]] <- lDataFramesPost[[table]] -## } -## } - - -## ----Knit to R document, include=FALSE-------------------------------------------------- -knitr::purl( - input = './cohortCapr_md.Rmd', - output = './cohortCapr.R' -) - +## ----knitr, include=FALSE--------------------------------------------------------------- +knitr::opts_chunk$set(echo = TRUE) + +knitr::purl( + input = './cohortCapr_md.Rmd', + output = './cohortCapr.R' +) + + +## ----activate renv, include=FALSE------------------------------------------------------- +## R environment activation +# Get renv library +if (!require(renv)) { + install.packages("renv@v1.0.7") +} +# Get project path +path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) +if (!("renv" %in% list.files(path))) { + stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") +} + +## Activate renv +# renv::activate(path) + + +## ----housekeeping, echo=FALSE----------------------------------------------------------- +## housekeeping +# libraries +library(devtools) +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + +## ----connection details Eunomia, eval=TRUE, include=TRUE-------------------------------- +## Eunomia GI bleed data set +connectionDetails <- Eunomia::getEunomiaConnectionDetails() + + +## ----load data, messages=FALSE, echo=TRUE----------------------------------------------- +## Load data +# Connect to database +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPre <- vector("list", length=length(tables)) +names(lDataFramesPre) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + +cat("\n\nTABLES:\n ") +writeLines(tables, sep = "\n ") + + +## ----concept sets, echo=TRUE------------------------------------------------------------ +## Concept sets +source("./conceptSets.R") +# source("./connectVocabularies.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") + +# Disconnect +disconnect(con) + + +## ----count occurences, echo=TRUE-------------------------------------------------------- +## Count occurrences of each concept in data +# Get countOccurrences function +source("./countOccurrences.R") + +# Get links between tables and fields as input +source("./table_linked_to_concept_field.R") + +# count occurrences of each concept 'x' and print results; cardiac complications as example +cardiacComplicationsCounts <- + countOccurrences( + conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + lDataFramesPre, links + ) %>% print() +labTestsCounts <- + countOccurrences( + conceptSets$concepts$labTests, c("measurement"), + lDataFramesPre, links + ) %>% print() + + +## ----Standard non-standard check-------------------------------------------------------- +source('./isStandard.R') +nonStandard <- isStandard( + concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv", + data_concepts_path = "./project/data/phems_variable_list/" + # save_path = "./project/data/phems_variable_list/is_standard/" + ) + +nonStandard + + +## ----Cohort definition------------------------------------------------------------------ +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients < 80 years old who have had a lab test + measurement(conceptSets$conceptSets$labTests, age(lt(80))), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include all cardiac surgeries + query = procedure(conceptSets$conceptSets$cardiacProcedures) + ) + ) + ), + exit = exit( + endStrategy = observationExit(), + censor = censoringEvents( + # exit if intubation has taken place + procedure(conceptSets$conceptSets$intubation) + ) + ) +) + + +## ----json and sql----------------------------------------------------------------------- +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) + + +## ----Save cohort and concept set json--------------------------------------------------- +write(chJson, paste(path, "./json/cohort.json", sep="")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste("../json/", cs, "_cs.json", sep="") + ) +} + + +## ----Create and generate cohorts-------------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cardiac_arrest", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "main", + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts + + +## ----retrieve updated DB---------------------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPost <- vector("list", length=length(tables)) +names(lDataFramesPost) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + + +cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), + "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) + + +## ----cohort filter---------------------------------------------------------------------- +cohort_df <- list() +cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + cohort_df[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids) + } else { + cohort_df[[table]] <- lDataFramesPost[[table]] + } +} + + +## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE---------------------- +## new_data <- list() +## cohort_person_ids_plus <- append(cohort_person_ids, +## # draw a random sample to make 1000 people including the cohort subjects +## sample( +## unique(lDataFramesPost$person$person_id), +## # sample size = 1k +## size = 1000 - length(cohort_person_ids) +## ) +## ) +## for (table in names(lDataFramesPost)) { +## if ("person_id" %in% names(lDataFramesPost[[table]])) { +## new_data[[table]] <- +## lDataFramesPost[[table]] %>% +## dplyr::filter(person_id %in% cohort_person_ids_plus) +## } else { +## new_data[[table]] <- lDataFramesPost[[table]] +## } +## } + diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd index e1d04a9d..ed97f925 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/project/R/cohortCapr_md.Rmd @@ -1,341 +1,312 @@ ---- -title: "cohortCapr markdown" -author: "Guus @TheHyve" -date: "2024-07-01" -output: html_document ---- -## Set-up knitr -```{r setup, include=FALSE} -## knitr -knitr::opts_chunk$set(echo = TRUE) -``` - -## Activate renv -```{r activate renv, include=FALSE} -## R environment activation -# Get renv library -if (!require(renv)) { - install.packages("renv@v1.0.7") -} -# Get project path -path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) -if (!("renv" %in% list.files(path))) { - stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") -} - -## Activate renv -# renv::activate(path) -``` - -## Set-up libraries -Set up the required libraries, working directory, and connection details -```{r housekeeping, echo=FALSE} -## housekeeping -# libraries -library(devtools) -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) -``` - -Connect to database -```{r connection details Eunomia, eval=TRUE, include=TRUE} -## Eunomia GI bleed data set -connectionDetails <- Eunomia::getEunomiaConnectionDetails() -``` - -```{r connection details Synpuf 5%, eval=FALSE, include=FALSE} -## SYNPUF 5% (local) -# Create a new SQLite database -dbFile <- "./data/synpuf5pct.sqlite" - -# Create SQLite DB if it does not exist -if (!(file.exists(dbFile))) { - con <- DBI::dbConnect(RSQLite::SQLite(), dbname = dbFile) - - # Read CSV files and write to SQLite database - csvDir <- "./data/synpuf5pct_20180710/" - csvFiles <- list.files(path = csvDir, pattern = "\\.csv$", full.names = TRUE) - - # Get cdm structure - source("./R/cdm.R") - - # Read data files and write to sqlite DB - for (csvFile in csvFiles) { - tableName <- gsub(csvDir, "", tools::file_path_sans_ext(basename(csvFile))) - df <- readr::read_tsv(csvFile, col_names = cdm[[tableName]]) - DBI::dbWriteTable(con, tableName, df, overwrite = TRUE, row.names = FALSE) - } - - # Close the database connection - dbDisconnect(con) -} else { - connectionDetails <- - createConnectionDetails(dbms = "sqlite", server = dbFile) -} -``` - -## Load data set -Use dbConnector library to specified DB and retrieve the GI bleed (default) dataset. -Load this data into a dataframe as well for inspection -```{r load data, messages=FALSE, echo=TRUE} -## Load data -# Connect to database -con <- connect(connectionDetails) - -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPre <- vector("list", length=length(tables)) -names(lDataFramesPre) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} - -# Disconnect -disconnect(con) - -cat("\n\nTABLES:\n ") -writeLines(tables, sep = "\n ") -``` - -## Concept sets -Define a measurement concept set using Capr and include all descendants -```{r concept sets, echo=TRUE} -## Concept sets -source("./conceptSets.R") -# source("./connectVocabularies.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") - -# Disconnect -disconnect(con) -``` - -## Included and excluded concepts -Retrieve concepts that have been included/excluded (does not capture descendants) -```{r count occurences, echo=TRUE} -## Count occurrences of each concept in data -# Get countOccurrences function -source("./countOccurrences.R") - -# Get links between tables and fields as input -source("./table_linked_to_concept_field.R") - -# count occurrences of each concept 'x' and print results; cardiac complications as example -cardiacComplicationsCounts <- - countOccurrences( - conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), - lDataFramesPre, links - ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), - lDataFramesPre, links - ) %>% print() -``` - -## Standard and non-standard concepts -```{r Standard non-standard check} -source('./isStandard.R') -standard <- isStandard(conceptSets$conceptSets, lDataFramesPre$concept) -print(standard) -``` - -## Initial event cohort -People having any of the following: -any of the above measurements with continuous observation of 9999 days prior and 9999 days after event index data, -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients < 80 years old who have had a lab test - measurement(conceptSets$conceptSets$labTests, age(lt(80))), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include all cardiac surgeries - query = procedure(conceptSets$conceptSets$cardiacProcedures) - ) - ) - ), - exit = exit( - endStrategy = observationExit(), - censor = censoringEvents( - # exit if intubation has taken place - procedure(conceptSets$conceptSets$intubation) - ) - ) -) -``` - -## Write json expressions and sql queries -```{r json and sql} -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) -``` - -Save the cohort and concept set jsons; these can be imported into ATLAS -```{r Save cohort and concept set json} -write(chJson, paste(path, "./json/cohort.json", sep="")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste("../json/", cs, "_cs.json", sep="") - ) -} -``` - -```{r Create and generate cohorts} -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cardiac_arrest", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "main", - cohortDatabaseSchema = "main", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts -``` - -## Get updated DB after querying cohorts -```{r retrieve updated DB} -# Establish connection -con <- connect(connectionDetails) - -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPost <- vector("list", length=length(tables)) -names(lDataFramesPost) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} - -# Disconnect -disconnect(con) - - -cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), - "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) -``` - -## Filter loaded database for cohort -```{r cohort filter} -cohort_df <- list() -cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - cohort_df[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids) - } else { - cohort_df[[table]] <- lDataFramesPost[[table]] - } -} -``` - -```{r Create new dataset with 1k samples, eval=FALSE, include=FALSE} -new_data <- list() -cohort_person_ids_plus <- append(cohort_person_ids, - # draw a random sample to make 1000 people including the cohort subjects - sample( - unique(lDataFramesPost$person$person_id), - # sample size = 1k - size = 1000 - length(cohort_person_ids) - ) -) -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - new_data[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids_plus) - } else { - new_data[[table]] <- lDataFramesPost[[table]] - } -} -``` - -```{r Knit to R document, include=FALSE} -knitr::purl( - input = './cohortCapr_md.Rmd', - output = './cohortCapr.R' -) -``` \ No newline at end of file +--- +title: "cohortCapr markdown" +author: "Guus @TheHyve" +date: "2024-07-01" +output: html_document +--- +## Set-up knitr +```{r knitr, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) + +knitr::purl( + input = './cohortCapr_md.Rmd', + output = './cohortCapr.R' +) +``` + +## Activate renv +```{r activate renv, include=FALSE} +## R environment activation +# Get renv library +if (!require(renv)) { + install.packages("renv@v1.0.7") +} +# Get project path +path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) +if (!("renv" %in% list.files(path))) { + stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") +} + +## Activate renv +# renv::activate(path) +``` + +## Set-up libraries +Set up the required libraries, and working directory +```{r housekeeping, echo=FALSE} +## housekeeping +# libraries +library(devtools) +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) +``` + +##Connect to database +```{r connection details Eunomia, eval=TRUE, include=TRUE} +## Eunomia GI bleed data set +connectionDetails <- Eunomia::getEunomiaConnectionDetails() +``` + +## Load data set +Use dbConnector library to specified DB and retrieve the GI bleed (default) dataset. +Load this data into a dataframe as well for inspection +```{r load data, messages=FALSE, echo=TRUE} +## Load data +# Connect to database +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPre <- vector("list", length=length(tables)) +names(lDataFramesPre) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + +cat("\n\nTABLES:\n ") +writeLines(tables, sep = "\n ") +``` + +## Concept sets +Define a measurement concept set using Capr and include all descendants +```{r concept sets, echo=TRUE} +## Concept sets +source("./conceptSets.R") +# source("./connectVocabularies.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") + +# Disconnect +disconnect(con) +``` + +## Included and excluded concepts +Retrieve concepts that have been included/excluded (does not capture descendants) +```{r count occurences, echo=TRUE} +## Count occurrences of each concept in data +# Get countOccurrences function +source("./countOccurrences.R") + +# Get links between tables and fields as input +source("./table_linked_to_concept_field.R") + +# count occurrences of each concept 'x' and print results; cardiac complications as example +cardiacComplicationsCounts <- + countOccurrences( + conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), + lDataFramesPre, links + ) %>% print() +labTestsCounts <- + countOccurrences( + conceptSets$concepts$labTests, c("measurement"), + lDataFramesPre, links + ) %>% print() +``` + +## Standard and non-standard concepts +```{r Standard non-standard check} +source('./isStandard.R') +nonStandard <- isStandard( + concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv", + data_concepts_path = "./project/data/phems_variable_list/" + # save_path = "./project/data/phems_variable_list/is_standard/" + ) + +nonStandard +``` + +## Initial event cohort +People having any of the following: +any of the lab test measurements +limit to first/earliest occurrence of any of the above measurements (+descendants) per person +```{r Cohort definition} +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients < 80 years old who have had a lab test + measurement(conceptSets$conceptSets$labTests, age(lt(80))), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include all cardiac surgeries + query = procedure(conceptSets$conceptSets$cardiacProcedures) + ) + ) + ), + exit = exit( + endStrategy = observationExit(), + censor = censoringEvents( + # exit if intubation has taken place + procedure(conceptSets$conceptSets$intubation) + ) + ) +) +``` + +## Write json expressions and sql queries +```{r json and sql} +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) +``` + +Save the cohort and concept set jsons; these can be imported into ATLAS +```{r Save cohort and concept set json} +write(chJson, paste(path, "./json/cohort.json", sep="")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste("../json/", cs, "_cs.json", sep="") + ) +} +``` + +```{r Create and generate cohorts} +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cardiac_arrest", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "main", + cohortDatabaseSchema = "main", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "main", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts +``` + +## Get updated DB after querying cohorts +```{r retrieve updated DB} +# Establish connection +con <- connect(connectionDetails) + +# List all tables +tables <- dbListTables(con) + +# Exclude sqlite_sequence (contains table information) +tables <- tables[tables != "sqlite_sequence"] + +lDataFramesPost <- vector("list", length=length(tables)) +names(lDataFramesPost) <- tables + +# Create a data.frame for each table +for (i in seq(along=tables)) { + lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) +} + +# Disconnect +disconnect(con) + + +cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), + "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) +``` + +## Filter loaded database for cohort +```{r cohort filter} +cohort_df <- list() +cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + cohort_df[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids) + } else { + cohort_df[[table]] <- lDataFramesPost[[table]] + } +} +``` + +```{r Create new dataset with 1k samples, eval=FALSE, include=FALSE} +new_data <- list() +cohort_person_ids_plus <- append(cohort_person_ids, + # draw a random sample to make 1000 people including the cohort subjects + sample( + unique(lDataFramesPost$person$person_id), + # sample size = 1k + size = 1000 - length(cohort_person_ids) + ) +) +for (table in names(lDataFramesPost)) { + if ("person_id" %in% names(lDataFramesPost[[table]])) { + new_data[[table]] <- + lDataFramesPost[[table]] %>% + dplyr::filter(person_id %in% cohort_person_ids_plus) + } else { + new_data[[table]] <- lDataFramesPost[[table]] + } +} +``` From 9641bbcbfb21988a9785ca2cf46e1aa7de9781dc Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 16:07:13 +0200 Subject: [PATCH 018/130] knitted html update --- project/R/cohortCapr_md.html | 1478 ++++++++++++++++++---------------- 1 file changed, 771 insertions(+), 707 deletions(-) diff --git a/project/R/cohortCapr_md.html b/project/R/cohortCapr_md.html index cc129f69..8b9e28a8 100644 --- a/project/R/cohortCapr_md.html +++ b/project/R/cohortCapr_md.html @@ -1,707 +1,771 @@ - - - - - - - - - - - - - - - -cohortCapr markdown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Set-up

-

Set up the required libraries, working directory, and connection -details

-
## Loading required package: devtools
-
## Warning: package 'devtools' was built under R version 4.4.1
-
## Loading required package: usethis
-
## Warning: package 'usethis' was built under R version 4.4.1
-
## Loading required package: RSQLite
-
## Warning: package 'RSQLite' was built under R version 4.4.1
-
## Loading required package: tibble
-
## Loading required package: CohortGenerator
-
## Loading required package: DatabaseConnector
-
## Loading required package: R6
-
## Loading required package: CirceR
-
## Loading required package: Capr
-
## attempting to download GiBleed
-
## attempting to extract and load: C:\Users\guusw\AppData\Local\Temp\RtmpmaCI5V/GiBleed_5.3.zip to: C:\Users\guusw\AppData\Local\Temp\RtmpmaCI5V/GiBleed_5.3.sqlite
-
-
-

Load Eunomia GI bleed dataset

-

Use dbConnector library to connect to Eunomia DB and retrieve the GI -bleed (default) dataset. Load this data into a dataframe as well for -inspection

-
# Connect to Eunomia GI bleed dataset
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# List all tables
-tables <- dbListTables(con)
-
-# Exclude sqlite_sequence (contains table information)
-tables <- tables[tables != "sqlite_sequence"]
-
-lDataFramesPre <- vector("list", length=length(tables))
-names(lDataFramesPre) <- tables
-
-# Create a data.frame for each table
-for (i in seq(along=tables)) {
-  lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
-}
-
-# Disconnect
-disconnect(con)
-
-cat("\n\nTABLES:\n  ")
-
## 
-## 
-## TABLES:
-## 
-
writeLines(tables, sep = "\n  ")
-
## attribute_definition
-##   care_site
-##   cdm_source
-##   cohort
-##   cohort_attribute
-##   cohort_definition
-##   concept
-##   concept_ancestor
-##   concept_class
-##   concept_relationship
-##   concept_synonym
-##   condition_era
-##   condition_occurrence
-##   cost
-##   death
-##   device_exposure
-##   domain
-##   dose_era
-##   drug_era
-##   drug_exposure
-##   drug_strength
-##   fact_relationship
-##   location
-##   measurement
-##   metadata
-##   note
-##   note_nlp
-##   observation
-##   observation_period
-##   payer_plan_period
-##   person
-##   procedure_occurrence
-##   provider
-##   relationship
-##   source_to_concept_map
-##   specimen
-##   visit_detail
-##   visit_occurrence
-##   vocabulary
-## 
-
-
-

Concept sets

-

Define a measurement concept set using Capr and include all -descendants

-
# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# Define list of concepts to use for concept sets
-labTestsNamed <- c(
-  "Immature WBC Count" = 4298431,  # White blood cell count
-  "Neutrophil Count concept1" = 37393856,  # Neutrophil count
-  "Neutrophil Count concept2" = 3007670,  # Neutrophil Ab [Units/volume] in Serum
-  Hemoglobin = 40762351,  # Hemoglobin [Moles/volume] in Blood
-  "Platelet Count" = 37393863,  # Platelet count
-  Hematocrit = 3009542,  # Hematocrit [Volume Fraction] of Blood
-  "INR Prothrombin Time" = 3034426,  # Prothrombin time (PT)
-  Lactate = 3047181,  # Lactate [Moles/volume] in Blood
-  Creatinine = 3051825,  # Creatinine [Mass/volume] in Blood
-  Albumin = 3024561,  # Albumin [Mass/volume] in Serum or Plasma
-  "Blood urea nitrogen" = 40762621,  # Urea nitrogen [Moles/volume] in Serum or Plasma
-  Glucose = 3013826,  # Glucose [Moles/volume] in Serum or Plasma
-  Bilirubin = 3006140,  # Bilirubin.total [Moles/volume] in Serum or Plasma
-  Sodium = 3019550,  # Sodium [Moles/volume] in Serum or Plasma
-  Potassium = 3005456,  # Potassium [Moles/volume] in Blood
-  Magnesium = 3033836,  # Magnesium [Moles/volume] in Blood
-  Chloride = 3018572,  # Chloride [Moles/volume] in Blood
-  Calcium = 3015377,  # Calcium [Moles/volume] in Serum or Plasma
-  Phosphate = 3003458,  # Phosphate [Moles/volume] in Serum or Plasma
-  CRP = 3020460,  # C reactive protein [Mass/volume] in Serum or Plasma
-  ALT = 3006923,  # Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma 
-  AST = 3013721,  # Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma 
-  "pH (venous)" = 37392672,  # Blood venous pH
-  "pH (arterial)" = 37399161,  # Blood arterial pH
-  "pCO2 (venous)" = 3021447,  # Carbon dioxide [Partial pressure] in Venous blood
-  "pCO2 (arterial)" = 3027946,  # Carbon dioxide [Partial pressure] in Arterial blood
-  "pO2 (venous)" = 3024354,  # Oxygen [Partial pressure] in Venous blood
-  "pO2 (arterial)" = 3027801,  # Oxygen [Partial pressure] in Arterial blood
-  "Bicarbonate (venous)" = 3027273,  # Bicarbonate [Moles/volume] in Venous blood
-  "Bicarbonate (arterial)" = 3008152  # Bicarbonate [Moles/volume] in Arterial blood
-)
-
-labTestsUnnamed <- unname(labTestsNamed) # Sql query breaks when using named vector to create concept set
-
-# Create concept set of lab tests including all descendants of every concept
-conceptSet <- cs(descendants(labTestsUnnamed), name = "Lab_Tests")
-
-# Load more details for INCLUDED concepts
-conceptSet <- getConceptSetDetails(conceptSet, con, "main")
-
## Warning: Input SQL has already been translated, so not translating again
-## This warning is displayed once every 8 hours.
-
# Disconnect
-disconnect(con)
-
-
-

Included and excluded concepts

-

Retrieve concepts that have been included/excluded (does not capture -descendants)

-
# Get countOccurrences function
-source(paste(path, "/R/countOccurrences.R", sep=""))
-
-# Link table names to concept_id field
-table_linked_to_concept_field <- list(
-  condition_occurrence = "condition_concept_id",
-  death = "cause_concept_id",
-  device_exposure = "device_concept_id",
-  drug_exposure = "drug_concept_id",
-  measurement = "measurement_concept_id",
-  observation = "observation_concept_id",
-  procedure_occurrence = "procedure_occurrence_concept_id",
-  specimen = "specimen_concept_id",
-  visit_occurrence = "visit_concept_id"
-)
-
-# count occurrences of each concept
-res <- countOccurrences(labTestsNamed, "measurement", lDataFramesPre, table_linked_to_concept_field)
-
-res
-
## # A tibble: 30 × 4
-##    concept_name              concept_id counts included
-##    <chr>                          <dbl>  <dbl> <lgl>   
-##  1 Hematocrit                   3009542    136 TRUE    
-##  2 Albumin                      3024561     35 TRUE    
-##  3 Sodium                       3019550     35 TRUE    
-##  4 ALT                          3006923     35 TRUE    
-##  5 AST                          3013721     35 TRUE    
-##  6 Immature WBC Count           4298431      0 FALSE   
-##  7 Neutrophil Count concept1   37393856      0 FALSE   
-##  8 Neutrophil Count concept2    3007670      0 FALSE   
-##  9 Hemoglobin                  40762351      0 FALSE   
-## 10 Platelet Count              37393863      0 FALSE   
-## # ℹ 20 more rows
-
-
-

Initial event cohort

-

People having any of the following: any of the above measurements -with continuous observation of 9999 days prior and 9999 days after event -index data, limit to first/earliest occurrence of any of the above -measurements (+descendants) per person

-
# Create cohort definition; include any patients who have had a lab test
-labTestCohort <- cohort(
-  entry = entry(
-    measurement(conceptSet, firstOccurrence()),
-    # observationWindow = continuousObservation(-9999, 9999),
-    primaryCriteriaLimit = "All"
-  ),
-  exit = exit(
-    endStrategy = observationExit()
-  )
-)
-
# Generate json for cohort
-labTestCohortJson <- labTestCohort %>%
-  toCirce() %>%
-  jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>%
-  as.character()
-
-ch <- jsonlite::fromJSON(labTestCohortJson)
-all_concept_ids <- unique(unlist(lapply(ch$ConceptSets$expression$items, function(item) item$concept$CONCEPT_ID)))
-
-# Generate cohort sql query
-sql <- CirceR::buildCohortQuery(
-  expression = CirceR::cohortExpressionFromJson(labTestCohortJson),
-  options = CirceR::createGenerateOptions(generateStats = FALSE)
-)
-
write(labTestCohortJson, paste(path, "/lab_test_cohort.json", sep=""))
-
# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# Cohorts to create
-cohortsToCreate <- tibble::tibble(
-  cohortId = 9876,
-  cohortName = "Lab_test_Cohort",
-  sql = sql
-)
-
-# Cohort tables
-cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "Lab_test_cohort")
-CohortGenerator::createCohortTables(
-  connectionDetails = connectionDetails,
-  cohortDatabaseSchema = "main",
-  cohortTableNames = cohortTableNames,
-)
-
## Connecting using SQLite driver
-
## Creating cohort tables
-## - Created table main.Lab_test_cohort
-## - Created table main.Lab_test_cohort
-## - Created table main.Lab_test_cohort_inclusion
-## - Created table main.Lab_test_cohort_inclusion_result
-## - Created table main.Lab_test_cohort_inclusion_stats
-## - Created table main.Lab_test_cohort_summary_stats
-## - Created table main.Lab_test_cohort_censor_stats
-## Creating cohort tables took 0.44secs
-
# Generate the cohorts
-cohortsGenerated <- CohortGenerator::generateCohortSet(
-  connectionDetails = connectionDetails,
-  cdmDatabaseSchema = "main",
-  cohortDatabaseSchema = "main",
-  cohortTableNames = cohortTableNames,
-  cohortDefinitionSet = cohortsToCreate
-)
-
## Connecting using SQLite driver
-
## Initiating cluster consisting only of main thread
-## 1/1- Generating cohort: Lab_test_Cohort (id = 9876)
-##   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |=====                                                                 |   8%  |                                                                              |========                                                              |  12%  |                                                                              |===========                                                           |  15%  |                                                                              |=============                                                         |  19%  |                                                                              |================                                                      |  23%  |                                                                              |===================                                                   |  27%  |                                                                              |======================                                                |  31%  |                                                                              |========================                                              |  35%  |                                                                              |===========================                                           |  38%  |                                                                              |==============================                                        |  42%  |                                                                              |================================                                      |  46%  |                                                                              |===================================                                   |  50%  |                                                                              |======================================                                |  54%  |                                                                              |========================================                              |  58%  |                                                                              |===========================================                           |  62%  |                                                                              |==============================================                        |  65%  |                                                                              |================================================                      |  69%  |                                                                              |===================================================                   |  73%  |                                                                              |======================================================                |  77%  |                                                                              |=========================================================             |  81%  |                                                                              |===========================================================           |  85%  |                                                                              |==============================================================        |  88%  |                                                                              |=================================================================     |  92%  |                                                                              |===================================================================   |  96%  |                                                                              |======================================================================| 100%
-
## Executing SQL took 0.17 secs
-
## Generating cohort set took 0.48 secs
-
# Get cohort counts
-cohortCounts <- CohortGenerator::getCohortCounts(
-  connectionDetails = connectionDetails,
-  cohortDatabaseSchema = "main",
-  cohortTable = cohortTableNames$cohortTable
-)
-
## Connecting using SQLite driver
-
## Counting cohorts took 0.101 secs
-
# Disconnect
-disconnect(con)
-
-
-cohortCounts
-
##   cohortId cohortEntries cohortSubjects
-## 1     9876           134            134
-
-
-

Get updated DB after querying cohorts

-
# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# List all tables
-tables <- dbListTables(con)
-
-# Exclude sqlite_sequence (contains table information)
-tables <- tables[tables != "sqlite_sequence"]
-
-lDataFramesPost <- vector("list", length=length(tables))
-names(lDataFramesPost) <- tables
-
-# Create a data.frame for each table
-for (i in seq(along=tables)) {
-  lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
-}
-
-# Disconnect
-disconnect(con)
-
-
-cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), 
-    "\nNumber of persons in cohort:  ", length(unique(lDataFramesPost$lab_test_cohort$subject_id)))
-
## Number of persons in dataset:  2694 
-## Number of persons in cohort:   134
-
- - - - -
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +cohortCapr markdown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Set-up knitr

+
+
+

Activate renv

+
+
+

Set-up libraries

+

Set up the required libraries, and working directory

+
## Warning: package 'devtools' was built under R version 4.4.1
+
## Loading required package: usethis
+
## Warning: package 'usethis' was built under R version 4.4.1
+
## 
+## Attaching package: 'devtools'
+
## The following object is masked from 'package:renv':
+## 
+##     install
+
## Warning: package 'RSQLite' was built under R version 4.4.1
+
## Loading required package: R6
+

##Connect to database

+
## Eunomia GI bleed data set
+connectionDetails <- Eunomia::getEunomiaConnectionDetails()
+
## attempting to download GiBleed
+
## attempting to extract and load: C:\Users\guusw\AppData\Local\Temp\RtmpiYt1Dq/GiBleed_5.3.zip to: C:\Users\guusw\AppData\Local\Temp\RtmpiYt1Dq/GiBleed_5.3.sqlite
+
+
+

Load data set

+

Use dbConnector library to specified DB and retrieve the GI bleed +(default) dataset. Load this data into a dataframe as well for +inspection

+
## Load data
+# Connect to database
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# List all tables
+tables <- dbListTables(con)
+
+# Exclude sqlite_sequence (contains table information)
+tables <- tables[tables != "sqlite_sequence"]
+
+lDataFramesPre <- vector("list", length=length(tables))
+names(lDataFramesPre) <- tables
+
+# Create a data.frame for each table
+for (i in seq(along=tables)) {
+  lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
+}
+
+# Disconnect
+disconnect(con)
+
+cat("\n\nTABLES:\n  ")
+
## 
+## 
+## TABLES:
+## 
+
writeLines(tables, sep = "\n  ")
+
## attribute_definition
+##   care_site
+##   cdm_source
+##   cohort
+##   cohort_attribute
+##   cohort_definition
+##   concept
+##   concept_ancestor
+##   concept_class
+##   concept_relationship
+##   concept_synonym
+##   condition_era
+##   condition_occurrence
+##   cost
+##   death
+##   device_exposure
+##   domain
+##   dose_era
+##   drug_era
+##   drug_exposure
+##   drug_strength
+##   fact_relationship
+##   location
+##   measurement
+##   metadata
+##   note
+##   note_nlp
+##   observation
+##   observation_period
+##   payer_plan_period
+##   person
+##   procedure_occurrence
+##   provider
+##   relationship
+##   source_to_concept_map
+##   specimen
+##   visit_detail
+##   visit_occurrence
+##   vocabulary
+## 
+
+
+

Concept sets

+

Define a measurement concept set using Capr and include all +descendants

+
## Concept sets
+source("./conceptSets.R")
+
## Sourced concept sets
+
# source("./connectVocabularies.R")
+
+# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
conceptSets$conceptSets <- conceptSets$conceptSets %>%
+  # Add details for all concepts (excl. descendants)
+  lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main")
+
## Warning: Input SQL has already been translated, so not translating again
+## This warning is displayed once every 8 hours.
+
# Disconnect
+disconnect(con)
+
+
+

Included and excluded concepts

+

Retrieve concepts that have been included/excluded (does not capture +descendants)

+
## Count occurrences of each concept in data
+# Get countOccurrences function
+source("./countOccurrences.R")
+
+# Get links between tables and fields as input
+source("./table_linked_to_concept_field.R")
+
## Sourced links object
+
# count occurrences of each concept 'x' and print results; cardiac complications as example
+cardiacComplicationsCounts <- 
+  countOccurrences(
+    conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), 
+    lDataFramesPre, links
+  ) %>% print()
+
## # A tibble: 4 × 6
+##   concept_id count_persons count_records descendant_count_person
+##        <dbl>         <int>         <dbl>                   <int>
+## 1     321042           138           138                     138
+## 2    4324124             0             0                       0
+## 3    4051330             0             0                       0
+## 4    4185565             0             0                       0
+## # ℹ 2 more variables: descendant_count_record <dbl>, included <lgl>
+
labTestsCounts <- 
+  countOccurrences(
+    conceptSets$concepts$labTests, c("measurement"), 
+    lDataFramesPre, links
+  ) %>% print()
+
## # A tibble: 29 × 6
+##    concept_id count_persons count_records descendant_count_person
+##         <dbl>         <int>         <dbl>                   <int>
+##  1    3009542           136           137                     136
+##  2    3024561            35            35                      35
+##  3    3019550            35            35                      35
+##  4    3006923            35            35                      35
+##  5    3013721            35            35                      35
+##  6    4298431             0             0                       0
+##  7    3007670             0             0                       0
+##  8   40762351             0             0                       0
+##  9   37393863             0             0                       0
+## 10    3034426             0             0                       0
+## # ℹ 19 more rows
+## # ℹ 2 more variables: descendant_count_record <dbl>, included <lgl>
+
+
+

Standard and non-standard concepts

+
source('./isStandard.R')
+
## 
+## Attaching package: 'dplyr'
+
## The following objects are masked from 'package:stats':
+## 
+##     filter, lag
+
## The following objects are masked from 'package:base':
+## 
+##     intersect, setdiff, setequal, union
+
nonStandard <- isStandard(
+  concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv",
+  data_concepts_path = "./project/data/phems_variable_list/"
+  # save_path = "./project/data/phems_variable_list/is_standard_r/",
+  )
+
+nonStandard
+
## # A tibble: 11 × 4
+##    concept_id concept_name             source_code                  source_table
+##    <chr>      <chr>                    <chr>                        <list>      
+##  1 4152194    Systolic blood pressure  SBP (Systolic Blood Pressur… <chr [1]>   
+##  2 4154790    Diastolic blood pressure DBP (Dyastolic Blood Pressu… <chr [1]>   
+##  3 4239408    Heart rate               Age-dependent HR             <chr [1]>   
+##  4 4313591    Respiratory rate         Age-dependent RR             <chr [1]>   
+##  5 0          No matching concept      Extracardiac anomalies - di… <chr [1]>   
+##  6 607590     Body height              Height                       <chr [1]>   
+##  7 0          No matching concept      Aristotle's score of surgery <chr [1]>   
+##  8 0          No matching concept      ventilation                  <chr [1]>   
+##  9 0          No matching concept      Type of vasoactive infusion  <chr [1]>   
+## 10 0          No matching concept      VIS score of vasoactive inf… <chr [1]>   
+## 11 0          No matching concept      Total ventilation start dat… <chr [1]>
+
+
+

Initial event cohort

+

People having any of the following: any of the lab test measurements +limit to first/earliest occurrence of any of the above measurements +(+descendants) per person

+
## Cohort definition
+# Create cohort definition
+ch <- cohort(
+  entry = entry(
+    # enter patients < 80 years old who have had a lab test
+    measurement(conceptSets$conceptSets$labTests, age(lt(80))),
+    observationWindow = continuousObservation(0, 0),
+    primaryCriteriaLimit = "All"
+  ),
+  attrition = attrition(
+    withAny(
+      # include all cardiac complications
+      atLeast(
+        x = 1,
+        # include all cardiac complications represented by condition concepts
+        query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications)
+      ),
+      atLeast(
+        x = 1,
+        # include all cardiac complications represented by procedure concepts
+        query = procedure(conceptSets$conceptSets$cardiacComplications)
+      )
+    ),
+    withAny(
+      atLeast(
+        x = 1,
+        # include all cardiac surgeries
+        query = procedure(conceptSets$conceptSets$cardiacProcedures)
+      )
+    )
+  ),
+  exit = exit(
+    endStrategy = observationExit(),
+    censor = censoringEvents(
+      # exit if intubation has taken place
+      procedure(conceptSets$conceptSets$intubation)
+    )
+  )
+)
+
+
+

Write json expressions and sql queries

+
## Cohort json and sql
+# Generate json for cohort
+chJson <- ch %>%
+  toCirce() %>%
+  jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>%
+  as.character()
+
+# Generate cohort sql query
+sql <- CirceR::buildCohortQuery(
+  expression = CirceR::cohortExpressionFromJson(chJson),
+  options = CirceR::createGenerateOptions(generateStats = FALSE)
+)
+

Save the cohort and concept set jsons; these can be imported into +ATLAS

+
write(chJson, paste(path, "./json/cohort.json", sep=""))
+for (cs in names(conceptSets$conceptSets)) {
+  writeConceptSet(
+    x = conceptSets$conceptSets[[cs]],
+    path = paste("../json/", cs, "_cs.json", sep="")
+  )
+}
+
# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# Cohorts to create
+cohortsToCreate <- tibble::tibble(
+  cohortId = 9876,
+  cohortName = "cardiac_arrest",
+  sql = sql
+)
+
+# Cohort tables
+cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest")
+CohortGenerator::createCohortTables(
+  connectionDetails = connectionDetails,
+  cohortDatabaseSchema = "main",
+  cohortTableNames = cohortTableNames,
+)
+
## Connecting using SQLite driver
+
## Creating cohort tables
+## - Created table main.cardiac_arrest
+## - Created table main.cardiac_arrest
+## - Created table main.cardiac_arrest_inclusion
+## - Created table main.cardiac_arrest_inclusion_result
+## - Created table main.cardiac_arrest_inclusion_stats
+## - Created table main.cardiac_arrest_summary_stats
+## - Created table main.cardiac_arrest_censor_stats
+## Creating cohort tables took 0.06secs
+
# Generate the cohorts
+cohortsGenerated <- CohortGenerator::generateCohortSet(
+  connectionDetails = connectionDetails,
+  cdmDatabaseSchema = "main",
+  cohortDatabaseSchema = "main",
+  cohortTableNames = cohortTableNames,
+  cohortDefinitionSet = cohortsToCreate
+)
+
## Connecting using SQLite driver
+
## Initiating cluster consisting only of main thread
+## 1/1- Generating cohort: cardiac_arrest (id = 9876)
+##   |                                                                              |                                                                      |   0%  |                                                                              |==                                                                    |   3%  |                                                                              |====                                                                  |   6%  |                                                                              |======                                                                |   9%  |                                                                              |========                                                              |  11%  |                                                                              |==========                                                            |  14%  |                                                                              |============                                                          |  17%  |                                                                              |==============                                                        |  20%  |                                                                              |================                                                      |  23%  |                                                                              |==================                                                    |  26%  |                                                                              |====================                                                  |  29%  |                                                                              |======================                                                |  31%  |                                                                              |========================                                              |  34%  |                                                                              |==========================                                            |  37%  |                                                                              |============================                                          |  40%  |                                                                              |==============================                                        |  43%  |                                                                              |================================                                      |  46%  |                                                                              |==================================                                    |  49%  |                                                                              |====================================                                  |  51%  |                                                                              |======================================                                |  54%  |                                                                              |========================================                              |  57%  |                                                                              |==========================================                            |  60%  |                                                                              |============================================                          |  63%  |                                                                              |==============================================                        |  66%  |                                                                              |================================================                      |  69%  |                                                                              |==================================================                    |  71%  |                                                                              |====================================================                  |  74%  |                                                                              |======================================================                |  77%  |                                                                              |========================================================              |  80%  |                                                                              |==========================================================            |  83%  |                                                                              |============================================================          |  86%  |                                                                              |==============================================================        |  89%  |                                                                              |================================================================      |  91%  |                                                                              |==================================================================    |  94%  |                                                                              |====================================================================  |  97%  |                                                                              |======================================================================| 100%
+
## Executing SQL took 0.0956 secs
+
## Generating cohort set took 0.22 secs
+
# Get cohort counts
+cohortCounts <- CohortGenerator::getCohortCounts(
+  connectionDetails = connectionDetails,
+  cohortDatabaseSchema = "main",
+  cohortTable = cohortTableNames$cohortTable
+)
+
## Connecting using SQLite driver
+
## Counting cohorts took 0.0272 secs
+
# Disconnect
+disconnect(con)
+
+
+cohortCounts
+
## [1] cohortId       cohortEntries  cohortSubjects
+## <0 rows> (or 0-length row.names)
+
+
+

Get updated DB after querying cohorts

+
# Establish connection
+con <- connect(connectionDetails)
+
## Connecting using SQLite driver
+
# List all tables
+tables <- dbListTables(con)
+
+# Exclude sqlite_sequence (contains table information)
+tables <- tables[tables != "sqlite_sequence"]
+
+lDataFramesPost <- vector("list", length=length(tables))
+names(lDataFramesPost) <- tables
+
+# Create a data.frame for each table
+for (i in seq(along=tables)) {
+  lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
+}
+
+# Disconnect
+disconnect(con)
+
+
+cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), 
+    "\nNumber of persons in cohort:  ", length(unique(lDataFramesPost$cardiac_arrest$subject_id)))
+
## Number of persons in dataset:  2694 
+## Number of persons in cohort:   0
+
+
+

Filter loaded database for cohort

+
cohort_df <- list()
+cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id
+for (table in names(lDataFramesPost)) {
+  if ("person_id" %in% names(lDataFramesPost[[table]])) {
+    cohort_df[[table]] <- 
+      lDataFramesPost[[table]] %>%
+      dplyr::filter(person_id %in% cohort_person_ids)
+  } else {
+    cohort_df[[table]] <- lDataFramesPost[[table]]
+  }
+}
+
+ + + + +
+ + + + + + + + + + + + + + + From 731a1d9b0445c52af5f07dfd635a745dbe8488ef Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 9 Jul 2024 16:07:24 +0200 Subject: [PATCH 019/130] update cohort jsons --- project/json/cardiacComplications_cs.json | 144 +- project/json/cardiacProcedures_cs.json | 858 ++++---- project/json/cohort.json | 2326 ++++++++++----------- project/json/labTests_cs.json | 994 ++++----- 4 files changed, 2161 insertions(+), 2161 deletions(-) diff --git a/project/json/cardiacComplications_cs.json b/project/json/cardiacComplications_cs.json index 59b4df71..0d20ef0a 100644 --- a/project/json/cardiacComplications_cs.json +++ b/project/json/cardiacComplications_cs.json @@ -1,72 +1,72 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "Peritoneal dialysis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71192002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "Continuous venovenous hemofiltration", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233585000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "Low cardiac output syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "44088000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/json/cardiacProcedures_cs.json b/project/json/cardiacProcedures_cs.json index 57a14722..d8dc6abc 100644 --- a/project/json/cardiacProcedures_cs.json +++ b/project/json/cardiacProcedures_cs.json @@ -1,429 +1,429 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "Transposition of coronary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384678000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "Transplantation of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32413006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "224111000000108", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "Revision of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174885005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "Replacement of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428893001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "Replacement of pulmonary valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "88045004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "Replacement of mitral valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "53059001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "89814007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "Repair of tricuspid valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384643000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "Repair of tetralogy of Fallot", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174814003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "Repair of sinus venosus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174899009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "Repair of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175253007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174900004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "Repair of ostium primum defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47195003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "Repair of heart valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "Repair of double outlet right ventricle", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233126007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "Removal of band from pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175261002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "223341000000109", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "Release of vascular ring of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175341006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447748008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "Plication of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "81913003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175338002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "Plastic repair of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175337007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/project/json/cohort.json b/project/json/cohort.json index 61993320..7edd8ce7 100644 --- a/project/json/cohort.json +++ b/project/json/cohort.json @@ -1,1163 +1,1163 @@ -{ - "ConceptSets": [ - { - "id": 0, - "name": "labTests", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "White blood cell count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "767002", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5171-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "59260-0", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "Platelet count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1022651000000100", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "Prothrombin time - patient", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5902-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32693-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "38483-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14937-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14749-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14631-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6298-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2593-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2069-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2000-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14879-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1988-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "Blood venous pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007071000000105", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "Blood arterial pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007061000000103", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2021-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2705-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2703-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14627-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1960-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 1, - "name": "cardiacComplications", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "Peritoneal dialysis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71192002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "Continuous venovenous hemofiltration", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233585000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "Low cardiac output syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "44088000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 2, - "name": "cardiacProcedures", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "Transposition of coronary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384678000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "Transplantation of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32413006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "224111000000108", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "Revision of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174885005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "Replacement of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428893001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "Replacement of pulmonary valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "88045004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "Replacement of mitral valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "53059001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "89814007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "Repair of tricuspid valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384643000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "Repair of tetralogy of Fallot", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174814003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "Repair of sinus venosus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174899009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "Repair of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175253007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174900004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "Repair of ostium primum defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47195003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "Repair of heart valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "Repair of double outlet right ventricle", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233126007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "Removal of band from pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175261002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "223341000000109", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "Release of vascular ring of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175341006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447748008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "Plication of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "81913003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175338002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "Plastic repair of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175337007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 3, - "name": "intubation", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4202832, - "CONCEPT_NAME": "Intubation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52765003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - } - ], - "PrimaryCriteria": { - "CriteriaList": [ - { - "Measurement": { - "CodesetId": 0, - "Age": { - "Op": "lt", - "Value": 80 - } - } - } - ], - "ObservationWindow": { - "PriorDays": 0, - "PostDays": 0 - }, - "PrimaryCriteriaLimit": { - "Type": "All" - } - }, - "QualifiedLimit": { - "Type": "First" - }, - "ExpressionLimit": { - "Type": "First" - }, - "InclusionRules": [ - { - "name": "rule1", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ConditionOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - }, - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - }, - { - "name": "rule2", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 2 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - } - ], - "CensoringCriteria": [ - { - "ProcedureOccurrence": { - "CodesetId": 3 - } - } - ], - "CollapseSettings": { - "CollapseType": "ERA", - "EraPad": 0 - }, - "CensorWindow": {}, - "cdmVersionRange": ">=5.0.0" -} +{ + "ConceptSets": [ + { + "id": 0, + "name": "labTests", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 1, + "name": "cardiacComplications", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 2, + "name": "cardiacProcedures", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 3, + "name": "intubation", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4202832, + "CONCEPT_NAME": "Intubation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52765003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + } + ], + "PrimaryCriteria": { + "CriteriaList": [ + { + "Measurement": { + "CodesetId": 0, + "Age": { + "Op": "lt", + "Value": 80 + } + } + } + ], + "ObservationWindow": { + "PriorDays": 0, + "PostDays": 0 + }, + "PrimaryCriteriaLimit": { + "Type": "All" + } + }, + "QualifiedLimit": { + "Type": "First" + }, + "ExpressionLimit": { + "Type": "First" + }, + "InclusionRules": [ + { + "name": "rule1", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ConditionOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + }, + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + }, + { + "name": "rule2", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 2 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + } + ], + "CensoringCriteria": [ + { + "ProcedureOccurrence": { + "CodesetId": 3 + } + } + ], + "CollapseSettings": { + "CollapseType": "ERA", + "EraPad": 0 + }, + "CensorWindow": {}, + "cdmVersionRange": ">=5.0.0" +} diff --git a/project/json/labTests_cs.json b/project/json/labTests_cs.json index 89708e11..2d673d34 100644 --- a/project/json/labTests_cs.json +++ b/project/json/labTests_cs.json @@ -1,497 +1,497 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "White blood cell count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "767002", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5171-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "59260-0", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "Platelet count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1022651000000100", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "Prothrombin time - patient", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5902-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32693-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "38483-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14937-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14749-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14631-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6298-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2593-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2069-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2000-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14879-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1988-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "Blood venous pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007071000000105", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "Blood arterial pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007061000000103", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2021-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2705-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2703-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14627-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1960-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} From 6b122434f4d9950c7750a6382f64a9ab25c78923 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 10 Jul 2024 10:56:24 +0200 Subject: [PATCH 020/130] update gitignore --- .gitignore | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 95aa7b8f..ee78f0ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,17 @@ -.Rhistory -.Rproj.user -.DS_Store -errorReportSql.txt -*.log -/Meta/ -work/* -scratch/ -inst/doc +!.gitignore + +# Capr +.Rhistory +.Rproj.user +.DS_Store +errorReportSql.txt +*.log +/Meta/ +work/* +scratch/ +inst/doc + +# project-specific +project/config/* +!project/config/config-sample.yml +project/vocabularies/ From 32f9d96840a177fc1bfdf0f72b74ade237a6babd Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 10 Jul 2024 10:56:45 +0200 Subject: [PATCH 021/130] rename R project --- ...S-mappings-main.Rproj => PHEMS-Capr.Rproj} | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename project/{PHEMS-mappings-main.Rproj => PHEMS-Capr.Rproj} (94%) diff --git a/project/PHEMS-mappings-main.Rproj b/project/PHEMS-Capr.Rproj similarity index 94% rename from project/PHEMS-mappings-main.Rproj rename to project/PHEMS-Capr.Rproj index 8e3c2ebc..3af27f6a 100644 --- a/project/PHEMS-mappings-main.Rproj +++ b/project/PHEMS-Capr.Rproj @@ -1,13 +1,13 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX From b68613122e45063e5756e9e3d3a3ab5df3a1c42c Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 10 Jul 2024 10:57:16 +0200 Subject: [PATCH 022/130] add config --- project/config/config-sample.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 project/config/config-sample.yml diff --git a/project/config/config-sample.yml b/project/config/config-sample.yml new file mode 100644 index 00000000..5e878a75 --- /dev/null +++ b/project/config/config-sample.yml @@ -0,0 +1,14 @@ +--- +## Connection details +# Used as input to DatabaseConnector::createConnectionDetails() +# see the function documentation for more information +# Please check carefully which details are required for your dbms +# as not all of these details may be required. +connectionDetails: + dbms: 'postgresql' + user: 'postgres' + password: 'postgres' + server: 'host/database' + port: 5432 + oracleDriver: null + pathToDriver: './drivers/jdbc/' \ No newline at end of file From b5c0945ce14d8c177f5c31f4f67875f48a09528b Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:16:23 +0200 Subject: [PATCH 023/130] update variable mapping tables and standard concept check result tables --- ...e_use_diagnoses_procedures_current_eps.csv | 150 ++++++++++-------- .../phems_variable_list/5.22_vital_signs.csv | 88 ++++++++++ .../5.23_physical_examination_signs.csv | 88 ++++++++++ .../5.24_laboratory_test_results_uc2.csv | 87 ++++++++++ .../5.25_arterial_blood_gas.csv | 87 ++++++++++ .../5.26_venous_blood_gas.csv | 87 ++++++++++ .../5.28_patient_characteristics.csv | 87 ++++++++++ .../5.29_lab_measurements_uc3.csv | 86 ++++++++++ .../phems_variable_list/5.30_treatments.csv | 85 ++++++++++ .../5.31_surgery_specific_parameters.csv | 85 ++++++++++ .../is_standard/5.10_cardiac_radiology.csv | 86 +++++----- .../is_standard/5.11_cardiac_los.csv | 10 +- .../is_standard/5.12_additional.csv | 72 ++++----- .../is_standard/5.13_laboratory_tests.csv | 122 +++++++------- .../5.14_cardiac_complications.csv | 26 +-- .../is_standard/5.15_vital_signs.csv | 22 +-- .../is_standard/5.16_hsjd_clinical.csv | 18 +-- .../is_standard/5.17_hsjd_surgery.csv | 18 +-- .../is_standard/5.18_hsjd_hospitalisation.csv | 22 +-- .../is_standard/5.19_hsjd_complication.csv | 42 ++--- ...e_use_diagnoses_procedures_current_eps.csv | 88 +++++++++- .../is_standard/5.22_vital_signs.csv | 21 +++ .../5.23_physical_examination_signs.csv | 36 +++++ .../5.24_laboratory_test_results_uc2.csv | 41 +++++ .../is_standard/5.25_arterial_blood_gas.csv | 12 ++ .../is_standard/5.26_venous_blood_gas.csv | 17 ++ .../5.28_patient_characteristics.csv | 15 ++ .../is_standard/5.29_lab_measurements_uc3.csv | 37 +++++ .../is_standard/5.30_treatments.csv | 13 ++ .../5.31_surgery_specific_parameters.csv | 5 + .../is_standard/5.3_vis_score_medications.csv | 14 +- .../5.4_vasopressors_inotropes.csv | 24 +-- .../is_standard/5.5_immunosuppressants.csv | 14 +- .../is_standard/5.6_antibiotic_medication.csv | 102 ++++++------ .../is_standard/5.7_antifungals.csv | 12 +- .../is_standard/5.8_antibiotic_resistance.csv | 22 +-- .../is_standard/5.9_cardiac_surgery.csv | 84 +++++----- 37 files changed, 1507 insertions(+), 418 deletions(-) create mode 100644 project/data/phems_variable_list/5.22_vital_signs.csv create mode 100644 project/data/phems_variable_list/5.23_physical_examination_signs.csv create mode 100644 project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv create mode 100644 project/data/phems_variable_list/5.25_arterial_blood_gas.csv create mode 100644 project/data/phems_variable_list/5.26_venous_blood_gas.csv create mode 100644 project/data/phems_variable_list/5.28_patient_characteristics.csv create mode 100644 project/data/phems_variable_list/5.29_lab_measurements_uc3.csv create mode 100644 project/data/phems_variable_list/5.30_treatments.csv create mode 100644 project/data/phems_variable_list/5.31_surgery_specific_parameters.csv create mode 100644 project/data/phems_variable_list/is_standard/5.22_vital_signs.csv create mode 100644 project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv create mode 100644 project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv create mode 100644 project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv create mode 100644 project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv create mode 100644 project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv create mode 100644 project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv create mode 100644 project/data/phems_variable_list/is_standard/5.30_treatments.csv create mode 100644 project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv index a759e426..056df727 100644 --- a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -1,62 +1,88 @@ -sourceCode,concept_id -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Previous diagnosis of sepsis measure ,1340204  +Previous diagnosis of sepsis measure ,132797  +Origin (external) ,44790567  +Origin (internal) ,4294886  +Reason for admission ,44803020  +Surgical admission (non-urgent) ,4084670  +Surgical admission (urgent) ,4123946   +Non-surgical admission ,0  +Central venous catheter ,4179206  +Diagnosis of chronic condition ,443783  +Diagnosis of chronic condition ,312723  +Diagnosis of chronic condition ,201820  +Diagnosis of chronic condition ,255573  +Diagnosis of acute infection having the potential for progression to sepsis1+2 ,37174269  +Diagnosis of acute infection having the potential for progression to sepsis1+2 ,4271450  +Meningo-encephalitis ,4322814  +hepatitis ,4243475  +pneumonia ,255848  +meningitis ,435785  +bacteremia ,132736  +viremia ,133327  +UTI ,4331815  +tuberculosis ,4103588  +candidiasis ,433968  +Diagnosis of SIRS ,434821  +Diagnosis of condition producing immunodeficiency ,4140977  +Abcess ,444202  +appendicitis ,440448  +, +peritonitis ,196152  +cellulitis ,435613  +surgical site inflammation ,4300243  +injury with open wound ,444187  +renal insufficiency ,36716945  +endocarditis ,441589  +miocarditis ,314383  +necrotizing enterocolitis ,44807226  +Cancer ,443392  +cardiac arrest ,321042  +organ transplant ,4208341  +acute kidney injury ,197320  +immunodeficiency ,433740  +asplenia ,45768671  +cerebral palsy ,4134120  +rheumatoid arthritis ,80809  +sickle cell disease ,22281  +ulcerative colitis ,81893  +Crohn's disease ,201606  +Cushing's disease ,195212  +Down's syndrome ,439125  +mitochondrial disease ,81539  +nephrotic syndrome ,195314  +neutropenia ,604243  +Diagnosis of organ system dysfunction ,4080011  +Antibiotics ,4085730  +Antivirals ,4140762  +Immunosuppressors ,4314777  +Corticoids ,21602722  +Antineoplastics ,4181511  +Surgery previous to prediction time point ,4301351  +"Chest opening, chest drainage ",4074689  +Arterial blood pressure catheter ,45758028  +Peripheral IV cannulas ,4177205  +Urinary catheter ,4070667  +Nasogastric/orogastric tube ,42538045  +Endotracheal tube ,4097216  +Tracheostomy ,44783799  +Invasive ventilation ,44790095  +Non-invasive ventilation ,4177224  +FiO2 ,42869590  +FiO2 ,8554  +FiO2 ,8510  +FiO2 ,720868  +Mean Airway Pressure (MAP) ,42527086  +Mean Airway Pressure (MAP) ,44777590  +Mean Airway Pressure (MAP) ,8876  +Mean Airway Pressure (MAP) ,44777602  +Oxygenation index ,4193843  +Oxygenation index ,8529  +Oxygenation index ,0  +ECMO ,4052536  +ECMO type ,37206603  +ECMO type ,37206601  +Ventricular assist device (VAD) ,4235043  +Dialysis ,4032243  +Dialysis ,4051330  +Peritoneal dialysis ,4324124  diff --git a/project/data/phems_variable_list/5.22_vital_signs.csv b/project/data/phems_variable_list/5.22_vital_signs.csv new file mode 100644 index 00000000..d52440d9 --- /dev/null +++ b/project/data/phems_variable_list/5.22_vital_signs.csv @@ -0,0 +1,88 @@ +sourceCode,concept_id +HR ,1004025  +HR ,8483  +RR ,3024171  +RR ,8483  +Body temperature ,3020891  +Body temperature ,586323  +SBP (Systolic Blood Pressure) ,3004249  +SBP (Systolic Blood Pressure) ,8876  +DBP (Diastolic blood pressure) ,3012888  +DBP (Diastolic blood pressure) ,8876  +SpO2 ,4096101  +SpO2 ,8554  +Urine output ,3014315  +Urine output ,8587  +Urine output ,44777613  +Urine output ,33014  +Urine output ,0  +Weight ,3025315  +Weight ,9529  +Weight ,8504  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.23_physical_examination_signs.csv b/project/data/phems_variable_list/5.23_physical_examination_signs.csv new file mode 100644 index 00000000..b304ff0d --- /dev/null +++ b/project/data/phems_variable_list/5.23_physical_examination_signs.csv @@ -0,0 +1,88 @@ +sourceCode,concept_id +GCS ,3032652  +Pupillary reactivity (right) ,21490963  +Pupillary reactivity (right) ,4069590  +Pupillary reactivity (right) ,45879546  +Pupillary reactivity (right) ,45880051  +Pupillary reactivity (right) ,4188539  +Pupillary reactivity (right) ,4188540  +Pupillary reactivity (left) ,21491763  +Pupillary reactivity (left) ,4069590  +Pupillary reactivity (left) ,45879546  +Pupillary reactivity (left) ,45880051  +Pupillary reactivity (left) ,4188539  +Pupillary reactivity (left) ,4188540  +Pupillary size (right) ,3027214  +Pupillary size (right) ,8588  +Pupillary size (right) ,36310446  +Pupillary size (right) ,21499034  +Pupillary size (right) ,4116857  +Pupillary size (left) ,3021415  +Pupillary size (left) ,8588  +Pupillary size (left) ,36310446  +Pupillary size (left) ,21499034  +Pupillary size (left) ,4116857  +Capillary refill time ,3045676  +Capillary refill time ,8555  +Peripheral pulse (pressure) ,4314539  +Peripheral pulse (pressure) ,4181412  +Peripheral pulse (pressure) ,4132135  +Peripheral pulse (pressure) ,4124461  +Peripheral pulse (pressure) ,8483  +Central pulse ,4224504  +Central pulse ,4181412  +Central pulse ,4132135  +Central pulse ,4124461  +Central pulse ,8483  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv b/project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv new file mode 100644 index 00000000..70c91b9d --- /dev/null +++ b/project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv @@ -0,0 +1,87 @@ +sourceCode,concept_id +Bacterial pathogen detection ,4036356  +Name of bacterial pathogen detected ,432545  +Quantification of colonies in culture ,4299649  +Quantification of colonies in culture ,9278  +PCR panel ,4196268  +Antibiotic resistance ,44806682  +Viral pathogen detection ,440029  +PCR panel ,4196268  +Leukocytes ,4212899  +Leukocytes ,9278  +Leukocytes ,0  +Thromboplastin time ,4175016  +Thromboplastin time ,8555  +Thromboplastin time ,8523  +D-dimer ,37393605  +D-dimer ,8751  +D-dimer ,8753  +Fibrinogen ,4094436  +Fibrinogen ,8636  +Fibrinogen ,8753  +Blood urea nitrogen ,4017361  +Blood urea nitrogen ,8753  +Blood urea nitrogen ,8840  +Glucose ,3013826  +Glucose ,8753  +Glucose ,8840  +Direct bilirubin ,4118986  +Direct bilirubin ,8749  +Direct bilirubin ,8753  +Direct bilirubin ,8840  +Ionized calcium ,44789220  +Ionized calcium ,8753  +PCT ,3046279  +PCT ,8842  +PCT ,8725  +PCT ,8748  +MR-proADM ,42536081  +MR-proADM ,8736  +Interleukin-6 ,3033291  +Interleukin-6 ,8845  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.25_arterial_blood_gas.csv b/project/data/phems_variable_list/5.25_arterial_blood_gas.csv new file mode 100644 index 00000000..9db01561 --- /dev/null +++ b/project/data/phems_variable_list/5.25_arterial_blood_gas.csv @@ -0,0 +1,87 @@ +sourceCode,concept_id +pH ,3019977  +pCO2 ,3027946  +pCO2 ,44777602  +pCO2 ,8876  +PaO2 ,3027801  +PaO2 ,44777602  +PaO2 ,8876  +HCO3 ,3008152  +HCO3 ,8753  +Base excess ,3003396  +Base excess ,8753  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.26_venous_blood_gas.csv b/project/data/phems_variable_list/5.26_venous_blood_gas.csv new file mode 100644 index 00000000..610e92e9 --- /dev/null +++ b/project/data/phems_variable_list/5.26_venous_blood_gas.csv @@ -0,0 +1,87 @@ +sourceCode,concept_id, +pH ,3012544 , +pH ,3009343 , +pCO2 ,3021447 , +pCO2 ,3023024 , +pCO2 ,44777602 , +pCO2 ,8876 , +PaO2 ,3024354 , +PaO2 ,3028626 , +PaO2 ,44777602 , +PaO2 ,8876 , +HCO3 ,3027273 , +HCO3 ,3015235 , +HCO3 ,8753 , +Base excess,3002032 , +Base excess,3003129 , +Base excess,8753 , +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, diff --git a/project/data/phems_variable_list/5.28_patient_characteristics.csv b/project/data/phems_variable_list/5.28_patient_characteristics.csv new file mode 100644 index 00000000..ee0ddb64 --- /dev/null +++ b/project/data/phems_variable_list/5.28_patient_characteristics.csv @@ -0,0 +1,87 @@ +sourceCode,concept_id, +body weight ,3025315 , +body weight ,9529 , +body weight ,8504 , +height ,3036277 , +height ,8582 , +height ,9546 , +hemophilia A diagnosis ,434007 , +hemophilia A subtype/ severity ,4094223 , +hemophilia A subtype/ severity ,4140661 , +hemophilia A subtype/ severity ,4056830 , +blood group ,3003694 , +factor VIII inhibitor status ,37393608 , +factor VIII inhibitor status ,4126681 , +factor VIII inhibitor status ,9190 , +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, diff --git a/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv b/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv new file mode 100644 index 00000000..d616ed09 --- /dev/null +++ b/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv @@ -0,0 +1,86 @@ +sourceCode,concept_id, +factor VIII inhibitor titer ,3024942 , +factor VIII inhibitor titer ,44777562 , +factor VIII activity measurement ,3022520 , +factor VIII activity measurement ,3011832 , +factor VIII activity measurement ,8985 , +factor VIII activity measurement ,9332 , +factor VIII activity measurement ,8554 , +Von Willebrand factor activity measurement ,43534000 , +Von Willebrand factor activity measurement ,8985 , +Von Willebrand factor activity measurement ,9332 , +Von Willebrand factor activity measurement ,8554 , +Von Willebrand factor antigen measurement ,3002124 , +Von Willebrand factor antigen measurement ,8985 , +Von Willebrand factor antigen measurement ,9332 , +Von Willebrand factor antigen measurement ,8554 , +Von Willebrand factor propeptide measurement ,3023693 , +Von Willebrand factor propeptide measurement ,3042349 , +Von Willebrand factor propeptide measurement ,8763 , +activated partial thromboplastin time (APTT) ,4175016  , +activated partial thromboplastin time (APTT) ,8555 , +activated partial thromboplastin time (APTT) ,8523 , +Prothrombin time (PT) ,3034426 , +Prothrombin time (PT) ,8555 , +Prothrombin time (PT) ,8523 , +Prothrombin time (PT) ,8554 , +platelet count ,37393863 , +platelet count ,44777588 , +hematocrit ,3009542 , +hematocrit ,44777604 , +hematocrit ,8554, +fibrinogen ,3016407 , +fibrinogen ,8636 , +ALT ,3006923 , +ALT ,8645 , +AST ,3013721 , +AST ,8645 , +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, diff --git a/project/data/phems_variable_list/5.30_treatments.csv b/project/data/phems_variable_list/5.30_treatments.csv new file mode 100644 index 00000000..0dafecd2 --- /dev/null +++ b/project/data/phems_variable_list/5.30_treatments.csv @@ -0,0 +1,85 @@ +sourceCode,concept_id, +factor VIII  ,35766745 , +factor VIII  ,21154209 , +factor VIII  ,35831239 , +factor VIII  ,40745282 , +factor VIII  ,8985 , +factor VIII dose is continuous infusion or bolus dose ,40492862 , +factor VIII dose is continuous infusion or bolus dose ,4129275 , +factor VIII dose is continuous infusion or bolus dose ,4265597 , +desmopressin ,1517070 , +desmopressin ,9655 , +desmopressin ,8576 , +desmopressin ,9662 , +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, diff --git a/project/data/phems_variable_list/5.31_surgery_specific_parameters.csv b/project/data/phems_variable_list/5.31_surgery_specific_parameters.csv new file mode 100644 index 00000000..50ae5fb3 --- /dev/null +++ b/project/data/phems_variable_list/5.31_surgery_specific_parameters.csv @@ -0,0 +1,85 @@ +sourceCode,concept_id, +Medical/ surgical procedure ,45888085 , +NaCl administration during surgery ,967823 , +,8587 , +plasma administration during surgery ,4028665 , +datetime start anesthesia ,45888867 , +blood loss during surgery ,4308716 , +blood transfusion during surgery ,37017589 , +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, +,, diff --git a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv index c0939d39..133cfabd 100644 --- a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv +++ b/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv @@ -1,43 +1,43 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -4019824,Transesophageal echocardiography,Procedure,SNOMED,Procedure,S,105376000,20020131,20991231,NA,US transoesophageal echocardiogram (toe) -4032404,Bronchoscopy,Procedure,SNOMED,Procedure,S,10847001,20020131,20991231,NA,IR bronchoscopy -4065416,Exercise tolerance test,Procedure,SNOMED,Procedure,S,165079009,20020131,20991231,NA,Exercise test (non-CPET) -4345925,Videofluoroscopy swallow,Procedure,SNOMED,Procedure,S,241149003,20020131,20991231,NA,FL video swallow -4083106,US scan of head,Procedure,SNOMED,Procedure,S,241449005,20020131,20991231,NA,US cranial contents -4083108,US scan of neck,Procedure,SNOMED,Procedure,S,241453007,20020131,20991231,NA,US neck -4082979,MRI of head,Procedure,SNOMED,Procedure,S,241601008,20020131,20991231,NA,MRI head -4093436,Ultrasonography of thorax,Procedure,SNOMED,Procedure,S,25850001,20020131,20991231,NA,US thorax and pleural cavity -4125350,CT of head,Procedure,SNOMED,Procedure,S,303653007,20020131,20991231,NA,CT head -4125530,US urinary tract,Procedure,SNOMED,Procedure,S,303917008,20020131,20991231,NA,US urinary tract -44802640,MRI study for cardiac congenital anomaly,Procedure,SNOMED,Procedure,S,322731000000101,20080401,20991231,NA,MRI cardiac complex congenital -4163872,Plain chest X-ray,Procedure,SNOMED,Procedure,S,399208008,20030731,20991231,NA,XR chest -4167029,Ultrasonography of inguinal region,Procedure,SNOMED,Procedure,S,418105000,20060131,20991231,NA,US doppler groin both -4167052,Doppler ultrasonography of kidney,Procedure,SNOMED,Procedure,S,418354002,20060131,20991231,NA,US doppler renal both -4305221,US scan of abdomen and pelvis,Procedure,SNOMED,Procedure,S,418394000,20060131,20991231,NA,US abdomen and pelvis/ US abdomen -4303522,US scan of diaphragm,Procedure,SNOMED,Procedure,S,418889006,20060131,20991231,NA,US diaphragmatic region -4306317,CT angiography of coronary artery with contrast,Procedure,SNOMED,Procedure,S,419545005,20060131,20991231,NA,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast -4169275,X-ray of chest and abdomen,Procedure,SNOMED,Procedure,S,420233006,20060131,20991231,NA,XR chest and abdomen -4322380,Insertion of peripherally inserted central catheter,Procedure,SNOMED,Procedure,S,425196008,20070131,20991231,NA,IR PICC line insertion -4140473,Holter extended electrocardiographic recording,Procedure,SNOMED,Procedure,S,427047002,20070731,20991231,NA,24h holter monitor -4329508,Ultrasonography of pleural cavity,Procedure,SNOMED,Procedure,S,431757007,20080731,20991231,NA,US thorax and pleural cavity -4335392,Doppler ultrasonography of vein of lower limb,Procedure,SNOMED,Procedure,S,432336004,20080731,20991231,NA,US doppler lower limb veins both -4203365,Epicardial echocardiography,Procedure,SNOMED,Procedure,S,433232009,20080731,20991231,NA,Epicardial echocardiogram -4335825,Transthoracic echocardiography,Procedure,SNOMED,Procedure,S,433236007,20080731,20991231,NA,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) -40482732,Insertion of tunneled venous catheter,Procedure,SNOMED,Procedure,S,442309004,20090731,20991231,NA,IR tunnelled central venous line insertion -40489841,Doppler ultrasonography of jugular vein,Procedure,SNOMED,Procedure,S,446849004,20110131,20991231,NA,US doppler jugular vein both -40492338,Cardiopulmonary exercise test,Procedure,SNOMED,Procedure,S,447346005,20110131,20991231,NA,Cardiopulmonary exercise test (CPET) -40488431,Interrogation of cardiac pacemaker,Procedure,SNOMED,Procedure,S,448150008,20110731,20991231,NA,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) -42873079,Removal of tunneled central venous catheter,Procedure,SNOMED,Procedure,S,450330005,20120731,20991231,NA,IR tunnelled central venous line removal -4261497,Ultrasonography of abdomen,Procedure,SNOMED,Procedure,S,45036003,20020131,20991231,NA,US abdomen and pelvis/ US abdomen -4205144,Portable electroencephalogram,Procedure,SNOMED,Procedure,S,54061003,20020131,20991231,NA,EEG routine portable -4181917,Electroencephalogram,Procedure,SNOMED,Procedure,S,54550000,20020131,20991231,NA,EEG routine -4264477,Diagnostic radiography of abdomen,Procedure,SNOMED,Procedure,S,60654006,20020131,20991231,NA,XR abdomen -45764527,Electrocardiographic Holter analyzer,Device,SNOMED,Physical Object,S,701233001,20140731,20991231,NA,24h holter monitor -45765560,Cardiovascular monitor,Device,SNOMED,Physical Object,S,702527008,20140731,20991231,NA,Event monitor -4327032,CT of thorax with contrast,Procedure,SNOMED,Procedure,S,75385009,20020131,20991231,NA,CT thorax with contrast -35622931,Doppler ultrasound,Procedure,SNOMED,Procedure,S,765172009,20180731,20991231,NA,US doppler groin both -35622931,Doppler ultrasound,Procedure,SNOMED,Procedure,S,765172009,20180731,20991231,NA,US doppler -44813863,Ultrasonography of vocal cord,Procedure,SNOMED,Procedure,S,844621000000101,20121001,20991231,NA,US vocal cord -4312208,Contrast bronchogram,Procedure,SNOMED,Procedure,S,85895003,20020131,20991231,NA,IR bronchogram -4235141,Check artificial pacemaker,Procedure,SNOMED,Procedure,S,9061001,20020131,20991231,NA,Pacemaker/ICD device check - remote patient initiated -4235141,Check artificial pacemaker,Procedure,SNOMED,Procedure,S,9061001,20020131,20991231,NA,Pacemaker/ICD device check - remote device initiated +concept_id,concept_name,standard_concept,sourceCode +4019824,Transesophageal echocardiography,S,US transoesophageal echocardiogram (toe) +4032404,Bronchoscopy,S,IR bronchoscopy +4065416,Exercise tolerance test,S,Exercise test (non-CPET) +4345925,Videofluoroscopy swallow,S,FL video swallow +4083106,US scan of head,S,US cranial contents +4083108,US scan of neck,S,US neck +4082979,MRI of head,S,MRI head +4093436,Ultrasonography of thorax,S,US thorax and pleural cavity +4125350,CT of head,S,CT head +4125530,US urinary tract,S,US urinary tract +44802640,MRI study for cardiac congenital anomaly,S,MRI cardiac complex congenital +4163872,Plain chest X-ray,S,XR chest +4167029,Ultrasonography of inguinal region,S,US doppler groin both +4167052,Doppler ultrasonography of kidney,S,US doppler renal both +4305221,US scan of abdomen and pelvis,S,US abdomen and pelvis/ US abdomen +4303522,US scan of diaphragm,S,US diaphragmatic region +4306317,CT angiography of coronary artery with contrast,S,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast +4169275,X-ray of chest and abdomen,S,XR chest and abdomen +4322380,Insertion of peripherally inserted central catheter,S,IR PICC line insertion +4140473,Holter extended electrocardiographic recording,S,24h holter monitor +4329508,Ultrasonography of pleural cavity,S,US thorax and pleural cavity +4335392,Doppler ultrasonography of vein of lower limb,S,US doppler lower limb veins both +4203365,Epicardial echocardiography,S,Epicardial echocardiogram +4335825,Transthoracic echocardiography,S,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) +40482732,Insertion of tunneled venous catheter,S,IR tunnelled central venous line insertion +40489841,Doppler ultrasonography of jugular vein,S,US doppler jugular vein both +40492338,Cardiopulmonary exercise test,S,Cardiopulmonary exercise test (CPET) +40488431,Interrogation of cardiac pacemaker,S,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) +42873079,Removal of tunneled central venous catheter,S,IR tunnelled central venous line removal +4261497,Ultrasonography of abdomen,S,US abdomen and pelvis/ US abdomen +4205144,Portable electroencephalogram,S,EEG routine portable +4181917,Electroencephalogram,S,EEG routine +4264477,Diagnostic radiography of abdomen,S,XR abdomen +45764527,Electrocardiographic Holter analyzer,S,24h holter monitor +45765560,Cardiovascular monitor,S,Event monitor +4327032,CT of thorax with contrast,S,CT thorax with contrast +35622931,Doppler ultrasound,S,US doppler groin both +35622931,Doppler ultrasound,S,US doppler +44813863,Ultrasonography of vocal cord,S,US vocal cord +4312208,Contrast bronchogram,S,IR bronchogram +4235141,Check artificial pacemaker,S,Pacemaker/ICD device check - remote patient initiated +4235141,Check artificial pacemaker,S,Pacemaker/ICD device check - remote device initiated diff --git a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv index 847976b0..1c4e01ec 100644 --- a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv +++ b/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv @@ -1,5 +1,5 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,ICU admission (start datetime and end datetime) -8715,Hospital admission,Observation,SNOMED,Procedure,S,32485007,20020131,20991231,NA,Total hospital admission (start datetime and end datetime) -4161811,Admission to high dependency unit,Observation,SNOMED,Procedure,S,398162007,20030731,20991231,NA,HDU admission (start datetime and end datetime) -36675203,Admission to pediatric cardiology department,Observation,SNOMED,Procedure,S,771550009,20190131,20991231,NA,Cardiology ward admission (start datetime and end datetime) +concept_id,concept_name,standard_concept,sourceCode +4123933,Admission to pediatric intensive care unit,S,ICU admission (start datetime and end datetime) +8715,Hospital admission,S,Total hospital admission (start datetime and end datetime) +4161811,Admission to high dependency unit,S,HDU admission (start datetime and end datetime) +36675203,Admission to pediatric cardiology department,S,Cardiology ward admission (start datetime and end datetime) diff --git a/project/data/phems_variable_list/is_standard/5.12_additional.csv b/project/data/phems_variable_list/is_standard/5.12_additional.csv index d98f85e4..0948628d 100644 --- a/project/data/phems_variable_list/is_standard/5.12_additional.csv +++ b/project/data/phems_variable_list/is_standard/5.12_additional.csv @@ -1,36 +1,36 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -5083,Telehealth,Visit,CMS Place of Service,Visit,S,02,20160101,20991231,NA,Outpatient appointment type (telephone/ clinic visit etc.) -42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,Measurement,LOINC,Clinical Observation,S,71835-3,20120521,20991231,NA,FiO2 -3027946,Carbon dioxide [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2019-8,19700101,20991231,NA,PaCO2 -3004249,Systolic blood pressure,Measurement,LOINC,Clinical Observation,S,8480-6,19960906,20991231,NA,Systolic blood pressure -4124462,None,Meas Value,SNOMED,Qualifier Value,S,260413007,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4095105,Base deficit measurement,Measurement,SNOMED,Procedure,S,26154000,20020131,20991231,NA,Base Excess -4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,Elective ICU admission -4234469,Diagnosis,Observation,SNOMED,Observable Entity,S,439401001,20090131,20991231,NA,Diagnoses -40493026,Mechanical ventilator,Device,SNOMED,Physical Object,S,449071006,20110731,20991231,NA,Mechanical ventilation -44803020,Primary reason for admission,Observation,SNOMED,Observable Entity,S,507151000000102,20091001,20991231,NA,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure)" -4209008,Pupillary function,Observation,SNOMED,Observable Entity,S,56777005,20020131,20991231,NA,Pupillary reaction -260134,Croup,Condition,SNOMED,Disorder,S,71186008,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -432571,Malignant lymphoma,Condition,SNOMED,Disorder,S,118600007,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4029498,Seizure disorder,Condition,SNOMED,Disorder,S,128613002,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -317009,Asthma,Condition,SNOMED,Disorder,S,195967001,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -201957,Necrotizing enterocolitis in fetus OR newborn,Condition,SNOMED,Disorder,S,2707005,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -43530727,Spontaneous cerebral hemorrhage,Condition,SNOMED,Disorder,S,291571000119106,20130731,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -29783,Severe combined immunodeficiency disease,Condition,SNOMED,Disorder,S,31323000,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -321042,Cardiac arrest,Condition,SNOMED,Disorder,S,410429000,20040731,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4165112,Bronchiolitis,Condition,SNOMED,Disorder,S,4120002,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -443727,Diabetic ketoacidosis,Condition,SNOMED,Disorder,S,420422005,20060731,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -314383,Myocarditis,Condition,SNOMED,Disorder,S,50920009,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -4245975,Hepatic failure,Condition,SNOMED,Disorder,S,59927004,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -440207,Hypoplastic left heart syndrome,Condition,SNOMED,Disorder,S,62067003,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -42537745,Bone marrow transplant present,Observation,SNOMED,Clinical Finding,S,737300001,20180131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -442588,Obstructive sleep apnea syndrome,Condition,SNOMED,Disorder,S,78275009,20020131,20991231,NA,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -4213310,Degenerative disease of the central nervous system,Condition,SNOMED,Disorder,S,80690008,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -321319,Cardiomyopathy,Condition,SNOMED,Disorder,S,85898001,20020131,20991231,NA,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -317510,Leukemia,Condition,SNOMED,Disorder,S,93143009,20020131,20991231,NA,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,FiO2 -44777602,kilopascal,Unit,UCUM,Unit,S,kPa,19700101,20991231,NA,PaCO2 -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,Systolic blood pressure -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,PaCO2 -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Base Excess -9202,Outpatient Visit,Visit,Visit,Visit,S,OP,19700101,20991231,NA,"Outpatient appointments start datetime, end datetime" +concept_id,concept_name,standard_concept,sourceCode +4124462,None,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4095105,Base deficit measurement,S,Base Excess +4123933,Admission to pediatric intensive care unit,S,Elective ICU admission +4234469,Diagnosis,S,Diagnoses +40493026,Mechanical ventilator,S,Mechanical ventilation +44803020,Primary reason for admission,S,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure)" +4209008,Pupillary function,S,Pupillary reaction +260134,Croup,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +432571,Malignant lymphoma,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4029498,Seizure disorder,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +317009,Asthma,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +201957,Necrotizing enterocolitis in fetus OR newborn,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +43530727,Spontaneous cerebral hemorrhage,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +29783,Severe combined immunodeficiency disease,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +321042,Cardiac arrest,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +4165112,Bronchiolitis,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +443727,Diabetic ketoacidosis,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +314383,Myocarditis,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +4245975,Hepatic failure,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +440207,Hypoplastic left heart syndrome,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +42537745,Bone marrow transplant present,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +442588,Obstructive sleep apnea syndrome,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" +4213310,Degenerative disease of the central nervous system,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +321319,Cardiomyopathy,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" +317510,Leukemia,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" +44777602,kilopascal,S,PaCO2 +9202,Outpatient Visit,S,"Outpatient appointments start datetime, end datetime" +8554,percent,S,FiO2 +8876,millimeter mercury column,S,Systolic blood pressure +8876,millimeter mercury column,S,PaCO2 +8753,millimole per liter,S,Base Excess +5083,Telehealth,S,Outpatient appointment type (telephone/ clinic visit etc.) +42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,S,FiO2 +3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,PaCO2 +3004249,Systolic blood pressure,S,Systolic blood pressure diff --git a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv index dd0af1e4..b3cf6426 100644 --- a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv +++ b/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv @@ -1,61 +1,61 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -3005456,Potassium [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,6298-4,19700101,20991231,NA,Potassium -3018572,Chloride [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,2069-3,19700101,20991231,NA,Chloride -3051825,Creatinine [Mass/volume] in Blood,Measurement,LOINC,Lab Test,S,38483-4,20041020,20991231,NA,Creatinine -3027273,Bicarbonate [Moles/volume] in Venous blood,Measurement,LOINC,Lab Test,S,14627-4,19980116,20991231,NA,Bicarbonate (venous) -3006140,Bilirubin.total [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14631-6,19700101,20991231,NA,Bilirubin -3013826,Glucose [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14749-6,19980116,20991231,NA,Glucose -3003458,Phosphate [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14879-1,19980116,20991231,NA,Phosphate -3024641,Urea nitrogen [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,14937-7,19980116,20991231,NA,Blood urea nitrogen -3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1742-6,19700101,20991231,NA,ALT -3024561,Albumin [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1751-7,19700101,20991231,NA,Albumin -3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1920-8,19700101,20991231,NA,AST -3008152,Bicarbonate [Moles/volume] in Arterial blood,Measurement,LOINC,Lab Test,S,1960-4,19700101,20991231,NA,Bicarbonate (arterial) -3020460,C reactive protein [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,1988-5,19700101,20991231,NA,CRP -3015377,Calcium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,2000-8,19700101,20991231,NA,Calcium -3027946,Carbon dioxide [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2019-8,19700101,20991231,NA,pCO2 (arterial) -3021447,Carbon dioxide [Partial pressure] in Venous blood,Measurement,LOINC,Lab Test,S,2021-4,19700101,20991231,NA,pCO2 (venous) -3009542,Hematocrit [Volume Fraction] of Blood,Measurement,LOINC,Lab Test,S,20570-8,19700101,20991231,NA,Hematocrit -3033836,Magnesium [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,2593-2,19700101,20991231,NA,Magnesium -3027801,Oxygen [Partial pressure] in Arterial blood,Measurement,LOINC,Lab Test,S,2703-7,19700101,20991231,NA,pO2 (arterial) -3024354,Oxygen [Partial pressure] in Venous blood,Measurement,LOINC,Lab Test,S,2705-2,19700101,20991231,NA,pO2 (venous) -3019550,Sodium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,S,2951-2,19700101,20991231,NA,Sodium -3047181,Lactate [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,32693-4,20021014,20991231,NA,Lactate -3007670,Neutrophil Ab [Units/volume] in Serum,Measurement,LOINC,Lab Test,S,5171-4,19700101,20991231,NA,Neutrophil count -3034426,Prothrombin time (PT),Measurement,LOINC,Lab Test,S,5902-2,19700101,20991231,NA,INR prothrombin time -40762351,Hemoglobin [Moles/volume] in Blood,Measurement,LOINC,Lab Test,S,59260-0,20100329,20991231,NA,Hemoglobin -37399161,Blood arterial pH,Measurement,SNOMED,Observable Entity,S,1007061000000103,20160401,20991231,NA,pH (arterial) -37392672,Blood venous pH,Measurement,SNOMED,Observable Entity,S,1007071000000105,20160401,20991231,NA,pH (venous) -4267147,Platelet count,Measurement,SNOMED,Procedure,S,61928009,20020131,20991231,NA,Platelet count -4298431,White blood cell count,Measurement,SNOMED,Procedure,S,767002,20020131,20991231,NA,Immature WBC count -8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,Hematocrit -8713,gram per deciliter,Unit,UCUM,Unit,S,g/dL,19700101,20991231,NA,Hemoglobin -8713,gram per deciliter,Unit,UCUM,Unit,S,g/dL,19700101,20991231,NA,Albumin -8636,gram per liter,Unit,UCUM,Unit,S,g/L,19700101,20991231,NA,Hemoglobin -8636,gram per liter,Unit,UCUM,Unit,S,g/L,19700101,20991231,NA,Albumin -44777602,kilopascal,Unit,UCUM,Unit,S,kPa,19700101,20991231,NA,pCO2 (venous) -8840,milligram per deciliter,Unit,UCUM,Unit,S,mg/dL,19700101,20991231,NA,Creatinine -8751,milligram per liter,Unit,UCUM,Unit,S,mg/L,19700101,20991231,NA,CRP -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pCO2 (venous) -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pCO2 (arterial) -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pO2 (venous) -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,pO2 (arterial) -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Lactate -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Blood urea nitrogen -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Glucose -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Sodium -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Potassium -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Magnesium -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Chloride -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Calcium -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Phosphate -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Bicarbonate (venous) -8753,millimole per liter,Unit,UCUM,Unit,S,mmol/L,19700101,20991231,NA,Bicarbonate (arterial) -8555,second,Unit,UCUM,Unit,S,s,19700101,20991231,NA,INR prothrombin time -8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Immature WBC count -8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Neutrophil count -8647,per microliter,Unit,UCUM,Unit,S,/uL,19700101,20991231,NA,Platelet count -8645,unit per liter,Unit,UCUM,Unit,S,[U]/L,19700101,20991231,NA,ALT -8645,unit per liter,Unit,UCUM,Unit,S,[U]/L,19700101,20991231,NA,AST -8749,micromole per liter,Unit,UCUM,Unit,S,umol/L,19700101,20991231,NA,Creatinine -8749,micromole per liter,Unit,UCUM,Unit,S,umol/L,19700101,20991231,NA,Bilirubin +concept_id,concept_name,standard_concept,sourceCode +37399161,Blood arterial pH,S,pH (arterial) +37392672,Blood venous pH,S,pH (venous) +4267147,Platelet count,S,Platelet count +4298431,White blood cell count,S,Immature WBC count +8713,gram per deciliter,S,Hemoglobin +8713,gram per deciliter,S,Albumin +8636,gram per liter,S,Hemoglobin +8636,gram per liter,S,Albumin +44777602,kilopascal,S,pCO2 (venous) +8751,milligram per liter,S,CRP +8554,percent,S,Hematocrit +8840,milligram per deciliter,S,Creatinine +8876,millimeter mercury column,S,pCO2 (venous) +8876,millimeter mercury column,S,pCO2 (arterial) +8876,millimeter mercury column,S,pO2 (venous) +8876,millimeter mercury column,S,pO2 (arterial) +8753,millimole per liter,S,Lactate +8753,millimole per liter,S,Blood urea nitrogen +8753,millimole per liter,S,Glucose +8753,millimole per liter,S,Sodium +8753,millimole per liter,S,Potassium +8753,millimole per liter,S,Magnesium +8753,millimole per liter,S,Chloride +8753,millimole per liter,S,Calcium +8753,millimole per liter,S,Phosphate +8753,millimole per liter,S,Bicarbonate (venous) +8753,millimole per liter,S,Bicarbonate (arterial) +8555,second,S,INR prothrombin time +8647,per microliter,S,Immature WBC count +8647,per microliter,S,Neutrophil count +8647,per microliter,S,Platelet count +8645,unit per liter,S,ALT +8645,unit per liter,S,AST +8749,micromole per liter,S,Creatinine +8749,micromole per liter,S,Bilirubin +3005456,Potassium [Moles/volume] in Blood,S,Potassium +3018572,Chloride [Moles/volume] in Blood,S,Chloride +3051825,Creatinine [Mass/volume] in Blood,S,Creatinine +3027273,Bicarbonate [Moles/volume] in Venous blood,S,Bicarbonate (venous) +3006140,Bilirubin.total [Moles/volume] in Serum or Plasma,S,Bilirubin +3013826,Glucose [Moles/volume] in Serum or Plasma,S,Glucose +3003458,Phosphate [Moles/volume] in Serum or Plasma,S,Phosphate +3024641,Urea nitrogen [Moles/volume] in Serum or Plasma,S,Blood urea nitrogen +3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,ALT +3024561,Albumin [Mass/volume] in Serum or Plasma,S,Albumin +3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,AST +3008152,Bicarbonate [Moles/volume] in Arterial blood,S,Bicarbonate (arterial) +3020460,C reactive protein [Mass/volume] in Serum or Plasma,S,CRP +3015377,Calcium [Moles/volume] in Serum or Plasma,S,Calcium +3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,pCO2 (arterial) +3021447,Carbon dioxide [Partial pressure] in Venous blood,S,pCO2 (venous) +3009542,Hematocrit [Volume Fraction] of Blood,S,Hematocrit +3033836,Magnesium [Moles/volume] in Blood,S,Magnesium +3027801,Oxygen [Partial pressure] in Arterial blood,S,pO2 (arterial) +3024354,Oxygen [Partial pressure] in Venous blood,S,pO2 (venous) +3019550,Sodium [Moles/volume] in Serum or Plasma,S,Sodium +3047181,Lactate [Moles/volume] in Blood,S,Lactate +3007670,Neutrophil Ab [Units/volume] in Serum,S,Neutrophil count +3034426,Prothrombin time (PT),S,INR prothrombin time +40762351,Hemoglobin [Moles/volume] in Blood,S,Hemoglobin diff --git a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv index 64b3cdbd..da4a9fc2 100644 --- a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv @@ -1,13 +1,13 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -4051330,Continuous venovenous hemofiltration,Procedure,SNOMED,Procedure,S,233585000,20020131,20991231,NA,LCOS - renal support (CVVH/ PD) -4123933,Admission to pediatric intensive care unit,Observation,SNOMED,Procedure,S,305353001,20020131,20991231,NA,ICU ward stay -4295705,Exploratory incision,Procedure,SNOMED,Procedure,S,76145000,20020131,20991231,NA,Surgical injury - Reexplore for bleeding -377091,Seizure,Condition,SNOMED,Clinical Finding,S,91175000,20020131,20991231,NA,Neurological injury - seizure -439847,Intracranial hemorrhage,Condition,SNOMED,Disorder,S,1386000,20020131,20991231,NA,Neurological injury - intracranial haemmhorage/ intracranial bleeding -4308537,Injury to blood vessel during surgery,Condition,SNOMED,Disorder,S,213266005,20020131,20991231,NA,Surgical injury - Blood Loss -321042,Cardiac arrest,Condition,SNOMED,Disorder,S,410429000,20040731,20991231,NA,LCOS - Cardiac arrest -443454,Cerebral infarction,Condition,SNOMED,Disorder,S,432504007,20080731,20991231,NA,Neurological injury - infarction -4185565,Low cardiac output syndrome,Condition,SNOMED,Disorder,S,44088000,20020131,20991231,NA,Low cardiac output state (LCOS) - ECMO -4185565,Low cardiac output syndrome,Condition,SNOMED,Disorder,S,44088000,20020131,20991231,NA,LCOS - NEC requiring treatment -42537043,CLABSI - central line associated bloodstream infection,Condition,SNOMED,Disorder,S,736152001,20180131,20991231,NA,CVL infections -4306136,Chylothorax,Condition,SNOMED,Disorder,S,83035003,20020131,20991231,NA,Surgical injury - Chylothorax +concept_id,concept_name,standard_concept,sourceCode +4051330,Continuous venovenous hemofiltration,S,LCOS - renal support (CVVH/ PD) +4123933,Admission to pediatric intensive care unit,S,ICU ward stay +4295705,Exploratory incision,S,Surgical injury - Reexplore for bleeding +377091,Seizure,S,Neurological injury - seizure +439847,Intracranial hemorrhage,S,Neurological injury - intracranial haemmhorage/ intracranial bleeding +4308537,Injury to blood vessel during surgery,S,Surgical injury - Blood Loss +321042,Cardiac arrest,S,LCOS - Cardiac arrest +443454,Cerebral infarction,S,Neurological injury - infarction +4185565,Low cardiac output syndrome,S,Low cardiac output state (LCOS) - ECMO +4185565,Low cardiac output syndrome,S,LCOS - NEC requiring treatment +42537043,CLABSI - central line associated bloodstream infection,S,CVL infections +4306136,Chylothorax,S,Surgical injury - Chylothorax diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv index 158c7c27..0e67d4e4 100644 --- a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv @@ -1,11 +1,11 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -4096101,Measurement of oxygen saturation at periphery,Measurement,SNOMED,Procedure,S,250554003,20020131,20991231,NA,SpO2 -4152194,Systolic blood pressure,Measurement,SNOMED,Observable Entity,NA,271649006,20020131,20991231,NA,SBP (Systolic Blood Pressure) -4154790,Diastolic blood pressure,Measurement,SNOMED,Observable Entity,NA,271650006,20020131,20991231,NA,DBP (Dyastolic Blood Pressure) -4239408,Heart rate,Measurement,SNOMED,Observable Entity,NA,364075005,20020131,20991231,NA,Age-dependent HR -4313591,Respiratory rate,Measurement,SNOMED,Observable Entity,NA,86290005,20020131,20991231,NA,Age-dependent RR -8554,percent,Unit,UCUM,Unit,S,%,19700101,20991231,NA,SpO2 -8483,counts per minute,Unit,UCUM,Unit,S,{counts}/min,19700101,20991231,NA,Age-dependent HR -8483,counts per minute,Unit,UCUM,Unit,S,{counts}/min,19700101,20991231,NA,Age-dependent RR -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,SBP (Systolic Blood Pressure) -8876,millimeter mercury column,Unit,UCUM,Unit,S,mm[Hg],19700101,20991231,NA,DBP (Dyastolic Blood Pressure) +concept_id,concept_name,standard_concept,sourceCode +4096101,Measurement of oxygen saturation at periphery,S,SpO2 +4152194,Systolic blood pressure,NA,SBP (Systolic Blood Pressure) +4154790,Diastolic blood pressure,NA,DBP (Dyastolic Blood Pressure) +4239408,Heart rate,NA,Age-dependent HR +4313591,Respiratory rate,NA,Age-dependent RR +8483,counts per minute,S,Age-dependent HR +8483,counts per minute,S,Age-dependent RR +8554,percent,S,SpO2 +8876,millimeter mercury column,S,SBP (Systolic Blood Pressure) +8876,millimeter mercury column,S,DBP (Dyastolic Blood Pressure) diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv index 51c09f11..650ef2b0 100644 --- a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv @@ -1,9 +1,9 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -3025315,Body weight,Measurement,LOINC,Clinical Observation,S,29463-7,19700101,20991231,NA,Weight -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Extracardiac anomalies - diagnoses -607590,Body height,Measurement,SNOMED,Observable Entity,NA,1153637007,20210731,20991231,NA,Height -4201235,Body surface area,Measurement,SNOMED,Observable Entity,S,301898006,20020131,20991231,NA,Body Surface Area (BSA) - Combination of weight and height -4275564,Operation on heart,Procedure,SNOMED,Procedure,S,64915003,20020131,20991231,NA,Cardiac surgeries (Interventions) -8582,centimeter,Unit,UCUM,Unit,S,cm,19700101,20991231,NA,Height -9529,kilogram,Unit,UCUM,Unit,S,kg,19700101,20991231,NA,Weight -8617,square meter,Unit,UCUM,Unit,S,m2,19700101,20991231,NA,Body Surface Area (BSA) - Combination of weight and height +concept_id,concept_name,standard_concept,sourceCode +607590,Body height,NA,Height +4201235,Body surface area,S,Body Surface Area (BSA) - Combination of weight and height +4275564,Operation on heart,S,Cardiac surgeries (Interventions) +8582,centimeter,S,Height +9529,kilogram,S,Weight +8617,square meter,S,Body Surface Area (BSA) - Combination of weight and height +3025315,Body weight,S,Weight +0,No matching concept,NA,Extracardiac anomalies - diagnoses diff --git a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv index e9bf646e..2b0734ad 100644 --- a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv @@ -1,9 +1,9 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Aristotle's score of surgery -44790138,Induced circulatory arrest,Procedure,SNOMED,Procedure,S,232211000000108,20061002,20991231,NA,"Deep hypothermic circulatory arrest start datetime, end datetime" -4336464,Coronary artery bypass graft,Procedure,SNOMED,Procedure,S,232717009,20020131,20991231,NA,"Cardiac bypass start datetime, end datetime" -4150627,Removal of endotracheal tube,Procedure,SNOMED,Procedure,S,271280005,20020131,20991231,NA,Extubation event -4201547,Placement of arterial cross clamp,Procedure,SNOMED,Procedure,S,301880007,20020131,20991231,NA,"Cross-clamping start datetime, end datetime" -4301351,Surgical procedure,Procedure,SNOMED,Procedure,S,387713003,20030131,20991231,NA,"Surgery start datetime, end datetime" -40490494,Society of Thoracic Surgeons risk calculator,Measurement,SNOMED,Staging / Scales,S,448586003,20110731,20991231,NA,STAT/EACTS score of surgery -4272324,Cardiopulmonary bypass operation,Procedure,SNOMED,Procedure,S,63697000,20020131,20991231,NA,"Antegrade Cerebral Perfusion start datetime, end datetime" +concept_id,concept_name,standard_concept,sourceCode +44790138,Induced circulatory arrest,S,"Deep hypothermic circulatory arrest start datetime, end datetime" +4336464,Coronary artery bypass graft,S,"Cardiac bypass start datetime, end datetime" +4150627,Removal of endotracheal tube,S,Extubation event +4201547,Placement of arterial cross clamp,S,"Cross-clamping start datetime, end datetime" +4301351,Surgical procedure,S,"Surgery start datetime, end datetime" +40490494,Society of Thoracic Surgeons risk calculator,S,STAT/EACTS score of surgery +4272324,Cardiopulmonary bypass operation,S,"Antegrade Cerebral Perfusion start datetime, end datetime" +0,No matching concept,NA,Aristotle's score of surgery diff --git a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv index ab2852cb..db64d22f 100644 --- a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv @@ -1,11 +1,11 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,ventilation -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,Type of vasoactive infusion -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,VIS score of vasoactive infusion -0,No matching concept,Metadata,None,Undefined,NA,No matching concept,19700101,20991231,NA,"Total ventilation start datetime, end datetime" -794078,vasoactive intestinal peptide,Drug,RxNorm,Ingredient,S,1942960,20180205,20991231,NA,Dose of vasoactive infusion (rate - mcg/kg/hr) -37158404,Invasive mechanical ventilation,Procedure,SNOMED,Procedure,S,1258985005,20221130,20991231,NA,Invasive Mechanical Ventilation LOS -4177224,Non-invasive ventilation,Procedure,SNOMED,Procedure,S,428311008,20080131,20991231,NA,Non-Invasive Mechanical Ventilation LOS -44803020,Primary reason for admission,Observation,SNOMED,Observable Entity,S,507151000000102,20091001,20991231,NA,Admission reason -4179206,Central venous catheter,Device,SNOMED,Physical Object,S,52124006,20020131,20991231,NA,"Postop central venous catheter in/start datetime, out/ end datetime" -42539650,Administration of intravenous vasoactive drug,Procedure,SNOMED,Procedure,S,736765002,20180131,20991231,NA,"Vasoactive infusion start datetime, end datetime" +concept_id,concept_name,standard_concept,sourceCode +37158404,Invasive mechanical ventilation,S,Invasive Mechanical Ventilation LOS +4177224,Non-invasive ventilation,S,Non-Invasive Mechanical Ventilation LOS +44803020,Primary reason for admission,S,Admission reason +4179206,Central venous catheter,S,"Postop central venous catheter in/start datetime, out/ end datetime" +42539650,Administration of intravenous vasoactive drug,S,"Vasoactive infusion start datetime, end datetime" +0,No matching concept,NA,ventilation +0,No matching concept,NA,Type of vasoactive infusion +0,No matching concept,NA,VIS score of vasoactive infusion +0,No matching concept,NA,"Total ventilation start datetime, end datetime" +794078,vasoactive intestinal peptide,S,Dose of vasoactive infusion (rate - mcg/kg/hr) diff --git a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv index cd26514d..99ee99f5 100644 --- a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv +++ b/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv @@ -1,21 +1,21 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -46234437,ivabradine,Drug,RxNorm,Ingredient,S,1649480,20150706,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" -1354860,flecainide,Drug,RxNorm,Ingredient,S,4441,19700101,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" -1309944,amiodarone,Drug,RxNorm,Ingredient,S,703,19700101,20991231,NA,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" -4044892,Procedure on sternum,Procedure,SNOMED,Procedure,S,129198003,20020131,20991231,NA,Sternum reopening (procedure undertaken) -4046868,Vocal cord dysfunction,Condition,SNOMED,Clinical Finding,S,134290008,20020131,20991231,NA,Vocal Cord Dysfunction -4049398,Temporary cardiac pacemaker procedure,Procedure,SNOMED,Procedure,S,233175008,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4051940,Permanent cardiac pacemaker procedure,Procedure,SNOMED,Procedure,S,233182007,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4353741,Cardioversion,Procedure,SNOMED,Procedure,S,250980009,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4117045,Atrial overdrive pacing,Procedure,SNOMED,Procedure,S,287696002,20020131,20991231,NA,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -253796,Pneumothorax,Condition,SNOMED,Disorder,S,36118008,20020131,20991231,NA,Pneumothorax -609312,Awaiting transplantation of heart,Observation,SNOMED,Context-dependent,S,374847481000119108,20210131,20991231,NA,Listed for heart transplantation -4202832,Intubation,Procedure,SNOMED,Procedure,S,52765003,20020131,20991231,NA,intubation -315643,Tachyarrhythmia,Condition,SNOMED,Disorder,S,6285003,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4275564,Operation on heart,Procedure,SNOMED,Procedure,S,64915003,20020131,20991231,NA,Cardiac surgeries (interventions) -44783799,Exteriorization of trachea,Procedure,SNOMED,Procedure,S,697984004,20140131,20991231,NA,Tracheostomy -44784217,Cardiac arrhythmia,Condition,SNOMED,Disorder,S,698247007,20140131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4068155,Atrial arrhythmia,Condition,SNOMED,Disorder,S,17366009,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4228448,Bradyarrhythmia,Condition,SNOMED,Disorder,S,421869004,20060731,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4185572,Ventricular arrhythmia,Condition,SNOMED,Disorder,S,44103008,20020131,20991231,NA,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4275136,Paralysis of diaphragm,Condition,SNOMED,Disorder,S,64228003,20020131,20991231,NA,Diaphragmatic Paralysis +concept_id,concept_name,standard_concept,sourceCode +4044892,Procedure on sternum,S,Sternum reopening (procedure undertaken) +4046868,Vocal cord dysfunction,S,Vocal Cord Dysfunction +4049398,Temporary cardiac pacemaker procedure,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4051940,Permanent cardiac pacemaker procedure,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4353741,Cardioversion,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +4117045,Atrial overdrive pacing,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" +253796,Pneumothorax,S,Pneumothorax +609312,Awaiting transplantation of heart,S,Listed for heart transplantation +4202832,Intubation,S,intubation +315643,Tachyarrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4275564,Operation on heart,S,Cardiac surgeries (interventions) +44783799,Exteriorization of trachea,S,Tracheostomy +44784217,Cardiac arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4068155,Atrial arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4228448,Bradyarrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4185572,Ventricular arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" +4275136,Paralysis of diaphragm,S,Diaphragmatic Paralysis +46234437,ivabradine,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" +1354860,flecainide,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" +1309944,amiodarone,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" diff --git a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv index a5c3f4c3..0bb6e4c3 100644 --- a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ b/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -1 +1,87 @@ -sourceCode,concept_id,standard_concept +concept_id,concept_name,standard_concept,sourceCode +37174269,At increased risk of sepsis,S,Diagnosis of acute infection having the potential for progression to sepsis1+2 +4032243,Dialysis procedure,S,Dialysis +197320,Acute kidney injury,S,acute kidney injury +4074689,Open drainage of pleural cavity,S,"Chest opening, chest drainage" +4084670,Non-urgent surgical admission,S,Surgical admission (non-urgent) +4070667,Urinary catheter,S,Urinary catheter +44790095,Invasive ventilation,S,Invasive ventilation +4052536,Extracorporeal membrane oxygenation,S,ECMO +4051330,Continuous venovenous hemofiltration,S,Dialysis +44790567,Patient transfer from hospital to hospital,S,Origin (external) +133327,Viremia,S,viremia +4097216,Endotracheal tube,S,Endotracheal tube +4085730,Antibiotic therapy,S,Antibiotics +4123946,Admission to surgical department,S,Surgical admission (urgent) +4208341,Solid organ transplant,S,organ transplant +4193843,Oxygenation index measurement,S,Oxygenation index +4235043,Ventricular assist device,S,Ventricular assist device (VAD) +443392,Malignant neoplastic disease,S,Cancer +4181511,Administration of antineoplastic agent,S,Antineoplastics +4294886,"Patient transfer, in-hospital",S,Origin (internal) +4301351,Surgical procedure,S,Surgery previous to prediction time point +4140762,Antiviral therapy,S,Antivirals +4177205,Cannulation,S,Peripheral IV cannulas +4177224,Non-invasive ventilation,S,Non-invasive ventilation +45758028,Arterial blood pressure catheter,S,Arterial blood pressure catheter +44803020,Primary reason for admission,S,Reason for admission +4179206,Central venous catheter,S,Central venous catheter +132736,Bacteremia,S,bacteremia +44783799,Exteriorization of trachea,S,Tracheostomy +45768671,Asplenia,S,asplenia +4324124,Peritoneal dialysis,S,Peritoneal dialysis +435785,Meningitis,S,meningitis +201820,Diabetes mellitus,S,Diagnosis of chronic condition +42538045,Nasogastric/orogastric tube stylet,S,Nasogastric/orogastric tube +37206601,Venoarterial extracorporeal membrane oxygenation,S,ECMO type +37206603,Venovenous extracorporeal membrane oxygenation,S,ECMO type +4314777,Immunosuppressive therapy,S,Immunosuppressors +604243,Acquired neutropenia,S,neutropenia +444187,Open wound,S,injury with open wound +22281,Sickle cell-hemoglobin SS disease,S,sickle cell disease +435613,Cellulitis,S,cellulitis +4134120,Cerebral palsy,S,cerebral palsy +444202,Abscess,S,Abcess +312723,Congenital heart disease,S,Diagnosis of chronic condition +255573,Chronic obstructive lung disease,S,Diagnosis of chronic condition +255848,Pneumonia,S,pneumonia +433740,Immunodeficiency disorder,S,immunodeficiency +4080011,Organ dysfunction syndrome,S,Diagnosis of organ system dysfunction +434821,Systemic inflammatory response syndrome,S,Diagnosis of SIRS +81539,Mitochondrial cytopathy,S,mitochondrial disease +4103588,Acute tuberculosis,S,tuberculosis +443783,Chronic disease,S,Diagnosis of chronic condition +4140977,Secondary immune deficiency disorder,S,Diagnosis of condition producing immunodeficiency +201606,Crohn's disease,S,Crohn's disease +4243475,Acute hepatitis,S,hepatitis +4300243,Postoperative complication,S,surgical site inflammation +439125,Complete trisomy 21 syndrome,S,Down's syndrome +321042,Cardiac arrest,S,cardiac arrest +4331815,Acute urinary tract infection,S,UTI +195212,Hypercortisolism,S,Cushing's disease +196152,Peritonitis,S,peritonitis +314383,Myocarditis,S,miocarditis +195314,Nephrotic syndrome,S,nephrotic syndrome +441589,Endocarditis,S,endocarditis +4271450,Acute infectious disease,S,Diagnosis of acute infection having the potential for progression to sepsis1+2 +81893,Ulcerative colitis,S,ulcerative colitis +80809,Rheumatoid arthritis,S,rheumatoid arthritis +4322814,Meningoencephalitis,S,Meningo-encephalitis +36716945,Renal insufficiency,S,renal insufficiency +440448,Appendicitis,S,appendicitis +433968,Candidiasis,S,candidiasis +44807226,Necrotising enterocolitis,S,necrotizing enterocolitis +132797,Sepsis,S,Previous diagnosis of sepsis measure +44777590,centimeter watercolumn,S,Mean Airway Pressure (MAP) +44777602,kilopascal,S,Mean Airway Pressure (MAP) +8510,unit,S,FiO2 +8554,percent,S,FiO2 +720868,fraction,S,FiO2 +8529,index,S,Oxygenation index +8876,millimeter mercury column,S,Mean Airway Pressure (MAP) +21602722,CORTICOSTEROIDS FOR SYSTEMIC USE,C,Corticoids +42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,S,FiO2 +42527086,Mean airway pressure,S,Mean Airway Pressure (MAP) +0,No matching concept,NA,Non-surgical admission +0,No matching concept,NA,Oxygenation index +1340204,History of event,S,Previous diagnosis of sepsis measure diff --git a/project/data/phems_variable_list/is_standard/5.22_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.22_vital_signs.csv new file mode 100644 index 00000000..a7b3fb88 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.22_vital_signs.csv @@ -0,0 +1,21 @@ +concept_id,concept_name,standard_concept,sourceCode +4096101,Measurement of oxygen saturation at periphery,S,SpO2 +8483,counts per minute,S,HR +8483,counts per minute,S,RR +9529,kilogram,S,Weight +8554,percent,S,SpO2 +586323,degree Celsius,S,Body temperature +8504,gram,S,Weight +8587,milliliter,S,Urine output +44777613,milliliter per hour,S,Urine output +33014,milliliter per kilogram per 24 hours,S,Urine output +8876,millimeter mercury column,S,SBP (Systolic Blood Pressure) +8876,millimeter mercury column,S,DBP (Diastolic blood pressure) +3025315,Body weight,S,Weight +3020891,Body temperature,S,Body temperature +3012888,Diastolic blood pressure,S,DBP (Diastolic blood pressure) +3004249,Systolic blood pressure,S,SBP (Systolic Blood Pressure) +3014315,Urine output,S,Urine output +3024171,Respiratory rate,S,RR +1004025,Heart rate,C,HR +0,No matching concept,NA,Urine output diff --git a/project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv b/project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv new file mode 100644 index 00000000..a66fcfeb --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv @@ -0,0 +1,36 @@ +concept_id,concept_name,standard_concept,sourceCode +4069590,Normal,S,Pupillary reactivity (right) +4069590,Normal,S,Pupillary reactivity (left) +4116857,Medium,S,Pupillary size (right) +4116857,Medium,S,Pupillary size (left) +4124461,Weak,S,Peripheral pulse (pressure) +4124461,Weak,S,Central pulse +4132135,Absent,S,Peripheral pulse (pressure) +4132135,Absent,S,Central pulse +4188539,Yes,S,Pupillary reactivity (right) +4188539,Yes,S,Pupillary reactivity (left) +4188540,No,S,Pupillary reactivity (right) +4188540,No,S,Pupillary reactivity (left) +4181412,Present,S,Peripheral pulse (pressure) +4181412,Present,S,Central pulse +4224504,Pulse,S,Central pulse +4314539,Arterial pulse pressure,S,Peripheral pulse (pressure) +8483,counts per minute,S,Peripheral pulse (pressure) +8483,counts per minute,S,Central pulse +8588,millimeter,S,Pupillary size (right) +8588,millimeter,S,Pupillary size (left) +8555,second,S,Capillary refill time +21490963,Right pupil Pupillary response,S,Pupillary reactivity (right) +45879546,Sluggish,S,Pupillary reactivity (right) +45879546,Sluggish,S,Pupillary reactivity (left) +21499034,Dilated,S,Pupillary size (right) +21499034,Dilated,S,Pupillary size (left) +36310446,Constricted,S,Pupillary size (right) +36310446,Constricted,S,Pupillary size (left) +45880051,Unresponsive,S,Pupillary reactivity (right) +45880051,Unresponsive,S,Pupillary reactivity (left) +3032652,Glasgow coma scale,S,GCS +3045676,Capillary refill [Time],S,Capillary refill time +21491763,Left pupil Pupillary response,S,Pupillary reactivity (left) +3021415,Left pupil Diameter Auto,S,Pupillary size (left) +3027214,Right pupil Diameter Auto,S,Pupillary size (right) diff --git a/project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv b/project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv new file mode 100644 index 00000000..a323de0e --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv @@ -0,0 +1,41 @@ +concept_id,concept_name,standard_concept,sourceCode +37393605,D-dimer level,S,D-dimer +4017361,Blood urea nitrogen measurement,S,Blood urea nitrogen +4036356,Detection of bacteria,S,Bacterial pathogen detection +44789220,Ionised calcium measurement,S,Ionized calcium +4094436,Fibrinogen measurement,S,Fibrinogen +4118986,Bilirubin measurement,S,Direct bilirubin +4196268,Polymerase chain reaction observation,S,PCR panel +4196268,Polymerase chain reaction observation,S,PCR panel +440029,Viral disease,S,Viral pathogen detection +4212899,Total white blood count,S,Leukocytes +4175016,"Partial thromboplastin time, activated",S,Thromboplastin time +42536081,Adrenal medulla hormone,S,MR-proADM +4299649,Quantitative microbial culture and measurement,S,Quantification of colonies in culture +44806682,Infection resistant to multiple antibiotics,S,Antibiotic resistance +432545,Bacterial infectious disease,S,Name of bacterial pathogen detected +8636,gram per liter,S,Fibrinogen +8751,milligram per liter,S,D-dimer +8845,picogram per milliliter,S,Interleukin-6 +9278,colony forming unit,S,Quantification of colonies in culture +9278,colony forming unit,S,Leukocytes +8840,milligram per deciliter,S,Blood urea nitrogen +8840,milligram per deciliter,S,Glucose +8840,milligram per deciliter,S,Direct bilirubin +8753,millimole per liter,S,D-dimer +8753,millimole per liter,S,Fibrinogen +8753,millimole per liter,S,Blood urea nitrogen +8753,millimole per liter,S,Glucose +8753,millimole per liter,S,Direct bilirubin +8753,millimole per liter,S,Ionized calcium +8725,nanogram per liter,S,PCT +8842,nanogram per milliliter,S,PCT +8736,nanomole per liter,S,MR-proADM +8523,ratio,S,Thromboplastin time +8555,second,S,Thromboplastin time +8748,microgram per liter,S,PCT +8749,micromole per liter,S,Direct bilirubin +3013826,Glucose [Moles/volume] in Serum or Plasma,S,Glucose +3046279,Procalcitonin [Mass/volume] in Serum or Plasma,S,PCT +3033291,Interleukin 6 [Mass/volume] in Body fluid,S,Interleukin-6 +0,No matching concept,NA,Leukocytes diff --git a/project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv b/project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv new file mode 100644 index 00000000..f2107887 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv @@ -0,0 +1,12 @@ +concept_id,concept_name,standard_concept,sourceCode +44777602,kilopascal,S,pCO2 +44777602,kilopascal,S,PaO2 +8876,millimeter mercury column,S,pCO2 +8876,millimeter mercury column,S,PaO2 +8753,millimole per liter,S,HCO3 +8753,millimole per liter,S,Base excess +3003396,Base excess in Arterial blood by calculation,S,Base excess +3019977,pH of Arterial blood,S,pH +3008152,Bicarbonate [Moles/volume] in Arterial blood,S,HCO3 +3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,pCO2 +3027801,Oxygen [Partial pressure] in Arterial blood,S,PaO2 diff --git a/project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv b/project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv new file mode 100644 index 00000000..24d44bb9 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv @@ -0,0 +1,17 @@ +concept_id,concept_name,standard_concept,sourceCode +44777602,kilopascal,S,pCO2 +44777602,kilopascal,S,PaO2 +8876,millimeter mercury column,S,pCO2 +8876,millimeter mercury column,S,PaO2 +8753,millimole per liter,S,HCO3 +8753,millimole per liter,S,Base excess +3009343,pH of Capillary blood,S,pH +3027273,Bicarbonate [Moles/volume] in Venous blood,S,HCO3 +3003129,Base excess in Capillary blood by calculation,S,Base excess +3002032,Base excess in Venous blood by calculation,S,Base excess +3015235,Bicarbonate [Moles/volume] in Capillary blood,S,HCO3 +3023024,Carbon dioxide [Partial pressure] in Capillary blood,S,pCO2 +3021447,Carbon dioxide [Partial pressure] in Venous blood,S,pCO2 +3028626,Oxygen [Partial pressure] in Capillary blood,S,PaO2 +3024354,Oxygen [Partial pressure] in Venous blood,S,PaO2 +3012544,pH of Venous blood,S,pH diff --git a/project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv b/project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv new file mode 100644 index 00000000..0a307ec2 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv @@ -0,0 +1,15 @@ +concept_id,concept_name,standard_concept,sourceCode +37393608,Factor VIII inhibitor activity,S,factor VIII inhibitor status +4126681,Detected,S,factor VIII inhibitor status +9190,Not detected,S,factor VIII inhibitor status +4056830,Severe hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity +4094223,Mild hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity +434007,Hereditary factor VIII deficiency disease,S,hemophilia A diagnosis +4140661,Moderate hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity +8582,centimeter,S,height +9529,kilogram,S,body weight +8504,gram,S,body weight +9546,meter,S,height +3025315,Body weight,S,body weight +3036277,Body height,S,height +3003694,ABO and Rh group [Type] in Blood,S,blood group diff --git a/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv b/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv new file mode 100644 index 00000000..49f4ea05 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv @@ -0,0 +1,37 @@ +concept_id,concept_name,standard_concept,sourceCode +37393863,Platelet count,NA,platelet count +4175016,"Partial thromboplastin time, activated",S,activated partial thromboplastin time (APTT) +8636,gram per liter,S,fibrinogen +44777604,liter per liter,S,hematocrit +8554,percent,S,factor VIII activity measurement +8554,percent,S,Von Willebrand factor activity measurement +8554,percent,S,Von Willebrand factor antigen measurement +8554,percent,S,Prothrombin time (PT) +8554,percent,S,hematocrit +44777588,billion cells per liter,S,platelet count +44777562,Bethesda unit per milliliter,S,factor VIII inhibitor titer +9332,international unit per deciliter,S,factor VIII activity measurement +9332,international unit per deciliter,S,Von Willebrand factor activity measurement +9332,international unit per deciliter,S,Von Willebrand factor antigen measurement +8985,international unit per milliliter,S,factor VIII activity measurement +8985,international unit per milliliter,S,Von Willebrand factor activity measurement +8985,international unit per milliliter,S,Von Willebrand factor antigen measurement +8523,ratio,S,activated partial thromboplastin time (APTT) +8523,ratio,S,Prothrombin time (PT) +8555,second,S,activated partial thromboplastin time (APTT) +8555,second,S,Prothrombin time (PT) +8645,unit per liter,S,ALT +8645,unit per liter,S,AST +8763,unit per milliliter,S,Von Willebrand factor propeptide measurement +3024942,Coagulation factor VIII inhibitor [Units/volume] in Platelet poor plasma by Coagulation assay,S,factor VIII inhibitor titer +3011832,Coagulation factor VIII activity [Units/volume] in Platelet poor plasma by Chromogenic method,S,factor VIII activity measurement +3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,ALT +3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,AST +3009542,Hematocrit [Volume Fraction] of Blood,S,hematocrit +3022520,Coagulation factor VIII activated [Units/volume] in Platelet poor plasma by Coagulation assay,S,factor VIII activity measurement +3016407,Fibrinogen [Mass/volume] in Platelet poor plasma by Coagulation assay,S,fibrinogen +3042349,von Willebrand factor (vWf) cleaving protease inhibitor [Units/volume] in Platelet poor plasma,S,Von Willebrand factor propeptide measurement +3034426,Prothrombin time (PT),S,Prothrombin time (PT) +3002124,von Willebrand factor (vWf) Ag [Units/volume] in Platelet poor plasma by Immunoassay,S,Von Willebrand factor antigen measurement +3023693,von Willebrand factor (vWf) multimers in Platelet poor plasma by Immunoblot,S,Von Willebrand factor propeptide measurement +43534000,von Willebrand factor (vWf).activity [Units/volume] in Platelet poor plasma by Immunoassay,S,Von Willebrand factor activity measurement diff --git a/project/data/phems_variable_list/is_standard/5.30_treatments.csv b/project/data/phems_variable_list/is_standard/5.30_treatments.csv new file mode 100644 index 00000000..4bbe00a5 --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.30_treatments.csv @@ -0,0 +1,13 @@ +concept_id,concept_name,standard_concept,sourceCode +4129275,Continuous infusion,S,factor VIII dose is continuous infusion or bolus dose +4265597,Single bolus,S,factor VIII dose is continuous infusion or bolus dose +40492862,Method of drug administration,S,factor VIII dose is continuous infusion or bolus dose +9655,microgram,S,desmopressin +8985,international unit per milliliter,S,factor VIII +8576,milligram,S,desmopressin +9662,microgram per kilogram,S,desmopressin +1517070,desmopressin,S,desmopressin +21154209,Factor VIII 2000 UNT Injection [Kogenate Bayer],S,factor VIII +35766745,Factor VIII 250 UNT Injection [Advate],S,factor VIII +40745282,emicizumab 150 MG/ML Injectable Solution [Hemlibra],S,factor VIII +35831239,factor VII 250 UNT Injection [Eloctate],S,factor VIII diff --git a/project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv b/project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv new file mode 100644 index 00000000..60a64e1a --- /dev/null +++ b/project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv @@ -0,0 +1,5 @@ +concept_id,concept_name,standard_concept,sourceCode +4028665,Transfusion of plasma,S,plasma administration during surgery +4308716,Intraoperative hemorrhage,S,blood loss during surgery +37017589,Bleeding during surgery requiring transfusion,S,blood transfusion during surgery +967823,sodium chloride,S,NaCl administration during surgery diff --git a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv index 2e5ba0f1..6671e328 100644 --- a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv +++ b/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv @@ -1,7 +1,7 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -1507835,vasopressin (USP),Drug,RxNorm,Ingredient,S,11149,19700101,20991231,NA,vasopressin -1337720,dobutamine,Drug,RxNorm,Ingredient,S,3616,19700101,20991231,NA,dobutamine -1337860,dopamine,Drug,RxNorm,Ingredient,S,3628,19700101,20991231,NA,dopamine -1343916,epinephrine,Drug,RxNorm,Ingredient,S,3992,19700101,20991231,NA,epinephrine -1368671,milrinone,Drug,RxNorm,Ingredient,S,52769,19700101,20991231,NA,milrinone -1321341,norepinephrine,Drug,RxNorm,Ingredient,S,7512,19700101,20991231,NA,norepinephrin +concept_id,concept_name,standard_concept,sourceCode +1507835,vasopressin (USP),S,vasopressin +1337720,dobutamine,S,dobutamine +1337860,dopamine,S,dopamine +1343916,epinephrine,S,epinephrine +1368671,milrinone,S,milrinone +1321341,norepinephrine,S,norepinephrin diff --git a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv index a2487e75..2cf1ddc7 100644 --- a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv +++ b/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv @@ -1,12 +1,12 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -1507835,vasopressin (USP),Drug,RxNorm,Ingredient,S,11149,19700101,20991231,NA,Vasopressin -1337720,dobutamine,Drug,RxNorm,Ingredient,S,3616,19700101,20991231,NA,Dobutamine -1337860,dopamine,Drug,RxNorm,Ingredient,S,3628,19700101,20991231,NA,Dopamine -1143374,ephedrine,Drug,RxNorm,Ingredient,S,3966,19700101,20991231,NA,Ephedrine -1343916,epinephrine,Drug,RxNorm,Ingredient,S,3992,19700101,20991231,NA,Epinephrine -1368671,milrinone,Drug,RxNorm,Ingredient,S,52769,19700101,20991231,NA,Milrinone -19119253,terlipressin,Drug,RxNorm,Ingredient,S,57048,19700101,20991231,NA,Terlipressin -1183554,isoproterenol,Drug,RxNorm,Ingredient,S,6054,19700101,20991231,NA,Isoproterenol -40173184,levosimendan,Drug,RxNorm,Ingredient,S,73107,20100228,20991231,NA,Levosimendan -1321341,norepinephrine,Drug,RxNorm,Ingredient,S,7512,19700101,20991231,NA,Norepinephrine -1135766,phenylephrine,Drug,RxNorm,Ingredient,S,8163,19700101,20991231,NA,Phenylephrine +concept_id,concept_name,standard_concept,sourceCode +1507835,vasopressin (USP),S,Vasopressin +1337720,dobutamine,S,Dobutamine +1337860,dopamine,S,Dopamine +1143374,ephedrine,S,Ephedrine +1343916,epinephrine,S,Epinephrine +1368671,milrinone,S,Milrinone +19119253,terlipressin,S,Terlipressin +1183554,isoproterenol,S,Isoproterenol +40173184,levosimendan,S,Levosimendan +1321341,norepinephrine,S,Norepinephrine +1135766,phenylephrine,S,Phenylephrine diff --git a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv index 0776db33..bc826410 100644 --- a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv +++ b/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv @@ -1,7 +1,7 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -21603754,Monoclonal antibodies,Drug,ATC,ATC 4th,C,L01XC,19700101,20991231,NA,Monoclonal Antibodies -1518254,dexamethasone,Drug,RxNorm,Ingredient,S,3264,19700101,20991231,NA,Dexamethasone -975125,hydrocortisone,Drug,RxNorm,Ingredient,S,5492,19700101,20991231,NA,Hydrocortisone -1506270,methylprednisolone,Drug,RxNorm,Ingredient,S,6902,19700101,20991231,NA,Methylprednisolone -1550557,prednisolone,Drug,RxNorm,Ingredient,S,8638,19700101,20991231,NA,Prednisolone -4273629,Chemotherapy,Procedure,SNOMED,Procedure,S,367336001,20020131,20991231,NA,Chemotherapy +concept_id,concept_name,standard_concept,sourceCode +4273629,Chemotherapy,S,Chemotherapy +21603754,Monoclonal antibodies,C,Monoclonal Antibodies +1518254,dexamethasone,S,Dexamethasone +975125,hydrocortisone,S,Hydrocortisone +1506270,methylprednisolone,S,Methylprednisolone +1550557,prednisolone,S,Prednisolone diff --git a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv index 51626b4c..d589492b 100644 --- a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv +++ b/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv @@ -1,51 +1,51 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -21603754,Monoclonal antibodies,Drug,ATC,ATC 4th,C,L01XC,19700101,20991231,NA,Monoclonal Antibodies -1836430,sulfamethoxazole,Drug,RxNorm,Ingredient,S,10180,19700101,20991231,NA,Trimethoprim-Sulfamethoxazole -1836948,tetracycline,Drug,RxNorm,Ingredient,S,10395,19700101,20991231,NA,Tetracycline -902722,tobramycin,Drug,RxNorm,Ingredient,S,10627,19700101,20991231,NA,Tobramycin -1705674,trimethoprim,Drug,RxNorm,Ingredient,S,10829,19700101,20991231,NA,Trimethoprim-Sulfamethoxazole -1707687,vancomycin,Drug,RxNorm,Ingredient,S,11124,19700101,20991231,NA,Vancomycin -19010400,fusidate,Drug,RxNorm,Ingredient,S,113608,20060514,20991231,NA,Fusidic acid -45892419,gentamicin,Drug,RxNorm,Ingredient,S,1596450,20150302,20991231,NA,Gentamicin -45892599,ceftolozane,Drug,RxNorm,Ingredient,S,1597609,20150302,20991231,NA,Ceftolozane-Tazovactam -46221507,avibactam,Drug,RxNorm,Ingredient,S,1603834,20150504,20991231,NA,Ceftazidime-Avibactam -1734104,azithromycin,Drug,RxNorm,Ingredient,S,18631,19700101,20991231,NA,Azithromycin -1736887,linezolid,Drug,RxNorm,Ingredient,S,190376,19700101,20991231,NA,Linezolid -1748975,cefepime,Drug,RxNorm,Ingredient,S,20481,19700101,20991231,NA,Cefepime -1750500,clarithromycin,Drug,RxNorm,Ingredient,S,21212,19700101,20991231,NA,Clarithromycin -1769535,cefadroxil,Drug,RxNorm,Ingredient,S,2177,19700101,20991231,NA,Cefadroxil -1771162,cefazolin,Drug,RxNorm,Ingredient,S,2180,19700101,20991231,NA,Cefazolin -1774470,cefotaxime,Drug,RxNorm,Ingredient,S,2186,19700101,20991231,NA,Cefotaxime -1776684,ceftazidime,Drug,RxNorm,Ingredient,S,2191,19700101,20991231,NA,Ceftazidime -1776684,ceftazidime,Drug,RxNorm,Ingredient,S,2191,19700101,20991231,NA,Ceftazidime-Avibactam -1778162,cefuroxime,Drug,RxNorm,Ingredient,S,2194,19700101,20991231,NA,Cefuroxime -1786617,daptomycin,Drug,RxNorm,Ingredient,S,22299,19700101,20991231,NA,Daptomycin -1797513,ciprofloxacin,Drug,RxNorm,Ingredient,S,2551,19700101,20991231,NA,Ciprofloxacin -997881,clindamycin,Drug,RxNorm,Ingredient,S,2582,19700101,20991231,NA,Clindamycin -901845,colistin,Drug,RxNorm,Ingredient,S,2709,19700101,20991231,NA,Colistin -1709170,meropenem,Drug,RxNorm,Ingredient,S,29561,19700101,20991231,NA,Meropenem -1717963,ertapenem,Drug,RxNorm,Ingredient,S,325642,19700101,20991231,NA,Ertapenem -1518254,dexamethasone,Drug,RxNorm,Ingredient,S,3264,19700101,20991231,NA,Dexamethasone -1741122,tazobactam,Drug,RxNorm,Ingredient,S,37617,19700101,20991231,NA,Piperacillin-Tazobactam -1741122,tazobactam,Drug,RxNorm,Ingredient,S,37617,19700101,20991231,NA,Ceftolozane-Tazovactam -1746940,erythromycin,Drug,RxNorm,Ingredient,S,4053,19700101,20991231,NA,Erythromycin -951511,mupirocin,Drug,RxNorm,Ingredient,S,42372,19700101,20991231,NA,Mupirocin -956653,fosfomycin,Drug,RxNorm,Ingredient,S,4550,19700101,20991231,NA,Fosfomycin -1759842,clavulanate,Drug,RxNorm,Ingredient,S,48203,19700101,20991231,NA,Amoxicillin clavulanate -975125,hydrocortisone,Drug,RxNorm,Ingredient,S,5492,19700101,20991231,NA,Hydrocortisone -1778262,imipenem,Drug,RxNorm,Ingredient,S,5690,19700101,20991231,NA,Imipenem -19078399,teicoplanin,Drug,RxNorm,Ingredient,S,57021,19700101,20991231,NA,Teicoplanin -1790868,amikacin,Drug,RxNorm,Ingredient,S,641,19700101,20991231,NA,Amikacin -1506270,methylprednisolone,Drug,RxNorm,Ingredient,S,6902,19700101,20991231,NA,Methylprednisolone -1713332,amoxicillin,Drug,RxNorm,Ingredient,S,723,19700101,20991231,NA,Amoxicillin clavulanate -1713332,amoxicillin,Drug,RxNorm,Ingredient,S,723,19700101,20991231,NA,Amoxicillin -1717327,ampicillin,Drug,RxNorm,Ingredient,S,733,19700101,20991231,NA,Ampicillin -920293,nitrofurantoin,Drug,RxNorm,Ingredient,S,7454,19700101,20991231,NA,Nitrofurantoin -1721543,norfloxacin,Drug,RxNorm,Ingredient,S,7517,19700101,20991231,NA,Norfloxacin -1724703,oxacillin,Drug,RxNorm,Ingredient,S,7773,19700101,20991231,NA,Oxacillin -1728416,penicillin G,Drug,RxNorm,Ingredient,S,7980,19700101,20991231,NA,Penicillin -1742253,levofloxacin,Drug,RxNorm,Ingredient,S,82122,19700101,20991231,NA,Levofloxacin -1746114,piperacillin,Drug,RxNorm,Ingredient,S,8339,19700101,20991231,NA,Piperacillin-Tazobactam -1550557,prednisolone,Drug,RxNorm,Ingredient,S,8638,19700101,20991231,NA,Prednisolone -1763204,rifampin,Drug,RxNorm,Ingredient,S,9384,19700101,20991231,NA,Rifampicin -4273629,Chemotherapy,Procedure,SNOMED,Procedure,S,367336001,20020131,20991231,NA,Chemotherapy +concept_id,concept_name,standard_concept,sourceCode +4273629,Chemotherapy,S,Chemotherapy +21603754,Monoclonal antibodies,C,Monoclonal Antibodies +1836430,sulfamethoxazole,S,Trimethoprim-Sulfamethoxazole +1836948,tetracycline,S,Tetracycline +902722,tobramycin,S,Tobramycin +1705674,trimethoprim,S,Trimethoprim-Sulfamethoxazole +1707687,vancomycin,S,Vancomycin +19010400,fusidate,S,Fusidic acid +45892419,gentamicin,S,Gentamicin +45892599,ceftolozane,S,Ceftolozane-Tazovactam +46221507,avibactam,S,Ceftazidime-Avibactam +1734104,azithromycin,S,Azithromycin +1736887,linezolid,S,Linezolid +1748975,cefepime,S,Cefepime +1750500,clarithromycin,S,Clarithromycin +1769535,cefadroxil,S,Cefadroxil +1771162,cefazolin,S,Cefazolin +1774470,cefotaxime,S,Cefotaxime +1776684,ceftazidime,S,Ceftazidime +1776684,ceftazidime,S,Ceftazidime-Avibactam +1778162,cefuroxime,S,Cefuroxime +1786617,daptomycin,S,Daptomycin +1797513,ciprofloxacin,S,Ciprofloxacin +997881,clindamycin,S,Clindamycin +901845,colistin,S,Colistin +1709170,meropenem,S,Meropenem +1717963,ertapenem,S,Ertapenem +1518254,dexamethasone,S,Dexamethasone +1741122,tazobactam,S,Piperacillin-Tazobactam +1741122,tazobactam,S,Ceftolozane-Tazovactam +1746940,erythromycin,S,Erythromycin +951511,mupirocin,S,Mupirocin +956653,fosfomycin,S,Fosfomycin +1759842,clavulanate,S,Amoxicillin clavulanate +975125,hydrocortisone,S,Hydrocortisone +1778262,imipenem,S,Imipenem +19078399,teicoplanin,S,Teicoplanin +1790868,amikacin,S,Amikacin +1506270,methylprednisolone,S,Methylprednisolone +1713332,amoxicillin,S,Amoxicillin clavulanate +1713332,amoxicillin,S,Amoxicillin +1717327,ampicillin,S,Ampicillin +920293,nitrofurantoin,S,Nitrofurantoin +1721543,norfloxacin,S,Norfloxacin +1724703,oxacillin,S,Oxacillin +1728416,penicillin G,S,Penicillin +1742253,levofloxacin,S,Levofloxacin +1746114,piperacillin,S,Piperacillin-Tazobactam +1550557,prednisolone,S,Prednisolone +1763204,rifampin,S,Rifampicin diff --git a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv index cdd03cdc..4dc0c783 100644 --- a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv +++ b/project/data/phems_variable_list/is_standard/5.7_antifungals.csv @@ -1,6 +1,6 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -1714277,voriconazole,Drug,RxNorm,Ingredient,S,121243,19700101,20991231,NA,Voriconazole -35606695,isavuconazole,Drug,RxNorm,Ingredient,S,1720882,20160502,20991231,NA,Isovuconazole -19018013,micafungin,Drug,RxNorm,Ingredient,S,325887,20051113,20991231,NA,Micafungin -19026450,anidulafungin,Drug,RxNorm,Ingredient,S,341018,20060514,20991231,NA,Andiulafungin -1754994,fluconazole,Drug,RxNorm,Ingredient,S,4450,19700101,20991231,NA,Fluconazole +concept_id,concept_name,standard_concept,sourceCode +1714277,voriconazole,S,Voriconazole +35606695,isavuconazole,S,Isovuconazole +19018013,micafungin,S,Micafungin +19026450,anidulafungin,S,Andiulafungin +1754994,fluconazole,S,Fluconazole diff --git a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv index 5e9e8db7..d36affad 100644 --- a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv +++ b/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv @@ -1,11 +1,11 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -1707687,vancomycin,Drug,RxNorm,Ingredient,S,11124,19700101,20991231,NA,Vancomycin-resistant -997881,clindamycin,Drug,RxNorm,Ingredient,S,2582,19700101,20991231,NA,Clindamycin-resistant -1746940,erythromycin,Drug,RxNorm,Ingredient,S,4053,19700101,20991231,NA,Erythromycin-resistant -4019195,Methicillin resistant Staphylococcus aureus,Observation,SNOMED,Organism,S,115329001,20020131,20991231,NA,MRSA -4257547,Extended spectrum beta-lactamase producing bacteria,Observation,SNOMED,Organism,S,409799006,20040731,20991231,NA,ESBL -37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Drug-resistant -37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Multidrug-resistant -37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Clindamycin-resistant -37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Vancomycin-resistant -37017134,Multidrug-resistant bacteria,Observation,SNOMED,Organism,S,713351000,20160131,20991231,NA,Erythromycin-resistant +concept_id,concept_name,standard_concept,sourceCode +4019195,Methicillin resistant Staphylococcus aureus,S,MRSA +4257547,Extended spectrum beta-lactamase producing bacteria,S,ESBL +37017134,Multidrug-resistant bacteria,S,Drug-resistant +37017134,Multidrug-resistant bacteria,S,Multidrug-resistant +37017134,Multidrug-resistant bacteria,S,Clindamycin-resistant +37017134,Multidrug-resistant bacteria,S,Vancomycin-resistant +37017134,Multidrug-resistant bacteria,S,Erythromycin-resistant +1707687,vancomycin,S,Vancomycin-resistant +997881,clindamycin,S,Clindamycin-resistant +1746940,erythromycin,S,Erythromycin-resistant diff --git a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv index 0b8dc5d9..e50f982c 100644 --- a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv +++ b/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv @@ -1,42 +1,42 @@ -concept_id,concept_name,domain_id,vocabulary_id,concept_class_id,standard_concept,concept_code,valid_start_date,valid_end_date,invalid_reason,sourceCode -4049734,Banding of pulmonary artery,Procedure,SNOMED,Procedure,S,15648005,20020131,20991231,NA,Application of band to pulmonary artery -4019929,Repair of tetralogy of Fallot,Procedure,SNOMED,Procedure,S,174814003,20020131,20991231,NA,Unspecified repair of tetralogy of fallot -4019932,Arterial switch operation,Procedure,SNOMED,Procedure,S,174826008,20020131,20991231,NA,Repositioning of transposed great arteries -4017751,Repair of total anomalous pulmonary venous connection,Procedure,SNOMED,Procedure,S,174830006,20020131,20991231,NA,Unspecified correction of total anomalous pulmonary  venous connection -4020376,Closure of defect of interatrial septum using pericardial patch,Procedure,SNOMED,Procedure,S,174845004,20020131,20991231,NA,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch -4020506,Creation of valved conduit between right ventricle of heart and pulmonary artery,Procedure,SNOMED,Procedure,S,174883003,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4019950,Revision of valved cardiac conduit,Procedure,SNOMED,Procedure,S,174885005,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4020508,Repair of sinus venosus,Procedure,SNOMED,Procedure,S,174899009,20020131,20991231,NA,Correction of persistent sinus venosus -4018441,Repair of partial anomalous pulmonary venous connection,Procedure,SNOMED,Procedure,S,174900004,20020131,20991231,NA,Correction of partial anomalous pulmonary venous drainage -4020520,Open aortic valvotomy,Procedure,SNOMED,Procedure,S,174968009,20020131,20991231,NA,Open aortic valvotomy -4018747,Operations on the left ventricular outflow tract,Procedure,SNOMED,Procedure,S,174997007,20020131,20991231,NA,Repair of subaortic stenosis -4019233,Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis,Procedure,SNOMED,Procedure,S,175236000,20020131,20991231,NA,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr -4019237,Anastomosis of vena cava to pulmonary artery,Procedure,SNOMED,Procedure,S,175249005,20020131,20991231,NA,Creation of anastomosis to pulmonary artery from vena cava -4018926,Repair of pulmonary artery,Procedure,SNOMED,Procedure,S,175253007,20020131,20991231,NA,Other specified : repair of pulmonary artery -4021725,Removal of band from pulmonary artery,Procedure,SNOMED,Procedure,S,175261002,20020131,20991231,NA,Removal of band from pulmonary artery -4019026,Plastic repair of aorta,Procedure,SNOMED,Procedure,S,175337007,20020131,20991231,NA,Other specified: plastic repair of aorta -4020812,Plastic repair of aorta and end-to-end anastomosis of aorta,Procedure,SNOMED,Procedure,S,175338002,20020131,20991231,NA,Plastic repair of aorta and end to end anastomosis of aorta -4019028,Release of vascular ring of aorta,Procedure,SNOMED,Procedure,S,175341006,20020131,20991231,NA,Release of vascular ring of aorta -44790092,Relief of left ventricular outflow tract obstruction,Procedure,SNOMED,Procedure,S,223341000000109,20061002,20991231,NA,Relief of left ventricular outflow tract obstruction -44789857,Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit,Procedure,SNOMED,Procedure,S,224111000000108,20061002,20991231,NA,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit -4336751,Allotransplant of heart,Procedure,SNOMED,Procedure,S,232973007,20020131,20991231,NA,Unspecified other transplantation of heart/allotransplantation of heart NEC -4049979,Repair of double outlet right ventricle,Procedure,SNOMED,Procedure,S,233126007,20020131,20991231,NA,Repair of double outlet right ventricle -4050114,Closure of ductus arteriosus with clip,Procedure,SNOMED,Procedure,S,233199008,20020131,20991231,NA,Closure of patent ductus arteriosus NEC -4052536,Extracorporeal membrane oxygenation,Procedure,SNOMED,Procedure,S,233573008,20020131,20991231,NA,Extracorporeal membrane oxygenation -44790415,Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty,Procedure,SNOMED,Procedure,S,233601000000100,20061002,20991231,NA,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty -4144921,Implantation of cardiac pacemaker,Procedure,SNOMED,Procedure,S,307280005,20020131,20991231,NA,Implantation of cardiac pacemaker system NEC -4137127,Transplantation of heart,Procedure,SNOMED,Procedure,S,32413006,20020131,20991231,NA,Unspecified other transplantation of heart/allotransplantation of heart NEC -44793133,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt,Procedure,SNOMED,Procedure,S,378121000000101,20090401,20991231,NA,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt -4293619,Repair of tricuspid valve,Procedure,SNOMED,Procedure,S,384643000,20030131,20991231,NA,Tricuspid valve repair NEC -4296790,Transposition of coronary artery,Procedure,SNOMED,Procedure,S,384678000,20030131,20991231,NA,Transposition of coronary artery NEC -4139214,Open implantation of cardiac ventricular assist device,Procedure,SNOMED,Procedure,S,426568003,20070731,20991231,NA,Open implantation of ventricular assist device -4178479,Replacement of valved cardiac conduit,Procedure,SNOMED,Procedure,S,428893001,20080131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -40486525,Primary repair of defect of atrioventricular septum,Procedure,SNOMED,Procedure,S,447748008,20110731,20991231,NA,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum -4187380,Repair of ostium primum defect,Procedure,SNOMED,Procedure,S,47195003,20020131,20991231,NA,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum -4199899,Closure of ventricular septal defect,Procedure,SNOMED,Procedure,S,52930005,20020131,20991231,NA,Unspecified repair of defect of interventricular septum -4203153,Replacement of mitral valve,Procedure,SNOMED,Procedure,S,53059001,20020131,20991231,NA,Replacement of mitral valve NEC -4217615,Plication of diaphragm,Procedure,SNOMED,Procedure,S,81913003,20020131,20991231,NA,Plication of diaphragm -4308136,Complete repair of tetralogy of Fallot with transannular patch,Procedure,SNOMED,Procedure,S,83698002,20020131,20991231,NA,Repair of tetralogy of fallot using transannular patch -4312194,Repair of heart valve,Procedure,SNOMED,Procedure,S,85830006,20020131,20991231,NA,Aortic valve repair NEC -4339184,Replacement of pulmonary valve,Procedure,SNOMED,Procedure,S,88045004,20020131,20991231,NA,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4232476,Repair of ventricular septal defect with prosthesis,Procedure,SNOMED,Procedure,S,89814007,20020131,20991231,NA,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum +concept_id,concept_name,standard_concept,sourceCode +4049734,Banding of pulmonary artery,S,Application of band to pulmonary artery +4019929,Repair of tetralogy of Fallot,S,Unspecified repair of tetralogy of fallot +4019932,Arterial switch operation,S,Repositioning of transposed great arteries +4017751,Repair of total anomalous pulmonary venous connection,S,Unspecified correction of total anomalous pulmonary  venous connection +4020376,Closure of defect of interatrial septum using pericardial patch,S,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch +4020506,Creation of valved conduit between right ventricle of heart and pulmonary artery,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4019950,Revision of valved cardiac conduit,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4020508,Repair of sinus venosus,S,Correction of persistent sinus venosus +4018441,Repair of partial anomalous pulmonary venous connection,S,Correction of partial anomalous pulmonary venous drainage +4020520,Open aortic valvotomy,S,Open aortic valvotomy +4018747,Operations on the left ventricular outflow tract,S,Repair of subaortic stenosis +4019233,Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis,S,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr +4019237,Anastomosis of vena cava to pulmonary artery,S,Creation of anastomosis to pulmonary artery from vena cava +4018926,Repair of pulmonary artery,S,Other specified : repair of pulmonary artery +4021725,Removal of band from pulmonary artery,S,Removal of band from pulmonary artery +4019026,Plastic repair of aorta,S,Other specified: plastic repair of aorta +4020812,Plastic repair of aorta and end-to-end anastomosis of aorta,S,Plastic repair of aorta and end to end anastomosis of aorta +4019028,Release of vascular ring of aorta,S,Release of vascular ring of aorta +44790092,Relief of left ventricular outflow tract obstruction,S,Relief of left ventricular outflow tract obstruction +44789857,Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit,S,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit +4336751,Allotransplant of heart,S,Unspecified other transplantation of heart/allotransplantation of heart NEC +4049979,Repair of double outlet right ventricle,S,Repair of double outlet right ventricle +4050114,Closure of ductus arteriosus with clip,S,Closure of patent ductus arteriosus NEC +4052536,Extracorporeal membrane oxygenation,S,Extracorporeal membrane oxygenation +44790415,Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty,S,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty +4144921,Implantation of cardiac pacemaker,S,Implantation of cardiac pacemaker system NEC +4137127,Transplantation of heart,S,Unspecified other transplantation of heart/allotransplantation of heart NEC +44793133,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt,S,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt +4293619,Repair of tricuspid valve,S,Tricuspid valve repair NEC +4296790,Transposition of coronary artery,S,Transposition of coronary artery NEC +4139214,Open implantation of cardiac ventricular assist device,S,Open implantation of ventricular assist device +4178479,Replacement of valved cardiac conduit,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +40486525,Primary repair of defect of atrioventricular septum,S,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum +4187380,Repair of ostium primum defect,S,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum +4199899,Closure of ventricular septal defect,S,Unspecified repair of defect of interventricular septum +4203153,Replacement of mitral valve,S,Replacement of mitral valve NEC +4217615,Plication of diaphragm,S,Plication of diaphragm +4308136,Complete repair of tetralogy of Fallot with transannular patch,S,Repair of tetralogy of fallot using transannular patch +4312194,Repair of heart valve,S,Aortic valve repair NEC +4339184,Replacement of pulmonary valve,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec +4232476,Repair of ventricular septal defect with prosthesis,S,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum From 1fa06c2cdba6325f59e21ec017ff7de986fdb3f0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:23:42 +0200 Subject: [PATCH 024/130] update .gitignore --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ee78f0ce..5dcba6bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ !.gitignore # Capr +.Rprofile .Rhistory .Rproj.user .DS_Store @@ -13,5 +14,7 @@ inst/doc # project-specific project/config/* -!project/config/config-sample.yml -project/vocabularies/ +!project/config/*-sample.yml +project/vocabularies/* +project/data/* +!project/data/phems_variable_list From b4af833db80d3cea60f33999a16361d390f0ed18 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:24:24 +0200 Subject: [PATCH 025/130] update renv --- project/renv.lock | 3709 ++++++++++++++++++++++----------------------- 1 file changed, 1825 insertions(+), 1884 deletions(-) diff --git a/project/renv.lock b/project/renv.lock index 81b52b23..4e08e88b 100644 --- a/project/renv.lock +++ b/project/renv.lock @@ -1,1884 +1,1825 @@ -{ - "R": { - "Version": "4.4.0", - "Repositories": [ - { - "Name": "CRAN", - "URL": "https://packagemanager.posit.co/cran/latest" - } - ] - }, - "Packages": { - "Capr": { - "Package": "Capr", - "Version": "2.0.8", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "Capr", - "RemoteUsername": "ohdsi", - "RemoteRef": "v2.0.8", - "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", - "Requirements": [ - "CirceR", - "DBI", - "DatabaseConnector", - "R", - "SqlRender", - "checkmate", - "cli", - "digest", - "dplyr", - "fs", - "generics", - "glue", - "jsonlite", - "lubridate", - "magrittr", - "methods", - "purrr", - "readr", - "rlang", - "stringr", - "tibble", - "tidyr" - ], - "Hash": "5c14cb5c92bf80da1542420717c7c7e8" - }, - "CirceR": { - "Package": "CirceR", - "Version": "1.3.3", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "CirceR", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "30303ec28bfd3bd4deffc9f84e7b8f9ddbf93c77", - "Requirements": [ - "R", - "RJSONIO", - "rJava" - ], - "Hash": "3e9b4a57bbac2222751f20d4d59a390f" - }, - "CohortGenerator": { - "Package": "CohortGenerator", - "Version": "0.9.0", - "Source": "GitHub", - "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "CohortGenerator", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", - "Requirements": [ - "DatabaseConnector", - "ParallelLogger", - "R", - "R6", - "RJSONIO", - "SqlRender", - "bit64", - "checkmate", - "digest", - "dplyr", - "jsonlite", - "lubridate", - "readr", - "rlang", - "stringi" - ], - "Hash": "1ba1b2d91607742e1d53676af13f506f" - }, - "CommonDataModel": { - "Package": "CommonDataModel", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "DatabaseConnector", - "SqlRender", - "dplyr", - "rJava", - "readr", - "rmarkdown", - "stringr" - ], - "Hash": "d009324efba4c142b431202580eb09d1" - }, - "DBI": { - "Package": "DBI", - "Version": "1.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "065ae649b05f1ff66bb0c793107508f5" - }, - "DatabaseConnector": { - "Package": "DatabaseConnector", - "Version": "6.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "SqlRender", - "bit64", - "checkmate", - "dbplyr", - "digest", - "methods", - "rJava", - "readr", - "rlang", - "stringr", - "urltools", - "utils" - ], - "Hash": "1ef65614602c6534a6c666e872c3b647" - }, - "Eunomia": { - "Package": "Eunomia", - "Version": "2.0.0", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "Eunomia", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", - "Requirements": [ - "CommonDataModel", - "DBI", - "RSQLite", - "arrow", - "readr", - "rlang" - ], - "Hash": "a4cd8b6a4182cc97a6aef3e9b0ab358e" - }, - "ParallelLogger": { - "Package": "ParallelLogger", - "Version": "3.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "jsonlite", - "methods", - "snow", - "utils", - "xml2" - ], - "Hash": "fd636fc067099b75b8ad17e9104b10f3" - }, - "R6": { - "Package": "R6", - "Version": "2.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "470851b6d5d0ac559e9d01bb352b4021" - }, - "RJSONIO": { - "Package": "RJSONIO", - "Version": "1.3-1.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods" - ], - "Hash": "2f89abc0f88c647d3386c672632f4baf" - }, - "RSQLite": { - "Package": "RSQLite", - "Version": "2.3.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "bit64", - "blob", - "cpp11", - "memoise", - "methods", - "pkgconfig", - "plogr", - "rlang" - ], - "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" - }, - "Rcpp": { - "Package": "Rcpp", - "Version": "1.0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "utils" - ], - "Hash": "5ea2700d21e038ace58269ecdbeb9ec0" - }, - "SqlRender": { - "Package": "SqlRender", - "Version": "1.18.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "checkmate", - "rJava", - "rlang" - ], - "Hash": "e1762de0f08b14658d74989c10e2f265" - }, - "arrow": { - "Package": "arrow", - "Version": "16.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "assertthat", - "bit64", - "cpp11", - "glue", - "methods", - "purrr", - "rlang", - "stats", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "d9cb18a8fc53895548150650cadde3a6" - }, - "askpass": { - "Package": "askpass", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "sys" - ], - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" - }, - "assertthat": { - "Package": "assertthat", - "Version": "0.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "50c838a310445e954bc13f26f26a6ecf" - }, - "backports": { - "Package": "backports", - "Version": "1.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "e1e1b9d75c37401117b636b7ae50827a" - }, - "base64enc": { - "Package": "base64enc", - "Version": "0.1-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "543776ae6848fde2f48ff3816d0628bc" - }, - "bit": { - "Package": "bit", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "d242abec29412ce988848d0294b208fd" - }, - "bit64": { - "Package": "bit64", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bit", - "methods", - "stats", - "utils" - ], - "Hash": "9fe98599ca456d6552421db0d6772d8f" - }, - "blob": { - "Package": "blob", - "Version": "1.2.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "rlang", - "vctrs" - ], - "Hash": "40415719b5a479b87949f3aa0aee737c" - }, - "brew": { - "Package": "brew", - "Version": "1.0-10", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f4a384e19dccd8c65356dc096847b76" - }, - "brio": { - "Package": "brio", - "Version": "1.1.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "c1ee497a6d999947c2c224ae46799b1a" - }, - "bslib": { - "Package": "bslib", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "cachem", - "fastmap", - "grDevices", - "htmltools", - "jquerylib", - "jsonlite", - "lifecycle", - "memoise", - "mime", - "rlang", - "sass" - ], - "Hash": "8644cc53f43828f19133548195d7e59e" - }, - "cachem": { - "Package": "cachem", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "fastmap", - "rlang" - ], - "Hash": "cd9a672193789068eb5a2aad65a0dedf" - }, - "callr": { - "Package": "callr", - "Version": "3.7.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "processx", - "utils" - ], - "Hash": "d7e13f49c19103ece9e58ad2d83a7354" - }, - "checkmate": { - "Package": "checkmate", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "backports", - "utils" - ], - "Hash": "c01cab1cb0f9125211a6fc99d540e315" - }, - "cli": { - "Package": "cli", - "Version": "3.6.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" - }, - "clipr": { - "Package": "clipr", - "Version": "0.8.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" - }, - "commonmark": { - "Package": "commonmark", - "Version": "1.9.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5d8225445acb167abf7797de48b2ee3c" - }, - "cpp11": { - "Package": "cpp11", - "Version": "0.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5a295d7d963cc5035284dcdbaf334f4e" - }, - "crayon": { - "Package": "crayon", - "Version": "1.5.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "methods", - "utils" - ], - "Hash": "859d96e65ef198fd43e82b9628d593ef" - }, - "credentials": { - "Package": "credentials", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass", - "curl", - "jsonlite", - "openssl", - "sys" - ], - "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" - }, - "curl": { - "Package": "curl", - "Version": "5.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" - }, - "dbplyr": { - "Package": "dbplyr", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "R6", - "blob", - "cli", - "dplyr", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "purrr", - "rlang", - "tibble", - "tidyr", - "tidyselect", - "utils", - "vctrs", - "withr" - ], - "Hash": "39b2e002522bfd258039ee4e889e0fd1" - }, - "desc": { - "Package": "desc", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "utils" - ], - "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" - }, - "devtools": { - "Package": "devtools", - "Version": "2.4.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "desc", - "ellipsis", - "fs", - "lifecycle", - "memoise", - "miniUI", - "pkgbuild", - "pkgdown", - "pkgload", - "profvis", - "rcmdcheck", - "remotes", - "rlang", - "roxygen2", - "rversions", - "sessioninfo", - "stats", - "testthat", - "tools", - "urlchecker", - "usethis", - "utils", - "withr" - ], - "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" - }, - "diffobj": { - "Package": "diffobj", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "crayon", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" - }, - "digest": { - "Package": "digest", - "Version": "0.6.35", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "698ece7ba5a4fa4559e3d537e7ec3d31" - }, - "downlit": { - "Package": "downlit", - "Version": "0.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "brio", - "desc", - "digest", - "evaluate", - "fansi", - "memoise", - "rlang", - "vctrs", - "withr", - "yaml" - ], - "Hash": "45a6a596bf0108ee1ff16a040a2df897" - }, - "dplyr": { - "Package": "dplyr", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "generics", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "rlang", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" - }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, - "evaluate": { - "Package": "evaluate", - "Version": "0.24.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" - }, - "fansi": { - "Package": "fansi", - "Version": "1.0.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "utils" - ], - "Hash": "962174cf2aeb5b9eea581522286a911f" - }, - "fastmap": { - "Package": "fastmap", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" - }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" - }, - "fs": { - "Package": "fs", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" - }, - "generics": { - "Package": "generics", - "Version": "0.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15e9634c0fcd294799e9b2e929ed1b86" - }, - "gert": { - "Package": "gert", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass", - "credentials", - "openssl", - "rstudioapi", - "sys", - "zip" - ], - "Hash": "f70d3fe2d9e7654213a946963d1591eb" - }, - "gh": { - "Package": "gh", - "Version": "1.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "gitcreds", - "glue", - "httr2", - "ini", - "jsonlite", - "lifecycle", - "rlang" - ], - "Hash": "fbbbc48eba7a6626a08bb365e44b563b" - }, - "gitcreds": { - "Package": "gitcreds", - "Version": "0.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" - }, - "glue": { - "Package": "glue", - "Version": "1.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" - }, - "highr": { - "Package": "highr", - "Version": "0.11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "xfun" - ], - "Hash": "d65ba49117ca223614f71b60d85b8ab7" - }, - "hms": { - "Package": "hms", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" - ], - "Hash": "b59377caa7ed00fa41808342002138f9" - }, - "htmltools": { - "Package": "htmltools", - "Version": "0.5.8.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "digest", - "fastmap", - "grDevices", - "rlang", - "utils" - ], - "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" - }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "04291cc45198225444a397606810ac37" - }, - "httpuv": { - "Package": "httpuv", - "Version": "1.6.15", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "Rcpp", - "later", - "promises", - "utils" - ], - "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" - }, - "httr": { - "Package": "httr", - "Version": "1.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "curl", - "jsonlite", - "mime", - "openssl" - ], - "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" - }, - "httr2": { - "Package": "httr2", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "curl", - "glue", - "lifecycle", - "magrittr", - "openssl", - "rappdirs", - "rlang", - "vctrs", - "withr" - ], - "Hash": "03d741c92fda96d98c3a3f22494e3b4a" - }, - "ini": { - "Package": "ini", - "Version": "0.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "6154ec2223172bce8162d4153cda21f7" - }, - "jquerylib": { - "Package": "jquerylib", - "Version": "0.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools" - ], - "Hash": "5aab57a3bd297eee1c1d862735972182" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods" - ], - "Hash": "e1b9c55281c5adc4dd113652d9e26768" - }, - "knitr": { - "Package": "knitr", - "Version": "1.47", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "evaluate", - "highr", - "methods", - "tools", - "xfun", - "yaml" - ], - "Hash": "7c99b2d55584b982717fcc0950378612" - }, - "later": { - "Package": "later", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp", - "rlang" - ], - "Hash": "a3e051d405326b8b0012377434c62b37" - }, - "lifecycle": { - "Package": "lifecycle", - "Version": "1.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "rlang" - ], - "Hash": "b8552d117e1b808b09a832f589b79035" - }, - "lubridate": { - "Package": "lubridate", - "Version": "1.9.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "generics", - "methods", - "timechange" - ], - "Hash": "680ad542fbcf801442c83a6ac5a2126c" - }, - "magrittr": { - "Package": "magrittr", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "7ce2733a9826b3aeb1775d56fd305472" - }, - "memoise": { - "Package": "memoise", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cachem", - "rlang" - ], - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" - }, - "mime": { - "Package": "mime", - "Version": "0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "18e9c28c1d3ca1560ce30658b22ce104" - }, - "miniUI": { - "Package": "miniUI", - "Version": "0.1.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools", - "shiny", - "utils" - ], - "Hash": "fec5f52652d60615fdb3957b3d74324a" - }, - "openssl": { - "Package": "openssl", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass" - ], - "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" - }, - "pillar": { - "Package": "pillar", - "Version": "1.9.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cli", - "fansi", - "glue", - "lifecycle", - "rlang", - "utf8", - "utils", - "vctrs" - ], - "Hash": "15da5a8412f317beeee6175fbc76f4bb" - }, - "pkgbuild": { - "Package": "pkgbuild", - "Version": "1.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "callr", - "cli", - "desc", - "processx" - ], - "Hash": "a29e8e134a460a01e0ca67a4763c595b" - }, - "pkgconfig": { - "Package": "pkgconfig", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "01f28d4278f15c76cddbea05899c5d6f" - }, - "pkgdown": { - "Package": "pkgdown", - "Version": "2.0.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "callr", - "cli", - "desc", - "digest", - "downlit", - "fs", - "httr", - "jsonlite", - "magrittr", - "memoise", - "purrr", - "ragg", - "rlang", - "rmarkdown", - "tibble", - "whisker", - "withr", - "xml2", - "yaml" - ], - "Hash": "8bf1151ed1a48328d71b937e651117a6" - }, - "pkgload": { - "Package": "pkgload", - "Version": "1.3.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "crayon", - "desc", - "fs", - "glue", - "methods", - "pkgbuild", - "rlang", - "rprojroot", - "utils", - "withr" - ], - "Hash": "876c618df5ae610be84356d5d7a5d124" - }, - "plogr": { - "Package": "plogr", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "09eb987710984fc2905c7129c7d85e65" - }, - "praise": { - "Package": "praise", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a555924add98c99d2f411e37e7d25e9f" - }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" - }, - "processx": { - "Package": "processx", - "Version": "3.8.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "ps", - "utils" - ], - "Hash": "0c90a7d71988856bad2a2a45dd871bb9" - }, - "profvis": { - "Package": "profvis", - "Version": "0.3.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmlwidgets", - "purrr", - "rlang", - "stringr", - "vctrs" - ], - "Hash": "aa5a3864397ce6ae03458f98618395a1" - }, - "progress": { - "Package": "progress", - "Version": "1.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "crayon", - "hms", - "prettyunits" - ], - "Hash": "f4625e061cb2865f111b47ff163a5ca6" - }, - "promises": { - "Package": "promises", - "Version": "1.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "Rcpp", - "fastmap", - "later", - "magrittr", - "rlang", - "stats" - ], - "Hash": "434cd5388a3979e74be5c219bcd6e77d" - }, - "ps": { - "Package": "ps", - "Version": "1.7.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" - }, - "purrr": { - "Package": "purrr", - "Version": "1.0.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "lifecycle", - "magrittr", - "rlang", - "vctrs" - ], - "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" - }, - "rJava": { - "Package": "rJava", - "Version": "1.0-11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "524167e771b81342f8dd7a891ed3afa8" - }, - "ragg": { - "Package": "ragg", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "systemfonts", - "textshaping" - ], - "Hash": "e3087db406e079a8a2fd87f413918ed3" - }, - "rappdirs": { - "Package": "rappdirs", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5e3c5dc0b071b21fa128676560dbe94d" - }, - "rcmdcheck": { - "Package": "rcmdcheck", - "Version": "1.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "callr", - "cli", - "curl", - "desc", - "digest", - "pkgbuild", - "prettyunits", - "rprojroot", - "sessioninfo", - "utils", - "withr", - "xopen" - ], - "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" - }, - "readr": { - "Package": "readr", - "Version": "2.1.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "clipr", - "cpp11", - "crayon", - "hms", - "lifecycle", - "methods", - "rlang", - "tibble", - "tzdb", - "utils", - "vroom" - ], - "Hash": "9de96463d2117f6ac49980577939dfb3" - }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tibble" - ], - "Hash": "76c9e04c712a05848ae7a23d2f170a40" - }, - "remotes": { - "Package": "remotes", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "3ee025083e66f18db6cf27b56e23e141" - }, - "renv": { - "Package": "renv", - "Version": "1.0.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "397b7b2a265bc5a7a06852524dabae20" - }, - "rlang": { - "Package": "rlang", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" - }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.27", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "27f9502e1cdbfa195f94e03b0f517484" - }, - "roxygen2": { - "Package": "roxygen2", - "Version": "7.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brew", - "cli", - "commonmark", - "cpp11", - "desc", - "knitr", - "methods", - "pkgload", - "purrr", - "rlang", - "stringi", - "stringr", - "utils", - "withr", - "xml2" - ], - "Hash": "c25fe7b2d8cba73d1b63c947bf7afdb9" - }, - "rprojroot": { - "Package": "rprojroot", - "Version": "2.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" - }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "96710351d642b70e8f02ddeb237c46a7" - }, - "rversions": { - "Package": "rversions", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "curl", - "utils", - "xml2" - ], - "Hash": "a9881dfed103e83f9de151dc17002cd1" - }, - "sass": { - "Package": "sass", - "Version": "0.4.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "fs", - "htmltools", - "rappdirs", - "rlang" - ], - "Hash": "d53dbfddf695303ea4ad66f86e99b95d" - }, - "sessioninfo": { - "Package": "sessioninfo", - "Version": "1.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "tools", - "utils" - ], - "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" - }, - "shiny": { - "Package": "shiny", - "Version": "1.8.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "bslib", - "cachem", - "commonmark", - "crayon", - "fastmap", - "fontawesome", - "glue", - "grDevices", - "htmltools", - "httpuv", - "jsonlite", - "later", - "lifecycle", - "methods", - "mime", - "promises", - "rlang", - "sourcetools", - "tools", - "utils", - "withr", - "xtable" - ], - "Hash": "54b26646816af9960a4c64d8ceec75d6" - }, - "snow": { - "Package": "snow", - "Version": "0.4-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "40b74690debd20c57d93d8c246b305d4" - }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5f5a7629f956619d519205ec475fe647" - }, - "stringi": { - "Package": "stringi", - "Version": "1.8.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "tools", - "utils" - ], - "Hash": "39e1144fd75428983dc3f63aa53dfa91" - }, - "stringr": { - "Package": "stringr", - "Version": "1.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "magrittr", - "rlang", - "stringi", - "vctrs" - ], - "Hash": "960e2ae9e09656611e0b8214ad543207" - }, - "sys": { - "Package": "sys", - "Version": "3.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" - }, - "systemfonts": { - "Package": "systemfonts", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle" - ], - "Hash": "213b6b8ed5afbf934843e6c3b090d418" - }, - "testthat": { - "Package": "testthat", - "Version": "3.2.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brio", - "callr", - "cli", - "desc", - "digest", - "evaluate", - "jsonlite", - "lifecycle", - "magrittr", - "methods", - "pkgload", - "praise", - "processx", - "ps", - "rlang", - "utils", - "waldo", - "withr" - ], - "Hash": "3f6e7e5e2220856ff865e4834766bf2b" - }, - "textshaping": { - "Package": "textshaping", - "Version": "0.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle", - "systemfonts" - ], - "Hash": "5142f8bc78ed3d819d26461b641627ce" - }, - "tibble": { - "Package": "tibble", - "Version": "3.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "fansi", - "lifecycle", - "magrittr", - "methods", - "pillar", - "pkgconfig", - "rlang", - "utils", - "vctrs" - ], - "Hash": "a84e2cc86d07289b3b6f5069df7a004c" - }, - "tidyr": { - "Package": "tidyr", - "Version": "1.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "cpp11", - "dplyr", - "glue", - "lifecycle", - "magrittr", - "purrr", - "rlang", - "stringr", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" - }, - "tidyselect": { - "Package": "tidyselect", - "Version": "1.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang", - "vctrs", - "withr" - ], - "Hash": "829f27b9c4919c16b593794a6344d6c0" - }, - "timechange": { - "Package": "timechange", - "Version": "0.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11" - ], - "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" - }, - "tinytex": { - "Package": "tinytex", - "Version": "0.51", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "xfun" - ], - "Hash": "d44e2fcd2e4e076f0aac540208559d1d" - }, - "triebeard": { - "Package": "triebeard", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp" - ], - "Hash": "642507a148b0dd9b5620177e0a044413" - }, - "tzdb": { - "Package": "tzdb", - "Version": "0.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11" - ], - "Hash": "f561504ec2897f4d46f0c7657e488ae1" - }, - "urlchecker": { - "Package": "urlchecker", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "curl", - "tools", - "xml2" - ], - "Hash": "409328b8e1253c8d729a7836fe7f7a16" - }, - "urltools": { - "Package": "urltools", - "Version": "1.7.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "methods", - "triebeard" - ], - "Hash": "e86a704261a105f4703f653e05defa3e" - }, - "usethis": { - "Package": "usethis", - "Version": "2.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "clipr", - "crayon", - "curl", - "desc", - "fs", - "gert", - "gh", - "glue", - "jsonlite", - "lifecycle", - "purrr", - "rappdirs", - "rlang", - "rprojroot", - "rstudioapi", - "stats", - "utils", - "whisker", - "withr", - "yaml" - ], - "Hash": "d524fd42c517035027f866064417d7e6" - }, - "utf8": { - "Package": "utf8", - "Version": "1.2.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "62b65c52671e6665f803ff02954446e9" - }, - "vctrs": { - "Package": "vctrs", - "Version": "0.6.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang" - ], - "Hash": "c03fa420630029418f7e6da3667aac4a" - }, - "vroom": { - "Package": "vroom", - "Version": "1.6.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bit64", - "cli", - "cpp11", - "crayon", - "glue", - "hms", - "lifecycle", - "methods", - "progress", - "rlang", - "stats", - "tibble", - "tidyselect", - "tzdb", - "vctrs", - "withr" - ], - "Hash": "390f9315bc0025be03012054103d227c" - }, - "waldo": { - "Package": "waldo", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "diffobj", - "fansi", - "glue", - "methods", - "rematch2", - "rlang", - "tibble" - ], - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" - }, - "whisker": { - "Package": "whisker", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "c6abfa47a46d281a7d5159d0a8891e88" - }, - "withr": { - "Package": "withr", - "Version": "3.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics" - ], - "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" - }, - "xfun": { - "Package": "xfun", - "Version": "0.45", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "stats", - "tools" - ], - "Hash": "ca59c87fe305b16a9141a5874c3a7889" - }, - "xml2": { - "Package": "xml2", - "Version": "1.3.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "methods", - "rlang" - ], - "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" - }, - "xopen": { - "Package": "xopen", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "processx" - ], - "Hash": "423df1e86d5533fcb73c6b02b4923b49" - }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, - "yaml": { - "Package": "yaml", - "Version": "2.3.8", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "29240487a071f535f5e5d5a323b7afbd" - }, - "zip": { - "Package": "zip", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" - } - } -} +{ + "R": { + "Version": "4.4.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.posit.co/cran/latest" + } + ] + }, + "Packages": { + "Capr": { + "Package": "Capr", + "Version": "2.0.8", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Capr", + "RemoteUsername": "ohdsi", + "RemoteRef": "v2.0.8", + "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", + "Requirements": [ + "CirceR", + "DBI", + "DatabaseConnector", + "R", + "SqlRender", + "checkmate", + "cli", + "digest", + "dplyr", + "fs", + "generics", + "glue", + "jsonlite", + "lubridate", + "magrittr", + "methods", + "purrr", + "readr", + "rlang", + "stringr", + "tibble", + "tidyr" + ], + "Hash": "5c14cb5c92bf80da1542420717c7c7e8" + }, + "CirceR": { + "Package": "CirceR", + "Version": "1.3.3", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "CirceR", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "30303ec28bfd3bd4deffc9f84e7b8f9ddbf93c77", + "Requirements": [ + "R", + "RJSONIO", + "rJava" + ], + "Hash": "3e9b4a57bbac2222751f20d4d59a390f" + }, + "CohortGenerator": { + "Package": "CohortGenerator", + "Version": "0.9.0", + "Source": "GitHub", + "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "CohortGenerator", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", + "Requirements": [ + "DatabaseConnector", + "ParallelLogger", + "R", + "R6", + "RJSONIO", + "SqlRender", + "bit64", + "checkmate", + "digest", + "dplyr", + "jsonlite", + "lubridate", + "readr", + "rlang", + "stringi" + ], + "Hash": "1ba1b2d91607742e1d53676af13f506f" + }, + "DBI": { + "Package": "DBI", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "065ae649b05f1ff66bb0c793107508f5" + }, + "DatabaseConnector": { + "Package": "DatabaseConnector", + "Version": "6.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "SqlRender", + "bit64", + "checkmate", + "dbplyr", + "digest", + "methods", + "rJava", + "readr", + "rlang", + "stringr", + "urltools", + "utils" + ], + "Hash": "1ef65614602c6534a6c666e872c3b647" + }, + "ParallelLogger": { + "Package": "ParallelLogger", + "Version": "3.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "jsonlite", + "methods", + "snow", + "utils", + "xml2" + ], + "Hash": "fd636fc067099b75b8ad17e9104b10f3" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RJSONIO": { + "Package": "RJSONIO", + "Version": "1.3-1.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" + ], + "Hash": "2f89abc0f88c647d3386c672632f4baf" + }, + "RSQLite": { + "Package": "RSQLite", + "Version": "2.3.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "bit64", + "blob", + "cpp11", + "memoise", + "methods", + "pkgconfig", + "plogr", + "rlang" + ], + "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "utils" + ], + "Hash": "5ea2700d21e038ace58269ecdbeb9ec0" + }, + "SqlRender": { + "Package": "SqlRender", + "Version": "1.18.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "checkmate", + "rJava", + "rlang" + ], + "Hash": "e1762de0f08b14658d74989c10e2f265" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "backports": { + "Package": "backports", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "e1e1b9d75c37401117b636b7ae50827a" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "d242abec29412ce988848d0294b208fd" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bit", + "methods", + "stats", + "utils" + ], + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "blob": { + "Package": "blob", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "rlang", + "vctrs" + ], + "Hash": "40415719b5a479b87949f3aa0aee737c" + }, + "brew": { + "Package": "brew", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8f4a384e19dccd8c65356dc096847b76" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "8644cc53f43828f19133548195d7e59e" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "callr": { + "Package": "callr", + "Version": "3.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" + }, + "checkmate": { + "Package": "checkmate", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "backports", + "utils" + ], + "Hash": "c01cab1cb0f9125211a6fc99d540e315" + }, + "cli": { + "Package": "cli", + "Version": "3.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5d8225445acb167abf7797de48b2ee3c" + }, + "config": { + "Package": "config", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "yaml" + ], + "Hash": "8b7222e9d9eb5178eea545c0c4d33fc2" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "859d96e65ef198fd43e82b9628d593ef" + }, + "credentials": { + "Package": "credentials", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ], + "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + }, + "curl": { + "Package": "curl", + "Version": "5.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + }, + "dbplyr": { + "Package": "dbplyr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "R6", + "blob", + "cli", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "purrr", + "rlang", + "tibble", + "tidyr", + "tidyselect", + "utils", + "vctrs", + "withr" + ], + "Hash": "39b2e002522bfd258039ee4e889e0fd1" + }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "desc", + "ellipsis", + "fs", + "lifecycle", + "memoise", + "miniUI", + "pkgbuild", + "pkgdown", + "pkgload", + "profvis", + "rcmdcheck", + "remotes", + "rlang", + "roxygen2", + "rversions", + "sessioninfo", + "stats", + "testthat", + "tools", + "urlchecker", + "usethis", + "utils", + "withr" + ], + "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.35", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "698ece7ba5a4fa4559e3d537e7ec3d31" + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ], + "Hash": "45a6a596bf0108ee1ff16a040a2df897" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "rlang", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "rlang" + ], + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "962174cf2aeb5b9eea581522286a911f" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" + }, + "gert": { + "Package": "gert", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" + ], + "Hash": "f70d3fe2d9e7654213a946963d1591eb" + }, + "gh": { + "Package": "gh", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "gitcreds", + "glue", + "httr2", + "ini", + "jsonlite", + "lifecycle", + "rlang" + ], + "Hash": "fbbbc48eba7a6626a08bb365e44b563b" + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "04291cc45198225444a397606810ac37" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.15", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" + }, + "httr": { + "Package": "httr", + "Version": "1.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" + }, + "httr2": { + "Package": "httr2", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "curl", + "glue", + "lifecycle", + "magrittr", + "openssl", + "rappdirs", + "rlang", + "vctrs", + "withr" + ], + "Hash": "03d741c92fda96d98c3a3f22494e3b4a" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" + ], + "Hash": "e1b9c55281c5adc4dd113652d9e26768" + }, + "knitr": { + "Package": "knitr", + "Version": "1.47", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "7c99b2d55584b982717fcc0950378612" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" + }, + "lubridate": { + "Package": "lubridate", + "Version": "1.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "generics", + "methods", + "timechange" + ], + "Hash": "680ad542fbcf801442c83a6ac5a2126c" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "miniUI": { + "Package": "miniUI", + "Version": "0.1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools", + "shiny", + "utils" + ], + "Hash": "fec5f52652d60615fdb3957b3d74324a" + }, + "openssl": { + "Package": "openssl", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass" + ], + "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "a29e8e134a460a01e0ca67a4763c595b" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fs", + "httr", + "jsonlite", + "magrittr", + "memoise", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ], + "Hash": "8bf1151ed1a48328d71b937e651117a6" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "crayon", + "desc", + "fs", + "glue", + "methods", + "pkgbuild", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "876c618df5ae610be84356d5d7a5d124" + }, + "plogr": { + "Package": "plogr", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "09eb987710984fc2905c7129c7d85e65" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" + }, + "processx": { + "Package": "processx", + "Version": "3.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" + }, + "profvis": { + "Package": "profvis", + "Version": "0.3.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmlwidgets", + "purrr", + "rlang", + "stringr", + "vctrs" + ], + "Hash": "aa5a3864397ce6ae03458f98618395a1" + }, + "progress": { + "Package": "progress", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "f4625e061cb2865f111b47ff163a5ca6" + }, + "promises": { + "Package": "promises", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" + ], + "Hash": "434cd5388a3979e74be5c219bcd6e77d" + }, + "ps": { + "Package": "ps", + "Version": "1.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" + }, + "rJava": { + "Package": "rJava", + "Version": "1.0-11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "524167e771b81342f8dd7a891ed3afa8" + }, + "ragg": { + "Package": "ragg", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "systemfonts", + "textshaping" + ], + "Hash": "e3087db406e079a8a2fd87f413918ed3" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "callr", + "cli", + "curl", + "desc", + "digest", + "pkgbuild", + "prettyunits", + "rprojroot", + "sessioninfo", + "utils", + "withr", + "xopen" + ], + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" + }, + "readr": { + "Package": "readr", + "Version": "2.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "methods", + "rlang", + "tibble", + "tzdb", + "utils", + "vroom" + ], + "Hash": "9de96463d2117f6ac49980577939dfb3" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "3ee025083e66f18db6cf27b56e23e141" + }, + "renv": { + "Package": "renv", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "397b7b2a265bc5a7a06852524dabae20" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "27f9502e1cdbfa195f94e03b0f517484" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "knitr", + "methods", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "utils", + "withr", + "xml2" + ], + "Hash": "c25fe7b2d8cba73d1b63c947bf7afdb9" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96710351d642b70e8f02ddeb237c46a7" + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "curl", + "utils", + "xml2" + ], + "Hash": "a9881dfed103e83f9de151dc17002cd1" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "tools", + "utils" + ], + "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" + }, + "shiny": { + "Package": "shiny", + "Version": "1.8.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "54b26646816af9960a4c64d8ceec75d6" + }, + "snow": { + "Package": "snow", + "Version": "0.4-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "40b74690debd20c57d93d8c246b305d4" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" + }, + "stringi": { + "Package": "stringi", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "39e1144fd75428983dc3f63aa53dfa91" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "960e2ae9e09656611e0b8214ad543207" + }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle" + ], + "Hash": "213b6b8ed5afbf934843e6c3b090d418" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle", + "systemfonts" + ], + "Hash": "5142f8bc78ed3d819d26461b641627ce" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "cpp11", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ], + "Hash": "829f27b9c4919c16b593794a6344d6c0" + }, + "timechange": { + "Package": "timechange", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.51", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "d44e2fcd2e4e076f0aac540208559d1d" + }, + "triebeard": { + "Package": "triebeard", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp" + ], + "Hash": "642507a148b0dd9b5620177e0a044413" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "f561504ec2897f4d46f0c7657e488ae1" + }, + "urlchecker": { + "Package": "urlchecker", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "curl", + "tools", + "xml2" + ], + "Hash": "409328b8e1253c8d729a7836fe7f7a16" + }, + "urltools": { + "Package": "urltools", + "Version": "1.7.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "methods", + "triebeard" + ], + "Hash": "e86a704261a105f4703f653e05defa3e" + }, + "usethis": { + "Package": "usethis", + "Version": "2.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "stats", + "utils", + "whisker", + "withr", + "yaml" + ], + "Hash": "d524fd42c517035027f866064417d7e6" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "62b65c52671e6665f803ff02954446e9" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "vroom": { + "Package": "vroom", + "Version": "1.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "methods", + "progress", + "rlang", + "stats", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ], + "Hash": "390f9315bc0025be03012054103d227c" + }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" + }, + "withr": { + "Package": "withr", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics" + ], + "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.45", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "ca59c87fe305b16a9141a5874c3a7889" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "processx" + ], + "Hash": "423df1e86d5533fcb73c6b02b4923b49" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "29240487a071f535f5e5d5a323b7afbd" + }, + "zip": { + "Package": "zip", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" + } + } +} From 9269137ee4c711f358ed8392b9e60b46966269e3 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:25:26 +0200 Subject: [PATCH 026/130] add config files --- project/config/config-sample.yml | 14 ---------- project/config/connection_config-sample.yml | 27 ++++++++++++++++++++ project/config/is_standard_config-sample.yml | 6 +++++ 3 files changed, 33 insertions(+), 14 deletions(-) delete mode 100644 project/config/config-sample.yml create mode 100644 project/config/connection_config-sample.yml create mode 100644 project/config/is_standard_config-sample.yml diff --git a/project/config/config-sample.yml b/project/config/config-sample.yml deleted file mode 100644 index 5e878a75..00000000 --- a/project/config/config-sample.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -## Connection details -# Used as input to DatabaseConnector::createConnectionDetails() -# see the function documentation for more information -# Please check carefully which details are required for your dbms -# as not all of these details may be required. -connectionDetails: - dbms: 'postgresql' - user: 'postgres' - password: 'postgres' - server: 'host/database' - port: 5432 - oracleDriver: null - pathToDriver: './drivers/jdbc/' \ No newline at end of file diff --git a/project/config/connection_config-sample.yml b/project/config/connection_config-sample.yml new file mode 100644 index 00000000..d93c7035 --- /dev/null +++ b/project/config/connection_config-sample.yml @@ -0,0 +1,27 @@ +--- +## Default configuration values +# Necessary for config library, not used in R file +# No need to change these values +default: + dbms: null + user: null + password: null + server: null + port: null + oracleDriver: null + pathToDriver: null + +## Connection details +# Replace with your connection details +# Used as input to DatabaseConnector::createConnectionDetails() +# see the function documentation for more information +# Please check carefully which details are required for your dbms +# as not all of these details may be required. +connectionDetails: + dbms: 'postgresql' + user: 'postgres' + password: 'postgres' + server: 'host/database' + port: 5432 + oracleDriver: null + pathToDriver: './drivers/jdbc/' \ No newline at end of file diff --git a/project/config/is_standard_config-sample.yml b/project/config/is_standard_config-sample.yml new file mode 100644 index 00000000..61dd898e --- /dev/null +++ b/project/config/is_standard_config-sample.yml @@ -0,0 +1,6 @@ +--- +default: + conceptsPath: null + +config: + conceptsPath: '' \ No newline at end of file From fcafc8d10b0eb35dc98874631622c2733e653e9a Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:27:21 +0200 Subject: [PATCH 027/130] update function to use SQL queries --- project/R/isStandard.R | 134 +++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 73 deletions(-) diff --git a/project/R/isStandard.R b/project/R/isStandard.R index 9790d5ea..9c3b12be 100644 --- a/project/R/isStandard.R +++ b/project/R/isStandard.R @@ -1,12 +1,7 @@ -library(readr) -library(dplyr) - -isStandard <- function(concept_table_path, data_concepts_path, save_path = NULL) { - -# Filters CONCEPT.csv from Athena vocabulary download for included concepts per -# a table of source codes and provided concepts. The accepted format is CSV files with -# at least fields 'sourceCode' to store source codes or source terms and 'concept_id' -# to store concept_ids. +# Filters CONCEPT table from database for included concepts per +# a table of source codes and provided concepts. The accepted format for this source code table +# is CSV files with at least fields 'sourceCode' to store source codes or source terms and +# 'concept_id' to store concept_ids. # These tables are read from data_concepts_path. # # If a save_path is provided, results are written as filtered versions of the CONCEPT @@ -32,74 +27,67 @@ isStandard <- function(concept_table_path, data_concepts_path, save_path = NULL) # write_tables: # Boolean toggle for whether to save the results +library(readr) +library(dplyr) +library(DBI) - # Set working directory - path <- rstudioapi::getSourceEditorContext()$path %>% - dirname() %>% - dirname() %>% - dirname() - original_wd <- getwd() - setwd(path) - - # Read concept table - concept_table <- read_delim(concept_table_path, - delim = '\t', - col_types = cols(concept_id = col_character())) %>% - mutate(concept_id = as.character(concept_id)) %>% # Ensure concept_id is character - mutate(concept_id = tolower(trimws(concept_id))) - - # Initialize vector of non-standard (or not in vocabularies) concept ids - nonStandard <- c() - # Initialize vector of non-standard concept names - conceptNameNonStandard <- c() - # Initialize vector of source codes/terms for non-standard concepts - sourceCodeNonStandard <- c() - # Initialize vector of source tables for non-standard concepts - sourceTableNonStandard <- c() - - # Get tables - tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) - for (table_path in tables) { - table_name <- basename(table_path) - - # Read and prepare table - tb <- read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% - mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% # Replace non-breaking space with regular space - mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% - filter(!is.na(sourceCode), !is.na(concept_id)) %>% - mutate(concept_id = tolower(concept_id), - concept_id = as.character(concept_id)) - - # Join tables - joined <- inner_join(concept_table, tb, by = "concept_id") - - # Add non-standard concept info to vectors - ind <- which(!(joined$standard_concept %in% c('S', 'C'))) - nonStandard <- append(nonStandard, joined$concept_id[ind]) - conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) - sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) - sourceTableNonStandard <- append(sourceTableNonStandard, - replicate(length(ind), table_name, simplify="vector")) - - # Save if not empty - if (!(is.null(save_path))) { - if(nrow(joined) > 0) { +isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { + # db_connection is a DBI database connection object + + # Read concept table from SQL database + concept_table_query <- "SELECT concept_id, concept_name, standard_concept FROM cdm.concept" + concept_table <- dbGetQuery(db_connection, concept_table_query) %>% + mutate(concept_id = as.character(concept_id)) %>% + mutate(concept_id = tolower(trimws(concept_id))) + + # Initialize vectors for non-standard concepts + nonStandard <- c() + conceptNameNonStandard <- c() + sourceCodeNonStandard <- c() + sourceTableNonStandard <- c() + + # Get tables from data_concepts_path + tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) + for (table_path in tables) { + table_name <- basename(table_path) + + # Read and prepare table + tb <- + read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% + mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% + mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% + filter(!is.na(sourceCode), !is.na(concept_id)) %>% + mutate(concept_id = tolower(concept_id), + concept_id = as.character(concept_id)) %>% + select(sourceCode, concept_id) + + # Join tables + joined <- inner_join(concept_table, tb, by = "concept_id") + + # Add non-standard concept info to vectors + ind <- which(!(joined$standard_concept %in% c('S', 'C'))) + nonStandard <- append(nonStandard, joined$concept_id[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) + sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) + sourceTableNonStandard <- append(sourceTableNonStandard, + replicate(length(ind), table_name, simplify="vector")) + + # Save if not empty and save_path is provided + if (!is.null(save_path) && nrow(joined) > 0) { message(paste("saving file: ", table_name)) write_csv(joined, paste0(save_path, table_name)) } else { message(paste("No matches found for table:", table_name, "\n")) } } - } - # Create table of non-standard concepts - res <- tibble::tibble( - concept_id = nonStandard, - concept_name = conceptNameNonStandard, - source_code = sourceCodeNonStandard, - source_table = sourceTableNonStandard - ) - - # reset working directory - setwd(original_wd) - return(res) -} + + # Create table of non-standard concepts + res <- tibble::tibble( + concept_id = nonStandard, + concept_name = conceptNameNonStandard, + source_code = sourceCodeNonStandard, + source_table = unlist(sourceTableNonStandard) + ) + + return(res) + } \ No newline at end of file From e39ca44c1c326c171030c2c7d9645ede1325f7ef Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:27:38 +0200 Subject: [PATCH 028/130] update function to use SQL queries --- project/R/countOccurrences.R | 120 ++++++++++++++++------------------- 1 file changed, 55 insertions(+), 65 deletions(-) diff --git a/project/R/countOccurrences.R b/project/R/countOccurrences.R index f5caa198..597b6640 100644 --- a/project/R/countOccurrences.R +++ b/project/R/countOccurrences.R @@ -1,66 +1,56 @@ -countOccurrences <- function(v, tables, list_of_df, links) { - stopifnot(is.vector(v)) - stopifnot(is.character(tables) & is.vector(tables)) - stopifnot(is.list(list_of_df)) - stopifnot(is.list(links)) - - if (!any(tables %in% names(links))) { - stop("Table is not one of the tables listed underneath with linked concept_id fields, \nPlease provide a different table or update the table -- concept_id links. \nTerminating") - } - - unique_person_ids <- vector("list", length(v)) - records <- numeric(length(v)) - records_descendant <- numeric(length(v)) - unique_person_ids_descendant <- vector("list", length(v)) - - for (table in tables) { - df <- list_of_df[[table]] - concept_id_field <- links[[table]] - if (!all(c("person_id", concept_id_field) %in% names(df))) { - stop("Data frame does not contain expected columns.") - } - anc <- list_of_df$concept_ancestor$ancestor_concept_id - desc <- list_of_df$concept_ancestor$descendant_concept_id - - if (!all(c("ancestor_concept_id", "descendant_concept_id") %in% names(list_of_df$concept_ancestor))) { - stop("Concept ancestor data frame does not contain expected columns.") - } - - for (i in seq_along(v)) { - val <- v[i] - direct_df <- df[df[, concept_id_field] == val, ] - desc_val <- c(anc[which(desc == val)], desc[which(anc == val)]) %>% unique() - descendant_df <- df[df[, concept_id_field] %in% desc_val, ] - - # Counting total records directly - if (nrow(direct_df) > 0) { - unique_person_ids[[i]] <- unique(c(unique_person_ids[[i]], direct_df$person_id)) - records[i] <- records[i] + nrow(direct_df) - } - - # Counting total records for descendants - if (nrow(descendant_df) > 0) { - unique_person_ids_descendant[[i]] <- unique(c(unique_person_ids_descendant[[i]], descendant_df$person_id)) - records_descendant[i] <- records_descendant[i] + nrow(descendant_df) - } - } - } - - count_persons <- sapply(unique_person_ids, length) - count_records <- records - descendant_count_person <- sapply(unique_person_ids_descendant, length) - descendant_count_record <- records_descendant - - res <- tibble::tibble( - concept_name = names(v), - concept_id = v, - count_persons = count_persons, - count_records = count_records, - descendant_count_person = descendant_count_person, - descendant_count_record = descendant_count_record, - included = (count_records + descendant_count_record) > 0 - ) %>% - dplyr::arrange(dplyr::desc(count_records + descendant_count_record)) - - return(res) +library(DBI) +library(dplyr) +library(tibble) + +countOccurrences <- function(v, tables, links, db_connection, schema) { + stopifnot(is.vector(v)) + stopifnot(is.character(tables) & is.vector(tables)) + stopifnot(is.list(links)) + stopifnot(is.character(schema)) + + # Placeholder for results + results <- list() + + for (table in tables) { + concept_id_field <- links[[table]] + + for (i in seq_along(v)) { + val <- v[i] + + # Direct counts SQL query + direct_sql <- + sprintf( + "SELECT COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records FROM %s WHERE %s = %d", + paste0(schema, ".", table), + concept_id_field, + val + ) + direct_res <- dbGetQuery(db_connection, direct_sql) + + # Descendant counts SQL query + descendant_sql <- sprintf( + "SELECT COUNT(DISTINCT a.person_id) AS descendant_count_person, COUNT(*) AS descendant_count_record FROM %s a JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id WHERE b.ancestor_concept_id = %d", + paste0(schema, ".", table), # Reference the target table within the schema + schema, # Explicitly reference the schema for the concept_ancestor table + concept_id_field, + val) + descendant_res <- dbGetQuery(db_connection, descendant_sql) + + # Combine results + results[[i]] <- tibble( + concept_id = val, + count_persons = direct_res$count_persons, + count_records = direct_res$count_records, + descendant_count_person = descendant_res$descendant_count_person, + descendant_count_record = descendant_res$descendant_count_record + ) + } + } + + # Combine all results into a single data frame + final_res <- bind_rows(results) %>% + mutate(concept_name = names(v)) %>% + arrange(desc(count_records + descendant_count_record)) + + return(final_res) } \ No newline at end of file From a7c491a161e42b3df3d24cfa79f31bbd6f1d4e68 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:28:31 +0200 Subject: [PATCH 029/130] update main code --- project/R/cohortCapr.R | 224 +++++++++++++----------------------- project/R/cohortCapr_md.Rmd | 221 ++++++++++++----------------------- 2 files changed, 157 insertions(+), 288 deletions(-) diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R index 7c8dcbb2..8796e25f 100644 --- a/project/R/cohortCapr.R +++ b/project/R/cohortCapr.R @@ -1,120 +1,95 @@ -## ----knitr, include=FALSE--------------------------------------------------------------- +## ----knitr, include=FALSE------------------------------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) knitr::purl( - input = './cohortCapr_md.Rmd', - output = './cohortCapr.R' + input = './R/cohortCapr_md.Rmd', + output = './R/cohortCapr.R' ) -## ----activate renv, include=FALSE------------------------------------------------------- -## R environment activation -# Get renv library -if (!require(renv)) { - install.packages("renv@v1.0.7") -} -# Get project path -path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) -if (!("renv" %in% list.files(path))) { - stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") -} - -## Activate renv -# renv::activate(path) +## ----Get project configurations------------------------------------------------------------------ +connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') +isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') -## ----housekeeping, echo=FALSE----------------------------------------------------------- -## housekeeping -# libraries -library(devtools) -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - +## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------ +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) -## ----connection details Eunomia, eval=TRUE, include=TRUE-------------------------------- -## Eunomia GI bleed data set -connectionDetails <- Eunomia::getEunomiaConnectionDetails() +## ----concept sets, echo=TRUE--------------------------------------------------------------------- +## Concept sets +source("./R/conceptSets.R") -## ----load data, messages=FALSE, echo=TRUE----------------------------------------------- -## Load data -# Connect to database +# Establish connection con <- connect(connectionDetails) -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPre <- vector("list", length=length(tables)) -names(lDataFramesPre) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) # Disconnect disconnect(con) -cat("\n\nTABLES:\n ") -writeLines(tables, sep = "\n ") - -## ----concept sets, echo=TRUE------------------------------------------------------------ -## Concept sets -source("./conceptSets.R") -# source("./connectVocabularies.R") +## ----count occurences, echo=TRUE----------------------------------------------------------------- +## Count occurrences of each concept in data # Establish connection con <- connect(connectionDetails) -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +# count occurrences of each concept 'x' and print results; cardiac complications as example +# cardiacComplicationsCounts <- +# countOccurrences( +# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema +# ) %>% print() +# labTestsCounts <- +# countOccurrences( +# conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema +# ) %>% print() # Disconnect disconnect(con) -## ----count occurences, echo=TRUE-------------------------------------------------------- -## Count occurrences of each concept in data -# Get countOccurrences function -source("./countOccurrences.R") +## ----Standard non-standard check----------------------------------------------------------------- +source('./R/isStandard.R') -# Get links between tables and fields as input -source("./table_linked_to_concept_field.R") +# Connect to DB +con <- connect(connectionDetails) -# count occurrences of each concept 'x' and print results; cardiac complications as example -cardiacComplicationsCounts <- - countOccurrences( - conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), - lDataFramesPre, links - ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), - lDataFramesPre, links - ) %>% print() - - -## ----Standard non-standard check-------------------------------------------------------- -source('./isStandard.R') +# Return table of non-standard concepts nonStandard <- isStandard( - concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv", - data_concepts_path = "./project/data/phems_variable_list/" - # save_path = "./project/data/phems_variable_list/is_standard/" + db_connection = con, + data_concepts_path = isStandardConfig$concepts_path, + # (optional) Save the results (with standard and non-standard concepts) + # save_path = isStandardConfig$save_path ) +# Disconnect +disconnect(con) + +# Print all non-standard concepts nonStandard -## ----Cohort definition------------------------------------------------------------------ +## ----Cohort definition--------------------------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( @@ -156,7 +131,7 @@ ch <- cohort( ) -## ----json and sql----------------------------------------------------------------------- +## ----json and sql-------------------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -171,40 +146,40 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json--------------------------------------------------- -write(chJson, paste(path, "./json/cohort.json", sep="")) +## ----Save cohort and concept set json------------------------------------------------------------ +write(chJson, "./json/cohort.json") for (cs in names(conceptSets$conceptSets)) { writeConceptSet( x = conceptSets$conceptSets[[cs]], - path = paste("../json/", cs, "_cs.json", sep="") + path = paste("./json/", cs, "_cs.json", sep="") ) } -## ----Create and generate cohorts-------------------------------------------------------- +## ----Create and generate cohorts----------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) # Cohorts to create cohortsToCreate <- tibble::tibble( cohortId = 9876, - cohortName = "cardiac_arrest", + cohortName = "cohort", sql = sql ) # Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") CohortGenerator::createCohortTables( connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", + cohortDatabaseSchema = "cohort", cohortTableNames = cohortTableNames, ) # Generate the cohorts cohortsGenerated <- CohortGenerator::generateCohortSet( connectionDetails = connectionDetails, - cdmDatabaseSchema = "main", - cohortDatabaseSchema = "main", + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", cohortTableNames = cohortTableNames, cohortDefinitionSet = cohortsToCreate ) @@ -212,7 +187,7 @@ cohortsGenerated <- CohortGenerator::generateCohortSet( # Get cohort counts cohortCounts <- CohortGenerator::getCohortCounts( connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", + cohortDatabaseSchema = "cohort", cohortTable = cohortTableNames$cohortTable ) @@ -223,63 +198,26 @@ disconnect(con) cohortCounts -## ----retrieve updated DB---------------------------------------------------------------- +## ----retrieve updated DB------------------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) -# List all tables -tables <- dbListTables(con) +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") -lDataFramesPost <- vector("list", length=length(tables)) -names(lDataFramesPost) <- tables +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} # Disconnect disconnect(con) - -cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), - "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) - - -## ----cohort filter---------------------------------------------------------------------- -cohort_df <- list() -cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - cohort_df[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids) - } else { - cohort_df[[table]] <- lDataFramesPost[[table]] - } -} - - -## ----Create new dataset with 1k samples, eval=FALSE, include=FALSE---------------------- -## new_data <- list() -## cohort_person_ids_plus <- append(cohort_person_ids, -## # draw a random sample to make 1000 people including the cohort subjects -## sample( -## unique(lDataFramesPost$person$person_id), -## # sample size = 1k -## size = 1000 - length(cohort_person_ids) -## ) -## ) -## for (table in names(lDataFramesPost)) { -## if ("person_id" %in% names(lDataFramesPost[[table]])) { -## new_data[[table]] <- -## lDataFramesPost[[table]] %>% -## dplyr::filter(person_id %in% cohort_person_ids_plus) -## } else { -## new_data[[table]] <- lDataFramesPost[[table]] -## } -## } - diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd index ed97f925..7d1b6870 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/project/R/cohortCapr_md.Rmd @@ -8,128 +8,97 @@ output: html_document ```{r knitr, include=FALSE} knitr::opts_chunk$set(echo = TRUE) -knitr::purl( - input = './cohortCapr_md.Rmd', - output = './cohortCapr.R' -) -``` - -## Activate renv -```{r activate renv, include=FALSE} -## R environment activation -# Get renv library -if (!require(renv)) { - install.packages("renv@v1.0.7") -} -# Get project path -path <- dirname(dirname(rstudioapi::getSourceEditorContext()$path)) -if (!("renv" %in% list.files(path))) { - stop("Working directory is not set correctly. Make sure the working directory is set to the project directory.") -} - -## Activate renv -# renv::activate(path) +# knitr::purl( +# input = './R/cohortCapr_md.Rmd', +# output = './R/cohortCapr.R' +# ) ``` -## Set-up libraries -Set up the required libraries, and working directory -```{r housekeeping, echo=FALSE} -## housekeeping -# libraries -library(devtools) -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) +```{r Get project configurations} +connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') +isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') ``` -##Connect to database -```{r connection details Eunomia, eval=TRUE, include=TRUE} -## Eunomia GI bleed data set -connectionDetails <- Eunomia::getEunomiaConnectionDetails() -``` - -## Load data set -Use dbConnector library to specified DB and retrieve the GI bleed (default) dataset. -Load this data into a dataframe as well for inspection -```{r load data, messages=FALSE, echo=TRUE} -## Load data -# Connect to database -con <- connect(connectionDetails) - -# List all tables -tables <- dbListTables(con) - -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] - -lDataFramesPre <- vector("list", length=length(tables)) -names(lDataFramesPre) <- tables - -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} - -# Disconnect -disconnect(con) - -cat("\n\nTABLES:\n ") -writeLines(tables, sep = "\n ") +## Connect to DB +```{r connect to database, eval=TRUE, include=TRUE} +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) ``` ## Concept sets Define a measurement concept set using Capr and include all descendants ```{r concept sets, echo=TRUE} ## Concept sets -source("./conceptSets.R") -# source("./connectVocabularies.R") +source("./R/conceptSets.R") # Establish connection con <- connect(connectionDetails) conceptSets$conceptSets <- conceptSets$conceptSets %>% # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main") + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) # Disconnect disconnect(con) ``` -## Included and excluded concepts -Retrieve concepts that have been included/excluded (does not capture descendants) +## Concept counts +Retrieve counts for a concept set ```{r count occurences, echo=TRUE} ## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + # Get countOccurrences function -source("./countOccurrences.R") +source("./R/countOccurrences.R") # Get links between tables and fields as input -source("./table_linked_to_concept_field.R") +source("./R/table_linked_to_concept_field.R") # count occurrences of each concept 'x' and print results; cardiac complications as example -cardiacComplicationsCounts <- - countOccurrences( - conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), - lDataFramesPre, links - ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), - lDataFramesPre, links - ) %>% print() +# cardiacComplicationsCounts <- +# countOccurrences( +# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema +# ) %>% print() +# labTestsCounts <- +# countOccurrences( +# conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema +# ) %>% print() + +# Disconnect +disconnect(con) ``` ## Standard and non-standard concepts ```{r Standard non-standard check} -source('./isStandard.R') +source('./R/isStandard.R') + +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts nonStandard <- isStandard( - concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv", - data_concepts_path = "./project/data/phems_variable_list/" - # save_path = "./project/data/phems_variable_list/is_standard/" + db_connection = con, + data_concepts_path = isStandardConfig$concepts_path, + # (optional) Save the results (with standard and non-standard concepts) + # save_path = isStandardConfig$save_path ) +# Disconnect +disconnect(con) + +# Print all non-standard concepts nonStandard ``` @@ -197,11 +166,11 @@ sql <- CirceR::buildCohortQuery( Save the cohort and concept set jsons; these can be imported into ATLAS ```{r Save cohort and concept set json} -write(chJson, paste(path, "./json/cohort.json", sep="")) +write(chJson, "./json/cohort.json") for (cs in names(conceptSets$conceptSets)) { writeConceptSet( x = conceptSets$conceptSets[[cs]], - path = paste("../json/", cs, "_cs.json", sep="") + path = paste("./json/", cs, "_cs.json", sep="") ) } ``` @@ -213,23 +182,23 @@ con <- connect(connectionDetails) # Cohorts to create cohortsToCreate <- tibble::tibble( cohortId = 9876, - cohortName = "cardiac_arrest", + cohortName = "cohort", sql = sql ) # Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest") +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") CohortGenerator::createCohortTables( connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", + cohortDatabaseSchema = "cohort", cohortTableNames = cohortTableNames, ) # Generate the cohorts cohortsGenerated <- CohortGenerator::generateCohortSet( connectionDetails = connectionDetails, - cdmDatabaseSchema = "main", - cohortDatabaseSchema = "main", + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", cohortTableNames = cohortTableNames, cohortDefinitionSet = cohortsToCreate ) @@ -237,7 +206,7 @@ cohortsGenerated <- CohortGenerator::generateCohortSet( # Get cohort counts cohortCounts <- CohortGenerator::getCohortCounts( connectionDetails = connectionDetails, - cohortDatabaseSchema = "main", + cohortDatabaseSchema = "cohort", cohortTable = cohortTableNames$cohortTable ) @@ -253,60 +222,22 @@ cohortCounts # Establish connection con <- connect(connectionDetails) -# List all tables -tables <- dbListTables(con) +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons -# Exclude sqlite_sequence (contains table information) -tables <- tables[tables != "sqlite_sequence"] +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") -lDataFramesPost <- vector("list", length=length(tables)) -names(lDataFramesPost) <- tables +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") -# Create a data.frame for each table -for (i in seq(along=tables)) { - lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep="")) -} # Disconnect disconnect(con) - - -cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), - "\nNumber of persons in cohort: ", length(unique(lDataFramesPost$cardiac_arrest$subject_id))) -``` - -## Filter loaded database for cohort -```{r cohort filter} -cohort_df <- list() -cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - cohort_df[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids) - } else { - cohort_df[[table]] <- lDataFramesPost[[table]] - } -} -``` - -```{r Create new dataset with 1k samples, eval=FALSE, include=FALSE} -new_data <- list() -cohort_person_ids_plus <- append(cohort_person_ids, - # draw a random sample to make 1000 people including the cohort subjects - sample( - unique(lDataFramesPost$person$person_id), - # sample size = 1k - size = 1000 - length(cohort_person_ids) - ) -) -for (table in names(lDataFramesPost)) { - if ("person_id" %in% names(lDataFramesPost[[table]])) { - new_data[[table]] <- - lDataFramesPost[[table]] %>% - dplyr::filter(person_id %in% cohort_person_ids_plus) - } else { - new_data[[table]] <- lDataFramesPost[[table]] - } -} ``` From 73d5989f0a857a8449e2143a2c3bc66d004850ff Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 12:43:15 +0200 Subject: [PATCH 030/130] update mismatched concepts --- .../phems_variable_list/5.15_vital_signs.csv | 73 ++--------- .../5.16_hsjd_clinical.csv | 71 ++-------- .../5.29_lab_measurements_uc3.csv | 123 ++++++------------ .../is_standard/5.15_vital_signs.csv | 8 +- .../is_standard/5.16_hsjd_clinical.csv | 2 +- .../is_standard/5.29_lab_measurements_uc3.csv | 2 +- 6 files changed, 63 insertions(+), 216 deletions(-) diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv index 618f3d90..2e27e1de 100644 --- a/project/data/phems_variable_list/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/5.15_vital_signs.csv @@ -1,62 +1,11 @@ -sourceCode,concept_id -Age-dependent HR ,4239408  -Age-dependent HR ,8483  -Age-dependent RR ,4313591  -Age-dependent RR ,8483  -SBP (Systolic Blood Pressure) ,4152194  -SBP (Systolic Blood Pressure) ,8876  -DBP (Dyastolic Blood Pressure) ,4154790  -DBP (Dyastolic Blood Pressure) ,8876  -SpO2 ,4096101  -SpO2 ,8554  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Age-dependent HR ,3027018 +Age-dependent HR ,8483  +Age-dependent RR ,3024171 +Age-dependent RR ,8483  +SBP (Systolic Blood Pressure) ,3004249 +SBP (Systolic Blood Pressure) ,8876  +DBP (Dyastolic Blood Pressure) ,3012888 +DBP (Dyastolic Blood Pressure) ,8876  +SpO2 ,4096101  +SpO2 ,8554  diff --git a/project/data/phems_variable_list/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/5.16_hsjd_clinical.csv index 98f662ab..948ae8fa 100644 --- a/project/data/phems_variable_list/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/5.16_hsjd_clinical.csv @@ -1,62 +1,9 @@ -sourceCode,concept_id -Weight ,3025315  -Weight ,9529  -Height ,607590  -Height ,8582  -Body Surface Area (BSA) - Combination of weight and height ,4201235  -Body Surface Area (BSA) - Combination of weight and height ,8617  -Extracardiac anomalies - diagnoses ,0  -Cardiac surgeries (Interventions) ,4275564  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Weight ,3025315  +Weight ,9529  +Height ,3036277 +Height ,8582  +Body Surface Area (BSA) - Combination of weight and height ,4201235  +Body Surface Area (BSA) - Combination of weight and height ,8617  +Extracardiac anomalies - diagnoses ,0  +Cardiac surgeries (Interventions) ,4275564  diff --git a/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv b/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv index d616ed09..8da65eab 100644 --- a/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv +++ b/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv @@ -1,86 +1,37 @@ -sourceCode,concept_id, -factor VIII inhibitor titer ,3024942 , -factor VIII inhibitor titer ,44777562 , -factor VIII activity measurement ,3022520 , -factor VIII activity measurement ,3011832 , -factor VIII activity measurement ,8985 , -factor VIII activity measurement ,9332 , -factor VIII activity measurement ,8554 , -Von Willebrand factor activity measurement ,43534000 , -Von Willebrand factor activity measurement ,8985 , -Von Willebrand factor activity measurement ,9332 , -Von Willebrand factor activity measurement ,8554 , -Von Willebrand factor antigen measurement ,3002124 , -Von Willebrand factor antigen measurement ,8985 , -Von Willebrand factor antigen measurement ,9332 , -Von Willebrand factor antigen measurement ,8554 , -Von Willebrand factor propeptide measurement ,3023693 , -Von Willebrand factor propeptide measurement ,3042349 , -Von Willebrand factor propeptide measurement ,8763 , -activated partial thromboplastin time (APTT) ,4175016  , -activated partial thromboplastin time (APTT) ,8555 , -activated partial thromboplastin time (APTT) ,8523 , -Prothrombin time (PT) ,3034426 , -Prothrombin time (PT) ,8555 , -Prothrombin time (PT) ,8523 , -Prothrombin time (PT) ,8554 , -platelet count ,37393863 , -platelet count ,44777588 , -hematocrit ,3009542 , -hematocrit ,44777604 , -hematocrit ,8554, -fibrinogen ,3016407 , -fibrinogen ,8636 , -ALT ,3006923 , -ALT ,8645 , -AST ,3013721 , -AST ,8645 , -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, +sourceCode,concept_id +factor VIII inhibitor titer ,3024942  +factor VIII inhibitor titer ,44777562  +factor VIII activity measurement ,3022520  +factor VIII activity measurement ,3011832  +factor VIII activity measurement ,8985  +factor VIII activity measurement ,9332  +factor VIII activity measurement ,8554  +Von Willebrand factor activity measurement ,43534000  +Von Willebrand factor activity measurement ,8985  +Von Willebrand factor activity measurement ,9332  +Von Willebrand factor activity measurement ,8554  +Von Willebrand factor antigen measurement ,3002124  +Von Willebrand factor antigen measurement ,8985  +Von Willebrand factor antigen measurement ,9332  +Von Willebrand factor antigen measurement ,8554  +Von Willebrand factor propeptide measurement ,3023693  +Von Willebrand factor propeptide measurement ,3042349  +Von Willebrand factor propeptide measurement ,8763  +activated partial thromboplastin time (APTT) ,4175016   +activated partial thromboplastin time (APTT) ,8555  +activated partial thromboplastin time (APTT) ,8523  +Prothrombin time (PT) ,3034426  +Prothrombin time (PT) ,8555  +Prothrombin time (PT) ,8523  +Prothrombin time (PT) ,8554  +platelet count ,4267147 +platelet count ,44777588  +hematocrit ,3009542  +hematocrit ,44777604  +hematocrit ,8554 +fibrinogen ,3016407  +fibrinogen ,8636  +ALT ,3006923  +ALT ,8645  +AST ,3013721  +AST ,8645  diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv index 0e67d4e4..e44116e2 100644 --- a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv @@ -1,11 +1,11 @@ concept_id,concept_name,standard_concept,sourceCode 4096101,Measurement of oxygen saturation at periphery,S,SpO2 -4152194,Systolic blood pressure,NA,SBP (Systolic Blood Pressure) -4154790,Diastolic blood pressure,NA,DBP (Dyastolic Blood Pressure) -4239408,Heart rate,NA,Age-dependent HR -4313591,Respiratory rate,NA,Age-dependent RR 8483,counts per minute,S,Age-dependent HR 8483,counts per minute,S,Age-dependent RR 8554,percent,S,SpO2 8876,millimeter mercury column,S,SBP (Systolic Blood Pressure) 8876,millimeter mercury column,S,DBP (Dyastolic Blood Pressure) +3027018,Heart rate,S,Age-dependent HR +3012888,Diastolic blood pressure,S,DBP (Dyastolic Blood Pressure) +3004249,Systolic blood pressure,S,SBP (Systolic Blood Pressure) +3024171,Respiratory rate,S,Age-dependent RR diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv index 650ef2b0..86440027 100644 --- a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv @@ -1,9 +1,9 @@ concept_id,concept_name,standard_concept,sourceCode -607590,Body height,NA,Height 4201235,Body surface area,S,Body Surface Area (BSA) - Combination of weight and height 4275564,Operation on heart,S,Cardiac surgeries (Interventions) 8582,centimeter,S,Height 9529,kilogram,S,Weight 8617,square meter,S,Body Surface Area (BSA) - Combination of weight and height 3025315,Body weight,S,Weight +3036277,Body height,S,Height 0,No matching concept,NA,Extracardiac anomalies - diagnoses diff --git a/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv b/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv index 49f4ea05..f5b3ed55 100644 --- a/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv +++ b/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv @@ -1,6 +1,6 @@ concept_id,concept_name,standard_concept,sourceCode -37393863,Platelet count,NA,platelet count 4175016,"Partial thromboplastin time, activated",S,activated partial thromboplastin time (APTT) +4267147,Platelet count,S,platelet count 8636,gram per liter,S,fibrinogen 44777604,liter per liter,S,hematocrit 8554,percent,S,factor VIII activity measurement From daa56e9aa1dd617676348f3c3a03b6a62b4dcdbc Mon Sep 17 00:00:00 2001 From: LP-Glueck Date: Fri, 12 Jul 2024 13:12:21 +0200 Subject: [PATCH 031/130] Added UC1 tables 5.15 - 5.19 & UC3 tables to conceptSets.R, and added UC3 csv files to phems_variables_list directory --- project/R/conceptSets.R | 107 ++++++++++++++++++ .../5.28_uc3_patient_characteristics.csv | 15 +++ .../5.29_uc3_lab_measurements.csv | 37 ++++++ .../5.30_uc3_treatments.csv | 13 +++ .../phems_variable_list/5.31_uc3_surgery.csv | 8 ++ 5 files changed, 180 insertions(+) create mode 100644 project/data/phems_variable_list/5.28_uc3_patient_characteristics.csv create mode 100644 project/data/phems_variable_list/5.29_uc3_lab_measurements.csv create mode 100644 project/data/phems_variable_list/5.30_uc3_treatments.csv create mode 100644 project/data/phems_variable_list/5.31_uc3_surgery.csv diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 87337c77..1df369ec 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -78,6 +78,113 @@ conceptSets <- list( 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart + ), + + vitalSigns = c( + 3027018, # source: Age-dependent HR /// concept: Heart rate + 3024171, # source: Age-dependent RR /// concept: Respiratory rate + 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure + 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure + 4096101 # source: SpO2 /// concept: Measurement of oxygen saturation at periphery + ), + + HSJDClinical = c( + 3025315, # source: Weight /// concept: Body weight + 3036277, # source: Height /// concept: Body height + 4201235, # source: Body Surface Area (BSA) - Combination of weight and height /// concept: body surface area + 4275564 # source: Cardiac surgeries (Interventions) /// concept: Operation on heart + ), + + HSJDSurgery = c( + 40490494, # source: STAT/EACTS score of surgery /// concept: Society of Thoracic Surgeons risk calculator + 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure + 4336464, # source: Cardiac bypass start datetime, end datetime /// concept: Coronary artery bypass graft + 4201547, # source: Cross-clamping start datetime, end datetime /// concept: Placement of arterial cross clamp + 44790138, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Induced circulatory arrest + 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation + 4150627 # source: Extubation event /// concept: Removal of endotracheal tube + ), + + HSJDHospitalisation = c( + 44803020, # source: Admission reason /// concept: Primary reason for admission + 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug + 794078, # source: Dose of vasoactive infusion (rate - mcg/kg/hr) /// concept: vasoactive intestinal peptide + 4179206, # source: Postop central venous catheter in/start datetime, out/end datetime /// concept: Central venous catheter + 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation + 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation + ), + + HSJDcomlications = c( + 4202832, # source: intubation /// concept: Intubation + 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart + 4044892, # source: Sternum reopening (procedure undertaken) /// concept: Procedure on sternum + 4046868, # source: Vocal Cord Dysfunction /// concept: Vocal cord dysfunction + 4275136, # source: Diaphragmatic Paralysis /// concept: Paralysis of diaphragm + 253796, # source: Pneumothorax /// concept: Pneumothorax + 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea + 44784217, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Cardiac arrhythmia + 315643, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Tachyarrhythmia + 4228448, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Bradyarrhythmia + 4068155, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Atrial arrhythmia + 4185572, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Ventricular arrhythmia + 46234437, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: ivabradine + 1309944, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: amiodarone + 1354860, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: flecainide + 4353741, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Cardioversion + 4117045, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Atrial overdrive pacing + 4049398, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Temporary cardiac pacemaker procedure + 4051940, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Permanent cardiac pacemaker procedure + 609312 # source: Listed for heart transplantation /// concept: Awaiting transplantation of heart + ), + + UC3PateintCharacteristics = c( + 434007, # source: hemophilia A diagnosis /// concept: hereditary factor VIII deficiency disease + 4094223, # source: hemophilia A subtype/ severity /// concept: mild hereditary factor VIII deficiency disease + 4140661, # source: hemophilia A subtype/ severity /// concept: moderate hereditary factor VIII deficiency disease + 4056830, # source: hemophilia A subtype/ severity /// concept: severe hereditary factor VIII deficiency disease + 3003694, # source: blood group /// concept: ABO and Rh group [Type] in Blood + 37393608, # source: factor VIII inhibitor status /// concept: factor VIII inhibitor activity + 4126681, # source: factor VIII inhibitor status /// concept: detected + 9190 # source: factor VIII inhibitor status /// concept: not detected + ), + + UC3LabMeasurements = c( + 3024942, # source: factor VIII inhibitor titer /// concept: coagulation factor VIII inhibitor [Units/volume] in platelet poor plasma by coagulation assay + 3022520, # source: factor VIII activity measurement /// concept: coagulation factor VIII activated [Units/volume] in platelet poor plasma by coagulation assay + 3011832, # source: factor VIII activity measurement /// concept: coagulation factor VIII activity [Units/volume] in platelet poor plasma by Chromogenic assay + 43534000, # source: Von Willebrand factor activity measurement /// concept: von Willebrand factor (vWf) activity [Units/volume] in platelet poor plasma by Immunoassay + 3002124, # source: Von Willebrand factor antigen measurement /// concept: von Willebrand factor (vWf) Ag [Units/volume] in platelet poor plasma by Immunoassay + 3023693, # source: Von Willebrand factor propeptide measurement /// concept: von Willebrand factor (vWf) multimers in platelet poor plasma by Immunoblot + 3042349, # source: Von Willebrand factor propeptide measurement /// concept: von Willebrand factor (vWf) cleaving protease inhibitor [Units/volume] in platelet poor plasma + 4175016, # source: activated partial thromboplastin time (APTT) /// concept: partial thromboplastin time, activated + 3034426, # source: Prothrombin time (PT) /// concept: prothrombin time (PT) + 37393863, # source: platelet count /// concept: platelet count + 3009542, # source: hematocrit /// concept: Hematocrit [Volume Fraction] of Blood + 3016407, # source: fibrinogen /// concept: fibrinogen [mass/volume] in platelet poor plasma by coagulation assay + 3006923, # source: ALT /// concept: alanine aminotransferase [enzymatic activity/volume] in serum or plasma + 3013721 # source: AST /// concept: aspartate aminotransferase [enzymatic activity/volume] in serum or plasma + ), + + UC3Treatments = c( + 35766745, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Advate] + 21154209, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Kogenate Bayer] + 35831239, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Eloctate] + 40745282, # source: factor VIII /// concept: emicizumab 150 MG/ML Injectable Solution [Hemlibra] + 40492862, # source: factor VIII dose is continuous infusion or bolus dose /// concept: mode of drug administration + 4129275, # source: factor VIII dose is continuous infusion or bolus dose /// concept: continuous infusion + 4265597, # source: factor VIII dose is continuous infusion or bolus dose /// concept: by bolus infusions + 1517070 # source: desmopressin /// concept: desmopressin + # TODO FIGURE OUT IF DESCENDENTS WORK WITH THESE CONCEPTS + # TODO MAP REMAINING DRUG BRANDS + ), + + UC3Surgery = c( + 45888085, # source: Medical/ surgical procedure /// concept: medical procedure + 967823, # source: NaCl administration during surgery /// concept: sodium chloride + 4028665, # source: plasma administration during surgery /// concept: plasma transfusion + 45888867, # source: datetime start anesthesia /// concept: anesthesia + 4308716, # source: blood loss during surgery /// concept: intraoperative hemorrhage + 37017589 # source: blood transfusion during surgery /// concept: bleeding during medical procedure requiring transfusion ) ) ) diff --git a/project/data/phems_variable_list/5.28_uc3_patient_characteristics.csv b/project/data/phems_variable_list/5.28_uc3_patient_characteristics.csv new file mode 100644 index 00000000..cb8540ad --- /dev/null +++ b/project/data/phems_variable_list/5.28_uc3_patient_characteristics.csv @@ -0,0 +1,15 @@ +sourceCode,concept_id +body weight,3025315 +body weight,9529 +body weight,8504 +height,3036277 +height,8582 +height,9546 +hemophilia A diagnosis,434007 +hemophilia A subtype/ severity,4094223 +hemophilia A subtype/ severity,4140661 +hemophilia A subtype/ severity,4056830 +blood group,3003694 +factor VIII inhibitor status,37393608 +factor VIII inhibitor status,4126681 +factor VIII inhibitor status,9190 diff --git a/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv b/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv new file mode 100644 index 00000000..f3a8985c --- /dev/null +++ b/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv @@ -0,0 +1,37 @@ +sourceCode,concept_id +factor VIII inhibitor titer,3024942 +factor VIII inhibitor titer,44777562 +factor VIII activity measurement,3022520 +factor VIII activity measurement,3011832 +factor VIII activity measurement,8985 +factor VIII activity measurement,9332 +factor VIII activity measurement,8554 +Von Willebrand factor activity measurement,43534000 +Von Willebrand factor activity measurement,8985 +Von Willebrand factor activity measurement,9332 +Von Willebrand factor activity measurement,8554 +Von Willebrand factor antigen measurement,3002124 +Von Willebrand factor antigen measurement,8985 +Von Willebrand factor antigen measurement,9332 +Von Willebrand factor antigen measurement,8554 +Von Willebrand factor propeptide measurement,3023693 +Von Willebrand factor propeptide measurement,3042349 +Von Willebrand factor propeptide measurement,8763 +activated partial thromboplastin time (APTT),4175016 +activated partial thromboplastin time (APTT),8555 +activated partial thromboplastin time (APTT),8523 +Prothrombin time (PT),3034426 +Prothrombin time (PT),8555 +Prothrombin time (PT),8523 +Prothrombin time (PT),8554 +platelet count,37393863 +platelet count,44777588 +hematocrit,3009542 +hematocrit,44777604 +hematocrit,8554 +fibrinogen,3016407 +fibrinogen,8636 +ALT,3006923 +ALT,8645 +AST,3013721 +AST,8645 \ No newline at end of file diff --git a/project/data/phems_variable_list/5.30_uc3_treatments.csv b/project/data/phems_variable_list/5.30_uc3_treatments.csv new file mode 100644 index 00000000..21db41c1 --- /dev/null +++ b/project/data/phems_variable_list/5.30_uc3_treatments.csv @@ -0,0 +1,13 @@ +sourceCode,concept_id +factor VIII,35766745 +factor VIII,21154209 +factor VIII,35831239 +factor VIII,40745282 +factor VIII,8985 +factor VIII dose is continuous infusion or bolus dose,40492862 +"factor VIII dose is continuous infusion or bolus dose,4129275",4129275 +factor VIII dose is continuous infusion or bolus dose,4265597 +desmopressin,1517070 +desmopressin,9655 +desmopressin,8576 +desmopressin,9662 \ No newline at end of file diff --git a/project/data/phems_variable_list/5.31_uc3_surgery.csv b/project/data/phems_variable_list/5.31_uc3_surgery.csv new file mode 100644 index 00000000..a39c6a97 --- /dev/null +++ b/project/data/phems_variable_list/5.31_uc3_surgery.csv @@ -0,0 +1,8 @@ +sourceCode,concept_id +Medical/ surgical procedure,45888085 +NaCl administration during surgery,967823 +NaCl administration during surgery,8587 +plasma administration during surgery,4028665 +datetime start anesthesia,45888867 +blood loss during surgery,4308716 +blood transfusion during surgery,37017589 \ No newline at end of file From d2dc72b383d4e34e13fa5fcfcd0dfba0aafb9f1a Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 14:23:26 +0200 Subject: [PATCH 032/130] update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5dcba6bd..be63e36c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ project/config/* project/vocabularies/* project/data/* !project/data/phems_variable_list +project/json/* \ No newline at end of file From c1398bc266965ed576a218aa314b5f1e701c106b Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 14:23:38 +0200 Subject: [PATCH 033/130] remove json files --- project/json/cardiacComplications_cs.json | 72 -- project/json/cardiacProcedures_cs.json | 429 -------- project/json/cohort.json | 1163 --------------------- project/json/intubation_cs.json | 21 - project/json/labTests_cs.json | 497 --------- 5 files changed, 2182 deletions(-) delete mode 100644 project/json/cardiacComplications_cs.json delete mode 100644 project/json/cardiacProcedures_cs.json delete mode 100644 project/json/cohort.json delete mode 100644 project/json/intubation_cs.json delete mode 100644 project/json/labTests_cs.json diff --git a/project/json/cardiacComplications_cs.json b/project/json/cardiacComplications_cs.json deleted file mode 100644 index 0d20ef0a..00000000 --- a/project/json/cardiacComplications_cs.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/project/json/cardiacProcedures_cs.json b/project/json/cardiacProcedures_cs.json deleted file mode 100644 index d8dc6abc..00000000 --- a/project/json/cardiacProcedures_cs.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/project/json/cohort.json b/project/json/cohort.json deleted file mode 100644 index 7edd8ce7..00000000 --- a/project/json/cohort.json +++ /dev/null @@ -1,1163 +0,0 @@ -{ - "ConceptSets": [ - { - "id": 0, - "name": "labTests", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 1, - "name": "cardiacComplications", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 2, - "name": "cardiacProcedures", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 3, - "name": "intubation", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4202832, - "CONCEPT_NAME": "Intubation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52765003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - } - ], - "PrimaryCriteria": { - "CriteriaList": [ - { - "Measurement": { - "CodesetId": 0, - "Age": { - "Op": "lt", - "Value": 80 - } - } - } - ], - "ObservationWindow": { - "PriorDays": 0, - "PostDays": 0 - }, - "PrimaryCriteriaLimit": { - "Type": "All" - } - }, - "QualifiedLimit": { - "Type": "First" - }, - "ExpressionLimit": { - "Type": "First" - }, - "InclusionRules": [ - { - "name": "rule1", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ConditionOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - }, - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - }, - { - "name": "rule2", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 2 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - } - ], - "CensoringCriteria": [ - { - "ProcedureOccurrence": { - "CodesetId": 3 - } - } - ], - "CollapseSettings": { - "CollapseType": "ERA", - "EraPad": 0 - }, - "CensorWindow": {}, - "cdmVersionRange": ">=5.0.0" -} diff --git a/project/json/intubation_cs.json b/project/json/intubation_cs.json deleted file mode 100644 index d8af3e3d..00000000 --- a/project/json/intubation_cs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4202832, - "CONCEPT_NAME": "Intubation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52765003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/project/json/labTests_cs.json b/project/json/labTests_cs.json deleted file mode 100644 index 2d673d34..00000000 --- a/project/json/labTests_cs.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase serum/plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} From a762265170b22577b415848120f61135221b6a30 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 14:57:21 +0200 Subject: [PATCH 034/130] update concept sets for shared vars, uc1 vars, uc2 vars --- project/R/conceptSets.R | 437 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 400 insertions(+), 37 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 87337c77..4963b5fc 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -4,9 +4,243 @@ library(Capr) # include all descendant concepts conceptSets <- list( concepts = list( + # 5.3 VIS score medications + visScoreMedications = c( + 1507835, # source: vasopressin /// concept: vasopressin (USP) + 1337720, # source: dobutamine /// concept: dobutamine + 1337860, # source: dopamine /// concept: dopamine + 1343916, # source: epinephrine /// concept: epinephrine + 1368671, # source: milrinone /// concept: milrinone + 1321341 # source: norepinephrin /// concept: norepinephrine + ), + + # 5.4 vasopressors and inotropes + vasopressors_inotropes = c( + 1507835, # source: Vasopressin /// concept: vasopressin (USP) + 1337720, # source: Dobutamine /// concept: dobutamine + 1337860, # source: Dopamine /// concept: dopamine + 1143374, # source: Ephedrine /// concept: ephedrine + 1343916, # source: Epinephrine /// concept: epinephrine + 1368671, # source: Milrinone /// concept: milrinone + 19119253, # source: Terlipressin /// concept: terlipressin + 1183554, # source: Isoproterenol /// concept: isoproterenol + 40173184, # source: Levosimendan /// concept: levosimendan + 1321341, # source: Norepinephrine /// concept: norepinephrine + 1135766 # source: Phenylephrine /// concept: phenylephrine + ), + + # 5.5 immunosuppressants + immunosuppressants = c( + 4273629, # source: Chemotherapy /// concept: Chemotherapy + 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies + 1518254, # source: Dexamethasone /// concept: dexamethasone + 975125, # source: Hydrocortisone /// concept: hydrocortisone + 1506270, # source: Methylprednisolone /// concept: methylprednisolone + 1550557 # source: Prednisolone /// concept: prednisolone + ), + + # 5.6 antibiotic medications + antibiotics = c( + 4273629, # source: Chemotherapy /// concept: Chemotherapy + 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies + 1836430, # source: Trimethoprim-Sulfamethoxazole /// concept: sulfamethoxazole + 1836948, # source: Tetracycline /// concept: tetracycline + 902722, # source: Tobramycin /// concept: tobramycin + 1705674, # source: Trimethoprim-Sulfamethoxazole /// concept: trimethoprim + 1707687, # source: Vancomycin /// concept: vancomycin + 19010400, # source: Fusidic acid /// concept: fusidate + 45892419, # source: Gentamicin /// concept: gentamicin + 45892599, # source: Ceftolozane-Tazovactam /// concept: ceftolozane + 46221507, # source: Ceftazidime-Avibactam /// concept: avibactam + 1734104, # source: Azithromycin /// concept: azithromycin + 1736887, # source: Linezolid /// concept: linezolid + 1748975, # source: Cefepime /// concept: cefepime + 1750500, # source: Clarithromycin /// concept: clarithromycin + 1769535, # source: Cefadroxil /// concept: cefadroxil + 1771162, # source: Cefazolin /// concept: cefazolin + 1774470, # source: Cefotaxime /// concept: cefotaxime + 1776684, # source: Ceftazidime /// concept: ceftazidime + 1778162, # source: Cefuroxime /// concept: cefuroxime + 1786617, # source: Daptomycin /// concept: daptomycin + 1797513, # source: Ciprofloxacin /// concept: ciprofloxacin + 997881, # source: Clindamycin /// concept: clindamycin + 901845, # source: Colistin /// concept: colistin + 1709170, # source: Meropenem /// concept: meropenem + 1717963, # source: Ertapenem /// concept: ertapenem + 1518254, # source: Dexamethasone /// concept: dexamethasone + 1741122, # source: Piperacillin-Tazobactam /// concept: tazobactam + 1746940, # source: Erythromycin /// concept: erythromycin + 951511, # source: Mupirocin /// concept: mupirocin + 956653, # source: Fosfomycin /// concept: fosfomycin + 1759842, # source: Amoxicillin clavulanate /// concept: clavulanate + 975125, # source: Hydrocortisone /// concept: hydrocortisone + 1778262, # source: Imipenem /// concept: imipenem + 19078399, # source: Teicoplanin /// concept: teicoplanin + 1790868, # source: Amikacin /// concept: amikacin + 1506270, # source: Methylprednisolone /// concept: methylprednisolone + 1713332, # source: Amoxicillin /// concept: amoxicillin + 1717327, # source: Ampicillin /// concept: ampicillin + 920293, # source: Nitrofurantoin /// concept: nitrofurantoin + 1721543, # source: Norfloxacin /// concept: norfloxacin + 1724703, # source: Oxacillin /// concept: oxacillin + 1728416, # source: Penicillin /// concept: penicillin G + 1742253, # source: Levofloxacin /// concept: levofloxacin + 1746114, # source: Piperacillin-Tazobactam /// concept: piperacillin + 1550557, # source: Prednisolone /// concept: prednisolone + 1763204 # source: Rifampicin /// concept: rifampin + ), + + # 5.7 antifungal medications + antifungals = c( + 1714277, # source: Voriconazole /// concept: voriconazole + 35606695, # source: Isovuconazole /// concept: isavuconazole + 19018013, # source: Micafungin /// concept: micafungin + 19026450, # source: Andiulafungin /// concept: anidulafungin + 1754994 # source: Fluconazole /// concept: fluconazole + ), + + # 5.8 antibiotic resistance + antibioticResistance = c( + 4019195, # source: MRSA /// concept: Methicillin resistant Staphylococcus aureus + 4257547, # source: ESBL /// concept: Extended spectrum beta-lactamase producing bacteria + 37017134, # source: Drug-resistant /// concept: Multidrug-resistant bacteria + 1707687, # source: Vancomycin-resistant /// concept: vancomycin + 997881, # source: Clindamycin-resistant /// concept: clindamycin + 1746940 # source: Erythromycin-resistant /// concept: erythromycin + ), + + # 5.9 cardiac surgery + cardiacSurgery = c( + 4049734, # source: Application of band to pulmonary artery /// concept: Banding of pulmonary artery + 4019929, # source: Unspecified repair of tetralogy of fallot /// concept: Repair of tetralogy of Fallot + 4019932, # source: Repositioning of transposed great arteries /// concept: Arterial switch operation + 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection + 4020376, # source: Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch /// concept: Closure of defect of interatrial septum using pericardial patch + 4020506, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Creation of valved conduit between right ventricle of heart and pulmonary artery + 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit + 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus + 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection + 4020520, # source: Open aortic valvotomy /// concept: Open aortic valvotomy + 4018747, # source: Repair of subaortic stenosis /// concept: Operations on the left ventricular outflow tract + 4019233, # source: Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr /// concept: Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis + 4019237, # source: Creation of anastomosis to pulmonary artery from vena cava /// concept: Anastomosis of vena cava to pulmonary artery + 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery + 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery + 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta + 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta + 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta + 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction + 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit + 4336751, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Allotransplant of heart + 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle + 4050114, # source: Closure of patent ductus arteriosus NEC /// concept: Closure of ductus arteriosus with clip + 4052536, # source: Extracorporeal membrane oxygenation /// concept: Extracorporeal membrane oxygenation + 44790415, # source: Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty /// concept: Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty + 4144921, # source: Implantation of cardiac pacemaker system NEC /// concept: Implantation of cardiac pacemaker + 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart + 44793133, # source: Aortopulmonary reconstruction with systemic to pulmonary arterial shunt /// concept: Aortopulmonary reconstruction with systemic to pulmonary arterial shunt + 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve + 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery + 4139214, # source: Open implantation of ventricular assist device /// concept: Open implantation of cardiac ventricular assist device + 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit + 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum + 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect + 4199899, # source: Unspecified repair of defect of interventricular septum /// concept: Closure of ventricular septal defect + 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve + 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm + 4308136, # source: Repair of tetralogy of fallot using transannular patch /// concept: Complete repair of tetralogy of Fallot with transannular patch + 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve + 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve + 4232476 # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis + ), - # laboratory tests - labTests = c( # 5.13 + # 5.10 cardiac radiology + cardiacRadiology = c( + 4019824, # source: US transoesophageal echocardiogram (toe) /// concept: Transesophageal echocardiography + 4032404, # source: IR bronchoscopy /// concept: Bronchoscopy + 4065416, # source: Exercise test (non-CPET) /// concept: Exercise tolerance test + 4345925, # source: FL video swallow /// concept: Videofluoroscopy swallow + 4083106, # source: US cranial contents /// concept: US scan of head + 4083108, # source: US neck /// concept: US scan of neck + 4082979, # source: MRI head /// concept: MRI of head + 4093436, # source: US thorax and pleural cavity /// concept: Ultrasonography of thorax + 4125350, # source: CT head /// concept: CT of head + 4125530, # source: US urinary tract /// concept: US urinary tract + 44802640, # source: MRI cardiac complex congenital /// concept: MRI study for cardiac congenital anomaly + 4163872, # source: XR chest /// concept: Plain chest X-ray + 4167029, # source: US doppler groin both /// concept: Ultrasonography of inguinal region + 4167052, # source: US doppler renal both /// concept: Doppler ultrasonography of kidney + 4305221, # source: US abdomen and pelvis/ US abdomen /// concept: US scan of abdomen and pelvis + 4303522, # source: US diaphragmatic region /// concept: US scan of diaphragm + 4306317, # source: CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast /// concept: CT angiography of coronary artery with contrast + 4169275, # source: XR chest and abdomen /// concept: X-ray of chest and abdomen + 4322380, # source: IR PICC line insertion /// concept: Insertion of peripherally inserted central catheter + 4140473, # source: 24h holter monitor /// concept: Holter extended electrocardiographic recording + 4329508, # source: US thorax and pleural cavity /// concept: Ultrasonography of pleural cavity + 4335392, # source: US doppler lower limb veins both /// concept: Doppler ultrasonography of vein of lower limb + 4203365, # source: Epicardial echocardiogram /// concept: Epicardial echocardiography + 4335825, # source: US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) /// concept: Transthoracic echocardiography + 40482732, # source: IR tunnelled central venous line insertion /// concept: Insertion of tunneled venous catheter + 40489841, # source: US doppler jugular vein both /// concept: Doppler ultrasonography of jugular vein + 40492338, # source: Cardiopulmonary exercise test (CPET) /// concept: Cardiopulmonary exercise test + 40488431, # source: Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) /// concept: Interrogation of cardiac pacemaker + 42873079, # source: IR tunnelled central venous line removal /// concept: Removal of tunneled central venous catheter + 4261497, # source: US abdomen and pelvis/ US abdomen /// concept: Ultrasonography of abdomen + 4205144, # source: EEG routine portable /// concept: Portable electroencephalogram + 4181917, # source: EEG routine /// concept: Electroencephalogram + 4264477, # source: XR abdomen /// concept: Diagnostic radiography of abdomen + 45764527, # source: 24h holter monitor /// concept: Electrocardiographic Holter analyzer + 45765560, # source: Event monitor /// concept: Cardiovascular monitor + 4327032, # source: CT thorax with contrast /// concept: CT of thorax with contrast + 35622931, # source: US doppler /// concept: Doppler ultrasound + 44813863, # source: US vocal cord /// concept: Ultrasonography of vocal cord + 4312208, # source: IR bronchogram /// concept: Contrast bronchogram + 4235141 # source: Pacemaker/ICD device check - remote patient initiated /// concept: Check artificial pacemaker + ), + + # 5.11 cardiac length of stay + cardiac_LOS = c( + 4123933, # source: ICU admission (start datetime and end datetime) /// concept: Admission to pediatric intensive care unit + 8715, # source: Total hospital admission (start datetime and end datetime) /// concept: Hospital admission + 4161811, # source: HDU admission (start datetime and end datetime) /// concept: Admission to high dependency unit + 36675203 # source: Cardiology ward admission (start datetime and end datetime) /// concept: Admission to pediatric cardiology department + ), + + # 5.12 additional variables + additional = c( + 4124462, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: None + 4095105, # source: Base Excess /// concept: Base deficit measurement + 4123933, # source: Elective ICU admission /// concept: Admission to pediatric intensive care unit + 4234469, # source: Diagnoses /// concept: Diagnosis + 40493026, # source: Mechanical ventilation /// concept: Mechanical ventilator + 44803020, # source: Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) /// concept: Primary reason for admission + 4209008, # source: Pupillary reaction /// concept: Pupillary function + 260134, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Croup + 432571, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Malignant lymphoma + 4029498, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Seizure disorder + 317009, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Asthma + 201957, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Necrotizing enterocolitis in fetus OR newborn + 43530727, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Spontaneous cerebral hemorrhage + 29783, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Severe combined immunodeficiency disease + 321042, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Cardiac arrest + 4165112, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Bronchiolitis + 443727, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Diabetic ketoacidosis + 314383, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Myocarditis + 4245975, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Hepatic failure + 440207, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Hypoplastic left heart syndrome + 42537745, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Bone marrow transplant present + 442588, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Obstructive sleep apnea syndrome + 4213310, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Degenerative disease of the central nervous system + 321319, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Cardiomyopathy + 317510, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Leukemia + 5083, # source: Outpatient appointment type (telephone/ clinic visit etc.) /// concept: Telehealth + 42869590, # source: FiO2 /// concept: Oxygen/Gas total [Pure volume fraction] Inhaled gas + 3027946, # source: PaCO2 /// concept: Carbon dioxide [Partial pressure] in Arterial blood + 3004249 # source: Systolic blood pressure /// concept: Systolic blood pressure + ), + + # 5.13 laboratory tests + labTests = c( 4298431, # source: Immature WBC Count /// concept: White blood cell count 3007670, # source: Neutrophil Count /// concept: Neutrophil Ab [Units/volume] in Serum 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood @@ -38,46 +272,175 @@ conceptSets <- list( 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood ), - # cardiac complications + # 5.14 cardiac complications cardiacComplications = c( - 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis - 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration - 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome - 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest + 4051330, # source: LCOS - renal support (CVVH/ PD) /// concept: Continuous venovenous hemofiltration + 4123933, # source: ICU ward stay /// concept: Admission to pediatric intensive care unit + 4295705, # source: Surgical injury - Reexplore for bleeding /// concept: Exploratory incision + 377091, # source: Neurological injury - seizure /// concept: Seizure + 439847, # source: Neurological injury - intracranial haemmhorage/ intracranial bleeding /// concept: Intracranial hemorrhage + 4308537, # source: Surgical injury - Blood Loss /// concept: Injury to blood vessel during surgery + 321042, # source: LCOS - Cardiac arrest /// concept: Cardiac arrest + 443454, # source: Neurological injury - infarction /// concept: Cerebral infarction + 4185565, # source: Low cardiac output state (LCOS) - ECMO /// concept: Low cardiac output syndrome + 42537043, # source: CVL infections /// concept: CLABSI - central line associated bloodstream infection + 4306136 # source: Surgical injury - Chylothorax /// concept: Chylothorax ), - # intubation - intubation = c( - 4202832 # source: Intubation /// concept: Intubation + # 5.21 healthcare use + healthcareUse = c( + 37174269, # source: Diagnosis of acute infection having the potential for progression to sepsis1+2 /// concept: At increased risk of sepsis + 4032243, # source: Dialysis /// concept: Dialysis procedure + 197320, # source: acute kidney injury /// concept: Acute kidney injury + 4074689, # source: "Chest opening, chest drainage" /// concept: Open drainage of pleural cavity + 4084670, # source: Surgical admission (non-urgent) /// concept: Non-urgent surgical admission + 4070667, # source: Urinary catheter /// concept: Urinary catheter + 44790095, # source: Invasive ventilation /// concept: Invasive ventilation + 4052536, # source: ECMO /// concept: Extracorporeal membrane oxygenation + 4051330, # source: Dialysis /// concept: Continuous venovenous hemofiltration + 44790567, # source: Origin (external) /// concept: Patient transfer from hospital to hospital + 133327, # source: viremia /// concept: Viremia + 4097216, # source: Endotracheal tube /// concept: Endotracheal tube + 4085730, # source: Antibiotics /// concept: Antibiotic therapy + 4123946, # source: Surgical admission (urgent) /// concept: Admission to surgical department + 4208341, # source: organ transplant /// concept: Solid organ transplant + 4193843, # source: Oxygenation index /// concept: Oxygenation index measurement + 4235043, # source: Ventricular assist device (VAD) /// concept: Ventricular assist device + 443392, # source: Cancer /// concept: Malignant neoplastic disease + 4181511, # source: Antineoplastics /// concept: Administration of antineoplastic agent + 4294886, # source: Origin (internal) /// concept: "Patient transfer, in-hospital" + 4301351, # source: Surgery previous to prediction time point /// concept: Surgical procedure + 4140762, # source: Antivirals /// concept: Antiviral therapy + 4177205, # source: Peripheral IV cannulas /// concept: Cannulation + 4177224, # source: Non-invasive ventilation /// concept: Non-invasive ventilation + 45758028, # source: Arterial blood pressure catheter /// concept: Arterial blood pressure catheter + 44803020, # source: Reason for admission /// concept: Primary reason for admission + 4179206, # source: Central venous catheter /// concept: Central venous catheter + 132736, # source: bacteremia /// concept: Bacteremia + 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea + 45768671, # source: asplenia /// concept: Asplenia + 4324124, # source: Peritoneal dialysis /// concept: Peritoneal dialysis + 435785, # source: meningitis /// concept: Meningitis + 201820, # source: Diagnosis of chronic condition /// concept: Diabetes mellitus + 42538045, # source: Nasogastric/orogastric tube /// concept: Nasogastric/orogastric tube stylet + 37206601, # source: ECMO type /// concept: Venoarterial extracorporeal membrane oxygenation + 37206603, # source: ECMO type /// concept: Venovenous extracorporeal membrane oxygenation + 4314777, # source: Immunosuppressors /// concept: Immunosuppressive therapy + 604243, # source: neutropenia /// concept: Acquired neutropenia + 444187, # source: injury with open wound /// concept: Open wound + 22281, # source: sickle cell disease /// concept: Sickle cell-hemoglobin SS disease + 435613, # source: cellulitis /// concept: Cellulitis + 4134120, # source: cerebral palsy /// concept: Cerebral palsy + 444202, # source: Abcess /// concept: Abscess + 312723, # source: Diagnosis of chronic condition /// concept: Congenital heart disease + 255573, # source: Diagnosis of chronic condition /// concept: Chronic obstructive lung disease + 255848, # source: pneumonia /// concept: Pneumonia + 433740, # source: immunodeficiency /// concept: Immunodeficiency disorder + 4080011, # source: Diagnosis of organ system dysfunction /// concept: Organ dysfunction syndrome + 434821, # source: Diagnosis of SIRS /// concept: Systemic inflammatory response syndrome + 81539, # source: mitochondrial disease /// concept: Mitochondrial cytopathy + 4103588, # source: tuberculosis /// concept: Acute tuberculosis + 443783, # source: Diagnosis of chronic condition /// concept: Chronic disease + 4140977, # source: Diagnosis of condition producing immunodeficiency /// concept: Secondary immune deficiency disorder + 201606, # source: Crohn's disease /// concept: Crohn's disease + 4243475, # source: hepatitis /// concept: Acute hepatitis + 4300243, # source: surgical site inflammation /// concept: Postoperative complication + 439125, # source: Down's syndrome /// concept: Complete trisomy 21 syndrome + 321042, # source: cardiac arrest /// concept: Cardiac arrest + 4331815, # source: UTI /// concept: Acute urinary tract infection + 195212, # source: Cushing's disease /// concept: Hypercortisolism + 196152, # source: peritonitis /// concept: Peritonitis + 314383, # source: miocarditis /// concept: Myocarditis + 195314, # source: nephrotic syndrome /// concept: Nephrotic syndrome + 441589, # source: endocarditis /// concept: Endocarditis + 4271450, # source: Diagnosis of acute infection having the potential for progression to sepsis1+2 /// concept: Acute infectious disease + 81893, # source: ulcerative colitis /// concept: Ulcerative colitis + 80809, # source: rheumatoid arthritis /// concept: Rheumatoid arthritis + 4322814, # source: Meningo-encephalitis /// concept: Meningoencephalitis + 36716945, # source: renal insufficiency /// concept: Renal insufficiency + 440448, # source: appendicitis /// concept: Appendicitis + 433968, # source: candidiasis /// concept: Candidiasis + 44807226, # source: necrotizing enterocolitis /// concept: Necrotising enterocolitis + 132797, # source: Previous diagnosis of sepsis measure /// concept: Sepsis + 44777590, # source: Mean Airway Pressure (MAP) /// concept: centimeter watercolumn + 44777602, # source: Mean Airway Pressure (MAP) /// concept: kilopascal + 8510, # source: FiO2 /// concept: unit + 8554, # source: FiO2 /// concept: percent + 720868, # source: FiO2 /// concept: fraction + 8529, # source: Oxygenation index /// concept: index + 8876, # source: Mean Airway Pressure (MAP) /// concept: millimeter mercury column + 21602722, # source: Corticoids /// concept: CORTICOSTEROIDS FOR SYSTEMIC USE + 42869590, # source: FiO2 /// concept: Oxygen/Gas total [Pure volume fraction] Inhaled gas + 42527086, # source: Mean Airway Pressure (MAP) /// concept: Mean airway pressure + 1340204 # source: Previous diagnosis of sepsis measure /// concept: History of event ), - # cardiac procedures - cardiacProcedures = c( - 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery - 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart - 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit - 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit - 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit - 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve - 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve - 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis - 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve - 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection - 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot - 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus - 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery - 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection - 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect - 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve - 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle - 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery - 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction - 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta - 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum - 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm - 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta - 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta - 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart + # 5.22 vital signs UC2 + vitalSignsUC2 = c( + 4096101, # source: SpO2 /// concept: Measurement of oxygen saturation at periphery + 3025315, # source: Weight /// concept: Body weight + 3020891, # source: Body temperature /// concept: Body temperature + 3012888, # source: DBP (Diastolic blood pressure) /// concept: Diastolic blood pressure + 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure + 3014315, # source: Urine output /// concept: Urine output + 3024171, # source: RR /// concept: Respiratory rate + 1004025 # source: HR /// concept: Heart rate + ), + + # 5.23 physical examination signs + physicalExaminationSigns = c( + 4224504, # source: Central pulse /// concept: Pulse + 4314539, # source: Peripheral pulse (pressure) /// concept: Arterial pulse pressure + 21490963, # source: Pupillary reactivity (right) /// concept: Right pupil Pupillary response + 3032652, # source: GCS /// concept: Glasgow coma scale + 3045676, # source: Capillary refill time /// concept: Capillary refill [Time] + 21491763, # source: Pupillary reactivity (left) /// concept: Left pupil Pupillary response + 3021415, # source: Pupillary size (left) /// concept: Left pupil Diameter Auto + 3027214 # source: Pupillary size (right) /// concept: Right pupil Diameter Auto + ), + + # 5.24 lab tests UC2 + labTestsUC2 = c( + 37393605, # source: D-dimer /// concept: D-dimer level + 4017361, # source: Blood urea nitrogen /// concept: Blood urea nitrogen measurement + 4036356, # source: Bacterial pathogen detection /// concept: Detection of bacteria + 44789220, # source: Ionized calcium /// concept: Ionised calcium measurement + 4094436, # source: Fibrinogen /// concept: Fibrinogen measurement + 4118986, # source: Direct bilirubin /// concept: Bilirubin measurement + 4196268, # source: PCR panel /// concept: Polymerase chain reaction observation + 440029, # source: Viral pathogen detection /// concept: Viral disease + 4212899, # source: Leukocytes /// concept: Total white blood count + 4175016, # source: Thromboplastin time /// concept: Partial thromboplastin time, activated + 42536081, # source: MR-proADM /// concept: Adrenal medulla hormone + 4299649, # source: Quantification of colonies in culture /// concept: Quantitative microbial culture and measurement + 44806682, # source: Antibiotic resistance /// concept: Infection resistant to multiple antibiotics + 432545, # source: Name of bacterial pathogen detected /// concept: Bacterial infectious disease + 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma + 3046279, # source: PCT /// concept: Procalcitonin [Mass/volume] in Serum or Plasma + 3033291 # source: Interleukin-6 /// concept: Interleukin 6 [Mass/volume] in Body fluid + ), + + # 5.25 arterial blood gas + arterialBloodGas = c( + 3003396, # source: Base excess /// concept: Base excess in Arterial blood by calculation + 3019977, # source: pH /// concept: pH of Arterial blood + 3008152, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Arterial blood + 3027946, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Arterial blood + 3027801 # source: PaO2 /// concept: Oxygen [Partial pressure] in Arterial blood + ), + + # 5.26 venous blood gas + venousBloodGas = c( + 3009343, # source: pH /// concept: pH of Capillary blood + 3027273, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Venous blood + 3003129, # source: Base excess /// concept: Base excess in Capillary blood by calculation + 3002032, # source: Base excess /// concept: Base excess in Venous blood by calculation + 3015235, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Capillary blood + 3023024, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Capillary blood + 3021447, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Venous blood + 3028626, # source: PaO2 /// concept: Oxygen [Partial pressure] in Capillary blood + 3024354, # source: PaO2 /// concept: Oxygen [Partial pressure] in Venous blood + 3012544 # source: pH /// concept: pH of Venous blood ) ) ) From 0867c6ff4fdb0308c6d9d6ce9a621b4886815f22 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 15:08:59 +0200 Subject: [PATCH 035/130] sync R script --- project/R/cohortCapr.R | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R index 8796e25f..23164453 100644 --- a/project/R/cohortCapr.R +++ b/project/R/cohortCapr.R @@ -1,18 +1,18 @@ -## ----knitr, include=FALSE------------------------------------------------------------------------ +## ----knitr, include=FALSE------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) -knitr::purl( - input = './R/cohortCapr_md.Rmd', - output = './R/cohortCapr.R' -) +# knitr::purl( +# input = './R/cohortCapr_md.Rmd', +# output = './R/cohortCapr.R' +# ) -## ----Get project configurations------------------------------------------------------------------ +## ----Get project configurations------------------------------------------------------------------------- connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') -## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------ +## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------------- # Use connection details from configuration connectionDetails <- createConnectionDetails( dbms = connectionConfig$dbms, @@ -25,7 +25,7 @@ connectionDetails <- createConnectionDetails( ) -## ----concept sets, echo=TRUE--------------------------------------------------------------------- +## ----concept sets, echo=TRUE---------------------------------------------------------------------------- ## Concept sets source("./R/conceptSets.R") @@ -42,7 +42,7 @@ conceptSets$conceptSets <- conceptSets$conceptSets %>% disconnect(con) -## ----count occurences, echo=TRUE----------------------------------------------------------------- +## ----count occurences, echo=TRUE------------------------------------------------------------------------ ## Count occurrences of each concept in data # Establish connection @@ -68,7 +68,7 @@ source("./R/table_linked_to_concept_field.R") disconnect(con) -## ----Standard non-standard check----------------------------------------------------------------- +## ----Standard non-standard check------------------------------------------------------------------------ source('./R/isStandard.R') # Connect to DB @@ -89,7 +89,7 @@ disconnect(con) nonStandard -## ----Cohort definition--------------------------------------------------------------------------- +## ----Cohort definition---------------------------------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( @@ -131,7 +131,7 @@ ch <- cohort( ) -## ----json and sql-------------------------------------------------------------------------------- +## ----json and sql--------------------------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -146,7 +146,7 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json------------------------------------------------------------ +## ----Save cohort and concept set json------------------------------------------------------------------- write(chJson, "./json/cohort.json") for (cs in names(conceptSets$conceptSets)) { writeConceptSet( @@ -156,7 +156,7 @@ for (cs in names(conceptSets$conceptSets)) { } -## ----Create and generate cohorts----------------------------------------------------------------- +## ----Create and generate cohorts------------------------------------------------------------------------ # Establish connection con <- connect(connectionDetails) @@ -198,7 +198,7 @@ disconnect(con) cohortCounts -## ----retrieve updated DB------------------------------------------------------------------------- +## ----retrieve updated DB-------------------------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) From 9e589884085d1d03fc801892637b4606b4f933e1 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 12 Jul 2024 15:52:37 +0200 Subject: [PATCH 036/130] update cohort definition --- project/R/cohortCapr_md.Rmd | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd index ed97f925..a757d8f3 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/project/R/cohortCapr_md.Rmd @@ -134,16 +134,13 @@ nonStandard ``` ## Initial event cohort -People having any of the following: -any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} +```{r Cohort definition, eval=FALSE} ## Cohort definition # Create cohort definition ch <- cohort( entry = entry( - # enter patients < 80 years old who have had a lab test - measurement(conceptSets$conceptSets$labTests, age(lt(80))), + # enter patients < 70 years old who have had a lab test + procedure(conceptSets$conceptSets$cardiacSurgery, age(lt(70))), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -164,17 +161,20 @@ ch <- cohort( withAny( atLeast( x = 1, - # include all cardiac surgeries - query = procedure(conceptSets$conceptSets$cardiacProcedures) + # include patients who have had cardiac surgery + query = procedure(conceptSets$conceptSets$cardiacSurgery) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) ) ) ), exit = exit( - endStrategy = observationExit(), - censor = censoringEvents( - # exit if intubation has taken place - procedure(conceptSets$conceptSets$intubation) - ) + endStrategy = observationExit() ) ) ``` From 484757254de3fd7284124eb03ba77aa6ff8ec972 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:43:28 +0200 Subject: [PATCH 037/130] update standard_config-sample.yml --- project/config/is_standard_config-sample.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/config/is_standard_config-sample.yml b/project/config/is_standard_config-sample.yml index 61dd898e..7f86b8f0 100644 --- a/project/config/is_standard_config-sample.yml +++ b/project/config/is_standard_config-sample.yml @@ -1,6 +1,8 @@ --- default: conceptsPath: null + savePath: null # (optional) if saving standard concept check results config: - conceptsPath: '' \ No newline at end of file + conceptsPath: '' + savaPath: '' \ No newline at end of file From 4fd9a44cee3506df63079f2b2d03f5da2e571334 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:43:46 +0200 Subject: [PATCH 038/130] remove unnecessary file --- project/R/table_linked_to_concept_field.R | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 project/R/table_linked_to_concept_field.R diff --git a/project/R/table_linked_to_concept_field.R b/project/R/table_linked_to_concept_field.R deleted file mode 100644 index a871b6cf..00000000 --- a/project/R/table_linked_to_concept_field.R +++ /dev/null @@ -1,14 +0,0 @@ -# Link table names to respective concept_id field -links <- list( - condition_occurrence = "condition_concept_id", - death = "cause_concept_id", - device_exposure = "device_concept_id", - drug_exposure = "drug_concept_id", - measurement = "measurement_concept_id", - observation = "observation_concept_id", - procedure_occurrence = "procedure_concept_id", - specimen = "specimen_concept_id", - visit_occurrence = "visit_concept_id" -) - -cat("Sourced links object") \ No newline at end of file From 4946c35e336487905f1c14b5028e92fac62796e2 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:44:07 +0200 Subject: [PATCH 039/130] update standard concept check --- project/R/isStandard.R | 173 ++++++++++++++++++++--------------------- 1 file changed, 86 insertions(+), 87 deletions(-) diff --git a/project/R/isStandard.R b/project/R/isStandard.R index 9c3b12be..c15bbb72 100644 --- a/project/R/isStandard.R +++ b/project/R/isStandard.R @@ -1,93 +1,92 @@ -# Filters CONCEPT table from database for included concepts per -# a table of source codes and provided concepts. The accepted format for this source code table -# is CSV files with at least fields 'sourceCode' to store source codes or source terms and -# 'concept_id' to store concept_ids. -# These tables are read from data_concepts_path. -# -# If a save_path is provided, results are written as filtered versions of the CONCEPT -# table to the directory save_path points to; with one table for each provided table -# of concepts. It is recommended to provide one table of concepts per source table. -# If no save_path is provided, results are not saved. -# -# The function will always return a tibble of non-standard concepts -# that can be inspected in the R environment or directly printed to the console. -# -# Arguments: -# concept_table_path: -# path to CONCEPT.csv from Athena vocabulary download -# -# data_concepts_path: -# path to directory of CSVs with fields sourceCode and concept_id -# see ./project/data/phems_variable/list/*.csv for examples -# -# save_path: -# path to directory to save filtered concept table with only included concepts -# ! Can be null if write_tables = FALSE -# -# write_tables: -# Boolean toggle for whether to save the results +#' Check for Non-Standard Concepts in Database Tables +#' +#' This function examines a set of tables for non-standard concepts by comparing them against a standard concepts table in a SQL database. It identifies non-standard concepts and optionally saves the joined tables that contain these non-standard concepts. +#' +#' @param db_connection A DBI database connection object to the SQL database containing the standard concepts table. +#' @param data_concepts_path The file path to the directory containing CSV files of tables to be checked against the standard concepts table. Each CSV file should contain at least the columns `sourceCode` and `concept_id`. +#' @param save_path (Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts. +#' +#' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. +#' +#' @details The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. +#' +#' If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. +#' +#' @examples +#' # Assuming you have a valid DBI connection `db_conn` and your tables are located in "path/to/data_concepts": +#' non_standard_concepts <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") +#' +#' @importFrom readr read_csv write_csv +#' @importFrom dplyr mutate across filter select inner_join +#' @importFrom DBI dbGetQuery +#' @export +isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { + library(readr) + library(dplyr) + library(DBI) + + # Read concept table from SQL database + concept_table_query <- "SELECT concept_id, concept_name, standard_concept FROM cdm.concept" + concept_table <- dbGetQuery(db_connection, concept_table_query) %>% + mutate(concept_id = as.character(concept_id)) %>% + mutate(concept_id = tolower(trimws(concept_id))) -library(readr) -library(dplyr) -library(DBI) + # Initialize vectors for non-standard concepts + nonStandard <- c() + conceptNameNonStandard <- c() + sourceCodeNonStandard <- c() + sourceTableNonStandard <- c() + + # Get tables from data_concepts_path + tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) -isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { - # db_connection is a DBI database connection object + # Stop if path does not point towards dir of CSVs + if (length(tables) == 0) { + stop("No CSV files found in the specified directory.") + } + + for (table_path in tables) { + table_name <- basename(table_path) - # Read concept table from SQL database - concept_table_query <- "SELECT concept_id, concept_name, standard_concept FROM cdm.concept" - concept_table <- dbGetQuery(db_connection, concept_table_query) %>% - mutate(concept_id = as.character(concept_id)) %>% - mutate(concept_id = tolower(trimws(concept_id))) + # Read and prepare table + tb <- + readr::read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% + mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% + mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% + filter(!is.na(sourceCode), !is.na(concept_id)) %>% + mutate(concept_id = tolower(concept_id), + concept_id = as.character(concept_id)) %>% + select(sourceCode, concept_id) - # Initialize vectors for non-standard concepts - nonStandard <- c() - conceptNameNonStandard <- c() - sourceCodeNonStandard <- c() - sourceTableNonStandard <- c() + # Join tables + joined <- inner_join(concept_table, tb, by = "concept_id") + + # Add non-standard concept info to vectors + ind <- which(!(joined$standard_concept %in% c('S', 'C'))) + nonStandard <- append(nonStandard, joined$concept_id[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) + sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) + sourceTableNonStandard <- append(sourceTableNonStandard, + replicate(length(ind), table_name, simplify="vector")) - # Get tables from data_concepts_path - tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) - for (table_path in tables) { - table_name <- basename(table_path) - - # Read and prepare table - tb <- - read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% - mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% - mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% - filter(!is.na(sourceCode), !is.na(concept_id)) %>% - mutate(concept_id = tolower(concept_id), - concept_id = as.character(concept_id)) %>% - select(sourceCode, concept_id) - - # Join tables - joined <- inner_join(concept_table, tb, by = "concept_id") - - # Add non-standard concept info to vectors - ind <- which(!(joined$standard_concept %in% c('S', 'C'))) - nonStandard <- append(nonStandard, joined$concept_id[ind]) - conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) - sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) - sourceTableNonStandard <- append(sourceTableNonStandard, - replicate(length(ind), table_name, simplify="vector")) - - # Save if not empty and save_path is provided - if (!is.null(save_path) && nrow(joined) > 0) { - message(paste("saving file: ", table_name)) - write_csv(joined, paste0(save_path, table_name)) - } else { - message(paste("No matches found for table:", table_name, "\n")) - } + # Save if not empty and save_path is provided + if (!is.null(save_path) && nrow(joined) > 0) { + message(paste("saving file: ", table_name)) + readr::write_csv(joined, paste0(save_path, "/", table_name)) + } else if (is.null(save_path)) { + next + } else { + message(paste("No matches found for concept set.\n")) } - - # Create table of non-standard concepts - res <- tibble::tibble( - concept_id = nonStandard, - concept_name = conceptNameNonStandard, - source_code = sourceCodeNonStandard, - source_table = unlist(sourceTableNonStandard) - ) - - return(res) - } \ No newline at end of file + } + + # Create table of non-standard concepts + res <- tibble::tibble( + concept_id = nonStandard, + concept_name = conceptNameNonStandard, + source_code = sourceCodeNonStandard, + source_table = unlist(sourceTableNonStandard) + ) + + return(res) +} \ No newline at end of file From 3c3ed547edeca5f03872d7192c10826070c92f15 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:44:27 +0200 Subject: [PATCH 040/130] Add standard concept checker for across concept setS --- project/R/isStandardCS.R | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 project/R/isStandardCS.R diff --git a/project/R/isStandardCS.R b/project/R/isStandardCS.R new file mode 100644 index 00000000..92520f04 --- /dev/null +++ b/project/R/isStandardCS.R @@ -0,0 +1,73 @@ +#' Check for Non-Standard Concepts in Concept Sets +#' +#' This function examines a concept set for non-standard concepts by comparing them against a standard concepts table in a SQL database. It identifies non-standard concepts and optionally saves the details of these non-standard concepts to a specified path. +#' +#' @param db_connection A DBI database connection object to the SQL database containing the standard concepts table. This parameter is currently not used in the function but intended for future use where database queries might be necessary. +#' @param conceptSet An object representing a set of concepts, containing details such as concept ID, concept name, and whether it is a standard concept. The structure of this object should support `@Expression` to access the individual concepts and their properties. +#' @param save_path (Optional) The file path where the details of non-standard concepts should be saved as a CSV file. If not provided, the information will not be saved but will still be checked for non-standard concepts. +#' +#' @return A tibble containing the columns `concept_name`, `concept_id`, `concept_set`, and `standard`, which represent the concept name, concept ID, the name of the concept set, and the standard status for each concept found to be non-standard or not classified as standard. +#' +#' @details The function processes a given concept set to identify non-standard concepts. Non-standard concepts are those not marked as 'S' (Standard) or 'C' (Classification) in their `standard_concept` attribute. The function creates a data frame with concept details, filters out standard and classification concepts, and if a `save_path` is provided, saves this information to a CSV file. If no non-standard concepts are found, appropriate messages are displayed. +#' +#' @examples +#' # Assuming you have a concept set `conceptSet`: +#' non_standard_concepts <- isStandardCS(db_conn, conceptSet, "path/to/save_standard_AND_non_standard/") +#' +#' @export +isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { + library(readr) + library(dplyr) + library(DBI) + + # Initialize vectors for non-standard concepts + nonStandard <- c() + conceptNameNonStandard <- c() + sourceCodeNonStandard <- c() + sourceTableNonStandard <- c() + + # Get concept set details + cs <- conceptSet@Expression + + # initialize vectors + concept_name = c() + concept_id = c() + concept_set = c() + standard = c() + + for (concept in cs) { + concept_name <- append(concept_name, concept@Concept@concept_name) + concept_id <- append(concept_id, concept@Concept@concept_id) + standard <- append(standard, concept@Concept@standard_concept) + } + cs_name <- conceptSet@Name + concept_set <- rep.int(cs_name, length(concept_id)) + + # Filter out standard and classification concepts; keep non-standard and NA + df <- data.frame( + concept_name, + concept_id, + concept_set, + standard + ) + + # Save if not empty and save_path is provided + if (!is.null(save_path) && nrow(df) > 0) { + message(paste("saving file: CONCEPTSET_", cs_name)) + write_csv(df, paste0(save_path, "/CONCEPTSET_", cs_name, ".csv")) + } else if (is.null(save_path)) { + message("No save path specified; returning non-standard concepts\n") + } else { + message(paste("No matches found for table:", table_name, "\n")) + } + + + # NonStandard concepts + res <- df %>% filter(standard != "S" & standard != "C" | is.na(standard)) %>% tibble::tibble() + if (nrow(res) == 0) { + message("No non-standard concepts found in concept set ", cs_name) + } else { + message(paste("Found ", nrow(res), " non-standard concepts in concept set ", cs_name)) + } + return(res) +} \ No newline at end of file From 8466f8bc6fa721af4ce11e2110a6fd50c4698aec Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:44:43 +0200 Subject: [PATCH 041/130] docstring for conceptSets.R --- project/R/conceptSets.R | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 87337c77..f2696a01 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -1,7 +1,17 @@ +#' Medical Concept Sets Definition and Expansion +#' +#' This script defines and expands various concept sets related to medical data. It utilizes the Capr library to fetch all descendant concepts +#' for each defined concept set, ensuring comprehensive coverage of related medical concepts. +#' +#' @details The script initializes by defining multiple concept sets within a list structure. Each concept set contains unique identifiers for medical concepts, +#' which are expanded to include all descendant concepts using the Capr library's functionality. The expanded concept sets are then stored in a new list within +#' the `conceptSets` object. Finally, the script outputs a confirmation message indicating successful sourcing and expansion of concept sets. +#' +#' @note This script requires the Capr library to be installed and loaded for proper execution. + library(Capr) ## Define list of concepts to use for concept sets -# include all descendant concepts conceptSets <- list( concepts = list( @@ -81,6 +91,8 @@ conceptSets <- list( ) ) ) + +## Extend with descendants conceptSets$conceptSets <- list() for (cs in names(conceptSets$concepts)) { conceptSets$conceptSets[[cs]] <- cs(descendants(conceptSets$concepts[[cs]]), name = cs) From 07a379482d96ee9ec92d394f6a1e498fbad08be5 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:56:01 +0200 Subject: [PATCH 042/130] update with docstring --- project/R/countOccurrences.R | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/project/R/countOccurrences.R b/project/R/countOccurrences.R index 597b6640..79cfa2c7 100644 --- a/project/R/countOccurrences.R +++ b/project/R/countOccurrences.R @@ -1,8 +1,34 @@ -library(DBI) -library(dplyr) -library(tibble) - +#' Count Occurrences of Values in Database Tables +#' +#' This function counts the occurrences of specified concept ids within specified tables in a OMOP database, +#' including direct occurrences and occurrences through descendants, based on a provided schema and links. +#' It returns a tibble summarizing the counts across persons and across records. +#' +#' @param v A vector of concept_ids to count occurrences for. +#' @param tables A character vector of CDM table names to search within. +#' @param links A list linking each table to its respective concept_id field. +#' @param db_connection A database connection object through which queries will be executed. +#' @param schema The database schema in which the tables are located. +#' +#' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, +#' direct count of records, descendant count of persons, and descendant count of records. +#' The tibble also includes the concept names derived from `v` and is arranged by the total +#' record count (direct + descendant). +#' +#' @examples +#' # Assuming `db_connection` is a valid database connection, `schema` is set to "public", +#' # `tables` contains the names of the tables to search, `links` defines the relevant fields, +#' # and `v` contains the values to search for: +#' results <- countOccurrences(v = c(1, 2), tables = c("observation", "condition_occurrence"), +#' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), +#' db_connection = db_connection, schema = "public") +#' +#' @export countOccurrences <- function(v, tables, links, db_connection, schema) { + library(DBI) + library(dplyr) + library(tibble) + stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) From 00116e52cb0417299c64f91869d9c6154e70ef48 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:56:29 +0200 Subject: [PATCH 043/130] update main code --- project/R/cohortCapr.R | 60 +++++++++++++++++++++++++------------ project/R/cohortCapr_md.Rmd | 41 +++++++++++++++++++------ 2 files changed, 73 insertions(+), 28 deletions(-) diff --git a/project/R/cohortCapr.R b/project/R/cohortCapr.R index 23164453..481e9361 100644 --- a/project/R/cohortCapr.R +++ b/project/R/cohortCapr.R @@ -1,4 +1,4 @@ -## ----knitr, include=FALSE------------------------------------------------------------------------------- +## ----knitr, include=FALSE----------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) # knitr::purl( @@ -7,12 +7,12 @@ knitr::opts_chunk$set(echo = TRUE) # ) -## ----Get project configurations------------------------------------------------------------------------- +## ----Get project configurations----------------------------------------------------------------------------- connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') -## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------------- +## ----connect to database, eval=TRUE, include=TRUE----------------------------------------------------------- # Use connection details from configuration connectionDetails <- createConnectionDetails( dbms = connectionConfig$dbms, @@ -25,7 +25,7 @@ connectionDetails <- createConnectionDetails( ) -## ----concept sets, echo=TRUE---------------------------------------------------------------------------- +## ----concept sets, echo=TRUE-------------------------------------------------------------------------------- ## Concept sets source("./R/conceptSets.R") @@ -42,7 +42,7 @@ conceptSets$conceptSets <- conceptSets$conceptSets %>% disconnect(con) -## ----count occurences, echo=TRUE------------------------------------------------------------------------ +## ----count occurences, echo=TRUE---------------------------------------------------------------------------- ## Count occurrences of each concept in data # Establish connection @@ -59,37 +59,59 @@ source("./R/table_linked_to_concept_field.R") # countOccurrences( # conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema # ) %>% print() -# labTestsCounts <- -# countOccurrences( -# conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema -# ) %>% print() +labTestsCounts <- + countOccurrences( + conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema + ) %>% print() # Disconnect disconnect(con) -## ----Standard non-standard check------------------------------------------------------------------------ -source('./R/isStandard.R') - +## ----Standard non-standard check---------------------------------------------------------------------------- # Connect to DB con <- connect(connectionDetails) # Return table of non-standard concepts +source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, data_concepts_path = isStandardConfig$concepts_path, # (optional) Save the results (with standard and non-standard concepts) - # save_path = isStandardConfig$save_path - ) + save_path = isStandardConfig$save_path +) # Disconnect disconnect(con) # Print all non-standard concepts nonStandard +nonStandardCS + + +## ----Standard non-standard check concept set---------------------------------------------------------------- +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + save_path = isStandardConfig$save_path +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS -## ----Cohort definition---------------------------------------------------------------------------------- +## ----Cohort definition-------------------------------------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( @@ -131,7 +153,7 @@ ch <- cohort( ) -## ----json and sql--------------------------------------------------------------------------------------- +## ----json and sql------------------------------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -146,7 +168,7 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json------------------------------------------------------------------- +## ----Save cohort and concept set json----------------------------------------------------------------------- write(chJson, "./json/cohort.json") for (cs in names(conceptSets$conceptSets)) { writeConceptSet( @@ -156,7 +178,7 @@ for (cs in names(conceptSets$conceptSets)) { } -## ----Create and generate cohorts------------------------------------------------------------------------ +## ----Create and generate cohorts---------------------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -198,7 +220,7 @@ disconnect(con) cohortCounts -## ----retrieve updated DB-------------------------------------------------------------------------------- +## ----retrieve updated DB------------------------------------------------------------------------------------ # Establish connection con <- connect(connectionDetails) diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd index 7d1b6870..4aee42a2 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/project/R/cohortCapr_md.Rmd @@ -71,37 +71,60 @@ source("./R/table_linked_to_concept_field.R") # countOccurrences( # conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema # ) %>% print() -# labTestsCounts <- -# countOccurrences( -# conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema -# ) %>% print() +labTestsCounts <- + countOccurrences( + conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema + ) %>% print() # Disconnect disconnect(con) ``` -## Standard and non-standard concepts +## Standard and non-standard concepts given a list of concept IDs ```{r Standard non-standard check} -source('./R/isStandard.R') - # Connect to DB con <- connect(connectionDetails) # Return table of non-standard concepts +source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, data_concepts_path = isStandardConfig$concepts_path, # (optional) Save the results (with standard and non-standard concepts) - # save_path = isStandardConfig$save_path - ) + save_path = isStandardConfig$save_path +) # Disconnect disconnect(con) # Print all non-standard concepts nonStandard +nonStandardCS +``` +## Standard and non-standard concepts given a concept set +```{r Standard non-standard check concept set} +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + save_path = isStandardConfig$save_path +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS ``` + ## Initial event cohort People having any of the following: any of the lab test measurements From 18a66371d2d785d7e5e63c6b01068cc2fcdfa4a0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 15 Jul 2024 16:56:42 +0200 Subject: [PATCH 044/130] restore --- project/R/table_linked_to_concept_field.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 project/R/table_linked_to_concept_field.R diff --git a/project/R/table_linked_to_concept_field.R b/project/R/table_linked_to_concept_field.R new file mode 100644 index 00000000..9d858420 --- /dev/null +++ b/project/R/table_linked_to_concept_field.R @@ -0,0 +1,14 @@ +# Link table names to respective concept_id field +links <- list( + condition_occurrence = "condition_concept_id", + death = "cause_concept_id", + device_exposure = "device_concept_id", + drug_exposure = "drug_concept_id", + measurement = "measurement_concept_id", + observation = "observation_concept_id", + procedure_occurrence = "procedure_concept_id", + specimen = "specimen_concept_id", + visit_occurrence = "visit_concept_id" +) + +cat("Sourced links object") \ No newline at end of file From e2b1e896acc92d777960bd33dbacda24b28334ee Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 08:45:24 +0200 Subject: [PATCH 045/130] update reduce no. SQL queries to 1 for efficiency --- project/R/countOccurrences.R | 67 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/project/R/countOccurrences.R b/project/R/countOccurrences.R index 79cfa2c7..2fd47fb1 100644 --- a/project/R/countOccurrences.R +++ b/project/R/countOccurrences.R @@ -34,48 +34,49 @@ countOccurrences <- function(v, tables, links, db_connection, schema) { stopifnot(is.list(links)) stopifnot(is.character(schema)) - # Placeholder for results results <- list() for (table in tables) { concept_id_field <- links[[table]] - for (i in seq_along(v)) { - val <- v[i] - - # Direct counts SQL query - direct_sql <- - sprintf( - "SELECT COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records FROM %s WHERE %s = %d", - paste0(schema, ".", table), - concept_id_field, - val - ) - direct_res <- dbGetQuery(db_connection, direct_sql) - - # Descendant counts SQL query - descendant_sql <- sprintf( - "SELECT COUNT(DISTINCT a.person_id) AS descendant_count_person, COUNT(*) AS descendant_count_record FROM %s a JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id WHERE b.ancestor_concept_id = %d", - paste0(schema, ".", table), # Reference the target table within the schema - schema, # Explicitly reference the schema for the concept_ancestor table - concept_id_field, - val) - descendant_res <- dbGetQuery(db_connection, descendant_sql) - - # Combine results - results[[i]] <- tibble( - concept_id = val, - count_persons = direct_res$count_persons, - count_records = direct_res$count_records, - descendant_count_person = descendant_res$descendant_count_person, - descendant_count_record = descendant_res$descendant_count_record + # Combined SQL query for direct and descendant counts + combined_sql <- sprintf( + "WITH direct_counts AS ( + SELECT %s AS concept_id, COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records + FROM %s.%s + WHERE %s IN (%s) + GROUP BY %s + ), descendant_counts AS ( + SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS descendant_count_person, COUNT(*) AS descendant_count_record + FROM %s.%s a + JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id + WHERE b.ancestor_concept_id IN (%s) + GROUP BY b.ancestor_concept_id ) - } + SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(descendant_count_person, 0) AS descendant_count_person, coalesce(descendant_count_record, 0) AS descendant_count_record + FROM direct_counts d + FULL OUTER JOIN descendant_counts dc ON d.concept_id = dc.concept_id", + concept_id_field, schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, + schema, table, schema, concept_id_field, paste(v, collapse = ",") + ) + + combined_res <- dbGetQuery(db_connection, combined_sql) + + # Append results + results[[table]] <- combined_res } - # Combine all results into a single data frame + # Combine all results into a single data frame and transform final_res <- bind_rows(results) %>% - mutate(concept_name = names(v)) %>% + group_by(concept_id) %>% + summarise( + count_persons = sum(count_persons), + count_records = sum(count_records), + descendant_count_person = sum(descendant_count_person), + descendant_count_record = sum(descendant_count_record) + ) %>% + ungroup() %>% + mutate(concept_name = names(v)[match(concept_id, v)]) %>% arrange(desc(count_records + descendant_count_record)) return(final_res) From 3ce3c8bf2f3b081c306691a635551c932dfd1db9 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 09:22:02 +0200 Subject: [PATCH 046/130] remove renv; only keep lockfile --- project/renv/.gitignore | 7 - project/renv/activate.R | 1220 ------------------------------------ project/renv/settings.json | 19 - 3 files changed, 1246 deletions(-) delete mode 100644 project/renv/.gitignore delete mode 100644 project/renv/activate.R delete mode 100644 project/renv/settings.json diff --git a/project/renv/.gitignore b/project/renv/.gitignore deleted file mode 100644 index 0ec0cbba..00000000 --- a/project/renv/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -library/ -local/ -cellar/ -lock/ -python/ -sandbox/ -staging/ diff --git a/project/renv/activate.R b/project/renv/activate.R deleted file mode 100644 index d13f9932..00000000 --- a/project/renv/activate.R +++ /dev/null @@ -1,1220 +0,0 @@ - -local({ - - # the requested version of renv - version <- "1.0.7" - attr(version, "sha") <- NULL - - # the project directory - project <- Sys.getenv("RENV_PROJECT") - if (!nzchar(project)) - project <- getwd() - - # use start-up diagnostics if enabled - diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") - if (diagnostics) { - start <- Sys.time() - profile <- tempfile("renv-startup-", fileext = ".Rprof") - utils::Rprof(profile) - on.exit({ - utils::Rprof(NULL) - elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L) - writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed))) - writeLines(sprintf("- Profile: %s", profile)) - print(utils::summaryRprof(profile)) - }, add = TRUE) - } - - # figure out whether the autoloader is enabled - enabled <- local({ - - # first, check config option - override <- getOption("renv.config.autoloader.enabled") - if (!is.null(override)) - return(override) - - # if we're being run in a context where R_LIBS is already set, - # don't load -- presumably we're being run as a sub-process and - # the parent process has already set up library paths for us - rcmd <- Sys.getenv("R_CMD", unset = NA) - rlibs <- Sys.getenv("R_LIBS", unset = NA) - if (!is.na(rlibs) && !is.na(rcmd)) - return(FALSE) - - # next, check environment variables - # TODO: prefer using the configuration one in the future - envvars <- c( - "RENV_CONFIG_AUTOLOADER_ENABLED", - "RENV_AUTOLOADER_ENABLED", - "RENV_ACTIVATE_PROJECT" - ) - - for (envvar in envvars) { - envval <- Sys.getenv(envvar, unset = NA) - if (!is.na(envval)) - return(tolower(envval) %in% c("true", "t", "1")) - } - - # enable by default - TRUE - - }) - - # bail if we're not enabled - if (!enabled) { - - # if we're not enabled, we might still need to manually load - # the user profile here - profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile") - if (file.exists(profile)) { - cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE") - if (tolower(cfg) %in% c("true", "t", "1")) - sys.source(profile, envir = globalenv()) - } - - return(FALSE) - - } - - # avoid recursion - if (identical(getOption("renv.autoloader.running"), TRUE)) { - warning("ignoring recursive attempt to run renv autoloader") - return(invisible(TRUE)) - } - - # signal that we're loading renv during R startup - options(renv.autoloader.running = TRUE) - on.exit(options(renv.autoloader.running = NULL), add = TRUE) - - # signal that we've consented to use renv - options(renv.consent = TRUE) - - # load the 'utils' package eagerly -- this ensures that renv shims, which - # mask 'utils' packages, will come first on the search path - library(utils, lib.loc = .Library) - - # unload renv if it's already been loaded - if ("renv" %in% loadedNamespaces()) - unloadNamespace("renv") - - # load bootstrap tools - `%||%` <- function(x, y) { - if (is.null(x)) y else x - } - - catf <- function(fmt, ..., appendLF = TRUE) { - - quiet <- getOption("renv.bootstrap.quiet", default = FALSE) - if (quiet) - return(invisible()) - - msg <- sprintf(fmt, ...) - cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") - - invisible(msg) - - } - - header <- function(label, - ..., - prefix = "#", - suffix = "-", - n = min(getOption("width"), 78)) - { - label <- sprintf(label, ...) - n <- max(n - nchar(label) - nchar(prefix) - 2L, 8L) - if (n <= 0) - return(paste(prefix, label)) - - tail <- paste(rep.int(suffix, n), collapse = "") - paste0(prefix, " ", label, " ", tail) - - } - - heredoc <- function(text, leave = 0) { - - # remove leading, trailing whitespace - trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) - - # split into lines - lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] - - # compute common indent - indent <- regexpr("[^[:space:]]", lines) - common <- min(setdiff(indent, -1L)) - leave - paste(substring(lines, common), collapse = "\n") - - } - - startswith <- function(string, prefix) { - substring(string, 1, nchar(prefix)) == prefix - } - - bootstrap <- function(version, library) { - - friendly <- renv_bootstrap_version_friendly(version) - section <- header(sprintf("Bootstrapping renv %s", friendly)) - catf(section) - - # attempt to download renv - catf("- Downloading renv ... ", appendLF = FALSE) - withCallingHandlers( - tarball <- renv_bootstrap_download(version), - error = function(err) { - catf("FAILED") - stop("failed to download:\n", conditionMessage(err)) - } - ) - catf("OK") - on.exit(unlink(tarball), add = TRUE) - - # now attempt to install - catf("- Installing renv ... ", appendLF = FALSE) - withCallingHandlers( - status <- renv_bootstrap_install(version, tarball, library), - error = function(err) { - catf("FAILED") - stop("failed to install:\n", conditionMessage(err)) - } - ) - catf("OK") - - # add empty line to break up bootstrapping from normal output - catf("") - - return(invisible()) - } - - renv_bootstrap_tests_running <- function() { - getOption("renv.tests.running", default = FALSE) - } - - renv_bootstrap_repos <- function() { - - # get CRAN repository - cran <- getOption("renv.repos.cran", "https://cloud.r-project.org") - - # check for repos override - repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) - if (!is.na(repos)) { - - # check for RSPM; if set, use a fallback repository for renv - rspm <- Sys.getenv("RSPM", unset = NA) - if (identical(rspm, repos)) - repos <- c(RSPM = rspm, CRAN = cran) - - return(repos) - - } - - # check for lockfile repositories - repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) - if (!inherits(repos, "error") && length(repos)) - return(repos) - - # retrieve current repos - repos <- getOption("repos") - - # ensure @CRAN@ entries are resolved - repos[repos == "@CRAN@"] <- cran - - # add in renv.bootstrap.repos if set - default <- c(FALLBACK = "https://cloud.r-project.org") - extra <- getOption("renv.bootstrap.repos", default = default) - repos <- c(repos, extra) - - # remove duplicates that might've snuck in - dupes <- duplicated(repos) | duplicated(names(repos)) - repos[!dupes] - - } - - renv_bootstrap_repos_lockfile <- function() { - - lockpath <- Sys.getenv("RENV_PATHS_LOCKFILE", unset = "renv.lock") - if (!file.exists(lockpath)) - return(NULL) - - lockfile <- tryCatch(renv_json_read(lockpath), error = identity) - if (inherits(lockfile, "error")) { - warning(lockfile) - return(NULL) - } - - repos <- lockfile$R$Repositories - if (length(repos) == 0) - return(NULL) - - keys <- vapply(repos, `[[`, "Name", FUN.VALUE = character(1)) - vals <- vapply(repos, `[[`, "URL", FUN.VALUE = character(1)) - names(vals) <- keys - - return(vals) - - } - - renv_bootstrap_download <- function(version) { - - sha <- attr(version, "sha", exact = TRUE) - - methods <- if (!is.null(sha)) { - - # attempting to bootstrap a development version of renv - c( - function() renv_bootstrap_download_tarball(sha), - function() renv_bootstrap_download_github(sha) - ) - - } else { - - # attempting to bootstrap a release version of renv - c( - function() renv_bootstrap_download_tarball(version), - function() renv_bootstrap_download_cran_latest(version), - function() renv_bootstrap_download_cran_archive(version) - ) - - } - - for (method in methods) { - path <- tryCatch(method(), error = identity) - if (is.character(path) && file.exists(path)) - return(path) - } - - stop("All download methods failed") - - } - - renv_bootstrap_download_impl <- function(url, destfile) { - - mode <- "wb" - - # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715 - fixup <- - Sys.info()[["sysname"]] == "Windows" && - substring(url, 1L, 5L) == "file:" - - if (fixup) - mode <- "w+b" - - args <- list( - url = url, - destfile = destfile, - mode = mode, - quiet = TRUE - ) - - if ("headers" %in% names(formals(utils::download.file))) - args$headers <- renv_bootstrap_download_custom_headers(url) - - do.call(utils::download.file, args) - - } - - renv_bootstrap_download_custom_headers <- function(url) { - - headers <- getOption("renv.download.headers") - if (is.null(headers)) - return(character()) - - if (!is.function(headers)) - stopf("'renv.download.headers' is not a function") - - headers <- headers(url) - if (length(headers) == 0L) - return(character()) - - if (is.list(headers)) - headers <- unlist(headers, recursive = FALSE, use.names = TRUE) - - ok <- - is.character(headers) && - is.character(names(headers)) && - all(nzchar(names(headers))) - - if (!ok) - stop("invocation of 'renv.download.headers' did not return a named character vector") - - headers - - } - - renv_bootstrap_download_cran_latest <- function(version) { - - spec <- renv_bootstrap_download_cran_latest_find(version) - type <- spec$type - repos <- spec$repos - - baseurl <- utils::contrib.url(repos = repos, type = type) - ext <- if (identical(type, "source")) - ".tar.gz" - else if (Sys.info()[["sysname"]] == "Windows") - ".zip" - else - ".tgz" - name <- sprintf("renv_%s%s", version, ext) - url <- paste(baseurl, name, sep = "/") - - destfile <- file.path(tempdir(), name) - status <- tryCatch( - renv_bootstrap_download_impl(url, destfile), - condition = identity - ) - - if (inherits(status, "condition")) - return(FALSE) - - # report success and return - destfile - - } - - renv_bootstrap_download_cran_latest_find <- function(version) { - - # check whether binaries are supported on this system - binary <- - getOption("renv.bootstrap.binary", default = TRUE) && - !identical(.Platform$pkgType, "source") && - !identical(getOption("pkgType"), "source") && - Sys.info()[["sysname"]] %in% c("Darwin", "Windows") - - types <- c(if (binary) "binary", "source") - - # iterate over types + repositories - for (type in types) { - for (repos in renv_bootstrap_repos()) { - - # retrieve package database - db <- tryCatch( - as.data.frame( - utils::available.packages(type = type, repos = repos), - stringsAsFactors = FALSE - ), - error = identity - ) - - if (inherits(db, "error")) - next - - # check for compatible entry - entry <- db[db$Package %in% "renv" & db$Version %in% version, ] - if (nrow(entry) == 0) - next - - # found it; return spec to caller - spec <- list(entry = entry, type = type, repos = repos) - return(spec) - - } - } - - # if we got here, we failed to find renv - fmt <- "renv %s is not available from your declared package repositories" - stop(sprintf(fmt, version)) - - } - - renv_bootstrap_download_cran_archive <- function(version) { - - name <- sprintf("renv_%s.tar.gz", version) - repos <- renv_bootstrap_repos() - urls <- file.path(repos, "src/contrib/Archive/renv", name) - destfile <- file.path(tempdir(), name) - - for (url in urls) { - - status <- tryCatch( - renv_bootstrap_download_impl(url, destfile), - condition = identity - ) - - if (identical(status, 0L)) - return(destfile) - - } - - return(FALSE) - - } - - renv_bootstrap_download_tarball <- function(version) { - - # if the user has provided the path to a tarball via - # an environment variable, then use it - tarball <- Sys.getenv("RENV_BOOTSTRAP_TARBALL", unset = NA) - if (is.na(tarball)) - return() - - # allow directories - if (dir.exists(tarball)) { - name <- sprintf("renv_%s.tar.gz", version) - tarball <- file.path(tarball, name) - } - - # bail if it doesn't exist - if (!file.exists(tarball)) { - - # let the user know we weren't able to honour their request - fmt <- "- RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." - msg <- sprintf(fmt, tarball) - warning(msg) - - # bail - return() - - } - - catf("- Using local tarball '%s'.", tarball) - tarball - - } - - renv_bootstrap_download_github <- function(version) { - - enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") - if (!identical(enabled, "TRUE")) - return(FALSE) - - # prepare download options - pat <- Sys.getenv("GITHUB_PAT") - if (nzchar(Sys.which("curl")) && nzchar(pat)) { - fmt <- "--location --fail --header \"Authorization: token %s\"" - extra <- sprintf(fmt, pat) - saved <- options("download.file.method", "download.file.extra") - options(download.file.method = "curl", download.file.extra = extra) - on.exit(do.call(base::options, saved), add = TRUE) - } else if (nzchar(Sys.which("wget")) && nzchar(pat)) { - fmt <- "--header=\"Authorization: token %s\"" - extra <- sprintf(fmt, pat) - saved <- options("download.file.method", "download.file.extra") - options(download.file.method = "wget", download.file.extra = extra) - on.exit(do.call(base::options, saved), add = TRUE) - } - - url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) - name <- sprintf("renv_%s.tar.gz", version) - destfile <- file.path(tempdir(), name) - - status <- tryCatch( - renv_bootstrap_download_impl(url, destfile), - condition = identity - ) - - if (!identical(status, 0L)) - return(FALSE) - - renv_bootstrap_download_augment(destfile) - - return(destfile) - - } - - # Add Sha to DESCRIPTION. This is stop gap until #890, after which we - # can use renv::install() to fully capture metadata. - renv_bootstrap_download_augment <- function(destfile) { - sha <- renv_bootstrap_git_extract_sha1_tar(destfile) - if (is.null(sha)) { - return() - } - - # Untar - tempdir <- tempfile("renv-github-") - on.exit(unlink(tempdir, recursive = TRUE), add = TRUE) - untar(destfile, exdir = tempdir) - pkgdir <- dir(tempdir, full.names = TRUE)[[1]] - - # Modify description - desc_path <- file.path(pkgdir, "DESCRIPTION") - desc_lines <- readLines(desc_path) - remotes_fields <- c( - "RemoteType: github", - "RemoteHost: api.github.com", - "RemoteRepo: renv", - "RemoteUsername: rstudio", - "RemotePkgRef: rstudio/renv", - paste("RemoteRef: ", sha), - paste("RemoteSha: ", sha) - ) - writeLines(c(desc_lines[desc_lines != ""], remotes_fields), con = desc_path) - - # Re-tar - local({ - old <- setwd(tempdir) - on.exit(setwd(old), add = TRUE) - - tar(destfile, compression = "gzip") - }) - invisible() - } - - # Extract the commit hash from a git archive. Git archives include the SHA1 - # hash as the comment field of the tarball pax extended header - # (see https://www.kernel.org/pub/software/scm/git/docs/git-archive.html) - # For GitHub archives this should be the first header after the default one - # (512 byte) header. - renv_bootstrap_git_extract_sha1_tar <- function(bundle) { - - # open the bundle for reading - # We use gzcon for everything because (from ?gzcon) - # > Reading from a connection which does not supply a 'gzip' magic - # > header is equivalent to reading from the original connection - conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) - on.exit(close(conn)) - - # The default pax header is 512 bytes long and the first pax extended header - # with the comment should be 51 bytes long - # `52 comment=` (11 chars) + 40 byte SHA1 hash - len <- 0x200 + 0x33 - res <- rawToChar(readBin(conn, "raw", n = len)[0x201:len]) - - if (grepl("^52 comment=", res)) { - sub("52 comment=", "", res) - } else { - NULL - } - } - - renv_bootstrap_install <- function(version, tarball, library) { - - # attempt to install it into project library - dir.create(library, showWarnings = FALSE, recursive = TRUE) - output <- renv_bootstrap_install_impl(library, tarball) - - # check for successful install - status <- attr(output, "status") - if (is.null(status) || identical(status, 0L)) - return(status) - - # an error occurred; report it - header <- "installation of renv failed" - lines <- paste(rep.int("=", nchar(header)), collapse = "") - text <- paste(c(header, lines, output), collapse = "\n") - stop(text) - - } - - renv_bootstrap_install_impl <- function(library, tarball) { - - # invoke using system2 so we can capture and report output - bin <- R.home("bin") - exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" - R <- file.path(bin, exe) - - args <- c( - "--vanilla", "CMD", "INSTALL", "--no-multiarch", - "-l", shQuote(path.expand(library)), - shQuote(path.expand(tarball)) - ) - - system2(R, args, stdout = TRUE, stderr = TRUE) - - } - - renv_bootstrap_platform_prefix <- function() { - - # construct version prefix - version <- paste(R.version$major, R.version$minor, sep = ".") - prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") - - # include SVN revision for development versions of R - # (to avoid sharing platform-specific artefacts with released versions of R) - devel <- - identical(R.version[["status"]], "Under development (unstable)") || - identical(R.version[["nickname"]], "Unsuffered Consequences") - - if (devel) - prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") - - # build list of path components - components <- c(prefix, R.version$platform) - - # include prefix if provided by user - prefix <- renv_bootstrap_platform_prefix_impl() - if (!is.na(prefix) && nzchar(prefix)) - components <- c(prefix, components) - - # build prefix - paste(components, collapse = "/") - - } - - renv_bootstrap_platform_prefix_impl <- function() { - - # if an explicit prefix has been supplied, use it - prefix <- Sys.getenv("RENV_PATHS_PREFIX", unset = NA) - if (!is.na(prefix)) - return(prefix) - - # if the user has requested an automatic prefix, generate it - auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) - if (is.na(auto) && getRversion() >= "4.4.0") - auto <- "TRUE" - - if (auto %in% c("TRUE", "True", "true", "1")) - return(renv_bootstrap_platform_prefix_auto()) - - # empty string on failure - "" - - } - - renv_bootstrap_platform_prefix_auto <- function() { - - prefix <- tryCatch(renv_bootstrap_platform_os(), error = identity) - if (inherits(prefix, "error") || prefix %in% "unknown") { - - msg <- paste( - "failed to infer current operating system", - "please file a bug report at https://github.com/rstudio/renv/issues", - sep = "; " - ) - - warning(msg) - - } - - prefix - - } - - renv_bootstrap_platform_os <- function() { - - sysinfo <- Sys.info() - sysname <- sysinfo[["sysname"]] - - # handle Windows + macOS up front - if (sysname == "Windows") - return("windows") - else if (sysname == "Darwin") - return("macos") - - # check for os-release files - for (file in c("/etc/os-release", "/usr/lib/os-release")) - if (file.exists(file)) - return(renv_bootstrap_platform_os_via_os_release(file, sysinfo)) - - # check for redhat-release files - if (file.exists("/etc/redhat-release")) - return(renv_bootstrap_platform_os_via_redhat_release()) - - "unknown" - - } - - renv_bootstrap_platform_os_via_os_release <- function(file, sysinfo) { - - # read /etc/os-release - release <- utils::read.table( - file = file, - sep = "=", - quote = c("\"", "'"), - col.names = c("Key", "Value"), - comment.char = "#", - stringsAsFactors = FALSE - ) - - vars <- as.list(release$Value) - names(vars) <- release$Key - - # get os name - os <- tolower(sysinfo[["sysname"]]) - - # read id - id <- "unknown" - for (field in c("ID", "ID_LIKE")) { - if (field %in% names(vars) && nzchar(vars[[field]])) { - id <- vars[[field]] - break - } - } - - # read version - version <- "unknown" - for (field in c("UBUNTU_CODENAME", "VERSION_CODENAME", "VERSION_ID", "BUILD_ID")) { - if (field %in% names(vars) && nzchar(vars[[field]])) { - version <- vars[[field]] - break - } - } - - # join together - paste(c(os, id, version), collapse = "-") - - } - - renv_bootstrap_platform_os_via_redhat_release <- function() { - - # read /etc/redhat-release - contents <- readLines("/etc/redhat-release", warn = FALSE) - - # infer id - id <- if (grepl("centos", contents, ignore.case = TRUE)) - "centos" - else if (grepl("redhat", contents, ignore.case = TRUE)) - "redhat" - else - "unknown" - - # try to find a version component (very hacky) - version <- "unknown" - - parts <- strsplit(contents, "[[:space:]]")[[1L]] - for (part in parts) { - - nv <- tryCatch(numeric_version(part), error = identity) - if (inherits(nv, "error")) - next - - version <- nv[1, 1] - break - - } - - paste(c("linux", id, version), collapse = "-") - - } - - renv_bootstrap_library_root_name <- function(project) { - - # use project name as-is if requested - asis <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT_ASIS", unset = "FALSE") - if (asis) - return(basename(project)) - - # otherwise, disambiguate based on project's path - id <- substring(renv_bootstrap_hash_text(project), 1L, 8L) - paste(basename(project), id, sep = "-") - - } - - renv_bootstrap_library_root <- function(project) { - - prefix <- renv_bootstrap_profile_prefix() - - path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) - if (!is.na(path)) - return(paste(c(path, prefix), collapse = "/")) - - path <- renv_bootstrap_library_root_impl(project) - if (!is.null(path)) { - name <- renv_bootstrap_library_root_name(project) - return(paste(c(path, prefix, name), collapse = "/")) - } - - renv_bootstrap_paths_renv("library", project = project) - - } - - renv_bootstrap_library_root_impl <- function(project) { - - root <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) - if (!is.na(root)) - return(root) - - type <- renv_bootstrap_project_type(project) - if (identical(type, "package")) { - userdir <- renv_bootstrap_user_dir() - return(file.path(userdir, "library")) - } - - } - - renv_bootstrap_validate_version <- function(version, description = NULL) { - - # resolve description file - # - # avoid passing lib.loc to `packageDescription()` below, since R will - # use the loaded version of the package by default anyhow. note that - # this function should only be called after 'renv' is loaded - # https://github.com/rstudio/renv/issues/1625 - description <- description %||% packageDescription("renv") - - # check whether requested version 'version' matches loaded version of renv - sha <- attr(version, "sha", exact = TRUE) - valid <- if (!is.null(sha)) - renv_bootstrap_validate_version_dev(sha, description) - else - renv_bootstrap_validate_version_release(version, description) - - if (valid) - return(TRUE) - - # the loaded version of renv doesn't match the requested version; - # give the user instructions on how to proceed - dev <- identical(description[["RemoteType"]], "github") - remote <- if (dev) - paste("rstudio/renv", description[["RemoteSha"]], sep = "@") - else - paste("renv", description[["Version"]], sep = "@") - - # display both loaded version + sha if available - friendly <- renv_bootstrap_version_friendly( - version = description[["Version"]], - sha = if (dev) description[["RemoteSha"]] - ) - - fmt <- heredoc(" - renv %1$s was loaded from project library, but this project is configured to use renv %2$s. - - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. - - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. - ") - catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) - - FALSE - - } - - renv_bootstrap_validate_version_dev <- function(version, description) { - expected <- description[["RemoteSha"]] - is.character(expected) && startswith(expected, version) - } - - renv_bootstrap_validate_version_release <- function(version, description) { - expected <- description[["Version"]] - is.character(expected) && identical(expected, version) - } - - renv_bootstrap_hash_text <- function(text) { - - hashfile <- tempfile("renv-hash-") - on.exit(unlink(hashfile), add = TRUE) - - writeLines(text, con = hashfile) - tools::md5sum(hashfile) - - } - - renv_bootstrap_load <- function(project, libpath, version) { - - # try to load renv from the project library - if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) - return(FALSE) - - # warn if the version of renv loaded does not match - renv_bootstrap_validate_version(version) - - # execute renv load hooks, if any - hooks <- getHook("renv::autoload") - for (hook in hooks) - if (is.function(hook)) - tryCatch(hook(), error = warnify) - - # load the project - renv::load(project) - - TRUE - - } - - renv_bootstrap_profile_load <- function(project) { - - # if RENV_PROFILE is already set, just use that - profile <- Sys.getenv("RENV_PROFILE", unset = NA) - if (!is.na(profile) && nzchar(profile)) - return(profile) - - # check for a profile file (nothing to do if it doesn't exist) - path <- renv_bootstrap_paths_renv("profile", profile = FALSE, project = project) - if (!file.exists(path)) - return(NULL) - - # read the profile, and set it if it exists - contents <- readLines(path, warn = FALSE) - if (length(contents) == 0L) - return(NULL) - - # set RENV_PROFILE - profile <- contents[[1L]] - if (!profile %in% c("", "default")) - Sys.setenv(RENV_PROFILE = profile) - - profile - - } - - renv_bootstrap_profile_prefix <- function() { - profile <- renv_bootstrap_profile_get() - if (!is.null(profile)) - return(file.path("profiles", profile, "renv")) - } - - renv_bootstrap_profile_get <- function() { - profile <- Sys.getenv("RENV_PROFILE", unset = "") - renv_bootstrap_profile_normalize(profile) - } - - renv_bootstrap_profile_set <- function(profile) { - profile <- renv_bootstrap_profile_normalize(profile) - if (is.null(profile)) - Sys.unsetenv("RENV_PROFILE") - else - Sys.setenv(RENV_PROFILE = profile) - } - - renv_bootstrap_profile_normalize <- function(profile) { - - if (is.null(profile) || profile %in% c("", "default")) - return(NULL) - - profile - - } - - renv_bootstrap_path_absolute <- function(path) { - - substr(path, 1L, 1L) %in% c("~", "/", "\\") || ( - substr(path, 1L, 1L) %in% c(letters, LETTERS) && - substr(path, 2L, 3L) %in% c(":/", ":\\") - ) - - } - - renv_bootstrap_paths_renv <- function(..., profile = TRUE, project = NULL) { - renv <- Sys.getenv("RENV_PATHS_RENV", unset = "renv") - root <- if (renv_bootstrap_path_absolute(renv)) NULL else project - prefix <- if (profile) renv_bootstrap_profile_prefix() - components <- c(root, renv, prefix, ...) - paste(components, collapse = "/") - } - - renv_bootstrap_project_type <- function(path) { - - descpath <- file.path(path, "DESCRIPTION") - if (!file.exists(descpath)) - return("unknown") - - desc <- tryCatch( - read.dcf(descpath, all = TRUE), - error = identity - ) - - if (inherits(desc, "error")) - return("unknown") - - type <- desc$Type - if (!is.null(type)) - return(tolower(type)) - - package <- desc$Package - if (!is.null(package)) - return("package") - - "unknown" - - } - - renv_bootstrap_user_dir <- function() { - dir <- renv_bootstrap_user_dir_impl() - path.expand(chartr("\\", "/", dir)) - } - - renv_bootstrap_user_dir_impl <- function() { - - # use local override if set - override <- getOption("renv.userdir.override") - if (!is.null(override)) - return(override) - - # use R_user_dir if available - tools <- asNamespace("tools") - if (is.function(tools$R_user_dir)) - return(tools$R_user_dir("renv", "cache")) - - # try using our own backfill for older versions of R - envvars <- c("R_USER_CACHE_DIR", "XDG_CACHE_HOME") - for (envvar in envvars) { - root <- Sys.getenv(envvar, unset = NA) - if (!is.na(root)) - return(file.path(root, "R/renv")) - } - - # use platform-specific default fallbacks - if (Sys.info()[["sysname"]] == "Windows") - file.path(Sys.getenv("LOCALAPPDATA"), "R/cache/R/renv") - else if (Sys.info()[["sysname"]] == "Darwin") - "~/Library/Caches/org.R-project.R/R/renv" - else - "~/.cache/R/renv" - - } - - renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) { - sha <- sha %||% attr(version, "sha", exact = TRUE) - parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L))) - paste(parts, collapse = "") - } - - renv_bootstrap_exec <- function(project, libpath, version) { - if (!renv_bootstrap_load(project, libpath, version)) - renv_bootstrap_run(version, libpath) - } - - renv_bootstrap_run <- function(version, libpath) { - - # perform bootstrap - bootstrap(version, libpath) - - # exit early if we're just testing bootstrap - if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) - return(TRUE) - - # try again to load - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - return(renv::load(project = getwd())) - } - - # failed to download or load renv; warn the user - msg <- c( - "Failed to find an renv installation: the project will not be loaded.", - "Use `renv::activate()` to re-initialize the project." - ) - - warning(paste(msg, collapse = "\n"), call. = FALSE) - - } - - renv_json_read <- function(file = NULL, text = NULL) { - - jlerr <- NULL - - # if jsonlite is loaded, use that instead - if ("jsonlite" %in% loadedNamespaces()) { - - json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) - if (!inherits(json, "error")) - return(json) - - jlerr <- json - - } - - # otherwise, fall back to the default JSON reader - json <- tryCatch(renv_json_read_default(file, text), error = identity) - if (!inherits(json, "error")) - return(json) - - # report an error - if (!is.null(jlerr)) - stop(jlerr) - else - stop(json) - - } - - renv_json_read_jsonlite <- function(file = NULL, text = NULL) { - text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") - jsonlite::fromJSON(txt = text, simplifyVector = FALSE) - } - - renv_json_read_default <- function(file = NULL, text = NULL) { - - # find strings in the JSON - text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") - pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - locs <- gregexpr(pattern, text, perl = TRUE)[[1]] - - # if any are found, replace them with placeholders - replaced <- text - strings <- character() - replacements <- character() - - if (!identical(c(locs), -1L)) { - - # get the string values - starts <- locs - ends <- locs + attr(locs, "match.length") - 1L - strings <- substring(text, starts, ends) - - # only keep those requiring escaping - strings <- grep("[[\\]{}:]", strings, perl = TRUE, value = TRUE) - - # compute replacements - replacements <- sprintf('"\032%i\032"', seq_along(strings)) - - # replace the strings - mapply(function(string, replacement) { - replaced <<- sub(string, replacement, replaced, fixed = TRUE) - }, strings, replacements) - - } - - # transform the JSON into something the R parser understands - transformed <- replaced - transformed <- gsub("{}", "`names<-`(list(), character())", transformed, fixed = TRUE) - transformed <- gsub("[[{]", "list(", transformed, perl = TRUE) - transformed <- gsub("[]}]", ")", transformed, perl = TRUE) - transformed <- gsub(":", "=", transformed, fixed = TRUE) - text <- paste(transformed, collapse = "\n") - - # parse it - json <- parse(text = text, keep.source = FALSE, srcfile = NULL)[[1L]] - - # construct map between source strings, replaced strings - map <- as.character(parse(text = strings)) - names(map) <- as.character(parse(text = replacements)) - - # convert to list - map <- as.list(map) - - # remap strings in object - remapped <- renv_json_read_remap(json, map) - - # evaluate - eval(remapped, envir = baseenv()) - - } - - renv_json_read_remap <- function(json, map) { - - # fix names - if (!is.null(names(json))) { - lhs <- match(names(json), names(map), nomatch = 0L) - rhs <- match(names(map), names(json), nomatch = 0L) - names(json)[rhs] <- map[lhs] - } - - # fix values - if (is.character(json)) - return(map[[json]] %||% json) - - # handle true, false, null - if (is.name(json)) { - text <- as.character(json) - if (text == "true") - return(TRUE) - else if (text == "false") - return(FALSE) - else if (text == "null") - return(NULL) - } - - # recurse - if (is.recursive(json)) { - for (i in seq_along(json)) { - json[i] <- list(renv_json_read_remap(json[[i]], map)) - } - } - - json - - } - - # load the renv profile, if any - renv_bootstrap_profile_load(project) - - # construct path to library root - root <- renv_bootstrap_library_root(project) - - # construct library prefix for platform - prefix <- renv_bootstrap_platform_prefix() - - # construct full libpath - libpath <- file.path(root, prefix) - - # run bootstrap code - renv_bootstrap_exec(project, libpath, version) - - invisible() - -}) diff --git a/project/renv/settings.json b/project/renv/settings.json deleted file mode 100644 index ffdbb320..00000000 --- a/project/renv/settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "bioconductor.version": null, - "external.libraries": [], - "ignored.packages": [], - "package.dependency.fields": [ - "Imports", - "Depends", - "LinkingTo" - ], - "ppm.enabled": null, - "ppm.ignored.urls": [], - "r.version": null, - "snapshot.type": "implicit", - "use.cache": true, - "vcs.ignore.cellar": true, - "vcs.ignore.library": true, - "vcs.ignore.local": true, - "vcs.manage.ignores": true -} From b6f2c329fa7418c4b211f07e3643f22fe9fe9dbb Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 09:55:52 +0200 Subject: [PATCH 047/130] update lockfile --- project/renv.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/project/renv.lock b/project/renv.lock index 4e08e88b..9d9b9358 100644 --- a/project/renv.lock +++ b/project/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "CRAN", - "URL": "https://packagemanager.posit.co/cran/latest" + "URL": "https://cran.rstudio.com" } ] }, @@ -346,14 +346,14 @@ }, "cli": { "Package": "cli", - "Version": "3.6.2", + "Version": "3.6.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" + "Hash": "b21916dd77a27642b447374a5d30ecf3" }, "clipr": { "Package": "clipr", @@ -520,14 +520,14 @@ }, "digest": { "Package": "digest", - "Version": "0.6.35", + "Version": "0.6.36", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "698ece7ba5a4fa4559e3d537e7ec3d31" + "Hash": "fd6824ad91ede64151e93af67df6376b" }, "downlit": { "Package": "downlit", @@ -837,7 +837,7 @@ }, "knitr": { "Package": "knitr", - "Version": "1.47", + "Version": "1.48", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -849,7 +849,7 @@ "xfun", "yaml" ], - "Hash": "7c99b2d55584b982717fcc0950378612" + "Hash": "acf380f300c721da9fde7df115a5f86f" }, "later": { "Package": "later", @@ -1809,10 +1809,10 @@ }, "yaml": { "Package": "yaml", - "Version": "2.3.8", + "Version": "2.3.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "29240487a071f535f5e5d5a323b7afbd" + "Hash": "9cb28d11799d93c953f852083d55ee9e" }, "zip": { "Package": "zip", From 0d03b91b2d62d5c954d9777abc6325b3d232822e Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 10:40:48 +0200 Subject: [PATCH 048/130] remove unnecessary file --- project/R/cdm.R | 544 ------------------------------------------------ 1 file changed, 544 deletions(-) delete mode 100644 project/R/cdm.R diff --git a/project/R/cdm.R b/project/R/cdm.R deleted file mode 100644 index 85de4b0e..00000000 --- a/project/R/cdm.R +++ /dev/null @@ -1,544 +0,0 @@ -cdm <- list( - person = c( - "person_id", - "gender_concept_id", - "year_of_birth", - "month_of_birth", - "day_of_birth", - "birth_datetime", - "race_concept_id", - "ethnicity_concept_id", - "location_id", - "provider_id", - "care_site_id", - "person_source_value", - "gender_source_value", - "gender_source_concept_id", - "race_source_value", - "race_source_concept_id", - "ethnicity_source_value", - "ethnicity_source_concept_id" - ), - observation_period = c( - "observation_period_id", - "person_id", - "observation_period_start_date", - "observation_period_end_date", - "period_type_concept_id" - ), - visit_occurrence = c( - "visit_occurrence_id", - "person_id", - "visit_concept_id", - "visit_start_date", - "visit_start_datetime", - "visit_end_date", - "visit_end_datetime", - "visit_type_concept_id", - "provider_id", - "care_site_id", - "visit_source_value", - "visit_source_concept_id", - "admitting_source_concept_id", - "admitting_source_value", - "discharge_to_concept_id", - "discharge_to_source_value", - "preceding_visit_occurrence_id" - ), - visit_detail = c( - "visit_detail_id", - "person_id", - "visit_detail_concept_id", - "visit_detail_start_date", - "visit_detail_start_datetime", - "visit_detail_end_date", - "visit_detail_end_datetime", - "visit_detail_type_concept_id", - "provider_id", - "care_site_id", - "visit_detail_source_value", - "visit_detail_source_concept_id", - "admitting_source_concept_id", - "admitting_source_value", - "discharge_to_concept_id", - "discharge_to_source_value", - "preceding_visit_detail_id", - "parent_visit_detail_id", - "visit_occurrence_id" - ), - condition_occurrence = c( - "condition_occurrence_id", - "person_id", - "condition_concept_id", - "condition_start_date", - "condition_start_datetime", - "condition_end_date", - "condition_end_datetime", - "condition_type_concept_id", - "condition_status_concept_id", - "stop_reason", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "condition_source_value", - "condition_source_concept_id", - "condition_status_source_value" - ), - drug_exposure = c( - "drug_exposure_id", - "person_id", - "drug_concept_id", - "drug_exposure_start_date", - "drug_exposure_start_datetime", - "drug_exposure_end_date", - "drug_exposure_end_datetime", - "verbatim_end_date", - "drug_type_concept_id", - "stop_reason", - "refills", - "quantity", - "days_supply", - "sig", - "route_concept_id", - "lot_number", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "drug_source_value", - "drug_source_concept_id", - "route_source_value", - "dose_unit_source_value" - ), - procedure_occurrence = c( - "procedure_occurrence_id", - "person_id", - "procedure_concept_id", - "procedure_date", - "procedure_datetime", - "procedure_type_concept_id", - "modifier_concept_id", - "quantity", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "procedure_source_value", - "procedure_source_concept_id", - "modifier_source_value" - ), - device_exposure = c( - "device_exposure_id", - "person_id", - "device_concept_id", - "device_exposure_start_date", - "device_exposure_start_datetime", - "device_exposure_end_date", - "device_exposure_end_datetime", - "device_type_concept_id", - "unique_device_id", - "quantity", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "device_source_value", - "device_source_concept_id" - ), - measurement = c( - "measurement_id", - "person_id", - "measurement_concept_id", - "measurement_date", - "measurement_datetime", - "measurement_type_concept_id", - "operator_concept_id", - "value_as_number", - "value_as_concept_id", - "unit_concept_id", - "range_low", - "range_high", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "measurement_source_value", - "measurement_source_concept_id", - "unit_source_value", - "value_source_value" - ), - observation = c( - "observation_id", - "person_id", - "observation_concept_id", - "observation_date", - "observation_datetime", - "observation_type_concept_id", - "value_as_number", - "value_as_string", - "value_as_concept_id", - "qualifier_concept_id", - "unit_concept_id", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "observation_source_value", - "observation_source_concept_id", - "unit_source_value", - "qualifier_source_value" - ), - note = c( - "note_id", - "person_id", - "note_date", - "note_datetime", - "note_type_concept_id", - "note_class_concept_id", - "note_title", - "note_text", - "encoding_concept_id", - "language_concept_id", - "provider_id", - "visit_occurrence_id", - "visit_detail_id", - "note_source_value" - ), - note_nlp = c( - "note_nlp_id", - "note_id", - "section_concept_id", - "snippet", - "offset", - "lexical_variant", - "note_nlp_concept_id", - "note_nlp_source_concept_id", - "nlp_system", - "nlp_date", - "nlp_datetime", - "term_exists", - "term_temporal", - "term_modifiers" - ), - speciman = c( - "specimen_id", - "person_id", - "specimen_concept_id", - "specimen_type_concept_id", - "specimen_date", - "specimen_datetime", - "quantity", - "unit_concept_id", - "anatomic_site_concept_id", - "disease_status_concept_id", - "specimen_source_id", - "specimen_source_value", - "unit_source_value", - "anatomic_site_source_value", - "disease_status_source_value" - ), - fact_relationship = c( - "domain_concept_id_1", - "fact_id_1", - "domain_concept_id_2", - "fact_id_2", - "relationship_concept_id" - ), - survey_conduct = c( - "survey_conduct_id", - "person_id", - "survey_concept_id", - "survey_start_date", - "survey_start_datetime", - "survey_end_date", - "survey_end_datetime", - "provider_id", - "assisted_concept_id", - "respondent_type_concept_id", - "timing_concept_id", - "collection_method_concept_id", - "survey_source_value", - "survey_source_concept_id", - "validated_survey_concept_id", - "validated_survey_source_value", - "survey_version_number", - "survey_version_value" - ), - death = c( - "person_id", - "death_date", - "death_datetime", - "death_type_concept_id", - "cause_concept_id", - "cause_source_value", - "cause_source_concept_id" - ), - location = c( - "location_id", - "address_1", - "address_2", - "city", - "state", - "zip", - "county", - "location_source_value" - ), - care_site = c( - "care_site_id", - "care_site_name", - "place_of_service_concept_id", - "location_id", - "care_site_source_value", - "place_of_service_source_value" - ), - provider = c( - "provider_id", - "provider_name", - "NPI", - "DEA", - "specialty_concept_id", - "care_site_id", - "year_of_birth", - "gender_concept_id", - "provider_source_value", - "specialty_source_value", - "specialty_source_concept_id", - "gender_source_value", - "gender_source_concept_id" - ), - payer_plan_period = c( - "payer_plan_period_id", - "person_id", - "payer_concept_id", - "payer_source_value", - "payer_source_concept_id", - "plan_concept_id", - "plan_source_value", - "plan_source_concept_id", - "sponsor_concept_id", - "sponsor_source_value", - "sponsor_source_concept_id", - "family_source_value", - "family_source_concept_id", - "stop_reason_concept_id", - "stop_reason_source_value", - "stop_reason_source_concept_id" - ), - cost = c( - "cost_id", - "cost_event_id", - "cost_domain_id", - "cost_type_concept_id", - "currency_concept_id", - "total_charge", - "total_cost", - "total_paid", - "paid_by_payer", - "paid_by_patient", - "paid_patient_copay", - "paid_patient_coinsurance", - "paid_patient_deductible", - "paid_by_primary", - "paid_ingredient_cost", - "paid_dispensing_fee", - "payer_plan_period_id", - "amount_allowed", - "revenue_code_concept_id", - "revenue_code_source_value", - "drg_concept_id", - "drg_source_value" - ), - drug_era = c( - "drug_era_id", - "person_id", - "drug_concept_id", - "drug_era_start_date", - "drug_era_end_date", - "drug_exposure_count", - "gap_days" - ), - dose_era = c( - "dose_era_id", - "person_id", - "drug_concept_id", - "unit_concept_id", - "dose_value", - "dose_era_start_date", - "dose_era_end_date" - ), - condition_era = c( - "condition_era_id", - "person_id", - "condition_concept_id", - "condition_era_start_date", - "condition_era_end_date", - "condition_occurrence_count" - ), - metadata = c( - "metadata_concept_id", - "metadata_type_concept_id", - "name_as_concept_id", - "value_as_number", - "value_as_concept_id", - "value_as_string", - "value_as_datetime", - "metadata_date", - "metadata_datetime" - ), - attribute_definition = c( - "attribute_definition_id", - "attribute_name", - "attribute_description", - "attribute_type_concept_id", - "attribute_syntax" - ), - cdm_source = c( - "cdm_source_name", - "cdm_source_abbreviation", - "cdm_holder", - "source_description", - "source_documentation_reference", - "cdm_etl_reference", - "source_release_date", - "cdm_release_date", - "cdm_version", - "vocabulary_version" - ), - vocabulary = c( - "vocabulary_id", - "vocabulary_name", - "vocabulary_reference", - "vocabulary_version", - "vocabulary_concept_id" - ), - concept = c( - "concept_id", - "concept_name", - "domain_id", - "vocabulary_id", - "concept_class_id", - "standard_concept", - "concept_code", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - concept_ancestor = c( - "ancestor_concept_id", - "descendant_concept_id", - "min_levels_of_separation", - "max_levels_of_separation" - ), - concept_class = c( - "concept_class_id", - "concept_class_name", - "concept_class_concept_id" - ), - concept_relationship = c( - "concept_id_1", - "concept_id_2", - "relationship_id", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - concept_synonym = c( - "concept_id", - "concept_synonym_name", - "language_concept_id" - ), - domain = c( - "domain_id", - "domain_name", - "domain_concept_id" - ), - drug_strength = c( - "drug_concept_id", - "ingredient_concept_id", - "amount_value", - "amount_unit_concept_id", - "numerator_value", - "numerator_unit_concept_id", - "denominator_value", - "denominator_unit_concept_id", - "box_size", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - relationship = c( - "relationship_id", - "relationship_name", - "is_hierarchical", - "defines_ancestry", - "reverse_relationship_id", - "relationship_concept_id" - ), - source_to_concept_map = c( - "source_code", - "source_concept_id", - "source_vocabulary_id", - "source_code_description", - "target_concept_id", - "target_vocabulary_id", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - concept_relationship = c( - "concept_id_1", - "concept_id_2", - "relationship_id", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - relationship = c( - "relationship_id", - "relationship_name", - "defines_ancestry", - "reverse_relationship_id", - "relationship_concept_id" - ), - concept_synonym = c( - "concept_id", - "concept_synonym_name", - "language_concept_id" - ), - concept_ancestor = c( - "ancestor_concept_id", - "descendant_concept_id", - "min_levels_of_separation", - "max_levels_of_separation" - ), - source_to_concept_map = c( - "source_code", - "source_concept_id", - "source_vocabulary_id", - "source_code_description", - "target_concept_id", - "target_vocabulary_id", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - cohort = c( - "drug_concept_id", - "ingredient_concept_id", - "amount_value", - "amount_unit_concept_id", - "numerator_value", - "numerator_unit_concept_id", - "denominator_value", - "denominator_unit_concept_id", - "box_size", - "valid_start_date", - "valid_end_date", - "invalid_reason" - ), - cohort_definition = c( - "cohort_definition_id", - "cohort_definition_name", - "cohort_definition_description", - "definition_type_concept_id", - "cohort_definition_syntax", - "subject_concept_id", - "cohort_initiation_date" - ) -) - From 8fcf546e4a55d9ed059e8c955f70573802328b42 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 13:30:20 +0200 Subject: [PATCH 049/130] migrate files --- {project/R => R}/cohortCapr.R | 0 {project/R => R}/cohortCapr_md.Rmd | 25 ++- {project/R => R}/conceptSets.R | 0 {project/R => R}/countOccurrences.R | 0 {project/R => R}/isStandard.R | 37 ++-- {project/R => R}/isStandardCS.R | 28 +-- .../R => R}/table_linked_to_concept_field.R | 0 .../config/config-sample.yml | 0 .../config/connection_config-sample.yml | 0 .../5.10_cardiac_radiology.csv | 0 .../phems_variable_list/5.11_cardiac_los.csv | 0 .../phems_variable_list/5.12_additional.csv | 0 .../5.13_laboratory_tests.csv | 0 .../5.14_cardiac_complications.csv | 0 .../phems_variable_list/5.15_vital_signs.csv | 0 .../5.16_hsjd_clinical.csv | 0 .../phems_variable_list/5.17_hsjd_surgery.csv | 0 .../5.18_hsjd_hospitalisation.csv | 0 .../5.19_hsjd_complication.csv | 0 ...e_use_diagnoses_procedures_current_eps.csv | 0 .../phems_variable_list/5.22_vital_signs.csv | 0 .../5.23_physical_examination_signs.csv | 0 .../5.24_laboratory_test_results_uc2.csv | 0 .../5.25_arterial_blood_gas.csv | 0 .../5.26_venous_blood_gas.csv | 0 .../5.28_patient_characteristics.csv | 0 .../5.29_lab_measurements_uc3.csv | 0 .../phems_variable_list/5.30_treatments.csv | 0 .../5.31_surgery_specific_parameters.csv | 0 .../5.3_vis_score_medications.csv | 0 .../5.4_vasopressors_inotropes.csv | 0 .../5.5_immunosuppressants.csv | 0 .../5.6_antibiotic_medication.csv | 0 .../phems_variable_list/5.7_antifungals.csv | 0 .../5.8_antibiotic_resistance.csv | 0 .../5.9_cardiac_surgery.csv | 0 .../is_standard/5.10_cardiac_radiology.csv | 0 .../is_standard/5.11_cardiac_los.csv | 0 .../is_standard/5.12_additional.csv | 0 .../is_standard/5.13_laboratory_tests.csv | 0 .../5.14_cardiac_complications.csv | 0 .../is_standard/5.15_vital_signs.csv | 0 .../is_standard/5.16_hsjd_clinical.csv | 0 .../is_standard/5.17_hsjd_surgery.csv | 0 .../is_standard/5.18_hsjd_hospitalisation.csv | 0 .../is_standard/5.19_hsjd_complication.csv | 0 ...e_use_diagnoses_procedures_current_eps.csv | 0 .../is_standard/5.22_vital_signs.csv | 0 .../5.23_physical_examination_signs.csv | 0 .../5.24_laboratory_test_results_uc2.csv | 0 .../is_standard/5.25_arterial_blood_gas.csv | 0 .../is_standard/5.26_venous_blood_gas.csv | 0 .../5.28_patient_characteristics.csv | 0 .../is_standard/5.29_lab_measurements_uc3.csv | 0 .../is_standard/5.30_treatments.csv | 0 .../5.31_surgery_specific_parameters.csv | 0 .../is_standard/5.3_vis_score_medications.csv | 0 .../5.4_vasopressors_inotropes.csv | 0 .../is_standard/5.5_immunosuppressants.csv | 0 .../is_standard/5.6_antibiotic_medication.csv | 0 .../is_standard/5.7_antifungals.csv | 0 .../is_standard/5.8_antibiotic_resistance.csv | 0 .../is_standard/5.9_cardiac_surgery.csv | 0 project/renv.lock => renv.lock | 163 +++++++++++++----- 64 files changed, 164 insertions(+), 89 deletions(-) rename {project/R => R}/cohortCapr.R (100%) rename {project/R => R}/cohortCapr_md.Rmd (87%) rename {project/R => R}/conceptSets.R (100%) rename {project/R => R}/countOccurrences.R (100%) rename {project/R => R}/isStandard.R (88%) rename {project/R => R}/isStandardCS.R (89%) rename {project/R => R}/table_linked_to_concept_field.R (100%) rename project/config/is_standard_config-sample.yml => inst/config/config-sample.yml (100%) rename {project => inst}/config/connection_config-sample.yml (100%) rename {project/data => inst/extdata}/phems_variable_list/5.10_cardiac_radiology.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.11_cardiac_los.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.12_additional.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.13_laboratory_tests.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.14_cardiac_complications.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.15_vital_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.16_hsjd_clinical.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.17_hsjd_surgery.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.18_hsjd_hospitalisation.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.19_hsjd_complication.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.22_vital_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.23_physical_examination_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.24_laboratory_test_results_uc2.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.25_arterial_blood_gas.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.26_venous_blood_gas.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.28_patient_characteristics.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.29_lab_measurements_uc3.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.30_treatments.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.31_surgery_specific_parameters.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.3_vis_score_medications.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.4_vasopressors_inotropes.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.5_immunosuppressants.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.6_antibiotic_medication.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.7_antifungals.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.8_antibiotic_resistance.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/5.9_cardiac_surgery.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.10_cardiac_radiology.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.11_cardiac_los.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.12_additional.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.13_laboratory_tests.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.14_cardiac_complications.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.15_vital_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.16_hsjd_clinical.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.17_hsjd_surgery.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.19_hsjd_complication.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.22_vital_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.23_physical_examination_signs.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.26_venous_blood_gas.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.28_patient_characteristics.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.30_treatments.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.3_vis_score_medications.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.5_immunosuppressants.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.6_antibiotic_medication.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.7_antifungals.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv (100%) rename {project/data => inst/extdata}/phems_variable_list/is_standard/5.9_cardiac_surgery.csv (100%) rename project/renv.lock => renv.lock (90%) diff --git a/project/R/cohortCapr.R b/R/cohortCapr.R similarity index 100% rename from project/R/cohortCapr.R rename to R/cohortCapr.R diff --git a/project/R/cohortCapr_md.Rmd b/R/cohortCapr_md.Rmd similarity index 87% rename from project/R/cohortCapr_md.Rmd rename to R/cohortCapr_md.Rmd index 4aee42a2..98287b74 100644 --- a/project/R/cohortCapr_md.Rmd +++ b/R/cohortCapr_md.Rmd @@ -15,8 +15,8 @@ knitr::opts_chunk$set(echo = TRUE) ``` ```{r Get project configurations} -connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') -isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') ``` ## Connect to DB @@ -54,7 +54,7 @@ disconnect(con) ## Concept counts Retrieve counts for a concept set -```{r count occurences, echo=TRUE} +```{r count occurences} ## Count occurrences of each concept in data # Establish connection @@ -89,9 +89,9 @@ con <- connect(connectionDetails) source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, - data_concepts_path = isStandardConfig$concepts_path, + data_concepts_path = config_oth$concepts_path, # (optional) Save the results (with standard and non-standard concepts) - save_path = isStandardConfig$save_path + save_path = config_oth$save_path_isStandard ) # Disconnect @@ -99,7 +99,6 @@ disconnect(con) # Print all non-standard concepts nonStandard -nonStandardCS ``` ## Standard and non-standard concepts given a concept set ```{r Standard non-standard check concept set} @@ -114,7 +113,7 @@ source('./R/isStandardCS.R') nonStandardCS <- isStandardCS( db_connection = con, conceptSet = conceptSets$conceptSets$labTests, - save_path = isStandardConfig$save_path + save_path = config_oth$save_path_isStandard ) # Disconnect @@ -134,8 +133,8 @@ limit to first/earliest occurrence of any of the above measurements (+descendant # Create cohort definition ch <- cohort( entry = entry( - # enter patients < 80 years old who have had a lab test - measurement(conceptSets$conceptSets$labTests, age(lt(80))), + # enter patients who have had a lab test + measurement(conceptSets$conceptSets$labTests), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -189,11 +188,11 @@ sql <- CirceR::buildCohortQuery( Save the cohort and concept set jsons; these can be imported into ATLAS ```{r Save cohort and concept set json} -write(chJson, "./json/cohort.json") +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) for (cs in names(conceptSets$conceptSets)) { writeConceptSet( x = conceptSets$conceptSets[[cs]], - path = paste("./json/", cs, "_cs.json", sep="") + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") ) } ``` @@ -240,8 +239,8 @@ disconnect(con) cohortCounts ``` -## Get updated DB after querying cohorts -```{r retrieve updated DB} +## Number of people in db +```{r Number of people in DB} # Establish connection con <- connect(connectionDetails) diff --git a/project/R/conceptSets.R b/R/conceptSets.R similarity index 100% rename from project/R/conceptSets.R rename to R/conceptSets.R diff --git a/project/R/countOccurrences.R b/R/countOccurrences.R similarity index 100% rename from project/R/countOccurrences.R rename to R/countOccurrences.R diff --git a/project/R/isStandard.R b/R/isStandard.R similarity index 88% rename from project/R/isStandard.R rename to R/isStandard.R index c15bbb72..601ab46a 100644 --- a/project/R/isStandard.R +++ b/R/isStandard.R @@ -15,16 +15,16 @@ #' @examples #' # Assuming you have a valid DBI connection `db_conn` and your tables are located in "path/to/data_concepts": #' non_standard_concepts <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") -#' +#' #' @importFrom readr read_csv write_csv #' @importFrom dplyr mutate across filter select inner_join #' @importFrom DBI dbGetQuery #' @export -isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { +isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { library(readr) library(dplyr) library(DBI) - + # Read concept table from SQL database concept_table_query <- "SELECT concept_id, concept_name, standard_concept FROM cdm.concept" concept_table <- dbGetQuery(db_connection, concept_table_query) %>% @@ -36,20 +36,20 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() - + # Get tables from data_concepts_path tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) - + # Stop if path does not point towards dir of CSVs if (length(tables) == 0) { stop("No CSV files found in the specified directory.") } - + for (table_path in tables) { table_name <- basename(table_path) - + # Read and prepare table - tb <- + tb <- readr::read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% @@ -57,7 +57,7 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { mutate(concept_id = tolower(concept_id), concept_id = as.character(concept_id)) %>% select(sourceCode, concept_id) - + # Join tables joined <- inner_join(concept_table, tb, by = "concept_id") @@ -66,12 +66,18 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { nonStandard <- append(nonStandard, joined$concept_id[ind]) conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) - sourceTableNonStandard <- append(sourceTableNonStandard, + sourceTableNonStandard <- append(sourceTableNonStandard, replicate(length(ind), table_name, simplify="vector")) - + + if (length(ind) == 0) { + message("No non-standard concepts found in list of concepts: ", table_name) + } else { + message(paste("Found ", length(ind), " non-standard concepts in list of concepts: ", table_name)) + } + # Save if not empty and save_path is provided if (!is.null(save_path) && nrow(joined) > 0) { - message(paste("saving file: ", table_name)) + message(paste0("saving file: ", table_name)) readr::write_csv(joined, paste0(save_path, "/", table_name)) } else if (is.null(save_path)) { next @@ -79,7 +85,7 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { message(paste("No matches found for concept set.\n")) } } - + # Create table of non-standard concepts res <- tibble::tibble( concept_id = nonStandard, @@ -87,6 +93,7 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { source_code = sourceCodeNonStandard, source_table = unlist(sourceTableNonStandard) ) - + message(paste0("Finished checking for non-standard concepts.\n", nrow(res), " non-standard concepts found across tables.")) + return(res) -} \ No newline at end of file +} diff --git a/project/R/isStandardCS.R b/R/isStandardCS.R similarity index 89% rename from project/R/isStandardCS.R rename to R/isStandardCS.R index 92520f04..b22dd650 100644 --- a/project/R/isStandardCS.R +++ b/R/isStandardCS.R @@ -13,28 +13,28 @@ #' @examples #' # Assuming you have a concept set `conceptSet`: #' non_standard_concepts <- isStandardCS(db_conn, conceptSet, "path/to/save_standard_AND_non_standard/") -#' +#' #' @export isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { library(readr) library(dplyr) library(DBI) - + # Initialize vectors for non-standard concepts nonStandard <- c() conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() - + # Get concept set details cs <- conceptSet@Expression - + # initialize vectors concept_name = c() concept_id = c() concept_set = c() standard = c() - + for (concept in cs) { concept_name <- append(concept_name, concept@Concept@concept_name) concept_id <- append(concept_id, concept@Concept@concept_id) @@ -42,7 +42,7 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { } cs_name <- conceptSet@Name concept_set <- rep.int(cs_name, length(concept_id)) - + # Filter out standard and classification concepts; keep non-standard and NA df <- data.frame( concept_name, @@ -50,24 +50,24 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { concept_set, standard ) - + # Save if not empty and save_path is provided if (!is.null(save_path) && nrow(df) > 0) { - message(paste("saving file: CONCEPTSET_", cs_name)) + message(paste0("saving file: CONCEPTSET_", cs_name)) write_csv(df, paste0(save_path, "/CONCEPTSET_", cs_name, ".csv")) } else if (is.null(save_path)) { message("No save path specified; returning non-standard concepts\n") } else { - message(paste("No matches found for table:", table_name, "\n")) + message(paste0("No matches found for concept set: ", table_name, "\n")) } - - + + # NonStandard concepts res <- df %>% filter(standard != "S" & standard != "C" | is.na(standard)) %>% tibble::tibble() if (nrow(res) == 0) { - message("No non-standard concepts found in concept set ", cs_name) + message("No non-standard concepts found in concept set: ", cs_name) } else { - message(paste("Found ", nrow(res), " non-standard concepts in concept set ", cs_name)) + message(paste0("Found ", nrow(res), " non-standard concepts in concept set: ", cs_name)) } return(res) -} \ No newline at end of file +} diff --git a/project/R/table_linked_to_concept_field.R b/R/table_linked_to_concept_field.R similarity index 100% rename from project/R/table_linked_to_concept_field.R rename to R/table_linked_to_concept_field.R diff --git a/project/config/is_standard_config-sample.yml b/inst/config/config-sample.yml similarity index 100% rename from project/config/is_standard_config-sample.yml rename to inst/config/config-sample.yml diff --git a/project/config/connection_config-sample.yml b/inst/config/connection_config-sample.yml similarity index 100% rename from project/config/connection_config-sample.yml rename to inst/config/connection_config-sample.yml diff --git a/project/data/phems_variable_list/5.10_cardiac_radiology.csv b/inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv similarity index 100% rename from project/data/phems_variable_list/5.10_cardiac_radiology.csv rename to inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv diff --git a/project/data/phems_variable_list/5.11_cardiac_los.csv b/inst/extdata/phems_variable_list/5.11_cardiac_los.csv similarity index 100% rename from project/data/phems_variable_list/5.11_cardiac_los.csv rename to inst/extdata/phems_variable_list/5.11_cardiac_los.csv diff --git a/project/data/phems_variable_list/5.12_additional.csv b/inst/extdata/phems_variable_list/5.12_additional.csv similarity index 100% rename from project/data/phems_variable_list/5.12_additional.csv rename to inst/extdata/phems_variable_list/5.12_additional.csv diff --git a/project/data/phems_variable_list/5.13_laboratory_tests.csv b/inst/extdata/phems_variable_list/5.13_laboratory_tests.csv similarity index 100% rename from project/data/phems_variable_list/5.13_laboratory_tests.csv rename to inst/extdata/phems_variable_list/5.13_laboratory_tests.csv diff --git a/project/data/phems_variable_list/5.14_cardiac_complications.csv b/inst/extdata/phems_variable_list/5.14_cardiac_complications.csv similarity index 100% rename from project/data/phems_variable_list/5.14_cardiac_complications.csv rename to inst/extdata/phems_variable_list/5.14_cardiac_complications.csv diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/inst/extdata/phems_variable_list/5.15_vital_signs.csv similarity index 100% rename from project/data/phems_variable_list/5.15_vital_signs.csv rename to inst/extdata/phems_variable_list/5.15_vital_signs.csv diff --git a/project/data/phems_variable_list/5.16_hsjd_clinical.csv b/inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv similarity index 100% rename from project/data/phems_variable_list/5.16_hsjd_clinical.csv rename to inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv diff --git a/project/data/phems_variable_list/5.17_hsjd_surgery.csv b/inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv similarity index 100% rename from project/data/phems_variable_list/5.17_hsjd_surgery.csv rename to inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv diff --git a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv b/inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv similarity index 100% rename from project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv rename to inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv diff --git a/project/data/phems_variable_list/5.19_hsjd_complication.csv b/inst/extdata/phems_variable_list/5.19_hsjd_complication.csv similarity index 100% rename from project/data/phems_variable_list/5.19_hsjd_complication.csv rename to inst/extdata/phems_variable_list/5.19_hsjd_complication.csv diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv similarity index 100% rename from project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv rename to inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv diff --git a/project/data/phems_variable_list/5.22_vital_signs.csv b/inst/extdata/phems_variable_list/5.22_vital_signs.csv similarity index 100% rename from project/data/phems_variable_list/5.22_vital_signs.csv rename to inst/extdata/phems_variable_list/5.22_vital_signs.csv diff --git a/project/data/phems_variable_list/5.23_physical_examination_signs.csv b/inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv similarity index 100% rename from project/data/phems_variable_list/5.23_physical_examination_signs.csv rename to inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv diff --git a/project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv b/inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv similarity index 100% rename from project/data/phems_variable_list/5.24_laboratory_test_results_uc2.csv rename to inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv diff --git a/project/data/phems_variable_list/5.25_arterial_blood_gas.csv b/inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv similarity index 100% rename from project/data/phems_variable_list/5.25_arterial_blood_gas.csv rename to inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv diff --git a/project/data/phems_variable_list/5.26_venous_blood_gas.csv b/inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv similarity index 100% rename from project/data/phems_variable_list/5.26_venous_blood_gas.csv rename to inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv diff --git a/project/data/phems_variable_list/5.28_patient_characteristics.csv b/inst/extdata/phems_variable_list/5.28_patient_characteristics.csv similarity index 100% rename from project/data/phems_variable_list/5.28_patient_characteristics.csv rename to inst/extdata/phems_variable_list/5.28_patient_characteristics.csv diff --git a/project/data/phems_variable_list/5.29_lab_measurements_uc3.csv b/inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv similarity index 100% rename from project/data/phems_variable_list/5.29_lab_measurements_uc3.csv rename to inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv diff --git a/project/data/phems_variable_list/5.30_treatments.csv b/inst/extdata/phems_variable_list/5.30_treatments.csv similarity index 100% rename from project/data/phems_variable_list/5.30_treatments.csv rename to inst/extdata/phems_variable_list/5.30_treatments.csv diff --git a/project/data/phems_variable_list/5.31_surgery_specific_parameters.csv b/inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv similarity index 100% rename from project/data/phems_variable_list/5.31_surgery_specific_parameters.csv rename to inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv diff --git a/project/data/phems_variable_list/5.3_vis_score_medications.csv b/inst/extdata/phems_variable_list/5.3_vis_score_medications.csv similarity index 100% rename from project/data/phems_variable_list/5.3_vis_score_medications.csv rename to inst/extdata/phems_variable_list/5.3_vis_score_medications.csv diff --git a/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv b/inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv similarity index 100% rename from project/data/phems_variable_list/5.4_vasopressors_inotropes.csv rename to inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv diff --git a/project/data/phems_variable_list/5.5_immunosuppressants.csv b/inst/extdata/phems_variable_list/5.5_immunosuppressants.csv similarity index 100% rename from project/data/phems_variable_list/5.5_immunosuppressants.csv rename to inst/extdata/phems_variable_list/5.5_immunosuppressants.csv diff --git a/project/data/phems_variable_list/5.6_antibiotic_medication.csv b/inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv similarity index 100% rename from project/data/phems_variable_list/5.6_antibiotic_medication.csv rename to inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv diff --git a/project/data/phems_variable_list/5.7_antifungals.csv b/inst/extdata/phems_variable_list/5.7_antifungals.csv similarity index 100% rename from project/data/phems_variable_list/5.7_antifungals.csv rename to inst/extdata/phems_variable_list/5.7_antifungals.csv diff --git a/project/data/phems_variable_list/5.8_antibiotic_resistance.csv b/inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv similarity index 100% rename from project/data/phems_variable_list/5.8_antibiotic_resistance.csv rename to inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv diff --git a/project/data/phems_variable_list/5.9_cardiac_surgery.csv b/inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv similarity index 100% rename from project/data/phems_variable_list/5.9_cardiac_surgery.csv rename to inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv diff --git a/project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.10_cardiac_radiology.csv rename to inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv diff --git a/project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv b/inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.11_cardiac_los.csv rename to inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv diff --git a/project/data/phems_variable_list/is_standard/5.12_additional.csv b/inst/extdata/phems_variable_list/is_standard/5.12_additional.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.12_additional.csv rename to inst/extdata/phems_variable_list/is_standard/5.12_additional.csv diff --git a/project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.13_laboratory_tests.csv rename to inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv diff --git a/project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.14_cardiac_complications.csv rename to inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv diff --git a/project/data/phems_variable_list/is_standard/5.15_vital_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.15_vital_signs.csv rename to inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv diff --git a/project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.16_hsjd_clinical.csv rename to inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv diff --git a/project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.17_hsjd_surgery.csv rename to inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv diff --git a/project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv rename to inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv diff --git a/project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.19_hsjd_complication.csv rename to inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv diff --git a/project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv rename to inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv diff --git a/project/data/phems_variable_list/is_standard/5.22_vital_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.22_vital_signs.csv rename to inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv diff --git a/project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.23_physical_examination_signs.csv rename to inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv diff --git a/project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv b/inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv rename to inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv diff --git a/project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv b/inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv rename to inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv diff --git a/project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv b/inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.26_venous_blood_gas.csv rename to inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv diff --git a/project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv b/inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.28_patient_characteristics.csv rename to inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv diff --git a/project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv b/inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv rename to inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv diff --git a/project/data/phems_variable_list/is_standard/5.30_treatments.csv b/inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.30_treatments.csv rename to inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv diff --git a/project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv b/inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv rename to inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv diff --git a/project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.3_vis_score_medications.csv rename to inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv diff --git a/project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv rename to inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv diff --git a/project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.5_immunosuppressants.csv rename to inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv diff --git a/project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.6_antibiotic_medication.csv rename to inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv diff --git a/project/data/phems_variable_list/is_standard/5.7_antifungals.csv b/inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.7_antifungals.csv rename to inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv diff --git a/project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv rename to inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv diff --git a/project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv similarity index 100% rename from project/data/phems_variable_list/is_standard/5.9_cardiac_surgery.csv rename to inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv diff --git a/project/renv.lock b/renv.lock similarity index 90% rename from project/renv.lock rename to renv.lock index 9d9b9358..dc5b62fb 100644 --- a/project/renv.lock +++ b/renv.lock @@ -9,65 +9,24 @@ ] }, "Packages": { - "Capr": { - "Package": "Capr", - "Version": "2.0.8", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "Capr", - "RemoteUsername": "ohdsi", - "RemoteRef": "v2.0.8", - "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", - "Requirements": [ - "CirceR", - "DBI", - "DatabaseConnector", - "R", - "SqlRender", - "checkmate", - "cli", - "digest", - "dplyr", - "fs", - "generics", - "glue", - "jsonlite", - "lubridate", - "magrittr", - "methods", - "purrr", - "readr", - "rlang", - "stringr", - "tibble", - "tidyr" - ], - "Hash": "5c14cb5c92bf80da1542420717c7c7e8" - }, "CirceR": { "Package": "CirceR", "Version": "1.3.3", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "CirceR", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "30303ec28bfd3bd4deffc9f84e7b8f9ddbf93c77", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", "RJSONIO", "rJava" ], - "Hash": "3e9b4a57bbac2222751f20d4d59a390f" + "Hash": "2f9522a81dac11183e90b4236afa441d" }, "CohortGenerator": { "Package": "CohortGenerator", "Version": "0.9.0", "Source": "GitHub", - "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", "RemoteType": "github", + "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", "RemoteHost": "api.github.com", "RemoteRepo": "CohortGenerator", "RemoteUsername": "ohdsi", @@ -92,6 +51,23 @@ ], "Hash": "1ba1b2d91607742e1d53676af13f506f" }, + "CommonDataModel": { + "Package": "CommonDataModel", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "DatabaseConnector", + "SqlRender", + "dplyr", + "rJava", + "readr", + "rmarkdown", + "stringr" + ], + "Hash": "d009324efba4c142b431202580eb09d1" + }, "DBI": { "Package": "DBI", "Version": "1.2.3", @@ -126,6 +102,47 @@ ], "Hash": "1ef65614602c6534a6c666e872c3b647" }, + "Eunomia": { + "Package": "Eunomia", + "Version": "2.0.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Eunomia", + "RemoteUsername": "OHDSI", + "RemoteRef": "HEAD", + "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", + "Requirements": [ + "CommonDataModel", + "DBI", + "RSQLite", + "arrow", + "readr", + "rlang" + ], + "Hash": "4a1136a2e60c727a9eddd9baef8216d6" + }, + "OhdsiRTools": { + "Package": "OhdsiRTools", + "Version": "2.0.2", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "OhdsiRTools", + "RemoteUsername": "OHDSI", + "RemoteRef": "HEAD", + "RemoteSha": "e076a286dfb9ae925606b85747432f237e19c942", + "Requirements": [ + "RJSONIO", + "codetools", + "formatR", + "httr", + "methods", + "remotes", + "utils" + ], + "Hash": "9ef9345d33fad72aca369809b435938d" + }, "ParallelLogger": { "Package": "ParallelLogger", "Version": "3.3.0", @@ -203,6 +220,28 @@ ], "Hash": "e1762de0f08b14658d74989c10e2f265" }, + "arrow": { + "Package": "arrow", + "Version": "16.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "assertthat", + "bit64", + "cpp11", + "glue", + "methods", + "purrr", + "rlang", + "stats", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "d9cb18a8fc53895548150650cadde3a6" + }, "askpass": { "Package": "askpass", "Version": "1.2.0", @@ -213,6 +252,16 @@ ], "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, "backports": { "Package": "backports", "Version": "1.5.0", @@ -365,6 +414,16 @@ ], "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" }, + "codetools": { + "Package": "codetools", + "Version": "0.2-20", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "61e097f35917d342622f21cdc79c256e" + }, "commonmark": { "Package": "commonmark", "Version": "1.9.1", @@ -625,6 +684,16 @@ ], "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" }, + "formatR": { + "Package": "formatR", + "Version": "1.14", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "63cb26d12517c7863f5abb006c5e0f25" + }, "fs": { "Package": "fs", "Version": "1.6.4", @@ -1289,7 +1358,7 @@ }, "roxygen2": { "Package": "roxygen2", - "Version": "7.3.1", + "Version": "7.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1311,7 +1380,7 @@ "withr", "xml2" ], - "Hash": "c25fe7b2d8cba73d1b63c947bf7afdb9" + "Hash": "6ee25f9054a70f44d615300ed531ba8d" }, "rprojroot": { "Package": "rprojroot", From f05f39c4788bbebcf21fcd3a7f90d8b0d21e00bf Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 13:30:52 +0200 Subject: [PATCH 050/130] update .gitignore --- .gitignore | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index be63e36c..db3603ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ !.gitignore # Capr -.Rprofile .Rhistory .Rproj.user .DS_Store @@ -13,9 +12,14 @@ scratch/ inst/doc # project-specific -project/config/* -!project/config/*-sample.yml -project/vocabularies/* -project/data/* -!project/data/phems_variable_list -project/json/* \ No newline at end of file +inst/config/* +!inst/config/*-sample.yml + +inst/extdata/* +!inst/extdata/phems_variable_list +!inst/extdata/json +inst/extdata/json/* +!inst/extdata/vocabularies +inst/extdata/vocabularies/* + +renv \ No newline at end of file From 17674662265e84cb6d252caf88c7ee4a5f8ac4fd Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 13:32:59 +0200 Subject: [PATCH 051/130] use Capr.Rproj --- Capr.Rproj | 42 ++++++++++++++++++++-------------------- project/PHEMS-Capr.Rproj | 13 ------------- 2 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 project/PHEMS-Capr.Rproj diff --git a/Capr.Rproj b/Capr.Rproj index cba1b6b7..08d5ab1b 100644 --- a/Capr.Rproj +++ b/Capr.Rproj @@ -1,21 +1,21 @@ -Version: 1.0 - -RestoreWorkspace: No -SaveWorkspace: No -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace +Version: 1.0 + +RestoreWorkspace: No +SaveWorkspace: No +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace diff --git a/project/PHEMS-Capr.Rproj b/project/PHEMS-Capr.Rproj deleted file mode 100644 index 3af27f6a..00000000 --- a/project/PHEMS-Capr.Rproj +++ /dev/null @@ -1,13 +0,0 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX From b8ec494c7b5f6c59b0523af6901a91e89067a17f Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 13:33:28 +0200 Subject: [PATCH 052/130] update R profile --- .Rbuildignore | 38 ++++++++++++++++++++------------------ .Rprofile | 7 +++++++ 2 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 .Rprofile diff --git a/.Rbuildignore b/.Rbuildignore index 05b120c1..6fa6fcd9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,18 +1,20 @@ -^Capr\.Rproj$ -^\.Rproj\.user$ -.github -deploy.sh -compare_versions -^doc$ -^Meta$ -^_pkgdown\.yml$ -^docs$ -^extras$ -^man-roxygen$ -^scratch$ -^work$ -^README\.Rmd$ -^pkgdown$ -^cran-comments\.md$ -^CRAN-SUBMISSION$ -^LICENSE\.md$ +^renv$ +^renv\.lock$ +^Capr\.Rproj$ +^\.Rproj\.user$ +.github +deploy.sh +compare_versions +^doc$ +^Meta$ +^_pkgdown\.yml$ +^docs$ +^extras$ +^man-roxygen$ +^scratch$ +^work$ +^README\.Rmd$ +^pkgdown$ +^cran-comments\.md$ +^CRAN-SUBMISSION$ +^LICENSE\.md$ diff --git a/.Rprofile b/.Rprofile new file mode 100644 index 00000000..2da81a02 --- /dev/null +++ b/.Rprofile @@ -0,0 +1,7 @@ +source("renv/activate.R") +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) From ccda61be25526879d6efa9c4dd981191656a53da Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 16 Jul 2024 13:33:58 +0200 Subject: [PATCH 053/130] remove outdated html --- project/R/cohortCapr_md.html | 771 ----------------------------------- 1 file changed, 771 deletions(-) delete mode 100644 project/R/cohortCapr_md.html diff --git a/project/R/cohortCapr_md.html b/project/R/cohortCapr_md.html deleted file mode 100644 index 8b9e28a8..00000000 --- a/project/R/cohortCapr_md.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - - - - - - - - - - -cohortCapr markdown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Set-up knitr

-
-
-

Activate renv

-
-
-

Set-up libraries

-

Set up the required libraries, and working directory

-
## Warning: package 'devtools' was built under R version 4.4.1
-
## Loading required package: usethis
-
## Warning: package 'usethis' was built under R version 4.4.1
-
## 
-## Attaching package: 'devtools'
-
## The following object is masked from 'package:renv':
-## 
-##     install
-
## Warning: package 'RSQLite' was built under R version 4.4.1
-
## Loading required package: R6
-

##Connect to database

-
## Eunomia GI bleed data set
-connectionDetails <- Eunomia::getEunomiaConnectionDetails()
-
## attempting to download GiBleed
-
## attempting to extract and load: C:\Users\guusw\AppData\Local\Temp\RtmpiYt1Dq/GiBleed_5.3.zip to: C:\Users\guusw\AppData\Local\Temp\RtmpiYt1Dq/GiBleed_5.3.sqlite
-
-
-

Load data set

-

Use dbConnector library to specified DB and retrieve the GI bleed -(default) dataset. Load this data into a dataframe as well for -inspection

-
## Load data
-# Connect to database
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# List all tables
-tables <- dbListTables(con)
-
-# Exclude sqlite_sequence (contains table information)
-tables <- tables[tables != "sqlite_sequence"]
-
-lDataFramesPre <- vector("list", length=length(tables))
-names(lDataFramesPre) <- tables
-
-# Create a data.frame for each table
-for (i in seq(along=tables)) {
-  lDataFramesPre[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
-}
-
-# Disconnect
-disconnect(con)
-
-cat("\n\nTABLES:\n  ")
-
## 
-## 
-## TABLES:
-## 
-
writeLines(tables, sep = "\n  ")
-
## attribute_definition
-##   care_site
-##   cdm_source
-##   cohort
-##   cohort_attribute
-##   cohort_definition
-##   concept
-##   concept_ancestor
-##   concept_class
-##   concept_relationship
-##   concept_synonym
-##   condition_era
-##   condition_occurrence
-##   cost
-##   death
-##   device_exposure
-##   domain
-##   dose_era
-##   drug_era
-##   drug_exposure
-##   drug_strength
-##   fact_relationship
-##   location
-##   measurement
-##   metadata
-##   note
-##   note_nlp
-##   observation
-##   observation_period
-##   payer_plan_period
-##   person
-##   procedure_occurrence
-##   provider
-##   relationship
-##   source_to_concept_map
-##   specimen
-##   visit_detail
-##   visit_occurrence
-##   vocabulary
-## 
-
-
-

Concept sets

-

Define a measurement concept set using Capr and include all -descendants

-
## Concept sets
-source("./conceptSets.R")
-
## Sourced concept sets
-
# source("./connectVocabularies.R")
-
-# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
conceptSets$conceptSets <- conceptSets$conceptSets %>%
-  # Add details for all concepts (excl. descendants)
-  lapply(FUN = getConceptSetDetails, con = con, vocabularyDatabaseSchema = "main")
-
## Warning: Input SQL has already been translated, so not translating again
-## This warning is displayed once every 8 hours.
-
# Disconnect
-disconnect(con)
-
-
-

Included and excluded concepts

-

Retrieve concepts that have been included/excluded (does not capture -descendants)

-
## Count occurrences of each concept in data
-# Get countOccurrences function
-source("./countOccurrences.R")
-
-# Get links between tables and fields as input
-source("./table_linked_to_concept_field.R")
-
## Sourced links object
-
# count occurrences of each concept 'x' and print results; cardiac complications as example
-cardiacComplicationsCounts <- 
-  countOccurrences(
-    conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), 
-    lDataFramesPre, links
-  ) %>% print()
-
## # A tibble: 4 × 6
-##   concept_id count_persons count_records descendant_count_person
-##        <dbl>         <int>         <dbl>                   <int>
-## 1     321042           138           138                     138
-## 2    4324124             0             0                       0
-## 3    4051330             0             0                       0
-## 4    4185565             0             0                       0
-## # ℹ 2 more variables: descendant_count_record <dbl>, included <lgl>
-
labTestsCounts <- 
-  countOccurrences(
-    conceptSets$concepts$labTests, c("measurement"), 
-    lDataFramesPre, links
-  ) %>% print()
-
## # A tibble: 29 × 6
-##    concept_id count_persons count_records descendant_count_person
-##         <dbl>         <int>         <dbl>                   <int>
-##  1    3009542           136           137                     136
-##  2    3024561            35            35                      35
-##  3    3019550            35            35                      35
-##  4    3006923            35            35                      35
-##  5    3013721            35            35                      35
-##  6    4298431             0             0                       0
-##  7    3007670             0             0                       0
-##  8   40762351             0             0                       0
-##  9   37393863             0             0                       0
-## 10    3034426             0             0                       0
-## # ℹ 19 more rows
-## # ℹ 2 more variables: descendant_count_record <dbl>, included <lgl>
-
-
-

Standard and non-standard concepts

-
source('./isStandard.R')
-
## 
-## Attaching package: 'dplyr'
-
## The following objects are masked from 'package:stats':
-## 
-##     filter, lag
-
## The following objects are masked from 'package:base':
-## 
-##     intersect, setdiff, setequal, union
-
nonStandard <- isStandard(
-  concept_table_path = "./project/data/vocabs_14-May-2024/CONCEPT.csv",
-  data_concepts_path = "./project/data/phems_variable_list/"
-  # save_path = "./project/data/phems_variable_list/is_standard_r/",
-  )
-
-nonStandard
-
## # A tibble: 11 × 4
-##    concept_id concept_name             source_code                  source_table
-##    <chr>      <chr>                    <chr>                        <list>      
-##  1 4152194    Systolic blood pressure  SBP (Systolic Blood Pressur… <chr [1]>   
-##  2 4154790    Diastolic blood pressure DBP (Dyastolic Blood Pressu… <chr [1]>   
-##  3 4239408    Heart rate               Age-dependent HR             <chr [1]>   
-##  4 4313591    Respiratory rate         Age-dependent RR             <chr [1]>   
-##  5 0          No matching concept      Extracardiac anomalies - di… <chr [1]>   
-##  6 607590     Body height              Height                       <chr [1]>   
-##  7 0          No matching concept      Aristotle's score of surgery <chr [1]>   
-##  8 0          No matching concept      ventilation                  <chr [1]>   
-##  9 0          No matching concept      Type of vasoactive infusion  <chr [1]>   
-## 10 0          No matching concept      VIS score of vasoactive inf… <chr [1]>   
-## 11 0          No matching concept      Total ventilation start dat… <chr [1]>
-
-
-

Initial event cohort

-

People having any of the following: any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements -(+descendants) per person

-
## Cohort definition
-# Create cohort definition
-ch <- cohort(
-  entry = entry(
-    # enter patients < 80 years old who have had a lab test
-    measurement(conceptSets$conceptSets$labTests, age(lt(80))),
-    observationWindow = continuousObservation(0, 0),
-    primaryCriteriaLimit = "All"
-  ),
-  attrition = attrition(
-    withAny(
-      # include all cardiac complications
-      atLeast(
-        x = 1,
-        # include all cardiac complications represented by condition concepts
-        query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications)
-      ),
-      atLeast(
-        x = 1,
-        # include all cardiac complications represented by procedure concepts
-        query = procedure(conceptSets$conceptSets$cardiacComplications)
-      )
-    ),
-    withAny(
-      atLeast(
-        x = 1,
-        # include all cardiac surgeries
-        query = procedure(conceptSets$conceptSets$cardiacProcedures)
-      )
-    )
-  ),
-  exit = exit(
-    endStrategy = observationExit(),
-    censor = censoringEvents(
-      # exit if intubation has taken place
-      procedure(conceptSets$conceptSets$intubation)
-    )
-  )
-)
-
-
-

Write json expressions and sql queries

-
## Cohort json and sql
-# Generate json for cohort
-chJson <- ch %>%
-  toCirce() %>%
-  jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>%
-  as.character()
-
-# Generate cohort sql query
-sql <- CirceR::buildCohortQuery(
-  expression = CirceR::cohortExpressionFromJson(chJson),
-  options = CirceR::createGenerateOptions(generateStats = FALSE)
-)
-

Save the cohort and concept set jsons; these can be imported into -ATLAS

-
write(chJson, paste(path, "./json/cohort.json", sep=""))
-for (cs in names(conceptSets$conceptSets)) {
-  writeConceptSet(
-    x = conceptSets$conceptSets[[cs]],
-    path = paste("../json/", cs, "_cs.json", sep="")
-  )
-}
-
# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# Cohorts to create
-cohortsToCreate <- tibble::tibble(
-  cohortId = 9876,
-  cohortName = "cardiac_arrest",
-  sql = sql
-)
-
-# Cohort tables
-cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cardiac_arrest")
-CohortGenerator::createCohortTables(
-  connectionDetails = connectionDetails,
-  cohortDatabaseSchema = "main",
-  cohortTableNames = cohortTableNames,
-)
-
## Connecting using SQLite driver
-
## Creating cohort tables
-## - Created table main.cardiac_arrest
-## - Created table main.cardiac_arrest
-## - Created table main.cardiac_arrest_inclusion
-## - Created table main.cardiac_arrest_inclusion_result
-## - Created table main.cardiac_arrest_inclusion_stats
-## - Created table main.cardiac_arrest_summary_stats
-## - Created table main.cardiac_arrest_censor_stats
-## Creating cohort tables took 0.06secs
-
# Generate the cohorts
-cohortsGenerated <- CohortGenerator::generateCohortSet(
-  connectionDetails = connectionDetails,
-  cdmDatabaseSchema = "main",
-  cohortDatabaseSchema = "main",
-  cohortTableNames = cohortTableNames,
-  cohortDefinitionSet = cohortsToCreate
-)
-
## Connecting using SQLite driver
-
## Initiating cluster consisting only of main thread
-## 1/1- Generating cohort: cardiac_arrest (id = 9876)
-##   |                                                                              |                                                                      |   0%  |                                                                              |==                                                                    |   3%  |                                                                              |====                                                                  |   6%  |                                                                              |======                                                                |   9%  |                                                                              |========                                                              |  11%  |                                                                              |==========                                                            |  14%  |                                                                              |============                                                          |  17%  |                                                                              |==============                                                        |  20%  |                                                                              |================                                                      |  23%  |                                                                              |==================                                                    |  26%  |                                                                              |====================                                                  |  29%  |                                                                              |======================                                                |  31%  |                                                                              |========================                                              |  34%  |                                                                              |==========================                                            |  37%  |                                                                              |============================                                          |  40%  |                                                                              |==============================                                        |  43%  |                                                                              |================================                                      |  46%  |                                                                              |==================================                                    |  49%  |                                                                              |====================================                                  |  51%  |                                                                              |======================================                                |  54%  |                                                                              |========================================                              |  57%  |                                                                              |==========================================                            |  60%  |                                                                              |============================================                          |  63%  |                                                                              |==============================================                        |  66%  |                                                                              |================================================                      |  69%  |                                                                              |==================================================                    |  71%  |                                                                              |====================================================                  |  74%  |                                                                              |======================================================                |  77%  |                                                                              |========================================================              |  80%  |                                                                              |==========================================================            |  83%  |                                                                              |============================================================          |  86%  |                                                                              |==============================================================        |  89%  |                                                                              |================================================================      |  91%  |                                                                              |==================================================================    |  94%  |                                                                              |====================================================================  |  97%  |                                                                              |======================================================================| 100%
-
## Executing SQL took 0.0956 secs
-
## Generating cohort set took 0.22 secs
-
# Get cohort counts
-cohortCounts <- CohortGenerator::getCohortCounts(
-  connectionDetails = connectionDetails,
-  cohortDatabaseSchema = "main",
-  cohortTable = cohortTableNames$cohortTable
-)
-
## Connecting using SQLite driver
-
## Counting cohorts took 0.0272 secs
-
# Disconnect
-disconnect(con)
-
-
-cohortCounts
-
## [1] cohortId       cohortEntries  cohortSubjects
-## <0 rows> (or 0-length row.names)
-
-
-

Get updated DB after querying cohorts

-
# Establish connection
-con <- connect(connectionDetails)
-
## Connecting using SQLite driver
-
# List all tables
-tables <- dbListTables(con)
-
-# Exclude sqlite_sequence (contains table information)
-tables <- tables[tables != "sqlite_sequence"]
-
-lDataFramesPost <- vector("list", length=length(tables))
-names(lDataFramesPost) <- tables
-
-# Create a data.frame for each table
-for (i in seq(along=tables)) {
-  lDataFramesPost[[i]] <- dbGetQuery(conn=con, statement=paste("SELECT * FROM '", tables[[i]], "'", sep=""))
-}
-
-# Disconnect
-disconnect(con)
-
-
-cat("Number of persons in dataset: ", length(unique(lDataFramesPost$person$person_id)), 
-    "\nNumber of persons in cohort:  ", length(unique(lDataFramesPost$cardiac_arrest$subject_id)))
-
## Number of persons in dataset:  2694 
-## Number of persons in cohort:   0
-
-
-

Filter loaded database for cohort

-
cohort_df <- list()
-cohort_person_ids <- lDataFramesPost$cardiac_arrest$subject_id
-for (table in names(lDataFramesPost)) {
-  if ("person_id" %in% names(lDataFramesPost[[table]])) {
-    cohort_df[[table]] <- 
-      lDataFramesPost[[table]] %>%
-      dplyr::filter(person_id %in% cohort_person_ids)
-  } else {
-    cohort_df[[table]] <- lDataFramesPost[[table]]
-  }
-}
-
- - - - -
- - - - - - - - - - - - - - - From 071b6b4757ad531f62274546306bddfd3759f108 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:10:53 +0200 Subject: [PATCH 054/130] .Renviron to configure rJava installation --- .Renviron | 1 + 1 file changed, 1 insertion(+) create mode 100644 .Renviron diff --git a/.Renviron b/.Renviron new file mode 100644 index 00000000..5e82c06e --- /dev/null +++ b/.Renviron @@ -0,0 +1 @@ +RENV_CONFIG_INSTALL_OPTIONS = '{"rJava": {"type": "source"}}' \ No newline at end of file From 239853ec227365b8c0a6d4568c846bfd336ee20e Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:11:18 +0200 Subject: [PATCH 055/130] update .Rproj --- Capr-PHEMS.Rproj | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Capr-PHEMS.Rproj diff --git a/Capr-PHEMS.Rproj b/Capr-PHEMS.Rproj new file mode 100644 index 00000000..8d82f1f3 --- /dev/null +++ b/Capr-PHEMS.Rproj @@ -0,0 +1,17 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source From 2b366a55315a6f892591480a67e4a3212c85e4f7 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:11:34 +0200 Subject: [PATCH 056/130] update renv lock --- renv.lock | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/renv.lock b/renv.lock index dc5b62fb..7c3bb132 100644 --- a/renv.lock +++ b/renv.lock @@ -9,6 +9,42 @@ ] }, "Packages": { + "Capr": { + "Package": "Capr", + "Version": "2.0.8", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Capr", + "RemoteUsername": "OHDSI", + "RemoteRef": "HEAD", + "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", + "Requirements": [ + "CirceR", + "DBI", + "DatabaseConnector", + "R", + "SqlRender", + "checkmate", + "cli", + "digest", + "dplyr", + "fs", + "generics", + "glue", + "jsonlite", + "lubridate", + "magrittr", + "methods", + "purrr", + "readr", + "rlang", + "stringr", + "tibble", + "tidyr" + ], + "Hash": "9f6109f92821d1799da4b15fc73d0066" + }, "CirceR": { "Package": "CirceR", "Version": "1.3.3", @@ -108,9 +144,9 @@ "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", + "RemoteUsername": "ohdsi", "RemoteRepo": "Eunomia", - "RemoteUsername": "OHDSI", - "RemoteRef": "HEAD", + "RemoteRef": "main", "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", "Requirements": [ "CommonDataModel", @@ -120,7 +156,7 @@ "readr", "rlang" ], - "Hash": "4a1136a2e60c727a9eddd9baef8216d6" + "Hash": "03b2865190a4b57457ba228e231e86c3" }, "OhdsiRTools": { "Package": "OhdsiRTools", From f056636f24654d6805666c7ca430db5c33198944 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:12:03 +0200 Subject: [PATCH 057/130] renamed .Rproj --- Capr.Rproj | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 Capr.Rproj diff --git a/Capr.Rproj b/Capr.Rproj deleted file mode 100644 index 08d5ab1b..00000000 --- a/Capr.Rproj +++ /dev/null @@ -1,21 +0,0 @@ -Version: 1.0 - -RestoreWorkspace: No -SaveWorkspace: No -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace From 5aafcc8c93d6b3bae5ac1a6907db6f2a2a185842 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:12:21 +0200 Subject: [PATCH 058/130] update DESCRIPTION --- DESCRIPTION | 132 +++++++++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 54296c7a..f90323c1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,64 +1,68 @@ -Package: Capr -Title: Cohort Definition Application Programming -Version: 2.0.8 -Authors@R: c( - person("Martin", "Lavallee", , "martin.lavallee@boehringer-ingelheim.com", role = c("aut", "cre")), - person("Adam", "Black", , "black@ohdsi.org", role = c("aut")) - ) -Description: Provides a programming language for defining cohort definitions in R to use in studies for Observational - Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of - OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. - 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing - R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts - while also helping bridge the gap between human readable descriptions of clinical phenotypes - and their computational implementation. -License: Apache License (>= 2) -URL: https://ohdsi.github.io/Capr/, https://github.com/OHDSI/Capr/ -BugReports: https://github.com/OHDSI/Capr/issues/ -Encoding: UTF-8 -RoxygenNote: 7.3.1 -Depends: - R (>= 3.5.0) -Imports: - magrittr (>= 1.5.0), - jsonlite, - methods, - purrr (>= 1.0.1), - rlang, - dplyr, - tidyr, - checkmate, - tibble, - readr, - stringr, - glue, - cli, - digest, - fs, - lubridate, - DBI, - DatabaseConnector, - SqlRender, - generics, - CirceR -Suggests: - testthat (>= 3.0.0), - knitr, - rmarkdown -VignetteBuilder: knitr -Config/testthat/edition: 3 -Collate: - 'Capr.R' - 'conceptSet.R' - 'attributes-concept.R' - 'attributes-dateAdjustment.R' - 'attributes-logic.R' - 'query.R' - 'window.R' - 'criteria.R' - 'attributes-nested.R' - 'attributes-op.R' - 'exit.R' - 'cohort.R' - 'collectCodesetId.R' - 'utils.R' +Package: Capr-PHEMS +Title: Cohort Definition Application Programming - project specific for PHEMS +Version: 2.0.8 +Authors@R: c( + person("Martin", "Lavallee", , "martin.lavallee@boehringer-ingelheim.com", role = c("aut", "cre")), + person("Adam", "Black", , "black@ohdsi.org", role = c("aut")), + person("Guus", "Wilmink", , "guus@thehyve.nl", role = c("aut")) + ) +Description: Provides a programming language for defining cohort definitions in R to use in studies for Observational + Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of + OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. + 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing + R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts + while also helping bridge the gap between human readable descriptions of clinical phenotypes + and their computational implementation. + For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. +License: Apache License (>= 2) +URL: https://ohdsi.github.io/Capr/, https://github.com/OHDSI/Capr/ +BugReports: https://github.com/OHDSI/Capr/issues/ +Encoding: UTF-8 +RoxygenNote: 7.3.1 +Depends: + R (>= 3.5.0) +Imports: + magrittr (>= 1.5.0), + jsonlite, + methods, + purrr (>= 1.0.1), + rlang, + dplyr, + tidyr, + checkmate, + tibble, + readr, + stringr, + glue, + cli, + digest, + fs, + lubridate, + DBI, + DatabaseConnector, + SqlRender, + generics, + CirceR, + codetools, + CohortGenerator, +Suggests: + testthat (>= 3.0.0), + knitr, + rmarkdown +VignetteBuilder: knitr +Config/testthat/edition: 3 +Collate: + 'Capr.R' + 'conceptSet.R' + 'attributes-concept.R' + 'attributes-dateAdjustment.R' + 'attributes-logic.R' + 'query.R' + 'window.R' + 'criteria.R' + 'attributes-nested.R' + 'attributes-op.R' + 'exit.R' + 'cohort.R' + 'collectCodesetId.R' + 'utils.R' From b0bdffb8140c6fa296cb00dae733a51f1790244f Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 09:12:30 +0200 Subject: [PATCH 059/130] update script --- R/cohortCapr.R | 51 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/R/cohortCapr.R b/R/cohortCapr.R index 481e9361..3e845111 100644 --- a/R/cohortCapr.R +++ b/R/cohortCapr.R @@ -1,18 +1,18 @@ -## ----knitr, include=FALSE----------------------------------------------------------------------------------- +## ----knitr, include=FALSE------------------------------------------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) -# knitr::purl( -# input = './R/cohortCapr_md.Rmd', -# output = './R/cohortCapr.R' -# ) +knitr::purl( + input = './R/cohortCapr_md.Rmd', + output = './R/cohortCapr.R' +) -## ----Get project configurations----------------------------------------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './config/connection_config.yml') -isStandardConfig <- config::get(config = 'config', file = './config/is_standard_config.yml') +## ----Get project configurations------------------------------------------------------------------------------ +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -## ----connect to database, eval=TRUE, include=TRUE----------------------------------------------------------- +## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------------------ # Use connection details from configuration connectionDetails <- createConnectionDetails( dbms = connectionConfig$dbms, @@ -25,7 +25,7 @@ connectionDetails <- createConnectionDetails( ) -## ----concept sets, echo=TRUE-------------------------------------------------------------------------------- +## ----concept sets, echo=TRUE--------------------------------------------------------------------------------- ## Concept sets source("./R/conceptSets.R") @@ -42,7 +42,7 @@ conceptSets$conceptSets <- conceptSets$conceptSets %>% disconnect(con) -## ----count occurences, echo=TRUE---------------------------------------------------------------------------- +## ----count occurences---------------------------------------------------------------------------------------- ## Count occurrences of each concept in data # Establish connection @@ -68,7 +68,7 @@ labTestsCounts <- disconnect(con) -## ----Standard non-standard check---------------------------------------------------------------------------- +## ----Standard non-standard check----------------------------------------------------------------------------- # Connect to DB con <- connect(connectionDetails) @@ -76,9 +76,9 @@ con <- connect(connectionDetails) source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, - data_concepts_path = isStandardConfig$concepts_path, + data_concepts_path = config_oth$concepts_path, # (optional) Save the results (with standard and non-standard concepts) - save_path = isStandardConfig$save_path + save_path = config_oth$save_path_isStandard ) # Disconnect @@ -86,10 +86,9 @@ disconnect(con) # Print all non-standard concepts nonStandard -nonStandardCS -## ----Standard non-standard check concept set---------------------------------------------------------------- +## ----Standard non-standard check concept set----------------------------------------------------------------- # connect to DB con <- connect(connectionDetails) @@ -101,7 +100,7 @@ source('./R/isStandardCS.R') nonStandardCS <- isStandardCS( db_connection = con, conceptSet = conceptSets$conceptSets$labTests, - save_path = isStandardConfig$save_path + save_path = config_oth$save_path_isStandard ) # Disconnect @@ -111,13 +110,13 @@ disconnect(con) nonStandardCS -## ----Cohort definition-------------------------------------------------------------------------------------- +## ----Cohort definition--------------------------------------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( entry = entry( - # enter patients < 80 years old who have had a lab test - measurement(conceptSets$conceptSets$labTests, age(lt(80))), + # enter patients who have had a lab test + measurement(conceptSets$conceptSets$labTests), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -153,7 +152,7 @@ ch <- cohort( ) -## ----json and sql------------------------------------------------------------------------------------------- +## ----json and sql-------------------------------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -168,17 +167,17 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json----------------------------------------------------------------------- -write(chJson, "./json/cohort.json") +## ----Save cohort and concept set json------------------------------------------------------------------------ +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) for (cs in names(conceptSets$conceptSets)) { writeConceptSet( x = conceptSets$conceptSets[[cs]], - path = paste("./json/", cs, "_cs.json", sep="") + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") ) } -## ----Create and generate cohorts---------------------------------------------------------------------------- +## ----Create and generate cohorts----------------------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -220,7 +219,7 @@ disconnect(con) cohortCounts -## ----retrieve updated DB------------------------------------------------------------------------------------ +## ----Number of people in DB---------------------------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) From fbfa18fcd3d3474cfd17e5491b17d9e243aee1ca Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Wed, 17 Jul 2024 10:17:50 +0200 Subject: [PATCH 060/130] renv library updates and install configurations --- .Renviron | 1 - .Rprofile | 15 +- DESCRIPTION | 4 +- R/cohortCapr_md.Rmd | 13 +- renv.lock | 1268 +------------------------------------------ 5 files changed, 41 insertions(+), 1260 deletions(-) delete mode 100644 .Renviron diff --git a/.Renviron b/.Renviron deleted file mode 100644 index 5e82c06e..00000000 --- a/.Renviron +++ /dev/null @@ -1 +0,0 @@ -RENV_CONFIG_INSTALL_OPTIONS = '{"rJava": {"type": "source"}}' \ No newline at end of file diff --git a/.Rprofile b/.Rprofile index 2da81a02..a49deaea 100644 --- a/.Rprofile +++ b/.Rprofile @@ -1,7 +1,10 @@ +message("Sourcing .Rprofile...") + +# Force compile packages from source before installing +options( + repos = c(CRAN = "https://cran.rstudio.com"), + install.packages.compile.from.source = TRUE, + pkgType = "source" +) + source("renv/activate.R") -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) diff --git a/DESCRIPTION b/DESCRIPTION index f90323c1..594268a8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,7 +44,9 @@ Imports: generics, CirceR, codetools, - CohortGenerator, + readr, + dplyr, + DBI Suggests: testthat (>= 3.0.0), knitr, diff --git a/R/cohortCapr_md.Rmd b/R/cohortCapr_md.Rmd index 98287b74..7f69dd50 100644 --- a/R/cohortCapr_md.Rmd +++ b/R/cohortCapr_md.Rmd @@ -1,7 +1,7 @@ --- title: "cohortCapr markdown" author: "Guus @TheHyve" -date: "2024-07-01" +date: "2024-07-17" output: html_document --- ## Set-up knitr @@ -14,11 +14,22 @@ knitr::opts_chunk$set(echo = TRUE) # ) ``` +## Set-up config ```{r Get project configurations} connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') config_oth <- config::get(config = 'config', file = './inst/config/config.yml') ``` +## Load libraries +```{r Load libraries} +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) +``` + ## Connect to DB ```{r connect to database, eval=TRUE, include=TRUE} # Use connection details from configuration diff --git a/renv.lock b/renv.lock index 7c3bb132..ab095ac1 100644 --- a/renv.lock +++ b/renv.lock @@ -9,42 +9,6 @@ ] }, "Packages": { - "Capr": { - "Package": "Capr", - "Version": "2.0.8", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "Capr", - "RemoteUsername": "OHDSI", - "RemoteRef": "HEAD", - "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", - "Requirements": [ - "CirceR", - "DBI", - "DatabaseConnector", - "R", - "SqlRender", - "checkmate", - "cli", - "digest", - "dplyr", - "fs", - "generics", - "glue", - "jsonlite", - "lubridate", - "magrittr", - "methods", - "purrr", - "readr", - "rlang", - "stringr", - "tibble", - "tidyr" - ], - "Hash": "9f6109f92821d1799da4b15fc73d0066" - }, "CirceR": { "Package": "CirceR", "Version": "1.3.3", @@ -57,53 +21,6 @@ ], "Hash": "2f9522a81dac11183e90b4236afa441d" }, - "CohortGenerator": { - "Package": "CohortGenerator", - "Version": "0.9.0", - "Source": "GitHub", - "RemoteType": "github", - "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", - "RemoteHost": "api.github.com", - "RemoteRepo": "CohortGenerator", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", - "Requirements": [ - "DatabaseConnector", - "ParallelLogger", - "R", - "R6", - "RJSONIO", - "SqlRender", - "bit64", - "checkmate", - "digest", - "dplyr", - "jsonlite", - "lubridate", - "readr", - "rlang", - "stringi" - ], - "Hash": "1ba1b2d91607742e1d53676af13f506f" - }, - "CommonDataModel": { - "Package": "CommonDataModel", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "DatabaseConnector", - "SqlRender", - "dplyr", - "rJava", - "readr", - "rmarkdown", - "stringr" - ], - "Hash": "d009324efba4c142b431202580eb09d1" - }, "DBI": { "Package": "DBI", "Version": "1.2.3", @@ -138,62 +55,6 @@ ], "Hash": "1ef65614602c6534a6c666e872c3b647" }, - "Eunomia": { - "Package": "Eunomia", - "Version": "2.0.0", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "ohdsi", - "RemoteRepo": "Eunomia", - "RemoteRef": "main", - "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", - "Requirements": [ - "CommonDataModel", - "DBI", - "RSQLite", - "arrow", - "readr", - "rlang" - ], - "Hash": "03b2865190a4b57457ba228e231e86c3" - }, - "OhdsiRTools": { - "Package": "OhdsiRTools", - "Version": "2.0.2", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "OhdsiRTools", - "RemoteUsername": "OHDSI", - "RemoteRef": "HEAD", - "RemoteSha": "e076a286dfb9ae925606b85747432f237e19c942", - "Requirements": [ - "RJSONIO", - "codetools", - "formatR", - "httr", - "methods", - "remotes", - "utils" - ], - "Hash": "9ef9345d33fad72aca369809b435938d" - }, - "ParallelLogger": { - "Package": "ParallelLogger", - "Version": "3.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "jsonlite", - "methods", - "snow", - "utils", - "xml2" - ], - "Hash": "fd636fc067099b75b8ad17e9104b10f3" - }, "R6": { "Package": "R6", "Version": "2.5.1", @@ -214,25 +75,6 @@ ], "Hash": "2f89abc0f88c647d3386c672632f4baf" }, - "RSQLite": { - "Package": "RSQLite", - "Version": "2.3.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "bit64", - "blob", - "cpp11", - "memoise", - "methods", - "pkgconfig", - "plogr", - "rlang" - ], - "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" - }, "Rcpp": { "Package": "Rcpp", "Version": "1.0.12", @@ -256,48 +98,6 @@ ], "Hash": "e1762de0f08b14658d74989c10e2f265" }, - "arrow": { - "Package": "arrow", - "Version": "16.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "assertthat", - "bit64", - "cpp11", - "glue", - "methods", - "purrr", - "rlang", - "stats", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "d9cb18a8fc53895548150650cadde3a6" - }, - "askpass": { - "Package": "askpass", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "sys" - ], - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" - }, - "assertthat": { - "Package": "assertthat", - "Version": "0.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "50c838a310445e954bc13f26f26a6ecf" - }, "backports": { "Package": "backports", "Version": "1.5.0", @@ -308,16 +108,6 @@ ], "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, - "base64enc": { - "Package": "base64enc", - "Version": "0.1-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "543776ae6848fde2f48ff3816d0628bc" - }, "bit": { "Package": "bit", "Version": "4.0.5", @@ -354,69 +144,6 @@ ], "Hash": "40415719b5a479b87949f3aa0aee737c" }, - "brew": { - "Package": "brew", - "Version": "1.0-10", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f4a384e19dccd8c65356dc096847b76" - }, - "brio": { - "Package": "brio", - "Version": "1.1.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "c1ee497a6d999947c2c224ae46799b1a" - }, - "bslib": { - "Package": "bslib", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "cachem", - "fastmap", - "grDevices", - "htmltools", - "jquerylib", - "jsonlite", - "lifecycle", - "memoise", - "mime", - "rlang", - "sass" - ], - "Hash": "8644cc53f43828f19133548195d7e59e" - }, - "cachem": { - "Package": "cachem", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "fastmap", - "rlang" - ], - "Hash": "cd9a672193789068eb5a2aad65a0dedf" - }, - "callr": { - "Package": "callr", - "Version": "3.7.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "processx", - "utils" - ], - "Hash": "d7e13f49c19103ece9e58ad2d83a7354" - }, "checkmate": { "Package": "checkmate", "Version": "2.3.1", @@ -460,23 +187,6 @@ ], "Hash": "61e097f35917d342622f21cdc79c256e" }, - "commonmark": { - "Package": "commonmark", - "Version": "1.9.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5d8225445acb167abf7797de48b2ee3c" - }, - "config": { - "Package": "config", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "yaml" - ], - "Hash": "8b7222e9d9eb5178eea545c0c4d33fc2" - }, "cpp11": { "Package": "cpp11", "Version": "0.4.7", @@ -499,30 +209,6 @@ ], "Hash": "859d96e65ef198fd43e82b9628d593ef" }, - "credentials": { - "Package": "credentials", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass", - "curl", - "jsonlite", - "openssl", - "sys" - ], - "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" - }, - "curl": { - "Package": "curl", - "Version": "5.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" - }, "dbplyr": { "Package": "dbplyr", "Version": "2.5.0", @@ -551,68 +237,6 @@ ], "Hash": "39b2e002522bfd258039ee4e889e0fd1" }, - "desc": { - "Package": "desc", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "utils" - ], - "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" - }, - "devtools": { - "Package": "devtools", - "Version": "2.4.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "desc", - "ellipsis", - "fs", - "lifecycle", - "memoise", - "miniUI", - "pkgbuild", - "pkgdown", - "pkgload", - "profvis", - "rcmdcheck", - "remotes", - "rlang", - "roxygen2", - "rversions", - "sessioninfo", - "stats", - "testthat", - "tools", - "urlchecker", - "usethis", - "utils", - "withr" - ], - "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" - }, - "diffobj": { - "Package": "diffobj", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "crayon", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" - }, "digest": { "Package": "digest", "Version": "0.6.36", @@ -624,26 +248,6 @@ ], "Hash": "fd6824ad91ede64151e93af67df6376b" }, - "downlit": { - "Package": "downlit", - "Version": "0.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "brio", - "desc", - "digest", - "evaluate", - "fansi", - "memoise", - "rlang", - "vctrs", - "withr", - "yaml" - ], - "Hash": "45a6a596bf0108ee1ff16a040a2df897" - }, "dplyr": { "Package": "dplyr", "Version": "1.1.4", @@ -667,28 +271,6 @@ ], "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, - "evaluate": { - "Package": "evaluate", - "Version": "0.24.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" - }, "fansi": { "Package": "fansi", "Version": "1.0.6", @@ -701,35 +283,6 @@ ], "Hash": "962174cf2aeb5b9eea581522286a911f" }, - "fastmap": { - "Package": "fastmap", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" - }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" - }, - "formatR": { - "Package": "formatR", - "Version": "1.14", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "63cb26d12517c7863f5abb006c5e0f25" - }, "fs": { "Package": "fs", "Version": "1.6.4", @@ -752,187 +305,34 @@ ], "Hash": "15e9634c0fcd294799e9b2e929ed1b86" }, - "gert": { - "Package": "gert", - "Version": "2.0.1", + "glue": { + "Package": "glue", + "Version": "1.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "askpass", - "credentials", - "openssl", - "rstudioapi", - "sys", - "zip" + "R", + "methods" ], - "Hash": "f70d3fe2d9e7654213a946963d1591eb" + "Hash": "e0b3a53876554bd45879e596cdb10a52" }, - "gh": { - "Package": "gh", - "Version": "1.4.1", + "hms": { + "Package": "hms", + "Version": "1.1.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "R", - "cli", - "gitcreds", - "glue", - "httr2", - "ini", - "jsonlite", "lifecycle", - "rlang" + "methods", + "pkgconfig", + "rlang", + "vctrs" ], - "Hash": "fbbbc48eba7a6626a08bb365e44b563b" + "Hash": "b59377caa7ed00fa41808342002138f9" }, - "gitcreds": { - "Package": "gitcreds", - "Version": "0.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" - }, - "glue": { - "Package": "glue", - "Version": "1.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" - }, - "highr": { - "Package": "highr", - "Version": "0.11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "xfun" - ], - "Hash": "d65ba49117ca223614f71b60d85b8ab7" - }, - "hms": { - "Package": "hms", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" - ], - "Hash": "b59377caa7ed00fa41808342002138f9" - }, - "htmltools": { - "Package": "htmltools", - "Version": "0.5.8.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "digest", - "fastmap", - "grDevices", - "rlang", - "utils" - ], - "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" - }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "04291cc45198225444a397606810ac37" - }, - "httpuv": { - "Package": "httpuv", - "Version": "1.6.15", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "Rcpp", - "later", - "promises", - "utils" - ], - "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" - }, - "httr": { - "Package": "httr", - "Version": "1.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "curl", - "jsonlite", - "mime", - "openssl" - ], - "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" - }, - "httr2": { - "Package": "httr2", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "curl", - "glue", - "lifecycle", - "magrittr", - "openssl", - "rappdirs", - "rlang", - "vctrs", - "withr" - ], - "Hash": "03d741c92fda96d98c3a3f22494e3b4a" - }, - "ini": { - "Package": "ini", - "Version": "0.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "6154ec2223172bce8162d4153cda21f7" - }, - "jquerylib": { - "Package": "jquerylib", - "Version": "0.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools" - ], - "Hash": "5aab57a3bd297eee1c1d862735972182" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -940,33 +340,6 @@ ], "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, - "knitr": { - "Package": "knitr", - "Version": "1.48", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "evaluate", - "highr", - "methods", - "tools", - "xfun", - "yaml" - ], - "Hash": "acf380f300c721da9fde7df115a5f86f" - }, - "later": { - "Package": "later", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp", - "rlang" - ], - "Hash": "a3e051d405326b8b0012377434c62b37" - }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.4", @@ -1003,49 +376,6 @@ ], "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, - "memoise": { - "Package": "memoise", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cachem", - "rlang" - ], - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" - }, - "mime": { - "Package": "mime", - "Version": "0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "18e9c28c1d3ca1560ce30658b22ce104" - }, - "miniUI": { - "Package": "miniUI", - "Version": "0.1.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools", - "shiny", - "utils" - ], - "Hash": "fec5f52652d60615fdb3957b3d74324a" - }, - "openssl": { - "Package": "openssl", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass" - ], - "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" - }, "pillar": { "Package": "pillar", "Version": "1.9.0", @@ -1063,21 +393,6 @@ ], "Hash": "15da5a8412f317beeee6175fbc76f4bb" }, - "pkgbuild": { - "Package": "pkgbuild", - "Version": "1.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "callr", - "cli", - "desc", - "processx" - ], - "Hash": "a29e8e134a460a01e0ca67a4763c595b" - }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", @@ -1088,71 +403,6 @@ ], "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, - "pkgdown": { - "Package": "pkgdown", - "Version": "2.0.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "callr", - "cli", - "desc", - "digest", - "downlit", - "fs", - "httr", - "jsonlite", - "magrittr", - "memoise", - "purrr", - "ragg", - "rlang", - "rmarkdown", - "tibble", - "whisker", - "withr", - "xml2", - "yaml" - ], - "Hash": "8bf1151ed1a48328d71b937e651117a6" - }, - "pkgload": { - "Package": "pkgload", - "Version": "1.3.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "crayon", - "desc", - "fs", - "glue", - "methods", - "pkgbuild", - "rlang", - "rprojroot", - "utils", - "withr" - ], - "Hash": "876c618df5ae610be84356d5d7a5d124" - }, - "plogr": { - "Package": "plogr", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "09eb987710984fc2905c7129c7d85e65" - }, - "praise": { - "Package": "praise", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a555924add98c99d2f411e37e7d25e9f" - }, "prettyunits": { "Package": "prettyunits", "Version": "1.2.0", @@ -1163,34 +413,6 @@ ], "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" }, - "processx": { - "Package": "processx", - "Version": "3.8.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "ps", - "utils" - ], - "Hash": "0c90a7d71988856bad2a2a45dd871bb9" - }, - "profvis": { - "Package": "profvis", - "Version": "0.3.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmlwidgets", - "purrr", - "rlang", - "stringr", - "vctrs" - ], - "Hash": "aa5a3864397ce6ae03458f98618395a1" - }, "progress": { "Package": "progress", "Version": "1.2.3", @@ -1205,33 +427,6 @@ ], "Hash": "f4625e061cb2865f111b47ff163a5ca6" }, - "promises": { - "Package": "promises", - "Version": "1.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "Rcpp", - "fastmap", - "later", - "magrittr", - "rlang", - "stats" - ], - "Hash": "434cd5388a3979e74be5c219bcd6e77d" - }, - "ps": { - "Package": "ps", - "Version": "1.7.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" - }, "purrr": { "Package": "purrr", "Version": "1.0.2", @@ -1258,49 +453,6 @@ ], "Hash": "524167e771b81342f8dd7a891ed3afa8" }, - "ragg": { - "Package": "ragg", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "systemfonts", - "textshaping" - ], - "Hash": "e3087db406e079a8a2fd87f413918ed3" - }, - "rappdirs": { - "Package": "rappdirs", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5e3c5dc0b071b21fa128676560dbe94d" - }, - "rcmdcheck": { - "Package": "rcmdcheck", - "Version": "1.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "callr", - "cli", - "curl", - "desc", - "digest", - "pkgbuild", - "prettyunits", - "rprojroot", - "sessioninfo", - "utils", - "withr", - "xopen" - ], - "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" - }, "readr": { "Package": "readr", "Version": "2.1.5", @@ -1324,30 +476,6 @@ ], "Hash": "9de96463d2117f6ac49980577939dfb3" }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tibble" - ], - "Hash": "76c9e04c712a05848ae7a23d2f170a40" - }, - "remotes": { - "Package": "remotes", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "3ee025083e66f18db6cf27b56e23e141" - }, "renv": { "Package": "renv", "Version": "1.0.7", @@ -1369,165 +497,6 @@ ], "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.27", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "27f9502e1cdbfa195f94e03b0f517484" - }, - "roxygen2": { - "Package": "roxygen2", - "Version": "7.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brew", - "cli", - "commonmark", - "cpp11", - "desc", - "knitr", - "methods", - "pkgload", - "purrr", - "rlang", - "stringi", - "stringr", - "utils", - "withr", - "xml2" - ], - "Hash": "6ee25f9054a70f44d615300ed531ba8d" - }, - "rprojroot": { - "Package": "rprojroot", - "Version": "2.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" - }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "96710351d642b70e8f02ddeb237c46a7" - }, - "rversions": { - "Package": "rversions", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "curl", - "utils", - "xml2" - ], - "Hash": "a9881dfed103e83f9de151dc17002cd1" - }, - "sass": { - "Package": "sass", - "Version": "0.4.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "fs", - "htmltools", - "rappdirs", - "rlang" - ], - "Hash": "d53dbfddf695303ea4ad66f86e99b95d" - }, - "sessioninfo": { - "Package": "sessioninfo", - "Version": "1.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "tools", - "utils" - ], - "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" - }, - "shiny": { - "Package": "shiny", - "Version": "1.8.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "bslib", - "cachem", - "commonmark", - "crayon", - "fastmap", - "fontawesome", - "glue", - "grDevices", - "htmltools", - "httpuv", - "jsonlite", - "later", - "lifecycle", - "methods", - "mime", - "promises", - "rlang", - "sourcetools", - "tools", - "utils", - "withr", - "xtable" - ], - "Hash": "54b26646816af9960a4c64d8ceec75d6" - }, - "snow": { - "Package": "snow", - "Version": "0.4-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "40b74690debd20c57d93d8c246b305d4" - }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5f5a7629f956619d519205ec475fe647" - }, "stringi": { "Package": "stringi", "Version": "1.8.4", @@ -1558,67 +527,6 @@ ], "Hash": "960e2ae9e09656611e0b8214ad543207" }, - "sys": { - "Package": "sys", - "Version": "3.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" - }, - "systemfonts": { - "Package": "systemfonts", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle" - ], - "Hash": "213b6b8ed5afbf934843e6c3b090d418" - }, - "testthat": { - "Package": "testthat", - "Version": "3.2.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brio", - "callr", - "cli", - "desc", - "digest", - "evaluate", - "jsonlite", - "lifecycle", - "magrittr", - "methods", - "pkgload", - "praise", - "processx", - "ps", - "rlang", - "utils", - "waldo", - "withr" - ], - "Hash": "3f6e7e5e2220856ff865e4834766bf2b" - }, - "textshaping": { - "Package": "textshaping", - "Version": "0.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle", - "systemfonts" - ], - "Hash": "5142f8bc78ed3d819d26461b641627ce" - }, "tibble": { "Package": "tibble", "Version": "3.2.1", @@ -1688,16 +596,6 @@ ], "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" }, - "tinytex": { - "Package": "tinytex", - "Version": "0.51", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "xfun" - ], - "Hash": "d44e2fcd2e4e076f0aac540208559d1d" - }, "triebeard": { "Package": "triebeard", "Version": "0.4.1", @@ -1719,20 +617,6 @@ ], "Hash": "f561504ec2897f4d46f0c7657e488ae1" }, - "urlchecker": { - "Package": "urlchecker", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "curl", - "tools", - "xml2" - ], - "Hash": "409328b8e1253c8d729a7836fe7f7a16" - }, "urltools": { "Package": "urltools", "Version": "1.7.3", @@ -1746,37 +630,6 @@ ], "Hash": "e86a704261a105f4703f653e05defa3e" }, - "usethis": { - "Package": "usethis", - "Version": "2.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "clipr", - "crayon", - "curl", - "desc", - "fs", - "gert", - "gh", - "glue", - "jsonlite", - "lifecycle", - "purrr", - "rappdirs", - "rlang", - "rprojroot", - "rstudioapi", - "stats", - "utils", - "whisker", - "withr", - "yaml" - ], - "Hash": "d524fd42c517035027f866064417d7e6" - }, "utf8": { "Package": "utf8", "Version": "1.2.4", @@ -1827,31 +680,6 @@ ], "Hash": "390f9315bc0025be03012054103d227c" }, - "waldo": { - "Package": "waldo", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "diffobj", - "fansi", - "glue", - "methods", - "rematch2", - "rlang", - "tibble" - ], - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" - }, - "whisker": { - "Package": "whisker", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "c6abfa47a46d281a7d5159d0a8891e88" - }, "withr": { "Package": "withr", "Version": "3.0.0", @@ -1863,68 +691,6 @@ "graphics" ], "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" - }, - "xfun": { - "Package": "xfun", - "Version": "0.45", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "stats", - "tools" - ], - "Hash": "ca59c87fe305b16a9141a5874c3a7889" - }, - "xml2": { - "Package": "xml2", - "Version": "1.3.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "methods", - "rlang" - ], - "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" - }, - "xopen": { - "Package": "xopen", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "processx" - ], - "Hash": "423df1e86d5533fcb73c6b02b4923b49" - }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, - "yaml": { - "Package": "yaml", - "Version": "2.3.9", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "9cb28d11799d93c953f852083d55ee9e" - }, - "zip": { - "Package": "zip", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" } } } From aeec12f1ecba72d0e2043e8fb2f068744b7067b6 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 18 Jul 2024 09:40:28 +0200 Subject: [PATCH 061/130] update readme --- README.md | 131 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index cfabdb1c..39da40cd 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,68 @@ -# Capr - - - -[![codecov.io](https://codecov.io/github/OHDSI/Capr/coverage.svg?branch=main)](https://app.codecov.io/gh/OHDSI/Capr?branch=main) [![Build Status](https://github.com/OHDSI/Capr/workflows/R-CMD-check/badge.svg)](https://github.com/OHDSI/Capr/actions?query=workflow%3AR-CMD-check) - - - -Capr is part of [HADES](https://ohdsi.github.io/Hades/) - -# Introduction - -The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model. - -Learn more about the OHDSI approach to cohort building in the [cohorts chapter of the Book of OHDSI.](https://ohdsi.github.io/TheBookOfOhdsi/Cohorts.html) - -# Installation - - -Users can install the current development version of Capr from [GitHub](https://github.com/) with: - -``` r -# install.packages("devtools") -devtools::install_github("ohdsi/Capr") -``` - - -# User Documentation - -Documentation can be found on the [package website](https://ohdsi.github.io/Capr/). - - -PDF versions of the documentation are also available: - -- Vignette: [Using Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Using-Capr.pdf) -- Vignette: [Capr Examples](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Examples.pdf) -- Vignette: [Working with Concept Sets in Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Capr-conceptSets.pdf) -- Vignette: [Capr for Templating Cohort Definitions](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_templates.pdf) -- Vignette: [Capr components](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_objects.pdf) -- [Design Document](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_design.pdf) -- [Package manual](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/Capr.pdf) - -# Support - -- Developer questions/comments/feedback: OHDSI Forum -- We use the GitHub issue tracker for all bugs/issues/enhancements - -# Contributing - -Read [here](https://ohdsi.github.io/Hades/contribute.html) how you can contribute to this package. - -# License - -Capr is licensed under Apache License 2.0 - -# Development - -Capr is being developed in R Studio. - -# Acknowledgements - -- This package is maintained by Martin Lavallee and Adam Black -- Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC +# Capr + + + +[![codecov.io](https://codecov.io/github/OHDSI/Capr/coverage.svg?branch=main)](https://app.codecov.io/gh/OHDSI/Capr?branch=main) [![Build Status](https://github.com/OHDSI/Capr/workflows/R-CMD-check/badge.svg)](https://github.com/OHDSI/Capr/actions?query=workflow%3AR-CMD-check) + + + +Capr is part of [HADES](https://ohdsi.github.io/Hades/) + +# Introduction + +The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model. + +This package has been extended under the name Capr-PHEMS for the PHEMS consortium to facilitate the cohort building process via a template script and specific configurations, as well as providing extra functionality to enable querying the frequency of concept sets on a person and record level and to enable checking the standardness of concepts in a set or list of concepts, thereby making identification of non-standard concepts much more straightforward. + +Learn more about the OHDSI approach to cohort building in the [cohorts chapter of the Book of OHDSI.](https://ohdsi.github.io/TheBookOfOhdsi/Cohorts.html) + +# Installation + + +Users can install the current development version of Capr from [GitHub](https://github.com/) with: + +``` r +# install.packages("devtools") +devtools::install_github("ohdsi/Capr") +``` + +For Capr-PHEMS, it is recommended to clone the repo and work from the template script cohortCapr.R, whilst using the Capr-PHEMS.Rproj as the project. + +# User Documentation + +Documentation can be found on the [package website](https://ohdsi.github.io/Capr/). + + +PDF versions of the documentation are also available: + +- Vignette: [Using Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Using-Capr.pdf) +- Vignette: [Capr Examples](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Examples.pdf) +- Vignette: [Working with Concept Sets in Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Capr-conceptSets.pdf) +- Vignette: [Capr for Templating Cohort Definitions](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_templates.pdf) +- Vignette: [Capr components](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_objects.pdf) +- [Design Document](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_design.pdf) +- [Package manual](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/Capr.pdf) + +# Support + +- Developer questions/comments/feedback: OHDSI Forum +- We use the GitHub issue tracker for all bugs/issues/enhancements + +# Contributing + +Read [here](https://ohdsi.github.io/Hades/contribute.html) how you can contribute to this package. + +# License + +Capr is licensed under Apache License 2.0 + +# Development + +Capr is being developed in R Studio. +Capr-PHEMS is beind developed in R Studio. + +# Acknowledgements + +- The original Capr package is maintained by Martin Lavallee and Adam Black +- Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC +- Additional scripts and templates specific to Capr-PHEMS are maintained by Guus Wilmink From 7deeb04b9e5af44db72cb2b6ddccc39f670cf446 Mon Sep 17 00:00:00 2001 From: LP-Glueck Date: Thu, 18 Jul 2024 10:28:08 +0200 Subject: [PATCH 062/130] Addressing PR comments --- project/R/conceptSets.R | 15 ++-- .../phems_variable_list/5.15_vital_signs.csv | 4 +- .../phems_variable_list/5.17_hsjd_surgery.csv | 4 +- .../5.18_hsjd_hospitalisation.csv | 3 +- .../5.29_uc3_lab_measurements.csv | 72 +++++++++---------- .../phems_variable_list/5.31_uc3_surgery.csv | 14 ++-- 6 files changed, 55 insertions(+), 57 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 1df369ec..09f0053e 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -85,7 +85,7 @@ conceptSets <- list( 3024171, # source: Age-dependent RR /// concept: Respiratory rate 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure - 4096101 # source: SpO2 /// concept: Measurement of oxygen saturation at periphery + 4020553 # source: SpO2 /// concept: Oxygen saturation measurement ), HSJDClinical = c( @@ -100,7 +100,7 @@ conceptSets <- list( 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure 4336464, # source: Cardiac bypass start datetime, end datetime /// concept: Coronary artery bypass graft 4201547, # source: Cross-clamping start datetime, end datetime /// concept: Placement of arterial cross clamp - 44790138, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Induced circulatory arrest + 37152781, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Hypothermic circulatory arrest 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation 4150627 # source: Extubation event /// concept: Removal of endotracheal tube ), @@ -108,13 +108,12 @@ conceptSets <- list( HSJDHospitalisation = c( 44803020, # source: Admission reason /// concept: Primary reason for admission 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug - 794078, # source: Dose of vasoactive infusion (rate - mcg/kg/hr) /// concept: vasoactive intestinal peptide 4179206, # source: Postop central venous catheter in/start datetime, out/end datetime /// concept: Central venous catheter 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation ), - HSJDcomlications = c( + HSJDcomplications = c( 4202832, # source: intubation /// concept: Intubation 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart 4044892, # source: Sternum reopening (procedure undertaken) /// concept: Procedure on sternum @@ -158,7 +157,7 @@ conceptSets <- list( 3042349, # source: Von Willebrand factor propeptide measurement /// concept: von Willebrand factor (vWf) cleaving protease inhibitor [Units/volume] in platelet poor plasma 4175016, # source: activated partial thromboplastin time (APTT) /// concept: partial thromboplastin time, activated 3034426, # source: Prothrombin time (PT) /// concept: prothrombin time (PT) - 37393863, # source: platelet count /// concept: platelet count + 4267147, # source: platelet count /// concept: platelet count 3009542, # source: hematocrit /// concept: Hematocrit [Volume Fraction] of Blood 3016407, # source: fibrinogen /// concept: fibrinogen [mass/volume] in platelet poor plasma by coagulation assay 3006923, # source: ALT /// concept: alanine aminotransferase [enzymatic activity/volume] in serum or plasma @@ -179,12 +178,12 @@ conceptSets <- list( ), UC3Surgery = c( - 45888085, # source: Medical/ surgical procedure /// concept: medical procedure + 4172515, # source: Medical/ surgical procedure /// concept: Therapeutic procedure 967823, # source: NaCl administration during surgery /// concept: sodium chloride 4028665, # source: plasma administration during surgery /// concept: plasma transfusion - 45888867, # source: datetime start anesthesia /// concept: anesthesia + 4160439, # source: datetime start anesthesia /// concept: Administration of anesthesia 4308716, # source: blood loss during surgery /// concept: intraoperative hemorrhage - 37017589 # source: blood transfusion during surgery /// concept: bleeding during medical procedure requiring transfusion + 37017589 # source: blood transfusion during surgery /// concept: Bleeding during surgery requiring transfusion ) ) ) diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv index 618f3d90..c5553042 100644 --- a/project/data/phems_variable_list/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/5.15_vital_signs.csv @@ -1,4 +1,4 @@ -sourceCode,concept_id +sourceCode,concept_id Age-dependent HR ,4239408  Age-dependent HR ,8483  Age-dependent RR ,4313591  @@ -7,7 +7,7 @@ SBP (Systolic Blood Pressure) ,4152194  SBP (Systolic Blood Pressure) ,8876  DBP (Dyastolic Blood Pressure) ,4154790  DBP (Dyastolic Blood Pressure) ,8876  -SpO2 ,4096101  +SpO2 ,4020553  SpO2 ,8554  , , diff --git a/project/data/phems_variable_list/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/5.17_hsjd_surgery.csv index d2b96f79..d61a88c7 100644 --- a/project/data/phems_variable_list/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/5.17_hsjd_surgery.csv @@ -1,10 +1,10 @@ -sourceCode,concept_id +sourceCode,concept_id Aristotle's score of surgery ,0  STAT/EACTS score of surgery ,40490494  "Surgery start datetime, end datetime ",4301351  "Cardiac bypass start datetime, end datetime ",4336464  "Cross-clamping start datetime, end datetime ",4201547  -"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138  +"Deep hypothermic circulatory arrest start datetime, end datetime ",37152781  "Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  Extubation event ,4150627  , diff --git a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv index 0a45b71a..52bdcade 100644 --- a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv @@ -1,9 +1,8 @@ -sourceCode,concept_id +sourceCode,concept_id Admission reason ,44803020  ventilation ,0  "Vasoactive infusion start datetime, end datetime ",42539650  Type of vasoactive infusion ,0  -Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078  VIS score of vasoactive infusion ,0  "Postop central venous catheter in/start datetime, out/ end datetime ",4179206  "Total ventilation start datetime, end datetime ",0  diff --git a/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv b/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv index f3a8985c..6b129df7 100644 --- a/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv +++ b/project/data/phems_variable_list/5.29_uc3_lab_measurements.csv @@ -1,37 +1,37 @@ -sourceCode,concept_id -factor VIII inhibitor titer,3024942 -factor VIII inhibitor titer,44777562 -factor VIII activity measurement,3022520 -factor VIII activity measurement,3011832 -factor VIII activity measurement,8985 -factor VIII activity measurement,9332 -factor VIII activity measurement,8554 -Von Willebrand factor activity measurement,43534000 -Von Willebrand factor activity measurement,8985 -Von Willebrand factor activity measurement,9332 -Von Willebrand factor activity measurement,8554 -Von Willebrand factor antigen measurement,3002124 -Von Willebrand factor antigen measurement,8985 -Von Willebrand factor antigen measurement,9332 -Von Willebrand factor antigen measurement,8554 -Von Willebrand factor propeptide measurement,3023693 -Von Willebrand factor propeptide measurement,3042349 -Von Willebrand factor propeptide measurement,8763 -activated partial thromboplastin time (APTT),4175016 -activated partial thromboplastin time (APTT),8555 -activated partial thromboplastin time (APTT),8523 -Prothrombin time (PT),3034426 -Prothrombin time (PT),8555 -Prothrombin time (PT),8523 -Prothrombin time (PT),8554 -platelet count,37393863 -platelet count,44777588 -hematocrit,3009542 -hematocrit,44777604 -hematocrit,8554 -fibrinogen,3016407 -fibrinogen,8636 -ALT,3006923 -ALT,8645 -AST,3013721 +sourceCode,concept_id +factor VIII inhibitor titer,3024942 +factor VIII inhibitor titer,44777562 +factor VIII activity measurement,3022520 +factor VIII activity measurement,3011832 +factor VIII activity measurement,8985 +factor VIII activity measurement,9332 +factor VIII activity measurement,8554 +Von Willebrand factor activity measurement,43534000 +Von Willebrand factor activity measurement,8985 +Von Willebrand factor activity measurement,9332 +Von Willebrand factor activity measurement,8554 +Von Willebrand factor antigen measurement,3002124 +Von Willebrand factor antigen measurement,8985 +Von Willebrand factor antigen measurement,9332 +Von Willebrand factor antigen measurement,8554 +Von Willebrand factor propeptide measurement,3023693 +Von Willebrand factor propeptide measurement,3042349 +Von Willebrand factor propeptide measurement,8763 +activated partial thromboplastin time (APTT),4175016 +activated partial thromboplastin time (APTT),8555 +activated partial thromboplastin time (APTT),8523 +Prothrombin time (PT),3034426 +Prothrombin time (PT),8555 +Prothrombin time (PT),8523 +Prothrombin time (PT),8554 +platelet count,4267147 +platelet count,44777588 +hematocrit,3009542 +hematocrit,44777604 +hematocrit,8554 +fibrinogen,3016407 +fibrinogen,8636 +ALT,3006923 +ALT,8645 +AST,3013721 AST,8645 \ No newline at end of file diff --git a/project/data/phems_variable_list/5.31_uc3_surgery.csv b/project/data/phems_variable_list/5.31_uc3_surgery.csv index a39c6a97..de3ce952 100644 --- a/project/data/phems_variable_list/5.31_uc3_surgery.csv +++ b/project/data/phems_variable_list/5.31_uc3_surgery.csv @@ -1,8 +1,8 @@ -sourceCode,concept_id -Medical/ surgical procedure,45888085 -NaCl administration during surgery,967823 -NaCl administration during surgery,8587 -plasma administration during surgery,4028665 -datetime start anesthesia,45888867 -blood loss during surgery,4308716 +sourceCode,concept_id +Medical/ surgical procedure,4172515 +NaCl administration during surgery,967823 +NaCl administration during surgery,8587 +plasma administration during surgery,4028665 +datetime start anesthesia,4160439 +blood loss during surgery,4308716 blood transfusion during surgery,37017589 \ No newline at end of file From b544f501b14ea50ea463686fbb54518d66756fdf Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 18 Jul 2024 16:36:02 +0200 Subject: [PATCH 063/130] update config --- inst/config/config-sample.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inst/config/config-sample.yml b/inst/config/config-sample.yml index 7f86b8f0..8ba8bf95 100644 --- a/inst/config/config-sample.yml +++ b/inst/config/config-sample.yml @@ -1,8 +1,10 @@ --- default: - conceptsPath: null - savePath: null # (optional) if saving standard concept check results + concepts_path: null # required for isStandard() function; specifies path to concept list directory with sourceCode and concept_id + save_path_isStandard: null # (optional) if saving standard concept check results + save_path_json: null # (optional) if saving cohort and/or concept set as json) config: - conceptsPath: '' - savaPath: '' \ No newline at end of file + concepts_path: '' + save_path_isStandard: '' + save_path_json: '' \ No newline at end of file From 7ed872791ab06382745cb4675c86e2c268326083 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 18 Jul 2024 16:37:09 +0200 Subject: [PATCH 064/130] update config --- inst/config/connection_config-sample.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/inst/config/connection_config-sample.yml b/inst/config/connection_config-sample.yml index d93c7035..b4222ff8 100644 --- a/inst/config/connection_config-sample.yml +++ b/inst/config/connection_config-sample.yml @@ -10,6 +10,9 @@ default: port: null oracleDriver: null pathToDriver: null + cdm_schema: null + vocabulary_schema: null + cohort_schema: null ## Connection details # Replace with your connection details @@ -17,11 +20,16 @@ default: # see the function documentation for more information # Please check carefully which details are required for your dbms # as not all of these details may be required. -connectionDetails: - dbms: 'postgresql' - user: 'postgres' - password: 'postgres' - server: 'host/database' +# cdm_schema should point to the OMOP CDM schema +# vocabulary_schema should point to the schema where the vocabulary tables are stored +config: + dbms: '' + user: '' + password: '' + server: '' port: 5432 oracleDriver: null - pathToDriver: './drivers/jdbc/' \ No newline at end of file + pathToDriver: '' + cdm_schema: '' + vocabulary_schema: '' + cohort_schema: '' \ No newline at end of file From a07956306138f1a88abe5fcd6d9dfead5c8e0cce Mon Sep 17 00:00:00 2001 From: LP-Glueck Date: Thu, 18 Jul 2024 17:10:29 +0200 Subject: [PATCH 065/130] Updated drug concepts for concepts sets and variable list --- project/R/conceptSets.R | 8 +-- .../5.30_uc3_treatments.csv | 53 ++++++++++++++----- 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 09f0053e..bf4aaf11 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -165,16 +165,12 @@ conceptSets <- list( ), UC3Treatments = c( - 35766745, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Advate] - 21154209, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Kogenate Bayer] - 35831239, # source: factor VIII /// concept: factor VIII 250 UNT Injection [Eloctate] - 40745282, # source: factor VIII /// concept: emicizumab 150 MG/ML Injectable Solution [Hemlibra] + 1352213, # source: factor VIII /// concept: factor VIII (umbrella term) + 793042, # source: factor VIII /// concept: emicizumab (umbrella term) 40492862, # source: factor VIII dose is continuous infusion or bolus dose /// concept: mode of drug administration 4129275, # source: factor VIII dose is continuous infusion or bolus dose /// concept: continuous infusion 4265597, # source: factor VIII dose is continuous infusion or bolus dose /// concept: by bolus infusions 1517070 # source: desmopressin /// concept: desmopressin - # TODO FIGURE OUT IF DESCENDENTS WORK WITH THESE CONCEPTS - # TODO MAP REMAINING DRUG BRANDS ), UC3Surgery = c( diff --git a/project/data/phems_variable_list/5.30_uc3_treatments.csv b/project/data/phems_variable_list/5.30_uc3_treatments.csv index 21db41c1..72541184 100644 --- a/project/data/phems_variable_list/5.30_uc3_treatments.csv +++ b/project/data/phems_variable_list/5.30_uc3_treatments.csv @@ -1,13 +1,42 @@ -sourceCode,concept_id -factor VIII,35766745 -factor VIII,21154209 -factor VIII,35831239 -factor VIII,40745282 -factor VIII,8985 -factor VIII dose is continuous infusion or bolus dose,40492862 -"factor VIII dose is continuous infusion or bolus dose,4129275",4129275 -factor VIII dose is continuous infusion or bolus dose,4265597 -desmopressin,1517070 -desmopressin,9655 -desmopressin,8576 +sourceCode,concept_id +factor VIII,35766745 +factor VIII,35771058 +factor VIII,35754324 +factor VIII,35758435 +factor VIII,35771055 +factor VIII,43515206 +factor VIII,35762625 +factor VIII,21154209 +factor VIII,21085384 +factor VIII,21075681 +factor VIII,21124454 +factor VIII,21095190 +factor VIII,2061062 +factor VIII,2061050 +factor VIII,2061030 +factor VIII,2061007 +factor VIII,2061102 +factor VIII,35771458 +factor VIII,35758810 +factor VIII,35758809 +factor VIII,35754712 +factor VIII,2923922 +factor VIII,43290877 +factor VIII,2923914 +factor VIII,43269176 +factor VIII,2923932 +factor VIII,43263693 +factor VIII,2923927 +factor VIII,43258267 +factor VIII,40745282 +factor VIII,43026972 +factor VIII,40745288 +factor VIII,43026968 +factor VIII,8985 +factor VIII dose is continuous infusion or bolus dose,40492862 +factor VIII dose is continuous infusion or bolus dose,4129275 +factor VIII dose is continuous infusion or bolus dose,4265597 +desmopressin,1517070 +desmopressin,9655 +desmopressin,8576 desmopressin,9662 \ No newline at end of file From 5c092a1ac00a5377d85aa3651c8e3703846ec88d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 09:49:35 +0200 Subject: [PATCH 066/130] move files --- {R => inst/templates}/cohortCapr.R | 19 ++++++++++++++----- {R => inst/templates}/cohortCapr_md.Rmd | 19 ++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) rename {R => inst/templates}/cohortCapr.R (92%) rename {R => inst/templates}/cohortCapr_md.Rmd (87%) diff --git a/R/cohortCapr.R b/inst/templates/cohortCapr.R similarity index 92% rename from R/cohortCapr.R rename to inst/templates/cohortCapr.R index 3e845111..e9aefe7b 100644 --- a/R/cohortCapr.R +++ b/inst/templates/cohortCapr.R @@ -1,10 +1,10 @@ ## ----knitr, include=FALSE------------------------------------------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) -knitr::purl( - input = './R/cohortCapr_md.Rmd', - output = './R/cohortCapr.R' -) +# knitr::purl( +# input = './R/cohortCapr_md.Rmd', +# output = './R/cohortCapr.R' +# ) ## ----Get project configurations------------------------------------------------------------------------------ @@ -12,6 +12,15 @@ connectionConfig <- config::get(config = 'config', file = './inst/config/connect config_oth <- config::get(config = 'config', file = './inst/config/config.yml') +## ----Load libraries------------------------------------------------------------------------------------------ +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + ## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------------------ # Use connection details from configuration connectionDetails <- createConnectionDetails( @@ -156,7 +165,7 @@ ch <- cohort( ## Cohort json and sql # Generate json for cohort chJson <- ch %>% - toCirce() %>% + Capr::toCirce() %>% jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% as.character() diff --git a/R/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd similarity index 87% rename from R/cohortCapr_md.Rmd rename to inst/templates/cohortCapr_md.Rmd index 7f69dd50..68468467 100644 --- a/R/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -2,15 +2,17 @@ title: "cohortCapr markdown" author: "Guus @TheHyve" date: "2024-07-17" -output: html_document +output: pdf_document --- ## Set-up knitr ```{r knitr, include=FALSE} +knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) + knitr::opts_chunk$set(echo = TRUE) # knitr::purl( -# input = './R/cohortCapr_md.Rmd', -# output = './R/cohortCapr.R' +# input = './inst/templates/cohortCapr_md.Rmd', +# output = './inst/templates/cohortCapr.R' # ) ``` @@ -92,6 +94,9 @@ disconnect(con) ``` ## Standard and non-standard concepts given a list of concept IDs +To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function +can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. +See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. ```{r Standard non-standard check} # Connect to DB con <- connect(connectionDetails) @@ -110,8 +115,11 @@ disconnect(con) # Print all non-standard concepts nonStandard + ``` + ## Standard and non-standard concepts given a concept set +Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. ```{r Standard non-standard check concept set} # connect to DB con <- connect(connectionDetails) @@ -124,6 +132,7 @@ source('./R/isStandardCS.R') nonStandardCS <- isStandardCS( db_connection = con, conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) save_path = config_oth$save_path_isStandard ) @@ -141,7 +150,7 @@ any of the lab test measurements limit to first/earliest occurrence of any of the above measurements (+descendants) per person ```{r Cohort definition} ## Cohort definition -# Create cohort definition +# Example cohort definition ch <- cohort( entry = entry( # enter patients who have had a lab test @@ -186,7 +195,7 @@ ch <- cohort( ## Cohort json and sql # Generate json for cohort chJson <- ch %>% - toCirce() %>% + Capr::toCirce() %>% jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% as.character() From 75c3dbe94035f22486c0bf1235b5e17465d9bb34 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 10:12:17 +0200 Subject: [PATCH 067/130] small code updates --- R/collectCodesetId.R | 631 +++++++++++++++--------------- R/conceptSets.R | 205 +++++----- R/isStandard.R | 11 +- R/isStandardCS.R | 12 +- R/table_linked_to_concept_field.R | 33 +- 5 files changed, 468 insertions(+), 424 deletions(-) diff --git a/R/collectCodesetId.R b/R/collectCodesetId.R index 13ceadf6..f1f9ec49 100644 --- a/R/collectCodesetId.R +++ b/R/collectCodesetId.R @@ -1,315 +1,316 @@ -# Utilities --------------- -getGuid <- function(x) { - tibble::tibble( - guid = x@conceptSet@id - ) -} - -replaceGuid <- function(x, y) { - x@conceptSet@id <- y - return(x) -} - - -# Collect Guid -------------------------- - -setGeneric("collectGuid", function(x) standardGeneric("collectGuid")) - - -# setMethod("collectGuid", "Query", function(x) { -# getGuid(x) -# }) -# -# setMethod("collectGuid", "nestedAttribute", function(x) { -# collectGuid(x@group) -# }) - -#' @include query.R -setMethod("collectGuid", "Query", function(x) { - ids <- getGuid(x) - - #collect guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - id2 <- collectGuid(x@attributes[[ii]]@group) %>% - purrr::flatten() - - ids <- dplyr::bind_rows(ids, id2) - } - return(ids) - -}) - -#' @include criteria.R -setMethod("collectGuid", "Criteria", function(x) { - collectGuid(x@query) -}) - -#' @include criteria.R -setMethod("collectGuid", "Group", function(x) { - purrr::map(x@criteria, ~collectGuid(.x)) %>% - append(purrr::map(x@group, ~collectGuid(.x))) -}) - - - -setMethod("collectGuid", "CohortEntry", function(x) { - purrr::map(x@entryEvents, ~collectGuid(.x)) %>% - append(collectGuid(x@additionalCriteria)) - #TODO may need a flatten here with additional criteria -}) - -setMethod("collectGuid", "CohortAttrition", function(x) { - purrr::map(unname(x@rules), ~collectGuid(.x)) %>% - purrr::flatten() -}) - -setMethod("collectGuid", "CohortExit", function(x) { - #check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - #get concept sets from drug exit - ll <- list(getGuid(x@endStrategy)) - } else { - ll <- list() - } - append(ll, purrr::map(x@censoringCriteria@criteria, ~collectGuid(.x))) - -}) - -setMethod("collectGuid", "Cohort", function(x) { - - collectGuid(x@entry) %>% - append(collectGuid(x@attrition)) %>% - append(collectGuid(x@exit)) %>% - unlist() %>% - unname() %>% - unique() %>% - tibble::tibble(guid = .) %>% - dplyr::mutate( - codesetId = dplyr::row_number() - 1, - codesetId = as.integer(.data$codesetId) - ) - -}) - -# Replace CodesetId ----------------------- -## TODO HASH table implementation of find/replace -setGeneric("replaceCodesetId", function(x, guidTable) standardGeneric("replaceCodesetId")) - - -setMethod("replaceCodesetId", "Query", function(x, guidTable) { - - y <- getGuid(x) %>% - dplyr::inner_join(guidTable, by = c("guid")) %>% - dplyr::pull(.data$codesetId) - #first replace the query id - x <- replaceGuid(x, y) - - #next check for any nested criteria and replace - #replace guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - nest <- replaceCodesetId(x@attributes[[ii]]@group, guidTable) - - x@attributes[[ii]]@group <- nest - } - - return(x) -}) - -setMethod("replaceCodesetId", "DrugExposureExit", function(x, guidTable) { - - y <- getGuid(x) %>% - dplyr::inner_join(guidTable, by = c("guid")) %>% - dplyr::pull(.data$codesetId) - - x <- replaceGuid(x, y) - - return(x) -}) - - - -setMethod("replaceCodesetId", "Criteria", function(x, guidTable) { - - x@query <- replaceCodesetId(x@query, guidTable = guidTable) - - return(x) -}) - - -setMethod("replaceCodesetId", "Group", function(x, guidTable) { - crit <- purrr::map(x@criteria, ~replaceCodesetId(.x, guidTable)) - grp <- purrr::map(x@group, ~replaceCodesetId(.x, guidTable)) - - x@criteria <- crit - x@group <- grp - - return(x) -}) - - -setMethod("replaceCodesetId", "CohortEntry", function(x, guidTable) { - pc <- purrr::map(x@entryEvents, ~replaceCodesetId(.x, guidTable)) - ac <- replaceCodesetId(x@additionalCriteria, guidTable) - - x@entryEvents <- pc - x@additionalCriteria <- ac - return(x) - -}) - -setMethod("replaceCodesetId", "CohortAttrition", function(x, guidTable = guidTable) { - irs <- purrr::map(x@rules, ~replaceCodesetId(.x, guidTable)) - x@rules <- irs - return(x) -}) - - -setMethod("replaceCodesetId", "CohortExit", function(x, guidTable = guidTable) { - #check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - #get concept sets from drug exit - es <- replaceCodesetId(x@endStrategy, guidTable = guidTable) - x@endStrategy <- es - } - # Censoring Events replace - cen <- purrr::map(x@censoringCriteria@criteria, ~replaceCodesetId(.x, guidTable)) - x@censoringCriteria@criteria <- cen - return(x) - -}) - - -setMethod("replaceCodesetId", "Cohort", function(x, guidTable = guidTable) { - - x@entry <- replaceCodesetId(x@entry, guidTable = guidTable) - x@attrition <- replaceCodesetId(x@attrition, guidTable = guidTable) - x@exit <- replaceCodesetId(x@exit, guidTable = guidTable) - - return(x) -}) - -# list Concept Set ------------------ - -setGeneric("listConceptSets", function(x) standardGeneric("listConceptSets")) - -#' @include query.R -setMethod("listConceptSets", "Query", function(x) { - qs <- as.list(x@conceptSet) - - # handle listing concepts if have nestedAttribute - #next check for any nested criteria and replace - #replace guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - nest <- listConceptSets(x@attributes[[ii]]@group) - out <- c(list(qs), nest) - } else { - out <- list(qs) - } - - return(out) -}) - -#' @include criteria.R -setMethod("listConceptSets", "Criteria", function(x) { - listConceptSets(x@query) -}) - -check_names <- function(x) { - check <- names(x) %in% c("id", "name", "expression") - if (length(check) == 0) { - FALSE - } else{ - all(check) - } -} - -#' @include criteria.R -setMethod("listConceptSets", "Group", function(x) { - - #Start with criteria - a <- purrr::map(x@criteria, ~listConceptSets(.x)) - if (length(a) == 0) { - ll1 <- list() - } else { - la1 <- purrr::keep(a, ~check_names(.x)) - la2 <- purrr::discard(a, ~check_names(.x)) - if (length(la2) > 0) { - la2 <- purrr::list_flatten(la2) - } - - ll1 <- c(la1, la2) - } - - # Next Group - b <- purrr::map(x@group, ~listConceptSets(.x)) - if (length(b) == 0) { - ll2 <- list() - } else { - lb1 <- purrr::keep(b, ~check_names(.x)) - lb2 <- purrr::discard(b, ~check_names(.x)) - if (length(lb2) > 0) { - lb2 <- purrr::list_flatten(lb2) - } - - ll2 <- c(lb1, lb2) - } - - c(ll1, ll2) -}) - -setMethod("listConceptSets", "CohortEntry", function(x) { - - ce <- purrr::map(x@entryEvents, ~listConceptSets(.x)) - check <- purrr::map_int(ce, ~length(.x)) - if (!all(check == 3)) { - ce <- ce %>% - purrr::flatten() - } - - ce %>% - append(listConceptSets(x@additionalCriteria)) - # TODO may need a flatten here with additional criteria -}) - -setMethod("listConceptSets", "CohortAttrition", function(x) { - purrr::map(unname(x@rules), ~listConceptSets(.x)) %>% - purrr::list_flatten() -}) - -setMethod("listConceptSets", "CohortExit", function(x) { - # check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - # get concept sets from drug exit - ll <- list(as.list(x@endStrategy@conceptSet)) - } else { - ll <- list() - } - # get concept sets from censoring criteria - ll2 <- purrr::map(x@censoringCriteria@criteria, - ~listConceptSets(.x) %>% - purrr::flatten()) - - res <- append(ll, ll2) - return(res) -}) - -setMethod("listConceptSets", "Cohort", function(x) { - l1 <- listConceptSets(x@entry) - l2 <- listConceptSets(x@attrition) - l3 <- listConceptSets(x@exit) - ll <- c(l1, l2, l3) - - ids <- purrr::map_chr(ll, ~as.character(.x$id)) - - rr <- ll[!duplicated(ids)] - return(rr) -}) +# Utilities --------------- +getGuid <- function(x) { + tibble::tibble( + guid = x@conceptSet@id + ) +} + +replaceGuid <- function(x, y) { + x@conceptSet@id <- y + return(x) +} + + +# Collect Guid -------------------------- + +setGeneric("collectGuid", function(x) standardGeneric("collectGuid")) + + +# setMethod("collectGuid", "Query", function(x) { +# getGuid(x) +# }) +# +# setMethod("collectGuid", "nestedAttribute", function(x) { +# collectGuid(x@group) +# }) + +#' @include query.R +#' @export +setMethod("collectGuid", "Query", function(x) { + ids <- getGuid(x) + + #collect guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + id2 <- collectGuid(x@attributes[[ii]]@group) %>% + purrr::flatten() + + ids <- dplyr::bind_rows(ids, id2) + } + return(ids) + +}) + +#' @include criteria.R +setMethod("collectGuid", "Criteria", function(x) { + collectGuid(x@query) +}) + +#' @include criteria.R +setMethod("collectGuid", "Group", function(x) { + purrr::map(x@criteria, ~collectGuid(.x)) %>% + append(purrr::map(x@group, ~collectGuid(.x))) +}) + + + +setMethod("collectGuid", "CohortEntry", function(x) { + purrr::map(x@entryEvents, ~collectGuid(.x)) %>% + append(collectGuid(x@additionalCriteria)) + #TODO may need a flatten here with additional criteria +}) + +setMethod("collectGuid", "CohortAttrition", function(x) { + purrr::map(unname(x@rules), ~collectGuid(.x)) %>% + purrr::flatten() +}) + +setMethod("collectGuid", "CohortExit", function(x) { + #check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + #get concept sets from drug exit + ll <- list(getGuid(x@endStrategy)) + } else { + ll <- list() + } + append(ll, purrr::map(x@censoringCriteria@criteria, ~collectGuid(.x))) + +}) + +setMethod("collectGuid", "Cohort", function(x) { + + collectGuid(x@entry) %>% + append(collectGuid(x@attrition)) %>% + append(collectGuid(x@exit)) %>% + unlist() %>% + unname() %>% + unique() %>% + tibble::tibble(guid = .) %>% + dplyr::mutate( + codesetId = dplyr::row_number() - 1, + codesetId = as.integer(.data$codesetId) + ) + +}) + +# Replace CodesetId ----------------------- +## TODO HASH table implementation of find/replace +setGeneric("replaceCodesetId", function(x, guidTable) standardGeneric("replaceCodesetId")) + + +setMethod("replaceCodesetId", "Query", function(x, guidTable) { + + y <- getGuid(x) %>% + dplyr::inner_join(guidTable, by = c("guid")) %>% + dplyr::pull(.data$codesetId) + #first replace the query id + x <- replaceGuid(x, y) + + #next check for any nested criteria and replace + #replace guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + nest <- replaceCodesetId(x@attributes[[ii]]@group, guidTable) + + x@attributes[[ii]]@group <- nest + } + + return(x) +}) + +setMethod("replaceCodesetId", "DrugExposureExit", function(x, guidTable) { + + y <- getGuid(x) %>% + dplyr::inner_join(guidTable, by = c("guid")) %>% + dplyr::pull(.data$codesetId) + + x <- replaceGuid(x, y) + + return(x) +}) + + + +setMethod("replaceCodesetId", "Criteria", function(x, guidTable) { + + x@query <- replaceCodesetId(x@query, guidTable = guidTable) + + return(x) +}) + + +setMethod("replaceCodesetId", "Group", function(x, guidTable) { + crit <- purrr::map(x@criteria, ~replaceCodesetId(.x, guidTable)) + grp <- purrr::map(x@group, ~replaceCodesetId(.x, guidTable)) + + x@criteria <- crit + x@group <- grp + + return(x) +}) + + +setMethod("replaceCodesetId", "CohortEntry", function(x, guidTable) { + pc <- purrr::map(x@entryEvents, ~replaceCodesetId(.x, guidTable)) + ac <- replaceCodesetId(x@additionalCriteria, guidTable) + + x@entryEvents <- pc + x@additionalCriteria <- ac + return(x) + +}) + +setMethod("replaceCodesetId", "CohortAttrition", function(x, guidTable = guidTable) { + irs <- purrr::map(x@rules, ~replaceCodesetId(.x, guidTable)) + x@rules <- irs + return(x) +}) + + +setMethod("replaceCodesetId", "CohortExit", function(x, guidTable = guidTable) { + #check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + #get concept sets from drug exit + es <- replaceCodesetId(x@endStrategy, guidTable = guidTable) + x@endStrategy <- es + } + # Censoring Events replace + cen <- purrr::map(x@censoringCriteria@criteria, ~replaceCodesetId(.x, guidTable)) + x@censoringCriteria@criteria <- cen + return(x) + +}) + + +setMethod("replaceCodesetId", "Cohort", function(x, guidTable = guidTable) { + + x@entry <- replaceCodesetId(x@entry, guidTable = guidTable) + x@attrition <- replaceCodesetId(x@attrition, guidTable = guidTable) + x@exit <- replaceCodesetId(x@exit, guidTable = guidTable) + + return(x) +}) + +# list Concept Set ------------------ + +setGeneric("listConceptSets", function(x) standardGeneric("listConceptSets")) + +#' @include query.R +setMethod("listConceptSets", "Query", function(x) { + qs <- as.list(x@conceptSet) + + # handle listing concepts if have nestedAttribute + #next check for any nested criteria and replace + #replace guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + nest <- listConceptSets(x@attributes[[ii]]@group) + out <- c(list(qs), nest) + } else { + out <- list(qs) + } + + return(out) +}) + +#' @include criteria.R +setMethod("listConceptSets", "Criteria", function(x) { + listConceptSets(x@query) +}) + +check_names <- function(x) { + check <- names(x) %in% c("id", "name", "expression") + if (length(check) == 0) { + FALSE + } else{ + all(check) + } +} + +#' @include criteria.R +setMethod("listConceptSets", "Group", function(x) { + + #Start with criteria + a <- purrr::map(x@criteria, ~listConceptSets(.x)) + if (length(a) == 0) { + ll1 <- list() + } else { + la1 <- purrr::keep(a, ~check_names(.x)) + la2 <- purrr::discard(a, ~check_names(.x)) + if (length(la2) > 0) { + la2 <- purrr::list_flatten(la2) + } + + ll1 <- c(la1, la2) + } + + # Next Group + b <- purrr::map(x@group, ~listConceptSets(.x)) + if (length(b) == 0) { + ll2 <- list() + } else { + lb1 <- purrr::keep(b, ~check_names(.x)) + lb2 <- purrr::discard(b, ~check_names(.x)) + if (length(lb2) > 0) { + lb2 <- purrr::list_flatten(lb2) + } + + ll2 <- c(lb1, lb2) + } + + c(ll1, ll2) +}) + +setMethod("listConceptSets", "CohortEntry", function(x) { + + ce <- purrr::map(x@entryEvents, ~listConceptSets(.x)) + check <- purrr::map_int(ce, ~length(.x)) + if (!all(check == 3)) { + ce <- ce %>% + purrr::flatten() + } + + ce %>% + append(listConceptSets(x@additionalCriteria)) + # TODO may need a flatten here with additional criteria +}) + +setMethod("listConceptSets", "CohortAttrition", function(x) { + purrr::map(unname(x@rules), ~listConceptSets(.x)) %>% + purrr::list_flatten() +}) + +setMethod("listConceptSets", "CohortExit", function(x) { + # check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + # get concept sets from drug exit + ll <- list(as.list(x@endStrategy@conceptSet)) + } else { + ll <- list() + } + # get concept sets from censoring criteria + ll2 <- purrr::map(x@censoringCriteria@criteria, + ~listConceptSets(.x) %>% + purrr::flatten()) + + res <- append(ll, ll2) + return(res) +}) + +setMethod("listConceptSets", "Cohort", function(x) { + l1 <- listConceptSets(x@entry) + l2 <- listConceptSets(x@attrition) + l3 <- listConceptSets(x@exit) + ll <- c(l1, l2, l3) + + ids <- purrr::map_chr(ll, ~as.character(.x$id)) + + rr <- ll[!duplicated(ids)] + return(rr) +}) diff --git a/R/conceptSets.R b/R/conceptSets.R index f2696a01..81f9b30f 100644 --- a/R/conceptSets.R +++ b/R/conceptSets.R @@ -1,101 +1,104 @@ -#' Medical Concept Sets Definition and Expansion -#' -#' This script defines and expands various concept sets related to medical data. It utilizes the Capr library to fetch all descendant concepts -#' for each defined concept set, ensuring comprehensive coverage of related medical concepts. -#' -#' @details The script initializes by defining multiple concept sets within a list structure. Each concept set contains unique identifiers for medical concepts, -#' which are expanded to include all descendant concepts using the Capr library's functionality. The expanded concept sets are then stored in a new list within -#' the `conceptSets` object. Finally, the script outputs a confirmation message indicating successful sourcing and expansion of concept sets. -#' -#' @note This script requires the Capr library to be installed and loaded for proper execution. - -library(Capr) - -## Define list of concepts to use for concept sets -conceptSets <- list( - concepts = list( - - # laboratory tests - labTests = c( # 5.13 - 4298431, # source: Immature WBC Count /// concept: White blood cell count - 3007670, # source: Neutrophil Count /// concept: Neutrophil Ab [Units/volume] in Serum - 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood - 37393863, # source: Platelet Count /// concept: Platelet count - 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood - 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) - 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood - 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood - 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma - 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma - 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma - 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma - 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma - 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood - 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood - 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood - 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma - 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma - 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma - 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 37392672, # source: pH (venous) /// concept: Blood venous pH - 37399161, # source: pH (arterial) /// concept: Blood arterial pH - 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood - 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood - 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood - 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood - 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood - 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood - ), - - # cardiac complications - cardiacComplications = c( - 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis - 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration - 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome - 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest - ), - - # intubation - intubation = c( - 4202832 # source: Intubation /// concept: Intubation - ), - - # cardiac procedures - cardiacProcedures = c( - 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery - 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart - 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit - 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit - 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit - 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve - 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve - 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis - 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve - 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection - 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot - 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus - 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery - 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection - 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect - 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve - 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle - 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery - 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction - 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta - 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum - 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm - 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta - 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta - 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart - ) - ) -) - -## Extend with descendants -conceptSets$conceptSets <- list() -for (cs in names(conceptSets$concepts)) { - conceptSets$conceptSets[[cs]] <- cs(descendants(conceptSets$concepts[[cs]]), name = cs) -} - -cat("Sourced concept sets") +#' @name conceptSets +#' @title Medical Concept Sets Definition and Expansion +#' +#' @description +#' This script defines and expands various concept sets related to medical data. It utilizes the Capr library to fetch all descendant concepts +#' for each defined concept set, ensuring comprehensive coverage of related medical concepts. +#' +#' @details The script initializes by defining multiple concept sets within a list structure. Each concept set contains unique identifiers for medical concepts, +#' which are expanded to include all descendant concepts using the Capr library's functionality. The expanded concept sets are then stored in a new list within +#' the `conceptSets` object. Finally, the script outputs a confirmation message indicating successful sourcing and expansion of concept sets. +#' +#' @note This script requires the Capr library to be installed and loaded for proper execution. +#' @export + +library(Capr) + +## Define list of concepts to use for concept sets +conceptSets <- list( + concepts = list( + + # laboratory tests + labTests = c( # 5.13 + 4298431, # source: Immature WBC Count /// concept: White blood cell count + 3007670, # source: Neutrophil Count /// concept: Neutrophil Ab [Units/volume] in Serum + 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood + 37393863, # source: Platelet Count /// concept: Platelet count + 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood + 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) + 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood + 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood + 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma + 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma + 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma + 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma + 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma + 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood + 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood + 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood + 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma + 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma + 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma + 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma + 37392672, # source: pH (venous) /// concept: Blood venous pH + 37399161, # source: pH (arterial) /// concept: Blood arterial pH + 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood + 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood + 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood + 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood + 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood + 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood + ), + + # cardiac complications + cardiacComplications = c( + 4324124, # source: LCOS - renal support (CVVH/ PD) concept1 /// concept: Peritoneal dialysis + 4051330, # source: LCOS - renal support (CVVH/ PD) concept2 /// concept: Continuous venovenous hemofiltration + 4185565, # source: LCOS - renal support (CVVH/ PD) concept3 /// concept: Low cardiac output syndrome + 321042 # source: LCOS - cardiac arrest /// concept: Cardiac arrest + ), + + # intubation + intubation = c( + 4202832 # source: Intubation /// concept: Intubation + ), + + # cardiac procedures + cardiacProcedures = c( + 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery + 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart + 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit + 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit + 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit + 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve + 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve + 4232476, # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis + 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve + 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection + 4019929, # source: Repair of tetralogy of fallot using transannular patch /// concept: Repair of tetralogy of Fallot + 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus + 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery + 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection + 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect + 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve + 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle + 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery + 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction + 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta + 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum + 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm + 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta + 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta + 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart + ) + ) +) + +## Extend with descendants +conceptSets$conceptSets <- list() +for (cs in names(conceptSets$concepts)) { + conceptSets$conceptSets[[cs]] <- cs(descendants(conceptSets$concepts[[cs]]), name = cs) +} + +cat("\nSourced concept sets\n") diff --git a/R/isStandard.R b/R/isStandard.R index 601ab46a..edf7537c 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -36,6 +36,7 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() + standardness <- c() # Get tables from data_concepts_path tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) @@ -62,12 +63,13 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { joined <- inner_join(concept_table, tb, by = "concept_id") # Add non-standard concept info to vectors - ind <- which(!(joined$standard_concept %in% c('S', 'C'))) + ind <- which(!(joined$standard_concept %in% c('S'))) nonStandard <- append(nonStandard, joined$concept_id[ind]) conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) sourceTableNonStandard <- append(sourceTableNonStandard, replicate(length(ind), table_name, simplify="vector")) + standardness <- append(standardness, joined$standard_concept[ind]) if (length(ind) == 0) { message("No non-standard concepts found in list of concepts: ", table_name) @@ -85,13 +87,16 @@ isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { message(paste("No matches found for concept set.\n")) } } - + + # NA == non-standard + standardness[is.na(standardness)] <- "Non-standard" # Create table of non-standard concepts res <- tibble::tibble( concept_id = nonStandard, concept_name = conceptNameNonStandard, source_code = sourceCodeNonStandard, - source_table = unlist(sourceTableNonStandard) + source_table = unlist(sourceTableNonStandard), + standardness = standardness ) message(paste0("Finished checking for non-standard concepts.\n", nrow(res), " non-standard concepts found across tables.")) diff --git a/R/isStandardCS.R b/R/isStandardCS.R index b22dd650..322109f9 100644 --- a/R/isStandardCS.R +++ b/R/isStandardCS.R @@ -25,6 +25,7 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() + standardness <- c() # Get concept set details cs <- conceptSet@Expression @@ -33,22 +34,25 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { concept_name = c() concept_id = c() concept_set = c() - standard = c() + standardness = c() for (concept in cs) { concept_name <- append(concept_name, concept@Concept@concept_name) concept_id <- append(concept_id, concept@Concept@concept_id) - standard <- append(standard, concept@Concept@standard_concept) + standardness <- append(standardness, concept@Concept@standard_concept) } cs_name <- conceptSet@Name concept_set <- rep.int(cs_name, length(concept_id)) + + # Replace NAs with non-standard + standardness[is.na(standardness)] <- "Non-standard" # Filter out standard and classification concepts; keep non-standard and NA df <- data.frame( concept_name, concept_id, concept_set, - standard + standardness ) # Save if not empty and save_path is provided @@ -63,7 +67,7 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { # NonStandard concepts - res <- df %>% filter(standard != "S" & standard != "C" | is.na(standard)) %>% tibble::tibble() + res <- df %>% filter(standardness != "S" | is.na(standardness)) %>% tibble::tibble() if (nrow(res) == 0) { message("No non-standard concepts found in concept set: ", cs_name) } else { diff --git a/R/table_linked_to_concept_field.R b/R/table_linked_to_concept_field.R index 9d858420..21e8ab84 100644 --- a/R/table_linked_to_concept_field.R +++ b/R/table_linked_to_concept_field.R @@ -1,4 +1,35 @@ -# Link table names to respective concept_id field +#' @name table_linked_to_concept_field +#' @title Link Table Names to Respective Concept ID Fields +#' +#' @description +#' This script creates a list mapping various table names to their respective +#' concept ID fields. This mapping is useful for dynamically referencing +#' concept IDs across different tables in a database schema, particularly +#' within the context of healthcare data where tables represent different +#' aspects of patient information (e.g., conditions, drug exposures). +#' +#' @details The `links` list object contains key-value pairs where each key is +#' a table name and the corresponding value is the name of the field that +#' contains the concept ID within that table. This object can be used to +#' programmatically access concept ID fields by table name. +#' +#' The following tables and their concept ID fields are included: +#' - `condition_occurrence`: `condition_concept_id` +#' - `death`: `cause_concept_id` +#' - `device_exposure`: `device_concept_id` +#' - `drug_exposure`: `drug_concept_id` +#' - `measurement`: `measurement_concept_id` +#' - `observation`: `observation_concept_id` +#' - `procedure_occurrence`: `procedure_concept_id` +#' - `specimen`: `specimen_concept_id` +#' - `visit_occurrence`: `visit_concept_id` +#' +#' @examples +#' # Access the concept ID field for the condition_occurrence table +#' concept_field <- links$condition_occurrence +#' print(concept_field) +#' +#' @export links <- list( condition_occurrence = "condition_concept_id", death = "cause_concept_id", From e22a7da7e90837dee13b1f9a350854af8875736d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 10:12:37 +0200 Subject: [PATCH 068/130] update config samples --- inst/config/config-sample.yml | 17 +++++++++++------ inst/config/connection_config-sample.yml | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/inst/config/config-sample.yml b/inst/config/config-sample.yml index 8ba8bf95..93cffcbf 100644 --- a/inst/config/config-sample.yml +++ b/inst/config/config-sample.yml @@ -1,10 +1,15 @@ --- +## Default configuration values +# Default values are necessary for the `config` CRAN library, not used in package otherwise +# No need to change these values default: - concepts_path: null # required for isStandard() function; specifies path to concept list directory with sourceCode and concept_id - save_path_isStandard: null # (optional) if saving standard concept check results - save_path_json: null # (optional) if saving cohort and/or concept set as json) + concepts_path: 'inst/extdata/phems_variable_list' # required for isStandard() function; specifies path to concept list directory with sourceCode and concept_id + save_path_isStandard: 'inst/extdata/phems_variable_list/is_standard' # (optional) if saving standard concept check results. Point to existing directory. + save_path_json: 'inst/extdata/json' # (optional) if saving cohort and/or concept set as json). Point to existing directory +## Paths for CSVs of concepts and saves +# Replace with your paths config: - concepts_path: '' - save_path_isStandard: '' - save_path_json: '' \ No newline at end of file + concepts_path: '' + save_path_isStandard: '' + save_path_json: '' \ No newline at end of file diff --git a/inst/config/connection_config-sample.yml b/inst/config/connection_config-sample.yml index b4222ff8..0e8a8f53 100644 --- a/inst/config/connection_config-sample.yml +++ b/inst/config/connection_config-sample.yml @@ -1,22 +1,22 @@ --- ## Default configuration values -# Necessary for config library, not used in R file -# No need to change these values +# Default values are necessary for the `config` CRAN library, not used in package otherwise +# No need to change these values; they are unused default: - dbms: null - user: null + dbms: 'postgres' + user: 'postgres' password: null - server: null - port: null + server: localhost/omop_db + port: 5432 oracleDriver: null - pathToDriver: null - cdm_schema: null - vocabulary_schema: null - cohort_schema: null + pathToDriver: '~/jdbc' + cdm_schema: 'cdm' + vocabulary_schema: 'vocab' + cohort_schema: 'cohort' ## Connection details # Replace with your connection details -# Used as input to DatabaseConnector::createConnectionDetails() +# Used primarily as input to DatabaseConnector::createConnectionDetails() # see the function documentation for more information # Please check carefully which details are required for your dbms # as not all of these details may be required. From c48e14881bde4feb028ab1e51fde5689c9eb8945 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 10:20:29 +0200 Subject: [PATCH 069/130] update docs --- man/Capr-PHEMS-package.Rd | 34 +++++++ man/Capr-package.Rd | 31 ------- man/conceptSets.Rd | 17 ++++ man/countOccurrences.Rd | 39 ++++++++ man/cs.Rd | 127 ++++++++++++++------------- man/isStandard.Rd | 31 +++++++ man/isStandardCS.Rd | 29 ++++++ man/table_linked_to_concept_field.Rd | 44 ++++++++++ 8 files changed, 260 insertions(+), 92 deletions(-) create mode 100644 man/Capr-PHEMS-package.Rd delete mode 100644 man/Capr-package.Rd create mode 100644 man/conceptSets.Rd create mode 100644 man/countOccurrences.Rd create mode 100644 man/isStandard.Rd create mode 100644 man/isStandardCS.Rd create mode 100644 man/table_linked_to_concept_field.Rd diff --git a/man/Capr-PHEMS-package.Rd b/man/Capr-PHEMS-package.Rd new file mode 100644 index 00000000..d31c3876 --- /dev/null +++ b/man/Capr-PHEMS-package.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/Capr.R +\docType{package} +\name{Capr-PHEMS-package} +\alias{Capr-PHEMS} +\alias{Capr-PHEMS-package} +\title{Capr-PHEMS: Cohort Definition Application Programming - project specific for PHEMS} +\description{ +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} + +Capr Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. For PHEMS this package has been extended with additional functions to support PHEMS cohort creation under the name Capr-PHEMS. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://ohdsi.github.io/Capr/} + \item \url{https://github.com/OHDSI/Capr/} + \item Report bugs at \url{https://github.com/OHDSI/Capr/issues/} + \item \url{https://thehyve.github.io/Capr-PHEMS/} +} + +} +\author{ +\strong{Maintainer}: Martin Lavallee (Capr) \email{martin.lavallee@boehringer-ingelheim.com} +\strong{Maintainer}: Guus Wilmink (Capr-PHEMS) \email{guus@thehyve.nl} +} + +Authors: +\itemize{ + \item Adam Black \email{black@ohdsi.org} + \item Guus Wilmink \email{guus@thehyve.nl} +} + +\keyword{internal} diff --git a/man/Capr-package.Rd b/man/Capr-package.Rd deleted file mode 100644 index f4dc5516..00000000 --- a/man/Capr-package.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Capr.R -\docType{package} -\name{Capr-package} -\alias{Capr} -\alias{Capr-package} -\title{Capr: Cohort Definition Application Programming} -\description{ -\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} - -Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. -} -\seealso{ -Useful links: -\itemize{ - \item \url{https://ohdsi.github.io/Capr/} - \item \url{https://github.com/OHDSI/Capr/} - \item Report bugs at \url{https://github.com/OHDSI/Capr/issues/} -} - -} -\author{ -\strong{Maintainer}: Martin Lavallee \email{martin.lavallee@boehringer-ingelheim.com} - -Authors: -\itemize{ - \item Adam Black \email{black@ohdsi.org} -} - -} -\keyword{internal} diff --git a/man/conceptSets.Rd b/man/conceptSets.Rd new file mode 100644 index 00000000..fbf9568a --- /dev/null +++ b/man/conceptSets.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/conceptSets.R +\name{conceptSets} +\alias{conceptSets} +\title{Medical Concept Sets Definition and Expansion} +\description{ +This script defines and expands various concept sets related to medical data. It utilizes the Capr library to fetch all descendant concepts +for each defined concept set, ensuring comprehensive coverage of related medical concepts. +} +\details{ +The script initializes by defining multiple concept sets within a list structure. Each concept set contains unique identifiers for medical concepts, +which are expanded to include all descendant concepts using the Capr library's functionality. The expanded concept sets are then stored in a new list within +the `conceptSets` object. Finally, the script outputs a confirmation message indicating successful sourcing and expansion of concept sets. +} +\note{ +This script requires the Capr library to be installed and loaded for proper execution. +} diff --git a/man/countOccurrences.Rd b/man/countOccurrences.Rd new file mode 100644 index 00000000..a7e8456d --- /dev/null +++ b/man/countOccurrences.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/countOccurrences.R +\name{countOccurrences} +\alias{countOccurrences} +\title{Count Occurrences of Values in Database Tables} +\usage{ +countOccurrences(v, tables, links, db_connection, schema) +} +\arguments{ +\item{v}{A vector of concept_ids to count occurrences for.} + +\item{tables}{A character vector of CDM table names to search within.} + +\item{links}{A list linking each table to its respective concept_id field.} + +\item{db_connection}{A database connection object through which queries will be executed.} + +\item{schema}{The database schema in which the tables are located.} +} +\value{ +A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, + direct count of records, descendant count of persons, and descendant count of records. + The tibble also includes the concept names derived from `v` and is arranged by the total + record count (direct + descendant). +} +\description{ +This function counts the occurrences of specified concept ids within specified tables in a OMOP database, +including direct occurrences and occurrences through descendants, based on a provided schema and links. +It returns a tibble summarizing the counts across persons and across records. +} +\examples{ +# Assuming `db_connection` is a valid database connection, `schema` is set to "public", +# `tables` contains the names of the tables to search, `links` defines the relevant fields, +# and `v` contains the values to search for: +results <- countOccurrences(v = c(1, 2), tables = c("observation", "condition_occurrence"), + links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), + db_connection = db_connection, schema = "public") + +} diff --git a/man/cs.Rd b/man/cs.Rd index 0f1e8a7c..cbc89be3 100644 --- a/man/cs.Rd +++ b/man/cs.Rd @@ -1,61 +1,66 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/conceptSet.R -\name{cs} -\alias{cs} -\alias{exclude} -\alias{mapped} -\alias{descendants} -\title{Create a concept set} -\usage{ -cs(..., name, id = NULL) - -exclude(...) - -mapped(...) - -descendants(...) -} -\arguments{ -\item{...}{One or more numeric vectors that can be coerced to integers, or -Calls to helper functions "exclude", "descendants", or "mapped".} - -\item{name}{A name for the concept set} - -\item{id}{An id for the concept set} -} -\value{ -A Capr Concept Set Object - -A list of Capr concepts - -A list of Capr concepts - -A list of Capr concepts -} -\description{ -cs is used to create concept set expressions. - -`exclude` is meant to be used inside `cs` when creating a new concept set. - -`mapped` is meant to be used inside `cs` when creating a new concept set. - -`descendants` is meant to be used inside `cs` when creating a new concept set. -} -\section{Functions}{ -\itemize{ -\item \code{exclude()}: exclude concepts - -\item \code{mapped()}: Include mapped concepts - -\item \code{descendants()}: Include descendants - -}} -\examples{ -cs(1, 2, name = "concepts") -cs(1, c(10, 11, 2), name = "concepts") -cs(1, seq(2, 10, 2), name = "concepts") -cs(1, 2, 3, exclude(4, 5), name = "concepts") -cs(1, 2, 3, exclude(4, 5), mapped(6, 7), name = "concepts") -cs(1, 2, 3, exclude(4, 5), mapped(6, 7), descendants(8, 9), name = "concepts") -cs(descendants(1, 2, 3), exclude(descendants(8, 9)), name = "concepts") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/conceptSet.R +\docType{data} +\name{cs} +\alias{cs} +\alias{exclude} +\alias{mapped} +\alias{descendants} +\title{Create a concept set} +\format{ +An object of class \code{character} of length 1. +} +\usage{ +cs + +exclude(...) + +mapped(...) + +descendants(...) +} +\arguments{ +\item{...}{One or more numeric vectors that can be coerced to integers, or +Calls to helper functions "exclude", "descendants", or "mapped".} + +\item{name}{A name for the concept set} + +\item{id}{An id for the concept set} +} +\value{ +A Capr Concept Set Object + +A list of Capr concepts + +A list of Capr concepts + +A list of Capr concepts +} +\description{ +cs is used to create concept set expressions. + +`exclude` is meant to be used inside `cs` when creating a new concept set. + +`mapped` is meant to be used inside `cs` when creating a new concept set. + +`descendants` is meant to be used inside `cs` when creating a new concept set. +} +\section{Functions}{ +\itemize{ +\item \code{exclude()}: exclude concepts + +\item \code{mapped()}: Include mapped concepts + +\item \code{descendants()}: Include descendants + +}} +\examples{ +cs(1, 2, name = "concepts") +cs(1, c(10, 11, 2), name = "concepts") +cs(1, seq(2, 10, 2), name = "concepts") +cs(1, 2, 3, exclude(4, 5), name = "concepts") +cs(1, 2, 3, exclude(4, 5), mapped(6, 7), name = "concepts") +cs(1, 2, 3, exclude(4, 5), mapped(6, 7), descendants(8, 9), name = "concepts") +cs(descendants(1, 2, 3), exclude(descendants(8, 9)), name = "concepts") +} +\keyword{datasets} diff --git a/man/isStandard.Rd b/man/isStandard.Rd new file mode 100644 index 00000000..e9941178 --- /dev/null +++ b/man/isStandard.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/isStandard.R +\name{isStandard} +\alias{isStandard} +\title{Check for Non-Standard Concepts in Database Tables} +\usage{ +isStandard(db_connection, data_concepts_path, save_path = NULL) +} +\arguments{ +\item{db_connection}{A DBI database connection object to the SQL database containing the standard concepts table.} + +\item{data_concepts_path}{The file path to the directory containing CSV files of tables to be checked against the standard concepts table. Each CSV file should contain at least the columns `sourceCode` and `concept_id`.} + +\item{save_path}{(Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts.} +} +\value{ +A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. +} +\description{ +This function examines a set of tables for non-standard concepts by comparing them against a standard concepts table in a SQL database. It identifies non-standard concepts and optionally saves the joined tables that contain these non-standard concepts. +} +\details{ +The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. + +If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. +} +\examples{ +# Assuming you have a valid DBI connection `db_conn` and your tables are located in "path/to/data_concepts": +non_standard_concepts <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") + +} diff --git a/man/isStandardCS.Rd b/man/isStandardCS.Rd new file mode 100644 index 00000000..4fb8a475 --- /dev/null +++ b/man/isStandardCS.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/isStandardCS.R +\name{isStandardCS} +\alias{isStandardCS} +\title{Check for Non-Standard Concepts in Concept Sets} +\usage{ +isStandardCS(db_connection, conceptSet, save_path = NULL) +} +\arguments{ +\item{db_connection}{A DBI database connection object to the SQL database containing the standard concepts table. This parameter is currently not used in the function but intended for future use where database queries might be necessary.} + +\item{conceptSet}{An object representing a set of concepts, containing details such as concept ID, concept name, and whether it is a standard concept. The structure of this object should support `@Expression` to access the individual concepts and their properties.} + +\item{save_path}{(Optional) The file path where the details of non-standard concepts should be saved as a CSV file. If not provided, the information will not be saved but will still be checked for non-standard concepts.} +} +\value{ +A tibble containing the columns `concept_name`, `concept_id`, `concept_set`, and `standard`, which represent the concept name, concept ID, the name of the concept set, and the standard status for each concept found to be non-standard or not classified as standard. +} +\description{ +This function examines a concept set for non-standard concepts by comparing them against a standard concepts table in a SQL database. It identifies non-standard concepts and optionally saves the details of these non-standard concepts to a specified path. +} +\details{ +The function processes a given concept set to identify non-standard concepts. Non-standard concepts are those not marked as 'S' (Standard) or 'C' (Classification) in their `standard_concept` attribute. The function creates a data frame with concept details, filters out standard and classification concepts, and if a `save_path` is provided, saves this information to a CSV file. If no non-standard concepts are found, appropriate messages are displayed. +} +\examples{ +# Assuming you have a concept set `conceptSet`: +non_standard_concepts <- isStandardCS(db_conn, conceptSet, "path/to/save_standard_AND_non_standard/") + +} diff --git a/man/table_linked_to_concept_field.Rd b/man/table_linked_to_concept_field.Rd new file mode 100644 index 00000000..6da32f4f --- /dev/null +++ b/man/table_linked_to_concept_field.Rd @@ -0,0 +1,44 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/table_linked_to_concept_field.R +\docType{data} +\name{table_linked_to_concept_field} +\alias{table_linked_to_concept_field} +\alias{links} +\title{Link Table Names to Respective Concept ID Fields} +\format{ +An object of class \code{list} of length 9. +} +\usage{ +links +} +\description{ +This script creates a list mapping various table names to their respective +concept ID fields. This mapping is useful for dynamically referencing +concept IDs across different tables in a database schema, particularly +within the context of healthcare data where tables represent different +aspects of patient information (e.g., conditions, drug exposures). +} +\details{ +The `links` list object contains key-value pairs where each key is +a table name and the corresponding value is the name of the field that +contains the concept ID within that table. This object can be used to +programmatically access concept ID fields by table name. + +The following tables and their concept ID fields are included: +- `condition_occurrence`: `condition_concept_id` +- `death`: `cause_concept_id` +- `device_exposure`: `device_concept_id` +- `drug_exposure`: `drug_concept_id` +- `measurement`: `measurement_concept_id` +- `observation`: `observation_concept_id` +- `procedure_occurrence`: `procedure_concept_id` +- `specimen`: `specimen_concept_id` +- `visit_occurrence`: `visit_concept_id` +} +\examples{ +# Access the concept ID field for the condition_occurrence table +concept_field <- links$condition_occurrence +print(concept_field) + +} +\keyword{datasets} From 52028f3d81cb1c9a9e42ffdb940b113fafc70d8d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 10:20:44 +0200 Subject: [PATCH 070/130] update environment --- .Rprofile | 10 +- DESCRIPTION | 145 +++--- NAMESPACE | 186 ++++---- README.md | 23 + renv.lock | 1270 ++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 1457 insertions(+), 177 deletions(-) diff --git a/.Rprofile b/.Rprofile index a49deaea..00de2667 100644 --- a/.Rprofile +++ b/.Rprofile @@ -1,5 +1,3 @@ -message("Sourcing .Rprofile...") - # Force compile packages from source before installing options( repos = c(CRAN = "https://cran.rstudio.com"), @@ -7,4 +5,10 @@ options( pkgType = "source" ) -source("renv/activate.R") +if (any(list.files() == "renv")) { + source("renv/activate.R") +} else { + message("No renv initialized, calling renv::init()") + message("Please select to use only the DESCRIPTION file for dependency discovery if prompted, and next select 'Restore the project from the lockfile'") + renv::init() +} \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 594268a8..2e4c1a1c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,70 +1,75 @@ -Package: Capr-PHEMS -Title: Cohort Definition Application Programming - project specific for PHEMS -Version: 2.0.8 -Authors@R: c( - person("Martin", "Lavallee", , "martin.lavallee@boehringer-ingelheim.com", role = c("aut", "cre")), - person("Adam", "Black", , "black@ohdsi.org", role = c("aut")), - person("Guus", "Wilmink", , "guus@thehyve.nl", role = c("aut")) - ) -Description: Provides a programming language for defining cohort definitions in R to use in studies for Observational - Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of - OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. - 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing - R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts - while also helping bridge the gap between human readable descriptions of clinical phenotypes - and their computational implementation. - For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. -License: Apache License (>= 2) -URL: https://ohdsi.github.io/Capr/, https://github.com/OHDSI/Capr/ -BugReports: https://github.com/OHDSI/Capr/issues/ -Encoding: UTF-8 -RoxygenNote: 7.3.1 -Depends: - R (>= 3.5.0) -Imports: - magrittr (>= 1.5.0), - jsonlite, - methods, - purrr (>= 1.0.1), - rlang, - dplyr, - tidyr, - checkmate, - tibble, - readr, - stringr, - glue, - cli, - digest, - fs, - lubridate, - DBI, - DatabaseConnector, - SqlRender, - generics, - CirceR, - codetools, - readr, - dplyr, - DBI -Suggests: - testthat (>= 3.0.0), - knitr, - rmarkdown -VignetteBuilder: knitr -Config/testthat/edition: 3 -Collate: - 'Capr.R' - 'conceptSet.R' - 'attributes-concept.R' - 'attributes-dateAdjustment.R' - 'attributes-logic.R' - 'query.R' - 'window.R' - 'criteria.R' - 'attributes-nested.R' - 'attributes-op.R' - 'exit.R' - 'cohort.R' - 'collectCodesetId.R' - 'utils.R' +Package: Capr-PHEMS +Title: Cohort Definition Application Programming - project specific for PHEMS +Version: 2.0.8 +Authors@R: c( + person("Martin", "Lavallee", , "martin.lavallee@boehringer-ingelheim.com", role = c("aut", "cre")), + person("Adam", "Black", , "black@ohdsi.org", role = c("aut")), + person("Guus", "Wilmink", , "guus@thehyve.nl", role = c("aut")) + ) +Description: Provides a programming language for defining cohort definitions in R to use in studies for Observational + Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of + OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. + 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing + R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts + while also helping bridge the gap between human readable descriptions of clinical phenotypes + and their computational implementation. + For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. +License: Apache License (>= 2) +URL: https://ohdsi.github.io/Capr/, https://github.com/OHDSI/Capr/ +BugReports: https://github.com/OHDSI/Capr/issues/ +Encoding: UTF-8 +RoxygenNote: 7.3.2 +Depends: + R (>= 3.5.0) +Imports: + magrittr (>= 1.5.0), + jsonlite, + methods, + purrr (>= 1.0.1), + rlang, + dplyr, + tidyr, + checkmate, + tibble, + readr, + stringr, + glue, + cli, + digest, + fs, + lubridate, + DBI, + DatabaseConnector, + SqlRender, + generics, + CirceR, + codetools, + readr, + dplyr, + DBI +Suggests: + testthat (>= 3.0.0), + knitr, + rmarkdown +VignetteBuilder: knitr +Config/testthat/edition: 3 +Collate: + 'Capr.R' + 'conceptSet.R' + 'attributes-concept.R' + 'attributes-dateAdjustment.R' + 'attributes-logic.R' + 'query.R' + 'window.R' + 'criteria.R' + 'attributes-nested.R' + 'attributes-op.R' + 'exit.R' + 'cohort.R' + 'collectCodesetId.R' + 'conceptSets.R' + 'countOccurrences.R' + 'isStandard.R' + 'isStandardCS.R' + 'table_linked_to_concept_field.R' + 'utils.R' diff --git a/NAMESPACE b/NAMESPACE index 6b7afead..32678998 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,86 +1,100 @@ -# Generated by roxygen2: do not edit by hand - -S3method(compile,Cohort) -export("%>%") -export(age) -export(as.json) -export(atLeast) -export(atMost) -export(attrition) -export(bt) -export(censoringEvents) -export(cohort) -export(compile) -export(conditionEra) -export(conditionOccurrence) -export(conditionType) -export(continuousObservation) -export(cs) -export(dateAdjustment) -export(daysOfSupply) -export(death) -export(descendants) -export(deviceExposure) -export(drugEra) -export(drugExit) -export(drugExposure) -export(drugQuantity) -export(drugRefills) -export(drugType) -export(duringInterval) -export(endDate) -export(entry) -export(eq) -export(era) -export(eventEnds) -export(eventStarts) -export(exactly) -export(exclude) -export(exit) -export(female) -export(firstOccurrence) -export(fixedExit) -export(getConceptSetDetails) -export(gt) -export(gte) -export(lt) -export(lte) -export(makeCohortSet) -export(male) -export(mapped) -export(measurement) -export(measurementType) -export(nbt) -export(nestedWithAll) -export(nestedWithAny) -export(nestedWithAtLeast) -export(nestedWithAtMost) -export(observation) -export(observationExit) -export(observationType) -export(procedure) -export(procedureType) -export(rangeHigh) -export(rangeLow) -export(readConceptSet) -export(startDate) -export(toCirce) -export(unit) -export(valueAsNumber) -export(visit) -export(visitType) -export(withAll) -export(withAny) -export(withAtLeast) -export(withAtMost) -export(writeCohort) -export(writeConceptSet) -exportMethods("==") -exportMethods(compile) -import(dplyr) -importFrom(generics,compile) -importFrom(magrittr,"%>%") -importFrom(methods,"slot<-") -importFrom(rlang,"%||%") -importFrom(rlang,":=") -importFrom(rlang,.data) +# Generated by roxygen2: do not edit by hand + +S3method(compile,Cohort) +export("%>%") +export(age) +export(as.json) +export(atLeast) +export(atMost) +export(attrition) +export(bt) +export(censoringEvents) +export(cohort) +export(compile) +export(conceptSets) +export(conditionEra) +export(conditionOccurrence) +export(conditionType) +export(continuousObservation) +export(countOccurrences) +export(cs) +export(dateAdjustment) +export(daysOfSupply) +export(death) +export(descendants) +export(deviceExposure) +export(drugEra) +export(drugExit) +export(drugExposure) +export(drugQuantity) +export(drugRefills) +export(drugType) +export(duringInterval) +export(endDate) +export(entry) +export(eq) +export(era) +export(eventEnds) +export(eventStarts) +export(exactly) +export(exclude) +export(exit) +export(female) +export(firstOccurrence) +export(fixedExit) +export(getConceptSetDetails) +export(gt) +export(gte) +export(isStandard) +export(isStandardCS) +export(links) +export(lt) +export(lte) +export(makeCohortSet) +export(male) +export(mapped) +export(measurement) +export(measurementType) +export(nbt) +export(nestedWithAll) +export(nestedWithAny) +export(nestedWithAtLeast) +export(nestedWithAtMost) +export(observation) +export(observationExit) +export(observationType) +export(procedure) +export(procedureType) +export(rangeHigh) +export(rangeLow) +export(readConceptSet) +export(startDate) +export(toCirce) +export(unit) +export(valueAsNumber) +export(visit) +export(visitType) +export(withAll) +export(withAny) +export(withAtLeast) +export(withAtMost) +export(writeCohort) +export(writeConceptSet) +exportMethods("==") +exportMethods(collectGuid) +exportMethods(compile) +import(dplyr) +importFrom(DBI,dbGetQuery) +importFrom(dplyr,across) +importFrom(dplyr,filter) +importFrom(dplyr,inner_join) +importFrom(dplyr,mutate) +importFrom(dplyr,select) +importFrom(generics,compile) +importFrom(magrittr,"%>%") +importFrom(methods,"slot<-") +importFrom(readr,read_csv) +importFrom(readr,write_csv) +importFrom(rlang,"%||%") +importFrom(rlang,":=") +importFrom(rlang,.data) diff --git a/README.md b/README.md index 39da40cd..638ed740 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,29 @@ devtools::install_github("ohdsi/Capr") For Capr-PHEMS, it is recommended to clone the repo and work from the template script cohortCapr.R, whilst using the Capr-PHEMS.Rproj as the project. +# Getting started with Capr-PHEMS +1. Clone the repo: +``` +git clone https://github.com/thehyve/Capr-PHEMS.git +``` + +2. Navigate to ./inst/config/. Here you will find two sample configuration files; config-sample.yml and connection_config-sample.yml + +3. Copy these files using: +``` +cp config-sample.yml config.yml +``` +and +``` +cp connection_config-sample.yml connection_config.yml +``` +and fill in your configuration details. + +4. Open the R project: Capr-PHEMS.Rproj. Please make sure the "renv" library is installed globally BEFORE opening the project. +Upon opening the project, .Rprofile will be sourced. For the first run, the environment needs to be initialized. renv::init() is called to initialize the R environment and install all required packages. When prompted for use of a description file for dependency discovery, select 1: Use only the DESCRIPTION file. When prompted "This project already has a lockfile", select 1: Restore the project from the lockfile. Required libraries will be installed and the renv will be activated. + +5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to use the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. + # User Documentation Documentation can be found on the [package website](https://ohdsi.github.io/Capr/). diff --git a/renv.lock b/renv.lock index ab095ac1..b5d99ca4 100644 --- a/renv.lock +++ b/renv.lock @@ -9,6 +9,42 @@ ] }, "Packages": { + "Capr": { + "Package": "Capr", + "Version": "2.0.8", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "Capr", + "RemoteUsername": "OHDSI", + "RemoteRef": "HEAD", + "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", + "Requirements": [ + "CirceR", + "DBI", + "DatabaseConnector", + "R", + "SqlRender", + "checkmate", + "cli", + "digest", + "dplyr", + "fs", + "generics", + "glue", + "jsonlite", + "lubridate", + "magrittr", + "methods", + "purrr", + "readr", + "rlang", + "stringr", + "tibble", + "tidyr" + ], + "Hash": "9f6109f92821d1799da4b15fc73d0066" + }, "CirceR": { "Package": "CirceR", "Version": "1.3.3", @@ -21,6 +57,53 @@ ], "Hash": "2f9522a81dac11183e90b4236afa441d" }, + "CohortGenerator": { + "Package": "CohortGenerator", + "Version": "0.9.0", + "Source": "GitHub", + "RemoteType": "github", + "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", + "RemoteHost": "api.github.com", + "RemoteRepo": "CohortGenerator", + "RemoteUsername": "ohdsi", + "RemoteRef": "HEAD", + "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", + "Requirements": [ + "DatabaseConnector", + "ParallelLogger", + "R", + "R6", + "RJSONIO", + "SqlRender", + "bit64", + "checkmate", + "digest", + "dplyr", + "jsonlite", + "lubridate", + "readr", + "rlang", + "stringi" + ], + "Hash": "1ba1b2d91607742e1d53676af13f506f" + }, + "CommonDataModel": { + "Package": "CommonDataModel", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "DatabaseConnector", + "SqlRender", + "dplyr", + "rJava", + "readr", + "rmarkdown", + "stringr" + ], + "Hash": "d009324efba4c142b431202580eb09d1" + }, "DBI": { "Package": "DBI", "Version": "1.2.3", @@ -55,6 +138,62 @@ ], "Hash": "1ef65614602c6534a6c666e872c3b647" }, + "Eunomia": { + "Package": "Eunomia", + "Version": "2.0.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "ohdsi", + "RemoteRepo": "Eunomia", + "RemoteRef": "main", + "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", + "Requirements": [ + "CommonDataModel", + "DBI", + "RSQLite", + "arrow", + "readr", + "rlang" + ], + "Hash": "03b2865190a4b57457ba228e231e86c3" + }, + "OhdsiRTools": { + "Package": "OhdsiRTools", + "Version": "2.0.2", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "OhdsiRTools", + "RemoteUsername": "OHDSI", + "RemoteRef": "HEAD", + "RemoteSha": "e076a286dfb9ae925606b85747432f237e19c942", + "Requirements": [ + "RJSONIO", + "codetools", + "formatR", + "httr", + "methods", + "remotes", + "utils" + ], + "Hash": "9ef9345d33fad72aca369809b435938d" + }, + "ParallelLogger": { + "Package": "ParallelLogger", + "Version": "3.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "jsonlite", + "methods", + "snow", + "utils", + "xml2" + ], + "Hash": "fd636fc067099b75b8ad17e9104b10f3" + }, "R6": { "Package": "R6", "Version": "2.5.1", @@ -75,6 +214,25 @@ ], "Hash": "2f89abc0f88c647d3386c672632f4baf" }, + "RSQLite": { + "Package": "RSQLite", + "Version": "2.3.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "bit64", + "blob", + "cpp11", + "memoise", + "methods", + "pkgconfig", + "plogr", + "rlang" + ], + "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" + }, "Rcpp": { "Package": "Rcpp", "Version": "1.0.12", @@ -98,6 +256,48 @@ ], "Hash": "e1762de0f08b14658d74989c10e2f265" }, + "arrow": { + "Package": "arrow", + "Version": "16.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "assertthat", + "bit64", + "cpp11", + "glue", + "methods", + "purrr", + "rlang", + "stats", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "d9cb18a8fc53895548150650cadde3a6" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, "backports": { "Package": "backports", "Version": "1.5.0", @@ -108,6 +308,16 @@ ], "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, "bit": { "Package": "bit", "Version": "4.0.5", @@ -144,6 +354,69 @@ ], "Hash": "40415719b5a479b87949f3aa0aee737c" }, + "brew": { + "Package": "brew", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8f4a384e19dccd8c65356dc096847b76" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "8644cc53f43828f19133548195d7e59e" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "callr": { + "Package": "callr", + "Version": "3.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" + }, "checkmate": { "Package": "checkmate", "Version": "2.3.1", @@ -187,6 +460,23 @@ ], "Hash": "61e097f35917d342622f21cdc79c256e" }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5d8225445acb167abf7797de48b2ee3c" + }, + "config": { + "Package": "config", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "yaml" + ], + "Hash": "8b7222e9d9eb5178eea545c0c4d33fc2" + }, "cpp11": { "Package": "cpp11", "Version": "0.4.7", @@ -209,6 +499,30 @@ ], "Hash": "859d96e65ef198fd43e82b9628d593ef" }, + "credentials": { + "Package": "credentials", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ], + "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + }, + "curl": { + "Package": "curl", + "Version": "5.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + }, "dbplyr": { "Package": "dbplyr", "Version": "2.5.0", @@ -237,6 +551,68 @@ ], "Hash": "39b2e002522bfd258039ee4e889e0fd1" }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "desc", + "ellipsis", + "fs", + "lifecycle", + "memoise", + "miniUI", + "pkgbuild", + "pkgdown", + "pkgload", + "profvis", + "rcmdcheck", + "remotes", + "rlang", + "roxygen2", + "rversions", + "sessioninfo", + "stats", + "testthat", + "tools", + "urlchecker", + "usethis", + "utils", + "withr" + ], + "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, "digest": { "Package": "digest", "Version": "0.6.36", @@ -248,6 +624,26 @@ ], "Hash": "fd6824ad91ede64151e93af67df6376b" }, + "downlit": { + "Package": "downlit", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ], + "Hash": "45a6a596bf0108ee1ff16a040a2df897" + }, "dplyr": { "Package": "dplyr", "Version": "1.1.4", @@ -271,6 +667,28 @@ ], "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "rlang" + ], + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, "fansi": { "Package": "fansi", "Version": "1.0.6", @@ -283,6 +701,35 @@ ], "Hash": "962174cf2aeb5b9eea581522286a911f" }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "formatR": { + "Package": "formatR", + "Version": "1.14", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "63cb26d12517c7863f5abb006c5e0f25" + }, "fs": { "Package": "fs", "Version": "1.6.4", @@ -305,41 +752,221 @@ ], "Hash": "15e9634c0fcd294799e9b2e929ed1b86" }, - "glue": { - "Package": "glue", - "Version": "1.7.0", + "gert": { + "Package": "gert", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "R", - "methods" + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" + "Hash": "f70d3fe2d9e7654213a946963d1591eb" }, - "hms": { - "Package": "hms", - "Version": "1.1.3", + "gh": { + "Package": "gh", + "Version": "1.4.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "R", + "cli", + "gitcreds", + "glue", + "httr2", + "ini", + "jsonlite", "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" + "rlang" ], - "Hash": "b59377caa7ed00fa41808342002138f9" + "Hash": "fbbbc48eba7a6626a08bb365e44b563b" }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "methods" + "R" + ], + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "04291cc45198225444a397606810ac37" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.15", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" + }, + "httr": { + "Package": "httr", + "Version": "1.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" + }, + "httr2": { + "Package": "httr2", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "curl", + "glue", + "lifecycle", + "magrittr", + "openssl", + "rappdirs", + "rlang", + "vctrs", + "withr" + ], + "Hash": "03d741c92fda96d98c3a3f22494e3b4a" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" ], "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, + "knitr": { + "Package": "knitr", + "Version": "1.48", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "acf380f300c721da9fde7df115a5f86f" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" + }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.4", @@ -376,6 +1003,49 @@ ], "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "miniUI": { + "Package": "miniUI", + "Version": "0.1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools", + "shiny", + "utils" + ], + "Hash": "fec5f52652d60615fdb3957b3d74324a" + }, + "openssl": { + "Package": "openssl", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass" + ], + "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" + }, "pillar": { "Package": "pillar", "Version": "1.9.0", @@ -393,6 +1063,21 @@ ], "Hash": "15da5a8412f317beeee6175fbc76f4bb" }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "a29e8e134a460a01e0ca67a4763c595b" + }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", @@ -403,6 +1088,71 @@ ], "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.9", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fs", + "httr", + "jsonlite", + "magrittr", + "memoise", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ], + "Hash": "8bf1151ed1a48328d71b937e651117a6" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "crayon", + "desc", + "fs", + "glue", + "methods", + "pkgbuild", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "876c618df5ae610be84356d5d7a5d124" + }, + "plogr": { + "Package": "plogr", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "09eb987710984fc2905c7129c7d85e65" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, "prettyunits": { "Package": "prettyunits", "Version": "1.2.0", @@ -413,6 +1163,34 @@ ], "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" }, + "processx": { + "Package": "processx", + "Version": "3.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" + }, + "profvis": { + "Package": "profvis", + "Version": "0.3.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmlwidgets", + "purrr", + "rlang", + "stringr", + "vctrs" + ], + "Hash": "aa5a3864397ce6ae03458f98618395a1" + }, "progress": { "Package": "progress", "Version": "1.2.3", @@ -427,6 +1205,33 @@ ], "Hash": "f4625e061cb2865f111b47ff163a5ca6" }, + "promises": { + "Package": "promises", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" + ], + "Hash": "434cd5388a3979e74be5c219bcd6e77d" + }, + "ps": { + "Package": "ps", + "Version": "1.7.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" + }, "purrr": { "Package": "purrr", "Version": "1.0.2", @@ -453,6 +1258,49 @@ ], "Hash": "524167e771b81342f8dd7a891ed3afa8" }, + "ragg": { + "Package": "ragg", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "systemfonts", + "textshaping" + ], + "Hash": "e3087db406e079a8a2fd87f413918ed3" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "callr", + "cli", + "curl", + "desc", + "digest", + "pkgbuild", + "prettyunits", + "rprojroot", + "sessioninfo", + "utils", + "withr", + "xopen" + ], + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" + }, "readr": { "Package": "readr", "Version": "2.1.5", @@ -476,6 +1324,30 @@ ], "Hash": "9de96463d2117f6ac49980577939dfb3" }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "3ee025083e66f18db6cf27b56e23e141" + }, "renv": { "Package": "renv", "Version": "1.0.7", @@ -497,6 +1369,165 @@ ], "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "27f9502e1cdbfa195f94e03b0f517484" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "knitr", + "methods", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "utils", + "withr", + "xml2" + ], + "Hash": "6ee25f9054a70f44d615300ed531ba8d" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96710351d642b70e8f02ddeb237c46a7" + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "curl", + "utils", + "xml2" + ], + "Hash": "a9881dfed103e83f9de151dc17002cd1" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "tools", + "utils" + ], + "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" + }, + "shiny": { + "Package": "shiny", + "Version": "1.8.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "54b26646816af9960a4c64d8ceec75d6" + }, + "snow": { + "Package": "snow", + "Version": "0.4-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "40b74690debd20c57d93d8c246b305d4" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" + }, "stringi": { "Package": "stringi", "Version": "1.8.4", @@ -527,6 +1558,67 @@ ], "Hash": "960e2ae9e09656611e0b8214ad543207" }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle" + ], + "Hash": "213b6b8ed5afbf934843e6c3b090d418" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle", + "systemfonts" + ], + "Hash": "5142f8bc78ed3d819d26461b641627ce" + }, "tibble": { "Package": "tibble", "Version": "3.2.1", @@ -596,6 +1688,16 @@ ], "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" }, + "tinytex": { + "Package": "tinytex", + "Version": "0.51", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "d44e2fcd2e4e076f0aac540208559d1d" + }, "triebeard": { "Package": "triebeard", "Version": "0.4.1", @@ -617,6 +1719,20 @@ ], "Hash": "f561504ec2897f4d46f0c7657e488ae1" }, + "urlchecker": { + "Package": "urlchecker", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "curl", + "tools", + "xml2" + ], + "Hash": "409328b8e1253c8d729a7836fe7f7a16" + }, "urltools": { "Package": "urltools", "Version": "1.7.3", @@ -630,6 +1746,37 @@ ], "Hash": "e86a704261a105f4703f653e05defa3e" }, + "usethis": { + "Package": "usethis", + "Version": "2.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "stats", + "utils", + "whisker", + "withr", + "yaml" + ], + "Hash": "d524fd42c517035027f866064417d7e6" + }, "utf8": { "Package": "utf8", "Version": "1.2.4", @@ -680,6 +1827,31 @@ ], "Hash": "390f9315bc0025be03012054103d227c" }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" + }, "withr": { "Package": "withr", "Version": "3.0.0", @@ -691,6 +1863,68 @@ "graphics" ], "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.45", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "ca59c87fe305b16a9141a5874c3a7889" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "processx" + ], + "Hash": "423df1e86d5533fcb73c6b02b4923b49" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9cb28d11799d93c953f852083d55ee9e" + }, + "zip": { + "Package": "zip", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" } } } From ed6f01d366f517fb4128307a0251b3412bc82b69 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:37:04 +0200 Subject: [PATCH 071/130] Update 5.22_vital_signs.csv --- inst/extdata/phems_variable_list/5.22_vital_signs.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/phems_variable_list/5.22_vital_signs.csv b/inst/extdata/phems_variable_list/5.22_vital_signs.csv index d52440d9..e2bd991b 100644 --- a/inst/extdata/phems_variable_list/5.22_vital_signs.csv +++ b/inst/extdata/phems_variable_list/5.22_vital_signs.csv @@ -1,5 +1,5 @@ sourceCode,concept_id -HR ,1004025  +HR ,3027018  HR ,8483  RR ,3024171  RR ,8483  From 6e7a968cc7a6e0a5a9dcfa0c514ddeb068bb4fc8 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 11:38:01 +0200 Subject: [PATCH 072/130] update concept set and extdata --- project/R/conceptSets.R | 38 ++--- .../5.10_cardiac_radiology.csv | 102 ++++++------ .../phems_variable_list/5.11_cardiac_los.csv | 102 ++++++------ .../phems_variable_list/5.12_additional.csv | 102 ++++++------ .../5.13_laboratory_tests.csv | 122 +++++++-------- .../5.14_cardiac_complications.csv | 124 +++++++-------- .../phems_variable_list/5.15_vital_signs.csv | 124 +++++++-------- .../5.16_hsjd_clinical.csv | 124 +++++++-------- .../phems_variable_list/5.17_hsjd_surgery.csv | 124 +++++++-------- .../5.18_hsjd_hospitalisation.csv | 124 +++++++-------- .../5.19_hsjd_complication.csv | 124 +++++++-------- ...e_use_diagnoses_procedures_current_eps.csv | 147 ++++++++++-------- .../5.3_vis_score_medications.csv | 16 +- .../5.4_vasopressors_inotropes.csv | 24 +-- .../5.5_immunosuppressants.csv | 14 +- .../5.6_antibiotic_medication.csv | 102 ++++++------ .../phems_variable_list/5.7_antifungals.csv | 57 +------ .../5.8_antibiotic_resistance.csv | 62 ++------ .../5.9_cardiac_surgery.csv | 94 +++++------ 19 files changed, 823 insertions(+), 903 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index 4963b5fc..5b640e93 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -6,53 +6,54 @@ conceptSets <- list( concepts = list( # 5.3 VIS score medications visScoreMedications = c( - 1507835, # source: vasopressin /// concept: vasopressin (USP) 1337720, # source: dobutamine /// concept: dobutamine 1337860, # source: dopamine /// concept: dopamine 1343916, # source: epinephrine /// concept: epinephrine 1368671, # source: milrinone /// concept: milrinone - 1321341 # source: norepinephrin /// concept: norepinephrine + 1321341, # source: norepinephrin /// concept: norepinephrine + 1507835 # source: vasopressin /// concept: vasopressin (USP) ), # 5.4 vasopressors and inotropes vasopressors_inotropes = c( - 1507835, # source: Vasopressin /// concept: vasopressin (USP) 1337720, # source: Dobutamine /// concept: dobutamine 1337860, # source: Dopamine /// concept: dopamine 1143374, # source: Ephedrine /// concept: ephedrine 1343916, # source: Epinephrine /// concept: epinephrine - 1368671, # source: Milrinone /// concept: milrinone - 19119253, # source: Terlipressin /// concept: terlipressin 1183554, # source: Isoproterenol /// concept: isoproterenol 40173184, # source: Levosimendan /// concept: levosimendan + 1368671, # source: Milrinone /// concept: milrinone 1321341, # source: Norepinephrine /// concept: norepinephrine - 1135766 # source: Phenylephrine /// concept: phenylephrine + 1135766, # source: Phenylephrine /// concept: phenylephrine + 19119253, # source: Terlipressin /// concept: terlipressin + 1507835 # source: Vasopressin /// concept: vasopressin (USP) ), # 5.5 immunosuppressants immunosuppressants = c( 4273629, # source: Chemotherapy /// concept: Chemotherapy - 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies 1518254, # source: Dexamethasone /// concept: dexamethasone 975125, # source: Hydrocortisone /// concept: hydrocortisone 1506270, # source: Methylprednisolone /// concept: methylprednisolone + 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies 1550557 # source: Prednisolone /// concept: prednisolone ), # 5.6 antibiotic medications antibiotics = c( - 4273629, # source: Chemotherapy /// concept: Chemotherapy - 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies + 1713332, # source: Amoxicillin /// concept: amoxicillin + 1759842, # source: Amoxicillin clavulanate /// concept: clavulanate + 1717327, # source: Ampicillin /// concept: ampicillin + 1734104, # source: Azithromycin /// concept: azithromycin 1836430, # source: Trimethoprim-Sulfamethoxazole /// concept: sulfamethoxazole + 1705674, # source: Trimethoprim-Sulfamethoxazole /// concept: trimethoprim 1836948, # source: Tetracycline /// concept: tetracycline 902722, # source: Tobramycin /// concept: tobramycin - 1705674, # source: Trimethoprim-Sulfamethoxazole /// concept: trimethoprim 1707687, # source: Vancomycin /// concept: vancomycin 19010400, # source: Fusidic acid /// concept: fusidate 45892419, # source: Gentamicin /// concept: gentamicin 45892599, # source: Ceftolozane-Tazovactam /// concept: ceftolozane 46221507, # source: Ceftazidime-Avibactam /// concept: avibactam - 1734104, # source: Azithromycin /// concept: azithromycin 1736887, # source: Linezolid /// concept: linezolid 1748975, # source: Cefepime /// concept: cefepime 1750500, # source: Clarithromycin /// concept: clarithromycin @@ -69,23 +70,20 @@ conceptSets <- list( 1717963, # source: Ertapenem /// concept: ertapenem 1518254, # source: Dexamethasone /// concept: dexamethasone 1741122, # source: Piperacillin-Tazobactam /// concept: tazobactam + 1746114, # source: Piperacillin-Tazobactam /// concept: piperacillin 1746940, # source: Erythromycin /// concept: erythromycin 951511, # source: Mupirocin /// concept: mupirocin 956653, # source: Fosfomycin /// concept: fosfomycin - 1759842, # source: Amoxicillin clavulanate /// concept: clavulanate 975125, # source: Hydrocortisone /// concept: hydrocortisone 1778262, # source: Imipenem /// concept: imipenem 19078399, # source: Teicoplanin /// concept: teicoplanin 1790868, # source: Amikacin /// concept: amikacin 1506270, # source: Methylprednisolone /// concept: methylprednisolone - 1713332, # source: Amoxicillin /// concept: amoxicillin - 1717327, # source: Ampicillin /// concept: ampicillin 920293, # source: Nitrofurantoin /// concept: nitrofurantoin 1721543, # source: Norfloxacin /// concept: norfloxacin 1724703, # source: Oxacillin /// concept: oxacillin 1728416, # source: Penicillin /// concept: penicillin G 1742253, # source: Levofloxacin /// concept: levofloxacin - 1746114, # source: Piperacillin-Tazobactam /// concept: piperacillin 1550557, # source: Prednisolone /// concept: prednisolone 1763204 # source: Rifampicin /// concept: rifampin ), @@ -208,7 +206,6 @@ conceptSets <- list( # 5.12 additional variables additional = c( - 4124462, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: None 4095105, # source: Base Excess /// concept: Base deficit measurement 4123933, # source: Elective ICU admission /// concept: Admission to pediatric intensive care unit 4234469, # source: Diagnoses /// concept: Diagnosis @@ -362,13 +359,6 @@ conceptSets <- list( 433968, # source: candidiasis /// concept: Candidiasis 44807226, # source: necrotizing enterocolitis /// concept: Necrotising enterocolitis 132797, # source: Previous diagnosis of sepsis measure /// concept: Sepsis - 44777590, # source: Mean Airway Pressure (MAP) /// concept: centimeter watercolumn - 44777602, # source: Mean Airway Pressure (MAP) /// concept: kilopascal - 8510, # source: FiO2 /// concept: unit - 8554, # source: FiO2 /// concept: percent - 720868, # source: FiO2 /// concept: fraction - 8529, # source: Oxygenation index /// concept: index - 8876, # source: Mean Airway Pressure (MAP) /// concept: millimeter mercury column 21602722, # source: Corticoids /// concept: CORTICOSTEROIDS FOR SYSTEMIC USE 42869590, # source: FiO2 /// concept: Oxygen/Gas total [Pure volume fraction] Inhaled gas 42527086, # source: Mean Airway Pressure (MAP) /// concept: Mean airway pressure @@ -384,7 +374,7 @@ conceptSets <- list( 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure 3014315, # source: Urine output /// concept: Urine output 3024171, # source: RR /// concept: Respiratory rate - 1004025 # source: HR /// concept: Heart rate + 3027018 # source: HR /// concept: Heart rate ), # 5.23 physical examination signs diff --git a/project/data/phems_variable_list/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/5.10_cardiac_radiology.csv index 6a5ee613..850e3454 100644 --- a/project/data/phems_variable_list/5.10_cardiac_radiology.csv +++ b/project/data/phems_variable_list/5.10_cardiac_radiology.csv @@ -1,51 +1,51 @@ -sourceCode,concept_id -US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825  -XR chest ,4163872  -US transoesophageal echocardiogram (toe) ,4019824  -XR abdomen ,4264477  -US cranial contents ,4083106  -24h holter monitor ,45764527  -24h holter monitor ,4140473  -US abdomen and pelvis/ US abdomen ,4305221  -US abdomen and pelvis/ US abdomen ,4261497  -MRI cardiac complex congenital ,44802640  -EEG routine portable ,4205144  -Epicardial echocardiogram ,4203365  -CT thorax with contrast ,4327032  -IR PICC line insertion ,4322380  -Event monitor ,45765560  -CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317  -IR tunnelled central venous line insertion ,40482732  -Cardiopulmonary exercise test (CPET) ,40492338  -US thorax and pleural cavity ,4093436  -US thorax and pleural cavity ,4329508  -MRI head ,4082979  -CT head ,4125350  -US urinary tract ,4125530  -Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431  -US vocal cord ,44813863  -Pacemaker/ICD device check - remote patient initiated ,4235141  -Pacemaker/ICD device check - remote device initiated ,4235141  -IR bronchoscopy ,4032404  -FL video swallow ,4345925  -IR bronchogram ,4312208  -XR chest and abdomen ,4169275  -Exercise test (non-CPET) ,4065416  -US doppler renal both ,4167052  -US neck ,4083108  -US doppler jugular vein both ,40489841  -EEG routine ,4181917  -US diaphragmatic region ,4303522  -US doppler groin both ,35622931  -US doppler groin both ,4167029  -IR tunnelled central venous line removal ,42873079  -US doppler ,35622931  -US doppler lower limb veins both ,4335392  -, -, -, -, -, -, -, -, +sourceCode,concept_id +24h holter monitor ,45764527  +24h holter monitor ,4140473  +CT head ,4125350  +CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317  +CT thorax with contrast ,4327032  +Cardiopulmonary exercise test (CPET) ,40492338  +EEG routine ,4181917  +EEG routine portable ,4205144  +Epicardial echocardiogram ,4203365  +Event monitor ,45765560  +Exercise test (non-CPET) ,4065416  +FL video swallow ,4345925  +IR PICC line insertion ,4322380  +IR bronchogram ,4312208  +IR bronchoscopy ,4032404  +IR tunnelled central venous line insertion ,40482732  +IR tunnelled central venous line removal ,42873079  +MRI cardiac complex congenital ,44802640  +MRI head ,4082979  +Pacemaker/ICD device check - remote patient initiated ,4235141  +Pacemaker/ICD device check - remote device initiated ,4235141  +Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431  +US abdomen and pelvis/ US abdomen ,4261497  +US abdomen and pelvis/ US abdomen ,4305221  +US cranial contents ,4083106  +US diaphragmatic region ,4303522  +US doppler ,35622931  +US doppler groin both ,35622931  +US doppler groin both ,4167029  +US doppler jugular vein both ,40489841  +US doppler lower limb veins both ,4335392  +US doppler renal both ,4167052  +US neck ,4083108  +US thorax and pleural cavity ,4329508  +US thorax and pleural cavity ,4093436  +US transoesophageal echocardiogram (toe) ,4019824  +US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825  +US urinary tract ,4125530  +US vocal cord ,44813863  +XR abdomen ,4264477  +XR chest ,4163872  +XR chest and abdomen ,4169275  +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.11_cardiac_los.csv b/project/data/phems_variable_list/5.11_cardiac_los.csv index fc425a73..056af8ac 100644 --- a/project/data/phems_variable_list/5.11_cardiac_los.csv +++ b/project/data/phems_variable_list/5.11_cardiac_los.csv @@ -1,51 +1,51 @@ -sourceCode,concept_id -ICU admission (start datetime and end datetime) ,4123933  -HDU admission (start datetime and end datetime) ,4161811  -Cardiology ward admission (start datetime and end datetime) ,36675203  -Total hospital admission (start datetime and end datetime) ,8715  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Cardiology ward admission (start datetime and end datetime) ,36675203  +HDU admission (start datetime and end datetime) ,4161811  +ICU admission (start datetime and end datetime) ,4123933  +Total hospital admission (start datetime and end datetime) ,8715  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.12_additional.csv b/project/data/phems_variable_list/5.12_additional.csv index 9ed85f1e..e49f0c39 100644 --- a/project/data/phems_variable_list/5.12_additional.csv +++ b/project/data/phems_variable_list/5.12_additional.csv @@ -1,51 +1,51 @@ -sourceCode,concept_id -"Outpatient appointments start datetime, end datetime ",9202  -Outpatient appointment type (telephone/ clinic visit etc.) ,5083  -Outpatient specialty ,32577  -Diagnoses ,4234469  -Systolic blood pressure ,3004249  -Systolic blood pressure ,8876  -Pupillary reaction ,4209008  -PaCO2 ,3027946  -PaCO2 ,44777602  -PaCO2 ,8876  -FiO2 ,42869590  -FiO2 ,8554  -Mechanical ventilation ,40493026  -Base Excess ,4095105  -Base Excess ,8753  -Elective ICU admission ,4123933  -"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975  -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Base Excess ,8753  +Base Excess ,4095105  +Diagnoses ,4234469  +Elective ICU admission ,4123933  +FiO2 ,42869590  +FiO2 ,8554  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383  +"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588  +Mechanical ventilation ,40493026  +Outpatient appointment type (telephone/ clinic visit etc.) ,5083  +"Outpatient appointments start datetime, end datetime ",9202  +Outpatient specialty ,32577  +PaCO2 ,44777602  +PaCO2 ,3027946  +PaCO2 ,8876  +Pupillary reaction ,4209008  +"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020  +Systolic blood pressure ,8876  +Systolic blood pressure ,3004249  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783  +"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975  +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.13_laboratory_tests.csv b/project/data/phems_variable_list/5.13_laboratory_tests.csv index 707cebf6..3f7b8302 100644 --- a/project/data/phems_variable_list/5.13_laboratory_tests.csv +++ b/project/data/phems_variable_list/5.13_laboratory_tests.csv @@ -1,61 +1,61 @@ -sourceCode,concept_id -Immature WBC count ,4298431  -Immature WBC count ,8647  -Neutrophil count ,3007670  -Neutrophil count ,8647  -Hemoglobin ,40762351  -Hemoglobin ,8713  -Hemoglobin ,8636  -Platelet count ,4267147  -Platelet count ,8647  -Hematocrit ,3009542  -Hematocrit ,8554  -INR prothrombin time ,3034426  -INR prothrombin time ,8555  -Lactate ,3047181  -Lactate ,8753  -Creatinine ,3051825  -Creatinine ,8840  -Creatinine ,8749  -Albumin ,3024561  -Albumin ,8713  -Albumin ,8636  -Blood urea nitrogen ,3024641  -Blood urea nitrogen ,8753  -Glucose ,3013826  -Glucose ,8753  -Bilirubin ,3006140  -Bilirubin ,8749  -Sodium ,3019550  -Sodium ,8753  -Potassium ,3005456  -Potassium ,8753  -Magnesium ,3033836  -Magnesium ,8753  -Chloride ,3018572  -Chloride ,8753  -Calcium ,3015377  -Calcium ,8753  -Phosphate ,3003458  -Phosphate ,8753  -CRP ,3020460  -CRP ,8751  -ALT ,3006923  -ALT ,8645  -AST ,3013721  -AST ,8645  -pH (venous) ,37392672  -pH (arterial) ,37399161  -pCO2 (venous) ,3021447  -pCO2 (venous) ,8876  -pCO2 (venous) ,44777602  -pCO2 (arterial) ,3027946  -pCO2 (arterial) ,8876  -pO2 (venous) ,3024354  -pO2 (venous) ,8876  -pO2 (arterial) ,3027801  -pO2 (arterial) ,8876  -Bicarbonate (venous) ,3027273  -Bicarbonate (venous) ,8753  -Bicarbonate (arterial) ,3008152  -Bicarbonate (arterial) ,8753  +sourceCode,concept_id +ALT ,3006923  +ALT ,8645  +AST ,3013721  +AST ,8645  +Albumin ,8713  +Albumin ,3024561  +Albumin ,8636  +Bicarbonate (arterial) ,8753  +Bicarbonate (arterial) ,3008152  +Bicarbonate (venous) ,8753  +Bicarbonate (venous) ,3027273  +Bilirubin ,3006140  +Bilirubin ,8749  +Blood urea nitrogen ,8753  +Blood urea nitrogen ,3024641  +CRP ,8751  +CRP ,3020460  +Calcium ,8753  +Calcium ,3015377  +Chloride ,8753  +Chloride ,3018572  +Creatinine ,8749  +Creatinine ,8840  +Creatinine ,3051825  +Glucose ,3013826  +Glucose ,8753  +Hematocrit ,8554  +Hematocrit ,3009542  +Hemoglobin ,40762351  +Hemoglobin ,8636  +Hemoglobin ,8713  +INR prothrombin time ,3034426  +INR prothrombin time ,8555  +Immature WBC count ,4298431  +Immature WBC count ,8647  +Lactate ,3047181  +Lactate ,8753  +Magnesium ,8753  +Magnesium ,3033836  +Neutrophil count ,3007670  +Neutrophil count ,8647  +Phosphate ,3003458  +Phosphate ,8753  +Platelet count ,4267147  +Platelet count ,8647  +Potassium ,8753  +Potassium ,3005456  +Sodium ,3019550  +Sodium ,8753  +pCO2 (arterial) ,3027946  +pCO2 (arterial) ,8876  +pCO2 (venous) ,44777602  +pCO2 (venous) ,3021447  +pCO2 (venous) ,8876  +pH (arterial) ,37399161  +pH (venous) ,37392672  +pO2 (arterial) ,3027801  +pO2 (arterial) ,8876  +pO2 (venous) ,3024354  +pO2 (venous) ,8876  diff --git a/project/data/phems_variable_list/5.14_cardiac_complications.csv b/project/data/phems_variable_list/5.14_cardiac_complications.csv index e233950e..11bf4adc 100644 --- a/project/data/phems_variable_list/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/5.14_cardiac_complications.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -ICU ward stay ,4123933  -CVL infections ,42537043  -Low cardiac output state (LCOS) - ECMO ,4185565  -,4052536  -LCOS - renal support (CVVH/ PD) ,4051330  -,4324124  -,4185565  -LCOS - Cardiac arrest ,321042  -,4185565  -LCOS - NEC requiring treatment ,4185565  -Neurological injury - infarction ,443454  -Neurological injury - seizure ,377091  -Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847  -Surgical injury - Blood Loss ,4308537  -Surgical injury - Chylothorax ,4306136  -Surgical injury - Reexplore for bleeding ,4295705  -,437312  -,442019  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +CVL infections ,42537043  +ICU ward stay ,4123933  +LCOS - Cardiac arrest ,321042  +LCOS - NEC requiring treatment ,4185565  +LCOS - renal support (CVVH/ PD) ,4051330  +Low cardiac output state (LCOS) - ECMO ,4185565  +Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847  +Neurological injury - infarction ,443454  +Neurological injury - seizure ,377091  +Surgical injury - Blood Loss ,4308537  +Surgical injury - Chylothorax ,4306136  +Surgical injury - Reexplore for bleeding ,4295705  +,4052536  +,4185565  +,4185565  +,4324124  +,437312  +,442019  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv index 618f3d90..4c85b7ab 100644 --- a/project/data/phems_variable_list/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/5.15_vital_signs.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -Age-dependent HR ,4239408  -Age-dependent HR ,8483  -Age-dependent RR ,4313591  -Age-dependent RR ,8483  -SBP (Systolic Blood Pressure) ,4152194  -SBP (Systolic Blood Pressure) ,8876  -DBP (Dyastolic Blood Pressure) ,4154790  -DBP (Dyastolic Blood Pressure) ,8876  -SpO2 ,4096101  -SpO2 ,8554  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Age-dependent HR ,4239408  +Age-dependent HR ,8483  +Age-dependent RR ,4313591  +Age-dependent RR ,8483  +DBP (Dyastolic Blood Pressure) ,4154790  +DBP (Dyastolic Blood Pressure) ,8876  +SBP (Systolic Blood Pressure) ,4152194  +SBP (Systolic Blood Pressure) ,8876  +SpO2 ,4096101  +SpO2 ,8554  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/5.16_hsjd_clinical.csv index 98f662ab..4015c08e 100644 --- a/project/data/phems_variable_list/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/5.16_hsjd_clinical.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -Weight ,3025315  -Weight ,9529  -Height ,607590  -Height ,8582  -Body Surface Area (BSA) - Combination of weight and height ,4201235  -Body Surface Area (BSA) - Combination of weight and height ,8617  -Extracardiac anomalies - diagnoses ,0  -Cardiac surgeries (Interventions) ,4275564  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Body Surface Area (BSA) - Combination of weight and height ,4201235  +Body Surface Area (BSA) - Combination of weight and height ,8617  +Cardiac surgeries (Interventions) ,4275564  +Extracardiac anomalies - diagnoses ,0  +Height ,607590  +Height ,8582  +Weight ,3025315  +Weight ,9529  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/5.17_hsjd_surgery.csv index d2b96f79..87a66f27 100644 --- a/project/data/phems_variable_list/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/5.17_hsjd_surgery.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -Aristotle's score of surgery ,0  -STAT/EACTS score of surgery ,40490494  -"Surgery start datetime, end datetime ",4301351  -"Cardiac bypass start datetime, end datetime ",4336464  -"Cross-clamping start datetime, end datetime ",4201547  -"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138  -"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  -Extubation event ,4150627  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  +Aristotle's score of surgery ,0  +"Cardiac bypass start datetime, end datetime ",4336464  +"Cross-clamping start datetime, end datetime ",4201547  +"Deep hypothermic circulatory arrest start datetime, end datetime ",44790138  +Extubation event ,4150627  +STAT/EACTS score of surgery ,40490494  +"Surgery start datetime, end datetime ",4301351  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv index 0a45b71a..672f8ecd 100644 --- a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -Admission reason ,44803020  -ventilation ,0  -"Vasoactive infusion start datetime, end datetime ",42539650  -Type of vasoactive infusion ,0  -Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078  -VIS score of vasoactive infusion ,0  -"Postop central venous catheter in/start datetime, out/ end datetime ",4179206  -"Total ventilation start datetime, end datetime ",0  -Invasive Mechanical Ventilation LOS ,37158404  -Non-Invasive Mechanical Ventilation LOS ,4177224  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Admission reason ,44803020  +Dose of vasoactive infusion (rate - mcg/kg/hr) ,794078  +Invasive Mechanical Ventilation LOS ,37158404  +Non-Invasive Mechanical Ventilation LOS ,4177224  +"Postop central venous catheter in/start datetime, out/ end datetime ",4179206  +"Total ventilation start datetime, end datetime ",0  +Type of vasoactive infusion ,0  +VIS score of vasoactive infusion ,0  +"Vasoactive infusion start datetime, end datetime ",42539650  +ventilation ,0  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.19_hsjd_complication.csv b/project/data/phems_variable_list/5.19_hsjd_complication.csv index 0679ad0b..31d3a45b 100644 --- a/project/data/phems_variable_list/5.19_hsjd_complication.csv +++ b/project/data/phems_variable_list/5.19_hsjd_complication.csv @@ -1,62 +1,62 @@ -sourceCode,concept_id -intubation ,4202832  -Cardiac surgeries (interventions) ,4275564  -Sternum reopening (procedure undertaken) ,4044892  -Vocal Cord Dysfunction ,4046868  -Diaphragmatic Paralysis ,4275136  -Pneumothorax ,253796  -Tracheostomy ,44783799  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940  -Listed for heart transplantation ,609312  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448  +"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398  +"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940  +Cardiac surgeries (interventions) ,4275564  +Diaphragmatic Paralysis ,4275136  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437  +"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860  +Listed for heart transplantation ,609312  +Pneumothorax ,253796  +Sternum reopening (procedure undertaken) ,4044892  +Tracheostomy ,44783799  +Vocal Cord Dysfunction ,4046868  +intubation ,4202832  +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv index a759e426..6d6e6f42 100644 --- a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -1,62 +1,85 @@ -sourceCode,concept_id -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Abcess,444202 +Antibiotics,4085730 +Antineoplastics,4181511 +Antivirals,4140762 +Arterial blood pressure catheter,45758028 +Cancer,443392 +Central venous catheter,4179206 +"Chest opening, chest drainage",4074689 +Corticoids,21602722 +Crohn's disease,201606 +Cushing's disease,195212 +Diagnosis of SIRS,434821 +Diagnosis of acute infection having the potential for progression to sepsis1+2,37174269 +Diagnosis of acute infection having the potential for progression to sepsis1+2,4271450 +Diagnosis of chronic condition,443783 +Diagnosis of chronic condition,312723 +Diagnosis of chronic condition,201820 +Diagnosis of chronic condition,255573 +Diagnosis of condition producing immunodeficiency,4140977 +Diagnosis of organ system dysfunction,4080011 +Dialysis,4051330 +Dialysis,4032243 +Down's syndrome,439125 +ECMO,4052536 +ECMO type,37206601 +ECMO type,37206603 +Endotracheal tube,4097216 +FiO2,720868 +FiO2,42869590 +FiO2,8510 +FiO2,8554 +Immunosuppressors,4314777 +Invasive ventilation,44790095 +Mean Airway Pressure (MAP),8876 +Mean Airway Pressure (MAP),44777590 +Mean Airway Pressure (MAP),42527086 +Mean Airway Pressure (MAP),44777602 +Meningo-encephalitis,4322814 +Nasogastric/orogastric tube,42538045 +Non-invasive ventilation,4177224 +Origin (external),44790567 +Origin (internal),4294886 +Oxygenation index,8529 +Oxygenation index,4193843 +Peripheral IV cannulas,4177205 +Peritoneal dialysis,4324124 +Previous diagnosis of sepsis measure,132797 +Previous diagnosis of sepsis measure,1340204 +Reason for admission,44803020 +Surgical admission (non-urgent),4084670 +Surgical admission (urgent),4123946 +Tracheostomy,44783799 +UTI,4331815 +Urinary catheter,4070667 +Ventricular assist device (VAD),4235043 +acute kidney injury,197320 +appendicitis,440448 +asplenia,45768671 +bacteremia,132736 +candidiasis,433968 +cardiac arrest,321042 +cellulitis,435613 +cerebral palsy,4134120 +endocarditis,441589 +hepatitis,4243475 +immunodeficiency,433740 +injury with open wound,444187 +meningitis,435785 +miocarditis,314383 +mitochondrial disease,81539 +necrotizing enterocolitis,44807226 +nephrotic syndrome,195314 +neutropenia,604243 +organ transplant,4208341 +peritonitis,196152 +pneumonia,255848 +renal insufficiency,36716945 +rheumatoid arthritis,80809 +sickle cell disease,22281 +surgery previous to prediction time point,4301351 +surgical site inflammation,4300243 +tuberculosis,4103588 +ulcerative colitis,81893 +viremia,133327 diff --git a/project/data/phems_variable_list/5.3_vis_score_medications.csv b/project/data/phems_variable_list/5.3_vis_score_medications.csv index 83bd4c12..19e1b346 100644 --- a/project/data/phems_variable_list/5.3_vis_score_medications.csv +++ b/project/data/phems_variable_list/5.3_vis_score_medications.csv @@ -1,8 +1,8 @@ -sourceCode,concept_id -dobutamine ,1337720  -dopamine ,1337860   -milrinone ,1368671   -epinephrine ,1343916  -vasopressin ,1507835  -norepinephrin  ,1321341  -,9688  +sourceCode,concept_id +dobutamine,1337720 +dopamine,1337860 +epinephrine,1343916 +milrinone,1368671 +norepinephrin,1321341 +vasopressin,1507835 +,9688 diff --git a/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv b/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv index 3acde7fb..2cdcea90 100644 --- a/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv +++ b/project/data/phems_variable_list/5.4_vasopressors_inotropes.csv @@ -1,12 +1,12 @@ -sourceCode,concept_id -Dobutamine ,1337720  -Dopamine ,1337860  -Milrinone ,1368671  -Epinephrine ,1343916  -Vasopressin ,1507835  -Norepinephrine,1321341  -Ephedrine ,1143374  -Terlipressin ,19119253  -Levosimendan ,40173184  -Isoproterenol   ,1183554  -Phenylephrine  ,1135766  +sourceCode,concept_id +Dobutamine,1337720 +Dopamine,1337860 +Ephedrine,1143374 +Epinephrine,1343916 +Isoproterenol,1183554 +Levosimendan,40173184 +Milrinone,1368671 +Norepinephrine,1321341 +Phenylephrine,1135766 +Terlipressin,19119253 +Vasopressin,1507835 diff --git a/project/data/phems_variable_list/5.5_immunosuppressants.csv b/project/data/phems_variable_list/5.5_immunosuppressants.csv index 179032ae..b48ccf21 100644 --- a/project/data/phems_variable_list/5.5_immunosuppressants.csv +++ b/project/data/phems_variable_list/5.5_immunosuppressants.csv @@ -1,7 +1,7 @@ -sourceCode,concept_id -Prednisolone ,1550557  -Dexamethasone ,1518254  -Hydrocortisone ,975125  -Methylprednisolone ,1506270  -Chemotherapy ,4273629  -Monoclonal Antibodies ,21603754  +sourceCode,concept_id +Chemotherapy,4273629 +Dexamethasone,1518254 +Hydrocortisone,975125 +Methylprednisolone,1506270 +Monoclonal Antibodies,21603754 +Prednisolone,1550557 diff --git a/project/data/phems_variable_list/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/5.6_antibiotic_medication.csv index 271bddef..096e4e4e 100644 --- a/project/data/phems_variable_list/5.6_antibiotic_medication.csv +++ b/project/data/phems_variable_list/5.6_antibiotic_medication.csv @@ -1,51 +1,51 @@ -sourceCode,concept_id -Prednisolone ,1550557  -Dexamethasone ,1518254  -Hydrocortisone ,975125  -Methylprednisolone ,1506270  -Chemotherapy ,4273629  -Monoclonal Antibodies ,21603754  -Penicillin ,1728416  -Ampicillin ,1717327  -Amoxicillin clavulanate ,1713332  -Amoxicillin clavulanate ,1759842  -Amoxicillin ,1713332  -Oxacillin ,1724703  -Piperacillin-Tazobactam ,1746114  -Piperacillin-Tazobactam ,1741122  -Cefazolin ,1771162  -Cefuroxime ,1778162  -Cefotaxime ,1774470  -Cefadroxil ,1769535  -Ceftazidime ,1776684  -Ceftazidime-Avibactam ,1776684  -Ceftazidime-Avibactam ,46221507  -Cefepime ,1748975  -Ceftolozane-Tazovactam ,45892599  -Ceftolozane-Tazovactam ,1741122  -Ertapenem ,1717963  -Imipenem ,1778262  -Meropenem ,1709170  -Teicoplanin ,19078399  -Vancomycin ,1707687  -Gentamicin ,45892419  -Amikacin ,1790868  -Tobramycin ,902722  -Erythromycin ,1746940  -Clarithromycin ,1750500  -Azithromycin ,1734104  -Tetracycline ,1836948  -Norfloxacin ,1721543  -Ciprofloxacin ,1797513  -Levofloxacin ,1742253  -Daptomycin ,1786617  -Clindamycin ,997881  -Fosfomycin ,956653  -Nitrofurantoin ,920293  -Rifampicin ,1763204  -Trimethoprim-Sulfamethoxazole ,1705674  -Trimethoprim-Sulfamethoxazole ,1836430  -Linezolid ,1736887  -Mupirocin ,951511  -Fusidic acid ,19010400  -Colistin ,901845  +sourceCode,concept_id +Amikacin,1790868 +Amoxicillin,1713332 +Amoxicillin clavulanate,1713332 +Amoxicillin clavulanate,1759842 +Ampicillin,1717327 +Azithromycin,1734104 +Cefadroxil,1769535 +Cefazolin,1771162 +Cefepime,1748975 +Cefotaxime,1774470 +Ceftazidime,1776684 +Ceftazidime-Avibactam,1776684 +Ceftazidime-Avibactam,46221507 +Ceftolozane-Tazovactam,1741122 +Ceftolozane-Tazovactam,45892599 +Cefuroxime,1778162 +Chemotherapy,4273629 +Ciprofloxacin,1797513 +Clarithromycin,1750500 +Clindamycin,997881 +Colistin,901845 +Daptomycin,1786617 +Dexamethasone,1518254 +Ertapenem,1717963 +Erythromycin,1746940 +Fosfomycin,956653 +Fusidic acid,19010400 +Gentamicin,45892419 +Hydrocortisone,975125 +Imipenem,1778262 +Levofloxacin,1742253 +Linezolid,1736887 +Meropenem,1709170 +Methylprednisolone,1506270 +Monoclonal Antibodies,21603754 +Mupirocin,951511 +Nitrofurantoin,920293 +Norfloxacin,1721543 +Oxacillin,1724703 +Penicillin,1728416 +Piperacillin-Tazobactam,1746114 +Piperacillin-Tazobactam,1741122 +Prednisolone,1550557 +Rifampicin,1763204 +Teicoplanin,19078399 +Tetracycline,1836948 +Tobramycin,902722 +Trimethoprim-Sulfamethoxazole,1836430 +Trimethoprim-Sulfamethoxazole,1705674 +Vancomycin,1707687 diff --git a/project/data/phems_variable_list/5.7_antifungals.csv b/project/data/phems_variable_list/5.7_antifungals.csv index 2577837c..8fd22f8d 100644 --- a/project/data/phems_variable_list/5.7_antifungals.csv +++ b/project/data/phems_variable_list/5.7_antifungals.csv @@ -1,51 +1,6 @@ -sourceCode,concept_id -Fluconazole ,1754994  -Micafungin ,19018013  -Isovuconazole ,35606695  -Andiulafungin ,19026450  -Voriconazole ,1714277  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Andiulafungin,19026450 +Fluconazole,1754994 +Isovuconazole,35606695 +Micafungin,19018013 +Voriconazole,1714277 diff --git a/project/data/phems_variable_list/5.8_antibiotic_resistance.csv b/project/data/phems_variable_list/5.8_antibiotic_resistance.csv index c74f57d6..fabf6808 100644 --- a/project/data/phems_variable_list/5.8_antibiotic_resistance.csv +++ b/project/data/phems_variable_list/5.8_antibiotic_resistance.csv @@ -1,51 +1,11 @@ -sourceCode,concept_id -MRSA ,4019195  -ESBL ,4257547  -Drug-resistant ,37017134  -Multidrug-resistant ,37017134  -Clindamycin-resistant ,37017134  -Clindamycin-resistant ,997881  -Vancomycin-resistant ,37017134  -Vancomycin-resistant ,1707687  -Erythromycin-resistant ,37017134  -Erythromycin-resistant ,1746940  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +sourceCode,concept_id +Clindamycin-resistant,997881 +Clindamycin-resistant,37017134 +Drug-resistant,37017134 +ESBL,4257547 +Erythromycin-resistant,1746940 +Erythromycin-resistant,37017134 +MRSA,4019195 +Multidrug-resistant,37017134 +Vancomycin-resistant,1707687 +Vancomycin-resistant,37017134 diff --git a/project/data/phems_variable_list/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/5.9_cardiac_surgery.csv index e819dffa..23734d55 100644 --- a/project/data/phems_variable_list/5.9_cardiac_surgery.csv +++ b/project/data/phems_variable_list/5.9_cardiac_surgery.csv @@ -1,51 +1,43 @@ -sourceCode,concept_id -Unspecified repair of defect of interventricular septum ,4199899  -Extracorporeal membrane oxygenation ,4052536  -Other specified: plastic repair of aorta ,4019026  -Unspecified repair of tetralogy of fallot ,4019929  -Repositioning of transposed great arteries ,4019932  -Creation of anastomosis to pulmonary artery from vena cava ,4019237  -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525  -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380  -Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376  -Application of band to pulmonary artery ,4049734  -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751  -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127  -Open implantation of ventricular assist device ,4139214  -Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857  -Implantation of cardiac pacemaker system NEC ,4144921  -Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133  -Unspecified correction of total anomalous pulmonary  venous connection ,4017751  -Other specified other operations on ventricles of heart ,44510968  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  -Correction of persistent sinus venosus ,4020508  -Release of vascular ring of aorta ,4019028  -Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476  -Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415  -Repair of subaortic stenosis ,4018747  -Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233  -Closure of patent ductus arteriosus NEC ,4050114  -Removal of band from pulmonary artery ,4021725  -Aortic valve repair NEC ,4312194  -Plastic repair of aorta and end to end anastomosis of aorta ,4020812  -Repair of double outlet right ventricle ,4049979  -Correction of partial anomalous pulmonary venous drainage ,4018441  -Open aortic valvotomy ,4020520  -Other specified : repair of pulmonary artery ,4018926  -Plication of diaphragm ,4217615  -Relief of left ventricular outflow tract obstruction ,44790092  -Tricuspid valve repair NEC ,4293619  -Repair of tetralogy of fallot using transannular patch ,4308136  -Replacement of mitral valve NEC ,4203153  -Transposition of coronary artery NEC ,4296790  -, -, -, -, -, -, -, -, +sourceCode,concept_id +Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415  +Aortic valve repair NEC ,4312194  +Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133  +Application of band to pulmonary artery ,4049734  +Closure of patent ductus arteriosus NEC ,4050114  +Correction of partial anomalous pulmonary venous drainage ,4018441  +Correction of persistent sinus venosus ,4020508  +Creation of anastomosis to pulmonary artery from vena cava ,4019237  +Extracorporeal membrane oxygenation ,4052536  +Implantation of cardiac pacemaker system NEC ,4144921  +Open aortic valvotomy ,4020520  +Open implantation of ventricular assist device ,4139214  +Other specified : repair of pulmonary artery ,4018926  +Other specified other operations on ventricles of heart ,44510968  +Other specified: plastic repair of aorta ,4019026  +Plastic repair of aorta and end to end anastomosis of aorta ,4020812  +Plication of diaphragm ,4217615  +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380  +Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525  +Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376  +Release of vascular ring of aorta ,4019028  +Relief of left ventricular outflow tract obstruction ,44790092  +Removal of band from pulmonary artery ,4021725  +Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476  +Repair of double outlet right ventricle ,4049979  +Repair of tetralogy of fallot using transannular patch ,4308136  +Repair of subaortic stenosis ,4018747  +Replacement of mitral valve NEC ,4203153  +Repositioning of transposed great arteries ,4019932  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  +Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857  +Transposition of coronary artery NEC ,4296790  +Tricuspid valve repair NEC ,4293619  +Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233  +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127  +Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751  +Unspecified repair of defect of interventricular septum ,4199899  +Unspecified repair of tetralogy of fallot ,4019929  +Unspecified correction of total anomalous pulmonary  venous connection ,4017751  From 5afa3693999fe5ac21fd241574cc3df170c4bd93 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:42:25 +0200 Subject: [PATCH 073/130] Update 5.14_cardiac_complications.csv --- .../5.14_cardiac_complications.csv | 54 ++----------------- 1 file changed, 5 insertions(+), 49 deletions(-) diff --git a/project/data/phems_variable_list/5.14_cardiac_complications.csv b/project/data/phems_variable_list/5.14_cardiac_complications.csv index 11bf4adc..42b0730f 100644 --- a/project/data/phems_variable_list/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/5.14_cardiac_complications.csv @@ -11,52 +11,8 @@ Neurological injury - seizure ,377091  Surgical injury - Blood Loss ,4308537  Surgical injury - Chylothorax ,4306136  Surgical injury - Reexplore for bleeding ,4295705  -,4052536  -,4185565  -,4185565  -,4324124  -,437312  -,442019  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +Extracorporeal membrane oxygenation,4052536  +Low cardiac output state (LCOS) - ECMO,4185565 +LCOS - renal support (CVVH/ PD),4324124  +Surgical injury - Reexplore for bleeding,437312  +Surgical injury - Reexplore for bleeding,442019  From b471c8272d138ea0e2f97aeda9b3720d9fc0520c Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 11:45:54 +0200 Subject: [PATCH 074/130] remove empty lines --- .../5.10_cardiac_radiology.csv | 8 --- .../phems_variable_list/5.11_cardiac_los.csv | 46 ---------------- .../phems_variable_list/5.12_additional.csv | 22 ++------ .../5.13_laboratory_tests.csv | 10 ++-- .../5.14_cardiac_complications.csv | 8 +-- .../phems_variable_list/5.15_vital_signs.csv | 51 ------------------ .../5.16_hsjd_clinical.csv | 53 ------------------- .../phems_variable_list/5.17_hsjd_surgery.csv | 53 ------------------- .../5.18_hsjd_hospitalisation.csv | 51 ------------------ .../5.19_hsjd_complication.csv | 41 -------------- ...e_use_diagnoses_procedures_current_eps.csv | 2 +- .../5.6_antibiotic_medication.csv | 2 +- .../5.9_cardiac_surgery.csv | 4 +- 13 files changed, 17 insertions(+), 334 deletions(-) diff --git a/project/data/phems_variable_list/5.10_cardiac_radiology.csv b/project/data/phems_variable_list/5.10_cardiac_radiology.csv index 850e3454..4627a379 100644 --- a/project/data/phems_variable_list/5.10_cardiac_radiology.csv +++ b/project/data/phems_variable_list/5.10_cardiac_radiology.csv @@ -41,11 +41,3 @@ US vocal cord ,44813863  XR abdomen ,4264477  XR chest ,4163872  XR chest and abdomen ,4169275  -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.11_cardiac_los.csv b/project/data/phems_variable_list/5.11_cardiac_los.csv index 056af8ac..3039e92e 100644 --- a/project/data/phems_variable_list/5.11_cardiac_los.csv +++ b/project/data/phems_variable_list/5.11_cardiac_los.csv @@ -3,49 +3,3 @@ Cardiology ward admission (start datetime and end datetime) ,36675203  HDU admission (start datetime and end datetime) ,4161811  ICU admission (start datetime and end datetime) ,4123933  Total hospital admission (start datetime and end datetime) ,8715  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.12_additional.csv b/project/data/phems_variable_list/5.12_additional.csv index e49f0c39..c235dccf 100644 --- a/project/data/phems_variable_list/5.12_additional.csv +++ b/project/data/phems_variable_list/5.12_additional.csv @@ -11,12 +11,12 @@ FiO2 ,8554  "High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957  "High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383  "High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  "Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  "Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  +"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  Mechanical ventilation ,40493026  Outpatient appointment type (telephone/ clinic visit etc.) ,5083  "Outpatient appointments start datetime, end datetime ",9202  @@ -35,17 +35,3 @@ Systolic blood pressure ,3004249  "Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510  "Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783  "Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975  -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.13_laboratory_tests.csv b/project/data/phems_variable_list/5.13_laboratory_tests.csv index 3f7b8302..555203c6 100644 --- a/project/data/phems_variable_list/5.13_laboratory_tests.csv +++ b/project/data/phems_variable_list/5.13_laboratory_tests.csv @@ -12,8 +12,8 @@ Bicarbonate (venous) ,8753  Bicarbonate (venous) ,3027273  Bilirubin ,3006140  Bilirubin ,8749  -Blood urea nitrogen ,8753  Blood urea nitrogen ,3024641  +Blood urea nitrogen ,8753  CRP ,8751  CRP ,3020460  Calcium ,8753  @@ -25,11 +25,11 @@ Creatinine ,8840  Creatinine ,3051825  Glucose ,3013826  Glucose ,8753  -Hematocrit ,8554  Hematocrit ,3009542  -Hemoglobin ,40762351  -Hemoglobin ,8636  +Hematocrit ,8554  Hemoglobin ,8713  +Hemoglobin ,8636  +Hemoglobin ,40762351  INR prothrombin time ,3034426  INR prothrombin time ,8555  Immature WBC count ,4298431  @@ -42,8 +42,8 @@ Neutrophil count ,3007670  Neutrophil count ,8647  Phosphate ,3003458  Phosphate ,8753  -Platelet count ,4267147  Platelet count ,8647  +Platelet count ,4267147  Potassium ,8753  Potassium ,3005456  Sodium ,3019550  diff --git a/project/data/phems_variable_list/5.14_cardiac_complications.csv b/project/data/phems_variable_list/5.14_cardiac_complications.csv index 42b0730f..a6e81993 100644 --- a/project/data/phems_variable_list/5.14_cardiac_complications.csv +++ b/project/data/phems_variable_list/5.14_cardiac_complications.csv @@ -1,18 +1,18 @@ sourceCode,concept_id CVL infections ,42537043  +Extracorporeal membrane oxygenation,4052536  ICU ward stay ,4123933  LCOS - Cardiac arrest ,321042  LCOS - NEC requiring treatment ,4185565  +LCOS - renal support (CVVH/ PD),4324124  LCOS - renal support (CVVH/ PD) ,4051330  +Low cardiac output state (LCOS) - ECMO,4185565 Low cardiac output state (LCOS) - ECMO ,4185565  Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847  Neurological injury - infarction ,443454  Neurological injury - seizure ,377091  Surgical injury - Blood Loss ,4308537  Surgical injury - Chylothorax ,4306136  -Surgical injury - Reexplore for bleeding ,4295705  -Extracorporeal membrane oxygenation,4052536  -Low cardiac output state (LCOS) - ECMO,4185565 -LCOS - renal support (CVVH/ PD),4324124  Surgical injury - Reexplore for bleeding,437312  Surgical injury - Reexplore for bleeding,442019  +Surgical injury - Reexplore for bleeding ,4295705  diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv index 4c85b7ab..3a13e764 100644 --- a/project/data/phems_variable_list/5.15_vital_signs.csv +++ b/project/data/phems_variable_list/5.15_vital_signs.csv @@ -9,54 +9,3 @@ SBP (Systolic Blood Pressure) ,4152194  SBP (Systolic Blood Pressure) ,8876  SpO2 ,4096101  SpO2 ,8554  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.16_hsjd_clinical.csv b/project/data/phems_variable_list/5.16_hsjd_clinical.csv index 4015c08e..6b3822b4 100644 --- a/project/data/phems_variable_list/5.16_hsjd_clinical.csv +++ b/project/data/phems_variable_list/5.16_hsjd_clinical.csv @@ -7,56 +7,3 @@ Height ,607590  Height ,8582  Weight ,3025315  Weight ,9529  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.17_hsjd_surgery.csv b/project/data/phems_variable_list/5.17_hsjd_surgery.csv index 87a66f27..147fb4b4 100644 --- a/project/data/phems_variable_list/5.17_hsjd_surgery.csv +++ b/project/data/phems_variable_list/5.17_hsjd_surgery.csv @@ -7,56 +7,3 @@ Aristotle's score of surgery ,0  Extubation event ,4150627  STAT/EACTS score of surgery ,40490494  "Surgery start datetime, end datetime ",4301351  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv index 672f8ecd..a7254718 100644 --- a/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv +++ b/project/data/phems_variable_list/5.18_hsjd_hospitalisation.csv @@ -9,54 +9,3 @@ Type of vasoactive infusion ,0  VIS score of vasoactive infusion ,0  "Vasoactive infusion start datetime, end datetime ",42539650  ventilation ,0  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.19_hsjd_complication.csv b/project/data/phems_variable_list/5.19_hsjd_complication.csv index 31d3a45b..f54c4c87 100644 --- a/project/data/phems_variable_list/5.19_hsjd_complication.csv +++ b/project/data/phems_variable_list/5.19_hsjd_complication.csv @@ -19,44 +19,3 @@ Sternum reopening (procedure undertaken) ,4044892  Tracheostomy ,44783799  Vocal Cord Dysfunction ,4046868  intubation ,4202832  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv index 6d6e6f42..b7171725 100644 --- a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv @@ -19,8 +19,8 @@ Diagnosis of chronic condition,201820 Diagnosis of chronic condition,255573 Diagnosis of condition producing immunodeficiency,4140977 Diagnosis of organ system dysfunction,4080011 -Dialysis,4051330 Dialysis,4032243 +Dialysis,4051330 Down's syndrome,439125 ECMO,4052536 ECMO type,37206601 diff --git a/project/data/phems_variable_list/5.6_antibiotic_medication.csv b/project/data/phems_variable_list/5.6_antibiotic_medication.csv index 096e4e4e..aac54744 100644 --- a/project/data/phems_variable_list/5.6_antibiotic_medication.csv +++ b/project/data/phems_variable_list/5.6_antibiotic_medication.csv @@ -10,8 +10,8 @@ Cefazolin,1771162 Cefepime,1748975 Cefotaxime,1774470 Ceftazidime,1776684 -Ceftazidime-Avibactam,1776684 Ceftazidime-Avibactam,46221507 +Ceftazidime-Avibactam,1776684 Ceftolozane-Tazovactam,1741122 Ceftolozane-Tazovactam,45892599 Cefuroxime,1778162 diff --git a/project/data/phems_variable_list/5.9_cardiac_surgery.csv b/project/data/phems_variable_list/5.9_cardiac_surgery.csv index 23734d55..c533c5fb 100644 --- a/project/data/phems_variable_list/5.9_cardiac_surgery.csv +++ b/project/data/phems_variable_list/5.9_cardiac_surgery.csv @@ -28,10 +28,10 @@ Repair of tetralogy of fallot using transannular patch ,4308136  Repair of subaortic stenosis ,4018747  Replacement of mitral valve NEC ,4203153  Repositioning of transposed great arteries ,4019932  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  +Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506  Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857  Transposition of coronary artery NEC ,4296790  Tricuspid valve repair NEC ,4293619  From 948050d6560377bbd9bbc053c3800355f722cb47 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 12:08:28 +0200 Subject: [PATCH 075/130] update README --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 638ed740..50a92653 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,12 @@ devtools::install_github("ohdsi/Capr") For Capr-PHEMS, it is recommended to clone the repo and work from the template script cohortCapr.R, whilst using the Capr-PHEMS.Rproj as the project. # Getting started with Capr-PHEMS +**Prerequisites** +Please make sure you have the following: +- R version >= 4.4.0 +- RStudio >= 2024.04.2 +- (CRAN library) renv >= 1.0.7 + 1. Clone the repo: ``` git clone https://github.com/thehyve/Capr-PHEMS.git @@ -46,8 +52,8 @@ cp connection_config-sample.yml connection_config.yml ``` and fill in your configuration details. -4. Open the R project: Capr-PHEMS.Rproj. Please make sure the "renv" library is installed globally BEFORE opening the project. -Upon opening the project, .Rprofile will be sourced. For the first run, the environment needs to be initialized. renv::init() is called to initialize the R environment and install all required packages. When prompted for use of a description file for dependency discovery, select 1: Use only the DESCRIPTION file. When prompted "This project already has a lockfile", select 1: Restore the project from the lockfile. Required libraries will be installed and the renv will be activated. +4a. Open RStudio and verify renv >= 1.0.7 is installed by calling packageVersion("renv"). If not installed, call install.packages("renv) +4b. 5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to use the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. From 6e1bd5bb677740c48c406924d8472ff2e925f5b3 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 12:12:47 +0200 Subject: [PATCH 076/130] update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 50a92653..dda67a55 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,8 @@ cp connection_config-sample.yml connection_config.yml and fill in your configuration details. 4a. Open RStudio and verify renv >= 1.0.7 is installed by calling packageVersion("renv"). If not installed, call install.packages("renv) -4b. +4b. In the top-right "Project" dropdown menu, select "Open Project" and open ./Capr-PHEMS.Rproj +4c. .Rprofile will be sourced when opening the project; this will trigger renv::init() to initialize the environment. When prompted whether to use a DESCRIPTION file for dependency discovery, select option 1 to use the DESCRIPTION file. Next, you may be prompted the project already has a lockfile with another set of options. Here also select option 1 to restore the project from the lockfile. This will install all required packages to the environment. Your renv is now activated. 5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to use the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. From c8549184d3bf2c3e87341800e159c563895d14c0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 14:06:30 +0200 Subject: [PATCH 077/130] small fixes and additional documentation --- R/countOccurrences.R | 16 ++++++++-------- R/isStandard.R | 7 +++++-- inst/config/connection_config-sample.yml | 8 +++++--- inst/templates/cohortCapr_md.Rmd | 3 ++- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 2fd47fb1..b506db77 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -1,14 +1,14 @@ #' Count Occurrences of Values in Database Tables #' #' This function counts the occurrences of specified concept ids within specified tables in a OMOP database, -#' including direct occurrences and occurrences through descendants, based on a provided schema and links. +#' including direct occurrences and occurrences through descendants, based on a provided cdm_schema and links. #' It returns a tibble summarizing the counts across persons and across records. #' #' @param v A vector of concept_ids to count occurrences for. #' @param tables A character vector of CDM table names to search within. #' @param links A list linking each table to its respective concept_id field. #' @param db_connection A database connection object through which queries will be executed. -#' @param schema The database schema in which the tables are located. +#' @param cdm_schema The database cdm_schema in which the tables are located. #' #' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, #' direct count of records, descendant count of persons, and descendant count of records. @@ -16,15 +16,15 @@ #' record count (direct + descendant). #' #' @examples -#' # Assuming `db_connection` is a valid database connection, `schema` is set to "public", +#' # Assuming `db_connection` is a valid database connection, `cdm_schema` is set to "public", #' # `tables` contains the names of the tables to search, `links` defines the relevant fields, #' # and `v` contains the values to search for: #' results <- countOccurrences(v = c(1, 2), tables = c("observation", "condition_occurrence"), #' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), -#' db_connection = db_connection, schema = "public") +#' db_connection = db_connection, cdm_schema = "public") #' #' @export -countOccurrences <- function(v, tables, links, db_connection, schema) { +countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema) { library(DBI) library(dplyr) library(tibble) @@ -32,7 +32,7 @@ countOccurrences <- function(v, tables, links, db_connection, schema) { stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) - stopifnot(is.character(schema)) + stopifnot(is.character(cdm_schema)) results <- list() @@ -56,8 +56,8 @@ countOccurrences <- function(v, tables, links, db_connection, schema) { SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(descendant_count_person, 0) AS descendant_count_person, coalesce(descendant_count_record, 0) AS descendant_count_record FROM direct_counts d FULL OUTER JOIN descendant_counts dc ON d.concept_id = dc.concept_id", - concept_id_field, schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, - schema, table, schema, concept_id_field, paste(v, collapse = ",") + concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, + cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") ) combined_res <- dbGetQuery(db_connection, combined_sql) diff --git a/R/isStandard.R b/R/isStandard.R index edf7537c..b1898217 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -20,13 +20,16 @@ #' @importFrom dplyr mutate across filter select inner_join #' @importFrom DBI dbGetQuery #' @export -isStandard <- function(db_connection, data_concepts_path, save_path = NULL) { +isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_path = NULL) { library(readr) library(dplyr) library(DBI) # Read concept table from SQL database - concept_table_query <- "SELECT concept_id, concept_name, standard_concept FROM cdm.concept" + concept_table_query <- paste0( + "SELECT concept_id, concept_name, standard_concept FROM ", vocab_schema, ".concept" + ) + print(concept_table_query) concept_table <- dbGetQuery(db_connection, concept_table_query) %>% mutate(concept_id = as.character(concept_id)) %>% mutate(concept_id = tolower(trimws(concept_id))) diff --git a/inst/config/connection_config-sample.yml b/inst/config/connection_config-sample.yml index 0e8a8f53..1e2bc71e 100644 --- a/inst/config/connection_config-sample.yml +++ b/inst/config/connection_config-sample.yml @@ -3,13 +3,13 @@ # Default values are necessary for the `config` CRAN library, not used in package otherwise # No need to change these values; they are unused default: - dbms: 'postgres' + dbms: 'postgres' # Database management system user: 'postgres' - password: null + password: null server: localhost/omop_db port: 5432 oracleDriver: null - pathToDriver: '~/jdbc' + pathToDriver: '~/jdbc/' cdm_schema: 'cdm' vocabulary_schema: 'vocab' cohort_schema: 'cohort' @@ -22,6 +22,8 @@ default: # as not all of these details may be required. # cdm_schema should point to the OMOP CDM schema # vocabulary_schema should point to the schema where the vocabulary tables are stored +# cohort_schema should point to the schema where the cohort tables are stored +# All schemas should be EXISTING in the database config: dbms: '' user: '' diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 68468467..56559e9a 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -86,7 +86,7 @@ source("./R/table_linked_to_concept_field.R") # ) %>% print() labTestsCounts <- countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema + conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema ) %>% print() # Disconnect @@ -106,6 +106,7 @@ source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, # (optional) Save the results (with standard and non-standard concepts) save_path = config_oth$save_path_isStandard ) From 495d8b8140d20548bea5c0cac2a0e766c88aab9e Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 14:24:57 +0200 Subject: [PATCH 078/130] update .gitignore --- .gitignore | 2 +- inst/extdata/json/additional_cs.json | 497 ++++++ .../extdata/json/antibioticResistance_cs.json | 106 ++ inst/extdata/json/antibiotics_cs.json | 803 +++++++++ inst/extdata/json/antifungals_cs.json | 89 + inst/extdata/json/arterialBloodGas_cs.json | 89 + .../extdata/json/cardiacComplications_cs.json | 72 + inst/extdata/json/cardiacProcedures_cs.json | 429 +++++ inst/extdata/json/cardiacRadiology_cs.json | 684 ++++++++ inst/extdata/json/cardiacSurgery_cs.json | 701 ++++++++ inst/extdata/json/cardiac_LOS_cs.json | 72 + inst/extdata/json/cohort.json | 1159 +++++++++++++ inst/extdata/json/healthcareUse_cs.json | 1432 +++++++++++++++++ inst/extdata/json/immunosuppressants_cs.json | 106 ++ inst/extdata/json/intubation_cs.json | 21 + inst/extdata/json/labTestsUC2_cs.json | 293 ++++ inst/extdata/json/labTests_cs.json | 497 ++++++ .../json/physicalExaminationSigns_cs.json | 140 ++ .../json/vasopressors_inotropes_cs.json | 191 +++ inst/extdata/json/venousBloodGas_cs.json | 174 ++ inst/extdata/json/visScoreMedications_cs.json | 106 ++ inst/extdata/json/vitalSignsUC2_cs.json | 140 ++ 22 files changed, 7802 insertions(+), 1 deletion(-) create mode 100644 inst/extdata/json/additional_cs.json create mode 100644 inst/extdata/json/antibioticResistance_cs.json create mode 100644 inst/extdata/json/antibiotics_cs.json create mode 100644 inst/extdata/json/antifungals_cs.json create mode 100644 inst/extdata/json/arterialBloodGas_cs.json create mode 100644 inst/extdata/json/cardiacComplications_cs.json create mode 100644 inst/extdata/json/cardiacProcedures_cs.json create mode 100644 inst/extdata/json/cardiacRadiology_cs.json create mode 100644 inst/extdata/json/cardiacSurgery_cs.json create mode 100644 inst/extdata/json/cardiac_LOS_cs.json create mode 100644 inst/extdata/json/cohort.json create mode 100644 inst/extdata/json/healthcareUse_cs.json create mode 100644 inst/extdata/json/immunosuppressants_cs.json create mode 100644 inst/extdata/json/intubation_cs.json create mode 100644 inst/extdata/json/labTestsUC2_cs.json create mode 100644 inst/extdata/json/labTests_cs.json create mode 100644 inst/extdata/json/physicalExaminationSigns_cs.json create mode 100644 inst/extdata/json/vasopressors_inotropes_cs.json create mode 100644 inst/extdata/json/venousBloodGas_cs.json create mode 100644 inst/extdata/json/visScoreMedications_cs.json create mode 100644 inst/extdata/json/vitalSignsUC2_cs.json diff --git a/.gitignore b/.gitignore index db3603ca..72be200a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ inst/config/* inst/extdata/* !inst/extdata/phems_variable_list !inst/extdata/json -inst/extdata/json/* +inst/extdata/json/* # Ignore everything inside the json directory !inst/extdata/vocabularies inst/extdata/vocabularies/* diff --git a/inst/extdata/json/additional_cs.json b/inst/extdata/json/additional_cs.json new file mode 100644 index 00000000..a4d12593 --- /dev/null +++ b/inst/extdata/json/additional_cs.json @@ -0,0 +1,497 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4124462, + "CONCEPT_NAME": "None", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "260413007", + "DOMAIN_ID": "Meas Value", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Qualifier Value" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4095105, + "CONCEPT_NAME": "Base deficit measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "26154000", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4123933, + "CONCEPT_NAME": "Admission to pediatric intensive care unit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "305353001", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4234469, + "CONCEPT_NAME": "Diagnosis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "439401001", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40493026, + "CONCEPT_NAME": "Mechanical ventilator", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "449071006", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44803020, + "CONCEPT_NAME": "Primary reason for admission", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "507151000000102", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4209008, + "CONCEPT_NAME": "Pupillary function", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "56777005", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 260134, + "CONCEPT_NAME": "Croup", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71186008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 432571, + "CONCEPT_NAME": "Malignant lymphoma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "118600007", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4029498, + "CONCEPT_NAME": "Seizure disorder", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "128613002", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 317009, + "CONCEPT_NAME": "Asthma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "195967001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 201957, + "CONCEPT_NAME": "Necrotizing enterocolitis in fetus OR newborn", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2707005", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 43530727, + "CONCEPT_NAME": "Spontaneous cerebral hemorrhage", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "291571000119106", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 29783, + "CONCEPT_NAME": "Severe combined immunodeficiency disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "31323000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4165112, + "CONCEPT_NAME": "Bronchiolitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "4120002", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 443727, + "CONCEPT_NAME": "Diabetic ketoacidosis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "420422005", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 314383, + "CONCEPT_NAME": "Myocarditis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "50920009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4245975, + "CONCEPT_NAME": "Hepatic failure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "59927004", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 440207, + "CONCEPT_NAME": "Hypoplastic left heart syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "62067003", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42537745, + "CONCEPT_NAME": "Bone marrow transplant present", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "737300001", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 442588, + "CONCEPT_NAME": "Obstructive sleep apnea syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "78275009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4213310, + "CONCEPT_NAME": "Degenerative disease of the central nervous system", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "80690008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321319, + "CONCEPT_NAME": "Cardiomyopathy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85898001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 317510, + "CONCEPT_NAME": "Leukemia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "93143009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 5083, + "CONCEPT_NAME": "Telehealth", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "02", + "DOMAIN_ID": "Visit", + "VOCABULARY_ID": "CMS Place of Service", + "CONCEPT_CLASS_ID": "Visit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42869590, + "CONCEPT_NAME": "Oxygen/Gas total [Pure volume fraction] Inhaled gas", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71835-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3004249, + "CONCEPT_NAME": "Systolic blood pressure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8480-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/antibioticResistance_cs.json b/inst/extdata/json/antibioticResistance_cs.json new file mode 100644 index 00000000..9981ea7f --- /dev/null +++ b/inst/extdata/json/antibioticResistance_cs.json @@ -0,0 +1,106 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4019195, + "CONCEPT_NAME": "Methicillin resistant Staphylococcus aureus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "115329001", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Organism" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4257547, + "CONCEPT_NAME": "Extended spectrum beta-lactamase producing bacteria", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "409799006", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Organism" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37017134, + "CONCEPT_NAME": "Multidrug-resistant bacteria", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "713351000", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Organism" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1707687, + "CONCEPT_NAME": "vancomycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "11124", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 997881, + "CONCEPT_NAME": "clindamycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2582", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1746940, + "CONCEPT_NAME": "erythromycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "4053", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/antibiotics_cs.json b/inst/extdata/json/antibiotics_cs.json new file mode 100644 index 00000000..5d24493a --- /dev/null +++ b/inst/extdata/json/antibiotics_cs.json @@ -0,0 +1,803 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4273629, + "CONCEPT_NAME": "Chemotherapy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "367336001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 21603754, + "CONCEPT_NAME": "Monoclonal antibodies", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "L01XC", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "ATC", + "CONCEPT_CLASS_ID": "ATC 4th" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1836430, + "CONCEPT_NAME": "sulfamethoxazole", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "10180", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1836948, + "CONCEPT_NAME": "tetracycline", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "10395", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 902722, + "CONCEPT_NAME": "tobramycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "10627", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1705674, + "CONCEPT_NAME": "trimethoprim", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "10829", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1707687, + "CONCEPT_NAME": "vancomycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "11124", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 19010400, + "CONCEPT_NAME": "fusidate", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "113608", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45892419, + "CONCEPT_NAME": "gentamicin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1596450", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45892599, + "CONCEPT_NAME": "ceftolozane", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1597609", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 46221507, + "CONCEPT_NAME": "avibactam", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1603834", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1734104, + "CONCEPT_NAME": "azithromycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "18631", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1736887, + "CONCEPT_NAME": "linezolid", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "190376", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1748975, + "CONCEPT_NAME": "cefepime", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20481", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1750500, + "CONCEPT_NAME": "clarithromycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "21212", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1769535, + "CONCEPT_NAME": "cefadroxil", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2177", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1771162, + "CONCEPT_NAME": "cefazolin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2180", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1774470, + "CONCEPT_NAME": "cefotaxime", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2186", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1776684, + "CONCEPT_NAME": "ceftazidime", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2191", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1778162, + "CONCEPT_NAME": "cefuroxime", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2194", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1786617, + "CONCEPT_NAME": "daptomycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "22299", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1797513, + "CONCEPT_NAME": "ciprofloxacin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2551", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 997881, + "CONCEPT_NAME": "clindamycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2582", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 901845, + "CONCEPT_NAME": "colistin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2709", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1709170, + "CONCEPT_NAME": "meropenem", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "29561", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1717963, + "CONCEPT_NAME": "ertapenem", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "325642", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1518254, + "CONCEPT_NAME": "dexamethasone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3264", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1741122, + "CONCEPT_NAME": "tazobactam", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "37617", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1746940, + "CONCEPT_NAME": "erythromycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "4053", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 951511, + "CONCEPT_NAME": "mupirocin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "42372", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 956653, + "CONCEPT_NAME": "fosfomycin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "4550", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1759842, + "CONCEPT_NAME": "clavulanate", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "48203", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 975125, + "CONCEPT_NAME": "hydrocortisone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5492", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1778262, + "CONCEPT_NAME": "imipenem", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5690", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 19078399, + "CONCEPT_NAME": "teicoplanin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "57021", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1790868, + "CONCEPT_NAME": "amikacin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "641", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1506270, + "CONCEPT_NAME": "methylprednisolone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6902", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1713332, + "CONCEPT_NAME": "amoxicillin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "723", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1717327, + "CONCEPT_NAME": "ampicillin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "733", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 920293, + "CONCEPT_NAME": "nitrofurantoin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7454", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1721543, + "CONCEPT_NAME": "norfloxacin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7517", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1724703, + "CONCEPT_NAME": "oxacillin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7773", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1728416, + "CONCEPT_NAME": "penicillin G", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7980", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1742253, + "CONCEPT_NAME": "levofloxacin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "82122", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1746114, + "CONCEPT_NAME": "piperacillin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8339", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1550557, + "CONCEPT_NAME": "prednisolone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8638", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1763204, + "CONCEPT_NAME": "rifampin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "9384", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/antifungals_cs.json b/inst/extdata/json/antifungals_cs.json new file mode 100644 index 00000000..4cc930b1 --- /dev/null +++ b/inst/extdata/json/antifungals_cs.json @@ -0,0 +1,89 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 1714277, + "CONCEPT_NAME": "voriconazole", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "121243", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 35606695, + "CONCEPT_NAME": "isavuconazole", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1720882", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 19018013, + "CONCEPT_NAME": "micafungin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "325887", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 19026450, + "CONCEPT_NAME": "anidulafungin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "341018", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1754994, + "CONCEPT_NAME": "fluconazole", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "4450", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/arterialBloodGas_cs.json b/inst/extdata/json/arterialBloodGas_cs.json new file mode 100644 index 00000000..3d80a271 --- /dev/null +++ b/inst/extdata/json/arterialBloodGas_cs.json @@ -0,0 +1,89 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 3003396, + "CONCEPT_NAME": "Base excess in Arterial blood by calculation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1925-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019977, + "CONCEPT_NAME": "pH of Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2744-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1960-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2703-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cardiacComplications_cs.json b/inst/extdata/json/cardiacComplications_cs.json new file mode 100644 index 00000000..673c71ed --- /dev/null +++ b/inst/extdata/json/cardiacComplications_cs.json @@ -0,0 +1,72 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "Peritoneal dialysis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71192002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "Continuous venovenous hemofiltration", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233585000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "Low cardiac output syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "44088000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cardiacProcedures_cs.json b/inst/extdata/json/cardiacProcedures_cs.json new file mode 100644 index 00000000..3221a0f0 --- /dev/null +++ b/inst/extdata/json/cardiacProcedures_cs.json @@ -0,0 +1,429 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "Transposition of coronary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384678000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "Transplantation of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32413006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "224111000000108", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "Revision of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174885005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "Replacement of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428893001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "Replacement of pulmonary valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "88045004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "Replacement of mitral valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53059001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "89814007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "Repair of tricuspid valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384643000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "Repair of tetralogy of Fallot", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174814003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "Repair of sinus venosus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174899009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "Repair of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175253007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174900004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "Repair of ostium primum defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47195003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "Repair of heart valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "Repair of double outlet right ventricle", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233126007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "Removal of band from pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175261002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "223341000000109", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "Release of vascular ring of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175341006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447748008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "Plication of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "81913003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175338002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "Plastic repair of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175337007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cardiacRadiology_cs.json b/inst/extdata/json/cardiacRadiology_cs.json new file mode 100644 index 00000000..5f952556 --- /dev/null +++ b/inst/extdata/json/cardiacRadiology_cs.json @@ -0,0 +1,684 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4019824, + "CONCEPT_NAME": "Transesophageal echocardiography", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "105376000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4032404, + "CONCEPT_NAME": "Bronchoscopy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "10847001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4065416, + "CONCEPT_NAME": "Exercise tolerance test", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "165079009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4345925, + "CONCEPT_NAME": "Videofluoroscopy swallow", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "241149003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4083106, + "CONCEPT_NAME": "US scan of head", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "241449005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4083108, + "CONCEPT_NAME": "US scan of neck", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "241453007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4082979, + "CONCEPT_NAME": "MRI of head", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "241601008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4093436, + "CONCEPT_NAME": "Ultrasonography of thorax", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "25850001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4125350, + "CONCEPT_NAME": "CT of head", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "303653007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4125530, + "CONCEPT_NAME": "US urinary tract", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "303917008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44802640, + "CONCEPT_NAME": "MRI study for cardiac congenital anomaly", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "322731000000101", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4163872, + "CONCEPT_NAME": "Plain chest X-ray", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "399208008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4167029, + "CONCEPT_NAME": "Ultrasonography of inguinal region", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "418105000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4167052, + "CONCEPT_NAME": "Doppler ultrasonography of kidney", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "418354002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4305221, + "CONCEPT_NAME": "US scan of abdomen and pelvis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "418394000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4303522, + "CONCEPT_NAME": "US scan of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "418889006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4306317, + "CONCEPT_NAME": "CT angiography of coronary artery with contrast", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "419545005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4169275, + "CONCEPT_NAME": "X-ray of chest and abdomen", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "420233006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4322380, + "CONCEPT_NAME": "Insertion of peripherally inserted central catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "425196008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4140473, + "CONCEPT_NAME": "Holter extended electrocardiographic recording", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "427047002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4329508, + "CONCEPT_NAME": "Ultrasonography of pleural cavity", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "431757007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4335392, + "CONCEPT_NAME": "Doppler ultrasonography of vein of lower limb", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "432336004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203365, + "CONCEPT_NAME": "Epicardial echocardiography", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "433232009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4335825, + "CONCEPT_NAME": "Transthoracic echocardiography", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "433236007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40482732, + "CONCEPT_NAME": "Insertion of tunneled venous catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "442309004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40489841, + "CONCEPT_NAME": "Doppler ultrasonography of jugular vein", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "446849004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40492338, + "CONCEPT_NAME": "Cardiopulmonary exercise test", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447346005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40488431, + "CONCEPT_NAME": "Interrogation of cardiac pacemaker", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "448150008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42873079, + "CONCEPT_NAME": "Removal of tunneled central venous catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "450330005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4261497, + "CONCEPT_NAME": "Ultrasonography of abdomen", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "45036003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4205144, + "CONCEPT_NAME": "Portable electroencephalogram", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "54061003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4181917, + "CONCEPT_NAME": "Electroencephalogram", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "54550000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4264477, + "CONCEPT_NAME": "Diagnostic radiography of abdomen", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "60654006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45764527, + "CONCEPT_NAME": "Electrocardiographic Holter analyzer", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "701233001", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45765560, + "CONCEPT_NAME": "Cardiovascular monitor", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "702527008", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4327032, + "CONCEPT_NAME": "CT of thorax with contrast", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "75385009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 35622931, + "CONCEPT_NAME": "Doppler ultrasound", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "765172009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44813863, + "CONCEPT_NAME": "Ultrasonography of vocal cord", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "844621000000101", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312208, + "CONCEPT_NAME": "Contrast bronchogram", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85895003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4235141, + "CONCEPT_NAME": "Check artificial pacemaker", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "9061001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cardiacSurgery_cs.json b/inst/extdata/json/cardiacSurgery_cs.json new file mode 100644 index 00000000..c014bb4d --- /dev/null +++ b/inst/extdata/json/cardiacSurgery_cs.json @@ -0,0 +1,701 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4049734, + "CONCEPT_NAME": "Banding of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "15648005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "Repair of tetralogy of Fallot", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174814003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019932, + "CONCEPT_NAME": "Arterial switch operation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174826008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020376, + "CONCEPT_NAME": "Closure of defect of interatrial septum using pericardial patch", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174845004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020506, + "CONCEPT_NAME": "Creation of valved conduit between right ventricle of heart and pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174883003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "Revision of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174885005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "Repair of sinus venosus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174899009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174900004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020520, + "CONCEPT_NAME": "Open aortic valvotomy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174968009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018747, + "CONCEPT_NAME": "Operations on the left ventricular outflow tract", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174997007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019233, + "CONCEPT_NAME": "Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175236000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019237, + "CONCEPT_NAME": "Anastomosis of vena cava to pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175249005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "Repair of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175253007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "Removal of band from pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175261002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "Plastic repair of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175337007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175338002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "Release of vascular ring of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175341006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "223341000000109", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "224111000000108", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4336751, + "CONCEPT_NAME": "Allotransplant of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "232973007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "Repair of double outlet right ventricle", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233126007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4050114, + "CONCEPT_NAME": "Closure of ductus arteriosus with clip", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233199008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4052536, + "CONCEPT_NAME": "Extracorporeal membrane oxygenation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233573008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790415, + "CONCEPT_NAME": "Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233601000000100", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4144921, + "CONCEPT_NAME": "Implantation of cardiac pacemaker", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "307280005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "Transplantation of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32413006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44793133, + "CONCEPT_NAME": "Aortopulmonary reconstruction with systemic to pulmonary arterial shunt", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "378121000000101", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "Repair of tricuspid valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384643000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "Transposition of coronary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384678000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4139214, + "CONCEPT_NAME": "Open implantation of cardiac ventricular assist device", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "426568003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "Replacement of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428893001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447748008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "Repair of ostium primum defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47195003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4199899, + "CONCEPT_NAME": "Closure of ventricular septal defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52930005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "Replacement of mitral valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53059001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "Plication of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "81913003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4308136, + "CONCEPT_NAME": "Complete repair of tetralogy of Fallot with transannular patch", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "83698002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "Repair of heart valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "Replacement of pulmonary valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "88045004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "89814007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cardiac_LOS_cs.json b/inst/extdata/json/cardiac_LOS_cs.json new file mode 100644 index 00000000..4599d6a9 --- /dev/null +++ b/inst/extdata/json/cardiac_LOS_cs.json @@ -0,0 +1,72 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4123933, + "CONCEPT_NAME": "Admission to pediatric intensive care unit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "305353001", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 8715, + "CONCEPT_NAME": "Hospital admission", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32485007", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4161811, + "CONCEPT_NAME": "Admission to high dependency unit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "398162007", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 36675203, + "CONCEPT_NAME": "Admission to pediatric cardiology department", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "771550009", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/cohort.json b/inst/extdata/json/cohort.json new file mode 100644 index 00000000..4850301a --- /dev/null +++ b/inst/extdata/json/cohort.json @@ -0,0 +1,1159 @@ +{ + "ConceptSets": [ + { + "id": 0, + "name": "labTests", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "White blood cell count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "767002", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5171-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "59260-0", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "Platelet count", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1022651000000100", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit [Volume Fraction] of Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "Prothrombin time (PT)", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5902-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32693-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "38483-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14937-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14749-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14631-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6298-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2593-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2069-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2000-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14879-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1988-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "Blood venous pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007071000000105", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "Blood arterial pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007061000000103", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2021-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2705-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2703-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14627-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1960-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 1, + "name": "cardiacComplications", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "Peritoneal dialysis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71192002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "Continuous venovenous hemofiltration", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233585000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4185565, + "CONCEPT_NAME": "Low cardiac output syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "44088000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 2, + "name": "cardiacProcedures", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4296790, + "CONCEPT_NAME": "Transposition of coronary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384678000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4137127, + "CONCEPT_NAME": "Transplantation of heart", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32413006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789857, + "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "224111000000108", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019950, + "CONCEPT_NAME": "Revision of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174885005", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4178479, + "CONCEPT_NAME": "Replacement of valved cardiac conduit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428893001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4339184, + "CONCEPT_NAME": "Replacement of pulmonary valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "88045004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4203153, + "CONCEPT_NAME": "Replacement of mitral valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53059001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4232476, + "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "89814007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4293619, + "CONCEPT_NAME": "Repair of tricuspid valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "384643000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017751, + "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019929, + "CONCEPT_NAME": "Repair of tetralogy of Fallot", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174814003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020508, + "CONCEPT_NAME": "Repair of sinus venosus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174899009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018926, + "CONCEPT_NAME": "Repair of pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175253007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4018441, + "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "174900004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4187380, + "CONCEPT_NAME": "Repair of ostium primum defect", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47195003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4312194, + "CONCEPT_NAME": "Repair of heart valve", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "85830006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4049979, + "CONCEPT_NAME": "Repair of double outlet right ventricle", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233126007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4021725, + "CONCEPT_NAME": "Removal of band from pulmonary artery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175261002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790092, + "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "223341000000109", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019028, + "CONCEPT_NAME": "Release of vascular ring of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175341006", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40486525, + "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "447748008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4217615, + "CONCEPT_NAME": "Plication of diaphragm", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "81913003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4020812, + "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175338002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4019026, + "CONCEPT_NAME": "Plastic repair of aorta", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "175337007", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44510968, + "CONCEPT_NAME": "", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "", + "DOMAIN_ID": "", + "VOCABULARY_ID": "", + "CONCEPT_CLASS_ID": "" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + }, + { + "id": 3, + "name": "intubation", + "expression": { + "items": [ + { + "concept": { + "CONCEPT_ID": 4202832, + "CONCEPT_NAME": "Intubation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52765003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] + } + } + ], + "PrimaryCriteria": { + "CriteriaList": [ + { + "Measurement": { + "CodesetId": 0 + } + } + ], + "ObservationWindow": { + "PriorDays": 0, + "PostDays": 0 + }, + "PrimaryCriteriaLimit": { + "Type": "All" + } + }, + "QualifiedLimit": { + "Type": "First" + }, + "ExpressionLimit": { + "Type": "First" + }, + "InclusionRules": [ + { + "name": "rule1", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ConditionOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + }, + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 1 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + }, + { + "name": "rule2", + "expression": { + "Type": "ANY", + "CriteriaList": [ + { + "Criteria": { + "ProcedureOccurrence": { + "CodesetId": 2 + } + }, + "StartWindow": { + "Start": { + "Coeff": -1 + }, + "End": { + "Coeff": 1 + }, + "UseIndexEnd": false, + "UseEventEnd": false + }, + "Occurrence": { + "Type": 2, + "Count": 1 + } + } + ], + "DemographicCriteriaList": [], + "Groups": [] + } + } + ], + "CensoringCriteria": [ + { + "ProcedureOccurrence": { + "CodesetId": 3 + } + } + ], + "CollapseSettings": { + "CollapseType": "ERA", + "EraPad": 0 + }, + "CensorWindow": {}, + "cdmVersionRange": ">=5.0.0" +} diff --git a/inst/extdata/json/healthcareUse_cs.json b/inst/extdata/json/healthcareUse_cs.json new file mode 100644 index 00000000..9f7e33f0 --- /dev/null +++ b/inst/extdata/json/healthcareUse_cs.json @@ -0,0 +1,1432 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 37174269, + "CONCEPT_NAME": "At increased risk of sepsis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "721181000124100", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4032243, + "CONCEPT_NAME": "Dialysis procedure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "108241001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 197320, + "CONCEPT_NAME": "Acute kidney injury", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14669001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4074689, + "CONCEPT_NAME": "Open drainage of pleural cavity", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "177788009", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4084670, + "CONCEPT_NAME": "Non-urgent surgical admission", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "183488000", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4070667, + "CONCEPT_NAME": "Urinary catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20568009", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790095, + "CONCEPT_NAME": "Invasive ventilation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "226471000000101", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4052536, + "CONCEPT_NAME": "Extracorporeal membrane oxygenation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233573008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4051330, + "CONCEPT_NAME": "Continuous venovenous hemofiltration", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233585000", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44790567, + "CONCEPT_NAME": "Patient transfer from hospital to hospital", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "239531000000108", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 133327, + "CONCEPT_NAME": "Viremia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2528003", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4097216, + "CONCEPT_NAME": "Endotracheal tube", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "26412008", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4085730, + "CONCEPT_NAME": "Antibiotic therapy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "281789004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4123946, + "CONCEPT_NAME": "Admission to surgical department", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "305408004", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4208341, + "CONCEPT_NAME": "Solid organ transplant", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "313039003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4193843, + "CONCEPT_NAME": "Oxygenation index measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "313558004", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4235043, + "CONCEPT_NAME": "Ventricular assist device", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "360064003", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 443392, + "CONCEPT_NAME": "Malignant neoplastic disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "363346000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4181511, + "CONCEPT_NAME": "Administration of antineoplastic agent", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "363688001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4294886, + "CONCEPT_NAME": "Patient transfer, in-hospital", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "37729005", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4301351, + "CONCEPT_NAME": "Surgical procedure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "387713003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4140762, + "CONCEPT_NAME": "Antiviral therapy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "427314002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4177205, + "CONCEPT_NAME": "Cannulation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "42825003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4177224, + "CONCEPT_NAME": "Non-invasive ventilation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "428311008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45758028, + "CONCEPT_NAME": "Arterial blood pressure catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "462514007", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44803020, + "CONCEPT_NAME": "Primary reason for admission", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "507151000000102", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4179206, + "CONCEPT_NAME": "Central venous catheter", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52124006", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 132736, + "CONCEPT_NAME": "Bacteremia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5758002", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44783799, + "CONCEPT_NAME": "Exteriorization of trachea", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "697984004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 45768671, + "CONCEPT_NAME": "Asplenia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "707147002", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4324124, + "CONCEPT_NAME": "Peritoneal dialysis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71192002", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 435785, + "CONCEPT_NAME": "Meningitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7180009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 201820, + "CONCEPT_NAME": "Diabetes mellitus", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "73211009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42538045, + "CONCEPT_NAME": "Nasogastric/orogastric tube stylet", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "738664002", + "DOMAIN_ID": "Device", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Physical Object" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37206601, + "CONCEPT_NAME": "Venoarterial extracorporeal membrane oxygenation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "786451004", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37206603, + "CONCEPT_NAME": "Venovenous extracorporeal membrane oxygenation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "786453001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4314777, + "CONCEPT_NAME": "Immunosuppressive therapy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "86553008", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 604243, + "CONCEPT_NAME": "Acquired neutropenia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1156296001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 444187, + "CONCEPT_NAME": "Open wound", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "125643001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 22281, + "CONCEPT_NAME": "Sickle cell-hemoglobin SS disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "127040003", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 435613, + "CONCEPT_NAME": "Cellulitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "128045006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4134120, + "CONCEPT_NAME": "Cerebral palsy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "128188000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 444202, + "CONCEPT_NAME": "Abscess", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "128477000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 312723, + "CONCEPT_NAME": "Congenital heart disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "13213009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 255573, + "CONCEPT_NAME": "Chronic obstructive lung disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "13645005", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 255848, + "CONCEPT_NAME": "Pneumonia", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "233604007", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 433740, + "CONCEPT_NAME": "Immunodeficiency disorder", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "234532001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4080011, + "CONCEPT_NAME": "Organ dysfunction syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "238147009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 434821, + "CONCEPT_NAME": "Systemic inflammatory response syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "238149007", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 81539, + "CONCEPT_NAME": "Mitochondrial cytopathy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "240096000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4103588, + "CONCEPT_NAME": "Acute tuberculosis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "25629007", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 443783, + "CONCEPT_NAME": "Chronic disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "27624003", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4140977, + "CONCEPT_NAME": "Secondary immune deficiency disorder", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "33286000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 201606, + "CONCEPT_NAME": "Crohn's disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "34000006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4243475, + "CONCEPT_NAME": "Acute hepatitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "37871000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4300243, + "CONCEPT_NAME": "Postoperative complication", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "385486001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 439125, + "CONCEPT_NAME": "Complete trisomy 21 syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "41040004", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 321042, + "CONCEPT_NAME": "Cardiac arrest", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "410429000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4331815, + "CONCEPT_NAME": "Acute urinary tract infection", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "431309003", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 195212, + "CONCEPT_NAME": "Hypercortisolism", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "47270006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 196152, + "CONCEPT_NAME": "Peritonitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "48661000", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 314383, + "CONCEPT_NAME": "Myocarditis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "50920009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 195314, + "CONCEPT_NAME": "Nephrotic syndrome", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52254009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 441589, + "CONCEPT_NAME": "Endocarditis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "56819008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4271450, + "CONCEPT_NAME": "Acute infectious disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "63171007", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 81893, + "CONCEPT_NAME": "Ulcerative colitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "64766004", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 80809, + "CONCEPT_NAME": "Rheumatoid arthritis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "69896004", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4322814, + "CONCEPT_NAME": "Meningoencephalitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7125002", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 36716945, + "CONCEPT_NAME": "Renal insufficiency", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "723188008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 440448, + "CONCEPT_NAME": "Appendicitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "74400008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 433968, + "CONCEPT_NAME": "Candidiasis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "78048006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44807226, + "CONCEPT_NAME": "Necrotising enterocolitis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "805601000000103", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 132797, + "CONCEPT_NAME": "Sepsis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "91302008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44777590, + "CONCEPT_NAME": "centimeter watercolumn", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "cm[H2O]", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44777602, + "CONCEPT_NAME": "kilopascal", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "kPa", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 8510, + "CONCEPT_NAME": "unit", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "[U]", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 8554, + "CONCEPT_NAME": "percent", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "%", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 720868, + "CONCEPT_NAME": "fraction", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "{fraction}", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 8529, + "CONCEPT_NAME": "index", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "{index}", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 8876, + "CONCEPT_NAME": "millimeter mercury column", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "mm[Hg]", + "DOMAIN_ID": "Unit", + "VOCABULARY_ID": "UCUM", + "CONCEPT_CLASS_ID": "Unit" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 21602722, + "CONCEPT_NAME": "CORTICOSTEROIDS FOR SYSTEMIC USE", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "H02", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "ATC", + "CONCEPT_CLASS_ID": "ATC 2nd" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42869590, + "CONCEPT_NAME": "Oxygen/Gas total [Pure volume fraction] Inhaled gas", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "71835-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42527086, + "CONCEPT_NAME": "Mean airway pressure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "60949-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1340204, + "CONCEPT_NAME": "History of event", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "OMOP5165859", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "OMOP Extension", + "CONCEPT_CLASS_ID": "Context-dependent" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/immunosuppressants_cs.json b/inst/extdata/json/immunosuppressants_cs.json new file mode 100644 index 00000000..fd9ac992 --- /dev/null +++ b/inst/extdata/json/immunosuppressants_cs.json @@ -0,0 +1,106 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4273629, + "CONCEPT_NAME": "Chemotherapy", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "367336001", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 21603754, + "CONCEPT_NAME": "Monoclonal antibodies", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "L01XC", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "ATC", + "CONCEPT_CLASS_ID": "ATC 4th" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1518254, + "CONCEPT_NAME": "dexamethasone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3264", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 975125, + "CONCEPT_NAME": "hydrocortisone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5492", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1506270, + "CONCEPT_NAME": "methylprednisolone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6902", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1550557, + "CONCEPT_NAME": "prednisolone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8638", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/intubation_cs.json b/inst/extdata/json/intubation_cs.json new file mode 100644 index 00000000..6379aefd --- /dev/null +++ b/inst/extdata/json/intubation_cs.json @@ -0,0 +1,21 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4202832, + "CONCEPT_NAME": "Intubation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52765003", + "DOMAIN_ID": "Procedure", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/labTestsUC2_cs.json b/inst/extdata/json/labTestsUC2_cs.json new file mode 100644 index 00000000..74f232b6 --- /dev/null +++ b/inst/extdata/json/labTestsUC2_cs.json @@ -0,0 +1,293 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 37393605, + "CONCEPT_NAME": "D-dimer level", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1019221000000107", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4017361, + "CONCEPT_NAME": "Blood urea nitrogen measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "105011006", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4036356, + "CONCEPT_NAME": "Detection of bacteria", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "117725006", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44789220, + "CONCEPT_NAME": "Ionised calcium measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "194841000000106", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4094436, + "CONCEPT_NAME": "Fibrinogen measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "250346004", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4118986, + "CONCEPT_NAME": "Bilirubin measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "302787001", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4196268, + "CONCEPT_NAME": "Polymerase chain reaction observation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "315010001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Clinical Finding" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 440029, + "CONCEPT_NAME": "Viral disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "34014006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4212899, + "CONCEPT_NAME": "Total white blood count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "391558003", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4175016, + "CONCEPT_NAME": "Partial thromboplastin time, activated", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "42525009", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 42536081, + "CONCEPT_NAME": "Adrenal medulla hormone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "734672009", + "DOMAIN_ID": "Observation", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disposition" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4299649, + "CONCEPT_NAME": "Quantitative microbial culture and measurement", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "77709000", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 44806682, + "CONCEPT_NAME": "Infection resistant to multiple antibiotics", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "822401000000100", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 432545, + "CONCEPT_NAME": "Bacterial infectious disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "87628006", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14749-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3046279, + "CONCEPT_NAME": "Procalcitonin [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "33959-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033291, + "CONCEPT_NAME": "Interleukin 6 [Mass/volume] in Body fluid", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "49732-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/labTests_cs.json b/inst/extdata/json/labTests_cs.json new file mode 100644 index 00000000..a7b8d748 --- /dev/null +++ b/inst/extdata/json/labTests_cs.json @@ -0,0 +1,497 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4298431, + "CONCEPT_NAME": "White blood cell count", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "767002", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3007670, + "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5171-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40762351, + "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "59260-0", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37393863, + "CONCEPT_NAME": "Platelet count", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1022651000000100", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3009542, + "CONCEPT_NAME": "Hematocrit [Volume Fraction] of Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "20570-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3034426, + "CONCEPT_NAME": "Prothrombin time (PT)", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "5902-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3047181, + "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "32693-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3051825, + "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "38483-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024561, + "CONCEPT_NAME": "Albumin [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1751-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024641, + "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14937-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013826, + "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14749-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006140, + "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14631-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3019550, + "CONCEPT_NAME": "Sodium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2951-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3005456, + "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6298-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3033836, + "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2593-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3018572, + "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2069-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015377, + "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2000-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003458, + "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14879-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020460, + "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1988-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3006923, + "CONCEPT_NAME": "Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1742-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3013721, + "CONCEPT_NAME": "Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1920-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37392672, + "CONCEPT_NAME": "Blood venous pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007071000000105", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37399161, + "CONCEPT_NAME": "Blood arterial pH", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1007061000000103", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2021-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027946, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2019-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2705-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027801, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2703-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14627-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3008152, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1960-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/physicalExaminationSigns_cs.json b/inst/extdata/json/physicalExaminationSigns_cs.json new file mode 100644 index 00000000..814943af --- /dev/null +++ b/inst/extdata/json/physicalExaminationSigns_cs.json @@ -0,0 +1,140 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4224504, + "CONCEPT_NAME": "Pulse", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8499008", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 4314539, + "CONCEPT_NAME": "Arterial pulse pressure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "87179004", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Observable Entity" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 21490963, + "CONCEPT_NAME": "Right pupil Pupillary response", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "79815-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3032652, + "CONCEPT_NAME": "Glasgow coma scale", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "35088-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3045676, + "CONCEPT_NAME": "Capillary refill [Time]", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "44971-0", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 21491763, + "CONCEPT_NAME": "Left pupil Pupillary response", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "79899-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021415, + "CONCEPT_NAME": "Left pupil Diameter Auto", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8640-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027214, + "CONCEPT_NAME": "Right pupil Diameter Auto", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8642-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/vasopressors_inotropes_cs.json b/inst/extdata/json/vasopressors_inotropes_cs.json new file mode 100644 index 00000000..518c001c --- /dev/null +++ b/inst/extdata/json/vasopressors_inotropes_cs.json @@ -0,0 +1,191 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 1507835, + "CONCEPT_NAME": "vasopressin (USP)", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "11149", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1337720, + "CONCEPT_NAME": "dobutamine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3616", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1337860, + "CONCEPT_NAME": "dopamine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3628", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1143374, + "CONCEPT_NAME": "ephedrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3966", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1343916, + "CONCEPT_NAME": "epinephrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3992", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1368671, + "CONCEPT_NAME": "milrinone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52769", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 19119253, + "CONCEPT_NAME": "terlipressin", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "57048", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1183554, + "CONCEPT_NAME": "isoproterenol", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "6054", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40173184, + "CONCEPT_NAME": "levosimendan", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "73107", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1321341, + "CONCEPT_NAME": "norepinephrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7512", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1135766, + "CONCEPT_NAME": "phenylephrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8163", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/venousBloodGas_cs.json b/inst/extdata/json/venousBloodGas_cs.json new file mode 100644 index 00000000..adeed8aa --- /dev/null +++ b/inst/extdata/json/venousBloodGas_cs.json @@ -0,0 +1,174 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 3009343, + "CONCEPT_NAME": "pH of Capillary blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2745-8", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3027273, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "14627-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3003129, + "CONCEPT_NAME": "Base excess in Capillary blood by calculation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1926-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3002032, + "CONCEPT_NAME": "Base excess in Venous blood by calculation", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1927-3", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3015235, + "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Capillary blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "1961-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3023024, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Capillary blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2020-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3021447, + "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2021-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3028626, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Capillary blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2704-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024354, + "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2705-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3012544, + "CONCEPT_NAME": "pH of Venous blood", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "2746-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Lab Test" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/visScoreMedications_cs.json b/inst/extdata/json/visScoreMedications_cs.json new file mode 100644 index 00000000..088ce3b1 --- /dev/null +++ b/inst/extdata/json/visScoreMedications_cs.json @@ -0,0 +1,106 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 1507835, + "CONCEPT_NAME": "vasopressin (USP)", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "11149", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1337720, + "CONCEPT_NAME": "dobutamine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3616", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1337860, + "CONCEPT_NAME": "dopamine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3628", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1343916, + "CONCEPT_NAME": "epinephrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "3992", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1368671, + "CONCEPT_NAME": "milrinone", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "52769", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1321341, + "CONCEPT_NAME": "norepinephrine", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "7512", + "DOMAIN_ID": "Drug", + "VOCABULARY_ID": "RxNorm", + "CONCEPT_CLASS_ID": "Ingredient" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/inst/extdata/json/vitalSignsUC2_cs.json b/inst/extdata/json/vitalSignsUC2_cs.json new file mode 100644 index 00000000..d79747ec --- /dev/null +++ b/inst/extdata/json/vitalSignsUC2_cs.json @@ -0,0 +1,140 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4096101, + "CONCEPT_NAME": "Measurement of oxygen saturation at periphery", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "250554003", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Procedure" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3025315, + "CONCEPT_NAME": "Body weight", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "29463-7", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3020891, + "CONCEPT_NAME": "Body temperature", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8310-5", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3012888, + "CONCEPT_NAME": "Diastolic blood pressure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8462-4", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3004249, + "CONCEPT_NAME": "Systolic blood pressure", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "8480-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3014315, + "CONCEPT_NAME": "Urine output", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "9187-6", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 3024171, + "CONCEPT_NAME": "Respiratory rate", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "9279-1", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "Clinical Observation" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 1004025, + "CONCEPT_NAME": "Heart rate", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "LP29713-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "LOINC Hierarchy" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} From 58aaaae1c22717bc906c38a484f854a33dc7a92e Mon Sep 17 00:00:00 2001 From: Liam Glueck <62374534+LP-Glueck@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:49:58 +0200 Subject: [PATCH 079/130] Update conceptSets.R adding table names to concept sets --- project/R/conceptSets.R | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index bf4aaf11..0427a76e 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -79,7 +79,8 @@ conceptSets <- list( 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta 44510968 # source: Other specified other operations on ventricles of heart /// concept: Other specified other operations on ventricles of heart ), - + + # vitalSigns = c( 3027018, # source: Age-dependent HR /// concept: Heart rate 3024171, # source: Age-dependent RR /// concept: Respiratory rate @@ -87,7 +88,8 @@ conceptSets <- list( 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure 4020553 # source: SpO2 /// concept: Oxygen saturation measurement ), - + + # 5.16 HSJD clinical HSJDClinical = c( 3025315, # source: Weight /// concept: Body weight 3036277, # source: Height /// concept: Body height @@ -95,6 +97,7 @@ conceptSets <- list( 4275564 # source: Cardiac surgeries (Interventions) /// concept: Operation on heart ), + # 5.17 HSJD Surgery HSJDSurgery = c( 40490494, # source: STAT/EACTS score of surgery /// concept: Society of Thoracic Surgeons risk calculator 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure @@ -104,7 +107,8 @@ conceptSets <- list( 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation 4150627 # source: Extubation event /// concept: Removal of endotracheal tube ), - + + # 5.18 HSJD Hospitalisations HSJDHospitalisation = c( 44803020, # source: Admission reason /// concept: Primary reason for admission 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug @@ -112,7 +116,8 @@ conceptSets <- list( 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation ), - + + # 5.19 HSJD Complications HSJDcomplications = c( 4202832, # source: intubation /// concept: Intubation 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart @@ -135,7 +140,8 @@ conceptSets <- list( 4051940, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Permanent cardiac pacemaker procedure 609312 # source: Listed for heart transplantation /// concept: Awaiting transplantation of heart ), - + + # 5.28 Patient characteristics UC3PateintCharacteristics = c( 434007, # source: hemophilia A diagnosis /// concept: hereditary factor VIII deficiency disease 4094223, # source: hemophilia A subtype/ severity /// concept: mild hereditary factor VIII deficiency disease @@ -146,7 +152,8 @@ conceptSets <- list( 4126681, # source: factor VIII inhibitor status /// concept: detected 9190 # source: factor VIII inhibitor status /// concept: not detected ), - + + # 5.29 Lab Measurements UC3LabMeasurements = c( 3024942, # source: factor VIII inhibitor titer /// concept: coagulation factor VIII inhibitor [Units/volume] in platelet poor plasma by coagulation assay 3022520, # source: factor VIII activity measurement /// concept: coagulation factor VIII activated [Units/volume] in platelet poor plasma by coagulation assay @@ -163,7 +170,8 @@ conceptSets <- list( 3006923, # source: ALT /// concept: alanine aminotransferase [enzymatic activity/volume] in serum or plasma 3013721 # source: AST /// concept: aspartate aminotransferase [enzymatic activity/volume] in serum or plasma ), - + + # 5.30 Treatments UC3Treatments = c( 1352213, # source: factor VIII /// concept: factor VIII (umbrella term) 793042, # source: factor VIII /// concept: emicizumab (umbrella term) @@ -172,7 +180,8 @@ conceptSets <- list( 4265597, # source: factor VIII dose is continuous infusion or bolus dose /// concept: by bolus infusions 1517070 # source: desmopressin /// concept: desmopressin ), - + + # 5.31 Surgery-specific parameters UC3Surgery = c( 4172515, # source: Medical/ surgical procedure /// concept: Therapeutic procedure 967823, # source: NaCl administration during surgery /// concept: sodium chloride From 13e23347cf676b578cd909333eb7c88cc37752cc Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 14:50:15 +0200 Subject: [PATCH 080/130] remove json files --- inst/extdata/json/additional_cs.json | 497 ------ .../extdata/json/antibioticResistance_cs.json | 106 -- inst/extdata/json/antibiotics_cs.json | 803 --------- inst/extdata/json/antifungals_cs.json | 89 - inst/extdata/json/arterialBloodGas_cs.json | 89 - .../extdata/json/cardiacComplications_cs.json | 72 - inst/extdata/json/cardiacProcedures_cs.json | 429 ----- inst/extdata/json/cardiacRadiology_cs.json | 684 -------- inst/extdata/json/cardiacSurgery_cs.json | 701 -------- inst/extdata/json/cardiac_LOS_cs.json | 72 - inst/extdata/json/cohort.json | 1159 ------------- inst/extdata/json/healthcareUse_cs.json | 1432 ----------------- inst/extdata/json/immunosuppressants_cs.json | 106 -- inst/extdata/json/intubation_cs.json | 21 - inst/extdata/json/labTestsUC2_cs.json | 293 ---- inst/extdata/json/labTests_cs.json | 497 ------ .../json/physicalExaminationSigns_cs.json | 140 -- .../json/vasopressors_inotropes_cs.json | 191 --- inst/extdata/json/venousBloodGas_cs.json | 174 -- inst/extdata/json/visScoreMedications_cs.json | 106 -- inst/extdata/json/vitalSignsUC2_cs.json | 140 -- 21 files changed, 7801 deletions(-) delete mode 100644 inst/extdata/json/additional_cs.json delete mode 100644 inst/extdata/json/antibioticResistance_cs.json delete mode 100644 inst/extdata/json/antibiotics_cs.json delete mode 100644 inst/extdata/json/antifungals_cs.json delete mode 100644 inst/extdata/json/arterialBloodGas_cs.json delete mode 100644 inst/extdata/json/cardiacComplications_cs.json delete mode 100644 inst/extdata/json/cardiacProcedures_cs.json delete mode 100644 inst/extdata/json/cardiacRadiology_cs.json delete mode 100644 inst/extdata/json/cardiacSurgery_cs.json delete mode 100644 inst/extdata/json/cardiac_LOS_cs.json delete mode 100644 inst/extdata/json/cohort.json delete mode 100644 inst/extdata/json/healthcareUse_cs.json delete mode 100644 inst/extdata/json/immunosuppressants_cs.json delete mode 100644 inst/extdata/json/intubation_cs.json delete mode 100644 inst/extdata/json/labTestsUC2_cs.json delete mode 100644 inst/extdata/json/labTests_cs.json delete mode 100644 inst/extdata/json/physicalExaminationSigns_cs.json delete mode 100644 inst/extdata/json/vasopressors_inotropes_cs.json delete mode 100644 inst/extdata/json/venousBloodGas_cs.json delete mode 100644 inst/extdata/json/visScoreMedications_cs.json delete mode 100644 inst/extdata/json/vitalSignsUC2_cs.json diff --git a/inst/extdata/json/additional_cs.json b/inst/extdata/json/additional_cs.json deleted file mode 100644 index a4d12593..00000000 --- a/inst/extdata/json/additional_cs.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4124462, - "CONCEPT_NAME": "None", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "260413007", - "DOMAIN_ID": "Meas Value", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Qualifier Value" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4095105, - "CONCEPT_NAME": "Base deficit measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "26154000", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4123933, - "CONCEPT_NAME": "Admission to pediatric intensive care unit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "305353001", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4234469, - "CONCEPT_NAME": "Diagnosis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "439401001", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40493026, - "CONCEPT_NAME": "Mechanical ventilator", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "449071006", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44803020, - "CONCEPT_NAME": "Primary reason for admission", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "507151000000102", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4209008, - "CONCEPT_NAME": "Pupillary function", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "56777005", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 260134, - "CONCEPT_NAME": "Croup", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71186008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 432571, - "CONCEPT_NAME": "Malignant lymphoma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "118600007", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4029498, - "CONCEPT_NAME": "Seizure disorder", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "128613002", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 317009, - "CONCEPT_NAME": "Asthma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "195967001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 201957, - "CONCEPT_NAME": "Necrotizing enterocolitis in fetus OR newborn", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2707005", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 43530727, - "CONCEPT_NAME": "Spontaneous cerebral hemorrhage", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "291571000119106", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 29783, - "CONCEPT_NAME": "Severe combined immunodeficiency disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "31323000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4165112, - "CONCEPT_NAME": "Bronchiolitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "4120002", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 443727, - "CONCEPT_NAME": "Diabetic ketoacidosis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "420422005", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 314383, - "CONCEPT_NAME": "Myocarditis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "50920009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4245975, - "CONCEPT_NAME": "Hepatic failure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "59927004", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 440207, - "CONCEPT_NAME": "Hypoplastic left heart syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "62067003", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42537745, - "CONCEPT_NAME": "Bone marrow transplant present", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "737300001", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 442588, - "CONCEPT_NAME": "Obstructive sleep apnea syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "78275009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4213310, - "CONCEPT_NAME": "Degenerative disease of the central nervous system", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "80690008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321319, - "CONCEPT_NAME": "Cardiomyopathy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85898001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 317510, - "CONCEPT_NAME": "Leukemia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "93143009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 5083, - "CONCEPT_NAME": "Telehealth", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "02", - "DOMAIN_ID": "Visit", - "VOCABULARY_ID": "CMS Place of Service", - "CONCEPT_CLASS_ID": "Visit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42869590, - "CONCEPT_NAME": "Oxygen/Gas total [Pure volume fraction] Inhaled gas", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71835-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3004249, - "CONCEPT_NAME": "Systolic blood pressure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8480-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/antibioticResistance_cs.json b/inst/extdata/json/antibioticResistance_cs.json deleted file mode 100644 index 9981ea7f..00000000 --- a/inst/extdata/json/antibioticResistance_cs.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4019195, - "CONCEPT_NAME": "Methicillin resistant Staphylococcus aureus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "115329001", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Organism" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4257547, - "CONCEPT_NAME": "Extended spectrum beta-lactamase producing bacteria", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "409799006", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Organism" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37017134, - "CONCEPT_NAME": "Multidrug-resistant bacteria", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "713351000", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Organism" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1707687, - "CONCEPT_NAME": "vancomycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "11124", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 997881, - "CONCEPT_NAME": "clindamycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2582", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1746940, - "CONCEPT_NAME": "erythromycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "4053", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/antibiotics_cs.json b/inst/extdata/json/antibiotics_cs.json deleted file mode 100644 index 5d24493a..00000000 --- a/inst/extdata/json/antibiotics_cs.json +++ /dev/null @@ -1,803 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4273629, - "CONCEPT_NAME": "Chemotherapy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "367336001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 21603754, - "CONCEPT_NAME": "Monoclonal antibodies", - "STANDARD_CONCEPT": "C", - "STANDARD_CONCEPT_CAPTION": "Classification", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "L01XC", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "ATC", - "CONCEPT_CLASS_ID": "ATC 4th" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1836430, - "CONCEPT_NAME": "sulfamethoxazole", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "10180", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1836948, - "CONCEPT_NAME": "tetracycline", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "10395", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 902722, - "CONCEPT_NAME": "tobramycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "10627", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1705674, - "CONCEPT_NAME": "trimethoprim", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "10829", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1707687, - "CONCEPT_NAME": "vancomycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "11124", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 19010400, - "CONCEPT_NAME": "fusidate", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "113608", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45892419, - "CONCEPT_NAME": "gentamicin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1596450", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45892599, - "CONCEPT_NAME": "ceftolozane", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1597609", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 46221507, - "CONCEPT_NAME": "avibactam", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1603834", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1734104, - "CONCEPT_NAME": "azithromycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "18631", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1736887, - "CONCEPT_NAME": "linezolid", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "190376", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1748975, - "CONCEPT_NAME": "cefepime", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20481", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1750500, - "CONCEPT_NAME": "clarithromycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "21212", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1769535, - "CONCEPT_NAME": "cefadroxil", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2177", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1771162, - "CONCEPT_NAME": "cefazolin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2180", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1774470, - "CONCEPT_NAME": "cefotaxime", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2186", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1776684, - "CONCEPT_NAME": "ceftazidime", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2191", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1778162, - "CONCEPT_NAME": "cefuroxime", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2194", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1786617, - "CONCEPT_NAME": "daptomycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "22299", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1797513, - "CONCEPT_NAME": "ciprofloxacin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2551", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 997881, - "CONCEPT_NAME": "clindamycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2582", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 901845, - "CONCEPT_NAME": "colistin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2709", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1709170, - "CONCEPT_NAME": "meropenem", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "29561", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1717963, - "CONCEPT_NAME": "ertapenem", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "325642", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1518254, - "CONCEPT_NAME": "dexamethasone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3264", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1741122, - "CONCEPT_NAME": "tazobactam", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "37617", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1746940, - "CONCEPT_NAME": "erythromycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "4053", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 951511, - "CONCEPT_NAME": "mupirocin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "42372", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 956653, - "CONCEPT_NAME": "fosfomycin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "4550", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1759842, - "CONCEPT_NAME": "clavulanate", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "48203", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 975125, - "CONCEPT_NAME": "hydrocortisone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5492", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1778262, - "CONCEPT_NAME": "imipenem", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5690", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 19078399, - "CONCEPT_NAME": "teicoplanin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "57021", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1790868, - "CONCEPT_NAME": "amikacin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "641", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1506270, - "CONCEPT_NAME": "methylprednisolone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6902", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1713332, - "CONCEPT_NAME": "amoxicillin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "723", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1717327, - "CONCEPT_NAME": "ampicillin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "733", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 920293, - "CONCEPT_NAME": "nitrofurantoin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7454", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1721543, - "CONCEPT_NAME": "norfloxacin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7517", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1724703, - "CONCEPT_NAME": "oxacillin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7773", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1728416, - "CONCEPT_NAME": "penicillin G", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7980", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1742253, - "CONCEPT_NAME": "levofloxacin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "82122", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1746114, - "CONCEPT_NAME": "piperacillin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8339", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1550557, - "CONCEPT_NAME": "prednisolone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8638", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1763204, - "CONCEPT_NAME": "rifampin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "9384", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/antifungals_cs.json b/inst/extdata/json/antifungals_cs.json deleted file mode 100644 index 4cc930b1..00000000 --- a/inst/extdata/json/antifungals_cs.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 1714277, - "CONCEPT_NAME": "voriconazole", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "121243", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 35606695, - "CONCEPT_NAME": "isavuconazole", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1720882", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 19018013, - "CONCEPT_NAME": "micafungin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "325887", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 19026450, - "CONCEPT_NAME": "anidulafungin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "341018", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1754994, - "CONCEPT_NAME": "fluconazole", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "4450", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/arterialBloodGas_cs.json b/inst/extdata/json/arterialBloodGas_cs.json deleted file mode 100644 index 3d80a271..00000000 --- a/inst/extdata/json/arterialBloodGas_cs.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 3003396, - "CONCEPT_NAME": "Base excess in Arterial blood by calculation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1925-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019977, - "CONCEPT_NAME": "pH of Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2744-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1960-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2703-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cardiacComplications_cs.json b/inst/extdata/json/cardiacComplications_cs.json deleted file mode 100644 index 673c71ed..00000000 --- a/inst/extdata/json/cardiacComplications_cs.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "Peritoneal dialysis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71192002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "Continuous venovenous hemofiltration", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233585000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "Low cardiac output syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "44088000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cardiacProcedures_cs.json b/inst/extdata/json/cardiacProcedures_cs.json deleted file mode 100644 index 3221a0f0..00000000 --- a/inst/extdata/json/cardiacProcedures_cs.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "Transposition of coronary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384678000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "Transplantation of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32413006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "224111000000108", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "Revision of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174885005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "Replacement of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428893001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "Replacement of pulmonary valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "88045004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "Replacement of mitral valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "53059001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "89814007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "Repair of tricuspid valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384643000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "Repair of tetralogy of Fallot", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174814003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "Repair of sinus venosus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174899009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "Repair of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175253007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174900004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "Repair of ostium primum defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47195003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "Repair of heart valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "Repair of double outlet right ventricle", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233126007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "Removal of band from pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175261002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "223341000000109", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "Release of vascular ring of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175341006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447748008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "Plication of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "81913003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175338002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "Plastic repair of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175337007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cardiacRadiology_cs.json b/inst/extdata/json/cardiacRadiology_cs.json deleted file mode 100644 index 5f952556..00000000 --- a/inst/extdata/json/cardiacRadiology_cs.json +++ /dev/null @@ -1,684 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4019824, - "CONCEPT_NAME": "Transesophageal echocardiography", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "105376000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4032404, - "CONCEPT_NAME": "Bronchoscopy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "10847001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4065416, - "CONCEPT_NAME": "Exercise tolerance test", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "165079009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4345925, - "CONCEPT_NAME": "Videofluoroscopy swallow", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "241149003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4083106, - "CONCEPT_NAME": "US scan of head", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "241449005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4083108, - "CONCEPT_NAME": "US scan of neck", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "241453007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4082979, - "CONCEPT_NAME": "MRI of head", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "241601008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4093436, - "CONCEPT_NAME": "Ultrasonography of thorax", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "25850001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4125350, - "CONCEPT_NAME": "CT of head", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "303653007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4125530, - "CONCEPT_NAME": "US urinary tract", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "303917008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44802640, - "CONCEPT_NAME": "MRI study for cardiac congenital anomaly", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "322731000000101", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4163872, - "CONCEPT_NAME": "Plain chest X-ray", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "399208008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4167029, - "CONCEPT_NAME": "Ultrasonography of inguinal region", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "418105000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4167052, - "CONCEPT_NAME": "Doppler ultrasonography of kidney", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "418354002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4305221, - "CONCEPT_NAME": "US scan of abdomen and pelvis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "418394000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4303522, - "CONCEPT_NAME": "US scan of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "418889006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4306317, - "CONCEPT_NAME": "CT angiography of coronary artery with contrast", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "419545005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4169275, - "CONCEPT_NAME": "X-ray of chest and abdomen", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "420233006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4322380, - "CONCEPT_NAME": "Insertion of peripherally inserted central catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "425196008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4140473, - "CONCEPT_NAME": "Holter extended electrocardiographic recording", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "427047002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4329508, - "CONCEPT_NAME": "Ultrasonography of pleural cavity", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "431757007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4335392, - "CONCEPT_NAME": "Doppler ultrasonography of vein of lower limb", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "432336004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203365, - "CONCEPT_NAME": "Epicardial echocardiography", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "433232009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4335825, - "CONCEPT_NAME": "Transthoracic echocardiography", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "433236007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40482732, - "CONCEPT_NAME": "Insertion of tunneled venous catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "442309004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40489841, - "CONCEPT_NAME": "Doppler ultrasonography of jugular vein", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "446849004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40492338, - "CONCEPT_NAME": "Cardiopulmonary exercise test", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447346005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40488431, - "CONCEPT_NAME": "Interrogation of cardiac pacemaker", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "448150008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42873079, - "CONCEPT_NAME": "Removal of tunneled central venous catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "450330005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4261497, - "CONCEPT_NAME": "Ultrasonography of abdomen", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "45036003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4205144, - "CONCEPT_NAME": "Portable electroencephalogram", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "54061003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4181917, - "CONCEPT_NAME": "Electroencephalogram", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "54550000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4264477, - "CONCEPT_NAME": "Diagnostic radiography of abdomen", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "60654006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45764527, - "CONCEPT_NAME": "Electrocardiographic Holter analyzer", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "701233001", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45765560, - "CONCEPT_NAME": "Cardiovascular monitor", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "702527008", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4327032, - "CONCEPT_NAME": "CT of thorax with contrast", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "75385009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 35622931, - "CONCEPT_NAME": "Doppler ultrasound", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "765172009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44813863, - "CONCEPT_NAME": "Ultrasonography of vocal cord", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "844621000000101", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312208, - "CONCEPT_NAME": "Contrast bronchogram", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85895003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4235141, - "CONCEPT_NAME": "Check artificial pacemaker", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "9061001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cardiacSurgery_cs.json b/inst/extdata/json/cardiacSurgery_cs.json deleted file mode 100644 index c014bb4d..00000000 --- a/inst/extdata/json/cardiacSurgery_cs.json +++ /dev/null @@ -1,701 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4049734, - "CONCEPT_NAME": "Banding of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "15648005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "Repair of tetralogy of Fallot", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174814003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019932, - "CONCEPT_NAME": "Arterial switch operation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174826008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020376, - "CONCEPT_NAME": "Closure of defect of interatrial septum using pericardial patch", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174845004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020506, - "CONCEPT_NAME": "Creation of valved conduit between right ventricle of heart and pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174883003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "Revision of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174885005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "Repair of sinus venosus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174899009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174900004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020520, - "CONCEPT_NAME": "Open aortic valvotomy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174968009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018747, - "CONCEPT_NAME": "Operations on the left ventricular outflow tract", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174997007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019233, - "CONCEPT_NAME": "Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175236000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019237, - "CONCEPT_NAME": "Anastomosis of vena cava to pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175249005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "Repair of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175253007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "Removal of band from pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175261002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "Plastic repair of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175337007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175338002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "Release of vascular ring of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175341006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "223341000000109", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "224111000000108", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4336751, - "CONCEPT_NAME": "Allotransplant of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "232973007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "Repair of double outlet right ventricle", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233126007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4050114, - "CONCEPT_NAME": "Closure of ductus arteriosus with clip", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233199008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4052536, - "CONCEPT_NAME": "Extracorporeal membrane oxygenation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233573008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790415, - "CONCEPT_NAME": "Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233601000000100", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4144921, - "CONCEPT_NAME": "Implantation of cardiac pacemaker", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "307280005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "Transplantation of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32413006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44793133, - "CONCEPT_NAME": "Aortopulmonary reconstruction with systemic to pulmonary arterial shunt", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "378121000000101", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "Repair of tricuspid valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384643000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "Transposition of coronary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384678000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4139214, - "CONCEPT_NAME": "Open implantation of cardiac ventricular assist device", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "426568003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "Replacement of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428893001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447748008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "Repair of ostium primum defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47195003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4199899, - "CONCEPT_NAME": "Closure of ventricular septal defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52930005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "Replacement of mitral valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "53059001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "Plication of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "81913003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4308136, - "CONCEPT_NAME": "Complete repair of tetralogy of Fallot with transannular patch", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "83698002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "Repair of heart valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "Replacement of pulmonary valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "88045004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "89814007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cardiac_LOS_cs.json b/inst/extdata/json/cardiac_LOS_cs.json deleted file mode 100644 index 4599d6a9..00000000 --- a/inst/extdata/json/cardiac_LOS_cs.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4123933, - "CONCEPT_NAME": "Admission to pediatric intensive care unit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "305353001", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 8715, - "CONCEPT_NAME": "Hospital admission", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32485007", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4161811, - "CONCEPT_NAME": "Admission to high dependency unit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "398162007", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 36675203, - "CONCEPT_NAME": "Admission to pediatric cardiology department", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "771550009", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/cohort.json b/inst/extdata/json/cohort.json deleted file mode 100644 index 4850301a..00000000 --- a/inst/extdata/json/cohort.json +++ /dev/null @@ -1,1159 +0,0 @@ -{ - "ConceptSets": [ - { - "id": 0, - "name": "labTests", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "White blood cell count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "767002", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5171-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "59260-0", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "Platelet count", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1022651000000100", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit [Volume Fraction] of Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "Prothrombin time (PT)", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5902-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32693-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "38483-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14937-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14749-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14631-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6298-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2593-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2069-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2000-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14879-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1988-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "Blood venous pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007071000000105", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "Blood arterial pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007061000000103", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2021-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2705-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2703-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14627-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1960-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 1, - "name": "cardiacComplications", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "Peritoneal dialysis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71192002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "Continuous venovenous hemofiltration", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233585000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4185565, - "CONCEPT_NAME": "Low cardiac output syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "44088000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 2, - "name": "cardiacProcedures", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4296790, - "CONCEPT_NAME": "Transposition of coronary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384678000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4137127, - "CONCEPT_NAME": "Transplantation of heart", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32413006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789857, - "CONCEPT_NAME": "Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "224111000000108", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019950, - "CONCEPT_NAME": "Revision of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174885005", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4178479, - "CONCEPT_NAME": "Replacement of valved cardiac conduit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428893001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4339184, - "CONCEPT_NAME": "Replacement of pulmonary valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "88045004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4203153, - "CONCEPT_NAME": "Replacement of mitral valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "53059001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4232476, - "CONCEPT_NAME": "Repair of ventricular septal defect with prosthesis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "89814007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4293619, - "CONCEPT_NAME": "Repair of tricuspid valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "384643000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017751, - "CONCEPT_NAME": "Repair of total anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019929, - "CONCEPT_NAME": "Repair of tetralogy of Fallot", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174814003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020508, - "CONCEPT_NAME": "Repair of sinus venosus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174899009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018926, - "CONCEPT_NAME": "Repair of pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175253007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4018441, - "CONCEPT_NAME": "Repair of partial anomalous pulmonary venous connection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "174900004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4187380, - "CONCEPT_NAME": "Repair of ostium primum defect", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47195003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4312194, - "CONCEPT_NAME": "Repair of heart valve", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "85830006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4049979, - "CONCEPT_NAME": "Repair of double outlet right ventricle", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233126007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4021725, - "CONCEPT_NAME": "Removal of band from pulmonary artery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175261002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790092, - "CONCEPT_NAME": "Relief of left ventricular outflow tract obstruction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "223341000000109", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019028, - "CONCEPT_NAME": "Release of vascular ring of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175341006", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40486525, - "CONCEPT_NAME": "Primary repair of defect of atrioventricular septum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "447748008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4217615, - "CONCEPT_NAME": "Plication of diaphragm", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "81913003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4020812, - "CONCEPT_NAME": "Plastic repair of aorta and end-to-end anastomosis of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175338002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4019026, - "CONCEPT_NAME": "Plastic repair of aorta", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "175337007", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44510968, - "CONCEPT_NAME": "", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "", - "INVALID_REASON_CAPTION": "", - "CONCEPT_CODE": "", - "DOMAIN_ID": "", - "VOCABULARY_ID": "", - "CONCEPT_CLASS_ID": "" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - }, - { - "id": 3, - "name": "intubation", - "expression": { - "items": [ - { - "concept": { - "CONCEPT_ID": 4202832, - "CONCEPT_NAME": "Intubation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52765003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] - } - } - ], - "PrimaryCriteria": { - "CriteriaList": [ - { - "Measurement": { - "CodesetId": 0 - } - } - ], - "ObservationWindow": { - "PriorDays": 0, - "PostDays": 0 - }, - "PrimaryCriteriaLimit": { - "Type": "All" - } - }, - "QualifiedLimit": { - "Type": "First" - }, - "ExpressionLimit": { - "Type": "First" - }, - "InclusionRules": [ - { - "name": "rule1", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ConditionOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - }, - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 1 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - }, - { - "name": "rule2", - "expression": { - "Type": "ANY", - "CriteriaList": [ - { - "Criteria": { - "ProcedureOccurrence": { - "CodesetId": 2 - } - }, - "StartWindow": { - "Start": { - "Coeff": -1 - }, - "End": { - "Coeff": 1 - }, - "UseIndexEnd": false, - "UseEventEnd": false - }, - "Occurrence": { - "Type": 2, - "Count": 1 - } - } - ], - "DemographicCriteriaList": [], - "Groups": [] - } - } - ], - "CensoringCriteria": [ - { - "ProcedureOccurrence": { - "CodesetId": 3 - } - } - ], - "CollapseSettings": { - "CollapseType": "ERA", - "EraPad": 0 - }, - "CensorWindow": {}, - "cdmVersionRange": ">=5.0.0" -} diff --git a/inst/extdata/json/healthcareUse_cs.json b/inst/extdata/json/healthcareUse_cs.json deleted file mode 100644 index 9f7e33f0..00000000 --- a/inst/extdata/json/healthcareUse_cs.json +++ /dev/null @@ -1,1432 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 37174269, - "CONCEPT_NAME": "At increased risk of sepsis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "721181000124100", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4032243, - "CONCEPT_NAME": "Dialysis procedure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "108241001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 197320, - "CONCEPT_NAME": "Acute kidney injury", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14669001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4074689, - "CONCEPT_NAME": "Open drainage of pleural cavity", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "177788009", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4084670, - "CONCEPT_NAME": "Non-urgent surgical admission", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "183488000", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4070667, - "CONCEPT_NAME": "Urinary catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20568009", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790095, - "CONCEPT_NAME": "Invasive ventilation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "226471000000101", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4052536, - "CONCEPT_NAME": "Extracorporeal membrane oxygenation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233573008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4051330, - "CONCEPT_NAME": "Continuous venovenous hemofiltration", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233585000", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44790567, - "CONCEPT_NAME": "Patient transfer from hospital to hospital", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "239531000000108", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 133327, - "CONCEPT_NAME": "Viremia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2528003", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4097216, - "CONCEPT_NAME": "Endotracheal tube", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "26412008", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4085730, - "CONCEPT_NAME": "Antibiotic therapy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "281789004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4123946, - "CONCEPT_NAME": "Admission to surgical department", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "305408004", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4208341, - "CONCEPT_NAME": "Solid organ transplant", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "313039003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4193843, - "CONCEPT_NAME": "Oxygenation index measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "313558004", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4235043, - "CONCEPT_NAME": "Ventricular assist device", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "360064003", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 443392, - "CONCEPT_NAME": "Malignant neoplastic disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "363346000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4181511, - "CONCEPT_NAME": "Administration of antineoplastic agent", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "363688001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4294886, - "CONCEPT_NAME": "Patient transfer, in-hospital", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "37729005", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4301351, - "CONCEPT_NAME": "Surgical procedure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "387713003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4140762, - "CONCEPT_NAME": "Antiviral therapy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "427314002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4177205, - "CONCEPT_NAME": "Cannulation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "42825003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4177224, - "CONCEPT_NAME": "Non-invasive ventilation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "428311008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45758028, - "CONCEPT_NAME": "Arterial blood pressure catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "462514007", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44803020, - "CONCEPT_NAME": "Primary reason for admission", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "507151000000102", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4179206, - "CONCEPT_NAME": "Central venous catheter", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52124006", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 132736, - "CONCEPT_NAME": "Bacteremia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5758002", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44783799, - "CONCEPT_NAME": "Exteriorization of trachea", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "697984004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 45768671, - "CONCEPT_NAME": "Asplenia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "707147002", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4324124, - "CONCEPT_NAME": "Peritoneal dialysis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71192002", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 435785, - "CONCEPT_NAME": "Meningitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7180009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 201820, - "CONCEPT_NAME": "Diabetes mellitus", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "73211009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42538045, - "CONCEPT_NAME": "Nasogastric/orogastric tube stylet", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "738664002", - "DOMAIN_ID": "Device", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Physical Object" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37206601, - "CONCEPT_NAME": "Venoarterial extracorporeal membrane oxygenation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "786451004", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37206603, - "CONCEPT_NAME": "Venovenous extracorporeal membrane oxygenation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "786453001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4314777, - "CONCEPT_NAME": "Immunosuppressive therapy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "86553008", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 604243, - "CONCEPT_NAME": "Acquired neutropenia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1156296001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 444187, - "CONCEPT_NAME": "Open wound", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "125643001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 22281, - "CONCEPT_NAME": "Sickle cell-hemoglobin SS disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "127040003", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 435613, - "CONCEPT_NAME": "Cellulitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "128045006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4134120, - "CONCEPT_NAME": "Cerebral palsy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "128188000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 444202, - "CONCEPT_NAME": "Abscess", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "128477000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 312723, - "CONCEPT_NAME": "Congenital heart disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "13213009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 255573, - "CONCEPT_NAME": "Chronic obstructive lung disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "13645005", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 255848, - "CONCEPT_NAME": "Pneumonia", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "233604007", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 433740, - "CONCEPT_NAME": "Immunodeficiency disorder", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "234532001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4080011, - "CONCEPT_NAME": "Organ dysfunction syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "238147009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 434821, - "CONCEPT_NAME": "Systemic inflammatory response syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "238149007", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 81539, - "CONCEPT_NAME": "Mitochondrial cytopathy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "240096000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4103588, - "CONCEPT_NAME": "Acute tuberculosis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "25629007", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 443783, - "CONCEPT_NAME": "Chronic disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "27624003", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4140977, - "CONCEPT_NAME": "Secondary immune deficiency disorder", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "33286000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 201606, - "CONCEPT_NAME": "Crohn's disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "34000006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4243475, - "CONCEPT_NAME": "Acute hepatitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "37871000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4300243, - "CONCEPT_NAME": "Postoperative complication", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "385486001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 439125, - "CONCEPT_NAME": "Complete trisomy 21 syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "41040004", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 321042, - "CONCEPT_NAME": "Cardiac arrest", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "410429000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4331815, - "CONCEPT_NAME": "Acute urinary tract infection", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "431309003", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 195212, - "CONCEPT_NAME": "Hypercortisolism", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "47270006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 196152, - "CONCEPT_NAME": "Peritonitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "48661000", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 314383, - "CONCEPT_NAME": "Myocarditis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "50920009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 195314, - "CONCEPT_NAME": "Nephrotic syndrome", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52254009", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 441589, - "CONCEPT_NAME": "Endocarditis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "56819008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4271450, - "CONCEPT_NAME": "Acute infectious disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "63171007", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 81893, - "CONCEPT_NAME": "Ulcerative colitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "64766004", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 80809, - "CONCEPT_NAME": "Rheumatoid arthritis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "69896004", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4322814, - "CONCEPT_NAME": "Meningoencephalitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7125002", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 36716945, - "CONCEPT_NAME": "Renal insufficiency", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "723188008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 440448, - "CONCEPT_NAME": "Appendicitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "74400008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 433968, - "CONCEPT_NAME": "Candidiasis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "78048006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44807226, - "CONCEPT_NAME": "Necrotising enterocolitis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "805601000000103", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 132797, - "CONCEPT_NAME": "Sepsis", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "91302008", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44777590, - "CONCEPT_NAME": "centimeter watercolumn", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "cm[H2O]", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44777602, - "CONCEPT_NAME": "kilopascal", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "kPa", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 8510, - "CONCEPT_NAME": "unit", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "[U]", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 8554, - "CONCEPT_NAME": "percent", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "%", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 720868, - "CONCEPT_NAME": "fraction", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "{fraction}", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 8529, - "CONCEPT_NAME": "index", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "{index}", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 8876, - "CONCEPT_NAME": "millimeter mercury column", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "mm[Hg]", - "DOMAIN_ID": "Unit", - "VOCABULARY_ID": "UCUM", - "CONCEPT_CLASS_ID": "Unit" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 21602722, - "CONCEPT_NAME": "CORTICOSTEROIDS FOR SYSTEMIC USE", - "STANDARD_CONCEPT": "C", - "STANDARD_CONCEPT_CAPTION": "Classification", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "H02", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "ATC", - "CONCEPT_CLASS_ID": "ATC 2nd" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42869590, - "CONCEPT_NAME": "Oxygen/Gas total [Pure volume fraction] Inhaled gas", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "71835-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42527086, - "CONCEPT_NAME": "Mean airway pressure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "60949-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1340204, - "CONCEPT_NAME": "History of event", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "OMOP5165859", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "OMOP Extension", - "CONCEPT_CLASS_ID": "Context-dependent" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/immunosuppressants_cs.json b/inst/extdata/json/immunosuppressants_cs.json deleted file mode 100644 index fd9ac992..00000000 --- a/inst/extdata/json/immunosuppressants_cs.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4273629, - "CONCEPT_NAME": "Chemotherapy", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "367336001", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 21603754, - "CONCEPT_NAME": "Monoclonal antibodies", - "STANDARD_CONCEPT": "C", - "STANDARD_CONCEPT_CAPTION": "Classification", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "L01XC", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "ATC", - "CONCEPT_CLASS_ID": "ATC 4th" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1518254, - "CONCEPT_NAME": "dexamethasone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3264", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 975125, - "CONCEPT_NAME": "hydrocortisone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5492", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1506270, - "CONCEPT_NAME": "methylprednisolone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6902", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1550557, - "CONCEPT_NAME": "prednisolone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8638", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/intubation_cs.json b/inst/extdata/json/intubation_cs.json deleted file mode 100644 index 6379aefd..00000000 --- a/inst/extdata/json/intubation_cs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4202832, - "CONCEPT_NAME": "Intubation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52765003", - "DOMAIN_ID": "Procedure", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/labTestsUC2_cs.json b/inst/extdata/json/labTestsUC2_cs.json deleted file mode 100644 index 74f232b6..00000000 --- a/inst/extdata/json/labTestsUC2_cs.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 37393605, - "CONCEPT_NAME": "D-dimer level", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1019221000000107", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4017361, - "CONCEPT_NAME": "Blood urea nitrogen measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "105011006", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4036356, - "CONCEPT_NAME": "Detection of bacteria", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "117725006", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44789220, - "CONCEPT_NAME": "Ionised calcium measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "194841000000106", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4094436, - "CONCEPT_NAME": "Fibrinogen measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "250346004", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4118986, - "CONCEPT_NAME": "Bilirubin measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "302787001", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4196268, - "CONCEPT_NAME": "Polymerase chain reaction observation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "315010001", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Clinical Finding" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 440029, - "CONCEPT_NAME": "Viral disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "34014006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4212899, - "CONCEPT_NAME": "Total white blood count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "391558003", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4175016, - "CONCEPT_NAME": "Partial thromboplastin time, activated", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "42525009", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 42536081, - "CONCEPT_NAME": "Adrenal medulla hormone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "734672009", - "DOMAIN_ID": "Observation", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disposition" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4299649, - "CONCEPT_NAME": "Quantitative microbial culture and measurement", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "77709000", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 44806682, - "CONCEPT_NAME": "Infection resistant to multiple antibiotics", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "822401000000100", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 432545, - "CONCEPT_NAME": "Bacterial infectious disease", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "87628006", - "DOMAIN_ID": "Condition", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Disorder" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14749-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3046279, - "CONCEPT_NAME": "Procalcitonin [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "33959-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033291, - "CONCEPT_NAME": "Interleukin 6 [Mass/volume] in Body fluid", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "49732-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/labTests_cs.json b/inst/extdata/json/labTests_cs.json deleted file mode 100644 index a7b8d748..00000000 --- a/inst/extdata/json/labTests_cs.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4298431, - "CONCEPT_NAME": "White blood cell count", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "767002", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3007670, - "CONCEPT_NAME": "Neutrophil Ab [Units/volume] in Serum", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5171-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40762351, - "CONCEPT_NAME": "Hemoglobin [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "59260-0", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37393863, - "CONCEPT_NAME": "Platelet count", - "STANDARD_CONCEPT": "", - "STANDARD_CONCEPT_CAPTION": "", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1022651000000100", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3009542, - "CONCEPT_NAME": "Hematocrit [Volume Fraction] of Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "20570-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3034426, - "CONCEPT_NAME": "Prothrombin time (PT)", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "5902-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3047181, - "CONCEPT_NAME": "Lactate [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "32693-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3051825, - "CONCEPT_NAME": "Creatinine [Mass/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "38483-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024561, - "CONCEPT_NAME": "Albumin [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1751-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024641, - "CONCEPT_NAME": "Urea nitrogen [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14937-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013826, - "CONCEPT_NAME": "Glucose [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14749-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006140, - "CONCEPT_NAME": "Bilirubin.total [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14631-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3019550, - "CONCEPT_NAME": "Sodium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2951-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3005456, - "CONCEPT_NAME": "Potassium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6298-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3033836, - "CONCEPT_NAME": "Magnesium [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2593-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3018572, - "CONCEPT_NAME": "Chloride [Moles/volume] in Blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2069-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015377, - "CONCEPT_NAME": "Calcium [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2000-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003458, - "CONCEPT_NAME": "Phosphate [Moles/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14879-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020460, - "CONCEPT_NAME": "C reactive protein [Mass/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1988-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3006923, - "CONCEPT_NAME": "Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1742-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3013721, - "CONCEPT_NAME": "Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1920-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37392672, - "CONCEPT_NAME": "Blood venous pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007071000000105", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 37399161, - "CONCEPT_NAME": "Blood arterial pH", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1007061000000103", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2021-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027946, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2019-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2705-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027801, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2703-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14627-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3008152, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Arterial blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1960-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/physicalExaminationSigns_cs.json b/inst/extdata/json/physicalExaminationSigns_cs.json deleted file mode 100644 index 814943af..00000000 --- a/inst/extdata/json/physicalExaminationSigns_cs.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4224504, - "CONCEPT_NAME": "Pulse", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8499008", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 4314539, - "CONCEPT_NAME": "Arterial pulse pressure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "87179004", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Observable Entity" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 21490963, - "CONCEPT_NAME": "Right pupil Pupillary response", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "79815-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3032652, - "CONCEPT_NAME": "Glasgow coma scale", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "35088-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3045676, - "CONCEPT_NAME": "Capillary refill [Time]", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "44971-0", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 21491763, - "CONCEPT_NAME": "Left pupil Pupillary response", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "79899-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021415, - "CONCEPT_NAME": "Left pupil Diameter Auto", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8640-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027214, - "CONCEPT_NAME": "Right pupil Diameter Auto", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8642-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/vasopressors_inotropes_cs.json b/inst/extdata/json/vasopressors_inotropes_cs.json deleted file mode 100644 index 518c001c..00000000 --- a/inst/extdata/json/vasopressors_inotropes_cs.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 1507835, - "CONCEPT_NAME": "vasopressin (USP)", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "11149", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1337720, - "CONCEPT_NAME": "dobutamine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3616", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1337860, - "CONCEPT_NAME": "dopamine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3628", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1143374, - "CONCEPT_NAME": "ephedrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3966", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1343916, - "CONCEPT_NAME": "epinephrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3992", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1368671, - "CONCEPT_NAME": "milrinone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52769", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 19119253, - "CONCEPT_NAME": "terlipressin", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "57048", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1183554, - "CONCEPT_NAME": "isoproterenol", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "6054", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 40173184, - "CONCEPT_NAME": "levosimendan", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "73107", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1321341, - "CONCEPT_NAME": "norepinephrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7512", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1135766, - "CONCEPT_NAME": "phenylephrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8163", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/venousBloodGas_cs.json b/inst/extdata/json/venousBloodGas_cs.json deleted file mode 100644 index adeed8aa..00000000 --- a/inst/extdata/json/venousBloodGas_cs.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 3009343, - "CONCEPT_NAME": "pH of Capillary blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2745-8", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3027273, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "14627-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3003129, - "CONCEPT_NAME": "Base excess in Capillary blood by calculation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1926-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3002032, - "CONCEPT_NAME": "Base excess in Venous blood by calculation", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1927-3", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3015235, - "CONCEPT_NAME": "Bicarbonate [Moles/volume] in Capillary blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "1961-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3023024, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Capillary blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2020-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3021447, - "CONCEPT_NAME": "Carbon dioxide [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2021-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3028626, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Capillary blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2704-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024354, - "CONCEPT_NAME": "Oxygen [Partial pressure] in Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2705-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3012544, - "CONCEPT_NAME": "pH of Venous blood", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "2746-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Lab Test" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/visScoreMedications_cs.json b/inst/extdata/json/visScoreMedications_cs.json deleted file mode 100644 index 088ce3b1..00000000 --- a/inst/extdata/json/visScoreMedications_cs.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 1507835, - "CONCEPT_NAME": "vasopressin (USP)", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "11149", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1337720, - "CONCEPT_NAME": "dobutamine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3616", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1337860, - "CONCEPT_NAME": "dopamine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3628", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1343916, - "CONCEPT_NAME": "epinephrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "3992", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1368671, - "CONCEPT_NAME": "milrinone", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "52769", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1321341, - "CONCEPT_NAME": "norepinephrine", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "7512", - "DOMAIN_ID": "Drug", - "VOCABULARY_ID": "RxNorm", - "CONCEPT_CLASS_ID": "Ingredient" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} diff --git a/inst/extdata/json/vitalSignsUC2_cs.json b/inst/extdata/json/vitalSignsUC2_cs.json deleted file mode 100644 index d79747ec..00000000 --- a/inst/extdata/json/vitalSignsUC2_cs.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "items": [ - { - "concept": { - "CONCEPT_ID": 4096101, - "CONCEPT_NAME": "Measurement of oxygen saturation at periphery", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "250554003", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "SNOMED", - "CONCEPT_CLASS_ID": "Procedure" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3025315, - "CONCEPT_NAME": "Body weight", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "29463-7", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3020891, - "CONCEPT_NAME": "Body temperature", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8310-5", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3012888, - "CONCEPT_NAME": "Diastolic blood pressure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8462-4", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3004249, - "CONCEPT_NAME": "Systolic blood pressure", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "8480-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3014315, - "CONCEPT_NAME": "Urine output", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "9187-6", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 3024171, - "CONCEPT_NAME": "Respiratory rate", - "STANDARD_CONCEPT": "S", - "STANDARD_CONCEPT_CAPTION": "Standard", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "9279-1", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "Clinical Observation" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - }, - { - "concept": { - "CONCEPT_ID": 1004025, - "CONCEPT_NAME": "Heart rate", - "STANDARD_CONCEPT": "C", - "STANDARD_CONCEPT_CAPTION": "Classification", - "INVALID_REASON": "V", - "INVALID_REASON_CAPTION": "Valid", - "CONCEPT_CODE": "LP29713-2", - "DOMAIN_ID": "Measurement", - "VOCABULARY_ID": "LOINC", - "CONCEPT_CLASS_ID": "LOINC Hierarchy" - }, - "isExcluded": false, - "includeDescendants": true, - "includeMapped": false - } - ] -} From bdfb5713cfa18e7baa037e309b69ab028465087f Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 14:58:47 +0200 Subject: [PATCH 081/130] minor updates --- .Rprofile | 2 +- .gitignore | 9 +- R/countOccurrences.R | 1 + R/isStandard.R | 2 +- man/Capr-PHEMS-package.Rd | 8 +- man/countOccurrences.Rd | 12 +- man/isStandard.Rd | 4 +- renv.lock | 1268 +------------------------------------ 8 files changed, 38 insertions(+), 1268 deletions(-) diff --git a/.Rprofile b/.Rprofile index 00de2667..6e0d4744 100644 --- a/.Rprofile +++ b/.Rprofile @@ -11,4 +11,4 @@ if (any(list.files() == "renv")) { message("No renv initialized, calling renv::init()") message("Please select to use only the DESCRIPTION file for dependency discovery if prompted, and next select 'Restore the project from the lockfile'") renv::init() -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 72be200a..605febe0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,13 @@ inst/doc # project-specific inst/config/* !inst/config/*-sample.yml - -inst/extdata/* +# Adjusted to not ignore .gitkeep files +inst/extdata/**/* # Ignore all files within inst/extdata !inst/extdata/phems_variable_list -!inst/extdata/json -inst/extdata/json/* # Ignore everything inside the json directory +!inst/extdata/json/.gitkeep # Ensure this is not ignored +inst/extdata/json/*.json !inst/extdata/vocabularies inst/extdata/vocabularies/* +!inst/extdata/**/*.gitkeep # Explicitly include .gitkeep files in inst/extdata renv \ No newline at end of file diff --git a/R/countOccurrences.R b/R/countOccurrences.R index b506db77..dbc4a3da 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -9,6 +9,7 @@ #' @param links A list linking each table to its respective concept_id field. #' @param db_connection A database connection object through which queries will be executed. #' @param cdm_schema The database cdm_schema in which the tables are located. +#' @param vocab_schema The database vocab_schema in which the concept tables are located. #' #' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, #' direct count of records, descendant count of persons, and descendant count of records. diff --git a/R/isStandard.R b/R/isStandard.R index b1898217..1afa16fc 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -5,6 +5,7 @@ #' @param db_connection A DBI database connection object to the SQL database containing the standard concepts table. #' @param data_concepts_path The file path to the directory containing CSV files of tables to be checked against the standard concepts table. Each CSV file should contain at least the columns `sourceCode` and `concept_id`. #' @param save_path (Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts. +#' @param vocab_schema The schema name of the vocabulary database containing the standard concepts table. #' #' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. #' @@ -29,7 +30,6 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat concept_table_query <- paste0( "SELECT concept_id, concept_name, standard_concept FROM ", vocab_schema, ".concept" ) - print(concept_table_query) concept_table <- dbGetQuery(db_connection, concept_table_query) %>% mutate(concept_id = as.character(concept_id)) %>% mutate(concept_id = tolower(trimws(concept_id))) diff --git a/man/Capr-PHEMS-package.Rd b/man/Capr-PHEMS-package.Rd index d31c3876..628b6a72 100644 --- a/man/Capr-PHEMS-package.Rd +++ b/man/Capr-PHEMS-package.Rd @@ -8,7 +8,7 @@ \description{ \if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} -Capr Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. For PHEMS this package has been extended with additional functions to support PHEMS cohort creation under the name Capr-PHEMS. +Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. } \seealso{ Useful links: @@ -16,14 +16,11 @@ Useful links: \item \url{https://ohdsi.github.io/Capr/} \item \url{https://github.com/OHDSI/Capr/} \item Report bugs at \url{https://github.com/OHDSI/Capr/issues/} - \item \url{https://thehyve.github.io/Capr-PHEMS/} } } \author{ -\strong{Maintainer}: Martin Lavallee (Capr) \email{martin.lavallee@boehringer-ingelheim.com} -\strong{Maintainer}: Guus Wilmink (Capr-PHEMS) \email{guus@thehyve.nl} -} +\strong{Maintainer}: Martin Lavallee \email{martin.lavallee@boehringer-ingelheim.com} Authors: \itemize{ @@ -31,4 +28,5 @@ Authors: \item Guus Wilmink \email{guus@thehyve.nl} } +} \keyword{internal} diff --git a/man/countOccurrences.Rd b/man/countOccurrences.Rd index a7e8456d..93627cff 100644 --- a/man/countOccurrences.Rd +++ b/man/countOccurrences.Rd @@ -4,7 +4,7 @@ \alias{countOccurrences} \title{Count Occurrences of Values in Database Tables} \usage{ -countOccurrences(v, tables, links, db_connection, schema) +countOccurrences(v, tables, links, db_connection, cdm_schema, vocab_schema) } \arguments{ \item{v}{A vector of concept_ids to count occurrences for.} @@ -15,7 +15,9 @@ countOccurrences(v, tables, links, db_connection, schema) \item{db_connection}{A database connection object through which queries will be executed.} -\item{schema}{The database schema in which the tables are located.} +\item{cdm_schema}{The database cdm_schema in which the tables are located.} + +\item{vocab_schema}{The database vocab_schema in which the concept tables are located.} } \value{ A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, @@ -25,15 +27,15 @@ A tibble with columns for the number of times any concept from 'v' occurs: direc } \description{ This function counts the occurrences of specified concept ids within specified tables in a OMOP database, -including direct occurrences and occurrences through descendants, based on a provided schema and links. +including direct occurrences and occurrences through descendants, based on a provided cdm_schema and links. It returns a tibble summarizing the counts across persons and across records. } \examples{ -# Assuming `db_connection` is a valid database connection, `schema` is set to "public", +# Assuming `db_connection` is a valid database connection, `cdm_schema` is set to "public", # `tables` contains the names of the tables to search, `links` defines the relevant fields, # and `v` contains the values to search for: results <- countOccurrences(v = c(1, 2), tables = c("observation", "condition_occurrence"), links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), - db_connection = db_connection, schema = "public") + db_connection = db_connection, cdm_schema = "public") } diff --git a/man/isStandard.Rd b/man/isStandard.Rd index e9941178..6ae9f117 100644 --- a/man/isStandard.Rd +++ b/man/isStandard.Rd @@ -4,13 +4,15 @@ \alias{isStandard} \title{Check for Non-Standard Concepts in Database Tables} \usage{ -isStandard(db_connection, data_concepts_path, save_path = NULL) +isStandard(db_connection, data_concepts_path, vocab_schema, save_path = NULL) } \arguments{ \item{db_connection}{A DBI database connection object to the SQL database containing the standard concepts table.} \item{data_concepts_path}{The file path to the directory containing CSV files of tables to be checked against the standard concepts table. Each CSV file should contain at least the columns `sourceCode` and `concept_id`.} +\item{vocab_schema}{The schema name of the vocabulary database containing the standard concepts table.} + \item{save_path}{(Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts.} } \value{ diff --git a/renv.lock b/renv.lock index b5d99ca4..ab095ac1 100644 --- a/renv.lock +++ b/renv.lock @@ -9,42 +9,6 @@ ] }, "Packages": { - "Capr": { - "Package": "Capr", - "Version": "2.0.8", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "Capr", - "RemoteUsername": "OHDSI", - "RemoteRef": "HEAD", - "RemoteSha": "c25f7365476b05af79497201e165d33acd1f110a", - "Requirements": [ - "CirceR", - "DBI", - "DatabaseConnector", - "R", - "SqlRender", - "checkmate", - "cli", - "digest", - "dplyr", - "fs", - "generics", - "glue", - "jsonlite", - "lubridate", - "magrittr", - "methods", - "purrr", - "readr", - "rlang", - "stringr", - "tibble", - "tidyr" - ], - "Hash": "9f6109f92821d1799da4b15fc73d0066" - }, "CirceR": { "Package": "CirceR", "Version": "1.3.3", @@ -57,53 +21,6 @@ ], "Hash": "2f9522a81dac11183e90b4236afa441d" }, - "CohortGenerator": { - "Package": "CohortGenerator", - "Version": "0.9.0", - "Source": "GitHub", - "RemoteType": "github", - "Remotes": "ohdsi/CirceR, ohdsi/Eunomia, ohdsi/ROhdsiWebApi", - "RemoteHost": "api.github.com", - "RemoteRepo": "CohortGenerator", - "RemoteUsername": "ohdsi", - "RemoteRef": "HEAD", - "RemoteSha": "e3efad630b8b2c0376431a88fde89e6c4bbac38c", - "Requirements": [ - "DatabaseConnector", - "ParallelLogger", - "R", - "R6", - "RJSONIO", - "SqlRender", - "bit64", - "checkmate", - "digest", - "dplyr", - "jsonlite", - "lubridate", - "readr", - "rlang", - "stringi" - ], - "Hash": "1ba1b2d91607742e1d53676af13f506f" - }, - "CommonDataModel": { - "Package": "CommonDataModel", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "DatabaseConnector", - "SqlRender", - "dplyr", - "rJava", - "readr", - "rmarkdown", - "stringr" - ], - "Hash": "d009324efba4c142b431202580eb09d1" - }, "DBI": { "Package": "DBI", "Version": "1.2.3", @@ -138,62 +55,6 @@ ], "Hash": "1ef65614602c6534a6c666e872c3b647" }, - "Eunomia": { - "Package": "Eunomia", - "Version": "2.0.0", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "ohdsi", - "RemoteRepo": "Eunomia", - "RemoteRef": "main", - "RemoteSha": "79c89443c8fe424e9dc19ea10e80c1d8d36efa0c", - "Requirements": [ - "CommonDataModel", - "DBI", - "RSQLite", - "arrow", - "readr", - "rlang" - ], - "Hash": "03b2865190a4b57457ba228e231e86c3" - }, - "OhdsiRTools": { - "Package": "OhdsiRTools", - "Version": "2.0.2", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "OhdsiRTools", - "RemoteUsername": "OHDSI", - "RemoteRef": "HEAD", - "RemoteSha": "e076a286dfb9ae925606b85747432f237e19c942", - "Requirements": [ - "RJSONIO", - "codetools", - "formatR", - "httr", - "methods", - "remotes", - "utils" - ], - "Hash": "9ef9345d33fad72aca369809b435938d" - }, - "ParallelLogger": { - "Package": "ParallelLogger", - "Version": "3.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "jsonlite", - "methods", - "snow", - "utils", - "xml2" - ], - "Hash": "fd636fc067099b75b8ad17e9104b10f3" - }, "R6": { "Package": "R6", "Version": "2.5.1", @@ -214,25 +75,6 @@ ], "Hash": "2f89abc0f88c647d3386c672632f4baf" }, - "RSQLite": { - "Package": "RSQLite", - "Version": "2.3.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "bit64", - "blob", - "cpp11", - "memoise", - "methods", - "pkgconfig", - "plogr", - "rlang" - ], - "Hash": "46b45a4dd7bb0e0f4e3fc22245817240" - }, "Rcpp": { "Package": "Rcpp", "Version": "1.0.12", @@ -256,48 +98,6 @@ ], "Hash": "e1762de0f08b14658d74989c10e2f265" }, - "arrow": { - "Package": "arrow", - "Version": "16.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "assertthat", - "bit64", - "cpp11", - "glue", - "methods", - "purrr", - "rlang", - "stats", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "d9cb18a8fc53895548150650cadde3a6" - }, - "askpass": { - "Package": "askpass", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "sys" - ], - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" - }, - "assertthat": { - "Package": "assertthat", - "Version": "0.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "50c838a310445e954bc13f26f26a6ecf" - }, "backports": { "Package": "backports", "Version": "1.5.0", @@ -308,16 +108,6 @@ ], "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, - "base64enc": { - "Package": "base64enc", - "Version": "0.1-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "543776ae6848fde2f48ff3816d0628bc" - }, "bit": { "Package": "bit", "Version": "4.0.5", @@ -354,69 +144,6 @@ ], "Hash": "40415719b5a479b87949f3aa0aee737c" }, - "brew": { - "Package": "brew", - "Version": "1.0-10", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f4a384e19dccd8c65356dc096847b76" - }, - "brio": { - "Package": "brio", - "Version": "1.1.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "c1ee497a6d999947c2c224ae46799b1a" - }, - "bslib": { - "Package": "bslib", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "cachem", - "fastmap", - "grDevices", - "htmltools", - "jquerylib", - "jsonlite", - "lifecycle", - "memoise", - "mime", - "rlang", - "sass" - ], - "Hash": "8644cc53f43828f19133548195d7e59e" - }, - "cachem": { - "Package": "cachem", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "fastmap", - "rlang" - ], - "Hash": "cd9a672193789068eb5a2aad65a0dedf" - }, - "callr": { - "Package": "callr", - "Version": "3.7.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "processx", - "utils" - ], - "Hash": "d7e13f49c19103ece9e58ad2d83a7354" - }, "checkmate": { "Package": "checkmate", "Version": "2.3.1", @@ -460,23 +187,6 @@ ], "Hash": "61e097f35917d342622f21cdc79c256e" }, - "commonmark": { - "Package": "commonmark", - "Version": "1.9.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5d8225445acb167abf7797de48b2ee3c" - }, - "config": { - "Package": "config", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "yaml" - ], - "Hash": "8b7222e9d9eb5178eea545c0c4d33fc2" - }, "cpp11": { "Package": "cpp11", "Version": "0.4.7", @@ -499,30 +209,6 @@ ], "Hash": "859d96e65ef198fd43e82b9628d593ef" }, - "credentials": { - "Package": "credentials", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass", - "curl", - "jsonlite", - "openssl", - "sys" - ], - "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" - }, - "curl": { - "Package": "curl", - "Version": "5.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" - }, "dbplyr": { "Package": "dbplyr", "Version": "2.5.0", @@ -551,68 +237,6 @@ ], "Hash": "39b2e002522bfd258039ee4e889e0fd1" }, - "desc": { - "Package": "desc", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "utils" - ], - "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" - }, - "devtools": { - "Package": "devtools", - "Version": "2.4.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "desc", - "ellipsis", - "fs", - "lifecycle", - "memoise", - "miniUI", - "pkgbuild", - "pkgdown", - "pkgload", - "profvis", - "rcmdcheck", - "remotes", - "rlang", - "roxygen2", - "rversions", - "sessioninfo", - "stats", - "testthat", - "tools", - "urlchecker", - "usethis", - "utils", - "withr" - ], - "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" - }, - "diffobj": { - "Package": "diffobj", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "crayon", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" - }, "digest": { "Package": "digest", "Version": "0.6.36", @@ -624,26 +248,6 @@ ], "Hash": "fd6824ad91ede64151e93af67df6376b" }, - "downlit": { - "Package": "downlit", - "Version": "0.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "brio", - "desc", - "digest", - "evaluate", - "fansi", - "memoise", - "rlang", - "vctrs", - "withr", - "yaml" - ], - "Hash": "45a6a596bf0108ee1ff16a040a2df897" - }, "dplyr": { "Package": "dplyr", "Version": "1.1.4", @@ -667,28 +271,6 @@ ], "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, - "evaluate": { - "Package": "evaluate", - "Version": "0.24.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" - }, "fansi": { "Package": "fansi", "Version": "1.0.6", @@ -701,35 +283,6 @@ ], "Hash": "962174cf2aeb5b9eea581522286a911f" }, - "fastmap": { - "Package": "fastmap", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" - }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" - }, - "formatR": { - "Package": "formatR", - "Version": "1.14", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "63cb26d12517c7863f5abb006c5e0f25" - }, "fs": { "Package": "fs", "Version": "1.6.4", @@ -752,187 +305,34 @@ ], "Hash": "15e9634c0fcd294799e9b2e929ed1b86" }, - "gert": { - "Package": "gert", - "Version": "2.0.1", + "glue": { + "Package": "glue", + "Version": "1.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "askpass", - "credentials", - "openssl", - "rstudioapi", - "sys", - "zip" + "R", + "methods" ], - "Hash": "f70d3fe2d9e7654213a946963d1591eb" + "Hash": "e0b3a53876554bd45879e596cdb10a52" }, - "gh": { - "Package": "gh", - "Version": "1.4.1", + "hms": { + "Package": "hms", + "Version": "1.1.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "R", - "cli", - "gitcreds", - "glue", - "httr2", - "ini", - "jsonlite", "lifecycle", - "rlang" + "methods", + "pkgconfig", + "rlang", + "vctrs" ], - "Hash": "fbbbc48eba7a6626a08bb365e44b563b" + "Hash": "b59377caa7ed00fa41808342002138f9" }, - "gitcreds": { - "Package": "gitcreds", - "Version": "0.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" - }, - "glue": { - "Package": "glue", - "Version": "1.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" - }, - "highr": { - "Package": "highr", - "Version": "0.11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "xfun" - ], - "Hash": "d65ba49117ca223614f71b60d85b8ab7" - }, - "hms": { - "Package": "hms", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" - ], - "Hash": "b59377caa7ed00fa41808342002138f9" - }, - "htmltools": { - "Package": "htmltools", - "Version": "0.5.8.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "digest", - "fastmap", - "grDevices", - "rlang", - "utils" - ], - "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" - }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "04291cc45198225444a397606810ac37" - }, - "httpuv": { - "Package": "httpuv", - "Version": "1.6.15", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "Rcpp", - "later", - "promises", - "utils" - ], - "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" - }, - "httr": { - "Package": "httr", - "Version": "1.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "curl", - "jsonlite", - "mime", - "openssl" - ], - "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" - }, - "httr2": { - "Package": "httr2", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "curl", - "glue", - "lifecycle", - "magrittr", - "openssl", - "rappdirs", - "rlang", - "vctrs", - "withr" - ], - "Hash": "03d741c92fda96d98c3a3f22494e3b4a" - }, - "ini": { - "Package": "ini", - "Version": "0.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "6154ec2223172bce8162d4153cda21f7" - }, - "jquerylib": { - "Package": "jquerylib", - "Version": "0.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools" - ], - "Hash": "5aab57a3bd297eee1c1d862735972182" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -940,33 +340,6 @@ ], "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, - "knitr": { - "Package": "knitr", - "Version": "1.48", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "evaluate", - "highr", - "methods", - "tools", - "xfun", - "yaml" - ], - "Hash": "acf380f300c721da9fde7df115a5f86f" - }, - "later": { - "Package": "later", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp", - "rlang" - ], - "Hash": "a3e051d405326b8b0012377434c62b37" - }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.4", @@ -1003,49 +376,6 @@ ], "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, - "memoise": { - "Package": "memoise", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cachem", - "rlang" - ], - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" - }, - "mime": { - "Package": "mime", - "Version": "0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "18e9c28c1d3ca1560ce30658b22ce104" - }, - "miniUI": { - "Package": "miniUI", - "Version": "0.1.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools", - "shiny", - "utils" - ], - "Hash": "fec5f52652d60615fdb3957b3d74324a" - }, - "openssl": { - "Package": "openssl", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "askpass" - ], - "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" - }, "pillar": { "Package": "pillar", "Version": "1.9.0", @@ -1063,21 +393,6 @@ ], "Hash": "15da5a8412f317beeee6175fbc76f4bb" }, - "pkgbuild": { - "Package": "pkgbuild", - "Version": "1.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "callr", - "cli", - "desc", - "processx" - ], - "Hash": "a29e8e134a460a01e0ca67a4763c595b" - }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", @@ -1088,71 +403,6 @@ ], "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, - "pkgdown": { - "Package": "pkgdown", - "Version": "2.0.9", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "bslib", - "callr", - "cli", - "desc", - "digest", - "downlit", - "fs", - "httr", - "jsonlite", - "magrittr", - "memoise", - "purrr", - "ragg", - "rlang", - "rmarkdown", - "tibble", - "whisker", - "withr", - "xml2", - "yaml" - ], - "Hash": "8bf1151ed1a48328d71b937e651117a6" - }, - "pkgload": { - "Package": "pkgload", - "Version": "1.3.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "crayon", - "desc", - "fs", - "glue", - "methods", - "pkgbuild", - "rlang", - "rprojroot", - "utils", - "withr" - ], - "Hash": "876c618df5ae610be84356d5d7a5d124" - }, - "plogr": { - "Package": "plogr", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "09eb987710984fc2905c7129c7d85e65" - }, - "praise": { - "Package": "praise", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a555924add98c99d2f411e37e7d25e9f" - }, "prettyunits": { "Package": "prettyunits", "Version": "1.2.0", @@ -1163,34 +413,6 @@ ], "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" }, - "processx": { - "Package": "processx", - "Version": "3.8.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "ps", - "utils" - ], - "Hash": "0c90a7d71988856bad2a2a45dd871bb9" - }, - "profvis": { - "Package": "profvis", - "Version": "0.3.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmlwidgets", - "purrr", - "rlang", - "stringr", - "vctrs" - ], - "Hash": "aa5a3864397ce6ae03458f98618395a1" - }, "progress": { "Package": "progress", "Version": "1.2.3", @@ -1205,33 +427,6 @@ ], "Hash": "f4625e061cb2865f111b47ff163a5ca6" }, - "promises": { - "Package": "promises", - "Version": "1.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "Rcpp", - "fastmap", - "later", - "magrittr", - "rlang", - "stats" - ], - "Hash": "434cd5388a3979e74be5c219bcd6e77d" - }, - "ps": { - "Package": "ps", - "Version": "1.7.6", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "utils" - ], - "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" - }, "purrr": { "Package": "purrr", "Version": "1.0.2", @@ -1258,49 +453,6 @@ ], "Hash": "524167e771b81342f8dd7a891ed3afa8" }, - "ragg": { - "Package": "ragg", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "systemfonts", - "textshaping" - ], - "Hash": "e3087db406e079a8a2fd87f413918ed3" - }, - "rappdirs": { - "Package": "rappdirs", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5e3c5dc0b071b21fa128676560dbe94d" - }, - "rcmdcheck": { - "Package": "rcmdcheck", - "Version": "1.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "callr", - "cli", - "curl", - "desc", - "digest", - "pkgbuild", - "prettyunits", - "rprojroot", - "sessioninfo", - "utils", - "withr", - "xopen" - ], - "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" - }, "readr": { "Package": "readr", "Version": "2.1.5", @@ -1324,30 +476,6 @@ ], "Hash": "9de96463d2117f6ac49980577939dfb3" }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tibble" - ], - "Hash": "76c9e04c712a05848ae7a23d2f170a40" - }, - "remotes": { - "Package": "remotes", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "3ee025083e66f18db6cf27b56e23e141" - }, "renv": { "Package": "renv", "Version": "1.0.7", @@ -1369,165 +497,6 @@ ], "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.27", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "27f9502e1cdbfa195f94e03b0f517484" - }, - "roxygen2": { - "Package": "roxygen2", - "Version": "7.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brew", - "cli", - "commonmark", - "cpp11", - "desc", - "knitr", - "methods", - "pkgload", - "purrr", - "rlang", - "stringi", - "stringr", - "utils", - "withr", - "xml2" - ], - "Hash": "6ee25f9054a70f44d615300ed531ba8d" - }, - "rprojroot": { - "Package": "rprojroot", - "Version": "2.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" - }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "96710351d642b70e8f02ddeb237c46a7" - }, - "rversions": { - "Package": "rversions", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "curl", - "utils", - "xml2" - ], - "Hash": "a9881dfed103e83f9de151dc17002cd1" - }, - "sass": { - "Package": "sass", - "Version": "0.4.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "fs", - "htmltools", - "rappdirs", - "rlang" - ], - "Hash": "d53dbfddf695303ea4ad66f86e99b95d" - }, - "sessioninfo": { - "Package": "sessioninfo", - "Version": "1.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "tools", - "utils" - ], - "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" - }, - "shiny": { - "Package": "shiny", - "Version": "1.8.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "bslib", - "cachem", - "commonmark", - "crayon", - "fastmap", - "fontawesome", - "glue", - "grDevices", - "htmltools", - "httpuv", - "jsonlite", - "later", - "lifecycle", - "methods", - "mime", - "promises", - "rlang", - "sourcetools", - "tools", - "utils", - "withr", - "xtable" - ], - "Hash": "54b26646816af9960a4c64d8ceec75d6" - }, - "snow": { - "Package": "snow", - "Version": "0.4-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "40b74690debd20c57d93d8c246b305d4" - }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5f5a7629f956619d519205ec475fe647" - }, "stringi": { "Package": "stringi", "Version": "1.8.4", @@ -1558,67 +527,6 @@ ], "Hash": "960e2ae9e09656611e0b8214ad543207" }, - "sys": { - "Package": "sys", - "Version": "3.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" - }, - "systemfonts": { - "Package": "systemfonts", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle" - ], - "Hash": "213b6b8ed5afbf934843e6c3b090d418" - }, - "testthat": { - "Package": "testthat", - "Version": "3.2.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brio", - "callr", - "cli", - "desc", - "digest", - "evaluate", - "jsonlite", - "lifecycle", - "magrittr", - "methods", - "pkgload", - "praise", - "processx", - "ps", - "rlang", - "utils", - "waldo", - "withr" - ], - "Hash": "3f6e7e5e2220856ff865e4834766bf2b" - }, - "textshaping": { - "Package": "textshaping", - "Version": "0.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11", - "lifecycle", - "systemfonts" - ], - "Hash": "5142f8bc78ed3d819d26461b641627ce" - }, "tibble": { "Package": "tibble", "Version": "3.2.1", @@ -1688,16 +596,6 @@ ], "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" }, - "tinytex": { - "Package": "tinytex", - "Version": "0.51", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "xfun" - ], - "Hash": "d44e2fcd2e4e076f0aac540208559d1d" - }, "triebeard": { "Package": "triebeard", "Version": "0.4.1", @@ -1719,20 +617,6 @@ ], "Hash": "f561504ec2897f4d46f0c7657e488ae1" }, - "urlchecker": { - "Package": "urlchecker", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "curl", - "tools", - "xml2" - ], - "Hash": "409328b8e1253c8d729a7836fe7f7a16" - }, "urltools": { "Package": "urltools", "Version": "1.7.3", @@ -1746,37 +630,6 @@ ], "Hash": "e86a704261a105f4703f653e05defa3e" }, - "usethis": { - "Package": "usethis", - "Version": "2.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "clipr", - "crayon", - "curl", - "desc", - "fs", - "gert", - "gh", - "glue", - "jsonlite", - "lifecycle", - "purrr", - "rappdirs", - "rlang", - "rprojroot", - "rstudioapi", - "stats", - "utils", - "whisker", - "withr", - "yaml" - ], - "Hash": "d524fd42c517035027f866064417d7e6" - }, "utf8": { "Package": "utf8", "Version": "1.2.4", @@ -1827,31 +680,6 @@ ], "Hash": "390f9315bc0025be03012054103d227c" }, - "waldo": { - "Package": "waldo", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "diffobj", - "fansi", - "glue", - "methods", - "rematch2", - "rlang", - "tibble" - ], - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" - }, - "whisker": { - "Package": "whisker", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "c6abfa47a46d281a7d5159d0a8891e88" - }, "withr": { "Package": "withr", "Version": "3.0.0", @@ -1863,68 +691,6 @@ "graphics" ], "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" - }, - "xfun": { - "Package": "xfun", - "Version": "0.45", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "stats", - "tools" - ], - "Hash": "ca59c87fe305b16a9141a5874c3a7889" - }, - "xml2": { - "Package": "xml2", - "Version": "1.3.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "methods", - "rlang" - ], - "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" - }, - "xopen": { - "Package": "xopen", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "processx" - ], - "Hash": "423df1e86d5533fcb73c6b02b4923b49" - }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, - "yaml": { - "Package": "yaml", - "Version": "2.3.9", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "9cb28d11799d93c953f852083d55ee9e" - }, - "zip": { - "Package": "zip", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" } } } From 726ecaaf72cfb86916bc3b90ff68552b28048022 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:06:07 +0200 Subject: [PATCH 082/130] update gitignore --- .gitignore | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 605febe0..70698253 100644 --- a/.gitignore +++ b/.gitignore @@ -14,11 +14,17 @@ inst/doc # project-specific inst/config/* !inst/config/*-sample.yml -# Adjusted to not ignore .gitkeep files -inst/extdata/**/* # Ignore all files within inst/extdata + +inst/extdata/**/* + !inst/extdata/phems_variable_list -!inst/extdata/json/.gitkeep # Ensure this is not ignored -inst/extdata/json/*.json + +!inst/extdata/json +inst/extdata/json/* + +!inst/extdata/standard_concepts +inst/extdata/standard_concepts/* + !inst/extdata/vocabularies inst/extdata/vocabularies/* !inst/extdata/**/*.gitkeep # Explicitly include .gitkeep files in inst/extdata From 09abdc0b4223ab5c14cdcec8eb5fbabf51e74640 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:13:25 +0200 Subject: [PATCH 083/130] update gitignore --- .gitignore | 3 ++- inst/extdata/json/.gitkeep | 0 inst/extdata/standard_concepts/.gitkeep | 0 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 inst/extdata/json/.gitkeep create mode 100644 inst/extdata/standard_concepts/.gitkeep diff --git a/.gitignore b/.gitignore index 70698253..ccfd0c62 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ inst/extdata/standard_concepts/* !inst/extdata/vocabularies inst/extdata/vocabularies/* -!inst/extdata/**/*.gitkeep # Explicitly include .gitkeep files in inst/extdata + +!*.gitkeep renv \ No newline at end of file diff --git a/inst/extdata/json/.gitkeep b/inst/extdata/json/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/inst/extdata/standard_concepts/.gitkeep b/inst/extdata/standard_concepts/.gitkeep new file mode 100644 index 00000000..e69de29b From 3b9368d6feb5a164cc1b2a82ef02e5ecf9e752c0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:14:25 +0200 Subject: [PATCH 084/130] update gitignore --- inst/extdata/vocabularies/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 inst/extdata/vocabularies/.gitkeep diff --git a/inst/extdata/vocabularies/.gitkeep b/inst/extdata/vocabularies/.gitkeep new file mode 100644 index 00000000..e69de29b From 1c5af40dc4048b8515ae91441e8501134195748d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:24:51 +0200 Subject: [PATCH 085/130] update conceptSets.R --- project/R/conceptSets.R | 122 ++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/project/R/conceptSets.R b/project/R/conceptSets.R index e8205eb2..76ac97cd 100644 --- a/project/R/conceptSets.R +++ b/project/R/conceptSets.R @@ -283,6 +283,67 @@ conceptSets <- list( 42537043, # source: CVL infections /// concept: CLABSI - central line associated bloodstream infection 4306136 # source: Surgical injury - Chylothorax /// concept: Chylothorax ), + + # 5.15 Vital signs + vitalSigns = c( + 3027018, # source: Age-dependent HR /// concept: Heart rate + 3024171, # source: Age-dependent RR /// concept: Respiratory rate + 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure + 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure + 4020553 # source: SpO2 /// concept: Oxygen saturation measurement + ), + + # 5.16 HSJD clinical + HSJDClinical = c( + 3025315, # source: Weight /// concept: Body weight + 3036277, # source: Height /// concept: Body height + 4201235, # source: Body Surface Area (BSA) - Combination of weight and height /// concept: body surface area + 4275564 # source: Cardiac surgeries (Interventions) /// concept: Operation on heart + ), + + # 5.17 HSJD Surgery + HSJDSurgery = c( + 40490494, # source: STAT/EACTS score of surgery /// concept: Society of Thoracic Surgeons risk calculator + 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure + 4336464, # source: Cardiac bypass start datetime, end datetime /// concept: Coronary artery bypass graft + 4201547, # source: Cross-clamping start datetime, end datetime /// concept: Placement of arterial cross clamp + 37152781, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Hypothermic circulatory arrest + 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation + 4150627 # source: Extubation event /// concept: Removal of endotracheal tube + ), + + # 5.18 HSJD Hospitalisations + HSJDHospitalisation = c( + 44803020, # source: Admission reason /// concept: Primary reason for admission + 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug + 4179206, # source: Postop central venous catheter in/start datetime, out/end datetime /// concept: Central venous catheter + 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation + 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation + ), + + # 5.19 HSJD Complications + HSJDcomplications = c( + 4202832, # source: intubation /// concept: Intubation + 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart + 4044892, # source: Sternum reopening (procedure undertaken) /// concept: Procedure on sternum + 4046868, # source: Vocal Cord Dysfunction /// concept: Vocal cord dysfunction + 4275136, # source: Diaphragmatic Paralysis /// concept: Paralysis of diaphragm + 253796, # source: Pneumothorax /// concept: Pneumothorax + 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea + 44784217, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Cardiac arrhythmia + 315643, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Tachyarrhythmia + 4228448, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Bradyarrhythmia + 4068155, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Atrial arrhythmia + 4185572, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Ventricular arrhythmia + 46234437, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: ivabradine + 1309944, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: amiodarone + 1354860, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: flecainide + 4353741, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Cardioversion + 4117045, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Atrial overdrive pacing + 4049398, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Temporary cardiac pacemaker procedure + 4051940, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Permanent cardiac pacemaker procedure + 609312 # source: Listed for heart transplantation /// concept: Awaiting transplantation of heart + ), # 5.21 healthcare use healthcareUse = c( @@ -433,67 +494,6 @@ conceptSets <- list( 3012544 # source: pH /// concept: pH of Venous blood ), - # - vitalSigns = c( - 3027018, # source: Age-dependent HR /// concept: Heart rate - 3024171, # source: Age-dependent RR /// concept: Respiratory rate - 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure - 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure - 4020553 # source: SpO2 /// concept: Oxygen saturation measurement - ), - - # 5.16 HSJD clinical - HSJDClinical = c( - 3025315, # source: Weight /// concept: Body weight - 3036277, # source: Height /// concept: Body height - 4201235, # source: Body Surface Area (BSA) - Combination of weight and height /// concept: body surface area - 4275564 # source: Cardiac surgeries (Interventions) /// concept: Operation on heart - ), - - # 5.17 HSJD Surgery - HSJDSurgery = c( - 40490494, # source: STAT/EACTS score of surgery /// concept: Society of Thoracic Surgeons risk calculator - 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure - 4336464, # source: Cardiac bypass start datetime, end datetime /// concept: Coronary artery bypass graft - 4201547, # source: Cross-clamping start datetime, end datetime /// concept: Placement of arterial cross clamp - 37152781, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Hypothermic circulatory arrest - 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation - 4150627 # source: Extubation event /// concept: Removal of endotracheal tube - ), - - # 5.18 HSJD Hospitalisations - HSJDHospitalisation = c( - 44803020, # source: Admission reason /// concept: Primary reason for admission - 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug - 4179206, # source: Postop central venous catheter in/start datetime, out/end datetime /// concept: Central venous catheter - 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation - 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation - ), - - # 5.19 HSJD Complications - HSJDcomplications = c( - 4202832, # source: intubation /// concept: Intubation - 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart - 4044892, # source: Sternum reopening (procedure undertaken) /// concept: Procedure on sternum - 4046868, # source: Vocal Cord Dysfunction /// concept: Vocal cord dysfunction - 4275136, # source: Diaphragmatic Paralysis /// concept: Paralysis of diaphragm - 253796, # source: Pneumothorax /// concept: Pneumothorax - 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea - 44784217, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Cardiac arrhythmia - 315643, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Tachyarrhythmia - 4228448, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Bradyarrhythmia - 4068155, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Atrial arrhythmia - 4185572, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Ventricular arrhythmia - 46234437, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: ivabradine - 1309944, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: amiodarone - 1354860, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: flecainide - 4353741, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Cardioversion - 4117045, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Atrial overdrive pacing - 4049398, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Temporary cardiac pacemaker procedure - 4051940, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Permanent cardiac pacemaker procedure - 609312 # source: Listed for heart transplantation /// concept: Awaiting transplantation of heart - ), - # 5.28 Patient characteristics UC3PateintCharacteristics = c( 434007, # source: hemophilia A diagnosis /// concept: hereditary factor VIII deficiency disease From a55ab9f8c66c7fa924bb62a86b876ef34e99da10 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:41:00 +0200 Subject: [PATCH 086/130] update cohort definition --- inst/templates/cohortCapr_md.Rmd | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 56559e9a..51e81e60 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -151,11 +151,11 @@ any of the lab test measurements limit to first/earliest occurrence of any of the above measurements (+descendants) per person ```{r Cohort definition} ## Cohort definition -# Example cohort definition +# Create cohort definition ch <- cohort( entry = entry( - # enter patients who have had a lab test - measurement(conceptSets$conceptSets$labTests), + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -176,17 +176,20 @@ ch <- cohort( withAny( atLeast( x = 1, - # include all cardiac surgeries - query = procedure(conceptSets$conceptSets$cardiacProcedures) + # include patients who have had cardiac surgery + query = procedure(conceptSets$conceptSets$cardiacSurgery) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) ) ) ), exit = exit( - endStrategy = observationExit(), - censor = censoringEvents( - # exit if intubation has taken place - procedure(conceptSets$conceptSets$intubation) - ) + endStrategy = observationExit() ) ) ``` From 1e907d1fbee5ce46aa821cbe2e393018e717ccdd Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:41:18 +0200 Subject: [PATCH 087/130] remove project folder --- project/R/cohortCapr_md.Rmd | 0 .../phems_variable_list/5.15_vital_signs.csv | 0 ...e_use_diagnoses_procedures_current_eps.csv | 85 ------------------- 3 files changed, 85 deletions(-) delete mode 100644 project/R/cohortCapr_md.Rmd delete mode 100644 project/data/phems_variable_list/5.15_vital_signs.csv delete mode 100644 project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv diff --git a/project/R/cohortCapr_md.Rmd b/project/R/cohortCapr_md.Rmd deleted file mode 100644 index e69de29b..00000000 diff --git a/project/data/phems_variable_list/5.15_vital_signs.csv b/project/data/phems_variable_list/5.15_vital_signs.csv deleted file mode 100644 index e69de29b..00000000 diff --git a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv deleted file mode 100644 index b7171725..00000000 --- a/project/data/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ /dev/null @@ -1,85 +0,0 @@ -sourceCode,concept_id -Abcess,444202 -Antibiotics,4085730 -Antineoplastics,4181511 -Antivirals,4140762 -Arterial blood pressure catheter,45758028 -Cancer,443392 -Central venous catheter,4179206 -"Chest opening, chest drainage",4074689 -Corticoids,21602722 -Crohn's disease,201606 -Cushing's disease,195212 -Diagnosis of SIRS,434821 -Diagnosis of acute infection having the potential for progression to sepsis1+2,37174269 -Diagnosis of acute infection having the potential for progression to sepsis1+2,4271450 -Diagnosis of chronic condition,443783 -Diagnosis of chronic condition,312723 -Diagnosis of chronic condition,201820 -Diagnosis of chronic condition,255573 -Diagnosis of condition producing immunodeficiency,4140977 -Diagnosis of organ system dysfunction,4080011 -Dialysis,4032243 -Dialysis,4051330 -Down's syndrome,439125 -ECMO,4052536 -ECMO type,37206601 -ECMO type,37206603 -Endotracheal tube,4097216 -FiO2,720868 -FiO2,42869590 -FiO2,8510 -FiO2,8554 -Immunosuppressors,4314777 -Invasive ventilation,44790095 -Mean Airway Pressure (MAP),8876 -Mean Airway Pressure (MAP),44777590 -Mean Airway Pressure (MAP),42527086 -Mean Airway Pressure (MAP),44777602 -Meningo-encephalitis,4322814 -Nasogastric/orogastric tube,42538045 -Non-invasive ventilation,4177224 -Origin (external),44790567 -Origin (internal),4294886 -Oxygenation index,8529 -Oxygenation index,4193843 -Peripheral IV cannulas,4177205 -Peritoneal dialysis,4324124 -Previous diagnosis of sepsis measure,132797 -Previous diagnosis of sepsis measure,1340204 -Reason for admission,44803020 -Surgical admission (non-urgent),4084670 -Surgical admission (urgent),4123946 -Tracheostomy,44783799 -UTI,4331815 -Urinary catheter,4070667 -Ventricular assist device (VAD),4235043 -acute kidney injury,197320 -appendicitis,440448 -asplenia,45768671 -bacteremia,132736 -candidiasis,433968 -cardiac arrest,321042 -cellulitis,435613 -cerebral palsy,4134120 -endocarditis,441589 -hepatitis,4243475 -immunodeficiency,433740 -injury with open wound,444187 -meningitis,435785 -miocarditis,314383 -mitochondrial disease,81539 -necrotizing enterocolitis,44807226 -nephrotic syndrome,195314 -neutropenia,604243 -organ transplant,4208341 -peritonitis,196152 -pneumonia,255848 -renal insufficiency,36716945 -rheumatoid arthritis,80809 -sickle cell disease,22281 -surgery previous to prediction time point,4301351 -surgical site inflammation,4300243 -tuberculosis,4103588 -ulcerative colitis,81893 -viremia,133327 From 9e66480eefa9b2489ce522c78be64f65c815b83c Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 19 Jul 2024 15:44:29 +0200 Subject: [PATCH 088/130] re-knit script up to date --- inst/templates/cohortCapr.R | 62 +++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R index e9aefe7b..3d86bede 100644 --- a/inst/templates/cohortCapr.R +++ b/inst/templates/cohortCapr.R @@ -1,18 +1,20 @@ -## ----knitr, include=FALSE------------------------------------------------------------------------------------ +## ----knitr, include=FALSE----------------------------------------------------------------- +knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) + knitr::opts_chunk$set(echo = TRUE) -# knitr::purl( -# input = './R/cohortCapr_md.Rmd', -# output = './R/cohortCapr.R' -# ) +knitr::purl( + input = './inst/templates/cohortCapr_md.Rmd', + output = './inst/templates/cohortCapr.R' +) -## ----Get project configurations------------------------------------------------------------------------------ +## ----Get project configurations----------------------------------------------------------- connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -## ----Load libraries------------------------------------------------------------------------------------------ +## ----Load libraries----------------------------------------------------------------------- library(RSQLite) library(tibble) library(DatabaseConnector) @@ -21,7 +23,7 @@ library(CirceR) library(Capr) -## ----connect to database, eval=TRUE, include=TRUE------------------------------------------------------------ +## ----connect to database, eval=TRUE, include=TRUE----------------------------------------- # Use connection details from configuration connectionDetails <- createConnectionDetails( dbms = connectionConfig$dbms, @@ -34,7 +36,7 @@ connectionDetails <- createConnectionDetails( ) -## ----concept sets, echo=TRUE--------------------------------------------------------------------------------- +## ----concept sets, echo=TRUE-------------------------------------------------------------- ## Concept sets source("./R/conceptSets.R") @@ -51,7 +53,7 @@ conceptSets$conceptSets <- conceptSets$conceptSets %>% disconnect(con) -## ----count occurences---------------------------------------------------------------------------------------- +## ----count occurences--------------------------------------------------------------------- ## Count occurrences of each concept in data # Establish connection @@ -70,14 +72,14 @@ source("./R/table_linked_to_concept_field.R") # ) %>% print() labTestsCounts <- countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema + conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema ) %>% print() # Disconnect disconnect(con) -## ----Standard non-standard check----------------------------------------------------------------------------- +## ----Standard non-standard check---------------------------------------------------------- # Connect to DB con <- connect(connectionDetails) @@ -86,6 +88,7 @@ source('./R/isStandard.R') nonStandard <- isStandard( db_connection = con, data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, # (optional) Save the results (with standard and non-standard concepts) save_path = config_oth$save_path_isStandard ) @@ -97,7 +100,8 @@ disconnect(con) nonStandard -## ----Standard non-standard check concept set----------------------------------------------------------------- + +## ----Standard non-standard check concept set---------------------------------------------- # connect to DB con <- connect(connectionDetails) @@ -109,6 +113,7 @@ source('./R/isStandardCS.R') nonStandardCS <- isStandardCS( db_connection = con, conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) save_path = config_oth$save_path_isStandard ) @@ -119,13 +124,13 @@ disconnect(con) nonStandardCS -## ----Cohort definition--------------------------------------------------------------------------------------- +## ----Cohort definition-------------------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( entry = entry( - # enter patients who have had a lab test - measurement(conceptSets$conceptSets$labTests), + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), observationWindow = continuousObservation(0, 0), primaryCriteriaLimit = "All" ), @@ -146,22 +151,25 @@ ch <- cohort( withAny( atLeast( x = 1, - # include all cardiac surgeries - query = procedure(conceptSets$conceptSets$cardiacProcedures) + # include patients who have had cardiac surgery + query = procedure(conceptSets$conceptSets$cardiacSurgery) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) ) ) ), exit = exit( - endStrategy = observationExit(), - censor = censoringEvents( - # exit if intubation has taken place - procedure(conceptSets$conceptSets$intubation) - ) + endStrategy = observationExit() ) ) -## ----json and sql-------------------------------------------------------------------------------------------- +## ----json and sql------------------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -176,7 +184,7 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json------------------------------------------------------------------------ +## ----Save cohort and concept set json----------------------------------------------------- write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) for (cs in names(conceptSets$conceptSets)) { writeConceptSet( @@ -186,7 +194,7 @@ for (cs in names(conceptSets$conceptSets)) { } -## ----Create and generate cohorts----------------------------------------------------------------------------- +## ----Create and generate cohorts---------------------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -228,7 +236,7 @@ disconnect(con) cohortCounts -## ----Number of people in DB---------------------------------------------------------------------------------- +## ----Number of people in DB--------------------------------------------------------------- # Establish connection con <- connect(connectionDetails) From 13869dbe9e2a9131a2871ea6bd475128971eb349 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:57:39 +0200 Subject: [PATCH 089/130] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dda67a55..689f5698 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,9 @@ cp connection_config-sample.yml connection_config.yml and fill in your configuration details. 4a. Open RStudio and verify renv >= 1.0.7 is installed by calling packageVersion("renv"). If not installed, call install.packages("renv) + 4b. In the top-right "Project" dropdown menu, select "Open Project" and open ./Capr-PHEMS.Rproj + 4c. .Rprofile will be sourced when opening the project; this will trigger renv::init() to initialize the environment. When prompted whether to use a DESCRIPTION file for dependency discovery, select option 1 to use the DESCRIPTION file. Next, you may be prompted the project already has a lockfile with another set of options. Here also select option 1 to restore the project from the lockfile. This will install all required packages to the environment. Your renv is now activated. 5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to use the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. From 053335fa0280592a1c941d0911aa05b6425cc2c2 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:02:35 +0200 Subject: [PATCH 090/130] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 689f5698..b7d3be89 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ For Capr-PHEMS, it is recommended to clone the repo and work from the template s # Getting started with Capr-PHEMS **Prerequisites** + Please make sure you have the following: - R version >= 4.4.0 - RStudio >= 2024.04.2 From 7cc352b331d062785c0c2c84d5f57bdce1ea1c49 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:02:49 +0200 Subject: [PATCH 091/130] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b7d3be89..d1ad823d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Please make sure you have the following: - RStudio >= 2024.04.2 - (CRAN library) renv >= 1.0.7 + 1. Clone the repo: ``` git clone https://github.com/thehyve/Capr-PHEMS.git From b8a105a8970743307455bedf75154f38a8fc5fb0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:08:00 +0200 Subject: [PATCH 092/130] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1ad823d..fd2f4d64 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ and fill in your configuration details. 4c. .Rprofile will be sourced when opening the project; this will trigger renv::init() to initialize the environment. When prompted whether to use a DESCRIPTION file for dependency discovery, select option 1 to use the DESCRIPTION file. Next, you may be prompted the project already has a lockfile with another set of options. Here also select option 1 to restore the project from the lockfile. This will install all required packages to the environment. Your renv is now activated. -5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to use the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. +5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to start by using the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. These templates serve as examples of how Capr and Capr-PHEMS can be used and it is encouraged to modify them locally as you see fit. # User Documentation From 173d72727b2cf0c4a380113ac601bbac6526a8f2 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 5 Aug 2024 09:04:15 +0200 Subject: [PATCH 093/130] remove unnecessary files --- .Rprofile | 14 - Capr-PHEMS.Rproj => Capr.Rproj | 34 +- inst/config/config-sample.yml | 15 - inst/config/connection_config-sample.yml | 37 - inst/extdata/json/.gitkeep | 0 .../5.10_cardiac_radiology.csv | 43 -- .../phems_variable_list/5.11_cardiac_los.csv | 5 - .../phems_variable_list/5.12_additional.csv | 37 - .../5.13_laboratory_tests.csv | 61 -- .../5.14_cardiac_complications.csv | 18 - .../phems_variable_list/5.15_vital_signs.csv | 11 - .../5.16_hsjd_clinical.csv | 9 - .../phems_variable_list/5.17_hsjd_surgery.csv | 10 - .../5.18_hsjd_hospitalisation.csv | 12 - .../5.19_hsjd_complication.csv | 21 - ...e_use_diagnoses_procedures_current_eps.csv | 88 --- .../phems_variable_list/5.22_vital_signs.csv | 88 --- .../5.23_physical_examination_signs.csv | 88 --- .../5.24_laboratory_test_results_uc2.csv | 87 --- .../5.25_arterial_blood_gas.csv | 87 --- .../5.26_venous_blood_gas.csv | 87 --- .../5.28_patient_characteristics.csv | 87 --- .../5.28_uc3_patient_characteristics.csv | 15 - .../5.29_lab_measurements_uc3.csv | 37 - .../5.29_uc3_lab_measurements.csv | 37 - .../phems_variable_list/5.30_treatments.csv | 85 --- .../5.30_uc3_treatments.csv | 42 -- .../5.31_surgery_specific_parameters.csv | 85 --- .../phems_variable_list/5.31_uc3_surgery.csv | 8 - .../5.3_vis_score_medications.csv | 8 - .../5.4_vasopressors_inotropes.csv | 12 - .../5.5_immunosuppressants.csv | 7 - .../5.6_antibiotic_medication.csv | 51 -- .../phems_variable_list/5.7_antifungals.csv | 6 - .../5.8_antibiotic_resistance.csv | 11 - .../5.9_cardiac_surgery.csv | 43 -- .../is_standard/5.10_cardiac_radiology.csv | 43 -- .../is_standard/5.11_cardiac_los.csv | 5 - .../is_standard/5.12_additional.csv | 36 - .../is_standard/5.13_laboratory_tests.csv | 61 -- .../5.14_cardiac_complications.csv | 13 - .../is_standard/5.15_vital_signs.csv | 11 - .../is_standard/5.16_hsjd_clinical.csv | 9 - .../is_standard/5.17_hsjd_surgery.csv | 9 - .../is_standard/5.18_hsjd_hospitalisation.csv | 11 - .../is_standard/5.19_hsjd_complication.csv | 21 - ...e_use_diagnoses_procedures_current_eps.csv | 87 --- .../is_standard/5.22_vital_signs.csv | 21 - .../5.23_physical_examination_signs.csv | 36 - .../5.24_laboratory_test_results_uc2.csv | 41 -- .../is_standard/5.25_arterial_blood_gas.csv | 12 - .../is_standard/5.26_venous_blood_gas.csv | 17 - .../5.28_patient_characteristics.csv | 15 - .../is_standard/5.29_lab_measurements_uc3.csv | 37 - .../is_standard/5.30_treatments.csv | 13 - .../5.31_surgery_specific_parameters.csv | 5 - .../is_standard/5.3_vis_score_medications.csv | 7 - .../5.4_vasopressors_inotropes.csv | 12 - .../is_standard/5.5_immunosuppressants.csv | 7 - .../is_standard/5.6_antibiotic_medication.csv | 51 -- .../is_standard/5.7_antifungals.csv | 6 - .../is_standard/5.8_antibiotic_resistance.csv | 11 - .../is_standard/5.9_cardiac_surgery.csv | 42 -- inst/extdata/standard_concepts/.gitkeep | 0 inst/extdata/vocabularies/.gitkeep | 0 inst/templates/cohortCapr.R | 261 ------- inst/templates/cohortCapr_md.Rmd | 289 -------- renv.lock | 696 ------------------ 68 files changed, 17 insertions(+), 3254 deletions(-) rename Capr-PHEMS.Rproj => Capr.Rproj (94%) delete mode 100644 inst/config/config-sample.yml delete mode 100644 inst/config/connection_config-sample.yml delete mode 100644 inst/extdata/json/.gitkeep delete mode 100644 inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv delete mode 100644 inst/extdata/phems_variable_list/5.11_cardiac_los.csv delete mode 100644 inst/extdata/phems_variable_list/5.12_additional.csv delete mode 100644 inst/extdata/phems_variable_list/5.13_laboratory_tests.csv delete mode 100644 inst/extdata/phems_variable_list/5.14_cardiac_complications.csv delete mode 100644 inst/extdata/phems_variable_list/5.15_vital_signs.csv delete mode 100644 inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv delete mode 100644 inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv delete mode 100644 inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv delete mode 100644 inst/extdata/phems_variable_list/5.19_hsjd_complication.csv delete mode 100644 inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv delete mode 100644 inst/extdata/phems_variable_list/5.22_vital_signs.csv delete mode 100644 inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv delete mode 100644 inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv delete mode 100644 inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv delete mode 100644 inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv delete mode 100644 inst/extdata/phems_variable_list/5.28_patient_characteristics.csv delete mode 100644 inst/extdata/phems_variable_list/5.28_uc3_patient_characteristics.csv delete mode 100644 inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv delete mode 100644 inst/extdata/phems_variable_list/5.29_uc3_lab_measurements.csv delete mode 100644 inst/extdata/phems_variable_list/5.30_treatments.csv delete mode 100644 inst/extdata/phems_variable_list/5.30_uc3_treatments.csv delete mode 100644 inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv delete mode 100644 inst/extdata/phems_variable_list/5.31_uc3_surgery.csv delete mode 100644 inst/extdata/phems_variable_list/5.3_vis_score_medications.csv delete mode 100644 inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv delete mode 100644 inst/extdata/phems_variable_list/5.5_immunosuppressants.csv delete mode 100644 inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv delete mode 100644 inst/extdata/phems_variable_list/5.7_antifungals.csv delete mode 100644 inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv delete mode 100644 inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.12_additional.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv delete mode 100644 inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv delete mode 100644 inst/extdata/standard_concepts/.gitkeep delete mode 100644 inst/extdata/vocabularies/.gitkeep delete mode 100644 inst/templates/cohortCapr.R delete mode 100644 inst/templates/cohortCapr_md.Rmd delete mode 100644 renv.lock diff --git a/.Rprofile b/.Rprofile index 6e0d4744..e69de29b 100644 --- a/.Rprofile +++ b/.Rprofile @@ -1,14 +0,0 @@ -# Force compile packages from source before installing -options( - repos = c(CRAN = "https://cran.rstudio.com"), - install.packages.compile.from.source = TRUE, - pkgType = "source" -) - -if (any(list.files() == "renv")) { - source("renv/activate.R") -} else { - message("No renv initialized, calling renv::init()") - message("Please select to use only the DESCRIPTION file for dependency discovery if prompted, and next select 'Restore the project from the lockfile'") - renv::init() -} diff --git a/Capr-PHEMS.Rproj b/Capr.Rproj similarity index 94% rename from Capr-PHEMS.Rproj rename to Capr.Rproj index 8d82f1f3..21a4da08 100644 --- a/Capr-PHEMS.Rproj +++ b/Capr.Rproj @@ -1,17 +1,17 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/inst/config/config-sample.yml b/inst/config/config-sample.yml deleted file mode 100644 index 93cffcbf..00000000 --- a/inst/config/config-sample.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -## Default configuration values -# Default values are necessary for the `config` CRAN library, not used in package otherwise -# No need to change these values -default: - concepts_path: 'inst/extdata/phems_variable_list' # required for isStandard() function; specifies path to concept list directory with sourceCode and concept_id - save_path_isStandard: 'inst/extdata/phems_variable_list/is_standard' # (optional) if saving standard concept check results. Point to existing directory. - save_path_json: 'inst/extdata/json' # (optional) if saving cohort and/or concept set as json). Point to existing directory - -## Paths for CSVs of concepts and saves -# Replace with your paths -config: - concepts_path: '' - save_path_isStandard: '' - save_path_json: '' \ No newline at end of file diff --git a/inst/config/connection_config-sample.yml b/inst/config/connection_config-sample.yml deleted file mode 100644 index 1e2bc71e..00000000 --- a/inst/config/connection_config-sample.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -## Default configuration values -# Default values are necessary for the `config` CRAN library, not used in package otherwise -# No need to change these values; they are unused -default: - dbms: 'postgres' # Database management system - user: 'postgres' - password: null - server: localhost/omop_db - port: 5432 - oracleDriver: null - pathToDriver: '~/jdbc/' - cdm_schema: 'cdm' - vocabulary_schema: 'vocab' - cohort_schema: 'cohort' - -## Connection details -# Replace with your connection details -# Used primarily as input to DatabaseConnector::createConnectionDetails() -# see the function documentation for more information -# Please check carefully which details are required for your dbms -# as not all of these details may be required. -# cdm_schema should point to the OMOP CDM schema -# vocabulary_schema should point to the schema where the vocabulary tables are stored -# cohort_schema should point to the schema where the cohort tables are stored -# All schemas should be EXISTING in the database -config: - dbms: '' - user: '' - password: '' - server: '' - port: 5432 - oracleDriver: null - pathToDriver: '' - cdm_schema: '' - vocabulary_schema: '' - cohort_schema: '' \ No newline at end of file diff --git a/inst/extdata/json/.gitkeep b/inst/extdata/json/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv b/inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv deleted file mode 100644 index 4627a379..00000000 --- a/inst/extdata/phems_variable_list/5.10_cardiac_radiology.csv +++ /dev/null @@ -1,43 +0,0 @@ -sourceCode,concept_id -24h holter monitor ,45764527  -24h holter monitor ,4140473  -CT head ,4125350  -CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast ,4306317  -CT thorax with contrast ,4327032  -Cardiopulmonary exercise test (CPET) ,40492338  -EEG routine ,4181917  -EEG routine portable ,4205144  -Epicardial echocardiogram ,4203365  -Event monitor ,45765560  -Exercise test (non-CPET) ,4065416  -FL video swallow ,4345925  -IR PICC line insertion ,4322380  -IR bronchogram ,4312208  -IR bronchoscopy ,4032404  -IR tunnelled central venous line insertion ,40482732  -IR tunnelled central venous line removal ,42873079  -MRI cardiac complex congenital ,44802640  -MRI head ,4082979  -Pacemaker/ICD device check - remote patient initiated ,4235141  -Pacemaker/ICD device check - remote device initiated ,4235141  -Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) ,40488431  -US abdomen and pelvis/ US abdomen ,4261497  -US abdomen and pelvis/ US abdomen ,4305221  -US cranial contents ,4083106  -US diaphragmatic region ,4303522  -US doppler ,35622931  -US doppler groin both ,35622931  -US doppler groin both ,4167029  -US doppler jugular vein both ,40489841  -US doppler lower limb veins both ,4335392  -US doppler renal both ,4167052  -US neck ,4083108  -US thorax and pleural cavity ,4329508  -US thorax and pleural cavity ,4093436  -US transoesophageal echocardiogram (toe) ,4019824  -US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) ,4335825  -US urinary tract ,4125530  -US vocal cord ,44813863  -XR abdomen ,4264477  -XR chest ,4163872  -XR chest and abdomen ,4169275  diff --git a/inst/extdata/phems_variable_list/5.11_cardiac_los.csv b/inst/extdata/phems_variable_list/5.11_cardiac_los.csv deleted file mode 100644 index 3039e92e..00000000 --- a/inst/extdata/phems_variable_list/5.11_cardiac_los.csv +++ /dev/null @@ -1,5 +0,0 @@ -sourceCode,concept_id -Cardiology ward admission (start datetime and end datetime) ,36675203  -HDU admission (start datetime and end datetime) ,4161811  -ICU admission (start datetime and end datetime) ,4123933  -Total hospital admission (start datetime and end datetime) ,8715  diff --git a/inst/extdata/phems_variable_list/5.12_additional.csv b/inst/extdata/phems_variable_list/5.12_additional.csv deleted file mode 100644 index c235dccf..00000000 --- a/inst/extdata/phems_variable_list/5.12_additional.csv +++ /dev/null @@ -1,37 +0,0 @@ -sourceCode,concept_id -Base Excess ,8753  -Base Excess ,4095105  -Diagnoses ,4234469  -Elective ICU admission ,4123933  -FiO2 ,42869590  -FiO2 ,8554  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",43530727  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",440207  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",4213310  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",201957  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",314383  -"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) ",321319  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",260134  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4165112  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",442588  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",4029498  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",443727  -"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder ",317009  -Mechanical ventilation ,40493026  -Outpatient appointment type (telephone/ clinic visit etc.) ,5083  -"Outpatient appointments start datetime, end datetime ",9202  -Outpatient specialty ,32577  -PaCO2 ,44777602  -PaCO2 ,3027946  -PaCO2 ,8876  -Pupillary reaction ,4209008  -"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) ",44803020  -Systolic blood pressure ,8876  -Systolic blood pressure ,3004249  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",42537745  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",432571  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4124462  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",321042  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",317510  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",29783  -"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure ",4245975  diff --git a/inst/extdata/phems_variable_list/5.13_laboratory_tests.csv b/inst/extdata/phems_variable_list/5.13_laboratory_tests.csv deleted file mode 100644 index 555203c6..00000000 --- a/inst/extdata/phems_variable_list/5.13_laboratory_tests.csv +++ /dev/null @@ -1,61 +0,0 @@ -sourceCode,concept_id -ALT ,3006923  -ALT ,8645  -AST ,3013721  -AST ,8645  -Albumin ,8713  -Albumin ,3024561  -Albumin ,8636  -Bicarbonate (arterial) ,8753  -Bicarbonate (arterial) ,3008152  -Bicarbonate (venous) ,8753  -Bicarbonate (venous) ,3027273  -Bilirubin ,3006140  -Bilirubin ,8749  -Blood urea nitrogen ,3024641  -Blood urea nitrogen ,8753  -CRP ,8751  -CRP ,3020460  -Calcium ,8753  -Calcium ,3015377  -Chloride ,8753  -Chloride ,3018572  -Creatinine ,8749  -Creatinine ,8840  -Creatinine ,3051825  -Glucose ,3013826  -Glucose ,8753  -Hematocrit ,3009542  -Hematocrit ,8554  -Hemoglobin ,8713  -Hemoglobin ,8636  -Hemoglobin ,40762351  -INR prothrombin time ,3034426  -INR prothrombin time ,8555  -Immature WBC count ,4298431  -Immature WBC count ,8647  -Lactate ,3047181  -Lactate ,8753  -Magnesium ,8753  -Magnesium ,3033836  -Neutrophil count ,3007670  -Neutrophil count ,8647  -Phosphate ,3003458  -Phosphate ,8753  -Platelet count ,8647  -Platelet count ,4267147  -Potassium ,8753  -Potassium ,3005456  -Sodium ,3019550  -Sodium ,8753  -pCO2 (arterial) ,3027946  -pCO2 (arterial) ,8876  -pCO2 (venous) ,44777602  -pCO2 (venous) ,3021447  -pCO2 (venous) ,8876  -pH (arterial) ,37399161  -pH (venous) ,37392672  -pO2 (arterial) ,3027801  -pO2 (arterial) ,8876  -pO2 (venous) ,3024354  -pO2 (venous) ,8876  diff --git a/inst/extdata/phems_variable_list/5.14_cardiac_complications.csv b/inst/extdata/phems_variable_list/5.14_cardiac_complications.csv deleted file mode 100644 index a6e81993..00000000 --- a/inst/extdata/phems_variable_list/5.14_cardiac_complications.csv +++ /dev/null @@ -1,18 +0,0 @@ -sourceCode,concept_id -CVL infections ,42537043  -Extracorporeal membrane oxygenation,4052536  -ICU ward stay ,4123933  -LCOS - Cardiac arrest ,321042  -LCOS - NEC requiring treatment ,4185565  -LCOS - renal support (CVVH/ PD),4324124  -LCOS - renal support (CVVH/ PD) ,4051330  -Low cardiac output state (LCOS) - ECMO,4185565 -Low cardiac output state (LCOS) - ECMO ,4185565  -Neurological injury - intracranial haemmhorage/ intracranial bleeding ,439847  -Neurological injury - infarction ,443454  -Neurological injury - seizure ,377091  -Surgical injury - Blood Loss ,4308537  -Surgical injury - Chylothorax ,4306136  -Surgical injury - Reexplore for bleeding,437312  -Surgical injury - Reexplore for bleeding,442019  -Surgical injury - Reexplore for bleeding ,4295705  diff --git a/inst/extdata/phems_variable_list/5.15_vital_signs.csv b/inst/extdata/phems_variable_list/5.15_vital_signs.csv deleted file mode 100644 index 2e27e1de..00000000 --- a/inst/extdata/phems_variable_list/5.15_vital_signs.csv +++ /dev/null @@ -1,11 +0,0 @@ -sourceCode,concept_id -Age-dependent HR ,3027018 -Age-dependent HR ,8483  -Age-dependent RR ,3024171 -Age-dependent RR ,8483  -SBP (Systolic Blood Pressure) ,3004249 -SBP (Systolic Blood Pressure) ,8876  -DBP (Dyastolic Blood Pressure) ,3012888 -DBP (Dyastolic Blood Pressure) ,8876  -SpO2 ,4096101  -SpO2 ,8554  diff --git a/inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv b/inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv deleted file mode 100644 index 6b3822b4..00000000 --- a/inst/extdata/phems_variable_list/5.16_hsjd_clinical.csv +++ /dev/null @@ -1,9 +0,0 @@ -sourceCode,concept_id -Body Surface Area (BSA) - Combination of weight and height ,4201235  -Body Surface Area (BSA) - Combination of weight and height ,8617  -Cardiac surgeries (Interventions) ,4275564  -Extracardiac anomalies - diagnoses ,0  -Height ,607590  -Height ,8582  -Weight ,3025315  -Weight ,9529  diff --git a/inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv b/inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv deleted file mode 100644 index bb16ac5c..00000000 --- a/inst/extdata/phems_variable_list/5.17_hsjd_surgery.csv +++ /dev/null @@ -1,10 +0,0 @@ -sourceCode,concept_id -"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  -Aristotle's score of surgery ,0  -"Cardiac bypass start datetime, end datetime ",4336464  -"Cross-clamping start datetime, end datetime ",4201547  -"Deep hypothermic circulatory arrest start datetime, end datetime ",37152781  -"Antegrade Cerebral Perfusion start datetime, end datetime ",4272324  -Extubation event ,4150627  -STAT/EACTS score of surgery ,40490494  -"Surgery start datetime, end datetime ",4301351  diff --git a/inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv b/inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv deleted file mode 100644 index 2203052a..00000000 --- a/inst/extdata/phems_variable_list/5.18_hsjd_hospitalisation.csv +++ /dev/null @@ -1,12 +0,0 @@ -sourceCode,concept_id -Admission reason ,44803020  -ventilation ,0  -"Vasoactive infusion start datetime, end datetime ",42539650  -Type of vasoactive infusion ,0  -VIS score of vasoactive infusion ,0  -"Postop central venous catheter in/start datetime, out/ end datetime ",4179206  -"Total ventilation start datetime, end datetime ",0  -Type of vasoactive infusion ,0  -VIS score of vasoactive infusion ,0  -"Vasoactive infusion start datetime, end datetime ",42539650  -ventilation ,0  diff --git a/inst/extdata/phems_variable_list/5.19_hsjd_complication.csv b/inst/extdata/phems_variable_list/5.19_hsjd_complication.csv deleted file mode 100644 index f54c4c87..00000000 --- a/inst/extdata/phems_variable_list/5.19_hsjd_complication.csv +++ /dev/null @@ -1,21 +0,0 @@ -sourceCode,concept_id -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",44784217  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",315643  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4068155  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4228448  -"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) ",4185572  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4117045  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4353741  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4049398  -"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing) ",4051940  -Cardiac surgeries (interventions) ,4275564  -Diaphragmatic Paralysis ,4275136  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1309944  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",46234437  -"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) ",1354860  -Listed for heart transplantation ,609312  -Pneumothorax ,253796  -Sternum reopening (procedure undertaken) ,4044892  -Tracheostomy ,44783799  -Vocal Cord Dysfunction ,4046868  -intubation ,4202832  diff --git a/inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv deleted file mode 100644 index 056df727..00000000 --- a/inst/extdata/phems_variable_list/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ /dev/null @@ -1,88 +0,0 @@ -sourceCode,concept_id -Previous diagnosis of sepsis measure ,1340204  -Previous diagnosis of sepsis measure ,132797  -Origin (external) ,44790567  -Origin (internal) ,4294886  -Reason for admission ,44803020  -Surgical admission (non-urgent) ,4084670  -Surgical admission (urgent) ,4123946   -Non-surgical admission ,0  -Central venous catheter ,4179206  -Diagnosis of chronic condition ,443783  -Diagnosis of chronic condition ,312723  -Diagnosis of chronic condition ,201820  -Diagnosis of chronic condition ,255573  -Diagnosis of acute infection having the potential for progression to sepsis1+2 ,37174269  -Diagnosis of acute infection having the potential for progression to sepsis1+2 ,4271450  -Meningo-encephalitis ,4322814  -hepatitis ,4243475  -pneumonia ,255848  -meningitis ,435785  -bacteremia ,132736  -viremia ,133327  -UTI ,4331815  -tuberculosis ,4103588  -candidiasis ,433968  -Diagnosis of SIRS ,434821  -Diagnosis of condition producing immunodeficiency ,4140977  -Abcess ,444202  -appendicitis ,440448  -, -peritonitis ,196152  -cellulitis ,435613  -surgical site inflammation ,4300243  -injury with open wound ,444187  -renal insufficiency ,36716945  -endocarditis ,441589  -miocarditis ,314383  -necrotizing enterocolitis ,44807226  -Cancer ,443392  -cardiac arrest ,321042  -organ transplant ,4208341  -acute kidney injury ,197320  -immunodeficiency ,433740  -asplenia ,45768671  -cerebral palsy ,4134120  -rheumatoid arthritis ,80809  -sickle cell disease ,22281  -ulcerative colitis ,81893  -Crohn's disease ,201606  -Cushing's disease ,195212  -Down's syndrome ,439125  -mitochondrial disease ,81539  -nephrotic syndrome ,195314  -neutropenia ,604243  -Diagnosis of organ system dysfunction ,4080011  -Antibiotics ,4085730  -Antivirals ,4140762  -Immunosuppressors ,4314777  -Corticoids ,21602722  -Antineoplastics ,4181511  -Surgery previous to prediction time point ,4301351  -"Chest opening, chest drainage ",4074689  -Arterial blood pressure catheter ,45758028  -Peripheral IV cannulas ,4177205  -Urinary catheter ,4070667  -Nasogastric/orogastric tube ,42538045  -Endotracheal tube ,4097216  -Tracheostomy ,44783799  -Invasive ventilation ,44790095  -Non-invasive ventilation ,4177224  -FiO2 ,42869590  -FiO2 ,8554  -FiO2 ,8510  -FiO2 ,720868  -Mean Airway Pressure (MAP) ,42527086  -Mean Airway Pressure (MAP) ,44777590  -Mean Airway Pressure (MAP) ,8876  -Mean Airway Pressure (MAP) ,44777602  -Oxygenation index ,4193843  -Oxygenation index ,8529  -Oxygenation index ,0  -ECMO ,4052536  -ECMO type ,37206603  -ECMO type ,37206601  -Ventricular assist device (VAD) ,4235043  -Dialysis ,4032243  -Dialysis ,4051330  -Peritoneal dialysis ,4324124  diff --git a/inst/extdata/phems_variable_list/5.22_vital_signs.csv b/inst/extdata/phems_variable_list/5.22_vital_signs.csv deleted file mode 100644 index e2bd991b..00000000 --- a/inst/extdata/phems_variable_list/5.22_vital_signs.csv +++ /dev/null @@ -1,88 +0,0 @@ -sourceCode,concept_id -HR ,3027018  -HR ,8483  -RR ,3024171  -RR ,8483  -Body temperature ,3020891  -Body temperature ,586323  -SBP (Systolic Blood Pressure) ,3004249  -SBP (Systolic Blood Pressure) ,8876  -DBP (Diastolic blood pressure) ,3012888  -DBP (Diastolic blood pressure) ,8876  -SpO2 ,4096101  -SpO2 ,8554  -Urine output ,3014315  -Urine output ,8587  -Urine output ,44777613  -Urine output ,33014  -Urine output ,0  -Weight ,3025315  -Weight ,9529  -Weight ,8504  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv b/inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv deleted file mode 100644 index b304ff0d..00000000 --- a/inst/extdata/phems_variable_list/5.23_physical_examination_signs.csv +++ /dev/null @@ -1,88 +0,0 @@ -sourceCode,concept_id -GCS ,3032652  -Pupillary reactivity (right) ,21490963  -Pupillary reactivity (right) ,4069590  -Pupillary reactivity (right) ,45879546  -Pupillary reactivity (right) ,45880051  -Pupillary reactivity (right) ,4188539  -Pupillary reactivity (right) ,4188540  -Pupillary reactivity (left) ,21491763  -Pupillary reactivity (left) ,4069590  -Pupillary reactivity (left) ,45879546  -Pupillary reactivity (left) ,45880051  -Pupillary reactivity (left) ,4188539  -Pupillary reactivity (left) ,4188540  -Pupillary size (right) ,3027214  -Pupillary size (right) ,8588  -Pupillary size (right) ,36310446  -Pupillary size (right) ,21499034  -Pupillary size (right) ,4116857  -Pupillary size (left) ,3021415  -Pupillary size (left) ,8588  -Pupillary size (left) ,36310446  -Pupillary size (left) ,21499034  -Pupillary size (left) ,4116857  -Capillary refill time ,3045676  -Capillary refill time ,8555  -Peripheral pulse (pressure) ,4314539  -Peripheral pulse (pressure) ,4181412  -Peripheral pulse (pressure) ,4132135  -Peripheral pulse (pressure) ,4124461  -Peripheral pulse (pressure) ,8483  -Central pulse ,4224504  -Central pulse ,4181412  -Central pulse ,4132135  -Central pulse ,4124461  -Central pulse ,8483  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv b/inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv deleted file mode 100644 index 70c91b9d..00000000 --- a/inst/extdata/phems_variable_list/5.24_laboratory_test_results_uc2.csv +++ /dev/null @@ -1,87 +0,0 @@ -sourceCode,concept_id -Bacterial pathogen detection ,4036356  -Name of bacterial pathogen detected ,432545  -Quantification of colonies in culture ,4299649  -Quantification of colonies in culture ,9278  -PCR panel ,4196268  -Antibiotic resistance ,44806682  -Viral pathogen detection ,440029  -PCR panel ,4196268  -Leukocytes ,4212899  -Leukocytes ,9278  -Leukocytes ,0  -Thromboplastin time ,4175016  -Thromboplastin time ,8555  -Thromboplastin time ,8523  -D-dimer ,37393605  -D-dimer ,8751  -D-dimer ,8753  -Fibrinogen ,4094436  -Fibrinogen ,8636  -Fibrinogen ,8753  -Blood urea nitrogen ,4017361  -Blood urea nitrogen ,8753  -Blood urea nitrogen ,8840  -Glucose ,3013826  -Glucose ,8753  -Glucose ,8840  -Direct bilirubin ,4118986  -Direct bilirubin ,8749  -Direct bilirubin ,8753  -Direct bilirubin ,8840  -Ionized calcium ,44789220  -Ionized calcium ,8753  -PCT ,3046279  -PCT ,8842  -PCT ,8725  -PCT ,8748  -MR-proADM ,42536081  -MR-proADM ,8736  -Interleukin-6 ,3033291  -Interleukin-6 ,8845  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv b/inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv deleted file mode 100644 index 9db01561..00000000 --- a/inst/extdata/phems_variable_list/5.25_arterial_blood_gas.csv +++ /dev/null @@ -1,87 +0,0 @@ -sourceCode,concept_id -pH ,3019977  -pCO2 ,3027946  -pCO2 ,44777602  -pCO2 ,8876  -PaO2 ,3027801  -PaO2 ,44777602  -PaO2 ,8876  -HCO3 ,3008152  -HCO3 ,8753  -Base excess ,3003396  -Base excess ,8753  -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, diff --git a/inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv b/inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv deleted file mode 100644 index 610e92e9..00000000 --- a/inst/extdata/phems_variable_list/5.26_venous_blood_gas.csv +++ /dev/null @@ -1,87 +0,0 @@ -sourceCode,concept_id, -pH ,3012544 , -pH ,3009343 , -pCO2 ,3021447 , -pCO2 ,3023024 , -pCO2 ,44777602 , -pCO2 ,8876 , -PaO2 ,3024354 , -PaO2 ,3028626 , -PaO2 ,44777602 , -PaO2 ,8876 , -HCO3 ,3027273 , -HCO3 ,3015235 , -HCO3 ,8753 , -Base excess,3002032 , -Base excess,3003129 , -Base excess,8753 , -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, diff --git a/inst/extdata/phems_variable_list/5.28_patient_characteristics.csv b/inst/extdata/phems_variable_list/5.28_patient_characteristics.csv deleted file mode 100644 index ee0ddb64..00000000 --- a/inst/extdata/phems_variable_list/5.28_patient_characteristics.csv +++ /dev/null @@ -1,87 +0,0 @@ -sourceCode,concept_id, -body weight ,3025315 , -body weight ,9529 , -body weight ,8504 , -height ,3036277 , -height ,8582 , -height ,9546 , -hemophilia A diagnosis ,434007 , -hemophilia A subtype/ severity ,4094223 , -hemophilia A subtype/ severity ,4140661 , -hemophilia A subtype/ severity ,4056830 , -blood group ,3003694 , -factor VIII inhibitor status ,37393608 , -factor VIII inhibitor status ,4126681 , -factor VIII inhibitor status ,9190 , -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, diff --git a/inst/extdata/phems_variable_list/5.28_uc3_patient_characteristics.csv b/inst/extdata/phems_variable_list/5.28_uc3_patient_characteristics.csv deleted file mode 100644 index cb8540ad..00000000 --- a/inst/extdata/phems_variable_list/5.28_uc3_patient_characteristics.csv +++ /dev/null @@ -1,15 +0,0 @@ -sourceCode,concept_id -body weight,3025315 -body weight,9529 -body weight,8504 -height,3036277 -height,8582 -height,9546 -hemophilia A diagnosis,434007 -hemophilia A subtype/ severity,4094223 -hemophilia A subtype/ severity,4140661 -hemophilia A subtype/ severity,4056830 -blood group,3003694 -factor VIII inhibitor status,37393608 -factor VIII inhibitor status,4126681 -factor VIII inhibitor status,9190 diff --git a/inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv b/inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv deleted file mode 100644 index 8da65eab..00000000 --- a/inst/extdata/phems_variable_list/5.29_lab_measurements_uc3.csv +++ /dev/null @@ -1,37 +0,0 @@ -sourceCode,concept_id -factor VIII inhibitor titer ,3024942  -factor VIII inhibitor titer ,44777562  -factor VIII activity measurement ,3022520  -factor VIII activity measurement ,3011832  -factor VIII activity measurement ,8985  -factor VIII activity measurement ,9332  -factor VIII activity measurement ,8554  -Von Willebrand factor activity measurement ,43534000  -Von Willebrand factor activity measurement ,8985  -Von Willebrand factor activity measurement ,9332  -Von Willebrand factor activity measurement ,8554  -Von Willebrand factor antigen measurement ,3002124  -Von Willebrand factor antigen measurement ,8985  -Von Willebrand factor antigen measurement ,9332  -Von Willebrand factor antigen measurement ,8554  -Von Willebrand factor propeptide measurement ,3023693  -Von Willebrand factor propeptide measurement ,3042349  -Von Willebrand factor propeptide measurement ,8763  -activated partial thromboplastin time (APTT) ,4175016   -activated partial thromboplastin time (APTT) ,8555  -activated partial thromboplastin time (APTT) ,8523  -Prothrombin time (PT) ,3034426  -Prothrombin time (PT) ,8555  -Prothrombin time (PT) ,8523  -Prothrombin time (PT) ,8554  -platelet count ,4267147 -platelet count ,44777588  -hematocrit ,3009542  -hematocrit ,44777604  -hematocrit ,8554 -fibrinogen ,3016407  -fibrinogen ,8636  -ALT ,3006923  -ALT ,8645  -AST ,3013721  -AST ,8645  diff --git a/inst/extdata/phems_variable_list/5.29_uc3_lab_measurements.csv b/inst/extdata/phems_variable_list/5.29_uc3_lab_measurements.csv deleted file mode 100644 index 6b129df7..00000000 --- a/inst/extdata/phems_variable_list/5.29_uc3_lab_measurements.csv +++ /dev/null @@ -1,37 +0,0 @@ -sourceCode,concept_id -factor VIII inhibitor titer,3024942 -factor VIII inhibitor titer,44777562 -factor VIII activity measurement,3022520 -factor VIII activity measurement,3011832 -factor VIII activity measurement,8985 -factor VIII activity measurement,9332 -factor VIII activity measurement,8554 -Von Willebrand factor activity measurement,43534000 -Von Willebrand factor activity measurement,8985 -Von Willebrand factor activity measurement,9332 -Von Willebrand factor activity measurement,8554 -Von Willebrand factor antigen measurement,3002124 -Von Willebrand factor antigen measurement,8985 -Von Willebrand factor antigen measurement,9332 -Von Willebrand factor antigen measurement,8554 -Von Willebrand factor propeptide measurement,3023693 -Von Willebrand factor propeptide measurement,3042349 -Von Willebrand factor propeptide measurement,8763 -activated partial thromboplastin time (APTT),4175016 -activated partial thromboplastin time (APTT),8555 -activated partial thromboplastin time (APTT),8523 -Prothrombin time (PT),3034426 -Prothrombin time (PT),8555 -Prothrombin time (PT),8523 -Prothrombin time (PT),8554 -platelet count,4267147 -platelet count,44777588 -hematocrit,3009542 -hematocrit,44777604 -hematocrit,8554 -fibrinogen,3016407 -fibrinogen,8636 -ALT,3006923 -ALT,8645 -AST,3013721 -AST,8645 \ No newline at end of file diff --git a/inst/extdata/phems_variable_list/5.30_treatments.csv b/inst/extdata/phems_variable_list/5.30_treatments.csv deleted file mode 100644 index 0dafecd2..00000000 --- a/inst/extdata/phems_variable_list/5.30_treatments.csv +++ /dev/null @@ -1,85 +0,0 @@ -sourceCode,concept_id, -factor VIII  ,35766745 , -factor VIII  ,21154209 , -factor VIII  ,35831239 , -factor VIII  ,40745282 , -factor VIII  ,8985 , -factor VIII dose is continuous infusion or bolus dose ,40492862 , -factor VIII dose is continuous infusion or bolus dose ,4129275 , -factor VIII dose is continuous infusion or bolus dose ,4265597 , -desmopressin ,1517070 , -desmopressin ,9655 , -desmopressin ,8576 , -desmopressin ,9662 , -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, diff --git a/inst/extdata/phems_variable_list/5.30_uc3_treatments.csv b/inst/extdata/phems_variable_list/5.30_uc3_treatments.csv deleted file mode 100644 index 72541184..00000000 --- a/inst/extdata/phems_variable_list/5.30_uc3_treatments.csv +++ /dev/null @@ -1,42 +0,0 @@ -sourceCode,concept_id -factor VIII,35766745 -factor VIII,35771058 -factor VIII,35754324 -factor VIII,35758435 -factor VIII,35771055 -factor VIII,43515206 -factor VIII,35762625 -factor VIII,21154209 -factor VIII,21085384 -factor VIII,21075681 -factor VIII,21124454 -factor VIII,21095190 -factor VIII,2061062 -factor VIII,2061050 -factor VIII,2061030 -factor VIII,2061007 -factor VIII,2061102 -factor VIII,35771458 -factor VIII,35758810 -factor VIII,35758809 -factor VIII,35754712 -factor VIII,2923922 -factor VIII,43290877 -factor VIII,2923914 -factor VIII,43269176 -factor VIII,2923932 -factor VIII,43263693 -factor VIII,2923927 -factor VIII,43258267 -factor VIII,40745282 -factor VIII,43026972 -factor VIII,40745288 -factor VIII,43026968 -factor VIII,8985 -factor VIII dose is continuous infusion or bolus dose,40492862 -factor VIII dose is continuous infusion or bolus dose,4129275 -factor VIII dose is continuous infusion or bolus dose,4265597 -desmopressin,1517070 -desmopressin,9655 -desmopressin,8576 -desmopressin,9662 \ No newline at end of file diff --git a/inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv b/inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv deleted file mode 100644 index 50ae5fb3..00000000 --- a/inst/extdata/phems_variable_list/5.31_surgery_specific_parameters.csv +++ /dev/null @@ -1,85 +0,0 @@ -sourceCode,concept_id, -Medical/ surgical procedure ,45888085 , -NaCl administration during surgery ,967823 , -,8587 , -plasma administration during surgery ,4028665 , -datetime start anesthesia ,45888867 , -blood loss during surgery ,4308716 , -blood transfusion during surgery ,37017589 , -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, -,, diff --git a/inst/extdata/phems_variable_list/5.31_uc3_surgery.csv b/inst/extdata/phems_variable_list/5.31_uc3_surgery.csv deleted file mode 100644 index de3ce952..00000000 --- a/inst/extdata/phems_variable_list/5.31_uc3_surgery.csv +++ /dev/null @@ -1,8 +0,0 @@ -sourceCode,concept_id -Medical/ surgical procedure,4172515 -NaCl administration during surgery,967823 -NaCl administration during surgery,8587 -plasma administration during surgery,4028665 -datetime start anesthesia,4160439 -blood loss during surgery,4308716 -blood transfusion during surgery,37017589 \ No newline at end of file diff --git a/inst/extdata/phems_variable_list/5.3_vis_score_medications.csv b/inst/extdata/phems_variable_list/5.3_vis_score_medications.csv deleted file mode 100644 index 19e1b346..00000000 --- a/inst/extdata/phems_variable_list/5.3_vis_score_medications.csv +++ /dev/null @@ -1,8 +0,0 @@ -sourceCode,concept_id -dobutamine,1337720 -dopamine,1337860 -epinephrine,1343916 -milrinone,1368671 -norepinephrin,1321341 -vasopressin,1507835 -,9688 diff --git a/inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv b/inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv deleted file mode 100644 index 2cdcea90..00000000 --- a/inst/extdata/phems_variable_list/5.4_vasopressors_inotropes.csv +++ /dev/null @@ -1,12 +0,0 @@ -sourceCode,concept_id -Dobutamine,1337720 -Dopamine,1337860 -Ephedrine,1143374 -Epinephrine,1343916 -Isoproterenol,1183554 -Levosimendan,40173184 -Milrinone,1368671 -Norepinephrine,1321341 -Phenylephrine,1135766 -Terlipressin,19119253 -Vasopressin,1507835 diff --git a/inst/extdata/phems_variable_list/5.5_immunosuppressants.csv b/inst/extdata/phems_variable_list/5.5_immunosuppressants.csv deleted file mode 100644 index b48ccf21..00000000 --- a/inst/extdata/phems_variable_list/5.5_immunosuppressants.csv +++ /dev/null @@ -1,7 +0,0 @@ -sourceCode,concept_id -Chemotherapy,4273629 -Dexamethasone,1518254 -Hydrocortisone,975125 -Methylprednisolone,1506270 -Monoclonal Antibodies,21603754 -Prednisolone,1550557 diff --git a/inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv b/inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv deleted file mode 100644 index aac54744..00000000 --- a/inst/extdata/phems_variable_list/5.6_antibiotic_medication.csv +++ /dev/null @@ -1,51 +0,0 @@ -sourceCode,concept_id -Amikacin,1790868 -Amoxicillin,1713332 -Amoxicillin clavulanate,1713332 -Amoxicillin clavulanate,1759842 -Ampicillin,1717327 -Azithromycin,1734104 -Cefadroxil,1769535 -Cefazolin,1771162 -Cefepime,1748975 -Cefotaxime,1774470 -Ceftazidime,1776684 -Ceftazidime-Avibactam,46221507 -Ceftazidime-Avibactam,1776684 -Ceftolozane-Tazovactam,1741122 -Ceftolozane-Tazovactam,45892599 -Cefuroxime,1778162 -Chemotherapy,4273629 -Ciprofloxacin,1797513 -Clarithromycin,1750500 -Clindamycin,997881 -Colistin,901845 -Daptomycin,1786617 -Dexamethasone,1518254 -Ertapenem,1717963 -Erythromycin,1746940 -Fosfomycin,956653 -Fusidic acid,19010400 -Gentamicin,45892419 -Hydrocortisone,975125 -Imipenem,1778262 -Levofloxacin,1742253 -Linezolid,1736887 -Meropenem,1709170 -Methylprednisolone,1506270 -Monoclonal Antibodies,21603754 -Mupirocin,951511 -Nitrofurantoin,920293 -Norfloxacin,1721543 -Oxacillin,1724703 -Penicillin,1728416 -Piperacillin-Tazobactam,1746114 -Piperacillin-Tazobactam,1741122 -Prednisolone,1550557 -Rifampicin,1763204 -Teicoplanin,19078399 -Tetracycline,1836948 -Tobramycin,902722 -Trimethoprim-Sulfamethoxazole,1836430 -Trimethoprim-Sulfamethoxazole,1705674 -Vancomycin,1707687 diff --git a/inst/extdata/phems_variable_list/5.7_antifungals.csv b/inst/extdata/phems_variable_list/5.7_antifungals.csv deleted file mode 100644 index 8fd22f8d..00000000 --- a/inst/extdata/phems_variable_list/5.7_antifungals.csv +++ /dev/null @@ -1,6 +0,0 @@ -sourceCode,concept_id -Andiulafungin,19026450 -Fluconazole,1754994 -Isovuconazole,35606695 -Micafungin,19018013 -Voriconazole,1714277 diff --git a/inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv b/inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv deleted file mode 100644 index fabf6808..00000000 --- a/inst/extdata/phems_variable_list/5.8_antibiotic_resistance.csv +++ /dev/null @@ -1,11 +0,0 @@ -sourceCode,concept_id -Clindamycin-resistant,997881 -Clindamycin-resistant,37017134 -Drug-resistant,37017134 -ESBL,4257547 -Erythromycin-resistant,1746940 -Erythromycin-resistant,37017134 -MRSA,4019195 -Multidrug-resistant,37017134 -Vancomycin-resistant,1707687 -Vancomycin-resistant,37017134 diff --git a/inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv b/inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv deleted file mode 100644 index c533c5fb..00000000 --- a/inst/extdata/phems_variable_list/5.9_cardiac_surgery.csv +++ /dev/null @@ -1,43 +0,0 @@ -sourceCode,concept_id -Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty ,44790415  -Aortic valve repair NEC ,4312194  -Aortopulmonary reconstruction with systemic to pulmonary arterial shunt ,44793133  -Application of band to pulmonary artery ,4049734  -Closure of patent ductus arteriosus NEC ,4050114  -Correction of partial anomalous pulmonary venous drainage ,4018441  -Correction of persistent sinus venosus ,4020508  -Creation of anastomosis to pulmonary artery from vena cava ,4019237  -Extracorporeal membrane oxygenation ,4052536  -Implantation of cardiac pacemaker system NEC ,4144921  -Open aortic valvotomy ,4020520  -Open implantation of ventricular assist device ,4139214  -Other specified : repair of pulmonary artery ,4018926  -Other specified other operations on ventricles of heart ,44510968  -Other specified: plastic repair of aorta ,4019026  -Plastic repair of aorta and end to end anastomosis of aorta ,4020812  -Plication of diaphragm ,4217615  -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,4187380  -Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum ,40486525  -Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch ,4020376  -Release of vascular ring of aorta ,4019028  -Relief of left ventricular outflow tract obstruction ,44790092  -Removal of band from pulmonary artery ,4021725  -Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum ,4232476  -Repair of double outlet right ventricle ,4049979  -Repair of tetralogy of fallot using transannular patch ,4308136  -Repair of subaortic stenosis ,4018747  -Replacement of mitral valve NEC ,4203153  -Repositioning of transposed great arteries ,4019932  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4339184  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4019950  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4020506  -Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec ,4178479  -Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit ,44789857  -Transposition of coronary artery NEC ,4296790  -Tricuspid valve repair NEC ,4293619  -Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr ,4019233  -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4137127  -Unspecified other transplantation of heart/allotransplantation of heart NEC ,4336751  -Unspecified repair of defect of interventricular septum ,4199899  -Unspecified repair of tetralogy of fallot ,4019929  -Unspecified correction of total anomalous pulmonary  venous connection ,4017751  diff --git a/inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv b/inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv deleted file mode 100644 index 133cfabd..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.10_cardiac_radiology.csv +++ /dev/null @@ -1,43 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4019824,Transesophageal echocardiography,S,US transoesophageal echocardiogram (toe) -4032404,Bronchoscopy,S,IR bronchoscopy -4065416,Exercise tolerance test,S,Exercise test (non-CPET) -4345925,Videofluoroscopy swallow,S,FL video swallow -4083106,US scan of head,S,US cranial contents -4083108,US scan of neck,S,US neck -4082979,MRI of head,S,MRI head -4093436,Ultrasonography of thorax,S,US thorax and pleural cavity -4125350,CT of head,S,CT head -4125530,US urinary tract,S,US urinary tract -44802640,MRI study for cardiac congenital anomaly,S,MRI cardiac complex congenital -4163872,Plain chest X-ray,S,XR chest -4167029,Ultrasonography of inguinal region,S,US doppler groin both -4167052,Doppler ultrasonography of kidney,S,US doppler renal both -4305221,US scan of abdomen and pelvis,S,US abdomen and pelvis/ US abdomen -4303522,US scan of diaphragm,S,US diaphragmatic region -4306317,CT angiography of coronary artery with contrast,S,CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast -4169275,X-ray of chest and abdomen,S,XR chest and abdomen -4322380,Insertion of peripherally inserted central catheter,S,IR PICC line insertion -4140473,Holter extended electrocardiographic recording,S,24h holter monitor -4329508,Ultrasonography of pleural cavity,S,US thorax and pleural cavity -4335392,Doppler ultrasonography of vein of lower limb,S,US doppler lower limb veins both -4203365,Epicardial echocardiography,S,Epicardial echocardiogram -4335825,Transthoracic echocardiography,S,US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) -40482732,Insertion of tunneled venous catheter,S,IR tunnelled central venous line insertion -40489841,Doppler ultrasonography of jugular vein,S,US doppler jugular vein both -40492338,Cardiopulmonary exercise test,S,Cardiopulmonary exercise test (CPET) -40488431,Interrogation of cardiac pacemaker,S,Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) -42873079,Removal of tunneled central venous catheter,S,IR tunnelled central venous line removal -4261497,Ultrasonography of abdomen,S,US abdomen and pelvis/ US abdomen -4205144,Portable electroencephalogram,S,EEG routine portable -4181917,Electroencephalogram,S,EEG routine -4264477,Diagnostic radiography of abdomen,S,XR abdomen -45764527,Electrocardiographic Holter analyzer,S,24h holter monitor -45765560,Cardiovascular monitor,S,Event monitor -4327032,CT of thorax with contrast,S,CT thorax with contrast -35622931,Doppler ultrasound,S,US doppler groin both -35622931,Doppler ultrasound,S,US doppler -44813863,Ultrasonography of vocal cord,S,US vocal cord -4312208,Contrast bronchogram,S,IR bronchogram -4235141,Check artificial pacemaker,S,Pacemaker/ICD device check - remote patient initiated -4235141,Check artificial pacemaker,S,Pacemaker/ICD device check - remote device initiated diff --git a/inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv b/inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv deleted file mode 100644 index 1c4e01ec..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.11_cardiac_los.csv +++ /dev/null @@ -1,5 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4123933,Admission to pediatric intensive care unit,S,ICU admission (start datetime and end datetime) -8715,Hospital admission,S,Total hospital admission (start datetime and end datetime) -4161811,Admission to high dependency unit,S,HDU admission (start datetime and end datetime) -36675203,Admission to pediatric cardiology department,S,Cardiology ward admission (start datetime and end datetime) diff --git a/inst/extdata/phems_variable_list/is_standard/5.12_additional.csv b/inst/extdata/phems_variable_list/is_standard/5.12_additional.csv deleted file mode 100644 index 0948628d..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.12_additional.csv +++ /dev/null @@ -1,36 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4124462,None,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4095105,Base deficit measurement,S,Base Excess -4123933,Admission to pediatric intensive care unit,S,Elective ICU admission -4234469,Diagnosis,S,Diagnoses -40493026,Mechanical ventilator,S,Mechanical ventilation -44803020,Primary reason for admission,S,"Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure)" -4209008,Pupillary function,S,Pupillary reaction -260134,Croup,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -432571,Malignant lymphoma,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4029498,Seizure disorder,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -317009,Asthma,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -201957,Necrotizing enterocolitis in fetus OR newborn,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -43530727,Spontaneous cerebral hemorrhage,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -29783,Severe combined immunodeficiency disease,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -321042,Cardiac arrest,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -4165112,Bronchiolitis,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -443727,Diabetic ketoacidosis,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -314383,Myocarditis,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -4245975,Hepatic failure,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -440207,Hypoplastic left heart syndrome,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -42537745,Bone marrow transplant present,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -442588,Obstructive sleep apnea syndrome,S,"Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder" -4213310,Degenerative disease of the central nervous system,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -321319,Cardiomyopathy,S,"High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis)" -317510,Leukemia,S,"Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure" -44777602,kilopascal,S,PaCO2 -9202,Outpatient Visit,S,"Outpatient appointments start datetime, end datetime" -8554,percent,S,FiO2 -8876,millimeter mercury column,S,Systolic blood pressure -8876,millimeter mercury column,S,PaCO2 -8753,millimole per liter,S,Base Excess -5083,Telehealth,S,Outpatient appointment type (telephone/ clinic visit etc.) -42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,S,FiO2 -3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,PaCO2 -3004249,Systolic blood pressure,S,Systolic blood pressure diff --git a/inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv b/inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv deleted file mode 100644 index b3cf6426..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.13_laboratory_tests.csv +++ /dev/null @@ -1,61 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -37399161,Blood arterial pH,S,pH (arterial) -37392672,Blood venous pH,S,pH (venous) -4267147,Platelet count,S,Platelet count -4298431,White blood cell count,S,Immature WBC count -8713,gram per deciliter,S,Hemoglobin -8713,gram per deciliter,S,Albumin -8636,gram per liter,S,Hemoglobin -8636,gram per liter,S,Albumin -44777602,kilopascal,S,pCO2 (venous) -8751,milligram per liter,S,CRP -8554,percent,S,Hematocrit -8840,milligram per deciliter,S,Creatinine -8876,millimeter mercury column,S,pCO2 (venous) -8876,millimeter mercury column,S,pCO2 (arterial) -8876,millimeter mercury column,S,pO2 (venous) -8876,millimeter mercury column,S,pO2 (arterial) -8753,millimole per liter,S,Lactate -8753,millimole per liter,S,Blood urea nitrogen -8753,millimole per liter,S,Glucose -8753,millimole per liter,S,Sodium -8753,millimole per liter,S,Potassium -8753,millimole per liter,S,Magnesium -8753,millimole per liter,S,Chloride -8753,millimole per liter,S,Calcium -8753,millimole per liter,S,Phosphate -8753,millimole per liter,S,Bicarbonate (venous) -8753,millimole per liter,S,Bicarbonate (arterial) -8555,second,S,INR prothrombin time -8647,per microliter,S,Immature WBC count -8647,per microliter,S,Neutrophil count -8647,per microliter,S,Platelet count -8645,unit per liter,S,ALT -8645,unit per liter,S,AST -8749,micromole per liter,S,Creatinine -8749,micromole per liter,S,Bilirubin -3005456,Potassium [Moles/volume] in Blood,S,Potassium -3018572,Chloride [Moles/volume] in Blood,S,Chloride -3051825,Creatinine [Mass/volume] in Blood,S,Creatinine -3027273,Bicarbonate [Moles/volume] in Venous blood,S,Bicarbonate (venous) -3006140,Bilirubin.total [Moles/volume] in Serum or Plasma,S,Bilirubin -3013826,Glucose [Moles/volume] in Serum or Plasma,S,Glucose -3003458,Phosphate [Moles/volume] in Serum or Plasma,S,Phosphate -3024641,Urea nitrogen [Moles/volume] in Serum or Plasma,S,Blood urea nitrogen -3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,ALT -3024561,Albumin [Mass/volume] in Serum or Plasma,S,Albumin -3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,AST -3008152,Bicarbonate [Moles/volume] in Arterial blood,S,Bicarbonate (arterial) -3020460,C reactive protein [Mass/volume] in Serum or Plasma,S,CRP -3015377,Calcium [Moles/volume] in Serum or Plasma,S,Calcium -3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,pCO2 (arterial) -3021447,Carbon dioxide [Partial pressure] in Venous blood,S,pCO2 (venous) -3009542,Hematocrit [Volume Fraction] of Blood,S,Hematocrit -3033836,Magnesium [Moles/volume] in Blood,S,Magnesium -3027801,Oxygen [Partial pressure] in Arterial blood,S,pO2 (arterial) -3024354,Oxygen [Partial pressure] in Venous blood,S,pO2 (venous) -3019550,Sodium [Moles/volume] in Serum or Plasma,S,Sodium -3047181,Lactate [Moles/volume] in Blood,S,Lactate -3007670,Neutrophil Ab [Units/volume] in Serum,S,Neutrophil count -3034426,Prothrombin time (PT),S,INR prothrombin time -40762351,Hemoglobin [Moles/volume] in Blood,S,Hemoglobin diff --git a/inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv b/inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv deleted file mode 100644 index da4a9fc2..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.14_cardiac_complications.csv +++ /dev/null @@ -1,13 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4051330,Continuous venovenous hemofiltration,S,LCOS - renal support (CVVH/ PD) -4123933,Admission to pediatric intensive care unit,S,ICU ward stay -4295705,Exploratory incision,S,Surgical injury - Reexplore for bleeding -377091,Seizure,S,Neurological injury - seizure -439847,Intracranial hemorrhage,S,Neurological injury - intracranial haemmhorage/ intracranial bleeding -4308537,Injury to blood vessel during surgery,S,Surgical injury - Blood Loss -321042,Cardiac arrest,S,LCOS - Cardiac arrest -443454,Cerebral infarction,S,Neurological injury - infarction -4185565,Low cardiac output syndrome,S,Low cardiac output state (LCOS) - ECMO -4185565,Low cardiac output syndrome,S,LCOS - NEC requiring treatment -42537043,CLABSI - central line associated bloodstream infection,S,CVL infections -4306136,Chylothorax,S,Surgical injury - Chylothorax diff --git a/inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv deleted file mode 100644 index e44116e2..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.15_vital_signs.csv +++ /dev/null @@ -1,11 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4096101,Measurement of oxygen saturation at periphery,S,SpO2 -8483,counts per minute,S,Age-dependent HR -8483,counts per minute,S,Age-dependent RR -8554,percent,S,SpO2 -8876,millimeter mercury column,S,SBP (Systolic Blood Pressure) -8876,millimeter mercury column,S,DBP (Dyastolic Blood Pressure) -3027018,Heart rate,S,Age-dependent HR -3012888,Diastolic blood pressure,S,DBP (Dyastolic Blood Pressure) -3004249,Systolic blood pressure,S,SBP (Systolic Blood Pressure) -3024171,Respiratory rate,S,Age-dependent RR diff --git a/inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv b/inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv deleted file mode 100644 index 86440027..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.16_hsjd_clinical.csv +++ /dev/null @@ -1,9 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4201235,Body surface area,S,Body Surface Area (BSA) - Combination of weight and height -4275564,Operation on heart,S,Cardiac surgeries (Interventions) -8582,centimeter,S,Height -9529,kilogram,S,Weight -8617,square meter,S,Body Surface Area (BSA) - Combination of weight and height -3025315,Body weight,S,Weight -3036277,Body height,S,Height -0,No matching concept,NA,Extracardiac anomalies - diagnoses diff --git a/inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv b/inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv deleted file mode 100644 index 2b0734ad..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.17_hsjd_surgery.csv +++ /dev/null @@ -1,9 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -44790138,Induced circulatory arrest,S,"Deep hypothermic circulatory arrest start datetime, end datetime" -4336464,Coronary artery bypass graft,S,"Cardiac bypass start datetime, end datetime" -4150627,Removal of endotracheal tube,S,Extubation event -4201547,Placement of arterial cross clamp,S,"Cross-clamping start datetime, end datetime" -4301351,Surgical procedure,S,"Surgery start datetime, end datetime" -40490494,Society of Thoracic Surgeons risk calculator,S,STAT/EACTS score of surgery -4272324,Cardiopulmonary bypass operation,S,"Antegrade Cerebral Perfusion start datetime, end datetime" -0,No matching concept,NA,Aristotle's score of surgery diff --git a/inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv b/inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv deleted file mode 100644 index db64d22f..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.18_hsjd_hospitalisation.csv +++ /dev/null @@ -1,11 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -37158404,Invasive mechanical ventilation,S,Invasive Mechanical Ventilation LOS -4177224,Non-invasive ventilation,S,Non-Invasive Mechanical Ventilation LOS -44803020,Primary reason for admission,S,Admission reason -4179206,Central venous catheter,S,"Postop central venous catheter in/start datetime, out/ end datetime" -42539650,Administration of intravenous vasoactive drug,S,"Vasoactive infusion start datetime, end datetime" -0,No matching concept,NA,ventilation -0,No matching concept,NA,Type of vasoactive infusion -0,No matching concept,NA,VIS score of vasoactive infusion -0,No matching concept,NA,"Total ventilation start datetime, end datetime" -794078,vasoactive intestinal peptide,S,Dose of vasoactive infusion (rate - mcg/kg/hr) diff --git a/inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv b/inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv deleted file mode 100644 index 99ee99f5..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.19_hsjd_complication.csv +++ /dev/null @@ -1,21 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4044892,Procedure on sternum,S,Sternum reopening (procedure undertaken) -4046868,Vocal cord dysfunction,S,Vocal Cord Dysfunction -4049398,Temporary cardiac pacemaker procedure,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4051940,Permanent cardiac pacemaker procedure,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4353741,Cardioversion,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -4117045,Atrial overdrive pacing,S,"Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing)" -253796,Pneumothorax,S,Pneumothorax -609312,Awaiting transplantation of heart,S,Listed for heart transplantation -4202832,Intubation,S,intubation -315643,Tachyarrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4275564,Operation on heart,S,Cardiac surgeries (interventions) -44783799,Exteriorization of trachea,S,Tracheostomy -44784217,Cardiac arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4068155,Atrial arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4228448,Bradyarrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4185572,Ventricular arrhythmia,S,"Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.)" -4275136,Paralysis of diaphragm,S,Diaphragmatic Paralysis -46234437,ivabradine,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" -1354860,flecainide,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" -1309944,amiodarone,S,"Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide)" diff --git a/inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv b/inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv deleted file mode 100644 index 0bb6e4c3..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.21_healthcare_use_diagnoses_procedures_current_eps.csv +++ /dev/null @@ -1,87 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -37174269,At increased risk of sepsis,S,Diagnosis of acute infection having the potential for progression to sepsis1+2 -4032243,Dialysis procedure,S,Dialysis -197320,Acute kidney injury,S,acute kidney injury -4074689,Open drainage of pleural cavity,S,"Chest opening, chest drainage" -4084670,Non-urgent surgical admission,S,Surgical admission (non-urgent) -4070667,Urinary catheter,S,Urinary catheter -44790095,Invasive ventilation,S,Invasive ventilation -4052536,Extracorporeal membrane oxygenation,S,ECMO -4051330,Continuous venovenous hemofiltration,S,Dialysis -44790567,Patient transfer from hospital to hospital,S,Origin (external) -133327,Viremia,S,viremia -4097216,Endotracheal tube,S,Endotracheal tube -4085730,Antibiotic therapy,S,Antibiotics -4123946,Admission to surgical department,S,Surgical admission (urgent) -4208341,Solid organ transplant,S,organ transplant -4193843,Oxygenation index measurement,S,Oxygenation index -4235043,Ventricular assist device,S,Ventricular assist device (VAD) -443392,Malignant neoplastic disease,S,Cancer -4181511,Administration of antineoplastic agent,S,Antineoplastics -4294886,"Patient transfer, in-hospital",S,Origin (internal) -4301351,Surgical procedure,S,Surgery previous to prediction time point -4140762,Antiviral therapy,S,Antivirals -4177205,Cannulation,S,Peripheral IV cannulas -4177224,Non-invasive ventilation,S,Non-invasive ventilation -45758028,Arterial blood pressure catheter,S,Arterial blood pressure catheter -44803020,Primary reason for admission,S,Reason for admission -4179206,Central venous catheter,S,Central venous catheter -132736,Bacteremia,S,bacteremia -44783799,Exteriorization of trachea,S,Tracheostomy -45768671,Asplenia,S,asplenia -4324124,Peritoneal dialysis,S,Peritoneal dialysis -435785,Meningitis,S,meningitis -201820,Diabetes mellitus,S,Diagnosis of chronic condition -42538045,Nasogastric/orogastric tube stylet,S,Nasogastric/orogastric tube -37206601,Venoarterial extracorporeal membrane oxygenation,S,ECMO type -37206603,Venovenous extracorporeal membrane oxygenation,S,ECMO type -4314777,Immunosuppressive therapy,S,Immunosuppressors -604243,Acquired neutropenia,S,neutropenia -444187,Open wound,S,injury with open wound -22281,Sickle cell-hemoglobin SS disease,S,sickle cell disease -435613,Cellulitis,S,cellulitis -4134120,Cerebral palsy,S,cerebral palsy -444202,Abscess,S,Abcess -312723,Congenital heart disease,S,Diagnosis of chronic condition -255573,Chronic obstructive lung disease,S,Diagnosis of chronic condition -255848,Pneumonia,S,pneumonia -433740,Immunodeficiency disorder,S,immunodeficiency -4080011,Organ dysfunction syndrome,S,Diagnosis of organ system dysfunction -434821,Systemic inflammatory response syndrome,S,Diagnosis of SIRS -81539,Mitochondrial cytopathy,S,mitochondrial disease -4103588,Acute tuberculosis,S,tuberculosis -443783,Chronic disease,S,Diagnosis of chronic condition -4140977,Secondary immune deficiency disorder,S,Diagnosis of condition producing immunodeficiency -201606,Crohn's disease,S,Crohn's disease -4243475,Acute hepatitis,S,hepatitis -4300243,Postoperative complication,S,surgical site inflammation -439125,Complete trisomy 21 syndrome,S,Down's syndrome -321042,Cardiac arrest,S,cardiac arrest -4331815,Acute urinary tract infection,S,UTI -195212,Hypercortisolism,S,Cushing's disease -196152,Peritonitis,S,peritonitis -314383,Myocarditis,S,miocarditis -195314,Nephrotic syndrome,S,nephrotic syndrome -441589,Endocarditis,S,endocarditis -4271450,Acute infectious disease,S,Diagnosis of acute infection having the potential for progression to sepsis1+2 -81893,Ulcerative colitis,S,ulcerative colitis -80809,Rheumatoid arthritis,S,rheumatoid arthritis -4322814,Meningoencephalitis,S,Meningo-encephalitis -36716945,Renal insufficiency,S,renal insufficiency -440448,Appendicitis,S,appendicitis -433968,Candidiasis,S,candidiasis -44807226,Necrotising enterocolitis,S,necrotizing enterocolitis -132797,Sepsis,S,Previous diagnosis of sepsis measure -44777590,centimeter watercolumn,S,Mean Airway Pressure (MAP) -44777602,kilopascal,S,Mean Airway Pressure (MAP) -8510,unit,S,FiO2 -8554,percent,S,FiO2 -720868,fraction,S,FiO2 -8529,index,S,Oxygenation index -8876,millimeter mercury column,S,Mean Airway Pressure (MAP) -21602722,CORTICOSTEROIDS FOR SYSTEMIC USE,C,Corticoids -42869590,Oxygen/Gas total [Pure volume fraction] Inhaled gas,S,FiO2 -42527086,Mean airway pressure,S,Mean Airway Pressure (MAP) -0,No matching concept,NA,Non-surgical admission -0,No matching concept,NA,Oxygenation index -1340204,History of event,S,Previous diagnosis of sepsis measure diff --git a/inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv deleted file mode 100644 index a7b3fb88..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.22_vital_signs.csv +++ /dev/null @@ -1,21 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4096101,Measurement of oxygen saturation at periphery,S,SpO2 -8483,counts per minute,S,HR -8483,counts per minute,S,RR -9529,kilogram,S,Weight -8554,percent,S,SpO2 -586323,degree Celsius,S,Body temperature -8504,gram,S,Weight -8587,milliliter,S,Urine output -44777613,milliliter per hour,S,Urine output -33014,milliliter per kilogram per 24 hours,S,Urine output -8876,millimeter mercury column,S,SBP (Systolic Blood Pressure) -8876,millimeter mercury column,S,DBP (Diastolic blood pressure) -3025315,Body weight,S,Weight -3020891,Body temperature,S,Body temperature -3012888,Diastolic blood pressure,S,DBP (Diastolic blood pressure) -3004249,Systolic blood pressure,S,SBP (Systolic Blood Pressure) -3014315,Urine output,S,Urine output -3024171,Respiratory rate,S,RR -1004025,Heart rate,C,HR -0,No matching concept,NA,Urine output diff --git a/inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv b/inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv deleted file mode 100644 index a66fcfeb..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.23_physical_examination_signs.csv +++ /dev/null @@ -1,36 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4069590,Normal,S,Pupillary reactivity (right) -4069590,Normal,S,Pupillary reactivity (left) -4116857,Medium,S,Pupillary size (right) -4116857,Medium,S,Pupillary size (left) -4124461,Weak,S,Peripheral pulse (pressure) -4124461,Weak,S,Central pulse -4132135,Absent,S,Peripheral pulse (pressure) -4132135,Absent,S,Central pulse -4188539,Yes,S,Pupillary reactivity (right) -4188539,Yes,S,Pupillary reactivity (left) -4188540,No,S,Pupillary reactivity (right) -4188540,No,S,Pupillary reactivity (left) -4181412,Present,S,Peripheral pulse (pressure) -4181412,Present,S,Central pulse -4224504,Pulse,S,Central pulse -4314539,Arterial pulse pressure,S,Peripheral pulse (pressure) -8483,counts per minute,S,Peripheral pulse (pressure) -8483,counts per minute,S,Central pulse -8588,millimeter,S,Pupillary size (right) -8588,millimeter,S,Pupillary size (left) -8555,second,S,Capillary refill time -21490963,Right pupil Pupillary response,S,Pupillary reactivity (right) -45879546,Sluggish,S,Pupillary reactivity (right) -45879546,Sluggish,S,Pupillary reactivity (left) -21499034,Dilated,S,Pupillary size (right) -21499034,Dilated,S,Pupillary size (left) -36310446,Constricted,S,Pupillary size (right) -36310446,Constricted,S,Pupillary size (left) -45880051,Unresponsive,S,Pupillary reactivity (right) -45880051,Unresponsive,S,Pupillary reactivity (left) -3032652,Glasgow coma scale,S,GCS -3045676,Capillary refill [Time],S,Capillary refill time -21491763,Left pupil Pupillary response,S,Pupillary reactivity (left) -3021415,Left pupil Diameter Auto,S,Pupillary size (left) -3027214,Right pupil Diameter Auto,S,Pupillary size (right) diff --git a/inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv b/inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv deleted file mode 100644 index a323de0e..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.24_laboratory_test_results_uc2.csv +++ /dev/null @@ -1,41 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -37393605,D-dimer level,S,D-dimer -4017361,Blood urea nitrogen measurement,S,Blood urea nitrogen -4036356,Detection of bacteria,S,Bacterial pathogen detection -44789220,Ionised calcium measurement,S,Ionized calcium -4094436,Fibrinogen measurement,S,Fibrinogen -4118986,Bilirubin measurement,S,Direct bilirubin -4196268,Polymerase chain reaction observation,S,PCR panel -4196268,Polymerase chain reaction observation,S,PCR panel -440029,Viral disease,S,Viral pathogen detection -4212899,Total white blood count,S,Leukocytes -4175016,"Partial thromboplastin time, activated",S,Thromboplastin time -42536081,Adrenal medulla hormone,S,MR-proADM -4299649,Quantitative microbial culture and measurement,S,Quantification of colonies in culture -44806682,Infection resistant to multiple antibiotics,S,Antibiotic resistance -432545,Bacterial infectious disease,S,Name of bacterial pathogen detected -8636,gram per liter,S,Fibrinogen -8751,milligram per liter,S,D-dimer -8845,picogram per milliliter,S,Interleukin-6 -9278,colony forming unit,S,Quantification of colonies in culture -9278,colony forming unit,S,Leukocytes -8840,milligram per deciliter,S,Blood urea nitrogen -8840,milligram per deciliter,S,Glucose -8840,milligram per deciliter,S,Direct bilirubin -8753,millimole per liter,S,D-dimer -8753,millimole per liter,S,Fibrinogen -8753,millimole per liter,S,Blood urea nitrogen -8753,millimole per liter,S,Glucose -8753,millimole per liter,S,Direct bilirubin -8753,millimole per liter,S,Ionized calcium -8725,nanogram per liter,S,PCT -8842,nanogram per milliliter,S,PCT -8736,nanomole per liter,S,MR-proADM -8523,ratio,S,Thromboplastin time -8555,second,S,Thromboplastin time -8748,microgram per liter,S,PCT -8749,micromole per liter,S,Direct bilirubin -3013826,Glucose [Moles/volume] in Serum or Plasma,S,Glucose -3046279,Procalcitonin [Mass/volume] in Serum or Plasma,S,PCT -3033291,Interleukin 6 [Mass/volume] in Body fluid,S,Interleukin-6 -0,No matching concept,NA,Leukocytes diff --git a/inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv b/inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv deleted file mode 100644 index f2107887..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.25_arterial_blood_gas.csv +++ /dev/null @@ -1,12 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -44777602,kilopascal,S,pCO2 -44777602,kilopascal,S,PaO2 -8876,millimeter mercury column,S,pCO2 -8876,millimeter mercury column,S,PaO2 -8753,millimole per liter,S,HCO3 -8753,millimole per liter,S,Base excess -3003396,Base excess in Arterial blood by calculation,S,Base excess -3019977,pH of Arterial blood,S,pH -3008152,Bicarbonate [Moles/volume] in Arterial blood,S,HCO3 -3027946,Carbon dioxide [Partial pressure] in Arterial blood,S,pCO2 -3027801,Oxygen [Partial pressure] in Arterial blood,S,PaO2 diff --git a/inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv b/inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv deleted file mode 100644 index 24d44bb9..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.26_venous_blood_gas.csv +++ /dev/null @@ -1,17 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -44777602,kilopascal,S,pCO2 -44777602,kilopascal,S,PaO2 -8876,millimeter mercury column,S,pCO2 -8876,millimeter mercury column,S,PaO2 -8753,millimole per liter,S,HCO3 -8753,millimole per liter,S,Base excess -3009343,pH of Capillary blood,S,pH -3027273,Bicarbonate [Moles/volume] in Venous blood,S,HCO3 -3003129,Base excess in Capillary blood by calculation,S,Base excess -3002032,Base excess in Venous blood by calculation,S,Base excess -3015235,Bicarbonate [Moles/volume] in Capillary blood,S,HCO3 -3023024,Carbon dioxide [Partial pressure] in Capillary blood,S,pCO2 -3021447,Carbon dioxide [Partial pressure] in Venous blood,S,pCO2 -3028626,Oxygen [Partial pressure] in Capillary blood,S,PaO2 -3024354,Oxygen [Partial pressure] in Venous blood,S,PaO2 -3012544,pH of Venous blood,S,pH diff --git a/inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv b/inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv deleted file mode 100644 index 0a307ec2..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.28_patient_characteristics.csv +++ /dev/null @@ -1,15 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -37393608,Factor VIII inhibitor activity,S,factor VIII inhibitor status -4126681,Detected,S,factor VIII inhibitor status -9190,Not detected,S,factor VIII inhibitor status -4056830,Severe hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity -4094223,Mild hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity -434007,Hereditary factor VIII deficiency disease,S,hemophilia A diagnosis -4140661,Moderate hereditary factor VIII deficiency disease,S,hemophilia A subtype/ severity -8582,centimeter,S,height -9529,kilogram,S,body weight -8504,gram,S,body weight -9546,meter,S,height -3025315,Body weight,S,body weight -3036277,Body height,S,height -3003694,ABO and Rh group [Type] in Blood,S,blood group diff --git a/inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv b/inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv deleted file mode 100644 index f5b3ed55..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.29_lab_measurements_uc3.csv +++ /dev/null @@ -1,37 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4175016,"Partial thromboplastin time, activated",S,activated partial thromboplastin time (APTT) -4267147,Platelet count,S,platelet count -8636,gram per liter,S,fibrinogen -44777604,liter per liter,S,hematocrit -8554,percent,S,factor VIII activity measurement -8554,percent,S,Von Willebrand factor activity measurement -8554,percent,S,Von Willebrand factor antigen measurement -8554,percent,S,Prothrombin time (PT) -8554,percent,S,hematocrit -44777588,billion cells per liter,S,platelet count -44777562,Bethesda unit per milliliter,S,factor VIII inhibitor titer -9332,international unit per deciliter,S,factor VIII activity measurement -9332,international unit per deciliter,S,Von Willebrand factor activity measurement -9332,international unit per deciliter,S,Von Willebrand factor antigen measurement -8985,international unit per milliliter,S,factor VIII activity measurement -8985,international unit per milliliter,S,Von Willebrand factor activity measurement -8985,international unit per milliliter,S,Von Willebrand factor antigen measurement -8523,ratio,S,activated partial thromboplastin time (APTT) -8523,ratio,S,Prothrombin time (PT) -8555,second,S,activated partial thromboplastin time (APTT) -8555,second,S,Prothrombin time (PT) -8645,unit per liter,S,ALT -8645,unit per liter,S,AST -8763,unit per milliliter,S,Von Willebrand factor propeptide measurement -3024942,Coagulation factor VIII inhibitor [Units/volume] in Platelet poor plasma by Coagulation assay,S,factor VIII inhibitor titer -3011832,Coagulation factor VIII activity [Units/volume] in Platelet poor plasma by Chromogenic method,S,factor VIII activity measurement -3006923,Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,ALT -3013721,Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma,S,AST -3009542,Hematocrit [Volume Fraction] of Blood,S,hematocrit -3022520,Coagulation factor VIII activated [Units/volume] in Platelet poor plasma by Coagulation assay,S,factor VIII activity measurement -3016407,Fibrinogen [Mass/volume] in Platelet poor plasma by Coagulation assay,S,fibrinogen -3042349,von Willebrand factor (vWf) cleaving protease inhibitor [Units/volume] in Platelet poor plasma,S,Von Willebrand factor propeptide measurement -3034426,Prothrombin time (PT),S,Prothrombin time (PT) -3002124,von Willebrand factor (vWf) Ag [Units/volume] in Platelet poor plasma by Immunoassay,S,Von Willebrand factor antigen measurement -3023693,von Willebrand factor (vWf) multimers in Platelet poor plasma by Immunoblot,S,Von Willebrand factor propeptide measurement -43534000,von Willebrand factor (vWf).activity [Units/volume] in Platelet poor plasma by Immunoassay,S,Von Willebrand factor activity measurement diff --git a/inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv b/inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv deleted file mode 100644 index 4bbe00a5..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.30_treatments.csv +++ /dev/null @@ -1,13 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4129275,Continuous infusion,S,factor VIII dose is continuous infusion or bolus dose -4265597,Single bolus,S,factor VIII dose is continuous infusion or bolus dose -40492862,Method of drug administration,S,factor VIII dose is continuous infusion or bolus dose -9655,microgram,S,desmopressin -8985,international unit per milliliter,S,factor VIII -8576,milligram,S,desmopressin -9662,microgram per kilogram,S,desmopressin -1517070,desmopressin,S,desmopressin -21154209,Factor VIII 2000 UNT Injection [Kogenate Bayer],S,factor VIII -35766745,Factor VIII 250 UNT Injection [Advate],S,factor VIII -40745282,emicizumab 150 MG/ML Injectable Solution [Hemlibra],S,factor VIII -35831239,factor VII 250 UNT Injection [Eloctate],S,factor VIII diff --git a/inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv b/inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv deleted file mode 100644 index 60a64e1a..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.31_surgery_specific_parameters.csv +++ /dev/null @@ -1,5 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4028665,Transfusion of plasma,S,plasma administration during surgery -4308716,Intraoperative hemorrhage,S,blood loss during surgery -37017589,Bleeding during surgery requiring transfusion,S,blood transfusion during surgery -967823,sodium chloride,S,NaCl administration during surgery diff --git a/inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv b/inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv deleted file mode 100644 index 6671e328..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.3_vis_score_medications.csv +++ /dev/null @@ -1,7 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -1507835,vasopressin (USP),S,vasopressin -1337720,dobutamine,S,dobutamine -1337860,dopamine,S,dopamine -1343916,epinephrine,S,epinephrine -1368671,milrinone,S,milrinone -1321341,norepinephrine,S,norepinephrin diff --git a/inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv b/inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv deleted file mode 100644 index 2cf1ddc7..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.4_vasopressors_inotropes.csv +++ /dev/null @@ -1,12 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -1507835,vasopressin (USP),S,Vasopressin -1337720,dobutamine,S,Dobutamine -1337860,dopamine,S,Dopamine -1143374,ephedrine,S,Ephedrine -1343916,epinephrine,S,Epinephrine -1368671,milrinone,S,Milrinone -19119253,terlipressin,S,Terlipressin -1183554,isoproterenol,S,Isoproterenol -40173184,levosimendan,S,Levosimendan -1321341,norepinephrine,S,Norepinephrine -1135766,phenylephrine,S,Phenylephrine diff --git a/inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv b/inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv deleted file mode 100644 index bc826410..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.5_immunosuppressants.csv +++ /dev/null @@ -1,7 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4273629,Chemotherapy,S,Chemotherapy -21603754,Monoclonal antibodies,C,Monoclonal Antibodies -1518254,dexamethasone,S,Dexamethasone -975125,hydrocortisone,S,Hydrocortisone -1506270,methylprednisolone,S,Methylprednisolone -1550557,prednisolone,S,Prednisolone diff --git a/inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv b/inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv deleted file mode 100644 index d589492b..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.6_antibiotic_medication.csv +++ /dev/null @@ -1,51 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4273629,Chemotherapy,S,Chemotherapy -21603754,Monoclonal antibodies,C,Monoclonal Antibodies -1836430,sulfamethoxazole,S,Trimethoprim-Sulfamethoxazole -1836948,tetracycline,S,Tetracycline -902722,tobramycin,S,Tobramycin -1705674,trimethoprim,S,Trimethoprim-Sulfamethoxazole -1707687,vancomycin,S,Vancomycin -19010400,fusidate,S,Fusidic acid -45892419,gentamicin,S,Gentamicin -45892599,ceftolozane,S,Ceftolozane-Tazovactam -46221507,avibactam,S,Ceftazidime-Avibactam -1734104,azithromycin,S,Azithromycin -1736887,linezolid,S,Linezolid -1748975,cefepime,S,Cefepime -1750500,clarithromycin,S,Clarithromycin -1769535,cefadroxil,S,Cefadroxil -1771162,cefazolin,S,Cefazolin -1774470,cefotaxime,S,Cefotaxime -1776684,ceftazidime,S,Ceftazidime -1776684,ceftazidime,S,Ceftazidime-Avibactam -1778162,cefuroxime,S,Cefuroxime -1786617,daptomycin,S,Daptomycin -1797513,ciprofloxacin,S,Ciprofloxacin -997881,clindamycin,S,Clindamycin -901845,colistin,S,Colistin -1709170,meropenem,S,Meropenem -1717963,ertapenem,S,Ertapenem -1518254,dexamethasone,S,Dexamethasone -1741122,tazobactam,S,Piperacillin-Tazobactam -1741122,tazobactam,S,Ceftolozane-Tazovactam -1746940,erythromycin,S,Erythromycin -951511,mupirocin,S,Mupirocin -956653,fosfomycin,S,Fosfomycin -1759842,clavulanate,S,Amoxicillin clavulanate -975125,hydrocortisone,S,Hydrocortisone -1778262,imipenem,S,Imipenem -19078399,teicoplanin,S,Teicoplanin -1790868,amikacin,S,Amikacin -1506270,methylprednisolone,S,Methylprednisolone -1713332,amoxicillin,S,Amoxicillin clavulanate -1713332,amoxicillin,S,Amoxicillin -1717327,ampicillin,S,Ampicillin -920293,nitrofurantoin,S,Nitrofurantoin -1721543,norfloxacin,S,Norfloxacin -1724703,oxacillin,S,Oxacillin -1728416,penicillin G,S,Penicillin -1742253,levofloxacin,S,Levofloxacin -1746114,piperacillin,S,Piperacillin-Tazobactam -1550557,prednisolone,S,Prednisolone -1763204,rifampin,S,Rifampicin diff --git a/inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv b/inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv deleted file mode 100644 index 4dc0c783..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.7_antifungals.csv +++ /dev/null @@ -1,6 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -1714277,voriconazole,S,Voriconazole -35606695,isavuconazole,S,Isovuconazole -19018013,micafungin,S,Micafungin -19026450,anidulafungin,S,Andiulafungin -1754994,fluconazole,S,Fluconazole diff --git a/inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv b/inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv deleted file mode 100644 index d36affad..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.8_antibiotic_resistance.csv +++ /dev/null @@ -1,11 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4019195,Methicillin resistant Staphylococcus aureus,S,MRSA -4257547,Extended spectrum beta-lactamase producing bacteria,S,ESBL -37017134,Multidrug-resistant bacteria,S,Drug-resistant -37017134,Multidrug-resistant bacteria,S,Multidrug-resistant -37017134,Multidrug-resistant bacteria,S,Clindamycin-resistant -37017134,Multidrug-resistant bacteria,S,Vancomycin-resistant -37017134,Multidrug-resistant bacteria,S,Erythromycin-resistant -1707687,vancomycin,S,Vancomycin-resistant -997881,clindamycin,S,Clindamycin-resistant -1746940,erythromycin,S,Erythromycin-resistant diff --git a/inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv b/inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv deleted file mode 100644 index e50f982c..00000000 --- a/inst/extdata/phems_variable_list/is_standard/5.9_cardiac_surgery.csv +++ /dev/null @@ -1,42 +0,0 @@ -concept_id,concept_name,standard_concept,sourceCode -4049734,Banding of pulmonary artery,S,Application of band to pulmonary artery -4019929,Repair of tetralogy of Fallot,S,Unspecified repair of tetralogy of fallot -4019932,Arterial switch operation,S,Repositioning of transposed great arteries -4017751,Repair of total anomalous pulmonary venous connection,S,Unspecified correction of total anomalous pulmonary  venous connection -4020376,Closure of defect of interatrial septum using pericardial patch,S,Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch -4020506,Creation of valved conduit between right ventricle of heart and pulmonary artery,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4019950,Revision of valved cardiac conduit,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4020508,Repair of sinus venosus,S,Correction of persistent sinus venosus -4018441,Repair of partial anomalous pulmonary venous connection,S,Correction of partial anomalous pulmonary venous drainage -4020520,Open aortic valvotomy,S,Open aortic valvotomy -4018747,Operations on the left ventricular outflow tract,S,Repair of subaortic stenosis -4019233,Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis,S,Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr -4019237,Anastomosis of vena cava to pulmonary artery,S,Creation of anastomosis to pulmonary artery from vena cava -4018926,Repair of pulmonary artery,S,Other specified : repair of pulmonary artery -4021725,Removal of band from pulmonary artery,S,Removal of band from pulmonary artery -4019026,Plastic repair of aorta,S,Other specified: plastic repair of aorta -4020812,Plastic repair of aorta and end-to-end anastomosis of aorta,S,Plastic repair of aorta and end to end anastomosis of aorta -4019028,Release of vascular ring of aorta,S,Release of vascular ring of aorta -44790092,Relief of left ventricular outflow tract obstruction,S,Relief of left ventricular outflow tract obstruction -44789857,Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit,S,Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit -4336751,Allotransplant of heart,S,Unspecified other transplantation of heart/allotransplantation of heart NEC -4049979,Repair of double outlet right ventricle,S,Repair of double outlet right ventricle -4050114,Closure of ductus arteriosus with clip,S,Closure of patent ductus arteriosus NEC -4052536,Extracorporeal membrane oxygenation,S,Extracorporeal membrane oxygenation -44790415,Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty,S,Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty -4144921,Implantation of cardiac pacemaker,S,Implantation of cardiac pacemaker system NEC -4137127,Transplantation of heart,S,Unspecified other transplantation of heart/allotransplantation of heart NEC -44793133,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt,S,Aortopulmonary reconstruction with systemic to pulmonary arterial shunt -4293619,Repair of tricuspid valve,S,Tricuspid valve repair NEC -4296790,Transposition of coronary artery,S,Transposition of coronary artery NEC -4139214,Open implantation of cardiac ventricular assist device,S,Open implantation of ventricular assist device -4178479,Replacement of valved cardiac conduit,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -40486525,Primary repair of defect of atrioventricular septum,S,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum -4187380,Repair of ostium primum defect,S,Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum -4199899,Closure of ventricular septal defect,S,Unspecified repair of defect of interventricular septum -4203153,Replacement of mitral valve,S,Replacement of mitral valve NEC -4217615,Plication of diaphragm,S,Plication of diaphragm -4308136,Complete repair of tetralogy of Fallot with transannular patch,S,Repair of tetralogy of fallot using transannular patch -4312194,Repair of heart valve,S,Aortic valve repair NEC -4339184,Replacement of pulmonary valve,S,Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec -4232476,Repair of ventricular septal defect with prosthesis,S,Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum diff --git a/inst/extdata/standard_concepts/.gitkeep b/inst/extdata/standard_concepts/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/inst/extdata/vocabularies/.gitkeep b/inst/extdata/vocabularies/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R deleted file mode 100644 index 3d86bede..00000000 --- a/inst/templates/cohortCapr.R +++ /dev/null @@ -1,261 +0,0 @@ -## ----knitr, include=FALSE----------------------------------------------------------------- -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::opts_chunk$set(echo = TRUE) - -knitr::purl( - input = './inst/templates/cohortCapr_md.Rmd', - output = './inst/templates/cohortCapr.R' -) - - -## ----Get project configurations----------------------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') - - -## ----Load libraries----------------------------------------------------------------------- -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connect to database, eval=TRUE, include=TRUE----------------------------------------- -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) - - -## ----concept sets, echo=TRUE-------------------------------------------------------------- -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) - - -## ----count occurences--------------------------------------------------------------------- -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -# count occurrences of each concept 'x' and print results; cardiac complications as example -# cardiacComplicationsCounts <- -# countOccurrences( -# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema -# ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema - ) %>% print() - -# Disconnect -disconnect(con) - - -## ----Standard non-standard check---------------------------------------------------------- -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - - - -## ----Standard non-standard check concept set---------------------------------------------- -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS - - -## ----Cohort definition-------------------------------------------------------------------- -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had cardiac surgery - query = procedure(conceptSets$conceptSets$cardiacSurgery) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) - - -## ----json and sql------------------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json----------------------------------------------------- -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts---------------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----Number of people in DB--------------------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) - diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd deleted file mode 100644 index 51e81e60..00000000 --- a/inst/templates/cohortCapr_md.Rmd +++ /dev/null @@ -1,289 +0,0 @@ ---- -title: "cohortCapr markdown" -author: "Guus @TheHyve" -date: "2024-07-17" -output: pdf_document ---- -## Set-up knitr -```{r knitr, include=FALSE} -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::opts_chunk$set(echo = TRUE) - -# knitr::purl( -# input = './inst/templates/cohortCapr_md.Rmd', -# output = './inst/templates/cohortCapr.R' -# ) -``` - -## Set-up config -```{r Get project configurations} -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -``` - -## Load libraries -```{r Load libraries} -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) -``` - -## Connect to DB -```{r connect to database, eval=TRUE, include=TRUE} -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) -``` - -## Concept sets -Define a measurement concept set using Capr and include all descendants -```{r concept sets, echo=TRUE} -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) -``` - -## Concept counts -Retrieve counts for a concept set -```{r count occurences} -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -# count occurrences of each concept 'x' and print results; cardiac complications as example -# cardiacComplicationsCounts <- -# countOccurrences( -# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema -# ) %>% print() -labTestsCounts <- - countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema - ) %>% print() - -# Disconnect -disconnect(con) -``` - -## Standard and non-standard concepts given a list of concept IDs -To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function -can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. -See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. -```{r Standard non-standard check} -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - -``` - -## Standard and non-standard concepts given a concept set -Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. -```{r Standard non-standard check concept set} -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS -``` - - -## Initial event cohort -People having any of the following: -any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had cardiac surgery - query = procedure(conceptSets$conceptSets$cardiacSurgery) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) -``` - -## Write json expressions and sql queries -```{r json and sql} -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) -``` - -Save the cohort and concept set jsons; these can be imported into ATLAS -```{r Save cohort and concept set json} -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} -``` - -```{r Create and generate cohorts} -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts -``` - -## Number of people in db -```{r Number of people in DB} -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) -``` diff --git a/renv.lock b/renv.lock deleted file mode 100644 index ab095ac1..00000000 --- a/renv.lock +++ /dev/null @@ -1,696 +0,0 @@ -{ - "R": { - "Version": "4.4.1", - "Repositories": [ - { - "Name": "CRAN", - "URL": "https://cran.rstudio.com" - } - ] - }, - "Packages": { - "CirceR": { - "Package": "CirceR", - "Version": "1.3.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "RJSONIO", - "rJava" - ], - "Hash": "2f9522a81dac11183e90b4236afa441d" - }, - "DBI": { - "Package": "DBI", - "Version": "1.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "065ae649b05f1ff66bb0c793107508f5" - }, - "DatabaseConnector": { - "Package": "DatabaseConnector", - "Version": "6.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "SqlRender", - "bit64", - "checkmate", - "dbplyr", - "digest", - "methods", - "rJava", - "readr", - "rlang", - "stringr", - "urltools", - "utils" - ], - "Hash": "1ef65614602c6534a6c666e872c3b647" - }, - "R6": { - "Package": "R6", - "Version": "2.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "470851b6d5d0ac559e9d01bb352b4021" - }, - "RJSONIO": { - "Package": "RJSONIO", - "Version": "1.3-1.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods" - ], - "Hash": "2f89abc0f88c647d3386c672632f4baf" - }, - "Rcpp": { - "Package": "Rcpp", - "Version": "1.0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "utils" - ], - "Hash": "5ea2700d21e038ace58269ecdbeb9ec0" - }, - "SqlRender": { - "Package": "SqlRender", - "Version": "1.18.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "checkmate", - "rJava", - "rlang" - ], - "Hash": "e1762de0f08b14658d74989c10e2f265" - }, - "backports": { - "Package": "backports", - "Version": "1.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "e1e1b9d75c37401117b636b7ae50827a" - }, - "bit": { - "Package": "bit", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "d242abec29412ce988848d0294b208fd" - }, - "bit64": { - "Package": "bit64", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bit", - "methods", - "stats", - "utils" - ], - "Hash": "9fe98599ca456d6552421db0d6772d8f" - }, - "blob": { - "Package": "blob", - "Version": "1.2.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "rlang", - "vctrs" - ], - "Hash": "40415719b5a479b87949f3aa0aee737c" - }, - "checkmate": { - "Package": "checkmate", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "backports", - "utils" - ], - "Hash": "c01cab1cb0f9125211a6fc99d540e315" - }, - "cli": { - "Package": "cli", - "Version": "3.6.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "b21916dd77a27642b447374a5d30ecf3" - }, - "clipr": { - "Package": "clipr", - "Version": "0.8.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" - }, - "codetools": { - "Package": "codetools", - "Version": "0.2-20", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "61e097f35917d342622f21cdc79c256e" - }, - "cpp11": { - "Package": "cpp11", - "Version": "0.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5a295d7d963cc5035284dcdbaf334f4e" - }, - "crayon": { - "Package": "crayon", - "Version": "1.5.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "methods", - "utils" - ], - "Hash": "859d96e65ef198fd43e82b9628d593ef" - }, - "dbplyr": { - "Package": "dbplyr", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "R6", - "blob", - "cli", - "dplyr", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "purrr", - "rlang", - "tibble", - "tidyr", - "tidyselect", - "utils", - "vctrs", - "withr" - ], - "Hash": "39b2e002522bfd258039ee4e889e0fd1" - }, - "digest": { - "Package": "digest", - "Version": "0.6.36", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "fd6824ad91ede64151e93af67df6376b" - }, - "dplyr": { - "Package": "dplyr", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "generics", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "rlang", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" - }, - "fansi": { - "Package": "fansi", - "Version": "1.0.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "utils" - ], - "Hash": "962174cf2aeb5b9eea581522286a911f" - }, - "fs": { - "Package": "fs", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" - }, - "generics": { - "Package": "generics", - "Version": "0.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15e9634c0fcd294799e9b2e929ed1b86" - }, - "glue": { - "Package": "glue", - "Version": "1.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" - }, - "hms": { - "Package": "hms", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" - ], - "Hash": "b59377caa7ed00fa41808342002138f9" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods" - ], - "Hash": "e1b9c55281c5adc4dd113652d9e26768" - }, - "lifecycle": { - "Package": "lifecycle", - "Version": "1.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "rlang" - ], - "Hash": "b8552d117e1b808b09a832f589b79035" - }, - "lubridate": { - "Package": "lubridate", - "Version": "1.9.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "generics", - "methods", - "timechange" - ], - "Hash": "680ad542fbcf801442c83a6ac5a2126c" - }, - "magrittr": { - "Package": "magrittr", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "7ce2733a9826b3aeb1775d56fd305472" - }, - "pillar": { - "Package": "pillar", - "Version": "1.9.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cli", - "fansi", - "glue", - "lifecycle", - "rlang", - "utf8", - "utils", - "vctrs" - ], - "Hash": "15da5a8412f317beeee6175fbc76f4bb" - }, - "pkgconfig": { - "Package": "pkgconfig", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "01f28d4278f15c76cddbea05899c5d6f" - }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" - }, - "progress": { - "Package": "progress", - "Version": "1.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "crayon", - "hms", - "prettyunits" - ], - "Hash": "f4625e061cb2865f111b47ff163a5ca6" - }, - "purrr": { - "Package": "purrr", - "Version": "1.0.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "lifecycle", - "magrittr", - "rlang", - "vctrs" - ], - "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" - }, - "rJava": { - "Package": "rJava", - "Version": "1.0-11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "524167e771b81342f8dd7a891ed3afa8" - }, - "readr": { - "Package": "readr", - "Version": "2.1.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "clipr", - "cpp11", - "crayon", - "hms", - "lifecycle", - "methods", - "rlang", - "tibble", - "tzdb", - "utils", - "vroom" - ], - "Hash": "9de96463d2117f6ac49980577939dfb3" - }, - "renv": { - "Package": "renv", - "Version": "1.0.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "397b7b2a265bc5a7a06852524dabae20" - }, - "rlang": { - "Package": "rlang", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" - }, - "stringi": { - "Package": "stringi", - "Version": "1.8.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "tools", - "utils" - ], - "Hash": "39e1144fd75428983dc3f63aa53dfa91" - }, - "stringr": { - "Package": "stringr", - "Version": "1.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "magrittr", - "rlang", - "stringi", - "vctrs" - ], - "Hash": "960e2ae9e09656611e0b8214ad543207" - }, - "tibble": { - "Package": "tibble", - "Version": "3.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "fansi", - "lifecycle", - "magrittr", - "methods", - "pillar", - "pkgconfig", - "rlang", - "utils", - "vctrs" - ], - "Hash": "a84e2cc86d07289b3b6f5069df7a004c" - }, - "tidyr": { - "Package": "tidyr", - "Version": "1.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "cpp11", - "dplyr", - "glue", - "lifecycle", - "magrittr", - "purrr", - "rlang", - "stringr", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" - }, - "tidyselect": { - "Package": "tidyselect", - "Version": "1.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang", - "vctrs", - "withr" - ], - "Hash": "829f27b9c4919c16b593794a6344d6c0" - }, - "timechange": { - "Package": "timechange", - "Version": "0.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11" - ], - "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" - }, - "triebeard": { - "Package": "triebeard", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp" - ], - "Hash": "642507a148b0dd9b5620177e0a044413" - }, - "tzdb": { - "Package": "tzdb", - "Version": "0.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cpp11" - ], - "Hash": "f561504ec2897f4d46f0c7657e488ae1" - }, - "urltools": { - "Package": "urltools", - "Version": "1.7.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "methods", - "triebeard" - ], - "Hash": "e86a704261a105f4703f653e05defa3e" - }, - "utf8": { - "Package": "utf8", - "Version": "1.2.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "62b65c52671e6665f803ff02954446e9" - }, - "vctrs": { - "Package": "vctrs", - "Version": "0.6.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang" - ], - "Hash": "c03fa420630029418f7e6da3667aac4a" - }, - "vroom": { - "Package": "vroom", - "Version": "1.6.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bit64", - "cli", - "cpp11", - "crayon", - "glue", - "hms", - "lifecycle", - "methods", - "progress", - "rlang", - "stats", - "tibble", - "tidyselect", - "tzdb", - "vctrs", - "withr" - ], - "Hash": "390f9315bc0025be03012054103d227c" - }, - "withr": { - "Package": "withr", - "Version": "3.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics" - ], - "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" - } - } -} From 3703c6a46c9af0f12885cf10eafb445e4d82cfd1 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 5 Aug 2024 09:07:06 +0200 Subject: [PATCH 094/130] remove unnecessary files --- R/conceptSets.R | 568 ------------------------------------------------ 1 file changed, 568 deletions(-) delete mode 100644 R/conceptSets.R diff --git a/R/conceptSets.R b/R/conceptSets.R deleted file mode 100644 index e6ed904f..00000000 --- a/R/conceptSets.R +++ /dev/null @@ -1,568 +0,0 @@ -#' @name conceptSets -#' @title Medical Concept Sets Definition and Expansion -#' -#' @description -#' This script defines and expands various concept sets related to medical data. It utilizes the Capr library to fetch all descendant concepts -#' for each defined concept set, ensuring comprehensive coverage of related medical concepts. -#' -#' @details The script initializes by defining multiple concept sets within a list structure. Each concept set contains unique identifiers for medical concepts, -#' which are expanded to include all descendant concepts using the Capr library's functionality. The expanded concept sets are then stored in a new list within -#' the `conceptSets` object. Finally, the script outputs a confirmation message indicating successful sourcing and expansion of concept sets. -#' -#' @note This script requires the Capr library to be installed and loaded for proper execution. -#' @export - -library(Capr) - -## Define list of concepts to use for concept sets -conceptSets <- list( - concepts = list( - # 5.3 VIS score medications - visScoreMedications = c( - 1337720, # source: dobutamine /// concept: dobutamine - 1337860, # source: dopamine /// concept: dopamine - 1343916, # source: epinephrine /// concept: epinephrine - 1368671, # source: milrinone /// concept: milrinone - 1321341, # source: norepinephrin /// concept: norepinephrine - 1507835 # source: vasopressin /// concept: vasopressin (USP) - ), - - # 5.4 vasopressors and inotropes - vasopressors_inotropes = c( - 1337720, # source: Dobutamine /// concept: dobutamine - 1337860, # source: Dopamine /// concept: dopamine - 1143374, # source: Ephedrine /// concept: ephedrine - 1343916, # source: Epinephrine /// concept: epinephrine - 1183554, # source: Isoproterenol /// concept: isoproterenol - 40173184, # source: Levosimendan /// concept: levosimendan - 1368671, # source: Milrinone /// concept: milrinone - 1321341, # source: Norepinephrine /// concept: norepinephrine - 1135766, # source: Phenylephrine /// concept: phenylephrine - 19119253, # source: Terlipressin /// concept: terlipressin - 1507835 # source: Vasopressin /// concept: vasopressin (USP) - ), - - # 5.5 immunosuppressants - immunosuppressants = c( - 4273629, # source: Chemotherapy /// concept: Chemotherapy - 1518254, # source: Dexamethasone /// concept: dexamethasone - 975125, # source: Hydrocortisone /// concept: hydrocortisone - 1506270, # source: Methylprednisolone /// concept: methylprednisolone - 21603754, # source: Monoclonal Antibodies /// concept: Monoclonal antibodies - 1550557 # source: Prednisolone /// concept: prednisolone - ), - - # 5.6 antibiotic medications - antibiotics = c( - 1713332, # source: Amoxicillin /// concept: amoxicillin - 1759842, # source: Amoxicillin clavulanate /// concept: clavulanate - 1717327, # source: Ampicillin /// concept: ampicillin - 1734104, # source: Azithromycin /// concept: azithromycin - 1836430, # source: Trimethoprim-Sulfamethoxazole /// concept: sulfamethoxazole - 1705674, # source: Trimethoprim-Sulfamethoxazole /// concept: trimethoprim - 1836948, # source: Tetracycline /// concept: tetracycline - 902722, # source: Tobramycin /// concept: tobramycin - 1707687, # source: Vancomycin /// concept: vancomycin - 19010400, # source: Fusidic acid /// concept: fusidate - 45892419, # source: Gentamicin /// concept: gentamicin - 45892599, # source: Ceftolozane-Tazovactam /// concept: ceftolozane - 46221507, # source: Ceftazidime-Avibactam /// concept: avibactam - 1736887, # source: Linezolid /// concept: linezolid - 1748975, # source: Cefepime /// concept: cefepime - 1750500, # source: Clarithromycin /// concept: clarithromycin - 1769535, # source: Cefadroxil /// concept: cefadroxil - 1771162, # source: Cefazolin /// concept: cefazolin - 1774470, # source: Cefotaxime /// concept: cefotaxime - 1776684, # source: Ceftazidime /// concept: ceftazidime - 1778162, # source: Cefuroxime /// concept: cefuroxime - 1786617, # source: Daptomycin /// concept: daptomycin - 1797513, # source: Ciprofloxacin /// concept: ciprofloxacin - 997881, # source: Clindamycin /// concept: clindamycin - 901845, # source: Colistin /// concept: colistin - 1709170, # source: Meropenem /// concept: meropenem - 1717963, # source: Ertapenem /// concept: ertapenem - 1518254, # source: Dexamethasone /// concept: dexamethasone - 1741122, # source: Piperacillin-Tazobactam /// concept: tazobactam - 1746114, # source: Piperacillin-Tazobactam /// concept: piperacillin - 1746940, # source: Erythromycin /// concept: erythromycin - 951511, # source: Mupirocin /// concept: mupirocin - 956653, # source: Fosfomycin /// concept: fosfomycin - 975125, # source: Hydrocortisone /// concept: hydrocortisone - 1778262, # source: Imipenem /// concept: imipenem - 19078399, # source: Teicoplanin /// concept: teicoplanin - 1790868, # source: Amikacin /// concept: amikacin - 1506270, # source: Methylprednisolone /// concept: methylprednisolone - 920293, # source: Nitrofurantoin /// concept: nitrofurantoin - 1721543, # source: Norfloxacin /// concept: norfloxacin - 1724703, # source: Oxacillin /// concept: oxacillin - 1728416, # source: Penicillin /// concept: penicillin G - 1742253, # source: Levofloxacin /// concept: levofloxacin - 1550557, # source: Prednisolone /// concept: prednisolone - 1763204 # source: Rifampicin /// concept: rifampin - ), - - # 5.7 antifungal medications - antifungals = c( - 1714277, # source: Voriconazole /// concept: voriconazole - 35606695, # source: Isovuconazole /// concept: isavuconazole - 19018013, # source: Micafungin /// concept: micafungin - 19026450, # source: Andiulafungin /// concept: anidulafungin - 1754994 # source: Fluconazole /// concept: fluconazole - ), - - # 5.8 antibiotic resistance - antibioticResistance = c( - 4019195, # source: MRSA /// concept: Methicillin resistant Staphylococcus aureus - 4257547, # source: ESBL /// concept: Extended spectrum beta-lactamase producing bacteria - 37017134, # source: Drug-resistant /// concept: Multidrug-resistant bacteria - 1707687, # source: Vancomycin-resistant /// concept: vancomycin - 997881, # source: Clindamycin-resistant /// concept: clindamycin - 1746940 # source: Erythromycin-resistant /// concept: erythromycin - ), - - # 5.9 cardiac surgery - cardiacSurgery = c( - 4049734, # source: Application of band to pulmonary artery /// concept: Banding of pulmonary artery - 4019929, # source: Unspecified repair of tetralogy of fallot /// concept: Repair of tetralogy of Fallot - 4019932, # source: Repositioning of transposed great arteries /// concept: Arterial switch operation - 4017751, # source: Unspecified correction of total anomalous pulmonary venous connection /// concept: Repair of total anomalous pulmonary venous connection - 4020376, # source: Primary repair of defect of interatrial septum NEC/repair of defect of interatrial septum using pericardial patch /// concept: Closure of defect of interatrial septum using pericardial patch - 4020506, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Creation of valved conduit between right ventricle of heart and pulmonary artery - 4019950, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Revision of valved cardiac conduit - 4020508, # source: Correction of persistent sinus venosus /// concept: Repair of sinus venosus - 4018441, # source: Correction of partial anomalous pulmonary venous drainage /// concept: Repair of partial anomalous pulmonary venous connection - 4020520, # source: Open aortic valvotomy /// concept: Open aortic valvotomy - 4018747, # source: Repair of subaortic stenosis /// concept: Operations on the left ventricular outflow tract - 4019233, # source: Unspecified creation of shunt to pulmonary artery from subclavian artery using interposition tube pr /// concept: Creation of shunt from subclavian artery to pulmonary artery using interposition tube prosthesis - 4019237, # source: Creation of anastomosis to pulmonary artery from vena cava /// concept: Anastomosis of vena cava to pulmonary artery - 4018926, # source: Other specified : repair of pulmonary artery /// concept: Repair of pulmonary artery - 4021725, # source: Removal of band from pulmonary artery /// concept: Removal of band from pulmonary artery - 4019026, # source: Other specified: plastic repair of aorta /// concept: Plastic repair of aorta - 4020812, # source: Plastic repair of aorta and end to end anastomosis of aorta /// concept: Plastic repair of aorta and end-to-end anastomosis of aorta - 4019028, # source: Release of vascular ring of aorta /// concept: Release of vascular ring of aorta - 44790092, # source: Relief of left ventricular outflow tract obstruction /// concept: Relief of left ventricular outflow tract obstruction - 44789857, # source: Total cavopulmonary connection with extracardiac inferior caval vein topulmonary artery conduit /// concept: Total cavopulmonary connection with extracardiac inferior caval vein to pulmonary artery conduit - 4336751, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Allotransplant of heart - 4049979, # source: Repair of double outlet right ventricle /// concept: Repair of double outlet right ventricle - 4050114, # source: Closure of patent ductus arteriosus NEC /// concept: Closure of ductus arteriosus with clip - 4052536, # source: Extracorporeal membrane oxygenation /// concept: Extracorporeal membrane oxygenation - 44790415, # source: Aortic root pulmonary valve autograft with right vent to pulmonary artery valved conduit/ aortic root pulmonary valve autograft with right vent to pulmonary artery aortoventriculoplasty /// concept: Aortic root replacement using pulmonary valve autograft with right ventricle to pulmonary artery valved conduit and aortoventriculoplasty - 4144921, # source: Implantation of cardiac pacemaker system NEC /// concept: Implantation of cardiac pacemaker - 4137127, # source: Unspecified other transplantation of heart/allotransplantation of heart NEC /// concept: Transplantation of heart - 44793133, # source: Aortopulmonary reconstruction with systemic to pulmonary arterial shunt /// concept: Aortopulmonary reconstruction with systemic to pulmonary arterial shunt - 4293619, # source: Tricuspid valve repair NEC /// concept: Repair of tricuspid valve - 4296790, # source: Transposition of coronary artery NEC /// concept: Transposition of coronary artery - 4139214, # source: Open implantation of ventricular assist device /// concept: Open implantation of cardiac ventricular assist device - 4178479, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of valved cardiac conduit - 40486525, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Primary repair of defect of atrioventricular septum - 4187380, # source: Primary repair of defect of atrioventricular septum NEC/repair of persistent ostium primum/repair of persistent ostium primum /// concept: Repair of ostium primum defect - 4199899, # source: Unspecified repair of defect of interventricular septum /// concept: Closure of ventricular septal defect - 4203153, # source: Replacement of mitral valve NEC /// concept: Replacement of mitral valve - 4217615, # source: Plication of diaphragm /// concept: Plication of diaphragm - 4308136, # source: Repair of tetralogy of fallot using transannular patch /// concept: Complete repair of tetralogy of Fallot with transannular patch - 4312194, # source: Aortic valve repair NEC /// concept: Repair of heart valve - 4339184, # source: Revision of cardiac conduit nec/creation of valved conduit between Right ventricle of heart and Pulmonary artery/replacement of valved cardiac conduit/ replacement of pulmonary valve nec /// concept: Replacement of pulmonary valve - 4232476 # source: Repair of defect of interventricular septum using prosthetic patch/unspecified repair of defect of interventricular septum /// concept: Repair of ventricular septal defect with prosthesis - ), - - # 5.10 cardiac radiology - cardiacRadiology = c( - 4019824, # source: US transoesophageal echocardiogram (toe) /// concept: Transesophageal echocardiography - 4032404, # source: IR bronchoscopy /// concept: Bronchoscopy - 4065416, # source: Exercise test (non-CPET) /// concept: Exercise tolerance test - 4345925, # source: FL video swallow /// concept: Videofluoroscopy swallow - 4083106, # source: US cranial contents /// concept: US scan of head - 4083108, # source: US neck /// concept: US scan of neck - 4082979, # source: MRI head /// concept: MRI of head - 4093436, # source: US thorax and pleural cavity /// concept: Ultrasonography of thorax - 4125350, # source: CT head /// concept: CT of head - 4125530, # source: US urinary tract /// concept: US urinary tract - 44802640, # source: MRI cardiac complex congenital /// concept: MRI study for cardiac congenital anomaly - 4163872, # source: XR chest /// concept: Plain chest X-ray - 4167029, # source: US doppler groin both /// concept: Ultrasonography of inguinal region - 4167052, # source: US doppler renal both /// concept: Doppler ultrasonography of kidney - 4305221, # source: US abdomen and pelvis/ US abdomen /// concept: US scan of abdomen and pelvis - 4303522, # source: US diaphragmatic region /// concept: US scan of diaphragm - 4306317, # source: CT heart with contrast/ CT cardiac angiogram coronary/ CT cardiac gated with contrast /// concept: CT angiography of coronary artery with contrast - 4169275, # source: XR chest and abdomen /// concept: X-ray of chest and abdomen - 4322380, # source: IR PICC line insertion /// concept: Insertion of peripherally inserted central catheter - 4140473, # source: 24h holter monitor /// concept: Holter extended electrocardiographic recording - 4329508, # source: US thorax and pleural cavity /// concept: Ultrasonography of pleural cavity - 4335392, # source: US doppler lower limb veins both /// concept: Doppler ultrasonography of vein of lower limb - 4203365, # source: Epicardial echocardiogram /// concept: Epicardial echocardiography - 4335825, # source: US transthoracic echocardiogram/ us transthoracic echocardiogram (pre- admission)/ US transthoracic echocardiogram (sedated) /// concept: Transthoracic echocardiography - 40482732, # source: IR tunnelled central venous line insertion /// concept: Insertion of tunneled venous catheter - 40489841, # source: US doppler jugular vein both /// concept: Doppler ultrasonography of jugular vein - 40492338, # source: Cardiopulmonary exercise test (CPET) /// concept: Cardiopulmonary exercise test - 40488431, # source: Pacemaker/ICD interrogation (in clinic)/ pacemaker/ICD interrogation (other) /// concept: Interrogation of cardiac pacemaker - 42873079, # source: IR tunnelled central venous line removal /// concept: Removal of tunneled central venous catheter - 4261497, # source: US abdomen and pelvis/ US abdomen /// concept: Ultrasonography of abdomen - 4205144, # source: EEG routine portable /// concept: Portable electroencephalogram - 4181917, # source: EEG routine /// concept: Electroencephalogram - 4264477, # source: XR abdomen /// concept: Diagnostic radiography of abdomen - 45764527, # source: 24h holter monitor /// concept: Electrocardiographic Holter analyzer - 45765560, # source: Event monitor /// concept: Cardiovascular monitor - 4327032, # source: CT thorax with contrast /// concept: CT of thorax with contrast - 35622931, # source: US doppler /// concept: Doppler ultrasound - 44813863, # source: US vocal cord /// concept: Ultrasonography of vocal cord - 4312208, # source: IR bronchogram /// concept: Contrast bronchogram - 4235141 # source: Pacemaker/ICD device check - remote patient initiated /// concept: Check artificial pacemaker - ), - - # 5.11 cardiac length of stay - cardiac_LOS = c( - 4123933, # source: ICU admission (start datetime and end datetime) /// concept: Admission to pediatric intensive care unit - 8715, # source: Total hospital admission (start datetime and end datetime) /// concept: Hospital admission - 4161811, # source: HDU admission (start datetime and end datetime) /// concept: Admission to high dependency unit - 36675203 # source: Cardiology ward admission (start datetime and end datetime) /// concept: Admission to pediatric cardiology department - ), - - # 5.12 additional variables - additional = c( - 4095105, # source: Base Excess /// concept: Base deficit measurement - 4123933, # source: Elective ICU admission /// concept: Admission to pediatric intensive care unit - 4234469, # source: Diagnoses /// concept: Diagnosis - 40493026, # source: Mechanical ventilation /// concept: Mechanical ventilator - 44803020, # source: Reason for ICU admission: (Main reason for ICU admission is not recovery from surgery or a procedure, Recovery from a bypass cardiac procedure, recovery from a non-bypass cardiac procedure, recovery from non-cardiac procedure) /// concept: Primary reason for admission - 4209008, # source: Pupillary reaction /// concept: Pupillary function - 260134, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Croup - 432571, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Malignant lymphoma - 4029498, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Seizure disorder - 317009, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Asthma - 201957, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Necrotizing enterocolitis in fetus OR newborn - 43530727, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Spontaneous cerebral hemorrhage - 29783, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Severe combined immunodeficiency disease - 321042, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Cardiac arrest - 4165112, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Bronchiolitis - 443727, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Diabetic ketoacidosis - 314383, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Myocarditis - 4245975, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Hepatic failure - 440207, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Hypoplastic left heart syndrome - 42537745, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Bone marrow transplant present - 442588, # source: Low Risk Diagnoses: None, asthma, bronchiolitis, croup, obstructive sleep apnea, diabetic ketoacidosis, seizure disorder /// concept: Obstructive sleep apnea syndrome - 4213310, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Degenerative disease of the central nervous system - 321319, # source: High Risk Diagnoses: (None, spontaneous cerbral hemorrhage, cardiomyopathy or myocarditis, hypoplastic left heart syndrome, neurodegenerative disorder, necrotizing enterocolitis) /// concept: Cardiomyopathy - 317510, # source: Very High Risk Diagnoses: None, cardiac arrest preceding ICU admission, severe combined immune deficiency, leukemia or lymphoma after first induction, bone marrow transplant recipient, liver failure /// concept: Leukemia - 5083, # source: Outpatient appointment type (telephone/ clinic visit etc.) /// concept: Telehealth - 42869590, # source: FiO2 /// concept: Oxygen/Gas total [Pure volume fraction] Inhaled gas - 3027946, # source: PaCO2 /// concept: Carbon dioxide [Partial pressure] in Arterial blood - 3004249 # source: Systolic blood pressure /// concept: Systolic blood pressure - ), - - # 5.13 laboratory tests - labTests = c( - 4298431, # source: Immature WBC Count /// concept: White blood cell count - 3007670, # source: Neutrophil Count /// concept: Neutrophil Ab [Units/volume] in Serum - 40762351, # source: Hemoglobin /// concept: Hemoglobin [Moles/volume] in Blood - 37393863, # source: Platelet Count /// concept: Platelet count - 3009542, # source: Hematocrit /// concept: Hematocrit [Volume Fraction] of Blood - 3034426, # source: INR Prothrombin Time /// concept: Prothrombin time (PT) - 3047181, # source: Lactate /// concept: Lactate [Moles/volume] in Blood - 3051825, # source: Creatinine /// concept: Creatinine [Mass/volume] in Blood - 3024561, # source: Albumin /// concept: Albumin [Mass/volume] in Serum or Plasma - 3024641, # source: Blood urea nitrogen /// concept: Urea nitrogen [Moles/volume] in Serum or Plasma - 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma - 3006140, # source: Bilirubin /// concept: Bilirubin.total [Moles/volume] in Serum or Plasma - 3019550, # source: Sodium /// concept: Sodium [Moles/volume] in Serum or Plasma - 3005456, # source: Potassium /// concept: Potassium [Moles/volume] in Blood - 3033836, # source: Magnesium /// concept: Magnesium [Moles/volume] in Blood - 3018572, # source: Chloride /// concept: Chloride [Moles/volume] in Blood - 3015377, # source: Calcium /// concept: Calcium [Moles/volume] in Serum or Plasma - 3003458, # source: Phosphate /// concept: Phosphate [Moles/volume] in Serum or Plasma - 3020460, # source: CRP /// concept: C reactive protein [Mass/volume] in Serum or Plasma - 3006923, # source: ALT /// concept: Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 3013721, # source: AST /// concept: Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma - 37392672, # source: pH (venous) /// concept: Blood venous pH - 37399161, # source: pH (arterial) /// concept: Blood arterial pH - 3021447, # source: pCO2 (venous) /// concept: Carbon dioxide [Partial pressure] in Venous blood - 3027946, # source: pCO2 (arterial) /// concept: Carbon dioxide [Partial pressure] in Arterial blood - 3024354, # source: pO2 (venous) /// concept: Oxygen [Partial pressure] in Venous blood - 3027801, # source: pO2 (arterial) /// concept: Oxygen [Partial pressure] in Arterial blood - 3027273, # source: Bicarbonate (venous) /// concept: Bicarbonate [Moles/volume] in Venous blood - 3008152 # source: Bicarbonate (arterial) /// concept: Bicarbonate [Moles/volume] in Arterial blood - ), - - # 5.14 cardiac complications - cardiacComplications = c( - 4051330, # source: LCOS - renal support (CVVH/ PD) /// concept: Continuous venovenous hemofiltration - 4123933, # source: ICU ward stay /// concept: Admission to pediatric intensive care unit - 4295705, # source: Surgical injury - Reexplore for bleeding /// concept: Exploratory incision - 377091, # source: Neurological injury - seizure /// concept: Seizure - 439847, # source: Neurological injury - intracranial haemmhorage/ intracranial bleeding /// concept: Intracranial hemorrhage - 4308537, # source: Surgical injury - Blood Loss /// concept: Injury to blood vessel during surgery - 321042, # source: LCOS - Cardiac arrest /// concept: Cardiac arrest - 443454, # source: Neurological injury - infarction /// concept: Cerebral infarction - 4185565, # source: Low cardiac output state (LCOS) - ECMO /// concept: Low cardiac output syndrome - 42537043, # source: CVL infections /// concept: CLABSI - central line associated bloodstream infection - 4306136 # source: Surgical injury - Chylothorax /// concept: Chylothorax - ), - - # 5.15 Vital signs - vitalSigns = c( - 3027018, # source: Age-dependent HR /// concept: Heart rate - 3024171, # source: Age-dependent RR /// concept: Respiratory rate - 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure - 3012888, # source: DBP (Dyastolic Blood Pressure) /// concept: Diastolic blood pressure - 4020553 # source: SpO2 /// concept: Oxygen saturation measurement - ), - - # 5.16 HSJD clinical - HSJDClinical = c( - 3025315, # source: Weight /// concept: Body weight - 3036277, # source: Height /// concept: Body height - 4201235, # source: Body Surface Area (BSA) - Combination of weight and height /// concept: body surface area - 4275564 # source: Cardiac surgeries (Interventions) /// concept: Operation on heart - ), - - # 5.17 HSJD Surgery - HSJDSurgery = c( - 40490494, # source: STAT/EACTS score of surgery /// concept: Society of Thoracic Surgeons risk calculator - 4301351, # source: Surgery start datetime, end datetime /// concept: Surgical procedure - 4336464, # source: Cardiac bypass start datetime, end datetime /// concept: Coronary artery bypass graft - 4201547, # source: Cross-clamping start datetime, end datetime /// concept: Placement of arterial cross clamp - 37152781, # source: Deep hypothermic circulatory arrest start datetime, end datetime /// concept: Hypothermic circulatory arrest - 4272324, # source: Antegrade Cerebral Perfusion start datetime, end datetime /// concept: Cardiopulmonary bypass operation - 4150627 # source: Extubation event /// concept: Removal of endotracheal tube - ), - - # 5.18 HSJD Hospitalisations - HSJDHospitalisation = c( - 44803020, # source: Admission reason /// concept: Primary reason for admission - 42539650, # source: Vasoactive infusion start datetime, end datetime /// concept: Administration of intravenous vasoactive drug - 4179206, # source: Postop central venous catheter in/start datetime, out/end datetime /// concept: Central venous catheter - 37158404, # source: Invasive Mechanical Ventilation LOS /// concept: Invasive mechanical ventilation - 4177224 # source: Non-Invasive Mechanical Ventilation LOS /// concept: Non-invasive ventilation - ), - - # 5.19 HSJD Complications - HSJDcomplications = c( - 4202832, # source: intubation /// concept: Intubation - 4275564, # source: Cardiac surgeries (interventions) /// concept: Operation on heart - 4044892, # source: Sternum reopening (procedure undertaken) /// concept: Procedure on sternum - 4046868, # source: Vocal Cord Dysfunction /// concept: Vocal cord dysfunction - 4275136, # source: Diaphragmatic Paralysis /// concept: Paralysis of diaphragm - 253796, # source: Pneumothorax /// concept: Pneumothorax - 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea - 44784217, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Cardiac arrhythmia - 315643, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Tachyarrhythmia - 4228448, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Bradyarrhythmia - 4068155, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Atrial arrhythmia - 4185572, # source: Arrhythmia diagnosis (tachyarrhythmia, bradyarrhythmia, atrial, ventricular etc.) /// concept: Ventricular arrhythmia - 46234437, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: ivabradine - 1309944, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: amiodarone - 1354860, # source: Drugs administered; Arrhythmia therapy (drugs): IV anthyarritmics (ivabradine, amiodarone, flecainide) /// concept: flecainide - 4353741, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Cardioversion - 4117045, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Atrial overdrive pacing - 4049398, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Temporary cardiac pacemaker procedure - 4051940, # source: Arrhythmia therapy (procedures): Cardioversion, Rapid atrial pacing, temporary pacing, permanent pacing /// concept: Permanent cardiac pacemaker procedure - 609312 # source: Listed for heart transplantation /// concept: Awaiting transplantation of heart - ), - - # 5.21 healthcare use - healthcareUse = c( - 37174269, # source: Diagnosis of acute infection having the potential for progression to sepsis1+2 /// concept: At increased risk of sepsis - 4032243, # source: Dialysis /// concept: Dialysis procedure - 197320, # source: acute kidney injury /// concept: Acute kidney injury - 4074689, # source: "Chest opening, chest drainage" /// concept: Open drainage of pleural cavity - 4084670, # source: Surgical admission (non-urgent) /// concept: Non-urgent surgical admission - 4070667, # source: Urinary catheter /// concept: Urinary catheter - 44790095, # source: Invasive ventilation /// concept: Invasive ventilation - 4052536, # source: ECMO /// concept: Extracorporeal membrane oxygenation - 4051330, # source: Dialysis /// concept: Continuous venovenous hemofiltration - 44790567, # source: Origin (external) /// concept: Patient transfer from hospital to hospital - 133327, # source: viremia /// concept: Viremia - 4097216, # source: Endotracheal tube /// concept: Endotracheal tube - 4085730, # source: Antibiotics /// concept: Antibiotic therapy - 4123946, # source: Surgical admission (urgent) /// concept: Admission to surgical department - 4208341, # source: organ transplant /// concept: Solid organ transplant - 4193843, # source: Oxygenation index /// concept: Oxygenation index measurement - 4235043, # source: Ventricular assist device (VAD) /// concept: Ventricular assist device - 443392, # source: Cancer /// concept: Malignant neoplastic disease - 4181511, # source: Antineoplastics /// concept: Administration of antineoplastic agent - 4294886, # source: Origin (internal) /// concept: "Patient transfer, in-hospital" - 4301351, # source: Surgery previous to prediction time point /// concept: Surgical procedure - 4140762, # source: Antivirals /// concept: Antiviral therapy - 4177205, # source: Peripheral IV cannulas /// concept: Cannulation - 4177224, # source: Non-invasive ventilation /// concept: Non-invasive ventilation - 45758028, # source: Arterial blood pressure catheter /// concept: Arterial blood pressure catheter - 44803020, # source: Reason for admission /// concept: Primary reason for admission - 4179206, # source: Central venous catheter /// concept: Central venous catheter - 132736, # source: bacteremia /// concept: Bacteremia - 44783799, # source: Tracheostomy /// concept: Exteriorization of trachea - 45768671, # source: asplenia /// concept: Asplenia - 4324124, # source: Peritoneal dialysis /// concept: Peritoneal dialysis - 435785, # source: meningitis /// concept: Meningitis - 201820, # source: Diagnosis of chronic condition /// concept: Diabetes mellitus - 42538045, # source: Nasogastric/orogastric tube /// concept: Nasogastric/orogastric tube stylet - 37206601, # source: ECMO type /// concept: Venoarterial extracorporeal membrane oxygenation - 37206603, # source: ECMO type /// concept: Venovenous extracorporeal membrane oxygenation - 4314777, # source: Immunosuppressors /// concept: Immunosuppressive therapy - 604243, # source: neutropenia /// concept: Acquired neutropenia - 444187, # source: injury with open wound /// concept: Open wound - 22281, # source: sickle cell disease /// concept: Sickle cell-hemoglobin SS disease - 435613, # source: cellulitis /// concept: Cellulitis - 4134120, # source: cerebral palsy /// concept: Cerebral palsy - 444202, # source: Abcess /// concept: Abscess - 312723, # source: Diagnosis of chronic condition /// concept: Congenital heart disease - 255573, # source: Diagnosis of chronic condition /// concept: Chronic obstructive lung disease - 255848, # source: pneumonia /// concept: Pneumonia - 433740, # source: immunodeficiency /// concept: Immunodeficiency disorder - 4080011, # source: Diagnosis of organ system dysfunction /// concept: Organ dysfunction syndrome - 434821, # source: Diagnosis of SIRS /// concept: Systemic inflammatory response syndrome - 81539, # source: mitochondrial disease /// concept: Mitochondrial cytopathy - 4103588, # source: tuberculosis /// concept: Acute tuberculosis - 443783, # source: Diagnosis of chronic condition /// concept: Chronic disease - 4140977, # source: Diagnosis of condition producing immunodeficiency /// concept: Secondary immune deficiency disorder - 201606, # source: Crohn's disease /// concept: Crohn's disease - 4243475, # source: hepatitis /// concept: Acute hepatitis - 4300243, # source: surgical site inflammation /// concept: Postoperative complication - 439125, # source: Down's syndrome /// concept: Complete trisomy 21 syndrome - 321042, # source: cardiac arrest /// concept: Cardiac arrest - 4331815, # source: UTI /// concept: Acute urinary tract infection - 195212, # source: Cushing's disease /// concept: Hypercortisolism - 196152, # source: peritonitis /// concept: Peritonitis - 314383, # source: miocarditis /// concept: Myocarditis - 195314, # source: nephrotic syndrome /// concept: Nephrotic syndrome - 441589, # source: endocarditis /// concept: Endocarditis - 4271450, # source: Diagnosis of acute infection having the potential for progression to sepsis1+2 /// concept: Acute infectious disease - 81893, # source: ulcerative colitis /// concept: Ulcerative colitis - 80809, # source: rheumatoid arthritis /// concept: Rheumatoid arthritis - 4322814, # source: Meningo-encephalitis /// concept: Meningoencephalitis - 36716945, # source: renal insufficiency /// concept: Renal insufficiency - 440448, # source: appendicitis /// concept: Appendicitis - 433968, # source: candidiasis /// concept: Candidiasis - 44807226, # source: necrotizing enterocolitis /// concept: Necrotising enterocolitis - 132797, # source: Previous diagnosis of sepsis measure /// concept: Sepsis - 21602722, # source: Corticoids /// concept: CORTICOSTEROIDS FOR SYSTEMIC USE - 42869590, # source: FiO2 /// concept: Oxygen/Gas total [Pure volume fraction] Inhaled gas - 42527086, # source: Mean Airway Pressure (MAP) /// concept: Mean airway pressure - 1340204 # source: Previous diagnosis of sepsis measure /// concept: History of event - ), - - # 5.22 vital signs UC2 - vitalSignsUC2 = c( - 4096101, # source: SpO2 /// concept: Measurement of oxygen saturation at periphery - 3025315, # source: Weight /// concept: Body weight - 3020891, # source: Body temperature /// concept: Body temperature - 3012888, # source: DBP (Diastolic blood pressure) /// concept: Diastolic blood pressure - 3004249, # source: SBP (Systolic Blood Pressure) /// concept: Systolic blood pressure - 3014315, # source: Urine output /// concept: Urine output - 3024171, # source: RR /// concept: Respiratory rate - 3027018 # source: HR /// concept: Heart rate - ), - - # 5.23 physical examination signs - physicalExaminationSigns = c( - 4224504, # source: Central pulse /// concept: Pulse - 4314539, # source: Peripheral pulse (pressure) /// concept: Arterial pulse pressure - 21490963, # source: Pupillary reactivity (right) /// concept: Right pupil Pupillary response - 3032652, # source: GCS /// concept: Glasgow coma scale - 3045676, # source: Capillary refill time /// concept: Capillary refill [Time] - 21491763, # source: Pupillary reactivity (left) /// concept: Left pupil Pupillary response - 3021415, # source: Pupillary size (left) /// concept: Left pupil Diameter Auto - 3027214 # source: Pupillary size (right) /// concept: Right pupil Diameter Auto - ), - - # 5.24 lab tests UC2 - labTestsUC2 = c( - 37393605, # source: D-dimer /// concept: D-dimer level - 4017361, # source: Blood urea nitrogen /// concept: Blood urea nitrogen measurement - 4036356, # source: Bacterial pathogen detection /// concept: Detection of bacteria - 44789220, # source: Ionized calcium /// concept: Ionised calcium measurement - 4094436, # source: Fibrinogen /// concept: Fibrinogen measurement - 4118986, # source: Direct bilirubin /// concept: Bilirubin measurement - 4196268, # source: PCR panel /// concept: Polymerase chain reaction observation - 440029, # source: Viral pathogen detection /// concept: Viral disease - 4212899, # source: Leukocytes /// concept: Total white blood count - 4175016, # source: Thromboplastin time /// concept: Partial thromboplastin time, activated - 42536081, # source: MR-proADM /// concept: Adrenal medulla hormone - 4299649, # source: Quantification of colonies in culture /// concept: Quantitative microbial culture and measurement - 44806682, # source: Antibiotic resistance /// concept: Infection resistant to multiple antibiotics - 432545, # source: Name of bacterial pathogen detected /// concept: Bacterial infectious disease - 3013826, # source: Glucose /// concept: Glucose [Moles/volume] in Serum or Plasma - 3046279, # source: PCT /// concept: Procalcitonin [Mass/volume] in Serum or Plasma - 3033291 # source: Interleukin-6 /// concept: Interleukin 6 [Mass/volume] in Body fluid - ), - - # 5.25 arterial blood gas - arterialBloodGas = c( - 3003396, # source: Base excess /// concept: Base excess in Arterial blood by calculation - 3019977, # source: pH /// concept: pH of Arterial blood - 3008152, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Arterial blood - 3027946, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Arterial blood - 3027801 # source: PaO2 /// concept: Oxygen [Partial pressure] in Arterial blood - ), - - # 5.26 venous blood gas - venousBloodGas = c( - 3009343, # source: pH /// concept: pH of Capillary blood - 3027273, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Venous blood - 3003129, # source: Base excess /// concept: Base excess in Capillary blood by calculation - 3002032, # source: Base excess /// concept: Base excess in Venous blood by calculation - 3015235, # source: HCO3 /// concept: Bicarbonate [Moles/volume] in Capillary blood - 3023024, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Capillary blood - 3021447, # source: pCO2 /// concept: Carbon dioxide [Partial pressure] in Venous blood - 3028626, # source: PaO2 /// concept: Oxygen [Partial pressure] in Capillary blood - 3024354, # source: PaO2 /// concept: Oxygen [Partial pressure] in Venous blood - 3012544 # source: pH /// concept: pH of Venous blood - ), - - # 5.28 Patient characteristics - UC3PateintCharacteristics = c( - 434007, # source: hemophilia A diagnosis /// concept: hereditary factor VIII deficiency disease - 4094223, # source: hemophilia A subtype/ severity /// concept: mild hereditary factor VIII deficiency disease - 4140661, # source: hemophilia A subtype/ severity /// concept: moderate hereditary factor VIII deficiency disease - 4056830, # source: hemophilia A subtype/ severity /// concept: severe hereditary factor VIII deficiency disease - 3003694, # source: blood group /// concept: ABO and Rh group [Type] in Blood - 37393608, # source: factor VIII inhibitor status /// concept: factor VIII inhibitor activity - 4126681, # source: factor VIII inhibitor status /// concept: detected - 9190 # source: factor VIII inhibitor status /// concept: not detected - ), - - # 5.29 Lab Measurements - UC3LabMeasurements = c( - 3024942, # source: factor VIII inhibitor titer /// concept: coagulation factor VIII inhibitor [Units/volume] in platelet poor plasma by coagulation assay - 3022520, # source: factor VIII activity measurement /// concept: coagulation factor VIII activated [Units/volume] in platelet poor plasma by coagulation assay - 3011832, # source: factor VIII activity measurement /// concept: coagulation factor VIII activity [Units/volume] in platelet poor plasma by Chromogenic assay - 43534000, # source: Von Willebrand factor activity measurement /// concept: von Willebrand factor (vWf) activity [Units/volume] in platelet poor plasma by Immunoassay - 3002124, # source: Von Willebrand factor antigen measurement /// concept: von Willebrand factor (vWf) Ag [Units/volume] in platelet poor plasma by Immunoassay - 3023693, # source: Von Willebrand factor propeptide measurement /// concept: von Willebrand factor (vWf) multimers in platelet poor plasma by Immunoblot - 3042349, # source: Von Willebrand factor propeptide measurement /// concept: von Willebrand factor (vWf) cleaving protease inhibitor [Units/volume] in platelet poor plasma - 4175016, # source: activated partial thromboplastin time (APTT) /// concept: partial thromboplastin time, activated - 3034426, # source: Prothrombin time (PT) /// concept: prothrombin time (PT) - 4267147, # source: platelet count /// concept: platelet count - 3009542, # source: hematocrit /// concept: Hematocrit [Volume Fraction] of Blood - 3016407, # source: fibrinogen /// concept: fibrinogen [mass/volume] in platelet poor plasma by coagulation assay - 3006923, # source: ALT /// concept: alanine aminotransferase [enzymatic activity/volume] in serum or plasma - 3013721 # source: AST /// concept: aspartate aminotransferase [enzymatic activity/volume] in serum or plasma - ), - - # 5.30 Treatments - UC3Treatments = c( - 1352213, # source: factor VIII /// concept: factor VIII (umbrella term) - 793042, # source: factor VIII /// concept: emicizumab (umbrella term) - 40492862, # source: factor VIII dose is continuous infusion or bolus dose /// concept: mode of drug administration - 4129275, # source: factor VIII dose is continuous infusion or bolus dose /// concept: continuous infusion - 4265597, # source: factor VIII dose is continuous infusion or bolus dose /// concept: by bolus infusions - 1517070 # source: desmopressin /// concept: desmopressin - ), - - # 5.31 Surgery-specific parameters - UC3Surgery = c( - 4172515, # source: Medical/ surgical procedure /// concept: Therapeutic procedure - 967823, # source: NaCl administration during surgery /// concept: sodium chloride - 4028665, # source: plasma administration during surgery /// concept: plasma transfusion - 4160439, # source: datetime start anesthesia /// concept: Administration of anesthesia - 4308716, # source: blood loss during surgery /// concept: intraoperative hemorrhage - 37017589 # source: blood transfusion during surgery /// concept: Bleeding during surgery requiring transfusion - ) - ) -) - -## Extend with descendants -conceptSets$conceptSets <- list() -for (cs in names(conceptSets$concepts)) { - conceptSets$conceptSets[[cs]] <- cs(descendants(conceptSets$concepts[[cs]]), name = cs) -} - -cat("\nSourced concept sets\n") From 56d1a8145bc950647d43557fc5ec90e7a93eb680 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 5 Aug 2024 09:09:03 +0200 Subject: [PATCH 095/130] remove unnecessary files --- R/table_linked_to_concept_field.R | 45 ------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 R/table_linked_to_concept_field.R diff --git a/R/table_linked_to_concept_field.R b/R/table_linked_to_concept_field.R deleted file mode 100644 index 21e8ab84..00000000 --- a/R/table_linked_to_concept_field.R +++ /dev/null @@ -1,45 +0,0 @@ -#' @name table_linked_to_concept_field -#' @title Link Table Names to Respective Concept ID Fields -#' -#' @description -#' This script creates a list mapping various table names to their respective -#' concept ID fields. This mapping is useful for dynamically referencing -#' concept IDs across different tables in a database schema, particularly -#' within the context of healthcare data where tables represent different -#' aspects of patient information (e.g., conditions, drug exposures). -#' -#' @details The `links` list object contains key-value pairs where each key is -#' a table name and the corresponding value is the name of the field that -#' contains the concept ID within that table. This object can be used to -#' programmatically access concept ID fields by table name. -#' -#' The following tables and their concept ID fields are included: -#' - `condition_occurrence`: `condition_concept_id` -#' - `death`: `cause_concept_id` -#' - `device_exposure`: `device_concept_id` -#' - `drug_exposure`: `drug_concept_id` -#' - `measurement`: `measurement_concept_id` -#' - `observation`: `observation_concept_id` -#' - `procedure_occurrence`: `procedure_concept_id` -#' - `specimen`: `specimen_concept_id` -#' - `visit_occurrence`: `visit_concept_id` -#' -#' @examples -#' # Access the concept ID field for the condition_occurrence table -#' concept_field <- links$condition_occurrence -#' print(concept_field) -#' -#' @export -links <- list( - condition_occurrence = "condition_concept_id", - death = "cause_concept_id", - device_exposure = "device_concept_id", - drug_exposure = "drug_concept_id", - measurement = "measurement_concept_id", - observation = "observation_concept_id", - procedure_occurrence = "procedure_concept_id", - specimen = "specimen_concept_id", - visit_occurrence = "visit_concept_id" -) - -cat("Sourced links object") \ No newline at end of file From 8e90a4d6f0b8e90f56fd4cdb4b36de1b2d39e0fe Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 5 Aug 2024 12:17:53 +0200 Subject: [PATCH 096/130] minor fix and update for counts save path --- inst/templates/cohortCapr_md.Rmd | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 51e81e60..077036b1 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -86,7 +86,8 @@ source("./R/table_linked_to_concept_field.R") # ) %>% print() labTestsCounts <- countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema + conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts ) %>% print() # Disconnect @@ -173,13 +174,6 @@ ch <- cohort( query = procedure(conceptSets$conceptSets$cardiacComplications) ) ), - withAny( - atLeast( - x = 1, - # include patients who have had cardiac surgery - query = procedure(conceptSets$conceptSets$cardiacSurgery) - ) - ), withAny( atLeast( x = 1, From 6f218bf5ad55e97e43b5422e0b42abef87d64c70 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 5 Aug 2024 12:18:22 +0200 Subject: [PATCH 097/130] update for save option --- R/countOccurrences.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index dbc4a3da..956fd0ed 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -10,6 +10,7 @@ #' @param db_connection A database connection object through which queries will be executed. #' @param cdm_schema The database cdm_schema in which the tables are located. #' @param vocab_schema The database vocab_schema in which the concept tables are located. +#' @param save_path The path to save the results to. If NULL, the results are not saved. #' #' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, #' direct count of records, descendant count of persons, and descendant count of records. @@ -25,7 +26,7 @@ #' db_connection = db_connection, cdm_schema = "public") #' #' @export -countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema) { +countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema, save_path = NULL) { library(DBI) library(dplyr) library(tibble) @@ -79,6 +80,10 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ ungroup() %>% mutate(concept_name = names(v)[match(concept_id, v)]) %>% arrange(desc(count_records + descendant_count_record)) + + if (!is.null(save_path)) { + readr::write_csv(final_res, paste0(save_path, '/', 'count_occurrences.csv')) + } return(final_res) } \ No newline at end of file From b2c1aa3218cc5277d5887a7fbe772095f4dc2b05 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 6 Aug 2024 09:14:55 +0200 Subject: [PATCH 098/130] add links object --- R/table_linked_to_concept_field.R | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 R/table_linked_to_concept_field.R diff --git a/R/table_linked_to_concept_field.R b/R/table_linked_to_concept_field.R new file mode 100644 index 00000000..104140fa --- /dev/null +++ b/R/table_linked_to_concept_field.R @@ -0,0 +1,45 @@ +#' @name table_linked_to_concept_field +#' @title Link Table Names to Respective Concept ID Fields +#' +#' @description +#' This script creates a list mapping various table names to their respective +#' concept ID fields. This mapping is useful for dynamically referencing +#' concept IDs across different tables in a database schema, particularly +#' within the context of healthcare data where tables represent different +#' aspects of patient information (e.g., conditions, drug exposures). +#' +#' @details The `links` list object contains key-value pairs where each key is +#' a table name and the corresponding value is the name of the field that +#' contains the concept ID within that table. This object can be used to +#' programmatically access concept ID fields by table name. +#' +#' The following tables and their concept ID fields are included: +#' - `condition_occurrence`: `condition_concept_id` +#' - `death`: `cause_concept_id` +#' - `device_exposure`: `device_concept_id` +#' - `drug_exposure`: `drug_concept_id` +#' - `measurement`: `measurement_concept_id` +#' - `observation`: `observation_concept_id` +#' - `procedure_occurrence`: `procedure_concept_id` +#' - `specimen`: `specimen_concept_id` +#' - `visit_occurrence`: `visit_concept_id` +#' +#' @examples +#' # Access the concept ID field for the condition_occurrence table +#' concept_field <- links$condition_occurrence +#' print(concept_field) +#' +#' @export +links <- list( + condition_occurrence = "condition_concept_id", + death = "cause_concept_id", + device_exposure = "device_concept_id", + drug_exposure = "drug_concept_id", + measurement = "measurement_concept_id", + observation = "observation_concept_id", + procedure_occurrence = "procedure_concept_id", + specimen = "specimen_concept_id", + visit_occurrence = "visit_concept_id" +) + +cat("Sourced links object") \ No newline at end of file From e47d53201f7000db91b044fdc69a9213aa37804a Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:07:47 +0200 Subject: [PATCH 099/130] update comments countOccurrences --- R/countOccurrences.R | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 956fd0ed..1b5ccfb2 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -43,26 +43,48 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ # Combined SQL query for direct and descendant counts combined_sql <- sprintf( + # WITH clause to define common table expressions (CTEs) "WITH direct_counts AS ( + -- Select the concept_id and count the distinct persons and total records for each concept_id SELECT %s AS concept_id, COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records + -- From the cdm schema and the specified table FROM %s.%s + -- Where the concept_id is in the provided vector WHERE %s IN (%s) + -- Group by the concept_id GROUP BY %s - ), descendant_counts AS ( - SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS descendant_count_person, COUNT(*) AS descendant_count_record + -- Define the second expression for descendants + ), desc_counts AS ( + -- Select the ancestor_concept_id and count the distinct persons and total records for each concept_id + SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS desc_count_person, COUNT(*) AS desc_count_record + -- From the vocab schema and concept ancestor table (vocab schema must contain concept_ancestor table; this can be the same schema as the cdm) FROM %s.%s a + -- Join the concept_ancestor table to get the ancestor_concept_id JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id + -- Where the descendant_concept_id is in the provided vector WHERE b.ancestor_concept_id IN (%s) + -- Group by the ancestor_concept_id GROUP BY b.ancestor_concept_id ) - SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(descendant_count_person, 0) AS descendant_count_person, coalesce(descendant_count_record, 0) AS descendant_count_record + -- Combine the direct and descendant counts into one result set + SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(desc_count_person, 0) AS desc_count_person, coalesce(desc_count_record, 0) AS desc_count_record FROM direct_counts d - FULL OUTER JOIN descendant_counts dc ON d.concept_id = dc.concept_id", + FULL OUTER JOIN desc_counts dc ON d.concept_id = dc.concept_id", concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") ) combined_res <- dbGetQuery(db_connection, combined_sql) + + not_in_data <- v[!(v %in% combined_res$concept_id)] + combined_res <- combined_res |> + bind_rows(tibble( + concept_id = not_in_data, + count_persons = 0, + count_records = 0, + desc_count_person = 0, + desc_count_record = 0 + )) # Append results results[[table]] <- combined_res @@ -74,12 +96,12 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ summarise( count_persons = sum(count_persons), count_records = sum(count_records), - descendant_count_person = sum(descendant_count_person), - descendant_count_record = sum(descendant_count_record) + desc_count_person = sum(desc_count_person), + desc_count_record = sum(desc_count_record) ) %>% ungroup() %>% mutate(concept_name = names(v)[match(concept_id, v)]) %>% - arrange(desc(count_records + descendant_count_record)) + arrange(desc(count_records + desc_count_record)) if (!is.null(save_path)) { readr::write_csv(final_res, paste0(save_path, '/', 'count_occurrences.csv')) From 9ada37acf6874563d29d7972f21468ab37a40155 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:08:00 +0200 Subject: [PATCH 100/130] better countOccurrences example --- inst/templates/cohortCapr_md.Rmd | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 077036b1..fcc9631f 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -79,14 +79,9 @@ source("./R/countOccurrences.R") # Get links between tables and fields as input source("./R/table_linked_to_concept_field.R") -# count occurrences of each concept 'x' and print results; cardiac complications as example -# cardiacComplicationsCounts <- -# countOccurrences( -# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema -# ) %>% print() -labTestsCounts <- +additionalVarsCounts <- countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, + conceptSets$concepts$additional, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, save_path = config_oth$save_path_counts ) %>% print() From 860f88fe0a4b58c9cb5f77f1bc0152079b87d5f2 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:10:15 +0200 Subject: [PATCH 101/130] update tables --- inst/templates/cohortCapr_md.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index fcc9631f..303e387e 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -81,7 +81,7 @@ source("./R/table_linked_to_concept_field.R") additionalVarsCounts <- countOccurrences( - conceptSets$concepts$additional, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, + conceptSets$concepts$additional, c("condition_occurrence", "measurement", "obsre), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, save_path = config_oth$save_path_counts ) %>% print() From ee48fd6fb7caf50da3187acaf0d02b789f17a3c6 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:12:22 +0200 Subject: [PATCH 102/130] typo fix --- inst/templates/cohortCapr_md.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 303e387e..3cbaf120 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -81,7 +81,7 @@ source("./R/table_linked_to_concept_field.R") additionalVarsCounts <- countOccurrences( - conceptSets$concepts$additional, c("condition_occurrence", "measurement", "obsre), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, + conceptSets$concepts$additional, c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, save_path = config_oth$save_path_counts ) %>% print() From d3c43502d6c28a12980a7ac936b498176caf5a40 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:13:36 +0200 Subject: [PATCH 103/130] clean-up --- inst/templates/cohortCapr_md.Rmd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd index 3cbaf120..27eee34a 100644 --- a/inst/templates/cohortCapr_md.Rmd +++ b/inst/templates/cohortCapr_md.Rmd @@ -81,7 +81,12 @@ source("./R/table_linked_to_concept_field.R") additionalVarsCounts <- countOccurrences( - conceptSets$concepts$additional, c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema, + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, save_path = config_oth$save_path_counts ) %>% print() From 33785873c69e62f65c1b1031aa1c41c21047381c Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 09:41:08 +0200 Subject: [PATCH 104/130] markdown pdf --- inst/templates/cohortCapr_template.R | 255 +++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 inst/templates/cohortCapr_template.R diff --git a/inst/templates/cohortCapr_template.R b/inst/templates/cohortCapr_template.R new file mode 100644 index 00000000..407f5519 --- /dev/null +++ b/inst/templates/cohortCapr_template.R @@ -0,0 +1,255 @@ +## ----knitr, include=FALSE----------------------------------------------------- +knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) + +knitr::opts_chunk$set(echo = TRUE) + +knitr::purl( + input = './inst/templates/cohortCapr_md.Rmd', + output = './inst/templates/cohortCapr_template.R' +) + + +## ----Get project configurations----------------------------------------------- +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') + + +## ----Load libraries----------------------------------------------------------- +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + +## ----connect to database, eval=TRUE, include=TRUE----------------------------- +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) + + +## ----concept sets, echo=TRUE-------------------------------------------------- +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) + +# Disconnect +disconnect(con) + + +## ----count occurences--------------------------------------------------------- +## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +additionalVarsCounts <- + countOccurrences( + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts + ) %>% print() + +# Disconnect +disconnect(con) + + +## ----Standard non-standard check---------------------------------------------- +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts +source('./R/isStandard.R') +nonStandard <- isStandard( + db_connection = con, + data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# Print all non-standard concepts +nonStandard + + + +## ----Standard non-standard check concept set---------------------------------- +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS + + +## ----Cohort definition-------------------------------------------------------- +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) + ) + ) + ), + exit = exit( + endStrategy = observationExit() + ) +) + + +## ----json and sql------------------------------------------------------------- +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + Capr::toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) + + +## ----Save cohort and concept set json----------------------------------------- +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") + ) +} + + +## ----Create and generate cohorts---------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cohort", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts + + +## ----Number of people in DB--------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons + +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") + +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") + + +# Disconnect +disconnect(con) + From e72ea42ace61506af9047fa5070198790d8fd2de Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Thu, 8 Aug 2024 13:45:08 +0200 Subject: [PATCH 105/130] update knitted R script --- inst/templates/cohortCapr.R | 56 +++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R index 3d86bede..daae8dd7 100644 --- a/inst/templates/cohortCapr.R +++ b/inst/templates/cohortCapr.R @@ -1,20 +1,20 @@ -## ----knitr, include=FALSE----------------------------------------------------------------- +## ----knitr, include=FALSE----------------------------------------------------- knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) knitr::opts_chunk$set(echo = TRUE) -knitr::purl( - input = './inst/templates/cohortCapr_md.Rmd', - output = './inst/templates/cohortCapr.R' -) +# knitr::purl( +# input = './inst/templates/cohortCapr_md.Rmd', +# output = './inst/templates/cohortCapr.R' +# ) -## ----Get project configurations----------------------------------------------------------- +## ----Get project configurations----------------------------------------------- connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -## ----Load libraries----------------------------------------------------------------------- +## ----Load libraries----------------------------------------------------------- library(RSQLite) library(tibble) library(DatabaseConnector) @@ -23,7 +23,7 @@ library(CirceR) library(Capr) -## ----connect to database, eval=TRUE, include=TRUE----------------------------------------- +## ----connect to database, eval=TRUE, include=TRUE----------------------------- # Use connection details from configuration connectionDetails <- createConnectionDetails( dbms = connectionConfig$dbms, @@ -36,7 +36,7 @@ connectionDetails <- createConnectionDetails( ) -## ----concept sets, echo=TRUE-------------------------------------------------------------- +## ----concept sets, echo=TRUE-------------------------------------------------- ## Concept sets source("./R/conceptSets.R") @@ -53,7 +53,7 @@ conceptSets$conceptSets <- conceptSets$conceptSets %>% disconnect(con) -## ----count occurences--------------------------------------------------------------------- +## ----count occurences--------------------------------------------------------- ## Count occurrences of each concept in data # Establish connection @@ -65,21 +65,22 @@ source("./R/countOccurrences.R") # Get links between tables and fields as input source("./R/table_linked_to_concept_field.R") -# count occurrences of each concept 'x' and print results; cardiac complications as example -# cardiacComplicationsCounts <- -# countOccurrences( -# conceptSets$concepts$cardiacComplications, c("condition_occurrence", "procedure_occurrence"), links, con, connectionConfig$cdm_schema -# ) %>% print() -labTestsCounts <- +additionalVarsCounts <- countOccurrences( - conceptSets$concepts$labTests, c("measurement"), links, con, connectionConfig$cdm_schema, connectionConfig$vocabulary_schema + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts ) %>% print() # Disconnect disconnect(con) -## ----Standard non-standard check---------------------------------------------------------- +## ----Standard non-standard check---------------------------------------------- # Connect to DB con <- connect(connectionDetails) @@ -101,7 +102,7 @@ nonStandard -## ----Standard non-standard check concept set---------------------------------------------- +## ----Standard non-standard check concept set---------------------------------- # connect to DB con <- connect(connectionDetails) @@ -124,7 +125,7 @@ disconnect(con) nonStandardCS -## ----Cohort definition-------------------------------------------------------------------- +## ----Cohort definition-------------------------------------------------------- ## Cohort definition # Create cohort definition ch <- cohort( @@ -148,13 +149,6 @@ ch <- cohort( query = procedure(conceptSets$conceptSets$cardiacComplications) ) ), - withAny( - atLeast( - x = 1, - # include patients who have had cardiac surgery - query = procedure(conceptSets$conceptSets$cardiacSurgery) - ) - ), withAny( atLeast( x = 1, @@ -169,7 +163,7 @@ ch <- cohort( ) -## ----json and sql------------------------------------------------------------------------- +## ----json and sql------------------------------------------------------------- ## Cohort json and sql # Generate json for cohort chJson <- ch %>% @@ -184,7 +178,7 @@ sql <- CirceR::buildCohortQuery( ) -## ----Save cohort and concept set json----------------------------------------------------- +## ----Save cohort and concept set json----------------------------------------- write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) for (cs in names(conceptSets$conceptSets)) { writeConceptSet( @@ -194,7 +188,7 @@ for (cs in names(conceptSets$conceptSets)) { } -## ----Create and generate cohorts---------------------------------------------------------- +## ----Create and generate cohorts---------------------------------------------- # Establish connection con <- connect(connectionDetails) @@ -236,7 +230,7 @@ disconnect(con) cohortCounts -## ----Number of people in DB--------------------------------------------------------------- +## ----Number of people in DB--------------------------------------------------- # Establish connection con <- connect(connectionDetails) From 66cc3fed0091f831802fec202263d80e5a9f870d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 12 Aug 2024 10:30:27 +0200 Subject: [PATCH 106/130] implement feedback --- R/countOccurrences.R | 108 ++++++++++++++++++++++++++++--------------- R/isStandard.R | 71 ++++++++++++++++------------ R/isStandardCS.R | 22 ++++----- 3 files changed, 121 insertions(+), 80 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index dbc4a3da..2428e8fb 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -1,6 +1,6 @@ #' Count Occurrences of Values in Database Tables #' -#' This function counts the occurrences of specified concept ids within specified tables in a OMOP database, +#' This function counts the occurrences of specified concept ids within specified tables in a OMOP database, #' including direct occurrences and occurrences through descendants, based on a provided cdm_schema and links. #' It returns a tibble summarizing the counts across persons and across records. #' @@ -10,75 +10,107 @@ #' @param db_connection A database connection object through which queries will be executed. #' @param cdm_schema The database cdm_schema in which the tables are located. #' @param vocab_schema The database vocab_schema in which the concept tables are located. +#' @param save_path The path to save the results to. If NULL, the results are not saved. #' -#' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, -#' direct count of records, descendant count of persons, and descendant count of records. -#' The tibble also includes the concept names derived from `v` and is arranged by the total +#' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, +#' direct count of records, descendant count of persons, and descendant count of records. +#' The tibble also includes the concept names derived from `v` and is arranged by the total #' record count (direct + descendant). #' #' @examples #' # Assuming `db_connection` is a valid database connection, `cdm_schema` is set to "public", #' # `tables` contains the names of the tables to search, `links` defines the relevant fields, #' # and `v` contains the values to search for: -#' results <- countOccurrences(v = c(1, 2), tables = c("observation", "condition_occurrence"), -#' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), -#' db_connection = db_connection, cdm_schema = "public") +#' results <- countOccurrences( +#' v = c(1, 2), tables = c("observation", "condition_occurrence"), +#' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), +#' db_connection = db_connection, cdm_schema = "public" +#' ) #' #' @export -countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema) { - library(DBI) - library(dplyr) - library(tibble) - +countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema, save_path = NULL) { stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) stopifnot(is.character(cdm_schema)) - + results <- list() - + for (table in tables) { concept_id_field <- links[[table]] - + # Combined SQL query for direct and descendant counts - combined_sql <- sprintf( - "WITH direct_counts AS ( + combined_sql <- SqlRender::render( + sprintf( + # WITH clause to define common table expressions (CTEs) + "WITH direct_counts AS ( + -- Select the concept_id and count the distinct persons and total records for each concept_id SELECT %s AS concept_id, COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records + -- From the cdm schema and the specified table FROM %s.%s + -- Where the concept_id is in the provided vector WHERE %s IN (%s) + -- Group by the concept_id GROUP BY %s - ), descendant_counts AS ( - SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS descendant_count_person, COUNT(*) AS descendant_count_record + -- Define the second expression for descendants + ), desc_counts AS ( + -- Select the ancestor_concept_id and count the distinct persons and total records for each concept_id + SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS desc_count_person, COUNT(*) AS desc_count_record + -- From the vocab schema and concept ancestor table (vocab schema must contain concept_ancestor table; this can be the same schema as the cdm) FROM %s.%s a + -- Join the concept_ancestor table to get the ancestor_concept_id JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id + -- Where the descendant_concept_id is in the provided vector WHERE b.ancestor_concept_id IN (%s) + -- Group by the ancestor_concept_id GROUP BY b.ancestor_concept_id ) - SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(descendant_count_person, 0) AS descendant_count_person, coalesce(descendant_count_record, 0) AS descendant_count_record + -- Combine the direct and descendant counts into one result set + SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(desc_count_person, 0) AS desc_count_person, coalesce(desc_count_record, 0) AS desc_count_record FROM direct_counts d - FULL OUTER JOIN descendant_counts dc ON d.concept_id = dc.concept_id", - concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, - cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") + FULL OUTER JOIN desc_counts dc ON d.concept_id = dc.concept_id", + concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, + cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") + ) + ) + + combined_sql_translated <- SqlRender::translate( + sql = combined_sql, + targetDialect = db_connection@dbms ) - - combined_res <- dbGetQuery(db_connection, combined_sql) - + + combined_res <- dbGetQuery(db_connection, combined_sql_translated) + + not_in_data <- v[!(v %in% combined_res$concept_id)] + combined_res <- combined_res |> + dplyr::bind_rows(tibble::tibble( + concept_id = not_in_data, + count_persons = 0, + count_records = 0, + desc_count_person = 0, + desc_count_record = 0 + )) + # Append results results[[table]] <- combined_res } - + # Combine all results into a single data frame and transform - final_res <- bind_rows(results) %>% - group_by(concept_id) %>% - summarise( + final_res <- dplyr::bind_rows(results) |> + dplyr::group_by(concept_id) |> + dplyr::summarise( count_persons = sum(count_persons), count_records = sum(count_records), - descendant_count_person = sum(descendant_count_person), - descendant_count_record = sum(descendant_count_record) - ) %>% - ungroup() %>% - mutate(concept_name = names(v)[match(concept_id, v)]) %>% - arrange(desc(count_records + descendant_count_record)) - + desc_count_person = sum(desc_count_person), + desc_count_record = sum(desc_count_record) + ) |> + dplyr::ungroup() |> + dplyr::mutate(concept_name = names(v)[match(concept_id, v)]) |> + dplyr::arrange(dplyr::desc(count_records + desc_count_record)) + + if (!is.null(save_path)) { + readr::write_csv(final_res, paste0(save_path, "/", "count_occurrences.csv")) + } + return(final_res) -} \ No newline at end of file +} diff --git a/R/isStandard.R b/R/isStandard.R index 1afa16fc..946123f9 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -7,32 +7,35 @@ #' @param save_path (Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts. #' @param vocab_schema The schema name of the vocabulary database containing the standard concepts table. #' -#' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. +#' @return A tibble containing the columns `CONCEPT_ID`, `CONCEPT_NAME`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. #' -#' @details The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. +#' @details The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `STANDARD_CONCEPT` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. #' #' If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. #' #' @examples #' # Assuming you have a valid DBI connection `db_conn` and your tables are located in "path/to/data_concepts": -#' non_standard_concepts <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") +#' non_STANDARD_CONCEPTs <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") #' #' @importFrom readr read_csv write_csv #' @importFrom dplyr mutate across filter select inner_join -#' @importFrom DBI dbGetQuery +#' @importFrom DatabaseConnector connect disconnect querySql #' @export isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_path = NULL) { - library(readr) - library(dplyr) - library(DBI) - # Read concept table from SQL database - concept_table_query <- paste0( - "SELECT concept_id, concept_name, standard_concept FROM ", vocab_schema, ".concept" - ) - concept_table <- dbGetQuery(db_connection, concept_table_query) %>% - mutate(concept_id = as.character(concept_id)) %>% - mutate(concept_id = tolower(trimws(concept_id))) + concept_table_query <- SqlRender::render( + "SELECT concept_id, CONCEPT_NAME, STANDARD_CONCEPT FROM @vocab_schema.concept", + vocab_schema = vocab_schema + ) + + concept_table_query_translated <- SqlRender::translate( + sql = concept_table_query, + targetDialect = db_connection@dbms + ) + + concept_table <- DatabaseConnector::querySql(db_connection, concept_table_query_translated) |> + dplyr::mutate(CONCEPT_ID = as.character(CONCEPT_ID)) |> + dplyr::mutate(CONCEPT_ID = tolower(trimws(CONCEPT_ID))) # Initialize vectors for non-standard concepts nonStandard <- c() @@ -54,25 +57,33 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat # Read and prepare table tb <- - readr::read_csv(table_path, col_types = cols(sourceCode = col_character(), concept_id = col_character())) %>% - mutate(across(c(sourceCode, concept_id), ~gsub("\u00A0", " ", .))) %>% - mutate(across(c(sourceCode, concept_id), ~trimws(.))) %>% - filter(!is.na(sourceCode), !is.na(concept_id)) %>% - mutate(concept_id = tolower(concept_id), - concept_id = as.character(concept_id)) %>% - select(sourceCode, concept_id) + readr::read_csv(table_path, col_types = readr::cols( + sourceCode = readr::col_character(), + concept_id = readr::col_character() + )) |> + dplyr::rename(CONCEPT_ID = concept_id) |> + dplyr::mutate(across(c(sourceCode, CONCEPT_ID), ~ gsub("\u00A0", " ", .))) |> + dplyr::mutate(dplyr::across(c(sourceCode, CONCEPT_ID), ~ trimws(.))) |> + dplyr::filter(!is.na(sourceCode), !is.na(CONCEPT_ID)) |> + dplyr::mutate( + CONCEPT_ID = tolower(CONCEPT_ID), + CONCEPT_ID = as.character(CONCEPT_ID) + ) |> + dplyr::select(sourceCode, CONCEPT_ID) # Join tables - joined <- inner_join(concept_table, tb, by = "concept_id") + joined <- dplyr::inner_join(concept_table, tb, by = "CONCEPT_ID") # Add non-standard concept info to vectors - ind <- which(!(joined$standard_concept %in% c('S'))) - nonStandard <- append(nonStandard, joined$concept_id[ind]) - conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) + ind <- which(!(joined$STANDARD_CONCEPT %in% c("S"))) + nonStandard <- append(nonStandard, joined$CONCEPT_ID[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$CONCEPT_NAME[ind]) sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) - sourceTableNonStandard <- append(sourceTableNonStandard, - replicate(length(ind), table_name, simplify="vector")) - standardness <- append(standardness, joined$standard_concept[ind]) + sourceTableNonStandard <- append( + sourceTableNonStandard, + replicate(length(ind), table_name, simplify = "vector") + ) + standardness <- append(standardness, joined$STANDARD_CONCEPT[ind]) if (length(ind) == 0) { message("No non-standard concepts found in list of concepts: ", table_name) @@ -90,13 +101,13 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat message(paste("No matches found for concept set.\n")) } } - + # NA == non-standard standardness[is.na(standardness)] <- "Non-standard" # Create table of non-standard concepts res <- tibble::tibble( concept_id = nonStandard, - concept_name = conceptNameNonStandard, + CONCEPT_NAME = conceptNameNonStandard, source_code = sourceCodeNonStandard, source_table = unlist(sourceTableNonStandard), standardness = standardness diff --git a/R/isStandardCS.R b/R/isStandardCS.R index 322109f9..0a085c84 100644 --- a/R/isStandardCS.R +++ b/R/isStandardCS.R @@ -16,10 +16,6 @@ #' #' @export isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { - library(readr) - library(dplyr) - library(DBI) - # Initialize vectors for non-standard concepts nonStandard <- c() conceptNameNonStandard <- c() @@ -31,10 +27,10 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { cs <- conceptSet@Expression # initialize vectors - concept_name = c() - concept_id = c() - concept_set = c() - standardness = c() + concept_name <- c() + concept_id <- c() + concept_set <- c() + standardness <- c() for (concept in cs) { concept_name <- append(concept_name, concept@Concept@concept_name) @@ -43,7 +39,7 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { } cs_name <- conceptSet@Name concept_set <- rep.int(cs_name, length(concept_id)) - + # Replace NAs with non-standard standardness[is.na(standardness)] <- "Non-standard" @@ -58,16 +54,18 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { # Save if not empty and save_path is provided if (!is.null(save_path) && nrow(df) > 0) { message(paste0("saving file: CONCEPTSET_", cs_name)) - write_csv(df, paste0(save_path, "/CONCEPTSET_", cs_name, ".csv")) + readr::write_csv(df, paste0(save_path, "/CONCEPTSET_", cs_name, ".csv")) } else if (is.null(save_path)) { message("No save path specified; returning non-standard concepts\n") } else { - message(paste0("No matches found for concept set: ", table_name, "\n")) + message(paste0("No matches found for concept set: ", cs_name, "\n")) } # NonStandard concepts - res <- df %>% filter(standardness != "S" | is.na(standardness)) %>% tibble::tibble() + res <- df |> + dplyr::filter(!(standardness %in% c("S", "C")) | is.na(standardness)) |> + tibble::tibble() if (nrow(res) == 0) { message("No non-standard concepts found in concept set: ", cs_name) } else { From cbcadeaf75dec031cfa40387c03fcb131303fa71 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 12 Aug 2024 10:38:21 +0200 Subject: [PATCH 107/130] add files temporarily for fork sync --- inst/templates/cohortCapr.R | 253 ++++++++++++++++++++++++++++ inst/templates/cohortCapr_md.Rmd | 281 +++++++++++++++++++++++++++++++ 2 files changed, 534 insertions(+) create mode 100644 inst/templates/cohortCapr.R create mode 100644 inst/templates/cohortCapr_md.Rmd diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R new file mode 100644 index 00000000..0ad99fb5 --- /dev/null +++ b/inst/templates/cohortCapr.R @@ -0,0 +1,253 @@ +## ----knitr, include=FALSE, echo=FALSE, eval=FALSE----------------------------- +## knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) +## +## knitr::purl( +## input = './inst/templates/cohortCapr_md.Rmd', +## output = './inst/templates/cohortCapr.R' +## ) + + +## ----Get project configurations----------------------------------------------- +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') + + +## ----Load libraries----------------------------------------------------------- +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + +## ----connect to database, eval=TRUE, include=TRUE----------------------------- +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) + + +## ----concept sets, echo=TRUE-------------------------------------------------- +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) + +# Disconnect +disconnect(con) + + +## ----count occurences--------------------------------------------------------- +## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +additionalVarsCounts <- + countOccurrences( + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts + ) %>% print() + +# Disconnect +disconnect(con) + + +## ----Standard non-standard check---------------------------------------------- +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts +source('./R/isStandard.R') +nonStandard <- isStandard( + db_connection = con, + data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# Print all non-standard concepts +nonStandard + + + +## ----Standard non-standard check concept set---------------------------------- +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS + + +## ----Cohort definition-------------------------------------------------------- +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) + ) + ) + ), + exit = exit( + endStrategy = observationExit() + ) +) + + +## ----json and sql------------------------------------------------------------- +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + Capr::toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) + + +## ----Save cohort and concept set json----------------------------------------- +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") + ) +} + + +## ----Create and generate cohorts---------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cohort", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts + + +## ----Number of people in DB--------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons + +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") + +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") + + +# Disconnect +disconnect(con) + diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd new file mode 100644 index 00000000..28b7c8fa --- /dev/null +++ b/inst/templates/cohortCapr_md.Rmd @@ -0,0 +1,281 @@ +--- +title: "cohortCapr markdown" +author: "Guus @TheHyve" +date: "2024-07-17" +output: pdf_document +--- +## Set-up knitr +```{r knitr, include=FALSE, echo=FALSE, eval=FALSE} +knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) + +knitr::purl( + input = './inst/templates/cohortCapr_md.Rmd', + output = './inst/templates/cohortCapr.R' +) +``` + +## Set-up config +```{r Get project configurations} +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') +``` + +## Load libraries +```{r Load libraries} +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) +``` + +## Connect to DB +```{r connect to database, eval=TRUE, include=TRUE} +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) +``` + +## Concept sets +Define a measurement concept set using Capr and include all descendants +```{r concept sets, echo=TRUE} +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) + +# Disconnect +disconnect(con) +``` + +## Concept counts +Retrieve counts for a concept set +```{r count occurences} +## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +additionalVarsCounts <- + countOccurrences( + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts + ) %>% print() + +# Disconnect +disconnect(con) +``` + +## Standard and non-standard concepts given a list of concept IDs +To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function +can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. +See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. +```{r Standard non-standard check} +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts +source('./R/isStandard.R') +nonStandard <- isStandard( + db_connection = con, + data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# Print all non-standard concepts +nonStandard + +``` + +## Standard and non-standard concepts given a concept set +Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. +```{r Standard non-standard check concept set} +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS +``` + + +## Initial event cohort +People having any of the following: +any of the lab test measurements +limit to first/earliest occurrence of any of the above measurements (+descendants) per person +```{r Cohort definition} +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) + ) + ) + ), + exit = exit( + endStrategy = observationExit() + ) +) +``` + +## Write json expressions and sql queries +```{r json and sql} +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + Capr::toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) +``` + +Save the cohort and concept set jsons; these can be imported into ATLAS +```{r Save cohort and concept set json} +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") + ) +} +``` + +```{r Create and generate cohorts} +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cohort", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts +``` + +## Number of people in db +```{r Number of people in DB} +# Establish connection +con <- connect(connectionDetails) + +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons + +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") + +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") + + +# Disconnect +disconnect(con) +``` From 7bb20feb55858a07f918262cd9ea4c2001dba7bb Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 12 Aug 2024 10:39:12 +0200 Subject: [PATCH 108/130] delete temp files --- inst/templates/cohortCapr.R | 253 ---------------------------- inst/templates/cohortCapr_md.Rmd | 281 ------------------------------- 2 files changed, 534 deletions(-) delete mode 100644 inst/templates/cohortCapr.R delete mode 100644 inst/templates/cohortCapr_md.Rmd diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R deleted file mode 100644 index 0ad99fb5..00000000 --- a/inst/templates/cohortCapr.R +++ /dev/null @@ -1,253 +0,0 @@ -## ----knitr, include=FALSE, echo=FALSE, eval=FALSE----------------------------- -## knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) -## -## knitr::purl( -## input = './inst/templates/cohortCapr_md.Rmd', -## output = './inst/templates/cohortCapr.R' -## ) - - -## ----Get project configurations----------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') - - -## ----Load libraries----------------------------------------------------------- -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connect to database, eval=TRUE, include=TRUE----------------------------- -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) - - -## ----concept sets, echo=TRUE-------------------------------------------------- -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) - - -## ----count occurences--------------------------------------------------------- -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) - - -## ----Standard non-standard check---------------------------------------------- -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - - - -## ----Standard non-standard check concept set---------------------------------- -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS - - -## ----Cohort definition-------------------------------------------------------- -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) - - -## ----json and sql------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json----------------------------------------- -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts---------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----Number of people in DB--------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) - diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd deleted file mode 100644 index 28b7c8fa..00000000 --- a/inst/templates/cohortCapr_md.Rmd +++ /dev/null @@ -1,281 +0,0 @@ ---- -title: "cohortCapr markdown" -author: "Guus @TheHyve" -date: "2024-07-17" -output: pdf_document ---- -## Set-up knitr -```{r knitr, include=FALSE, echo=FALSE, eval=FALSE} -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::purl( - input = './inst/templates/cohortCapr_md.Rmd', - output = './inst/templates/cohortCapr.R' -) -``` - -## Set-up config -```{r Get project configurations} -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -``` - -## Load libraries -```{r Load libraries} -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) -``` - -## Connect to DB -```{r connect to database, eval=TRUE, include=TRUE} -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) -``` - -## Concept sets -Define a measurement concept set using Capr and include all descendants -```{r concept sets, echo=TRUE} -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) -``` - -## Concept counts -Retrieve counts for a concept set -```{r count occurences} -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) -``` - -## Standard and non-standard concepts given a list of concept IDs -To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function -can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. -See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. -```{r Standard non-standard check} -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - -``` - -## Standard and non-standard concepts given a concept set -Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. -```{r Standard non-standard check concept set} -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS -``` - - -## Initial event cohort -People having any of the following: -any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) -``` - -## Write json expressions and sql queries -```{r json and sql} -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) -``` - -Save the cohort and concept set jsons; these can be imported into ATLAS -```{r Save cohort and concept set json} -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} -``` - -```{r Create and generate cohorts} -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts -``` - -## Number of people in db -```{r Number of people in DB} -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) -``` From 4b7c81bcde71502f232d31fd032d08e7da825e3f Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 12 Aug 2024 10:41:24 +0200 Subject: [PATCH 109/130] temporarily add files for fork sync --- inst/templates/cohortCapr.R | 253 ++++++++++++++++++++++++++++ inst/templates/cohortCapr_md.Rmd | 281 +++++++++++++++++++++++++++++++ 2 files changed, 534 insertions(+) create mode 100644 inst/templates/cohortCapr.R create mode 100644 inst/templates/cohortCapr_md.Rmd diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R new file mode 100644 index 00000000..0ad99fb5 --- /dev/null +++ b/inst/templates/cohortCapr.R @@ -0,0 +1,253 @@ +## ----knitr, include=FALSE, echo=FALSE, eval=FALSE----------------------------- +## knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) +## +## knitr::purl( +## input = './inst/templates/cohortCapr_md.Rmd', +## output = './inst/templates/cohortCapr.R' +## ) + + +## ----Get project configurations----------------------------------------------- +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') + + +## ----Load libraries----------------------------------------------------------- +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) + + +## ----connect to database, eval=TRUE, include=TRUE----------------------------- +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) + + +## ----concept sets, echo=TRUE-------------------------------------------------- +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) + +# Disconnect +disconnect(con) + + +## ----count occurences--------------------------------------------------------- +## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +additionalVarsCounts <- + countOccurrences( + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts + ) %>% print() + +# Disconnect +disconnect(con) + + +## ----Standard non-standard check---------------------------------------------- +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts +source('./R/isStandard.R') +nonStandard <- isStandard( + db_connection = con, + data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# Print all non-standard concepts +nonStandard + + + +## ----Standard non-standard check concept set---------------------------------- +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS + + +## ----Cohort definition-------------------------------------------------------- +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) + ) + ) + ), + exit = exit( + endStrategy = observationExit() + ) +) + + +## ----json and sql------------------------------------------------------------- +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + Capr::toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) + + +## ----Save cohort and concept set json----------------------------------------- +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") + ) +} + + +## ----Create and generate cohorts---------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cohort", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts + + +## ----Number of people in DB--------------------------------------------------- +# Establish connection +con <- connect(connectionDetails) + +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons + +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") + +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") + + +# Disconnect +disconnect(con) + diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd new file mode 100644 index 00000000..28b7c8fa --- /dev/null +++ b/inst/templates/cohortCapr_md.Rmd @@ -0,0 +1,281 @@ +--- +title: "cohortCapr markdown" +author: "Guus @TheHyve" +date: "2024-07-17" +output: pdf_document +--- +## Set-up knitr +```{r knitr, include=FALSE, echo=FALSE, eval=FALSE} +knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) + +knitr::purl( + input = './inst/templates/cohortCapr_md.Rmd', + output = './inst/templates/cohortCapr.R' +) +``` + +## Set-up config +```{r Get project configurations} +connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') +config_oth <- config::get(config = 'config', file = './inst/config/config.yml') +``` + +## Load libraries +```{r Load libraries} +library(RSQLite) +library(tibble) +library(DatabaseConnector) +library(CohortGenerator) +library(CirceR) +library(Capr) +``` + +## Connect to DB +```{r connect to database, eval=TRUE, include=TRUE} +# Use connection details from configuration +connectionDetails <- createConnectionDetails( + dbms = connectionConfig$dbms, + user = connectionConfig$user, + password = connectionConfig$password, + server = connectionConfig$server, + port = connectionConfig$port, + oracleDriver = connectionConfig$oracleDriver, + pathToDriver = connectionConfig$pathToDriver +) +``` + +## Concept sets +Define a measurement concept set using Capr and include all descendants +```{r concept sets, echo=TRUE} +## Concept sets +source("./R/conceptSets.R") + +# Establish connection +con <- connect(connectionDetails) + +conceptSets$conceptSets <- conceptSets$conceptSets %>% + # Add details for all concepts (excl. descendants) + lapply(FUN = getConceptSetDetails, + con = con, + vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) + +# Disconnect +disconnect(con) +``` + +## Concept counts +Retrieve counts for a concept set +```{r count occurences} +## Count occurrences of each concept in data + +# Establish connection +con <- connect(connectionDetails) + +# Get countOccurrences function +source("./R/countOccurrences.R") + +# Get links between tables and fields as input +source("./R/table_linked_to_concept_field.R") + +additionalVarsCounts <- + countOccurrences( + conceptSets$concepts$additional, + c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), + links, + con, + connectionConfig$cdm_schema, + connectionConfig$vocabulary_schema, + save_path = config_oth$save_path_counts + ) %>% print() + +# Disconnect +disconnect(con) +``` + +## Standard and non-standard concepts given a list of concept IDs +To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function +can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. +See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. +```{r Standard non-standard check} +# Connect to DB +con <- connect(connectionDetails) + +# Return table of non-standard concepts +source('./R/isStandard.R') +nonStandard <- isStandard( + db_connection = con, + data_concepts_path = config_oth$concepts_path, + vocab_schema = connectionConfig$vocabulary_schema, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# Print all non-standard concepts +nonStandard + +``` + +## Standard and non-standard concepts given a concept set +Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. +```{r Standard non-standard check concept set} +# connect to DB +con <- connect(connectionDetails) + +# run for labTests conceptSet +labTests <- conceptSets$conceptSets$labTests + +# check standardness across concept set +source('./R/isStandardCS.R') +nonStandardCS <- isStandardCS( + db_connection = con, + conceptSet = conceptSets$conceptSets$labTests, + # (optional) Save the results (with standard and non-standard concepts) + save_path = config_oth$save_path_isStandard +) + +# Disconnect +disconnect(con) + +# print results (non-standard) +nonStandardCS +``` + + +## Initial event cohort +People having any of the following: +any of the lab test measurements +limit to first/earliest occurrence of any of the above measurements (+descendants) per person +```{r Cohort definition} +## Cohort definition +# Create cohort definition +ch <- cohort( + entry = entry( + # enter patients who have had cardiac surgery + procedure(conceptSets$conceptSets$cardiacSurgery), + observationWindow = continuousObservation(0, 0), + primaryCriteriaLimit = "All" + ), + attrition = attrition( + withAny( + # include all cardiac complications + atLeast( + x = 1, + # include all cardiac complications represented by condition concepts + query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) + ), + atLeast( + x = 1, + # include all cardiac complications represented by procedure concepts + query = procedure(conceptSets$conceptSets$cardiacComplications) + ) + ), + withAny( + atLeast( + x = 1, + # include patients who have had laboratory measurements + query = measurement(conceptSets$conceptSets$labTests) + ) + ) + ), + exit = exit( + endStrategy = observationExit() + ) +) +``` + +## Write json expressions and sql queries +```{r json and sql} +## Cohort json and sql +# Generate json for cohort +chJson <- ch %>% + Capr::toCirce() %>% + jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% + as.character() + +# Generate cohort sql query +sql <- CirceR::buildCohortQuery( + expression = CirceR::cohortExpressionFromJson(chJson), + options = CirceR::createGenerateOptions(generateStats = FALSE) +) +``` + +Save the cohort and concept set jsons; these can be imported into ATLAS +```{r Save cohort and concept set json} +write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) +for (cs in names(conceptSets$conceptSets)) { + writeConceptSet( + x = conceptSets$conceptSets[[cs]], + path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") + ) +} +``` + +```{r Create and generate cohorts} +# Establish connection +con <- connect(connectionDetails) + +# Cohorts to create +cohortsToCreate <- tibble::tibble( + cohortId = 9876, + cohortName = "cohort", + sql = sql +) + +# Cohort tables +cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") +CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, +) + +# Generate the cohorts +cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = "cdm", + cohortDatabaseSchema = "cohort", + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate +) + +# Get cohort counts +cohortCounts <- CohortGenerator::getCohortCounts( + connectionDetails = connectionDetails, + cohortDatabaseSchema = "cohort", + cohortTable = cohortTableNames$cohortTable +) + +# Disconnect +disconnect(con) + + +cohortCounts +``` + +## Number of people in db +```{r Number of people in DB} +# Establish connection +con <- connect(connectionDetails) + +# Count unique person_id in the person table +query_person <- + paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") +result_person <- dbGetQuery(con, query_person)$num_persons + +# Count unique subject_id in the cardiac_arrest table +query_cohort <- + paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") + +result_cohort <- dbGetQuery(con, query_cohort)$num_persons + +# Print results +cat("Number of persons in dataset: ", result_person, "\n") +cat("Number of persons in cohort: ", result_cohort, "\n") + + +# Disconnect +disconnect(con) +``` From 8a884d8e67d7deb91d3ce1a88a9df3ec13277e88 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 12 Aug 2024 10:45:08 +0200 Subject: [PATCH 110/130] delete temp files --- inst/templates/cohortCapr.R | 508 ------------------------ inst/templates/cohortCapr_md.Rmd | 565 --------------------------- inst/templates/cohortCapr_template.R | 255 ------------ 3 files changed, 1328 deletions(-) delete mode 100644 inst/templates/cohortCapr.R delete mode 100644 inst/templates/cohortCapr_md.Rmd delete mode 100644 inst/templates/cohortCapr_template.R diff --git a/inst/templates/cohortCapr.R b/inst/templates/cohortCapr.R deleted file mode 100644 index b67cd9b3..00000000 --- a/inst/templates/cohortCapr.R +++ /dev/null @@ -1,508 +0,0 @@ -## ----knitr, include=FALSE----------------------------------------------------- -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::opts_chunk$set(echo = TRUE) - -# knitr::purl( -# input = './inst/templates/cohortCapr_md.Rmd', -# output = './inst/templates/cohortCapr.R' -# ) - - -## ----Get project configurations----------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') - - -## ----Load libraries----------------------------------------------------------- -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connect to database, eval=TRUE, include=TRUE----------------------------- -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) - - -## ----concept sets, echo=TRUE-------------------------------------------------- -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) - - -## ----count occurences--------------------------------------------------------- -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) - - -## ----Standard non-standard check---------------------------------------------- -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - - - -## ----Standard non-standard check concept set---------------------------------- -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS - - -## ----Cohort definition-------------------------------------------------------- -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) - - -## ----json and sql------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json----------------------------------------- -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts---------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----Number of people in DB--------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) - -======= -## ----knitr, include=FALSE, echo=FALSE, eval=FALSE----------------------------- -## knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) -## -## knitr::purl( -## input = './inst/templates/cohortCapr_md.Rmd', -## output = './inst/templates/cohortCapr.R' -## ) - - -## ----Get project configurations----------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') - - -## ----Load libraries----------------------------------------------------------- -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connect to database, eval=TRUE, include=TRUE----------------------------- -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) - - -## ----concept sets, echo=TRUE-------------------------------------------------- -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) - - -## ----count occurences--------------------------------------------------------- -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) - - -## ----Standard non-standard check---------------------------------------------- -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - - - -## ----Standard non-standard check concept set---------------------------------- -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS - - -## ----Cohort definition-------------------------------------------------------- -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) - - -## ----json and sql------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json----------------------------------------- -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts---------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----Number of people in DB--------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) diff --git a/inst/templates/cohortCapr_md.Rmd b/inst/templates/cohortCapr_md.Rmd deleted file mode 100644 index de9dbef4..00000000 --- a/inst/templates/cohortCapr_md.Rmd +++ /dev/null @@ -1,565 +0,0 @@ ---- -title: "cohortCapr markdown" -author: "Guus @TheHyve" -date: "2024-07-17" -output: pdf_document ---- -## Set-up knitr -```{r knitr, include=FALSE} -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::opts_chunk$set(echo = TRUE) - -# knitr::purl( -# input = './inst/templates/cohortCapr_md.Rmd', -# output = './inst/templates/cohortCapr.R' -# ) -``` - -## Set-up config -```{r Get project configurations} -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -``` - -## Load libraries -```{r Load libraries} -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) -``` - -## Connect to DB -```{r connect to database, eval=TRUE, include=TRUE} -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) -``` - -## Concept sets -Define a measurement concept set using Capr and include all descendants -```{r concept sets, echo=TRUE} -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) -``` - -## Concept counts -Retrieve counts for a concept set -```{r count occurences} -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) -``` - -## Standard and non-standard concepts given a list of concept IDs -To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function -can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. -See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. -```{r Standard non-standard check} -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - -``` - -## Standard and non-standard concepts given a concept set -Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. -```{r Standard non-standard check concept set} -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS -``` - - -## Initial event cohort -People having any of the following: -any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) -``` - -## Write json expressions and sql queries -```{r json and sql} -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) -``` - -Save the cohort and concept set jsons; these can be imported into ATLAS -```{r Save cohort and concept set json} -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} -``` - -```{r Create and generate cohorts} -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts -``` - -## Number of people in db -```{r Number of people in DB} -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) -``` -======= ---- -title: "cohortCapr markdown" -author: "Guus @TheHyve" -date: "2024-07-17" -output: pdf_document ---- -## Set-up knitr -```{r knitr, include=FALSE, echo=FALSE, eval=FALSE} -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::purl( - input = './inst/templates/cohortCapr_md.Rmd', - output = './inst/templates/cohortCapr.R' -) -``` - -## Set-up config -```{r Get project configurations} -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') -``` - -## Load libraries -```{r Load libraries} -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) -``` - -## Connect to DB -```{r connect to database, eval=TRUE, include=TRUE} -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) -``` - -## Concept sets -Define a measurement concept set using Capr and include all descendants -```{r concept sets, echo=TRUE} -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) -``` - -## Concept counts -Retrieve counts for a concept set -```{r count occurences} -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) -``` - -## Standard and non-standard concepts given a list of concept IDs -To check for each concept in a list of concept_ids and source codes, the "isStandard.R" function -can be used. This takes as input a list of concept_ids and source codes and returns a table of non-standard concepts. -See inst/extdata/phems-variable-list for examples of CSVs tables in the expected format. -```{r Standard non-standard check} -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - -``` - -## Standard and non-standard concepts given a concept set -Similarly to isStandard(), isStandardCS() can be used to check the standardness of concepts, but rather given a concept set than a list. -```{r Standard non-standard check concept set} -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS -``` - - -## Initial event cohort -People having any of the following: -any of the lab test measurements -limit to first/earliest occurrence of any of the above measurements (+descendants) per person -```{r Cohort definition} -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) -``` - -## Write json expressions and sql queries -```{r json and sql} -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) -``` - -Save the cohort and concept set jsons; these can be imported into ATLAS -```{r Save cohort and concept set json} -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} -``` - -```{r Create and generate cohorts} -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts -``` - -## Number of people in db -```{r Number of people in DB} -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) -``` diff --git a/inst/templates/cohortCapr_template.R b/inst/templates/cohortCapr_template.R deleted file mode 100644 index 407f5519..00000000 --- a/inst/templates/cohortCapr_template.R +++ /dev/null @@ -1,255 +0,0 @@ -## ----knitr, include=FALSE----------------------------------------------------- -knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) - -knitr::opts_chunk$set(echo = TRUE) - -knitr::purl( - input = './inst/templates/cohortCapr_md.Rmd', - output = './inst/templates/cohortCapr_template.R' -) - - -## ----Get project configurations----------------------------------------------- -connectionConfig <- config::get(config = 'config', file = './inst/config/connection_config.yml') -config_oth <- config::get(config = 'config', file = './inst/config/config.yml') - - -## ----Load libraries----------------------------------------------------------- -library(RSQLite) -library(tibble) -library(DatabaseConnector) -library(CohortGenerator) -library(CirceR) -library(Capr) - - -## ----connect to database, eval=TRUE, include=TRUE----------------------------- -# Use connection details from configuration -connectionDetails <- createConnectionDetails( - dbms = connectionConfig$dbms, - user = connectionConfig$user, - password = connectionConfig$password, - server = connectionConfig$server, - port = connectionConfig$port, - oracleDriver = connectionConfig$oracleDriver, - pathToDriver = connectionConfig$pathToDriver -) - - -## ----concept sets, echo=TRUE-------------------------------------------------- -## Concept sets -source("./R/conceptSets.R") - -# Establish connection -con <- connect(connectionDetails) - -conceptSets$conceptSets <- conceptSets$conceptSets %>% - # Add details for all concepts (excl. descendants) - lapply(FUN = getConceptSetDetails, - con = con, - vocabularyDatabaseSchema = connectionConfig$vocabulary_schema) - -# Disconnect -disconnect(con) - - -## ----count occurences--------------------------------------------------------- -## Count occurrences of each concept in data - -# Establish connection -con <- connect(connectionDetails) - -# Get countOccurrences function -source("./R/countOccurrences.R") - -# Get links between tables and fields as input -source("./R/table_linked_to_concept_field.R") - -additionalVarsCounts <- - countOccurrences( - conceptSets$concepts$additional, - c("condition_occurrence", "procedure_occurrence", "measurement", "observation"), - links, - con, - connectionConfig$cdm_schema, - connectionConfig$vocabulary_schema, - save_path = config_oth$save_path_counts - ) %>% print() - -# Disconnect -disconnect(con) - - -## ----Standard non-standard check---------------------------------------------- -# Connect to DB -con <- connect(connectionDetails) - -# Return table of non-standard concepts -source('./R/isStandard.R') -nonStandard <- isStandard( - db_connection = con, - data_concepts_path = config_oth$concepts_path, - vocab_schema = connectionConfig$vocabulary_schema, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# Print all non-standard concepts -nonStandard - - - -## ----Standard non-standard check concept set---------------------------------- -# connect to DB -con <- connect(connectionDetails) - -# run for labTests conceptSet -labTests <- conceptSets$conceptSets$labTests - -# check standardness across concept set -source('./R/isStandardCS.R') -nonStandardCS <- isStandardCS( - db_connection = con, - conceptSet = conceptSets$conceptSets$labTests, - # (optional) Save the results (with standard and non-standard concepts) - save_path = config_oth$save_path_isStandard -) - -# Disconnect -disconnect(con) - -# print results (non-standard) -nonStandardCS - - -## ----Cohort definition-------------------------------------------------------- -## Cohort definition -# Create cohort definition -ch <- cohort( - entry = entry( - # enter patients who have had cardiac surgery - procedure(conceptSets$conceptSets$cardiacSurgery), - observationWindow = continuousObservation(0, 0), - primaryCriteriaLimit = "All" - ), - attrition = attrition( - withAny( - # include all cardiac complications - atLeast( - x = 1, - # include all cardiac complications represented by condition concepts - query = conditionOccurrence(conceptSets$conceptSets$cardiacComplications) - ), - atLeast( - x = 1, - # include all cardiac complications represented by procedure concepts - query = procedure(conceptSets$conceptSets$cardiacComplications) - ) - ), - withAny( - atLeast( - x = 1, - # include patients who have had laboratory measurements - query = measurement(conceptSets$conceptSets$labTests) - ) - ) - ), - exit = exit( - endStrategy = observationExit() - ) -) - - -## ----json and sql------------------------------------------------------------- -## Cohort json and sql -# Generate json for cohort -chJson <- ch %>% - Capr::toCirce() %>% - jsonlite::toJSON(pretty = TRUE, auto_unbox = TRUE) %>% - as.character() - -# Generate cohort sql query -sql <- CirceR::buildCohortQuery( - expression = CirceR::cohortExpressionFromJson(chJson), - options = CirceR::createGenerateOptions(generateStats = FALSE) -) - - -## ----Save cohort and concept set json----------------------------------------- -write(chJson, paste0(config_oth$save_path_json, "/cohort.json")) -for (cs in names(conceptSets$conceptSets)) { - writeConceptSet( - x = conceptSets$conceptSets[[cs]], - path = paste(config_oth$save_path_json, "/", cs, "_cs.json", sep="") - ) -} - - -## ----Create and generate cohorts---------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Cohorts to create -cohortsToCreate <- tibble::tibble( - cohortId = 9876, - cohortName = "cohort", - sql = sql -) - -# Cohort tables -cohortTableNames <- CohortGenerator::getCohortTableNames(cohortTable = "cohort") -CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, -) - -# Generate the cohorts -cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = "cdm", - cohortDatabaseSchema = "cohort", - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate -) - -# Get cohort counts -cohortCounts <- CohortGenerator::getCohortCounts( - connectionDetails = connectionDetails, - cohortDatabaseSchema = "cohort", - cohortTable = cohortTableNames$cohortTable -) - -# Disconnect -disconnect(con) - - -cohortCounts - - -## ----Number of people in DB--------------------------------------------------- -# Establish connection -con <- connect(connectionDetails) - -# Count unique person_id in the person table -query_person <- - paste0("SELECT COUNT(DISTINCT person_id) AS num_persons FROM ", connectionConfig$cdm_schema, ".person") -result_person <- dbGetQuery(con, query_person)$num_persons - -# Count unique subject_id in the cardiac_arrest table -query_cohort <- - paste0("SELECT COUNT(DISTINCT subject_id) AS num_persons FROM ", connectionConfig$cohort_schema, ".cohort") - -result_cohort <- dbGetQuery(con, query_cohort)$num_persons - -# Print results -cat("Number of persons in dataset: ", result_person, "\n") -cat("Number of persons in cohort: ", result_cohort, "\n") - - -# Disconnect -disconnect(con) - From 01813914f2ba0d44add2ae6759cb44b99f4189c7 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 13 Aug 2024 16:03:15 +0200 Subject: [PATCH 111/130] update functions --- R/countOccurrences.R | 12 +++------ R/isStandard.R | 60 ++++++++++++++++++++++---------------------- R/isStandardCS.R | 14 +++++------ 3 files changed, 41 insertions(+), 45 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 4ef5066f..47d2a51d 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -29,10 +29,6 @@ #' #' @export countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema, save_path = NULL) { - library(DBI) - library(dplyr) - library(tibble) - stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) @@ -75,15 +71,15 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") ) - ) combined_sql_translated <- SqlRender::translate( sql = combined_sql, - targetDialect = db_connection@dbms + targetDialect = attr(db_connection, "dbms") ) - combined_res <- dbGetQuery(db_connection, combined_sql_translated) - + combined_res <- DatabaseConnector::querySql(db_connection, combined_sql_translated) |> + dplyr::rename(concept_id = CONCEPT_ID, count_persons = COUNT_PERSONS, count_records = COUNT_RECORDS, + desc_count_person = DESC_COUNT_PERSON, desc_count_record = DESC_COUNT_RECORD) not_in_data <- v[!(v %in% combined_res$concept_id)] combined_res <- combined_res |> dplyr::bind_rows(tibble::tibble( diff --git a/R/isStandard.R b/R/isStandard.R index 946123f9..48aa6e79 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -7,15 +7,15 @@ #' @param save_path (Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts. #' @param vocab_schema The schema name of the vocabulary database containing the standard concepts table. #' -#' @return A tibble containing the columns `CONCEPT_ID`, `CONCEPT_NAME`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. +#' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, which represent the concept ID, concept name, source code, and source table name for each non-standard concept found. #' -#' @details The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `STANDARD_CONCEPT` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. +#' @details The function first queries the `cdm.concept` table from the provided SQL database to retrieve the standard concepts. It then reads each CSV file in the specified directory, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column not being 'S' or 'C'. Information about these non-standard concepts is collected and returned as a tibble. #' #' If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. #' #' @examples #' # Assuming you have a valid DBI connection `db_conn` and your tables are located in "path/to/data_concepts": -#' non_STANDARD_CONCEPTs <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") +#' non_standard_concepts <- isStandard(db_conn, "path/to/data_concepts", "path/to/save_non_standard/") #' #' @importFrom readr read_csv write_csv #' @importFrom dplyr mutate across filter select inner_join @@ -24,25 +24,26 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_path = NULL) { # Read concept table from SQL database concept_table_query <- SqlRender::render( - "SELECT concept_id, CONCEPT_NAME, STANDARD_CONCEPT FROM @vocab_schema.concept", + "SELECT concept_id, CONCEPT_NAME, standard_concept FROM @vocab_schema.concept", vocab_schema = vocab_schema ) concept_table_query_translated <- SqlRender::translate( sql = concept_table_query, - targetDialect = db_connection@dbms + targetDialect = attr(db_connection, "dbms") ) concept_table <- DatabaseConnector::querySql(db_connection, concept_table_query_translated) |> - dplyr::mutate(CONCEPT_ID = as.character(CONCEPT_ID)) |> - dplyr::mutate(CONCEPT_ID = tolower(trimws(CONCEPT_ID))) + dplyr::rename(concept_id = CONCEPT_ID) |> + dplyr::mutate(concept_id = as.character(concept_id)) |> + dplyr::mutate(concept_id = tolower(trimws(concept_id))) # Initialize vectors for non-standard concepts nonStandard <- c() conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() - standardness <- c() + standard_concept <- c() # Get tables from data_concepts_path tables <- list.files(path = data_concepts_path, pattern = "\\.csv$", full.names = TRUE) @@ -61,35 +62,36 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat sourceCode = readr::col_character(), concept_id = readr::col_character() )) |> - dplyr::rename(CONCEPT_ID = concept_id) |> - dplyr::mutate(across(c(sourceCode, CONCEPT_ID), ~ gsub("\u00A0", " ", .))) |> - dplyr::mutate(dplyr::across(c(sourceCode, CONCEPT_ID), ~ trimws(.))) |> - dplyr::filter(!is.na(sourceCode), !is.na(CONCEPT_ID)) |> + dplyr::mutate(across(c(sourceCode, concept_id), ~ gsub("\u00A0", " ", .))) |> + dplyr::mutate(dplyr::across(c(sourceCode, concept_id), ~ trimws(.))) |> + dplyr::filter(!is.na(sourceCode), !is.na(concept_id)) |> dplyr::mutate( - CONCEPT_ID = tolower(CONCEPT_ID), - CONCEPT_ID = as.character(CONCEPT_ID) + concept_id = tolower(concept_id), + concept_id = as.character(concept_id) ) |> - dplyr::select(sourceCode, CONCEPT_ID) + dplyr::select(sourceCode, concept_id) # Join tables - joined <- dplyr::inner_join(concept_table, tb, by = "CONCEPT_ID") + joined <- dplyr::inner_join(concept_table, tb, by = "concept_id")|> + dplyr::rename(standard_concept = STANDARD_CONCEPT, concept_name = CONCEPT_NAME) |> + dplyr::mutate(standard_concept = ifelse(is.na(standard_concept), 'Non-standard', standard_concept)) |> + dplyr::mutate(standard_concept = dplyr::recode( + standard_concept, + "S" = "Standard", + "C" = "Classification" + )) |> + dplyr::filter(!(standard_concept == "Standard")) # Add non-standard concept info to vectors - ind <- which(!(joined$STANDARD_CONCEPT %in% c("S"))) - nonStandard <- append(nonStandard, joined$CONCEPT_ID[ind]) - conceptNameNonStandard <- append(conceptNameNonStandard, joined$CONCEPT_NAME[ind]) + ind <- which(!(joined$standard_concept %in% c("S"))) + nonStandard <- append(nonStandard, joined$concept_id[ind]) + conceptNameNonStandard <- append(conceptNameNonStandard, joined$concept_name[ind]) sourceCodeNonStandard <- append(sourceCodeNonStandard, joined$sourceCode[ind]) sourceTableNonStandard <- append( sourceTableNonStandard, replicate(length(ind), table_name, simplify = "vector") ) - standardness <- append(standardness, joined$STANDARD_CONCEPT[ind]) - - if (length(ind) == 0) { - message("No non-standard concepts found in list of concepts: ", table_name) - } else { - message(paste("Found ", length(ind), " non-standard concepts in list of concepts: ", table_name)) - } + standard_concept <- append(standard_concept, joined$standard_concept[ind]) # Save if not empty and save_path is provided if (!is.null(save_path) && nrow(joined) > 0) { @@ -102,15 +104,13 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat } } - # NA == non-standard - standardness[is.na(standardness)] <- "Non-standard" # Create table of non-standard concepts res <- tibble::tibble( concept_id = nonStandard, - CONCEPT_NAME = conceptNameNonStandard, + concept_name = conceptNameNonStandard, source_code = sourceCodeNonStandard, source_table = unlist(sourceTableNonStandard), - standardness = standardness + standard_concept = standard_concept ) message(paste0("Finished checking for non-standard concepts.\n", nrow(res), " non-standard concepts found across tables.")) diff --git a/R/isStandardCS.R b/R/isStandardCS.R index 0a085c84..578b3960 100644 --- a/R/isStandardCS.R +++ b/R/isStandardCS.R @@ -15,13 +15,13 @@ #' non_standard_concepts <- isStandardCS(db_conn, conceptSet, "path/to/save_standard_AND_non_standard/") #' #' @export -isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { +isStandardCS <- function(conceptSet, save_path = NULL) { # Initialize vectors for non-standard concepts nonStandard <- c() conceptNameNonStandard <- c() sourceCodeNonStandard <- c() sourceTableNonStandard <- c() - standardness <- c() + standard_concept <- c() # Get concept set details cs <- conceptSet@Expression @@ -30,25 +30,25 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { concept_name <- c() concept_id <- c() concept_set <- c() - standardness <- c() + standard_concept <- c() for (concept in cs) { concept_name <- append(concept_name, concept@Concept@concept_name) concept_id <- append(concept_id, concept@Concept@concept_id) - standardness <- append(standardness, concept@Concept@standard_concept) + standard_concept <- append(standard_concept, concept@Concept@standard_concept) } cs_name <- conceptSet@Name concept_set <- rep.int(cs_name, length(concept_id)) # Replace NAs with non-standard - standardness[is.na(standardness)] <- "Non-standard" + standard_concept[standard_concept == ""] <- "Non-standard" # Filter out standard and classification concepts; keep non-standard and NA df <- data.frame( concept_name, concept_id, concept_set, - standardness + standard_concept ) # Save if not empty and save_path is provided @@ -64,7 +64,7 @@ isStandardCS <- function(db_connection, conceptSet, save_path = NULL) { # NonStandard concepts res <- df |> - dplyr::filter(!(standardness %in% c("S", "C")) | is.na(standardness)) |> + dplyr::filter(standard_concept != "S" | is.na(standard_concept)) |> tibble::tibble() if (nrow(res) == 0) { message("No non-standard concepts found in concept set: ", cs_name) From 4dc7b78150d2cff5e2dffc00b3434d2650711d39 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 13 Aug 2024 16:03:49 +0200 Subject: [PATCH 112/130] add test conceptsets --- tests/testthat/resources/ihd_cad_NS.json | 55 +++++++++++++++++++++++ tests/testthat/resources/ihd_cad_S.json | 38 ++++++++++++++++ tests/testthat/resources/ihd_cad_mix.json | 55 +++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 tests/testthat/resources/ihd_cad_NS.json create mode 100644 tests/testthat/resources/ihd_cad_S.json create mode 100644 tests/testthat/resources/ihd_cad_mix.json diff --git a/tests/testthat/resources/ihd_cad_NS.json b/tests/testthat/resources/ihd_cad_NS.json new file mode 100644 index 00000000..87447de6 --- /dev/null +++ b/tests/testthat/resources/ihd_cad_NS.json @@ -0,0 +1,55 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 40398869, + "CONCEPT_NAME": "Coronary (atherosclerosis or artery disease) or triple vessel disease of the heart", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "D", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "194841001", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40348851, + "CONCEPT_NAME": "Ischemic heart disease", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "D", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "2610009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37063456, + "CONCEPT_NAME": "Hospital admission ischemic heart disease diagnosis | Patient | Cardiopulmonary", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "LP408320-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "LOINC Hierarchy" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/tests/testthat/resources/ihd_cad_S.json b/tests/testthat/resources/ihd_cad_S.json new file mode 100644 index 00000000..63f715d1 --- /dev/null +++ b/tests/testthat/resources/ihd_cad_S.json @@ -0,0 +1,38 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4185932, + "CONCEPT_NAME": "Ischemic heart disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "414545008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 317576, + "CONCEPT_NAME": "Coronary arteriosclerosis", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "53741008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} diff --git a/tests/testthat/resources/ihd_cad_mix.json b/tests/testthat/resources/ihd_cad_mix.json new file mode 100644 index 00000000..babb750f --- /dev/null +++ b/tests/testthat/resources/ihd_cad_mix.json @@ -0,0 +1,55 @@ +{ + "items": [ + { + "concept": { + "CONCEPT_ID": 4185932, + "CONCEPT_NAME": "Ischemic heart disease", + "STANDARD_CONCEPT": "S", + "STANDARD_CONCEPT_CAPTION": "Standard", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "414545008", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 40348851, + "CONCEPT_NAME": "Ischemic heart disease", + "STANDARD_CONCEPT": "", + "STANDARD_CONCEPT_CAPTION": "", + "INVALID_REASON": "D", + "INVALID_REASON_CAPTION": "", + "CONCEPT_CODE": "2610009", + "DOMAIN_ID": "Condition", + "VOCABULARY_ID": "SNOMED", + "CONCEPT_CLASS_ID": "Disorder" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + }, + { + "concept": { + "CONCEPT_ID": 37063456, + "CONCEPT_NAME": "Hospital admission ischemic heart disease diagnosis | Patient | Cardiopulmonary", + "STANDARD_CONCEPT": "C", + "STANDARD_CONCEPT_CAPTION": "Classification", + "INVALID_REASON": "V", + "INVALID_REASON_CAPTION": "Valid", + "CONCEPT_CODE": "LP408320-2", + "DOMAIN_ID": "Measurement", + "VOCABULARY_ID": "LOINC", + "CONCEPT_CLASS_ID": "LOINC Hierarchy" + }, + "isExcluded": false, + "includeDescendants": true, + "includeMapped": false + } + ] +} From b83f7586093963c0e555d70318aca1bd40344191 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Tue, 13 Aug 2024 16:04:01 +0200 Subject: [PATCH 113/130] add tests --- tests/testthat/test-countOccurrences.R | 189 +++++++++++++++++++++++++ tests/testthat/test-isStandard.R | 127 +++++++++++++++++ tests/testthat/test-isStandardCS.R | 32 +++++ 3 files changed, 348 insertions(+) create mode 100644 tests/testthat/test-countOccurrences.R create mode 100644 tests/testthat/test-isStandard.R create mode 100644 tests/testthat/test-isStandardCS.R diff --git a/tests/testthat/test-countOccurrences.R b/tests/testthat/test-countOccurrences.R new file mode 100644 index 00000000..6e276a20 --- /dev/null +++ b/tests/testthat/test-countOccurrences.R @@ -0,0 +1,189 @@ +source("R/countOccurrences.R") + +# test_that("countOccurrences returns correct structure", { +# mock_db <- mockery::mock() +# attr(mock_db, "dbms") <- "postgresql" + +# # Mock the querySql function to return a predefined result +# concept_id <- c("A" = 1, "B" = 2) +# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { +# tibble::tibble( +# concept_id = concept_id, +# count_persons = c(1, 2), +# count_records = c(3, 4), +# desc_count_person = c(5, 6), +# desc_count_record = c(7, 8) +# ) +# }) + +# v <- c("A" = 1, "B" = 2) +# tables <- c("observation", "condition_occurrence") +# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") +# cdm_schema <- "main" +# vocab_schema <- "main" + +# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) + +# expect_s3_class(result, "tbl_df") +# expect_true(all(c("concept_id", "count_persons", "count_records", "desc_count_person", "desc_count_record", "concept_name") %in% colnames(result))) +# }) + + +# test_that("countOccurrences handles empty input", { +# mock_db <- mockery::mock() +# attr(mock_db, "dbms") <- "postgresql" + +# # Mock the querySql function to return an empty result +# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { +# tibble::tibble( +# concept_id = integer(), +# count_persons = integer(), +# count_records = integer(), +# desc_count_person = integer(), +# desc_count_record = integer() +# ) +# }) + +# v <- c() +# tables <- c("observation") +# links <- list(observation = "observation_concept_id") +# cdm_schema <- "main" +# vocab_schema <- "main" + +# expect_error(countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema)) +# }) + + +# test_that("countOccurrences handles missing concept ids", { +# mock_db <- mockery::mock() +# attr(mock_db, "dbms") <- "postgresql" + +# # Mock the querySql function to return a result with no matching concept ids +# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { +# tibble::tibble( +# concept_id = integer(), +# count_persons = integer(), +# count_records = integer(), +# desc_count_person = integer(), +# desc_count_record = integer() +# ) +# }) + +# v <- c(4, 5) +# tables <- c("observation", "condition_occurrence") +# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") +# cdm_schema <- "main" +# vocab_schema <- "main" + +# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) + +# expect_s3_class(result, "tbl_df") +# expect_equal(nrow(result), length(v)) +# expect_true(all(result$count_persons == 0)) +# expect_true(all(result$count_records == 0)) +# expect_true(all(result$desc_count_person == 0)) +# expect_true(all(result$desc_count_record == 0)) +# }) + + +# test_that("countOccurrences saves results to file", { +# mock_db <- mockery::mock() +# attr(mock_db, "dbms") <- "postgresql" + +# # Mock the querySql function to return a predefined result +# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { +# tibble::tibble( +# concept_id = c(1, 2), +# count_persons = c(2, 1), +# count_records = c(3, 1), +# desc_count_person = c(1, 0), +# desc_count_record = c(1, 0) +# ) +# }) + +# v <- c(1, 2) +# tables <- c("observation", "condition_occurrence") +# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") +# cdm_schema <- "main" +# vocab_schema <- "main" +# save_path <- tempdir() + +# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema, save_path) + +# expect_true(file.exists(file.path(save_path, "count_occurrences.csv"))) +# }) + + +test_that("countOccurrences performs count query correctly", { + # Create a connection to an in-memory SQLite database + connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sqlite", server = ":memory:") + conn <- DatabaseConnector::connect(connectionDetails) + + # Create the observation table + DatabaseConnector::executeSql(conn, " + CREATE TABLE main.observation ( + observation_id INTEGER PRIMARY KEY, + person_id INTEGER, + observation_concept_id INTEGER + ) +") + + # Create the concept_ancestor table + DatabaseConnector::executeSql(conn, " + CREATE TABLE main.concept_ancestor ( + ancestor_concept_id INTEGER, + descendant_concept_id INTEGER + ) +") + + # Insert sample data into the observation table + DatabaseConnector::executeSql(conn, " + INSERT INTO main.observation (observation_id, person_id, observation_concept_id) VALUES + (1, 101, 1001), + (2, 102, 1002), + (3, 103, 1003), + (4, 101, 2004) +") + + # Insert sample data into the concept_ancestor table + DatabaseConnector::executeSql(conn, " + INSERT INTO main.concept_ancestor (ancestor_concept_id, descendant_concept_id) VALUES + (1001, 1001), + (1002, 1002), + (1003, 1003), + (1004, 1004), + (1001, 2001), + (1002, 2002), + (1003, 2003), + (1004, 2004) +") + + # Define the schema and tables + vocab_schema <- "main" + save_path <- tempdir() + + # Mock data for testing + v <- c("A" = 1001, "B" = 1002, "C" = 1003, "D" = 1004) + tables <- c("observation") + links <- list(observation = "observation_concept_id") + cdm_schema <- "main" + vocab_schema <- "main" + + # Run the countOccurrences function + result <- countOccurrences(v, tables, links, conn, cdm_schema, vocab_schema, save_path) + + # Verify the results + expect_true(file.exists(file.path(save_path, "count_occurrences.csv"))) + + expected_result <- tibble::tibble( + concept_id = c(1001, 1002, 1003, 1004), + count_persons = c(1, 1, 1, 0), + count_records = c(1, 1, 1, 0), + desc_count_person = c(1, 1, 1, 1), + desc_count_record = c(1, 1, 1, 1), + concept_name = c("A", "B", "C", "D") + ) |> + dplyr::arrange(dplyr::desc(count_records + desc_count_record)) + + expect_equal(result, expected_result) +}) diff --git a/tests/testthat/test-isStandard.R b/tests/testthat/test-isStandard.R new file mode 100644 index 00000000..6c7ef016 --- /dev/null +++ b/tests/testthat/test-isStandard.R @@ -0,0 +1,127 @@ +source("R/isStandard.R") + +test_that("isStandard works expectedly with no data", { + db_connection <- mockery::mock() + data_concepts_path <- tempdir() + vocab_schema <- "cdm" + save_path <- tempdir() + + expect_error( + isStandard(db_connection, data_concepts_path, vocab_schema, save_path) + ) + unlink(data_concepts_path, recursive = TRUE, force = TRUE) +}) + + +test_that("isStandard works correctly with only standard concepts", { + db_connection <- mockery::mock() + attr(db_connection, "dbms") <- "postgresql" + data_concepts_path <- tempdir() + vocab_schema <- "vocab_schema" + + # Mock the concept table query result + concept_table <- tibble::tibble( + CONCEPT_ID = c("1", "2"), + CONCEPT_NAME = c("Standard1", "Standard2"), + STANDARD_CONCEPT = c("S", "S"), + ) + + mockery::stub(isStandard, "DatabaseConnector::querySql", concept_table) + + # Mock source data + mockdatapath <- tempfile(pattern = "mockdata", fileext = ".csv", tmpdir = data_concepts_path) + mockdata <- tibble::tribble( + ~sourceCode, ~concept_id, + "A", "1", + "B", "2" + ) + + # Create a mock CSV file with standard concepts + write.csv(data.frame(mockdata), mockdatapath, row.names = FALSE) + + res <- isStandard(db_connection, data_concepts_path, vocab_schema) + + expect_equal(nrow(res), 0) + + unlink(data_concepts_path, recursive = TRUE, force = TRUE) +}) + +test_that("isStandard works correctly with non-standard concepts", { + db_connection <- mockery::mock() + attr(db_connection, "dbms") <- "postgresql" + data_concepts_path <- tempdir() + vocab_schema <- "vocab_schema" + + # Mock the concept table query result + concept_table <- tibble::tibble( + CONCEPT_ID = c("1", "2"), + CONCEPT_NAME = c("Standard", "Non-standard"), + STANDARD_CONCEPT = c("Standard", "Non-standard"), + ) + + mockery::stub(isStandard, "DatabaseConnector::querySql", concept_table) + + # Mock source data + mockdatapath <- tempfile(pattern = "mockdata", fileext = ".csv", tmpdir = data_concepts_path) + mockdata <- tibble::tribble( + ~sourceCode, ~concept_id, + "A", "1", + "B", "2" + ) + filepath <- sub(".*(mockdata.*)", "\\1", mockdatapath) + + # Create a mock CSV file with non-standard concepts + write.csv(data.frame(mockdata), mockdatapath, row.names = FALSE) + + res <- isStandard(db_connection, data_concepts_path, vocab_schema) + + expect_equal(nrow(res), 1) + expect_equal(res$concept_id, "2") + expect_equal(res$concept_name, "Non-standard") + expect_equal(res$source_code, "B") + expect_contains(res$source_table, filepath) + expect_equal(res$standard_concept, "Non-standard") + + unlink(data_concepts_path, recursive = TRUE, force = TRUE) +}) + +test_that("isStandard works correctly with all kinds of concepts", { + db_connection <- mockery::mock() + attr(db_connection, "dbms") <- "postgresql" + data_concepts_path <- tempdir() + vocab_schema <- "vocab_schema" + + # Mock the concept table query result + concept_table <- tibble::tibble( + CONCEPT_ID = c("1", "2", "3"), + CONCEPT_NAME = c("Standard", "Non-Standard", "Classification"), + STANDARD_CONCEPT = c("Standard", "Non-standard", "Classification"), + ) + + mockery::stub(isStandard, "DatabaseConnector::querySql", concept_table) + + # Mock source data + mockdatapath <- tempfile(pattern = "mockdata", fileext = ".csv", tmpdir = data_concepts_path) + mockdata <- tibble::tribble( + ~sourceCode, ~concept_id, + "A", "1", + "B", "2", + "C", "3" + ) + + filepath <- sub(".*(mockdata.*)", "\\1", mockdatapath) + + # Create a mock CSV file with all kinds of concepts + write.csv(data.frame(mockdata), mockdatapath, row.names = FALSE) + + res <- isStandard(db_connection, data_concepts_path, vocab_schema) + + expect_equal(nrow(res), 2) + expect_equal(res$concept_id, c("2", "3")) + expect_equal(res$concept_name, c("Non-Standard", "Classification")) + expect_equal(res$source_code, c("B", "C")) + expect_contains(res$source_table, filepath) + expect_equal(res$standard_concept, c("Non-standard", "Classification")) + + unlink(data_concepts_path, recursive = TRUE, force = TRUE) +}) diff --git a/tests/testthat/test-isStandardCS.R b/tests/testthat/test-isStandardCS.R new file mode 100644 index 00000000..0e668e3d --- /dev/null +++ b/tests/testthat/test-isStandardCS.R @@ -0,0 +1,32 @@ +source("R/isStandardCS.R") + +test_that("isStandardCS works correctly with standard concepts only", { + # Load test data + dat <- Capr::readConceptSet("tests/testthat/resources/ihd_cad_S.json") + + res <- isStandardCS(dat) + + expect_equal(nrow(res), 0) +}) + +test_that("isStandardCS works correctly with non-standard concepts only", { + # Load test data + dat <- Capr::readConceptSet("tests/testthat/resources/ihd_cad_NS.json") + + res <- isStandardCS(dat) + + expect_equal(nrow(res), 3) + expect_contains(res$standard_concept, "Non-standard") + expect_contains(res$standard_concept, "C") +}) + +test_that("isStandardCS works correctly with all kinds of concepts", { + # Load test data + dat <- Capr::readConceptSet("tests/testthat/resources/ihd_cad_mix.json") + + res <- isStandardCS(dat) + + expect_equal(nrow(res), 2) + expect_contains(res$standard_concept, "Non-standard") + expect_contains(res$standard_concept, "C") +}) From 783cb3cb2b192f5c4051a25e28207a80497a3cb0 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 19 Aug 2024 12:17:59 +0200 Subject: [PATCH 114/130] update gitignore --- .gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index ccfd0c62..a00a2bbd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,18 @@ inst/extdata/standard_concepts/* !inst/extdata/vocabularies inst/extdata/vocabularies/* +*inst/templates +*inst/config + +Capr-PHEMS.Rproj +renv.lock + +R/conceptSets.R + +!inst/extdata/*.csv +inst/extdata/* + + !*.gitkeep renv \ No newline at end of file From db78c43d57ccf2b22cbe7cedd727d72c9335b030 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 19 Aug 2024 12:18:24 +0200 Subject: [PATCH 115/130] small updates --- R/countOccurrences.R | 8 ++++++-- R/table_linked_to_concept_field.R | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 47d2a51d..0abb4e59 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -33,11 +33,12 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) stopifnot(is.character(cdm_schema)) + stopifnot(is.character(vocab_schema)) results <- list() for (table in tables) { - concept_id_field <- links[[table]] + concept_id_field <- links[[table]][1] # Combined SQL query for direct and descendant counts combined_sql <- sprintf( @@ -70,7 +71,7 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ FULL OUTER JOIN desc_counts dc ON d.concept_id = dc.concept_id", concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") - ) + ) combined_sql_translated <- SqlRender::translate( sql = combined_sql, @@ -108,6 +109,9 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ dplyr::arrange(dplyr::desc(count_records + desc_count_record)) if (!is.null(save_path)) { + if (!dir.exists(save_path)) { + dir.create(save_path, recursive = TRUE) + } readr::write_csv(final_res, paste0(save_path, "/", "count_occurrences.csv")) } diff --git a/R/table_linked_to_concept_field.R b/R/table_linked_to_concept_field.R index 104140fa..4179a889 100644 --- a/R/table_linked_to_concept_field.R +++ b/R/table_linked_to_concept_field.R @@ -31,15 +31,15 @@ #' #' @export links <- list( - condition_occurrence = "condition_concept_id", - death = "cause_concept_id", - device_exposure = "device_concept_id", - drug_exposure = "drug_concept_id", - measurement = "measurement_concept_id", - observation = "observation_concept_id", - procedure_occurrence = "procedure_concept_id", - specimen = "specimen_concept_id", - visit_occurrence = "visit_concept_id" + condition_occurrence = c("condition_concept_id", "condition_source_value"), + death = c("cause_concept_id", "cause_source_value"), + device_exposure = c("device_concept_id", "device_source_value"), + drug_exposure = c("drug_concept_id", "drug_source_value"), + measurement = c("measurement_concept_id", "measurement_source_value"), + observation = c("observation_concept_id", "observation_source_value"), + procedure_occurrence = c("procedure_concept_id", "procedure_source_value"), + specimen = c("specimen_concept_id", "specimen_source_value"), + visit_occurrence = c("visit_concept_id", "visit_source_value") ) -cat("Sourced links object") \ No newline at end of file +cat("Sourced links object\n") \ No newline at end of file From 3d95df6cfd2bb8a4a37135fc2216923f7b39ad8b Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 19 Aug 2024 12:18:47 +0200 Subject: [PATCH 116/130] add standardness check for checking in DB --- R/isStandardDB.R | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 R/isStandardDB.R diff --git a/R/isStandardDB.R b/R/isStandardDB.R new file mode 100644 index 00000000..fbf9d5f8 --- /dev/null +++ b/R/isStandardDB.R @@ -0,0 +1,89 @@ +#' Identify Non-Standard Concepts in Database +#' +#' This function checks a set of tables for non-standard concepts by comparing them against the concept table in a SQL database. It identifies non-standard concepts and optionally saves the joined tables containing these non-standard concepts. +#' +#' @param db_connection A DBI database connection object to the SQL database containing the standard concepts table. +#' @param cdm_schema The schema name of the Common Data Model (CDM) database containing the source tables. +#' @param vocab_schema The schema name of the vocabulary database containing the standard concepts table. +#' @param links A named list where each name is a table name and each value is a vector of two strings: the column names for `concept_id` and `source_code` in that table. +#' @param save_path (Optional) The file path where the joined tables containing non-standard concepts should be saved. If not provided, the tables will not be saved but will still be checked for non-standard concepts. +#' +#' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, representing the concept ID, concept name, source code, and source table name for each non-standard concept found. +#' +#' @details The function first queries the `concept` table from the provided SQL database to retrieve the standard concepts. It then reads each specified table, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column being `NA`. Information about these non-standard concepts is collected and returned as a tibble. +#' +#' If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. +#' +#' @examples +#' # Assuming you have a valid DBI connection `db_conn` and your tables are specified in the `links` list: +#' links <- list( +#' "table1" = c("concept_id_col1", "source_code_col1"), +#' "table2" = c("concept_id_col2", "source_code_col2") +#' ) +#' non_standard_concepts <- isStandardDB(db_conn, "cdm_schema", "vocab_schema", links, "path/to/save_non_standard/") +#' +#' @importFrom readr read_csv write_csv +#' @importFrom dplyr mutate filter rename bind_rows +#' @importFrom DatabaseConnector querySql +#' @importFrom SqlRender render translate +#' @export +isStandardDB <- function(db_connection, cdm_schema, vocab_schema, links, save_path = NULL) { + # get tables + tables <- names(links) + + for (table in tables) { + # Read concept table from SQL database + concept_table_query <- SqlRender::render(sprintf( + " + WITH source_table AS ( + -- Select the unique concept_id and source code from the specified source table + SELECT DISTINCT %s AS concept_id, %s AS source_code + FROM %s.%s + ) + SELECT a.concept_id, a.concept_name, source_table.source_code, a.standard_concept + FROM %s.concept a + JOIN source_table ON a.concept_id = source_table.concept_id + ORDER BY source_table.concept_id + ", + links[[table]][1], links[[table]][2], cdm_schema, table, vocab_schema) + ) + + concept_table_query_translated <- SqlRender::translate( + sql = concept_table_query, + targetDialect = attr(db_connection, "dbms") + ) + + concept_table <- DatabaseConnector::querySql(db_connection, concept_table_query_translated) |> + dplyr::rename( + concept_id = CONCEPT_ID, + concept_name = CONCEPT_NAME, + source_code = SOURCE_CODE, + standard_concept = STANDARD_CONCEPT) |> + dplyr::mutate(concept_id = as.character(concept_id)) |> + dplyr::mutate(concept_id = tolower(trimws(concept_id))) + concept_table["source_table"] <- rep.int(table, nrow(concept_table)) + + nonStandardDF <- concept_table |> dplyr::filter(is.na(standard_concept)) + + # Initialize res on first loop iteration + if (!exists("res")) { + res <- nonStandardDF + } else { + res <- dplyr::bind_rows(res, nonStandardDF) + } + } + + # Save if not empty and save_path is provided + if (!is.null(save_path) && nrow(res) > 0) { + readr::write_csv(concept_table, paste0(save_path, "/", table)) + message(paste0("Saved results to ", save_path, "/", table, "\n")) + } else if (is.null(save_path)) { + message("No save path provided, only returning non-standard concepts DF") + } else if (nrow(res) == 0) { + message("No non-standard concepts found in DB; not saving any file.\n") + } + + message(paste0("Finished checking for non-standard concepts.\n", nrow(res), " non-standard concepts found across tables.")) + + return(res) +} From f957d079d58699487bee25d57f2d4e53a3336b20 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 19 Aug 2024 13:53:57 +0200 Subject: [PATCH 117/130] small fixes --- R/isStandard.R | 3 +-- R/isStandardDB.R | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/isStandard.R b/R/isStandard.R index 48aa6e79..5d24fa35 100644 --- a/R/isStandard.R +++ b/R/isStandard.R @@ -77,8 +77,7 @@ isStandard <- function(db_connection, data_concepts_path, vocab_schema, save_pat dplyr::mutate(standard_concept = ifelse(is.na(standard_concept), 'Non-standard', standard_concept)) |> dplyr::mutate(standard_concept = dplyr::recode( standard_concept, - "S" = "Standard", - "C" = "Classification" + "S" = "Standard" )) |> dplyr::filter(!(standard_concept == "Standard")) diff --git a/R/isStandardDB.R b/R/isStandardDB.R index fbf9d5f8..3f85b3ae 100644 --- a/R/isStandardDB.R +++ b/R/isStandardDB.R @@ -62,7 +62,7 @@ isStandardDB <- function(db_connection, cdm_schema, vocab_schema, links, save_pa dplyr::mutate(concept_id = as.character(concept_id)) |> dplyr::mutate(concept_id = tolower(trimws(concept_id))) concept_table["source_table"] <- rep.int(table, nrow(concept_table)) - + print(concept_table) nonStandardDF <- concept_table |> dplyr::filter(is.na(standard_concept)) # Initialize res on first loop iteration @@ -84,6 +84,6 @@ isStandardDB <- function(db_connection, cdm_schema, vocab_schema, links, save_pa } message(paste0("Finished checking for non-standard concepts.\n", nrow(res), " non-standard concepts found across tables.")) - + return(res) } From be4ea8a03730f1a1cbad1b329be3f919bb1f2138 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Mon, 19 Aug 2024 13:54:09 +0200 Subject: [PATCH 118/130] add test for DB standardness check --- tests/testthat/test-isStandardDB.R | 107 +++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 tests/testthat/test-isStandardDB.R diff --git a/tests/testthat/test-isStandardDB.R b/tests/testthat/test-isStandardDB.R new file mode 100644 index 00000000..4d1baded --- /dev/null +++ b/tests/testthat/test-isStandardDB.R @@ -0,0 +1,107 @@ +# tests/testthat/test-isStandardDB.R + +library(testthat) +library(mockery) +library(dplyr) +source('R/isStandardDB.R') + +# Mock data +mock_db_connection <- mock() +attr(mock_db_connection, "dbms") <- "postgresql" +mock_querySql <- mock( + data.frame( + CONCEPT_ID = c(1, 2, 3), + CONCEPT_NAME = c("Concept1", "Concept2", "Concept3"), + SOURCE_CODE = c("Code1", "Code2", "Code3"), + STANDARD_CONCEPT = c(NA, "S", NA) + ) +) + +# Mock the DatabaseConnector::querySql function +stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql) + +test_that("isStandardDB identifies non-standard concepts", { + links <- list( + "table1" = c("concept_id_col1", "source_code_col1") + ) + + result <- isStandardDB(mock_db_connection, "cdm_schema", "vocab_schema", links) + + expect_equal(nrow(result), 2) + expect_equal(result$concept_id, c("1", "3")) + expect_equal(result$concept_name, c("Concept1", "Concept3")) + expect_equal(result$source_code, c("Code1", "Code3")) + expect_equal(result$source_table, c("table1", "table1")) +}) + +test_that("isStandardDB returns empty tibble when no non-standard concepts", { + mock_querySql_empty <- mock( + data.frame( + CONCEPT_ID = c(1, 2, 3), + CONCEPT_NAME = c("Concept1", "Concept2", "Concept3"), + SOURCE_CODE = c("Code1", "Code2", "Code3"), + STANDARD_CONCEPT = c("S", "S", "S") + ) + ) + + stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql_empty) + + links <- list( + "table1" = c("concept_id_col1", "source_code_col1") + ) + + result <- isStandardDB(mock_db_connection, "cdm_schema", "vocab_schema", links) + + expect_equal(nrow(result), 0) +}) + +test_that("isStandardDB saves results when save_path is provided", { + temp_dir <- tempdir() + + links <- list( + "table1" = c("concept_id_col1", "source_code_col1") + ) + + mock_querySql <- mock( + data.frame( + CONCEPT_ID = c(1, 2, 3), + CONCEPT_NAME = c("Concept1", "Concept2", "Concept3"), + SOURCE_CODE = c("Code1", "Code2", "Code3"), + STANDARD_CONCEPT = c(NA, "S", "C") + ) + ) + + stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql) + + result <- isStandardDB(mock_db_connection, "cdm_schema", "vocab_schema", links, save_path = temp_dir) + + expect_true(file.exists(file.path(temp_dir, "table1"))) + saved_data <- readr::read_csv(file.path(temp_dir, "table1")) + expect_equal(nrow(saved_data), 3) + expect_equal(nrow(result), 1) +}) + +test_that("isStandardDB handles multiple tables", { + links <- list( + "table1" = c("concept_id_col1", "source_code_col1"), + "table2" = c("concept_id_col2", "source_code_col2") + ) + + mock_querySql <- mock( + data.frame( + CONCEPT_ID = c(1, 2, 3), + CONCEPT_NAME = c("Concept1", "Concept2", "Concept3"), + SOURCE_CODE = c("Code1", "Code2", "Code3"), + STANDARD_CONCEPT = c(NA, "S", NA) + ), + cycle = TRUE + ) + + stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql) + + result <- isStandardDB(mock_db_connection, "cdm_schema", "vocab_schema", links) + + expect_equal(nrow(result), 4) + expect_equal(result$concept_id, c("1", "3", "1", "3")) + expect_equal(result$source_table, c("table1", "table1", "table2", "table2")) +}) \ No newline at end of file From 245c832fee2e27d73a48552526a6d690d88586b9 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 11:52:21 +0200 Subject: [PATCH 119/130] update gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index a00a2bbd..4fb88119 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,9 @@ Capr-PHEMS.Rproj renv.lock R/conceptSets.R +R/queryDB.R + +inst/res !inst/extdata/*.csv inst/extdata/* From 5beeca5cc83c181dc6b25e9b4877f78f431df06d Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 11:52:41 +0200 Subject: [PATCH 120/130] update functions --- R/countOccurrences.R | 79 +++++++++++++++++++++----------------------- R/isStandardDB.R | 1 - 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 0abb4e59..6d0c0e90 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -29,89 +29,86 @@ #' #' @export countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema, save_path = NULL) { + library(DBI) + library(dplyr) + library(tibble) + stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) stopifnot(is.character(cdm_schema)) - stopifnot(is.character(vocab_schema)) results <- list() + # Create a temporary table for concept IDs + temp_query <- "CREATE TEMPORARY TABLE temp_concepts (concept_id INTEGER)" + temp_query_translated <- SqlRender::translate(sql = temp_query, targetDialect = attr(db_connection, "dbms")) + DatabaseConnector::dbExecute(db_connection, temp_query_translated) + temp_query_insert <- sprintf("INSERT INTO temp_concepts (concept_id) VALUES %s", paste0("(", v, ")", collapse = ", ")) + temp_query_insert_translated <- SqlRender::translate(sql = temp_query_insert, targetDialect = attr(db_connection, "dbms")) + DatabaseConnector::dbExecute(db_connection, temp_query_insert_translated) + for (table in tables) { concept_id_field <- links[[table]][1] # Combined SQL query for direct and descendant counts combined_sql <- sprintf( - # WITH clause to define common table expressions (CTEs) "WITH direct_counts AS ( - -- Select the concept_id and count the distinct persons and total records for each concept_id SELECT %s AS concept_id, COUNT(DISTINCT person_id) AS count_persons, COUNT(*) AS count_records - -- From the cdm schema and the specified table FROM %s.%s - -- Where the concept_id is in the provided vector - WHERE %s IN (%s) - -- Group by the concept_id + WHERE %s IN (SELECT concept_id FROM temp_concepts) GROUP BY %s - -- Define the second expression for descendants ), desc_counts AS ( - -- Select the ancestor_concept_id and count the distinct persons and total records for each concept_id SELECT b.ancestor_concept_id AS concept_id, COUNT(DISTINCT a.person_id) AS desc_count_person, COUNT(*) AS desc_count_record - -- From the vocab schema and concept ancestor table (vocab schema must contain concept_ancestor table; this can be the same schema as the cdm) FROM %s.%s a - -- Join the concept_ancestor table to get the ancestor_concept_id JOIN %s.concept_ancestor b ON a.%s = b.descendant_concept_id - -- Where the descendant_concept_id is in the provided vector - WHERE b.ancestor_concept_id IN (%s) - -- Group by the ancestor_concept_id + WHERE b.ancestor_concept_id IN (SELECT concept_id FROM temp_concepts) GROUP BY b.ancestor_concept_id ) - -- Combine the direct and descendant counts into one result set - SELECT coalesce(d.concept_id, dc.concept_id) AS concept_id, coalesce(count_persons, 0) AS count_persons, coalesce(count_records, 0) AS count_records, coalesce(desc_count_person, 0) AS desc_count_person, coalesce(desc_count_record, 0) AS desc_count_record - FROM direct_counts d - FULL OUTER JOIN desc_counts dc ON d.concept_id = dc.concept_id", - concept_id_field, cdm_schema, table, concept_id_field, paste(v, collapse = ","), concept_id_field, - cdm_schema, table, vocab_schema, concept_id_field, paste(v, collapse = ",") - ) - - combined_sql_translated <- SqlRender::translate( - sql = combined_sql, - targetDialect = attr(db_connection, "dbms") + SELECT c.concept_id, coalesce(d.count_persons, 0) AS count_persons, coalesce(d.count_records, 0) AS count_records, coalesce(dc.desc_count_person, 0) AS desc_count_person, coalesce(dc.desc_count_record, 0) AS desc_count_record, + coalesce(concept.concept_name, '') AS concept_name, coalesce(concept.domain_id, '') AS domain_id + FROM temp_concepts c + LEFT JOIN direct_counts d ON c.concept_id = d.concept_id + LEFT JOIN desc_counts dc ON c.concept_id = dc.concept_id + LEFT JOIN %s.concept concept ON c.concept_id = concept.concept_id", + concept_id_field, cdm_schema, table, concept_id_field, concept_id_field, + cdm_schema, table, vocab_schema, concept_id_field, + vocab_schema ) + + sql_translated <- SqlRender::translate(sql = combined_sql, targetDialect = attr(db_connection, "dbms")) + combined_res <- DatabaseConnector::dbGetQuery(db_connection, sql_translated) - combined_res <- DatabaseConnector::querySql(db_connection, combined_sql_translated) |> - dplyr::rename(concept_id = CONCEPT_ID, count_persons = COUNT_PERSONS, count_records = COUNT_RECORDS, - desc_count_person = DESC_COUNT_PERSON, desc_count_record = DESC_COUNT_RECORD) - not_in_data <- v[!(v %in% combined_res$concept_id)] + ind_not_in_data <- which(!(v %in% combined_res$concept_id)) combined_res <- combined_res |> - dplyr::bind_rows(tibble::tibble( - concept_id = not_in_data, + bind_rows(tibble( + concept_id = v[ind_not_in_data], + concept_name = "Unknown; concept_id not found in data", + domain_id = "Unknown; concept_id not found in data", count_persons = 0, count_records = 0, desc_count_person = 0, desc_count_record = 0 - )) + )) |> + dplyr::filter(!is.na(concept_id)) # Append results results[[table]] <- combined_res } # Combine all results into a single data frame and transform - final_res <- dplyr::bind_rows(results) |> - dplyr::group_by(concept_id) |> - dplyr::summarise( + final_res <- bind_rows(results) |> + group_by(concept_id, concept_name, domain_id) |> + summarise( count_persons = sum(count_persons), count_records = sum(count_records), desc_count_person = sum(desc_count_person), desc_count_record = sum(desc_count_record) ) |> - dplyr::ungroup() |> - dplyr::mutate(concept_name = names(v)[match(concept_id, v)]) |> - dplyr::arrange(dplyr::desc(count_records + desc_count_record)) + ungroup() |> + arrange(desc(desc_count_record)) if (!is.null(save_path)) { - if (!dir.exists(save_path)) { - dir.create(save_path, recursive = TRUE) - } readr::write_csv(final_res, paste0(save_path, "/", "count_occurrences.csv")) } diff --git a/R/isStandardDB.R b/R/isStandardDB.R index 3f85b3ae..0efccd78 100644 --- a/R/isStandardDB.R +++ b/R/isStandardDB.R @@ -62,7 +62,6 @@ isStandardDB <- function(db_connection, cdm_schema, vocab_schema, links, save_pa dplyr::mutate(concept_id = as.character(concept_id)) |> dplyr::mutate(concept_id = tolower(trimws(concept_id))) concept_table["source_table"] <- rep.int(table, nrow(concept_table)) - print(concept_table) nonStandardDF <- concept_table |> dplyr::filter(is.na(standard_concept)) # Initialize res on first loop iteration From 8fc6f44a6cd98246c62b64b1d486bf37feda76f4 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 11:52:55 +0200 Subject: [PATCH 121/130] update unit tests --- tests/testthat/test-countOccurrences.R | 279 ++++++++++++++----------- tests/testthat/test-isStandardDB.R | 2 +- 2 files changed, 161 insertions(+), 120 deletions(-) diff --git a/tests/testthat/test-countOccurrences.R b/tests/testthat/test-countOccurrences.R index 6e276a20..c2722209 100644 --- a/tests/testthat/test-countOccurrences.R +++ b/tests/testthat/test-countOccurrences.R @@ -1,117 +1,136 @@ source("R/countOccurrences.R") -# test_that("countOccurrences returns correct structure", { -# mock_db <- mockery::mock() -# attr(mock_db, "dbms") <- "postgresql" - -# # Mock the querySql function to return a predefined result -# concept_id <- c("A" = 1, "B" = 2) -# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { -# tibble::tibble( -# concept_id = concept_id, -# count_persons = c(1, 2), -# count_records = c(3, 4), -# desc_count_person = c(5, 6), -# desc_count_record = c(7, 8) -# ) -# }) - -# v <- c("A" = 1, "B" = 2) -# tables <- c("observation", "condition_occurrence") -# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") -# cdm_schema <- "main" -# vocab_schema <- "main" - -# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) - -# expect_s3_class(result, "tbl_df") -# expect_true(all(c("concept_id", "count_persons", "count_records", "desc_count_person", "desc_count_record", "concept_name") %in% colnames(result))) -# }) - - -# test_that("countOccurrences handles empty input", { -# mock_db <- mockery::mock() -# attr(mock_db, "dbms") <- "postgresql" - -# # Mock the querySql function to return an empty result -# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { -# tibble::tibble( -# concept_id = integer(), -# count_persons = integer(), -# count_records = integer(), -# desc_count_person = integer(), -# desc_count_record = integer() -# ) -# }) - -# v <- c() -# tables <- c("observation") -# links <- list(observation = "observation_concept_id") -# cdm_schema <- "main" -# vocab_schema <- "main" - -# expect_error(countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema)) -# }) - - -# test_that("countOccurrences handles missing concept ids", { -# mock_db <- mockery::mock() -# attr(mock_db, "dbms") <- "postgresql" - -# # Mock the querySql function to return a result with no matching concept ids -# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { -# tibble::tibble( -# concept_id = integer(), -# count_persons = integer(), -# count_records = integer(), -# desc_count_person = integer(), -# desc_count_record = integer() -# ) -# }) - -# v <- c(4, 5) -# tables <- c("observation", "condition_occurrence") -# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") -# cdm_schema <- "main" -# vocab_schema <- "main" - -# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) - -# expect_s3_class(result, "tbl_df") -# expect_equal(nrow(result), length(v)) -# expect_true(all(result$count_persons == 0)) -# expect_true(all(result$count_records == 0)) -# expect_true(all(result$desc_count_person == 0)) -# expect_true(all(result$desc_count_record == 0)) -# }) - - -# test_that("countOccurrences saves results to file", { -# mock_db <- mockery::mock() -# attr(mock_db, "dbms") <- "postgresql" - -# # Mock the querySql function to return a predefined result -# mockery::stub(countOccurrences, "DatabaseConnector::querySql", function(...) { -# tibble::tibble( -# concept_id = c(1, 2), -# count_persons = c(2, 1), -# count_records = c(3, 1), -# desc_count_person = c(1, 0), -# desc_count_record = c(1, 0) -# ) -# }) - -# v <- c(1, 2) -# tables <- c("observation", "condition_occurrence") -# links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") -# cdm_schema <- "main" -# vocab_schema <- "main" -# save_path <- tempdir() - -# result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema, save_path) - -# expect_true(file.exists(file.path(save_path, "count_occurrences.csv"))) -# }) +test_that("countOccurrences returns correct structure", { + mock_db <- mockery::mock() + attr(mock_db, "dbms") <- "postgresql" + + # Sample concept IDs + concept_id <- c("A" = 1, "B" = 2) + + # Mock the dbWriteTable function to do nothing + mockery::stub(countOccurrences, "DatabaseConnector::dbExecute", function(...) TRUE) + + # Mock the querySql function to return a predefined result + mockery::stub(countOccurrences, "DatabaseConnector::dbGetQuery", function(...) { + tibble::tibble( + concept_id = concept_id, + concept_name = c("A", "B"), + domain_id = c("Observation", "Observation"), + count_persons = c(1, 2), + count_records = c(3, 4), + desc_count_person = c(5, 6), + desc_count_record = c(7, 8) + ) + }) + + v <- c(1, 2) + tables <- c("observation", "condition_occurrence") + links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") + cdm_schema <- "main" + vocab_schema <- "main" + + result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) + + expect_s3_class(result, "tbl_df") + expect_true(all(c("concept_id", "count_persons", "count_records", "desc_count_person", "desc_count_record", "concept_name") %in% colnames(result))) +}) + + +test_that("countOccurrences handles empty input", { + mock_db <- mockery::mock() + attr(mock_db, "dbms") <- "postgresql" + + # Mock the querySql function to return an empty result + mockery::stub(countOccurrences, "DatabaseConnector::dbGetQuery", function(...) { + tibble::tibble( + concept_id = integer(), + count_persons = integer(), + count_records = integer(), + desc_count_person = integer(), + desc_count_record = integer() + ) + }) + + v <- c() + tables <- c("observation") + links <- list(observation = "observation_concept_id") + cdm_schema <- "main" + vocab_schema <- "main" + + expect_error(countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema)) +}) + + +test_that("countOccurrences handles missing concept ids", { + mock_db <- mockery::mock() + attr(mock_db, "dbms") <- "postgresql" + + # Mock the dbWriteTable function to do nothing + mockery::stub(countOccurrences, "DatabaseConnector::dbExecute", function(...) TRUE) + + # Mock the querySql function to return a result with no matching concept ids + mockery::stub(countOccurrences, "DatabaseConnector::dbGetQuery", function(...) { + tibble::tibble( + concept_id = integer(), + concept_name = character(), + domain_id = character(), + count_persons = integer(), + count_records = integer(), + desc_count_person = integer(), + desc_count_record = integer() + ) + }) + + v <- c(4, 5) + tables <- c("observation", "condition_occurrence") + links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") + cdm_schema <- "main" + vocab_schema <- "main" + + result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema) + + expect_s3_class(result, "tbl_df") + expect_equal(nrow(result), length(v)) + expect_true(all(result$concept_name == "Unknown; concept_id not found in data")) + expect_true(all(result$domain_id == "Unknown; concept_id not found in data")) + expect_true(all(result$count_persons == 0)) + expect_true(all(result$count_records == 0)) + expect_true(all(result$desc_count_person == 0)) + expect_true(all(result$desc_count_record == 0)) +}) + + +test_that("countOccurrences saves results to file", { + mock_db <- mockery::mock() + attr(mock_db, "dbms") <- "postgresql" + + # Mock the dbWriteTable function to do nothing + mockery::stub(countOccurrences, "DatabaseConnector::dbExecute", function(...) TRUE) + + # Mock the querySql function to return a predefined result + mockery::stub(countOccurrences, "DatabaseConnector::dbGetQuery", function(...) { + tibble::tibble( + concept_id = c(1, 2), + concept_name = c("A", "B"), + domain_id = c("Observation", "Condition"), + count_persons = c(2, 1), + count_records = c(3, 1), + desc_count_person = c(1, 0), + desc_count_record = c(1, 0) + ) + }) + + v <- c(1, 2) + tables <- c("observation", "condition_occurrence") + links <- list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id") + cdm_schema <- "main" + vocab_schema <- "main" + save_path <- tempdir() + + result <- countOccurrences(v, tables, links, mock_db, cdm_schema, vocab_schema, save_path) + + expect_equal(result, readr::read_csv(file.path(save_path, "count_occurrences.csv"))) +}) test_that("countOccurrences performs count query correctly", { @@ -120,7 +139,7 @@ test_that("countOccurrences performs count query correctly", { conn <- DatabaseConnector::connect(connectionDetails) # Create the observation table - DatabaseConnector::executeSql(conn, " + DatabaseConnector::dbExecute(conn, " CREATE TABLE main.observation ( observation_id INTEGER PRIMARY KEY, person_id INTEGER, @@ -129,15 +148,23 @@ test_that("countOccurrences performs count query correctly", { ") # Create the concept_ancestor table - DatabaseConnector::executeSql(conn, " + DatabaseConnector::dbExecute(conn, " CREATE TABLE main.concept_ancestor ( ancestor_concept_id INTEGER, descendant_concept_id INTEGER ) ") + # Create the concept table + DatabaseConnector::dbExecute(conn, " + CREATE TABLE main.concept ( + concept_id INTEGER PRIMARY KEY, + concept_name TEXT, + domain_id TEXT + )") + # Insert sample data into the observation table - DatabaseConnector::executeSql(conn, " + DatabaseConnector::dbExecute(conn, " INSERT INTO main.observation (observation_id, person_id, observation_concept_id) VALUES (1, 101, 1001), (2, 102, 1002), @@ -146,7 +173,7 @@ test_that("countOccurrences performs count query correctly", { ") # Insert sample data into the concept_ancestor table - DatabaseConnector::executeSql(conn, " + DatabaseConnector::dbExecute(conn, " INSERT INTO main.concept_ancestor (ancestor_concept_id, descendant_concept_id) VALUES (1001, 1001), (1002, 1002), @@ -157,13 +184,26 @@ test_that("countOccurrences performs count query correctly", { (1003, 2003), (1004, 2004) ") + + # Insert test data into the concept table + DatabaseConnector::dbExecute(conn, " + INSERT INTO main.concept (concept_id, concept_name, domain_id) VALUES + (1001, 'A', 'Observation'), + (1002, 'B', 'Observation'), + (1003, 'C', 'Observation'), + (1004, 'D', 'Observation') +") + + observation_data <- DatabaseConnector::dbGetQuery(conn, "SELECT * FROM main.observation") + ancestor_data <- DatabaseConnector::dbGetQuery(conn, "SELECT * FROM main.concept_ancestor") + concept_data <- DatabaseConnector::dbGetQuery(conn, "SELECT * FROM main.concept") # Define the schema and tables vocab_schema <- "main" save_path <- tempdir() # Mock data for testing - v <- c("A" = 1001, "B" = 1002, "C" = 1003, "D" = 1004) + v <- c(1001, 1002, 1003, 1004) tables <- c("observation") links <- list(observation = "observation_concept_id") cdm_schema <- "main" @@ -177,11 +217,12 @@ test_that("countOccurrences performs count query correctly", { expected_result <- tibble::tibble( concept_id = c(1001, 1002, 1003, 1004), + concept_name = c("A", "B", "C", "D"), + domain_id = rep.int("Observation", 4), count_persons = c(1, 1, 1, 0), count_records = c(1, 1, 1, 0), desc_count_person = c(1, 1, 1, 1), - desc_count_record = c(1, 1, 1, 1), - concept_name = c("A", "B", "C", "D") + desc_count_record = c(1, 1, 1, 1) ) |> dplyr::arrange(dplyr::desc(count_records + desc_count_record)) diff --git a/tests/testthat/test-isStandardDB.R b/tests/testthat/test-isStandardDB.R index 4d1baded..f5fde15c 100644 --- a/tests/testthat/test-isStandardDB.R +++ b/tests/testthat/test-isStandardDB.R @@ -44,7 +44,7 @@ test_that("isStandardDB returns empty tibble when no non-standard concepts", { ) ) - stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql_empty) + mockery::stub(isStandardDB, "DatabaseConnector::querySql", mock_querySql_empty) links <- list( "table1" = c("concept_id_col1", "source_code_col1") From 0805878c3c689538ae1f1ebaee91db538d68774b Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 13:00:07 +0200 Subject: [PATCH 122/130] gitignore .Rprofile --- .Rprofile | 0 .gitignore | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .Rprofile diff --git a/.Rprofile b/.Rprofile deleted file mode 100644 index e69de29b..00000000 diff --git a/.gitignore b/.gitignore index 4fb88119..dda858c5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Capr .Rhistory .Rproj.user +.Rprofile .DS_Store errorReportSql.txt *.log @@ -42,7 +43,6 @@ inst/res !inst/extdata/*.csv inst/extdata/* - !*.gitkeep renv \ No newline at end of file From c6d754bcb05dd3549332439e7f31ac2378235b09 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 13:05:21 +0200 Subject: [PATCH 123/130] restore .Rproj --- Capr.Rproj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Capr.Rproj b/Capr.Rproj index 21a4da08..21236211 100644 --- a/Capr.Rproj +++ b/Capr.Rproj @@ -1,7 +1,7 @@ Version: 1.0 -RestoreWorkspace: Default -SaveWorkspace: Default +RestoreWorkspace: No +SaveWorkspace: No AlwaysSaveHistory: Default EnableCodeIndexing: Yes @@ -12,6 +12,10 @@ Encoding: UTF-8 RnwWeave: Sweave LaTeX: pdfLaTeX +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace \ No newline at end of file From 1b9d83c590653cff6155cfe1f1b79f9c5f3505b7 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 13:22:57 +0200 Subject: [PATCH 124/130] change line endings --- DESCRIPTION | 11 +- R/collectCodesetId.R | 632 +++++++++++++++++++++---------------------- 2 files changed, 320 insertions(+), 323 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2e4c1a1c..c5a4c930 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ -Package: Capr-PHEMS -Title: Cohort Definition Application Programming - project specific for PHEMS +Package: Capr +Title: Cohort Definition Application Programming Version: 2.0.8 Authors@R: c( person("Martin", "Lavallee", , "martin.lavallee@boehringer-ingelheim.com", role = c("aut", "cre")), @@ -12,13 +12,12 @@ Description: Provides a programming language for defining cohort definitions in 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes - and their computational implementation. - For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. + and their computational implementation. License: Apache License (>= 2) URL: https://ohdsi.github.io/Capr/, https://github.com/OHDSI/Capr/ BugReports: https://github.com/OHDSI/Capr/issues/ Encoding: UTF-8 -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.1 Depends: R (>= 3.5.0) Imports: @@ -45,8 +44,6 @@ Imports: CirceR, codetools, readr, - dplyr, - DBI Suggests: testthat (>= 3.0.0), knitr, diff --git a/R/collectCodesetId.R b/R/collectCodesetId.R index f1f9ec49..1b9c5f02 100644 --- a/R/collectCodesetId.R +++ b/R/collectCodesetId.R @@ -1,316 +1,316 @@ -# Utilities --------------- -getGuid <- function(x) { - tibble::tibble( - guid = x@conceptSet@id - ) -} - -replaceGuid <- function(x, y) { - x@conceptSet@id <- y - return(x) -} - - -# Collect Guid -------------------------- - -setGeneric("collectGuid", function(x) standardGeneric("collectGuid")) - - -# setMethod("collectGuid", "Query", function(x) { -# getGuid(x) -# }) -# -# setMethod("collectGuid", "nestedAttribute", function(x) { -# collectGuid(x@group) -# }) - -#' @include query.R -#' @export -setMethod("collectGuid", "Query", function(x) { - ids <- getGuid(x) - - #collect guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - id2 <- collectGuid(x@attributes[[ii]]@group) %>% - purrr::flatten() - - ids <- dplyr::bind_rows(ids, id2) - } - return(ids) - -}) - -#' @include criteria.R -setMethod("collectGuid", "Criteria", function(x) { - collectGuid(x@query) -}) - -#' @include criteria.R -setMethod("collectGuid", "Group", function(x) { - purrr::map(x@criteria, ~collectGuid(.x)) %>% - append(purrr::map(x@group, ~collectGuid(.x))) -}) - - - -setMethod("collectGuid", "CohortEntry", function(x) { - purrr::map(x@entryEvents, ~collectGuid(.x)) %>% - append(collectGuid(x@additionalCriteria)) - #TODO may need a flatten here with additional criteria -}) - -setMethod("collectGuid", "CohortAttrition", function(x) { - purrr::map(unname(x@rules), ~collectGuid(.x)) %>% - purrr::flatten() -}) - -setMethod("collectGuid", "CohortExit", function(x) { - #check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - #get concept sets from drug exit - ll <- list(getGuid(x@endStrategy)) - } else { - ll <- list() - } - append(ll, purrr::map(x@censoringCriteria@criteria, ~collectGuid(.x))) - -}) - -setMethod("collectGuid", "Cohort", function(x) { - - collectGuid(x@entry) %>% - append(collectGuid(x@attrition)) %>% - append(collectGuid(x@exit)) %>% - unlist() %>% - unname() %>% - unique() %>% - tibble::tibble(guid = .) %>% - dplyr::mutate( - codesetId = dplyr::row_number() - 1, - codesetId = as.integer(.data$codesetId) - ) - -}) - -# Replace CodesetId ----------------------- -## TODO HASH table implementation of find/replace -setGeneric("replaceCodesetId", function(x, guidTable) standardGeneric("replaceCodesetId")) - - -setMethod("replaceCodesetId", "Query", function(x, guidTable) { - - y <- getGuid(x) %>% - dplyr::inner_join(guidTable, by = c("guid")) %>% - dplyr::pull(.data$codesetId) - #first replace the query id - x <- replaceGuid(x, y) - - #next check for any nested criteria and replace - #replace guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - nest <- replaceCodesetId(x@attributes[[ii]]@group, guidTable) - - x@attributes[[ii]]@group <- nest - } - - return(x) -}) - -setMethod("replaceCodesetId", "DrugExposureExit", function(x, guidTable) { - - y <- getGuid(x) %>% - dplyr::inner_join(guidTable, by = c("guid")) %>% - dplyr::pull(.data$codesetId) - - x <- replaceGuid(x, y) - - return(x) -}) - - - -setMethod("replaceCodesetId", "Criteria", function(x, guidTable) { - - x@query <- replaceCodesetId(x@query, guidTable = guidTable) - - return(x) -}) - - -setMethod("replaceCodesetId", "Group", function(x, guidTable) { - crit <- purrr::map(x@criteria, ~replaceCodesetId(.x, guidTable)) - grp <- purrr::map(x@group, ~replaceCodesetId(.x, guidTable)) - - x@criteria <- crit - x@group <- grp - - return(x) -}) - - -setMethod("replaceCodesetId", "CohortEntry", function(x, guidTable) { - pc <- purrr::map(x@entryEvents, ~replaceCodesetId(.x, guidTable)) - ac <- replaceCodesetId(x@additionalCriteria, guidTable) - - x@entryEvents <- pc - x@additionalCriteria <- ac - return(x) - -}) - -setMethod("replaceCodesetId", "CohortAttrition", function(x, guidTable = guidTable) { - irs <- purrr::map(x@rules, ~replaceCodesetId(.x, guidTable)) - x@rules <- irs - return(x) -}) - - -setMethod("replaceCodesetId", "CohortExit", function(x, guidTable = guidTable) { - #check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - #get concept sets from drug exit - es <- replaceCodesetId(x@endStrategy, guidTable = guidTable) - x@endStrategy <- es - } - # Censoring Events replace - cen <- purrr::map(x@censoringCriteria@criteria, ~replaceCodesetId(.x, guidTable)) - x@censoringCriteria@criteria <- cen - return(x) - -}) - - -setMethod("replaceCodesetId", "Cohort", function(x, guidTable = guidTable) { - - x@entry <- replaceCodesetId(x@entry, guidTable = guidTable) - x@attrition <- replaceCodesetId(x@attrition, guidTable = guidTable) - x@exit <- replaceCodesetId(x@exit, guidTable = guidTable) - - return(x) -}) - -# list Concept Set ------------------ - -setGeneric("listConceptSets", function(x) standardGeneric("listConceptSets")) - -#' @include query.R -setMethod("listConceptSets", "Query", function(x) { - qs <- as.list(x@conceptSet) - - # handle listing concepts if have nestedAttribute - #next check for any nested criteria and replace - #replace guids for nested attributes - checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) - if (any(checkNest %in% c("CorrelatedCriteria"))) { - ii <- which(checkNest == "CorrelatedCriteria") - nest <- listConceptSets(x@attributes[[ii]]@group) - out <- c(list(qs), nest) - } else { - out <- list(qs) - } - - return(out) -}) - -#' @include criteria.R -setMethod("listConceptSets", "Criteria", function(x) { - listConceptSets(x@query) -}) - -check_names <- function(x) { - check <- names(x) %in% c("id", "name", "expression") - if (length(check) == 0) { - FALSE - } else{ - all(check) - } -} - -#' @include criteria.R -setMethod("listConceptSets", "Group", function(x) { - - #Start with criteria - a <- purrr::map(x@criteria, ~listConceptSets(.x)) - if (length(a) == 0) { - ll1 <- list() - } else { - la1 <- purrr::keep(a, ~check_names(.x)) - la2 <- purrr::discard(a, ~check_names(.x)) - if (length(la2) > 0) { - la2 <- purrr::list_flatten(la2) - } - - ll1 <- c(la1, la2) - } - - # Next Group - b <- purrr::map(x@group, ~listConceptSets(.x)) - if (length(b) == 0) { - ll2 <- list() - } else { - lb1 <- purrr::keep(b, ~check_names(.x)) - lb2 <- purrr::discard(b, ~check_names(.x)) - if (length(lb2) > 0) { - lb2 <- purrr::list_flatten(lb2) - } - - ll2 <- c(lb1, lb2) - } - - c(ll1, ll2) -}) - -setMethod("listConceptSets", "CohortEntry", function(x) { - - ce <- purrr::map(x@entryEvents, ~listConceptSets(.x)) - check <- purrr::map_int(ce, ~length(.x)) - if (!all(check == 3)) { - ce <- ce %>% - purrr::flatten() - } - - ce %>% - append(listConceptSets(x@additionalCriteria)) - # TODO may need a flatten here with additional criteria -}) - -setMethod("listConceptSets", "CohortAttrition", function(x) { - purrr::map(unname(x@rules), ~listConceptSets(.x)) %>% - purrr::list_flatten() -}) - -setMethod("listConceptSets", "CohortExit", function(x) { - # check if endstrategy is drug exit - es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) - if (es_nm_check) { - # get concept sets from drug exit - ll <- list(as.list(x@endStrategy@conceptSet)) - } else { - ll <- list() - } - # get concept sets from censoring criteria - ll2 <- purrr::map(x@censoringCriteria@criteria, - ~listConceptSets(.x) %>% - purrr::flatten()) - - res <- append(ll, ll2) - return(res) -}) - -setMethod("listConceptSets", "Cohort", function(x) { - l1 <- listConceptSets(x@entry) - l2 <- listConceptSets(x@attrition) - l3 <- listConceptSets(x@exit) - ll <- c(l1, l2, l3) - - ids <- purrr::map_chr(ll, ~as.character(.x$id)) - - rr <- ll[!duplicated(ids)] - return(rr) -}) +# Utilities --------------- +getGuid <- function(x) { + tibble::tibble( + guid = x@conceptSet@id + ) +} + +replaceGuid <- function(x, y) { + x@conceptSet@id <- y + return(x) +} + + +# Collect Guid -------------------------- + +setGeneric("collectGuid", function(x) standardGeneric("collectGuid")) + + +# setMethod("collectGuid", "Query", function(x) { +# getGuid(x) +# }) +# +# setMethod("collectGuid", "nestedAttribute", function(x) { +# collectGuid(x@group) +# }) + +#' @include query.R +#' @export +setMethod("collectGuid", "Query", function(x) { + ids <- getGuid(x) + + #collect guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + id2 <- collectGuid(x@attributes[[ii]]@group) %>% + purrr::flatten() + + ids <- dplyr::bind_rows(ids, id2) + } + return(ids) + +}) + +#' @include criteria.R +setMethod("collectGuid", "Criteria", function(x) { + collectGuid(x@query) +}) + +#' @include criteria.R +setMethod("collectGuid", "Group", function(x) { + purrr::map(x@criteria, ~collectGuid(.x)) %>% + append(purrr::map(x@group, ~collectGuid(.x))) +}) + + + +setMethod("collectGuid", "CohortEntry", function(x) { + purrr::map(x@entryEvents, ~collectGuid(.x)) %>% + append(collectGuid(x@additionalCriteria)) + #TODO may need a flatten here with additional criteria +}) + +setMethod("collectGuid", "CohortAttrition", function(x) { + purrr::map(unname(x@rules), ~collectGuid(.x)) %>% + purrr::flatten() +}) + +setMethod("collectGuid", "CohortExit", function(x) { + #check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + #get concept sets from drug exit + ll <- list(getGuid(x@endStrategy)) + } else { + ll <- list() + } + append(ll, purrr::map(x@censoringCriteria@criteria, ~collectGuid(.x))) + +}) + +setMethod("collectGuid", "Cohort", function(x) { + + collectGuid(x@entry) %>% + append(collectGuid(x@attrition)) %>% + append(collectGuid(x@exit)) %>% + unlist() %>% + unname() %>% + unique() %>% + tibble::tibble(guid = .) %>% + dplyr::mutate( + codesetId = dplyr::row_number() - 1, + codesetId = as.integer(.data$codesetId) + ) + +}) + +# Replace CodesetId ----------------------- +## TODO HASH table implementation of find/replace +setGeneric("replaceCodesetId", function(x, guidTable) standardGeneric("replaceCodesetId")) + + +setMethod("replaceCodesetId", "Query", function(x, guidTable) { + + y <- getGuid(x) %>% + dplyr::inner_join(guidTable, by = c("guid")) %>% + dplyr::pull(.data$codesetId) + #first replace the query id + x <- replaceGuid(x, y) + + #next check for any nested criteria and replace + #replace guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + nest <- replaceCodesetId(x@attributes[[ii]]@group, guidTable) + + x@attributes[[ii]]@group <- nest + } + + return(x) +}) + +setMethod("replaceCodesetId", "DrugExposureExit", function(x, guidTable) { + + y <- getGuid(x) %>% + dplyr::inner_join(guidTable, by = c("guid")) %>% + dplyr::pull(.data$codesetId) + + x <- replaceGuid(x, y) + + return(x) +}) + + + +setMethod("replaceCodesetId", "Criteria", function(x, guidTable) { + + x@query <- replaceCodesetId(x@query, guidTable = guidTable) + + return(x) +}) + + +setMethod("replaceCodesetId", "Group", function(x, guidTable) { + crit <- purrr::map(x@criteria, ~replaceCodesetId(.x, guidTable)) + grp <- purrr::map(x@group, ~replaceCodesetId(.x, guidTable)) + + x@criteria <- crit + x@group <- grp + + return(x) +}) + + +setMethod("replaceCodesetId", "CohortEntry", function(x, guidTable) { + pc <- purrr::map(x@entryEvents, ~replaceCodesetId(.x, guidTable)) + ac <- replaceCodesetId(x@additionalCriteria, guidTable) + + x@entryEvents <- pc + x@additionalCriteria <- ac + return(x) + +}) + +setMethod("replaceCodesetId", "CohortAttrition", function(x, guidTable = guidTable) { + irs <- purrr::map(x@rules, ~replaceCodesetId(.x, guidTable)) + x@rules <- irs + return(x) +}) + + +setMethod("replaceCodesetId", "CohortExit", function(x, guidTable = guidTable) { + #check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + #get concept sets from drug exit + es <- replaceCodesetId(x@endStrategy, guidTable = guidTable) + x@endStrategy <- es + } + # Censoring Events replace + cen <- purrr::map(x@censoringCriteria@criteria, ~replaceCodesetId(.x, guidTable)) + x@censoringCriteria@criteria <- cen + return(x) + +}) + + +setMethod("replaceCodesetId", "Cohort", function(x, guidTable = guidTable) { + + x@entry <- replaceCodesetId(x@entry, guidTable = guidTable) + x@attrition <- replaceCodesetId(x@attrition, guidTable = guidTable) + x@exit <- replaceCodesetId(x@exit, guidTable = guidTable) + + return(x) +}) + +# list Concept Set ------------------ + +setGeneric("listConceptSets", function(x) standardGeneric("listConceptSets")) + +#' @include query.R +setMethod("listConceptSets", "Query", function(x) { + qs <- as.list(x@conceptSet) + + # handle listing concepts if have nestedAttribute + #next check for any nested criteria and replace + #replace guids for nested attributes + checkNest <- purrr::map_chr(x@attributes, ~as.character(.x@name)) + if (any(checkNest %in% c("CorrelatedCriteria"))) { + ii <- which(checkNest == "CorrelatedCriteria") + nest <- listConceptSets(x@attributes[[ii]]@group) + out <- c(list(qs), nest) + } else { + out <- list(qs) + } + + return(out) +}) + +#' @include criteria.R +setMethod("listConceptSets", "Criteria", function(x) { + listConceptSets(x@query) +}) + +check_names <- function(x) { + check <- names(x) %in% c("id", "name", "expression") + if (length(check) == 0) { + FALSE + } else{ + all(check) + } +} + +#' @include criteria.R +setMethod("listConceptSets", "Group", function(x) { + + #Start with criteria + a <- purrr::map(x@criteria, ~listConceptSets(.x)) + if (length(a) == 0) { + ll1 <- list() + } else { + la1 <- purrr::keep(a, ~check_names(.x)) + la2 <- purrr::discard(a, ~check_names(.x)) + if (length(la2) > 0) { + la2 <- purrr::list_flatten(la2) + } + + ll1 <- c(la1, la2) + } + + # Next Group + b <- purrr::map(x@group, ~listConceptSets(.x)) + if (length(b) == 0) { + ll2 <- list() + } else { + lb1 <- purrr::keep(b, ~check_names(.x)) + lb2 <- purrr::discard(b, ~check_names(.x)) + if (length(lb2) > 0) { + lb2 <- purrr::list_flatten(lb2) + } + + ll2 <- c(lb1, lb2) + } + + c(ll1, ll2) +}) + +setMethod("listConceptSets", "CohortEntry", function(x) { + + ce <- purrr::map(x@entryEvents, ~listConceptSets(.x)) + check <- purrr::map_int(ce, ~length(.x)) + if (!all(check == 3)) { + ce <- ce %>% + purrr::flatten() + } + + ce %>% + append(listConceptSets(x@additionalCriteria)) + # TODO may need a flatten here with additional criteria +}) + +setMethod("listConceptSets", "CohortAttrition", function(x) { + purrr::map(unname(x@rules), ~listConceptSets(.x)) %>% + purrr::list_flatten() +}) + +setMethod("listConceptSets", "CohortExit", function(x) { + # check if endstrategy is drug exit + es_nm_check <- "conceptSet" %in% methods::slotNames(methods::is(x@endStrategy)) + if (es_nm_check) { + # get concept sets from drug exit + ll <- list(as.list(x@endStrategy@conceptSet)) + } else { + ll <- list() + } + # get concept sets from censoring criteria + ll2 <- purrr::map(x@censoringCriteria@criteria, + ~listConceptSets(.x) %>% + purrr::flatten()) + + res <- append(ll, ll2) + return(res) +}) + +setMethod("listConceptSets", "Cohort", function(x) { + l1 <- listConceptSets(x@entry) + l2 <- listConceptSets(x@attrition) + l3 <- listConceptSets(x@exit) + ll <- c(l1, l2, l3) + + ids <- purrr::map_chr(ll, ~as.character(.x$id)) + + rr <- ll[!duplicated(ids)] + return(rr) +}) From 5f0bac6f0399944fa19b690690dde8dbb9ec0094 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 13:40:07 +0200 Subject: [PATCH 125/130] update docs --- R/countOccurrences.R | 12 +++++------- R/isStandardCS.R | 7 +++---- R/isStandardDB.R | 4 ++-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 6d0c0e90..b24aa6ac 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -1,6 +1,4 @@ -#' Count Occurrences of Values in Database Tables -#' -#' This function counts the occurrences of specified concept ids within specified tables in a OMOP database, +#' This function counts the occurrences of specified concept ids within specified tables in an OMOP database, #' including direct occurrences and occurrences through descendants, based on a provided cdm_schema and links. #' It returns a tibble summarizing the counts across persons and across records. #' @@ -10,11 +8,11 @@ #' @param db_connection A database connection object through which queries will be executed. #' @param cdm_schema The database cdm_schema in which the tables are located. #' @param vocab_schema The database vocab_schema in which the concept tables are located. -#' @param save_path The path to save the results to. If NULL, the results are not saved. +#' @param save_path The path to save the results to as a CSV file. If NULL, the results are not saved. #' #' @return A tibble with columns for the number of times any concept from 'v' occurs: direct count of persons, #' direct count of records, descendant count of persons, and descendant count of records. -#' The tibble also includes the concept names derived from `v` and is arranged by the total +#' The tibble also includes the concept names and domain ids derived from `v` and is arranged by the total #' record count (direct + descendant). #' #' @examples @@ -23,8 +21,8 @@ #' # and `v` contains the values to search for: #' results <- countOccurrences( #' v = c(1, 2), tables = c("observation", "condition_occurrence"), -#' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id", ...), -#' db_connection = db_connection, cdm_schema = "public" +#' links = list(observation = "observation_concept_id", condition_occurrence = "condition_concept_id"), +#' db_connection = db_connection, cdm_schema = "public", vocab_schema = "vocabulary" #' ) #' #' @export diff --git a/R/isStandardCS.R b/R/isStandardCS.R index 578b3960..01fda158 100644 --- a/R/isStandardCS.R +++ b/R/isStandardCS.R @@ -2,17 +2,16 @@ #' #' This function examines a concept set for non-standard concepts by comparing them against a standard concepts table in a SQL database. It identifies non-standard concepts and optionally saves the details of these non-standard concepts to a specified path. #' -#' @param db_connection A DBI database connection object to the SQL database containing the standard concepts table. This parameter is currently not used in the function but intended for future use where database queries might be necessary. #' @param conceptSet An object representing a set of concepts, containing details such as concept ID, concept name, and whether it is a standard concept. The structure of this object should support `@Expression` to access the individual concepts and their properties. #' @param save_path (Optional) The file path where the details of non-standard concepts should be saved as a CSV file. If not provided, the information will not be saved but will still be checked for non-standard concepts. #' -#' @return A tibble containing the columns `concept_name`, `concept_id`, `concept_set`, and `standard`, which represent the concept name, concept ID, the name of the concept set, and the standard status for each concept found to be non-standard or not classified as standard. +#' @return A tibble containing the columns `concept_name`, `concept_id`, `concept_set`, and `standard_concept`, which represent the concept name, concept ID, the name of the concept set, and the standard status for each concept found to be non-standard or not classified as standard. #' -#' @details The function processes a given concept set to identify non-standard concepts. Non-standard concepts are those not marked as 'S' (Standard) or 'C' (Classification) in their `standard_concept` attribute. The function creates a data frame with concept details, filters out standard and classification concepts, and if a `save_path` is provided, saves this information to a CSV file. If no non-standard concepts are found, appropriate messages are displayed. +#' @details The function processes a given concept set to identify non-standard concepts. Non-standard concepts are those not marked as 'S' (Standard) or 'C' (Classification) in their `standard_concept` attribute. The function creates a data frame with concept details, replaces empty `standard_concept` values with "Non-standard", filters out standard and classification concepts, and if a `save_path` is provided, saves this information to a CSV file. If no non-standard concepts are found, appropriate messages are displayed. #' #' @examples #' # Assuming you have a concept set `conceptSet`: -#' non_standard_concepts <- isStandardCS(db_conn, conceptSet, "path/to/save_standard_AND_non_standard/") +#' non_standard_concepts <- isStandardCS(conceptSet, "path/to/save_standard_AND_non_standard/") #' #' @export isStandardCS <- function(conceptSet, save_path = NULL) { diff --git a/R/isStandardDB.R b/R/isStandardDB.R index 0efccd78..600d1e61 100644 --- a/R/isStandardDB.R +++ b/R/isStandardDB.R @@ -10,9 +10,9 @@ #' #' @return A tibble containing the columns `concept_id`, `concept_name`, `source_code`, and `source_table`, representing the concept ID, concept name, source code, and source table name for each non-standard concept found. #' -#' @details The function first queries the `concept` table from the provided SQL database to retrieve the standard concepts. It then reads each specified table, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column being `NA`. Information about these non-standard concepts is collected and returned as a tibble. +#' @details The function first queries the `concept` table from the provided SQL database to retrieve the standard concepts. It then reads each specified table, preparing and joining it with the standard concepts table based on the concept ID. Non-standard concepts are identified based on the `standard_concept` column being `NA`. Information about these non-standard concepts is collected and returned as a tibble. The function also adds a `source_table` column to indicate the source table name. #' -#' If a `save_path` is provided, each joined table that contains at least one non-standard concept is saved to the specified directory with the same name as the original table file. +#' If a `save_path` is provided, each joined table (including both standard and non-standard concepts) is saved to the specified directory with the same name as the original table file. #' #' @examples #' # Assuming you have a valid DBI connection `db_conn` and your tables are specified in the `links` list: From 8e71e36dfc7ffea7e755a706e0f35a0cc73d7c49 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 13:56:15 +0200 Subject: [PATCH 126/130] clean up fork --- .gitignore | 1 + R/collectCodesetId.R | 1 - README.md | 2 -- man/{Capr-PHEMS-package.Rd => Capr-package.Rd} | 10 +++++----- 4 files changed, 6 insertions(+), 8 deletions(-) rename man/{Capr-PHEMS-package.Rd => Capr-package.Rd} (81%) diff --git a/.gitignore b/.gitignore index dda858c5..e2faa2dd 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ renv.lock R/conceptSets.R R/queryDB.R +./man/conceptSets.Rd inst/res diff --git a/R/collectCodesetId.R b/R/collectCodesetId.R index 1b9c5f02..13ceadf6 100644 --- a/R/collectCodesetId.R +++ b/R/collectCodesetId.R @@ -25,7 +25,6 @@ setGeneric("collectGuid", function(x) standardGeneric("collectGuid")) # }) #' @include query.R -#' @export setMethod("collectGuid", "Query", function(x) { ids <- getGuid(x) diff --git a/README.md b/README.md index fd2f4d64..fcdcbce4 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ Capr is part of [HADES](https://ohdsi.github.io/Hades/) The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model. -This package has been extended under the name Capr-PHEMS for the PHEMS consortium to facilitate the cohort building process via a template script and specific configurations, as well as providing extra functionality to enable querying the frequency of concept sets on a person and record level and to enable checking the standardness of concepts in a set or list of concepts, thereby making identification of non-standard concepts much more straightforward. - Learn more about the OHDSI approach to cohort building in the [cohorts chapter of the Book of OHDSI.](https://ohdsi.github.io/TheBookOfOhdsi/Cohorts.html) # Installation diff --git a/man/Capr-PHEMS-package.Rd b/man/Capr-package.Rd similarity index 81% rename from man/Capr-PHEMS-package.Rd rename to man/Capr-package.Rd index 628b6a72..e9e9df86 100644 --- a/man/Capr-PHEMS-package.Rd +++ b/man/Capr-package.Rd @@ -1,14 +1,14 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/Capr.R \docType{package} -\name{Capr-PHEMS-package} -\alias{Capr-PHEMS} -\alias{Capr-PHEMS-package} -\title{Capr-PHEMS: Cohort Definition Application Programming - project specific for PHEMS} +\name{Capr-package} +\alias{Capr} +\alias{Capr-package} +\title{Capr: Cohort Definition Application Programming - project specific for PHEMS} \description{ \if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} -Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. For PHEMS this package has been extended with additional functions to support PHEMS cohort creation. +Provides a programming language for defining cohort definitions in R to use in studies for Observational Health Data Sciences and Informatics (OHDSI). The functions in 'Capr' allow for the programmatic creation of OHDSI concept sets and cohorts that can be serialized to 'OHDSI' compatible 'json' files or to 'OHDSI-SQL'. 'Capr' functions can be used to create, save, and load component parts to a cohort definition allowing R programmers to easily reuse cohort logic. 'Capr' provides tools to create a large number of OHDSI cohorts while also helping bridge the gap between human readable descriptions of clinical phenotypes and their computational implementation. } \seealso{ Useful links: From c6abec231b5539a95e736c32ee13eb608dcd2056 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 14:00:18 +0200 Subject: [PATCH 127/130] clean-up fork --- Capr.Rproj | 4 ++-- README.md | 41 ++--------------------------------------- man/Capr-package.Rd | 2 +- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/Capr.Rproj b/Capr.Rproj index 21236211..2f21dc77 100644 --- a/Capr.Rproj +++ b/Capr.Rproj @@ -12,8 +12,8 @@ Encoding: UTF-8 RnwWeave: Sweave LaTeX: pdfLaTeX -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes diff --git a/README.md b/README.md index fcdcbce4..e6e6c8cf 100644 --- a/README.md +++ b/README.md @@ -24,41 +24,6 @@ Users can install the current development version of Capr from [GitHub](https:// devtools::install_github("ohdsi/Capr") ``` -For Capr-PHEMS, it is recommended to clone the repo and work from the template script cohortCapr.R, whilst using the Capr-PHEMS.Rproj as the project. - -# Getting started with Capr-PHEMS -**Prerequisites** - -Please make sure you have the following: -- R version >= 4.4.0 -- RStudio >= 2024.04.2 -- (CRAN library) renv >= 1.0.7 - - -1. Clone the repo: -``` -git clone https://github.com/thehyve/Capr-PHEMS.git -``` - -2. Navigate to ./inst/config/. Here you will find two sample configuration files; config-sample.yml and connection_config-sample.yml - -3. Copy these files using: -``` -cp config-sample.yml config.yml -``` -and -``` -cp connection_config-sample.yml connection_config.yml -``` -and fill in your configuration details. - -4a. Open RStudio and verify renv >= 1.0.7 is installed by calling packageVersion("renv"). If not installed, call install.packages("renv) - -4b. In the top-right "Project" dropdown menu, select "Open Project" and open ./Capr-PHEMS.Rproj - -4c. .Rprofile will be sourced when opening the project; this will trigger renv::init() to initialize the environment. When prompted whether to use a DESCRIPTION file for dependency discovery, select option 1 to use the DESCRIPTION file. Next, you may be prompted the project already has a lockfile with another set of options. Here also select option 1 to restore the project from the lockfile. This will install all required packages to the environment. Your renv is now activated. - -5. A template script is provided under ./inst/templates/ as both an R script and .Rmd file. The code between these files is identical. It is recommended to start by using the .Rmd file, so chunks of code can easily be run at will. These chunks of code are self-explanatory. These templates serve as examples of how Capr and Capr-PHEMS can be used and it is encouraged to modify them locally as you see fit. # User Documentation @@ -91,10 +56,8 @@ Capr is licensed under Apache License 2.0 # Development Capr is being developed in R Studio. -Capr-PHEMS is beind developed in R Studio. # Acknowledgements -- The original Capr package is maintained by Martin Lavallee and Adam Black -- Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC -- Additional scripts and templates specific to Capr-PHEMS are maintained by Guus Wilmink +- This package is maintained by Martin Lavallee and Adam Black +- Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC \ No newline at end of file diff --git a/man/Capr-package.Rd b/man/Capr-package.Rd index e9e9df86..0a818182 100644 --- a/man/Capr-package.Rd +++ b/man/Capr-package.Rd @@ -4,7 +4,7 @@ \name{Capr-package} \alias{Capr} \alias{Capr-package} -\title{Capr: Cohort Definition Application Programming - project specific for PHEMS} +\title{Capr: Cohort Definition Application Programming} \description{ \if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} From f14c3ef0c75aed5616e60585e72df9555739ef50 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 14:02:46 +0200 Subject: [PATCH 128/130] line endings --- README.md | 124 +++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index e6e6c8cf..d830a62c 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,63 @@ -# Capr - - - -[![codecov.io](https://codecov.io/github/OHDSI/Capr/coverage.svg?branch=main)](https://app.codecov.io/gh/OHDSI/Capr?branch=main) [![Build Status](https://github.com/OHDSI/Capr/workflows/R-CMD-check/badge.svg)](https://github.com/OHDSI/Capr/actions?query=workflow%3AR-CMD-check) - - - -Capr is part of [HADES](https://ohdsi.github.io/Hades/) - -# Introduction - -The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model. - -Learn more about the OHDSI approach to cohort building in the [cohorts chapter of the Book of OHDSI.](https://ohdsi.github.io/TheBookOfOhdsi/Cohorts.html) - -# Installation - - -Users can install the current development version of Capr from [GitHub](https://github.com/) with: - -``` r -# install.packages("devtools") -devtools::install_github("ohdsi/Capr") -``` - - -# User Documentation - -Documentation can be found on the [package website](https://ohdsi.github.io/Capr/). - - -PDF versions of the documentation are also available: - -- Vignette: [Using Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Using-Capr.pdf) -- Vignette: [Capr Examples](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Examples.pdf) -- Vignette: [Working with Concept Sets in Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Capr-conceptSets.pdf) -- Vignette: [Capr for Templating Cohort Definitions](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_templates.pdf) -- Vignette: [Capr components](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_objects.pdf) -- [Design Document](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_design.pdf) -- [Package manual](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/Capr.pdf) - -# Support - -- Developer questions/comments/feedback: OHDSI Forum -- We use the GitHub issue tracker for all bugs/issues/enhancements - -# Contributing - -Read [here](https://ohdsi.github.io/Hades/contribute.html) how you can contribute to this package. - -# License - -Capr is licensed under Apache License 2.0 - -# Development - -Capr is being developed in R Studio. - -# Acknowledgements - -- This package is maintained by Martin Lavallee and Adam Black +# Capr + + + +[![codecov.io](https://codecov.io/github/OHDSI/Capr/coverage.svg?branch=main)](https://app.codecov.io/gh/OHDSI/Capr?branch=main) [![Build Status](https://github.com/OHDSI/Capr/workflows/R-CMD-check/badge.svg)](https://github.com/OHDSI/Capr/actions?query=workflow%3AR-CMD-check) + + + +Capr is part of [HADES](https://ohdsi.github.io/Hades/) + +# Introduction + +The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model. + +Learn more about the OHDSI approach to cohort building in the [cohorts chapter of the Book of OHDSI.](https://ohdsi.github.io/TheBookOfOhdsi/Cohorts.html) + +# Installation + + +Users can install the current development version of Capr from [GitHub](https://github.com/) with: + +``` r +# install.packages("devtools") +devtools::install_github("ohdsi/Capr") +``` + + +# User Documentation + +Documentation can be found on the [package website](https://ohdsi.github.io/Capr/). + + +PDF versions of the documentation are also available: + +- Vignette: [Using Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Using-Capr.pdf) +- Vignette: [Capr Examples](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Examples.pdf) +- Vignette: [Working with Concept Sets in Capr](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/Capr-conceptSets.pdf) +- Vignette: [Capr for Templating Cohort Definitions](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_templates.pdf) +- Vignette: [Capr components](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_objects.pdf) +- [Design Document](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/pdf_vignette/capr_design.pdf) +- [Package manual](https://raw.githubusercontent.com/OHDSI/Capr/main/extras/Capr.pdf) + +# Support + +- Developer questions/comments/feedback: OHDSI Forum +- We use the GitHub issue tracker for all bugs/issues/enhancements + +# Contributing + +Read [here](https://ohdsi.github.io/Hades/contribute.html) how you can contribute to this package. + +# License + +Capr is licensed under Apache License 2.0 + +# Development + +Capr is being developed in R Studio. + +# Acknowledgements + +- This package is maintained by Martin Lavallee and Adam Black - Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC \ No newline at end of file From c1c38fae1d75f6623ef885fe86e34c6148c46705 Mon Sep 17 00:00:00 2001 From: Guus Wilmink Date: Fri, 23 Aug 2024 15:07:10 +0200 Subject: [PATCH 129/130] remove library references --- R/countOccurrences.R | 4 ---- 1 file changed, 4 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index b24aa6ac..63c9d3d3 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -27,10 +27,6 @@ #' #' @export countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_schema, save_path = NULL) { - library(DBI) - library(dplyr) - library(tibble) - stopifnot(is.vector(v)) stopifnot(is.character(tables) & is.vector(tables)) stopifnot(is.list(links)) From 1d62debc9d50131ecc7ac726ea26e774e40aef7b Mon Sep 17 00:00:00 2001 From: Guus Wilmink <143344142+guuswilmink@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:36:47 +0200 Subject: [PATCH 130/130] dplyr package references fix --- R/countOccurrences.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/countOccurrences.R b/R/countOccurrences.R index 63c9d3d3..acf134a8 100644 --- a/R/countOccurrences.R +++ b/R/countOccurrences.R @@ -75,7 +75,7 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ ind_not_in_data <- which(!(v %in% combined_res$concept_id)) combined_res <- combined_res |> - bind_rows(tibble( + dplyr::bind_rows(tibble( concept_id = v[ind_not_in_data], concept_name = "Unknown; concept_id not found in data", domain_id = "Unknown; concept_id not found in data", @@ -91,16 +91,16 @@ countOccurrences <- function(v, tables, links, db_connection, cdm_schema, vocab_ } # Combine all results into a single data frame and transform - final_res <- bind_rows(results) |> - group_by(concept_id, concept_name, domain_id) |> - summarise( + final_res <- dplyr::bind_rows(results) |> + dplyr::group_by(concept_id, concept_name, domain_id) |> + dplyr::summarise( count_persons = sum(count_persons), count_records = sum(count_records), desc_count_person = sum(desc_count_person), desc_count_record = sum(desc_count_record) ) |> - ungroup() |> - arrange(desc(desc_count_record)) + dplyr::ungroup() |> + dplyr::arrange(desc(desc_count_record)) if (!is.null(save_path)) { readr::write_csv(final_res, paste0(save_path, "/", "count_occurrences.csv"))