Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Period_prior_to_index function #35

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create cohort on Eunomia for testing
  • Loading branch information
TheCedarPrince committed Jun 14, 2024
commit 96f84574ba06c5e694e25710235f223612e0ab80
56 changes: 56 additions & 0 deletions test/assets/strep_throat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"ConceptSets": [
{
"id": 0,
"name": "[jz] Strep Throat Concepts",
"expression": {
"items": [
{
"concept": {
"CONCEPT_CLASS_ID": "Clinical Finding",
"CONCEPT_CODE": "43878008",
"CONCEPT_ID": 28060,
"CONCEPT_NAME": "Streptococcal sore throat",
"DOMAIN_ID": "Condition",
"INVALID_REASON": "V",
"INVALID_REASON_CAPTION": "Valid",
"STANDARD_CONCEPT": "S",
"STANDARD_CONCEPT_CAPTION": "Standard",
"VOCABULARY_ID": "SNOMED"
}
}
]
}
}
],
"PrimaryCriteria": {
"CriteriaList": [
{
"ConditionOccurrence": {
"CodesetId": 0
}
}
],
"ObservationWindow": {
"PriorDays": 0,
"PostDays": 0
},
"PrimaryCriteriaLimit": {
"Type": "All"
}
},
"QualifiedLimit": {
"Type": "First"
},
"ExpressionLimit": {
"Type": "All"
},
"InclusionRules": [],
"CensoringCriteria": [],
"CollapseSettings": {
"CollapseType": "ERA",
"EraPad": 0
},
"CensorWindow": {},
"cdmVersionRange": ">=5.0.0"
}
13 changes: 13 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ sqlite_conn = SQLite.DB(Eunomia())
GenerateDatabaseDetails(:sqlite, "main")
GenerateTables(sqlite_conn)

cohort = read("./assets/strep_throat.json", String)

#using DBInterface

model = Model(cdm_version=v"5.3.1", cdm_schema="main",
vocabulary_schema="main", results_schema="main",
target_schema="main", target_table="cohort");

sql = translate(cohort, dialect=:sqlite, model=model,
cohort_definition_id=1);

[DBI.execute(sqlite_conn, sub_query) for sub_query in split(sql, ";")[1:end-1]]

@testset "OMOPCDMPathways" begin
@testset "Data-Preprocessing" begin
include("Data-Preprocessing/preprocessing.jl")
Expand Down
Loading