Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6a5f44

Browse filesBrowse files
noerogtswast
authored andcommitted
Update datasets.py from v1alpha to v1alpha2 (GoogleCloudPlatform#2010)
* Update datasets.py from v1alpha to v1alpha2 Only backwards-incompatible change is deidentify operation. Tests are unaffected. * Fix styling.
1 parent 3e019f3 commit f6a5f44
Copy full SHA for f6a5f44

File tree

Expand file treeCollapse file tree

1 file changed

+26
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+26
-6
lines changed

‎healthcare/api-client/datasets/datasets.py

Copy file name to clipboardExpand all lines: healthcare/api-client/datasets/datasets.py
+26-6Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_client(service_account_json, api_key):
2525
"""Returns an authorized API client by discovering the Healthcare API and
2626
creating a service object using the service account credentials JSON."""
2727
api_scopes = ['https://www.googleapis.com/auth/cloud-platform']
28-
api_version = 'v1alpha'
28+
api_version = 'v1alpha2'
2929
discovery_api = 'https://healthcare.googleapis.com/$discovery/rest'
3030
service_name = 'healthcare'
3131

@@ -181,7 +181,7 @@ def deidentify_dataset(
181181
cloud_region,
182182
dataset_id,
183183
destination_dataset_id,
184-
whitelist_tags):
184+
keeplist_tags):
185185
"""Creates a new dataset containing de-identified data
186186
from the source dataset.
187187
"""
@@ -195,7 +195,27 @@ def deidentify_dataset(
195195
'destinationDataset': destination_dataset,
196196
'config': {
197197
'dicom': {
198-
'whitelistTags': whitelist_tags
198+
'keepList': {
199+
'tags': [
200+
'Columns',
201+
'NumberOfFrames',
202+
'PixelRepresentation',
203+
'MediaStorageSOPClassUID',
204+
'MediaStorageSOPInstanceUID',
205+
'Rows',
206+
'SamplesPerPixel',
207+
'BitsAllocated',
208+
'HighBit',
209+
'PhotometricInterpretation',
210+
'BitsStored',
211+
'PatientID',
212+
'TransferSyntaxUID',
213+
'SOPInstanceUID',
214+
'StudyInstanceUID',
215+
'SeriesInstanceUID',
216+
'PixelData'
217+
]
218+
}
199219
}
200220
}
201221
}
@@ -261,9 +281,9 @@ def parse_command_line_args():
261281
'will be written')
262282

263283
parser.add_argument(
264-
'--whitelist_tags',
284+
'--keeplist_tags',
265285
default=None,
266-
help='The data to whitelist, for example "PatientID" '
286+
help='The data to keeplist, for example "PatientID" '
267287
'or "StudyInstanceUID"')
268288

269289
command = parser.add_subparsers(dest='command')
@@ -334,7 +354,7 @@ def run_command(args):
334354
args.cloud_region,
335355
args.dataset_id,
336356
args.destination_dataset_id,
337-
args.whitelist_tags)
357+
args.keeplist_tags)
338358

339359

340360
def main():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.