File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -2726,7 +2726,7 @@ def retrieve_study_metadata(
2726
2726
study_instance_uid = study_instance_uid
2727
2727
)
2728
2728
collection = []
2729
- for series_instance_uid , study_instance_uid in series_identifiers :
2729
+ for study_instance_uid , series_instance_uid in series_identifiers :
2730
2730
collection .extend (
2731
2731
self .retrieve_series_metadata (
2732
2732
study_instance_uid = study_instance_uid ,
Original file line number Diff line number Diff line change @@ -178,6 +178,25 @@ def test_search_for_instances_in_series(file_client):
178
178
for attr in STUDY_ATTRIBUTES :
179
179
assert not hasattr (test_instance_pydicom , attr )
180
180
181
+ def test_retrieve_study_metadata (file_client ):
182
+ instances = file_client .retrieve_study_metadata (
183
+ '1.3.6.1.4.1.5962.1.1.0.0.0.1196530851.28319.0.1' ,
184
+ )
185
+ assert isinstance (instances , list )
186
+ assert len (instances ) > 0
187
+
188
+ for test_instance_json in instances :
189
+ assert isinstance (test_instance_json , dict )
190
+ test_instance_pydicom = Dataset .from_json (test_instance_json )
191
+ attributes = {
192
+ 'SOPClassUID' ,
193
+ 'SOPInstanceUID' ,
194
+ 'SeriesInstanceUID' ,
195
+ 'StudyInstanceUID' ,
196
+ }
197
+ for attr in attributes :
198
+ assert hasattr (test_instance_pydicom , attr )
199
+
181
200
182
201
def test_retrieve_series_metadata (file_client ):
183
202
instances = file_client .retrieve_series_metadata (
You can’t perform that action at this time.
0 commit comments