Skip to content

Commit e2ee411

Browse files
Added OMOP CDM documentation data and books
1 parent 3eae514 commit e2ee411

File tree

11 files changed

+695
-0
lines changed

11 files changed

+695
-0
lines changed
262 KB
Binary file not shown.

data/OMOPCDM/OMOP CDM v5.pdf

1.56 MB
Binary file not shown.
374 KB
Binary file not shown.

data/OMOPCDM/OMOPCDM_FAQ.pdf

805 KB
Binary file not shown.

data/OMOPCDM/TheBookOfOhdsi.pdf

21.8 MB
Binary file not shown.

data/OMOPCDM/api.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# API
2+
3+
This is a list of documentation associated with every single **exported** function from `OMOPCDMCohortCreator`.
4+
There are a few different sections with a brief explanation of what these sections are followed by relevant functions.
5+
6+
```@contents
7+
Pages = ["api.md"]
8+
```
9+
10+
11+
## Getters
12+
13+
This family of functions are dedicated to only getting information concerning a patient or OMOP CDM database.
14+
15+
```@docs
16+
GetDatabasePersonIDs
17+
GetPatientState
18+
GetPatientGender
19+
GetPatientRace
20+
GetPatientEthnicity
21+
GetPatientAgeGroup
22+
GetPatientVisits
23+
GetMostRecentConditions
24+
GetMostRecentVisit
25+
GetVisitCondition
26+
GetDatabaseYearRange
27+
GetDrugExposureIDs
28+
GetDrugConceptIDs
29+
GetDrugAmounts
30+
GetDatabaseCohorts
31+
GetCohortSubjects
32+
GetCohortSubjectStartDate
33+
GetCohortSubjectEndDate
34+
GetVisitProcedure
35+
GetDrugExposureEndDate
36+
GetDrugExposureStartDate
37+
```
38+
39+
## Filters
40+
41+
These functions accepts parameters to produce queries that look for specific subpopulations or information given specific patient identifier(s) (i.e. `person_id`).
42+
43+
```@docs
44+
VisitFilterPersonIDs
45+
ConditionFilterPersonIDs
46+
RaceFilterPersonIDs
47+
GenderFilterPersonIDs
48+
StateFilterPersonIDs
49+
AgeGroupFilterPersonIDs
50+
```
51+
52+
## Generators
53+
54+
The generator functions are to set generate initial connections to an OMOP CDM database or to finalize resulting data from queries into various outputs.
55+
56+
```@docs
57+
GenerateDatabaseDetails
58+
GenerateGroupCounts
59+
GenerateTables
60+
```
61+
62+
## Executors
63+
64+
These functions perform quality assurance checks on data extracts genereated from OMOPCDMCohortCreator queries.
65+
66+
```@docs
67+
ExecuteAudit
68+
```

data/OMOPCDM/contributing.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Contributing to OMOPCDMCohortCreator 😁
2+
3+
OMOPCDMCohortCreator is currently under heavy development as we push to a primary release version.
4+
We follow a workflow pattern that is directly inspired by the [development workflow guide](http://docs.juliaplots.org/latest/contributing/#Development-Workflow-1) found in [`Plots.jl`](https://github.com/JuliaPlots/Plots.jl).
5+
The general workflow we expect contributors to adhere to is as follows:
6+
7+
## 1. Create an Issue about the Problem 📝
8+
9+
If you want to add functionality or to work on a bug you found, open an issue first.
10+
That'll save you from doing work that we may not support for OMOPCDMCohortCreator.
11+
12+
## 2. Fork the repo to your account 🍴
13+
14+
## 3. Create a branch based on what you are developing 🌳
15+
16+
Before making a branch, make sure to check that you are even with master via the following commands within your fork:
17+
18+
```sh
19+
git fetch origin
20+
git checkout master
21+
git merge --ff-only origin/master
22+
```
23+
24+
> The `--ff-only` flag will "fast forward" to newer commits. It will not create new merge commits.
25+
26+
Then, go ahead and create a branch that you could edit with the changes you want to see.
27+
This is done by going into the root and typing: `git branch -b [name of your branch]`
28+
29+
## 4. Test, code, and commit ✏️
30+
31+
Once you have a fork, it is useful to make sure the fork was successful.
32+
To verify that everything is operational, let's test it.
33+
The following procedure is as follows:
34+
35+
1. Go into the root of your fork:
36+
37+
`cd OMOPCDMCohortCreator`
38+
39+
2. Open your Julia REPL and type the following within the repo:
40+
41+
```julia-repl
42+
julia> ]
43+
(@v###) pkg> activate .
44+
(@v###) pkg> test
45+
```
46+
47+
This might take some time, but if the installation on your computer is successful, it should say all tests passed.
48+
49+
After making the changes you wanted to make, run the tests again to make sure you did not introduce any breaking changes.
50+
If everything passed, we can continue on to the next step.
51+
If not, it is the responsibility of the contributor to resolve any conflicts or failing tests.
52+
Don't worry!
53+
We're happy to help you resolve errors. 😄
54+
If you are stuck, go ahead and continue with this tutorial.
55+
56+
The way we do this is in three steps:
57+
58+
1. Add the files you have added or changed via `git add`
59+
60+
2. After adding the files, we need to say what you did to the files (i.e. commit the files). This can be accomplished thusly: `git commit -m "your message"`
61+
62+
3. Finally, let's push these changes to GitHub using `git push --set-upstream origin [name of the branch you made]`
63+
64+
## 5. Submitting your changes to the main project ✅
65+
66+
Almost done! Go to your fork and there should be a section that asks you to make a pull request (PR) from your branch. This allows the maintainers of OMOPCDMCohortCreator to see if they can add your changes to the main project. If not, you can click the "New pull request" button.
67+
68+
Make sure the "base" branch is OMOPCDMCohortCreator `dev` and the "compare" branch is the branch on your fork.
69+
To your PR, add an informative title and description, and link your PR to relevant issues or discussions.
70+
Finally, click "Create pull request".
71+
72+
You may get some questions about it, and possibly suggestions of how to make it ready to go into the main project.
73+
If you had test errors or problems, we are happy to help you.
74+
Then, if all goes according to plan, it gets merged... **Thanks for the contribution!!** 🎉 🎉 🎉
75+
76+
## Note on Adding Dependencies 📚
77+
78+
As a rule, we try to avoid having too many dependencies.
79+
Therefore, we request that if you have a PR that adds a new dependency, please have opened an issue previously.
80+
81+
### Adding Core Dependencies 📒
82+
83+
If you are working on introducing a new core dependency, make sure to add that dependency to the main `Project.toml` for `OMOPCDMCohortCreator`.
84+
To do this, follow these steps:
85+
86+
1. Enter the root of the `OMOPCDMCohortCreator` directory
87+
88+
```sh
89+
cd /path/to/OMOPCDMCohortCreator.jl
90+
```
91+
92+
2. Activate the `OMOPCDMCohortCreator` environment and add the dependency:
93+
94+
```julia-repl
95+
julia> ]
96+
(@v###) pkg> activate .
97+
(OMOPCDMCohortCreator) pkg> add [NAME OF DEPENDENCY]
98+
```
99+
100+
### Adding Test Dependencies 📋
101+
102+
If you are introducing a new test dependency, make sure to add that dependency to the `Project.toml` located in the `OMOPCDMCohortCreator` test directory.
103+
To do this, follow these steps:
104+
105+
1. Enter the test directory inside of the `OMOPCDMCohortCreator` directory
106+
107+
```sh
108+
cd /path/to/OMOPCDMCohortCreator.jl/test/
109+
```
110+
111+
2. Activate the `OMOPCDMCohortCreator` test environment and add the dependency:
112+
113+
```julia
114+
julia> ]
115+
(@v###) pkg> activate .
116+
(test) pkg> add [NAME OF DEPENDENCY]
117+
```

data/OMOPCDM/index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Welcome to the `OMOPCDMCohortCreator.jl` Docs! 👋
2+
3+
> Create cohorts from databases utilizing the OMOP CDM.
4+
5+
This package uses a functional approach to query databases in the [OMOP Common Data Model format](https://www.ohdsi.org/data-standardization/the-common-data-model/) whereby you could build rapidly lines of inquiry into the database.
6+
Furthermore, this package is a companion to those tools found in the [HADES](https://ohdsi.github.io/Hades/) ecosystem.
7+
To get started, visit the [Tutorials](@ref) section as well as visit the [API](@ref) section to see all the functions available.
8+
If you want to contribute, please check out our [Contributing](@ref) guide!
9+
10+
## Main Features 🔧
11+
12+
The biggest features of this package are:
13+
14+
- Incremental building blocks for creating an analysis pipeline in the form of (more information in [API](@ref)):
15+
- "Getter" functions to "get" information from a database
16+
- "Filter" functions to "filter" information from a database
17+
- "Generator" functions to "generate" database information and connections
18+
- "Executor" functions to "execute" on retrieved information
19+
- Automatic targeting and support for the SQL flavors (via [FunSQL.jl](https://mechanicalrabbit.github.io/FunSQL.jl/)):
20+
- `postgresql`
21+
- `sqlite`
22+
- `redshift`
23+
- Prepare SQL queries if unable to connect to database via OMOPCDMCohortCreator that could then be run on a given SQL database directly
24+
- Does not mutate database or require temp tables
25+
- Interoperable with the R language via [JuliaConnectoR](https://github.com/stefan-m-lenz/JuliaConnectoR) to work directly within R syntax (see [Tutorials](@ref))
26+
- Readily parallelizable via [Distributed.jl](https://docs.julialang.org/en/v1/manual/distributed-computing/)
27+
- Complementary to [OHDSI HADES](https://ohdsi.github.io/Hades/) ecosystem tools
28+
- Extensive [test suite](https://github.com/JuliaHealth/OMOPCDMCohortCreator.jl/tree/main/test) to ensure correctness and compliance with privacy preserving methods (HITECH, etc.)
29+
30+
## Why? 🤔
31+
32+
This package was created as the result of work in the [MentalHealthEquity](https://github.com/ohdsi-studies/MentalHealthEquity) network study.
33+
Phenotype definitions work alongside this package and OMOPCDMCohortCreator allows an investigator to quickly iterate and build on top of phenotype definitions and/or concept sets.
34+
Where I personally see this being of use is when an investigator needs to quickly pull information out of a database, iterate and test ideas for a formal phenotype definition rapidly, and reason simply about queries.
35+
36+
## Why Julia? 🤓
37+
38+
Julia itself is built for High Performance Computing and readability.
39+
We wanted to work in a language that could handle the high amounts of data that could manifest in working with OMOP CDM databases.
40+
Julia not only made sense for "big data" operations and readability but also was attractive due to it's ability to work with other programming languages such as R or Python.
41+
Therefore, the benefit is:
42+
43+
- High performance more easily reached on all ranges of hardware
44+
- Lower barrier to entry for new contributors
45+
- Interoperation with other programming languages
46+
47+
In our eyes, we do not see anything lost by choosing Julia as we can easily bridge to other languages.
48+
The idea is that this approach can keep users in the language they are comfortable with while working with a flexible package to quickly perform analyses.

data/OMOPCDM/tutorials.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Tutorials
2+
3+
```@contents
4+
Pages = ["tutorials.md"]
5+
```
6+
7+
These tutorials are designed to equip new users with how to get started with OMOPCDMCohortCreator:
8+
9+
- [Beginner Tutorial](tutorials/beginner_tutorial.md) - a step by step guide on using OMOPCDMCohortCreator to run a mini characterization study with minimal Julia knowledge required! **Difficulty: Easy**
10+
- [Using OMOPCDMCohortCreator with R](tutorials/r_tutorial.md) - a guide on how to use OMOPCDMCohortCreator within R to run a mini characterization study. **Difficulty: Medium**

0 commit comments

Comments
 (0)