SAFEHR-data / ramses-package

R Package for Data-Driven Antimicrobial Stewardship & Surveillance in Hospitals
https://ramses-antibiotics.web.app/
GNU General Public License v3.0
2 stars 0 forks source link

Understanding how microbiology laboratory data is stored using the sample data from the Leicester OMOP extract #45

Open AngharadGreen opened 3 days ago

AngharadGreen commented 3 days ago

Here I want to:

AngharadGreen commented 3 days ago

Explore the different tables from the extract to identify which ones contain the relevant data and matching concept table to tables that contain the relevant microbiology data

First look at the following tables to identify microbiology data:

I read in these four tables as data frames into R:

library(arrow)

concept_df <- read_parquet("concept.parquet")
condition_df <- read_parquet("CONDITION_OCCURRENCE.parquet")
specimen_df <- read_parquet("SPECIMEN.parquet")
observation_df <- read_parquet("OBSERVATION.parquet")
measurement_df <- read_parquet("MEASUREMENT.parquet")
visit_occurence_df <- read_parquet("VISIT_OCCURRENCE.parquet")
provider_df<- read_parquet("VISIT_OCCURRENCE.parquet")

Looking at structure of the concept table - when filtering the concept_name column based on the search term microbiology, this column contains useful information about corresponds to the result of a microbiology lab result and each concept_name has an associated concept_id and a concept_code. There is also a domain_id column that indicates the OMOP table this information would be linked to.

Currently filtering information from the OMOP data frames based on concept IDs related to Microbiology - using E.coli as an example to understand how microbiology lab test results are stored across the different OMOP tables