Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
concepts-processing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meldb
concepts-processing
Commits
cb24de86
Commit
cb24de86
authored
5 months ago
by
mjbonifa
Browse files
Options
Downloads
Patches
Plain Diff
the _code suffix makes a difference to a lot of thigns, need to work that out
parent
3a6da0b8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
acmc.py
+1
-1
1 addition, 1 deletion
acmc.py
example/phenotype_config.json
+3
-34
3 additions, 34 deletions
example/phenotype_config.json
map.py
+7
-6
7 additions, 6 deletions
map.py
parse.py
+8
-8
8 additions, 8 deletions
parse.py
with
19 additions
and
49 deletions
acmc.py
+
1
−
1
View file @
cb24de86
...
@@ -97,7 +97,7 @@ def main():
...
@@ -97,7 +97,7 @@ def main():
map_process_parser
=
map_subparsers
.
add_parser
(
"
process
"
,
help
=
"
Process map configuration file
"
)
map_process_parser
=
map_subparsers
.
add_parser
(
"
process
"
,
help
=
"
Process map configuration file
"
)
map_process_parser
.
add_argument
(
"
-c
"
,
"
--config-file
"
,
required
=
True
,
help
=
"
Phenotype configuration file
"
)
map_process_parser
.
add_argument
(
"
-c
"
,
"
--config-file
"
,
required
=
True
,
help
=
"
Phenotype configuration file
"
)
map_process_parser
.
add_argument
(
"
-s
"
,
"
--source-codes-dir
"
,
required
=
True
,
help
=
"
Source codes root directory
"
)
map_process_parser
.
add_argument
(
"
-s
"
,
"
--source-codes-dir
"
,
required
=
True
,
help
=
"
Source codes root directory
"
)
map_process_parser
.
add_argument
(
"
-t
"
,
"
--target-coding
"
,
required
=
True
,
choices
=
[
'
read2
'
,
'
read3
'
,
'
icd10
'
,
'
snomed
'
,
'
opcs4
'
],
help
=
"
Specify the target coding (read2, read3, icd10, snomed, opcs4)
"
)
map_process_parser
.
add_argument
(
"
-t
"
,
"
--target-coding
"
,
required
=
True
,
choices
=
[
'
read2
_code
'
,
'
read3
_code
'
,
'
icd10
_code
'
,
'
snomed
_code
'
,
'
opcs4
_code
'
],
help
=
"
Specify the target coding (read2, read3, icd10, snomed, opcs4)
"
)
map_process_parser
.
add_argument
(
"
-o
"
,
"
--output-file
"
,
type
=
str
,
default
=
str
(
map
.
OUTPUT_PATH
.
resolve
()),
help
=
"
Output directory for CSV or OMOP database
"
)
map_process_parser
.
add_argument
(
"
-o
"
,
"
--output-file
"
,
type
=
str
,
default
=
str
(
map
.
OUTPUT_PATH
.
resolve
()),
help
=
"
Output directory for CSV or OMOP database
"
)
# Flags
# Flags
...
...
This diff is collapsed.
Click to expand it.
example/phenotype_config.json
+
3
−
34
View file @
cb24de86
...
@@ -22,24 +22,6 @@
...
@@ -22,24 +22,6 @@
"CODING LIST"
:
"https://git.soton.ac.uk/meld/meldb-external/phenotype/-/tree/main/codes/ClinicalCodes.org%20from%20the%20University%20of%20Manchester/Symptom%20code%20lists/Abdominal%20pain/res176-abdominal-pain.csv "
,
"CODING LIST"
:
"https://git.soton.ac.uk/meld/meldb-external/phenotype/-/tree/main/codes/ClinicalCodes.org%20from%20the%20University%20of%20Manchester/Symptom%20code%20lists/Abdominal%20pain/res176-abdominal-pain.csv "
,
"NOTES"
:
"2023-09-08: Clinical SF confirmed that the clinical view would be that this would need to be recurrent or persistent."
"NOTES"
:
"2023-09-08: Clinical SF confirmed that the clinical view would be that this would need to be recurrent or persistent."
}
}
},
{
"concept_set_name"
:
"CVD_EVENTS"
,
"concept_set_status"
:
"AGREED"
,
"metadata"
:
{
"#"
:
"9"
,
"CONCEPT DESCRIPTION"
:
"Cardiovascular events"
,
"CONCEPT TYPE"
:
"Outcome event"
,
"CONCEPT ONTOLOGY CLASS"
:
"nan"
,
"DATE ADDED "
:
"2023-08-25"
,
"REQUEST REASON "
:
"SF - requested by email - to explore an examplar 'outcome measure'"
,
"SOURCE INFO"
:
"YES"
,
"FUNCTION"
:
"QUERY BY CODING LIST"
,
"FUNCTION.1"
:
"https://clinicalcodes.rss.mhs.man.ac.uk/"
,
"CODING LIST"
:
"https://git.soton.ac.uk/meld/meldb-external/phenotype/-/tree/main/codes/ClinicalCodes.org%20from%20the%20University%20of%20Manchester/Cardiovascular%20events%20(ICD10)/res52-cardiovascular-events-icd10.csv"
,
"NOTES"
:
"2023-11-17 - Code cannot currently be PROCESSED = COMPLETE as no mappings from ICD10 to Read v2 exist, pending confirmation from clinical team on next steps."
,
"Relation to Ontology"
:
"YES WITH ISSUES"
}
}
}
]
]
},
},
...
@@ -51,7 +33,7 @@
...
@@ -51,7 +33,7 @@
{
{
"file"
:
"Symptom code lists/Abdominal pain/res176-abdominal-pain.csv"
,
"file"
:
"Symptom code lists/Abdominal pain/res176-abdominal-pain.csv"
,
"columns"
:
{
"columns"
:
{
"read2"
:
"code"
,
"read2
_code
"
:
"code"
,
"metadata"
:
[
"metadata"
:
[
"description"
"description"
]
]
...
@@ -59,20 +41,7 @@
...
@@ -59,20 +41,7 @@
"concept_set"
:
[
"concept_set"
:
[
"ABDO_PAIN"
"ABDO_PAIN"
]
]
},
{
"file"
:
"Cardiovascular events (ICD10)/res52-cardiovascular-events-icd10.csv"
,
"columns"
:
{
"icd10_code"
:
"code"
,
"metadata"
:
[
"description"
]
},
"concept_set"
:
[
"CVD_EVENTS"
]
}
}
]
]
}
}
]
]
...
...
This diff is collapsed.
Click to expand it.
map.py
+
7
−
6
View file @
cb24de86
...
@@ -203,6 +203,7 @@ def process(config_file, source_codes_dir, target_code_type, translate=True, ver
...
@@ -203,6 +203,7 @@ def process(config_file, source_codes_dir, target_code_type, translate=True, ver
# Perform Structural Changes to file before preprocessing
# Perform Structural Changes to file before preprocessing
# split column with multiple code types
# split column with multiple code types
print
(
"
Processing actions
"
)
if
(
"
actions
"
in
file
and
"
split_col
"
in
file
[
"
actions
"
]
and
"
codes_col
"
in
file
[
"
actions
"
]):
if
(
"
actions
"
in
file
and
"
split_col
"
in
file
[
"
actions
"
]
and
"
codes_col
"
in
file
[
"
actions
"
]):
split_col
=
file
[
"
actions
"
][
"
split_col
"
]
split_col
=
file
[
"
actions
"
][
"
split_col
"
]
codes_col
=
file
[
"
actions
"
][
"
codes_col
"
]
codes_col
=
file
[
"
actions
"
][
"
codes_col
"
]
...
...
This diff is collapsed.
Click to expand it.
parse.py
+
8
−
8
View file @
cb24de86
...
@@ -344,14 +344,14 @@ class Cprd_code(Proto_code):
...
@@ -344,14 +344,14 @@ class Cprd_code(Proto_code):
]
]
code_types
=
{
code_types
=
{
"
read2
"
:
Read2_code
,
"
read2
_code
"
:
Read2_code
,
"
read3
"
:
Read3_code
,
"
read3
_code
"
:
Read3_code
,
"
icd10
"
:
Icd10_code
,
"
icd10
_code
"
:
Icd10_code
,
"
snomed
"
:
Snomed_code
,
"
snomed
_code
"
:
Snomed_code
,
"
opcs4
"
:
Opcs4_code
,
"
opcs4
_code
"
:
Opcs4_code
,
"
atc
"
:
Atc_code
,
"
atc
_code
"
:
Atc_code
,
"
med
"
:
Med_code
,
"
med
_code
"
:
Med_code
,
"
cprd
"
:
Cprd_code
,
"
cprd
_code
"
:
Cprd_code
,
}
}
vocab_types
=
{
vocab_types
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment