Commit 0bc2d8a2 authored by Joe Lyons's avatar Joe Lyons

Merge branch '16-accept-structural-scans' into 'master'

Resolve "Accept STRUCTURAL scans"

Closes #16

See merge request !10
parents a23550d8 34583855
Pipeline #1433 passed with stage
in 7 minutes and 7 seconds
......@@ -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):
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment