-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TOML config and schema files that replace the YAML versions.
- Loading branch information
Lawrie
authored and
Lawrie
committed
Feb 12, 2021
1 parent
5e19d04
commit 49ed9d0
Showing
7 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
projectname = "influenza-cases-spine" | ||
description = "Construct a spine containing only people who have had influenza" | ||
output_directory = "output" # During testing this expands to: /path/to/SpineBasedRecordLinkage.jl/test/output/ | ||
spine = {datafile = "", schemafile = "schema/spine.toml"} | ||
append_to_spine = true | ||
construct_entityid_from = ["firstname", "lastname", "birthdate"] | ||
tables = [{tablename = "influenza_cases", datafile = "data/influenza_cases.csv", schemafile = "schema/influenza_cases.toml"}] | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", middlename = "middlename", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "lastname", spinecolumn = "lastname", distancemetric = "levenshtein", threshold = 0.3}] | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {lastname = "lastname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "firstname", spinecolumn = "firstname", distancemetric = "levenshtein", threshold = 0.5}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
projectname = "health-service-usage" | ||
description = "Construct a spine from 3 health service usage tables and link the tables to the spine." | ||
output_directory = "output" # During testing this expands to: /path/to/SpineBasedRecordLinkage.jl/test/output/ | ||
spine = {datafile = "", schemafile = "schema/spine.toml"} | ||
append_to_spine = true | ||
construct_entityid_from = ["firstname", "lastname", "birthdate"] | ||
tables = [ | ||
{tablename = "hospital_admissions", datafile = "data/hospital_admissions.csv", schemafile = "schema/hospital_admissions.toml"}, | ||
{tablename = "emergency_presentations", datafile = "data/emergency_presentations.csv", schemafile = "schema/emergency_presentations.toml"}, | ||
{tablename = "influenza_cases", datafile = "data/influenza_cases.csv", schemafile = "schema/influenza_cases.toml"} | ||
] | ||
|
||
[[criteria]] | ||
tablename = "hospital_admissions" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "emergency_presentations" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "emergency_presentations" | ||
exactmatch = {birthdate = "birthdate"} | ||
approxmatch = [ | ||
{datacolumn = "firstname", spinecolumn = "firstname", distancemetric = "levenshtein", threshold = 0.3}, | ||
{datacolumn = "lastname", spinecolumn = "lastname", distancemetric = "levenshtein", threshold = 0.3} | ||
] | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", middlename = "middlename", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "lastname", spinecolumn = "lastname", distancemetric = "levenshtein", threshold = 0.3}] | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {lastname = "lastname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "firstname", spinecolumn = "firstname", distancemetric = "levenshtein", threshold = 0.5}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
projectname = "influenza-cases-link" | ||
description = "Link the emergencies, admissions and influenza tables to the spine that was constructed from the influenza cases table." | ||
output_directory = "output" # During testing this expands to: /path/to/SpineBasedRecordLinkage.jl/test/output/ | ||
spine = {datafile = "output/spine.tsv", schemafile = "schema/spine.toml"} | ||
append_to_spine = false | ||
tables = [ | ||
{tablename = "hospital_admissions", datafile = "data/hospital_admissions.csv", schemafile = "schema/hospital_admissions.toml"}, | ||
{tablename = "emergency_presentations", datafile = "data/emergency_presentations.csv", schemafile = "schema/emergency_presentations.toml"}, | ||
{tablename = "influenza_cases", datafile = "data/influenza_cases.csv", schemafile = "schema/influenza_cases.toml"} | ||
] | ||
|
||
[[criteria]] | ||
tablename = "emergency_presentations" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "emergency_presentations" | ||
exactmatch = {birthdate = "birthdate"} | ||
approxmatch = [ | ||
{datacolumn = "firstname", spinecolumn = "firstname", distancemetric = "levenshtein", threshold = 0.3}, | ||
{datacolumn = "lastname", spinecolumn = "lastname", distancemetric = "levenshtein", threshold = 0.3} | ||
] | ||
|
||
[[criteria]] | ||
tablename = "hospital_admissions" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", middlename = "middlename", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", lastname = "lastname", birthdate = "birthdate"} | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {firstname = "firstname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "lastname", spinecolumn = "lastname", distancemetric = "levenshtein", threshold = 0.3}] | ||
|
||
[[criteria]] | ||
tablename = "influenza_cases" | ||
exactmatch = {lastname = "lastname", birthdate = "birthdate"} | ||
approxmatch = [{datacolumn = "firstname", spinecolumn = "firstname", distancemetric = "levenshtein", threshold = 0.5}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name = "emergency_presentations" | ||
description = "Each row specifies a presentation at a hospital emergency department" | ||
primarykey = ["hospitalid", "campusid", "presentationdate", "patientid"] | ||
columns = [ | ||
{name = "hospitalid", description = "Hospital ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "1:9999"}, | ||
{name = "campusid", description = "Campus ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "1:9999"}, | ||
{name = "patientid", description = "Patient ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "Int"}, | ||
{name = "presentationdate", description = "Presentation date", datatype = "Date", iscategorical = false, isrequired = true, isunique = false, validvalues = "Date"}, | ||
{name = "firstname", description = "First name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "middlename", description = "Middle name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "lastname", description = "Last name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "birthdate", description = "Birth date", datatype = "Date", iscategorical = false, isrequired = false, isunique = false, validvalues = "Date"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name = "hospital_admissions" | ||
description = "Each row specifies an admission to a hospital" | ||
primarykey = ["hospitalid", "campusid", "admissiondate", "dischargedate", "patientid"] | ||
columns = [ | ||
{name = "hospitalid", description = "Hospital ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "1:9999"}, | ||
{name = "campusid", description = "Campus ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "1:9999"}, | ||
{name = "patientid", description = "Patient ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "Int"}, | ||
{name = "admissiondate", description = "Date of admission", datatype = "Date", iscategorical = false, isrequired = true, isunique = false, validvalues = "Date"}, | ||
{name = "dischargedate", description = "Date of discharge", datatype = "Date", iscategorical = false, isrequired = true, isunique = false, validvalues = "Date"}, | ||
{name = "firstname", description = "First name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "middlename", description = "Middle name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "lastname", description = "Last name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "birthdate", description = "Birth date", datatype = "Date", iscategorical = false, isrequired = false, isunique = false, validvalues = "Date"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name = "influenza_cases" | ||
description = "Each row specifies report of a case of influenza" | ||
primarykey = "reportid" | ||
columns = [ | ||
{name = "reportid", description = "Report ID", datatype = "Int", iscategorical = false, isrequired = true, isunique = true, validvalues = "Int"}, | ||
{name = "reportdate", description = "Date of case notification", datatype = "Date", iscategorical = false, isrequired = true, isunique = false, validvalues = "Date"}, | ||
{name = "firstname", description = "First name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "middlename", description = "Middle name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "lastname", description = "Last name", datatype = "String", iscategorical = false, isrequired = false, isunique = false, validvalues = "String"}, | ||
{name = "birthdate", description = "Birth date", datatype = "Date", iscategorical = false, isrequired = false, isunique = false, validvalues = "Date"}, | ||
{name = "patient_postcode", description = "Postcode of the patient's residential address", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "3000:3999"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name = "spine" | ||
description = "Linkage spine. Each row specifies a person" | ||
primarykey = "EntityId" | ||
columns =[ | ||
{name = "EntityId", description = "Entity ID", datatype = "UInt", iscategorical = false, isrequired = true, isunique = true, validvalues = "UInt"}, | ||
{name = "firstname", description = "First name", datatype = "String", iscategorical = false, isrequired = true, isunique = false, validvalues = "String"}, | ||
{name = "middlename", description = "Middle name", datatype = "String", iscategorical = false, isrequired = true, isunique = false, validvalues = "String"}, | ||
{name = "lastname", description = "Last name", datatype = "String", iscategorical = false, isrequired = true, isunique = false, validvalues = "String"}, | ||
{name = "birthdate", description = "Birth date", datatype = "Date", iscategorical = false, isrequired = true, isunique = false, validvalues = "Date"}, | ||
{name = "patient_postcode", description = "Postcode of the patient's residential address", datatype = "Int", iscategorical = false, isrequired = true, isunique = false, validvalues = "3000:3999"} | ||
] |