view PerfsDb/Tests/FindStudy.py @ 210:2c50c8f340c2

test_rest_modalities_in_study
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 Jan 2019 17:39:24 +0100
parents 1ff0d830bb87
children
line wrap: on
line source

from Test import Test

class TestFindStudyByStudyDescription1Result(Test):

    def __init__(self, name:str = "FindStudyByStudyDescription1Result"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"StudyDescription": "99999-99999"}
        )

class TestFindStudyByStudyDescription0Results(Test):

    def __init__(self, name:str = "FindStudyByStudyDescription0Results"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"StudyDescription": "X"}
        )

class TestFindStudyByPatientId1Result(Test):

    def __init__(self, name:str = "FindStudyByPatientId1Result"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"PatientID": "99999"}
        )

class TestFindStudyByPatientId0Results(Test):

    def __init__(self, name:str = "FindStudyByPatientId0Results"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"PatientID": "X"}
        )        

class TestFindStudyByPatientId5Results(Test):

    def __init__(self, name:str = "FindStudyByPatientId5Results"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"PatientID": "99998"}
        )        

class TestFindStudyByPatientId100Results(Test):

    def __init__(self, name:str = "FindStudyByPatientId100Results"):
        super().__init__(name)

    def test(self):
        self._orthanc.studies.query(
            query = {"PatientID": "99997"}
        )