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

[ENH] Moved tool and diagnosis terms into separate json files #590

Merged
merged 8 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
skip = .git,*.pdf,*.svg,package-lock.json
skip = .git,*.pdf,*.svg,package-lock.json,./static/toolTerms.json
#
# ignore-words-list =
8 changes: 4 additions & 4 deletions cypress/e2e/app/simple-e2etest.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ describe("End to end test using a simple UI path through the app", () => {
cy.categorizeColumn("Diagnosis", p_dataset["category_columns"]["Diagnosis"][0]);
cy.categorizeColumn("Assessment Tool", p_dataset["category_columns"]["Assessment Tool"][0]);

cy.get("[data-cy='toolgroup-select']").type("MOCA{enter}");
cy.get("[data-cy='assessment-tool-table']").contains("MOCA").click();
cy.get("[data-cy='toolgroup-select']").type("Wechsler Abbreviated Scale of Intelligence{enter}");
cy.get("[data-cy='assessment-tool-table']").contains("Wechsler Abbreviated Scale of Intelligence").click();
cy.get("[data-cy='assessment-column-table']").contains("iq").click();


Expand Down Expand Up @@ -145,8 +145,8 @@ describe("End to end test using a simple UI path through the app", () => {
expect(fileContent.group.Annotations.Levels.HC.TermURL).to.eq("ncit:C94342");
expect(fileContent.iq.Annotations.IsAbout.Label).to.eq("Assessment tool");
expect(fileContent.iq.Annotations.IsAbout.TermURL).to.eq("nb:Assessment");
expect(fileContent.iq.Annotations.IsPartOf.Label).to.eq("MOCA");
expect(fileContent.iq.Annotations.IsPartOf.TermURL).to.eq("cogAtlas:MOCA");
expect(fileContent.iq.Annotations.IsPartOf.Label).to.eq("Wechsler Abbreviated Scale of Intelligence");
expect(fileContent.iq.Annotations.IsPartOf.TermURL).to.eq("cogAtlas:trm_4b94affc43245");
});
});

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/page/my_happy_annotation-page_tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ describe("to annotate an assessment ", () => {
cy.get("[data-cy='column-linking-table']").contains(desiredColumnMapping.column).click();
});
// Create two tools
cy.get("[data-cy='toolgroup-select']").type("MOCA{enter}");
cy.get("[data-cy='toolgroup-select']").type("UPDRS{enter}");
cy.get("[data-cy='toolgroup-select']").type("Wechsler Abbreviated Scale of Intelligence{enter}");
cy.get("[data-cy='toolgroup-select']").type("Unified Parkinson's Disease Rating Scale{enter}");
// Map columns to tools
const desiredColumnToolMappings = [
{
"column": "iq",
"tool": "MOCA"
"tool": "Wechsler Abbreviated Scale of Intelligence"
},
{
"column": "stroop",
"tool": "UPDRS"
"tool": "Unified Parkinson's Disease Rating Scale"
}
];
desiredColumnToolMappings.forEach(desiredColumnToolMapping => {
Expand Down
86 changes: 86 additions & 0 deletions static/diagnosisTerms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[
{
"label":"Acute depression",
"identifier":"snomed:712823008"
},
{
"label":"Anxiety",
"identifier":"snomed:48694002"
},
{
"label":"Anxiety disorder",
"identifier":"snomed:197480006"
},
{
"label":"Attention deficit hyperactivity disorder",
"identifier":"snomed:406506008"
},
{
"label":"Autism spectrum disorder",
"identifier":"snomed:35919005"
},
{
"label":"Borderline personality disorder",
"identifier":"snomed:20010003"
},
{
"label":"Concussion injury of brain",
"identifier":"snomed:110030002"
},
{
"label":"Disorder of cardiovascular system",
"identifier":"snomed:49601007"
},
{
"label":"Dyslexia",
"identifier":"snomed:59770006"
},
{
"label":"Fibromyalgia",
"identifier":"snomed:203082005"
},
{
"label":"Hearing problem",
"identifier":"snomed:300228004"
},
{
"label":"Mental disorder",
"identifier":"snomed:74732009"
},
{
"label":"Migraine",
"identifier":"snomed:37796009"
},
{
"label":"Schizophrenia",
"identifier":"snomed:58214004"
},
{
"label":"Separation anxiety",
"identifier":"snomed:126943008"
},
{
"label":"Smoker",
"identifier":"snomed:77176002"
},
{
"label":"Social phobia",
"identifier":"snomed:25501002"
},
{
"label":"Specific spelling disorder",
"identifier":"snomed:268738002"
},
{
"label":"Traumatic brain injury",
"identifier":"snomed:127295002"
},
{
"label":"Visual impairment",
"identifier":"snomed:397540003"
},
{
"label":"Healthy Control",
"identifier":"ncit:C94342"
}
]
Loading