case class StructuredDeidentification(columnsMap: Map[String, String], seedMap: Map[String, Int] = Collections.emptyMap(), obfuscateRefFile: String = "", obfuscateRefSource: String = "both", days: Int = 0, useRandomDateDisplacement: Boolean = false, dateFormats: List[String] = ..., language: String = Language.English, idColumn: String = "") extends Product with Serializable
Utility class that helps to obfuscate tabular data.
- columnsMap
Is a map that allows to select the name of the column with the entity. The key of the the map is the column in the dataframe and the value of the map is the entity for that column. The default entities are:
- |Entity | description |
- |location| A general location.|
- |location-other| A location that is not country, street,hospital,city or state|
- |street| A street|
- |hospital| The name of a hospital.|
- |city| A city|
- |state|A state|
- |zip| The zip code|
- |country| A country|
- |contact| The contact of one person|
- |username|A username |
- |phone| A number phone.|
- |fax| The number fax|
- |url| A url for internet|
- |email| The email of one person|
- |profession| A profession of one person|
- |name| The name opf one person|
- |doctor|The name of a doctor|
- |patient| The name of the patient|
- |id| A general Id number|
- |bioid|Is a system to screen for protein interactions as they occur in living cells|
- |age|The age of something or someone|
- |organization| Name of one organization o company|
- |healthplan| The id that identify the healthplan|
- |medicalrecord| The identification of a medical record|
- |device|The id that identified a device|
- |date| A general date|
- |ssn| A Social Security Number|
- |ip| A Internet Protocol|
- |passport| A random passport|
- |dln| A Driver's License Number |
- |npi| A National Provider Identifier|
- |c_card| A credit card number|
- |iban| A International Bank Account Number|
- |dea| A Drug Enforcement Administration| If is not present will be masked.
- seedMap
: Allow to add a seed to the column that you want to obfuscate. The seed used to randomly select the entities used during obfuscation mode. By providing the same seed, you can replicate the same mapping multiple times.
- obfuscateRefFile
This is an optional parameter that allows to add your own terms to be used for obfuscation. The file contains as a key the entity and as the value the terms that will be used in the \ obfuscation.
- obfuscateRefSource
The source of obfuscation of to obfuscate the entities.For dates entities doesnt apply tha method. The allowed values are the following: 'file': Takes the entities from the obfuscatorRefFile 'faker': Takes the entities from the Faker module 'both': Takes the entities from the obfuscatorRefFile and the faker module randomly.
- days
Number of days to obfuscate the dates by displacement. If not provided a random integer between 1 and 60 will be used
- useRandomDateDisplacement
Use a random displacement days in dates entities.If true use random displacement days in dates entities,if false use the days
- dateFormats
Format of dates to displaceFormat of dates to displace
- language
The language used to select faker entities. The values are the following: 'en'(English),'de'(German), 'es'(Spanish), 'fr'(French), 'ar'(Arabic) or 'ro'(Romanian). Default:'en'
- idColumn
The column that contains the id of the row. If provided, data will obfuscate consistently by idColumn, especially date entities.
- Alphabetic
- By Inheritance
- StructuredDeidentification
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
StructuredDeidentification(columnsMap: Map[String, String], seedMap: Map[String, Int] = Collections.emptyMap(), obfuscateRefFile: String = "", obfuscateRefSource: String = "both", days: Int = 0, useRandomDateDisplacement: Boolean = false, dateFormats: List[String] = ..., language: String = Language.English, idColumn: String = "")
- columnsMap
Is a map that allows to select the name of the column with the entity. The key of the the map is the column in the dataframe and the value of the map is the entity for that column. The default entities are:
- |Entity | description |
- |location| A general location.|
- |location-other| A location that is not country, street,hospital,city or state|
- |street| A street|
- |hospital| The name of a hospital.|
- |city| A city|
- |state|A state|
- |zip| The zip code|
- |country| A country|
- |contact| The contact of one person|
- |username|A username |
- |phone| A number phone.|
- |fax| The number fax|
- |url| A url for internet|
- |email| The email of one person|
- |profession| A profession of one person|
- |name| The name opf one person|
- |doctor|The name of a doctor|
- |patient| The name of the patient|
- |id| A general Id number|
- |bioid|Is a system to screen for protein interactions as they occur in living cells|
- |age|The age of something or someone|
- |organization| Name of one organization o company|
- |healthplan| The id that identify the healthplan|
- |medicalrecord| The identification of a medical record|
- |device|The id that identified a device|
- |date| A general date|
- |ssn| A Social Security Number|
- |ip| A Internet Protocol|
- |passport| A random passport|
- |dln| A Driver's License Number |
- |npi| A National Provider Identifier|
- |c_card| A credit card number|
- |iban| A International Bank Account Number|
- |dea| A Drug Enforcement Administration| If is not present will be masked.
- seedMap
: Allow to add a seed to the column that you want to obfuscate. The seed used to randomly select the entities used during obfuscation mode. By providing the same seed, you can replicate the same mapping multiple times.
- obfuscateRefFile
This is an optional parameter that allows to add your own terms to be used for obfuscation. The file contains as a key the entity and as the value the terms that will be used in the \ obfuscation.
- obfuscateRefSource
The source of obfuscation of to obfuscate the entities.For dates entities doesnt apply tha method. The allowed values are the following: 'file': Takes the entities from the obfuscatorRefFile 'faker': Takes the entities from the Faker module 'both': Takes the entities from the obfuscatorRefFile and the faker module randomly.
- days
Number of days to obfuscate the dates by displacement. If not provided a random integer between 1 and 60 will be used
- useRandomDateDisplacement
Use a random displacement days in dates entities.If true use random displacement days in dates entities,if false use the days
- dateFormats
Format of dates to displaceFormat of dates to displace
- language
The language used to select faker entities. The values are the following: 'en'(English),'de'(German), 'es'(Spanish), 'fr'(French), 'ar'(Arabic) or 'ro'(Romanian). Default:'en'
- idColumn
The column that contains the id of the row. If provided, data will obfuscate consistently by idColumn, especially date entities.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val columnsMap: Map[String, String]
- val dateFormats: List[String]
- val days: Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val idColumn: String
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val language: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def obfuscateColumns(dataFrame: DataFrame): DataFrame
- val obfuscateRefFile: String
- val obfuscateRefSource: String
- val seedMap: Map[String, Int]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val useRandomDateDisplacement: Boolean
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()