API documentation
The following table gives an overview of all available REST interfaces.
| Name | Since | Method | Path | Consumes |
|---|---|---|---|---|
| Pseudonymize | v1.0.0 | POST | /v1/process | Bundle |
| Pseudonymize (batch) | v2.1.0 | POST | /v1/process/all | Array of Bundles |
| Pseudonymize (Param) | v5.1.0 | POST | /entitylist/psn-service/$pseudonymize | Parameters |
| Exists | v5.1.0 | POST | /entitylist/psn-service/pseudonym/exists | Bundle |
| Depseudonymize | v4.0.0 | POST | /v1/resolve | Bundle |
| Save Pseudonym | v2.1.0 | POST | /entitylist/psn-service/pseudonym/save | Parameters |
| Get Bloomfilter | v2.1.0 | POST | /entitylist/psn-service/bloomfilter | Parameters |
| Translate Pseudonym | v5.3.0 | POST | /entitylist/depsn-service/pseudonym/translate | Bundle |
Pseudonymize
This REST interface accepts a FHIR Bundle as input.
Multi-PSN Support
Since version 2.1.0, multi-psn support is included. This means, that for each entity (e.g. patient), multiple pseudonyms can be created, e.g. on a per project basis. Note that a so-called internal pseudonym is created in any case. This is the pseudonym used in the default case (see below). In case a target system is provided a so-called external pseudonym is created in addition to the internal pseudonym (see below).
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Pseudonymize |
| URL | /v1/process |
| Required client role | trustcenter-facade (usage-allowed), backend-entitylist (usage-allowed)1 |
| Request type | POST |
| Request parameter | targetSystem |
| Request body | JSON FHIR Bundle |
Response content
The response is a FHIR Bundle with one entry per resource in the input. Each entry contains the pseudonymized resource and an HTTP status.
| Resource type | Fields returned |
|---|---|
| Patient | Pseudonym identifier · gender (if provided) · birthDate (year only) |
| Encounter | Pseudonym identifier |
| Other | Pseudonym identifier |
Note: For Patient resources, only the birth year is echoed back (e.g.
"1970"instead of"1970-02-01"). Month and day are deliberately dropped to limit re-identification risk. No postal address or other IDAT is included in the response.
The pseudonym identifier always has use = secondary and system urn:fdc:difuture.de:trustcenter.plain (or urn:fdc:difuture.de:trustcenter.encrypted when transport encryption is enabled).
Example data
Input
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"21001",
"period":{
"start":"2017-01-01T10:46:19+01:00",
"end":"2017-02-01T10:46:19+01:00"
}
}
]
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"31001"
}
],
"name":[
{
"use":"official",
"family":"Müller",
"given":[
"Erika"
]
}
],
"gender":"female",
"birthDate":"1970-02-01"
}
}
]
}Output
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"xGMhL2v0ZHk"
}
]
},
"response":{
"status":"200 OK"
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"0uI_ywlRYKY"
}
],
"gender":"female",
"birthDate":"1970"
},
"response":{
"status":"200 OK"
}
}
]
}Pseudonymize (batch)
This REST interface provides batch functionality to the Pseudonymize interface. Depending on the configuration, bundles may be processed in parallel.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Pseudonymize (batch) |
| URL | /v1/process/all |
| Required client role | trustcenter-facade (usage-allowed), backend-entitylist (usage-allowed)1 |
| Request type | POST |
| Request parameter | targetSystem |
| Request body | List of JSON FHIR Bundles |
Example data
Input
[
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"21001",
"period":{
"start":"2017-01-01T10:46:19+01:00",
"end":"2017-02-01T10:46:19+01:00"
}
}
]
}
}
]
},
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"31001"
}
],
"name":[
{
"use":"official",
"family":"Müller",
"given":[
"Erika"
]
}
],
"gender":"female",
"birthDate":"1970-02-01"
}
}
]
}
]Output
[
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"xGMhL2v0ZHk"
}
]
},
"response":{
"status":"200 OK"
}
}
]
},
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"0uI_ywlRYKY"
}
],
"gender":"female",
"birthDate":"1970"
},
"response":{
"status":"200 OK"
}
}
]
}
]Pseudonymize (param)
This REST interface accepts a FHIR Parameters resource as input. This interface is useful when no master data (such as name) has to be considered. Internally, it follows the same logic as the Pseudonymize interface.
This interface is also supported by miracum/fhir-pseudonymizer.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Pseudonymize |
| URL | /entitylist/psn-service/$pseudonymize |
| Required client role | trustcenter-facade (usage-allowed), backend-entitylist (usage-allowed)1 |
| Request type | POST |
| Request parameter | - |
| Request body | JSON FHIR Parameters |
Example data
Input
{
"resourceType":"Parameters",
"parameter":[
{
"name":"identifier",
"valueIdentifier":{
"system":"urn:fdc:example.de:sap",
"value":"31001"
}
},
{
"name":"resourceType",
"valueCode":"Patient"
}
]
}Output
{
"resourceType":"Parameters",
"parameter":[
{
"name":"pseudonym",
"valueIdentifier":{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"0uI_ywlRYKY"
}
}
]
}Exists
This REST interface accepts the same input as the Pseudonymize interface, i.e. a FHIR Bundle. The interface may be used to check whether a pseudonym for a specific patient already exists.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Exists |
| URL | /entitylist/psn-service/pseudonym/exists |
| Required client role | trustcenter-facade (usage-allowed), backend-entitylist (usage-allowed)2 |
| Request type | POST |
| Request parameter | - |
| Request body | JSON FHIR Bundle |
Example data
Input
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"21001",
"period":{
"start":"2017-01-01T10:46:19+01:00",
"end":"2017-02-01T10:46:19+01:00"
}
}
]
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"31001"
}
],
"name":[
{
"use":"official",
"family":"Müller",
"given":[
"Erika"
]
}
],
"gender":"female",
"birthDate":"1970-02-01"
}
}
]
}Output
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"xGMhL2v0ZHk"
}
]
},
"response":{
"status":"302 FOUND"
}
},
{
"response":{
"status":"404 NOT_FOUND",
"outcome":{
"resourceType":"OperationOutcome",
"issue":[
{
"severity":"information",
"code":"not-found",
"diagnostics":"No pseudonym found for this identifier."
}
]
}
}
}
]
}Depseudonymize
This REST interface accepts a FHIR Bundle with a list of entries containing any type of FHIR resource. It is expected that each resource contains a pseudonym as identifier, i.e. they system of the identifier has to be urn:fdc:difuture.de:trustcenter.plain.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Depseudonymize |
| URL | /v1/resolve |
| Required client role | trustcenter-facade (usage-allowed), trustcenter-facade (default-case-allowed)3, trustcenter-facade (all-systems-allowed)4, trustcenter-facade (<any-target-system>)1 5 |
| Request type | POST |
| Request parameter | targetSystem |
| Request body | JSON FHIR Bundle |
Example data
Input
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"xGMhL2v0ZHk"
}
]
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"0uI_ywlRYKY"
}
]
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"some-unknown-psn"
}
]
}
}
]
}Output
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Encounter",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"21001",
"period":{
"start":"2017-01-01T09:46:19+00:00",
"end":"2017-02-01T09:46:19+00:00"
}
}
]
},
"response":{
"status":"200 OK"
}
},
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"system":"urn:fdc:example.de:sap",
"value":"31001"
}
],
"name":[
{
"use":"official",
"family":"Müller",
"_family":{
"extension":[
{
"url":"http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString":"Müller"
}
]
},
"given":[
"Erika"
]
}
],
"gender":"female",
"birthDate":"1970-02-01"
},
"response":{
"status":"200 OK"
}
},
{
"response":{
"status":"204 NO_CONTENT",
"outcome":{
"resourceType":"OperationOutcome",
"issue":[
{
"severity":"warning",
"code":"not-found",
"diagnostics":"Pseudonym for 'Patient' does not exist."
}
]
}
}
}
]
}Save Pseudonym
This REST interface accepts a FHIR Parameters resource as input. This interface can be used to save pseudonyms that have been generated elsewhere.
Pseudonyms must be project-specific, i.e.
target-systemmust be specified.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Save Pseudonym |
| URL | /entitylist/psn-service/pseudonym/save/psns/psn-service/pseudonym/save (2nd level) |
| Required client role | backend-entitylist (usage-allowed) backend-pseudonymization (usage-allowed) (2nd level) |
| Request type | POST |
| Request parameter | resourceType |
| Request body | JSON FHIR Parameters |
Example data
Input
{
"resourceType":"Parameters",
"parameter":[
{
"name":"target-system",
"valueString":"MVH"
},
{
"name":"internal-psn",
"valueString":"0uI_ywlRYKY"
},
{
"name":"external-psn",
"valueString":"PSN-1"
}
]
}Get Bloomfilter
This REST interface accepts a FHIR Parameters resource as input.
The optional profile parameter selects the bloom filter profile to use:
numcodex— the default profile (available since v2.1.0); used when noprofileparameter is providedeyematics— added in v5.3.0
Both profiles must be individually enabled via configuration (BF_NUMCODEX_ENABLED / BF_EYEMATICS_ENABLED). See the configuration options for all BF_NUMCODEX_* and BF_EYEMATICS_* parameters.
Request overview
The following table shows all relevant properties.
| Property | Value |
|---|---|
| Name | Get Bloomfilter |
| URL | /entitylist/psn-service/bloomfilter |
| Required client role | backend-entitylist (usage-allowed) |
| Request type | POST |
| Request parameter | - |
| Request body | JSON FHIR Parameters |
Example data
Input
{
"resourceType":"Parameters",
"parameter":[
{
"name":"internal-psn",
"valueString":"0uI_ywlRYKY"
},
{
"name": "profile",
"valueString": "eyematics"
}
]
}Output
{
"resourceType":"Parameters",
"parameter":[
{
"name":"internal-psn",
"valueString":"0uI_ywlRYKY"
},
{
"name":"bloomfilter",
"valueString":"zBXNRnyaV+SBhI1tHnYqheOlsrtY3ML7Tq7elvgG5LRa98EvBN6o3ir42Flb8MGX33bioVdlX3c5cnh1TpKNY+HONvXtke5R+zxVezT7Sc2oMD90RPjqWJw0JUinDTKMwZTVs4dDHTFexCgsk+rpl1/wvxHNMOaI5vQWNRxc8lH2l6rwsOIKE5KQOVS07KOgSzSdsIyyj04pCtwwC3K76kgMgBrEJdvEaGqBp48Qjt+YLStvyGDXuUcwkeN9cjk2I13Vnoli2Cc0mGTuLDNKr3LdiJsPokliTWLCZbhT6OjbkDi7vVZ7dnDPGLFzPHVZ9CsL0GCdJfoCzg=="
}
]
}Translate Pseudonym
This REST interface resolves an external (project-based) pseudonym to its corresponding internal pseudonym, without reversing to patient data (IDAT). It accepts a FHIR Bundle containing a resource with a known external pseudonym identifier.
Request overview
| Property | Value |
|---|---|
| Name | Translate Pseudonym |
| URL | /entitylist/depsn-service/pseudonym/translate |
| Required client role | backend-depseudonymization (usage-allowed) |
| Request type | POST |
| Request parameter | targetSystem |
| Request body | JSON FHIR Bundle |
Example data
Input
{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"Patient",
"identifier":[
{
"use":"secondary",
"system":"urn:fdc:difuture.de:trustcenter.plain",
"value":"0uI_ywlRYKY"
}
]
}
}
]
}Output (pseudonym found)
HTTP 200 OK — Bundle with the pseudonym for the requested target system.
Output (pseudonym not found)
HTTP 207 Multi-Status — Bundle with a 404 Not Found status per entry that could not be resolved.
Since v5.1.0. ↩︎
This role enables access to the depseudonymization interface in case no target-system is specified as query parameter. ↩︎
This role enables access to the depseudonymization interface in case a target-system was specified as query parameter (any target-system is allowed). ↩︎
This role enables access to the depseudonymization interface when specifying a specific target-system as query parameter. ↩︎