Giter Site home page Giter Site logo

esogettr's Introduction

esogettr

The goal of esogettr is to make it easy to import data from ESO EHR data sources and manipulate it for use in data analytics, modeling, and reporting purposes.

Installation

How to import:

install_github("samuelkordik/esogettr")

Data Sources

ESO Data

esogettr expects ESO data to be downloaded from Ad Hoc to a single directory with the following specifications:

  • Flat file CSV
  • Name: Either “YYYY-MM{table_name}” or “YYYY_{table_name}” with the table names following a pattern that isn’t necessarily logical.

Getting Started

Importing ESO data:

library(esogettr)
## set file_root
file_root <- get_file_root()

## set year and month
year <- set_year()
month <- set_month()

## import incidents (general function)
incidents <- import_eso_data(year, month, "incidents")

## import incidents (specific function)
incidents <- import_incidents(year, month)

Note that you have to set file_root first, as the path to the ESO data may vary based on machine, OS, or network. Years and months are passed as strings, and serve as the filter to get into the right flat file. I know, it’s clunky.

Custom import functions ensure consistent typing, and more:

  • import_patients
  • import_incidents: adds dtDate for incident and month, which is YYYY-MM format
  • import_vitals: adds vsDate as date time field
  • import_treatments: Combines General, Airway, Cardiac, Medications, and IV treatments (but strangely not labs). Also adds treatmentDate datetime field.
  • import_stroke: Handles some unknown stuff.
  • import_narrative
  • import_cpr: handles some things. TODO here.
  • import_all_data (imports all years/months/etc.) Garbage function
  • filtered_incidents: Uses an existing data set to filter incidents for import. TODO here with example.

ESO Data Transformations

  • join_crew: Adds Lead, Driver fields.
  • cardiac_arrest: Adds OHCA field. Deprecate in favor of is_cardiac_arrest.
  • rsi: Adds field for RSI meds or not
  • rsi_onscene
  • blood

Utilities

  • merge_eso_data: Useful to merge multiple files downloaded from Ad Hoc together. Key for year-long or larger datasets that run into row length limitations.

Notes

FILE ROOTS:

#file_root <- "C:/Users/skordik/Data/"
#file_root <- "/Users/samuelkordik/Data/"
#file_root <- "W:/Monthly ESO Data/"

esogettr's People

Contributors

samuelkordik avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.