Skip to content

Commit

Permalink
Merge branch 'tcp-drug-filter' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCedarPrince committed Nov 12, 2024
2 parents b8d342d + 35a00c3 commit b703057
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 5 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.5.0] - February 23rd, 2024

Patch release to add in some new features and fixes

### Added

- Added Getters for Drug Exposures

* GetDrugExposureStartDate

* GetDrugExposureEndDate

- Misc

* Minor fixes in GetPatientAgeGroup Function

- Extensive test suite for new features


## [0.4.0] - December 1st, 2023

Patch release to add in some new features and fixes
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors:
given-names: Fareeda
- family-names: Sanjay
given-names: Jay
title: "OMOPCDMCohortCreator 0.4.0"
version: 0.4.0
title: "OMOPCDMCohortCreator 0.5.0"
version: 0.5.0
doi: 10.5281/zenodo.7052105
date-released: 2023-12-01
date-released: 2024-02-23
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OMOPCDMCohortCreator"
uuid = "f525a15e-a73f-4eef-870f-f901257eae22"
authors = ["Jacob Zelko <[email protected]>", "Fareeda Abdelazeez", "Varshini Chinta", "Jay Sanjay <[email protected]>"]
version = "0.4.0"
version = "0.5.0"

[deps]
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
OMOPCDMCohortCreator = "f525a15e-a73f-4eef-870f-f901257eae22"
29 changes: 28 additions & 1 deletion src/filters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,31 @@ function StateFilterPersonIDs(states; tab = location, join_tab = person)

end

export VisitFilterPersonIDs, ConditionFilterPersonIDs, RaceFilterPersonIDs, GenderFilterPersonIDs, StateFilterPersonIDs
"""
TODO: Update these docstrings
"""
function DrugExposureFilterPersonIDs(
drug_concept_ids, conn;
tab = drug_exposure,
)
df = DBInterface.execute(conn, DrugExposureFilterPersonIDs(drug_concept_ids; tab = tab)) |> DataFrame

return df

end

function DrugExposureFilterPersonIDs(
drug_concept_ids;
tab = drug_exposure,
)
sql =
From(tab) |>
Where(Fun.in(Get.drug_concept_id, drug_concept_ids...)) |>
Group(Get.person_id) |>
q -> render(q, dialect = dialect)

return String(sql)

end

export VisitFilterPersonIDs, ConditionFilterPersonIDs, RaceFilterPersonIDs, GenderFilterPersonIDs, StateFilterPersonIDs

0 comments on commit b703057

Please sign in to comment.