Skip to content

Commit b703057

Browse files
Merge branch 'tcp-drug-filter' into dev
2 parents b8d342d + 35a00c3 commit b703057

File tree

5 files changed

+52
-5
lines changed

5 files changed

+52
-5
lines changed

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.5.0] - February 23rd, 2024
10+
11+
Patch release to add in some new features and fixes
12+
13+
### Added
14+
15+
- Added Getters for Drug Exposures
16+
17+
* GetDrugExposureStartDate
18+
19+
* GetDrugExposureEndDate
20+
21+
- Misc
22+
23+
* Minor fixes in GetPatientAgeGroup Function
24+
25+
- Extensive test suite for new features
26+
27+
928
## [0.4.0] - December 1st, 2023
1029

1130
Patch release to add in some new features and fixes

CITATION.cff

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authors:
1010
given-names: Fareeda
1111
- family-names: Sanjay
1212
given-names: Jay
13-
title: "OMOPCDMCohortCreator 0.4.0"
14-
version: 0.4.0
13+
title: "OMOPCDMCohortCreator 0.5.0"
14+
version: 0.5.0
1515
doi: 10.5281/zenodo.7052105
16-
date-released: 2023-12-01
16+
date-released: 2024-02-23

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OMOPCDMCohortCreator"
22
uuid = "f525a15e-a73f-4eef-870f-f901257eae22"
33
authors = ["Jacob Zelko <[email protected]>", "Fareeda Abdelazeez", "Varshini Chinta", "Jay Sanjay <[email protected]>"]
4-
version = "0.4.0"
4+
version = "0.5.0"
55

66
[deps]
77
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"

docs/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
4+
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
45
OMOPCDMCohortCreator = "f525a15e-a73f-4eef-870f-f901257eae22"

src/filters.jl

+28-1
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,31 @@ function StateFilterPersonIDs(states; tab = location, join_tab = person)
282282

283283
end
284284

285-
export VisitFilterPersonIDs, ConditionFilterPersonIDs, RaceFilterPersonIDs, GenderFilterPersonIDs, StateFilterPersonIDs
285+
"""
286+
TODO: Update these docstrings
287+
"""
288+
function DrugExposureFilterPersonIDs(
289+
drug_concept_ids, conn;
290+
tab = drug_exposure,
291+
)
292+
df = DBInterface.execute(conn, DrugExposureFilterPersonIDs(drug_concept_ids; tab = tab)) |> DataFrame
293+
294+
return df
295+
296+
end
297+
298+
function DrugExposureFilterPersonIDs(
299+
drug_concept_ids;
300+
tab = drug_exposure,
301+
)
302+
sql =
303+
From(tab) |>
304+
Where(Fun.in(Get.drug_concept_id, drug_concept_ids...)) |>
305+
Group(Get.person_id) |>
306+
q -> render(q, dialect = dialect)
307+
308+
return String(sql)
309+
310+
end
311+
312+
export VisitFilterPersonIDs, ConditionFilterPersonIDs, RaceFilterPersonIDs, GenderFilterPersonIDs, StateFilterPersonIDs

0 commit comments

Comments
 (0)