# \[ANN\] OMOPCDMCohortCreator.jl v0.2.0 - Docs, Tests, Features Oh My!

**URL:** https://discourse.julialang.org/t/ann-omopcdmcohortcreator-jl-v0-2-0-docs-tests-features-oh-my/89179
**Category:** Package Announcements
**Tags:** data, juliahealth, database, publc-health
**Created:** [October 24, 2022, 5:11am UTC](https://discourse.julialang.org/t/ann-omopcdmcohortcreator-jl-v0-2-0-docs-tests-features-oh-my/89179 "2022-10-24T05:11:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)
#### Post date: [October 24, 2022, 5:11am UTC](https://discourse.julialang.org/t/ann-omopcdmcohortcreator-jl-v0-2-0-docs-tests-features-oh-my/89179/1 "2022-10-24T05:11:39Z")

</div>

Hi everyone,

It is with pride that my colleagues and I announce the release of [`OMOPCDMCohortCreator.jl`](https://github.com/JuliaHealth/OMOPCDMCohortCreator.jl) 0.2.0! 🎉 Some of the biggest updates are that:

- The [documentation](https://juliahealth.org/OMOPCDMCohortCreator.jl/stable/) has received a massive update with fantastic new [tutorials](https://juliahealth.org/OMOPCDMCohortCreator.jl/stable/tutorials/), an updated [API guide](https://juliahealth.org/OMOPCDMCohortCreator.jl/stable/api/) and a [new contributing section](https://juliahealth.org/OMOPCDMCohortCreator.jl/stable/contributing/) if you want to get involved!

- SQL export has been added to support the creation of prepared SQL statements that can run against an OMOP CDM database in situations where adding software within the database environment (such as Julia or other packages) is not feasible or supported. Example:

```julia
# Five patients with strep throat
strep_patients = [283.0, 326.0, 579.0, 334.0, 559.0]

# Age groups that we will use to bucket patients' ages into
age_groups = [[0, 4], [5, 9], [10, 14], [15, 19], [20, 24], [25, 29], [30, 34], [35, 39], [40, 44], [45, 49], [50, 54], [55, 59], [60, 64], [65, 69], [70, 74], [75, 79], [80, 84], [85, 89], [90, 94], [95, 99]]

# Return the prepared SQL statement
GetPatientAgeGroup(strep_patients; age_groupings = age_groups)

```

Which returns a prepared SQL statement like this:

```plaintext
SELECT
  "PERSON_2"."person_id",
  (CASE WHEN ("PERSON_2"."age" < 5) THEN '0 - 4' WHEN ("PERSON_2"."age" < 10) THEN '5 - 9' WHEN ("PERSON_2"."age" < 15) THEN '10 - 14' WHEN ("PERSON_2"."age" < 20) THEN '15 - 19' WHEN ("PERSON_2"."age" < 25) THEN '20 - 24' WHEN ("PERSON_2"."age" < 30) THEN '25 - 29' WHEN ("PERSON_2"."age" < 35) THEN '30 - 34' WHEN ("PERSON_2"."age" < 40) THEN '35 - 39' WHEN ("PERSON_2"."age" < 45) THEN '40 - 44' WHEN ("PERSON_2"."age" < 50) THEN '45 - 49' WHEN ("PERSON_2"."age" < 55) THEN '50 - 54' WHEN ("PERSON_2"."age" < 60) THEN '55 - 59' WHEN ("PERSON_2"."age" < 65) THEN '60 - 64' WHEN ("PERSON_2"."age" < 70) THEN '65 - 69' WHEN ("PERSON_2"."age" < 75) THEN '70 - 74' WHEN ("PERSON_2"."age" < 80) THEN '75 - 79' WHEN ("PERSON_2"."age" < 85) THEN '80 - 84' WHEN ("PERSON_2"."age" < 90) THEN '85 - 89' WHEN ("PERSON_2"."age" < 95) THEN '90 - 94' WHEN ("PERSON_2"."age" < 100) THEN '95 - 99' END) AS "age_group"
FROM (
  SELECT
    "PERSON_1"."person_id",
    (2022 - "PERSON_1"."year_of_birth") AS "age"
  FROM "PERSON" AS "PERSON_1"
  WHERE ("PERSON_1"."person_id" IN (283.0, 326.0, 579.0, 334.0, 559.0))
) AS "PERSON_2"

```

A few different SQL flavors are supported at the moment but the generated SQL matches ANSI SQL standards as closely as possible.

- Thanks to the excellent work done by @stefan-m-lenz in [JuliaConnectoR](https://github.com/stefan-m-lenz/JuliaConnectoR), there is now a tutorial that shows how to use OMOPCDMCohortCreator within R – very minimal Julia knowledge required!

- An extensive testing suite has been added in this version to ensure correctness and compliance with privacy preserving methods for patient data.

To see the full number of new features, check out the [changelog](https://github.com/JuliaHealth/OMOPCDMCohortCreator.jl/blob/main/CHANGELOG.md)!

The particular use of this tool is going to be highlighted in a forthcoming JuliaCon Proceedings paper as well and I was able to present on results from this package at a [recent conference](https://www.ohdsi.org/2022showcase-80/) where I showed work on health disparities. We will continue pushing forward this tool and if there is any features you need or questions, please let me know!

Thank you!

~ tcp 🌳
