@@ -25,7 +25,7 @@ def get_client(service_account_json, api_key):
25
25
"""Returns an authorized API client by discovering the Healthcare API and
26
26
creating a service object using the service account credentials JSON."""
27
27
api_scopes = ['https://www.googleapis.com/auth/cloud-platform' ]
28
- api_version = 'v1alpha '
28
+ api_version = 'v1alpha2 '
29
29
discovery_api = 'https://healthcare.googleapis.com/$discovery/rest'
30
30
service_name = 'healthcare'
31
31
@@ -181,7 +181,7 @@ def deidentify_dataset(
181
181
cloud_region ,
182
182
dataset_id ,
183
183
destination_dataset_id ,
184
- whitelist_tags ):
184
+ keeplist_tags ):
185
185
"""Creates a new dataset containing de-identified data
186
186
from the source dataset.
187
187
"""
@@ -195,7 +195,27 @@ def deidentify_dataset(
195
195
'destinationDataset' : destination_dataset ,
196
196
'config' : {
197
197
'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
+ }
199
219
}
200
220
}
201
221
}
@@ -261,9 +281,9 @@ def parse_command_line_args():
261
281
'will be written' )
262
282
263
283
parser .add_argument (
264
- '--whitelist_tags ' ,
284
+ '--keeplist_tags ' ,
265
285
default = None ,
266
- help = 'The data to whitelist , for example "PatientID" '
286
+ help = 'The data to keeplist , for example "PatientID" '
267
287
'or "StudyInstanceUID"' )
268
288
269
289
command = parser .add_subparsers (dest = 'command' )
@@ -334,7 +354,7 @@ def run_command(args):
334
354
args .cloud_region ,
335
355
args .dataset_id ,
336
356
args .destination_dataset_id ,
337
- args .whitelist_tags )
357
+ args .keeplist_tags )
338
358
339
359
340
360
def main ():
0 commit comments