This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Query Template: find exact matches between source vocabulary code strings and an OMOP standard terminology concept code | |
SELECT DISTINCT | |
CONCAT('"', c.concept_code, '"') AS source_code, | |
c.concept_name AS source_name, | |
c.domain_id AS source_domain, | |
c.vocabulary_id AS source_vocabulary, | |
CONCAT('"', c1.concept_code, '"') AS standard_code, | |
c1.concept_name AS standard_name, | |
c1.domain_id AS standard_domain, | |
c1.vocabulary_id AS standard_vocabulary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DISTINCT r.relationship_id, | |
c1.concept_id AS SOURCE_CONCEPT_ID, | |
c1.concept_name AS SOURCE_CONCEPT_LABEL, | |
c2.concept_id AS TARGET_CONCEPT_ID, | |
c2.concept_name AS TARGET_CONCEPT_LABEL, | |
FROM | |
sandbox-omop.oct_2020.concept_relationship r | |
JOIN sandbox-omop.oct_2020.concept c1 ON c1.concept_id = r.concept_id_1 | |
JOIN sandbox-omop.oct_2020.concept c2 ON c2.concept_id = r.concept_id_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################################## | |
# Concept_Annotator.py | |
# Purpose: script annotates clinical concepts to ontology terms using the NCBO API | |
# version 1.0.0 | |
########################################################################################## | |
import urllib2 | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 'MetaOmic: Transcriptomic Data Analysis' | |
author: 'Tiffany J. Callahan' | |
date: 'July 27, 2018' | |
output: | |
html_notebook: default | |
html_document: default | |
--- | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "CHCO R Training" | |
subtitle: "Hands-on Experience Importing and Exporting Data" | |
author: "Tiffany J. Callahan" | |
output: html_notebook | |
--- | |
# Purpose | |
This [R Markdown Notebook](http://rmarkdown.rstudio.com) is intended to be used for practicing importing and exporting different kinds of data. This Notebook contains code for importing the following types of data: | |
* [Flat Files](#txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install list of packages | |
install.packages(c("dplyr", "dbplyr", "swirl", "odbc", "RODBC", "knitr", "DBI", "packrat", "rstudioapi", "rmarkdown", "codetools", "devtools", "ggplot2")) | |
# load installed packages | |
my_packages <- c("dplyr", "dbplyr", "swirl", "odbc", "RODBC", "knitr", "DBI", "packrat", "rstudioapi", "rmarkdown", "codetools", "devtools", "ggplot2") | |
lapply(my_packages, library, character.only = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* DEMOGRAPHICS */ | |
SELECT DISTINCT pat.pat_id, pat.pat_mrn_id AS mrn, pat.pat_last_name AS last_name, pat.pat_first_name AS first_name, | |
substr(pat.pat_middle_name,1,1) AS mid_initial, pat2.maiden_name AS maiden_name, pat.birth_date AS dob, c.name AS county, | |
s.name AS state, pat.zip AS zip, enc.contact_date AS encounter_date, floor(months_between(enc.contact_date, pat.birth_date)/12) AS age, | |
(CASE WHEN sex.abbr='oth' THEN 'o' ELSE sex.abbr END) AS sex, | |
(SELECT listagg(race.name, ',') WITHIN GROUP (ORDER BY pr.line) | |
FROM clarity.patient_race pr, clarity.zc_patient_race race |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "CHCO R Training" | |
subtitle: "Hands-on Experience using swirl" | |
author: "Tiffany J. Callahan" | |
output: html_notebook | |
--- | |
# Purpose | |
This [R Markdown Notebook](http://rmarkdown.rstudio.com) is intended to be used for all [swirl](https://swirlstats.com/) lessons as part of the CHCO R Training. It contains all the code needed to download and install all R swirl lessons. It also includes. Participants in the training are encouraged to create a new code chunk for each lesson. Participants should this to document their progress and to note areas for improvement. |
NewerOlder