@@ -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
340360def main ():
0 commit comments