Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pinar Alper
metadata-tools
Commits
65df7741
Commit
65df7741
authored
Mar 24, 2021
by
Vilem Ded
Browse files
fixing submission sheet contact indices
parent
7c26b4b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
metadata_tools/importxls/dish_xls_exporter.py
View file @
65df7741
...
...
@@ -90,8 +90,8 @@ class DishXlsExporter:
dataset_dict
[
"studies"
].
append
(
cohort_dict
)
elif
is_data
(
sheet
):
datadec_dict
=
{
'title'
:
sheet
[
1
,
1
],
'source_study'
:
sheet
[
2
,
1
],
datadec_dict
=
{
'title'
:
sheet
[
1
,
1
]
.
strip
()
,
'source_study'
:
sheet
[
2
,
1
]
.
strip
()
,
"data_types"
:[]}
datadec_dict
[
"data_type_notes"
]
=
sheet
[
7
,
1
]
...
...
@@ -274,20 +274,20 @@ class DishXlsExporter:
{
"first_name"
:
get_names_from_string
(
sheet
[
12
,
1
])[
0
],
"last_name"
:
get_names_from_string
(
sheet
[
12
,
1
])[
1
],
"role"
:
"Legal_Representative"
,
"email"
:
sheet
[
1
0
,
1
].
strip
(),
"email"
:
sheet
[
1
3
,
1
].
strip
(),
"affiliations"
:
[
self
.
process_institution
(
sheet
[
7
,
1
])]
},
{
"first_name"
:
get_names_from_string
(
sheet
[
14
,
1
])[
0
],
"last_name"
:
get_names_from_string
(
sheet
[
14
,
1
])[
1
],
"role"
:
"Data_Protection_Officer"
,
"email"
:
sheet
[
1
0
,
1
].
strip
(),
"email"
:
sheet
[
1
5
,
1
].
strip
(),
"affiliations"
:
[
self
.
process_institution
(
sheet
[
7
,
1
])]
}])
if
sheet
[
16
,
1
]
and
sheet
[
18
,
1
]:
dataset_dict
[
"contacts"
].
append
({
"first_name"
:
get_names_from_string
(
sheet
[
1
4
,
1
])[
0
],
"last_name"
:
get_names_from_string
(
sheet
[
1
4
,
1
])[
1
],
dataset_dict
[
"contacts"
].
append
({
"first_name"
:
get_names_from_string
(
sheet
[
1
6
,
1
])[
0
],
"last_name"
:
get_names_from_string
(
sheet
[
1
6
,
1
])[
1
],
"role"
:
sheet
[
18
,
1
],
"email"
:
sheet
[
1
0
,
1
].
strip
(),
"email"
:
sheet
[
1
7
,
1
].
strip
(),
"affiliations"
:
[
self
.
process_institution
(
sheet
[
7
,
1
])]
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment