Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ynic-public
yias
Commits
34583855
Commit
34583855
authored
Jan 22, 2020
by
Mark Hymers
Browse files
Fix acceptance of STRUCTURAL scans
Signed-off-by:
Mark Hymers
<
mark.hymers@ynic.york.ac.uk
>
parent
a23550d8
Pipeline
#1425
passed with stage
in 9 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
yias/destinations.py
View file @
34583855
...
...
@@ -96,6 +96,10 @@ class RawAndAnonDestination(Destination):
self
.
regex_study
.
search
(
studydesc
):
return
True
if
self
.
regex_patient
.
search
(
patientid
)
and
\
studydesc
in
self
.
anon_extra_studies
:
return
True
return
False
def
get_raw_directory
(
self
,
patientid
,
studydesc
):
...
...
yias/tests/test_destinations.py
View file @
34583855
...
...
@@ -69,6 +69,7 @@ class TestRawAndAnonDestination:
assert
(
dest
.
for_us
(
'R1234'
,
'P1008:Test_series'
)
is
True
)
assert
(
dest
.
for_us
(
'R1234'
,
'P1008a'
)
is
True
)
assert
(
dest
.
for_us
(
'R1234'
,
'P1008a:Test_series'
)
is
True
)
assert
(
dest
.
for_us
(
'R1234'
,
'STRUCTURAL'
)
is
True
)
assert
(
dest
.
for_us
(
'E1234'
,
'TEST'
)
is
False
)
assert
(
dest
.
for_us
(
'E1234'
,
'C1008'
)
is
True
)
assert
(
dest
.
for_us
(
'E1234'
,
'C1008a'
)
is
True
)
...
...
@@ -76,6 +77,7 @@ class TestRawAndAnonDestination:
assert
(
dest
.
for_us
(
'E1234'
,
'P1008'
)
is
True
)
assert
(
dest
.
for_us
(
'E1234'
,
'P1008a'
)
is
True
)
assert
(
dest
.
for_us
(
'E1234'
,
'P1008a:Test_series'
)
is
True
)
assert
(
dest
.
for_us
(
'E1234'
,
'STRUCTURAL'
)
is
True
)
assert
(
dest
.
for_us
(
'NOPE'
,
'TEST'
)
is
False
)
assert
(
dest
.
for_us
(
'NOPE'
,
'C1008'
)
is
False
)
assert
(
dest
.
for_us
(
'NOPE'
,
'C1008:Test_series'
)
is
False
)
...
...
@@ -84,6 +86,7 @@ class TestRawAndAnonDestination:
assert
(
dest
.
for_us
(
'NOPE'
,
'P1008'
)
is
False
)
assert
(
dest
.
for_us
(
'NOPE'
,
'P1008a'
)
is
False
)
assert
(
dest
.
for_us
(
'NOPE'
,
'P1008a:Test_series'
)
is
False
)
assert
(
dest
.
for_us
(
'NOPE'
,
'STRUCTURAL'
)
is
False
)
def
test_get_raw_directory
(
self
,
tmpdir
):
from
yias.destinations
import
RawAndAnonDestination
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment