GaryY
GaryY

Reputation: 1

Failed to de-identify patient name in DICOM tag (0010, 0010) by calling API "deidentify()" in library @googleapis/healthcare

I am working on a Cloud service for de-identifying DICOM data in a Google Healthcare DICOM store (not DICOM set). I want to replace patient name (value in DICOM tag (0010, 0010)) with a special char (such as '*') or with the name of the value's infoType (such as 'PERSON_NAME').

I tried following test code, NONE of them changed patient Name (i.e. After "deidentify()" call, the patient name in DICOM tag (0010,0010) remains same). Anything wrong in the code ?

Test Code #1:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({           
          sourceStore: sourceStore,
          destinationStore: destinationStore,
          resource: { 
            config: {
             dicom: {  
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS',  
             }, 
             text: {
              transformations: [ 
                {
                  infoTypes:['PERSON_NAME'], 
                  characterMaskConfig:{maskingCharacter: ''}
                }
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        }); 

Test Code #2:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({           
          sourceStore: sourceStore,
          destinationStore: destinationStore,   
          resource: { 
            config: {
             dicom: { 
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS' 
             }, 
             text: {
              transformations: [
                {
                  infoTypes:['PERSON_NAME'], 
                  characterMaskConfig:{maskingCharacter: '*'}
                },                  
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        });

Test Code #3:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({         
          sourceStore: sourceStore,
          destinationStore: destinationStore,
          resource: { 
            config: {
             dicom: { 
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS' 
             }, 
             text: {
              transformations: [
                // replace relevant values with their infoTypes                 
                {
                  infoTypes: [],
                    replaceWithInfoTypeConfig: {}
                } ,                 
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        });

Test Code #4:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({          
          sourceStore: sourceStore,
          destinationStore: destinationStore,
          resource: { 
            config: {
             dicom: {  
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS' 
             }, 
             text: {
              transformations: [
                {
                  infoTypes:['PERSON_NAME'],
                  redactConfig:{}, 
                },
                 
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        }); 

Test Code #5:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({          
          sourceStore: sourceStore,
          destinationStore: destinationStore,
          resource: { 
            config: {
             dicom: {  
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS' 
             }, 
             text: {
              transformations: [
                {
                  infoTypes:[],
                  redactConfig:{}, 
                }, 
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        }); 

Test Code #6:

const res = await healthcare.projects.locations.datasets.dicomStores.deidentify({         
          sourceStore: sourceStore,
          destinationStore: destinationStore,
          resource: { 
            config: {
             dicom: { 
               filterProfile: 'DEIDENTIFY_TAG_CONTENTS' 
             }, 
             text: {
              transformations: [                  
              ]
            },  
             image: {
               textRedactionMode: 'REDACT_SENSITIVE_TEXT',
             }, 
           }, 
           filterConfig: { 
           },  
          },
        }); 

Related google de-ide docs: https://cloud.google.com/healthcare-api/docs/reference/rest/v1/DeidentifyConfig#TagFilterProfile https://cloud.google.com/healthcare-api/docs/how-tos/dicom-deidentify#default_dicom_infotypes

Any help is appreciated !

Upvotes: 0

Views: 108

Answers (0)

Related Questions