Testing the interface
Enable test client
- Log in to the Keycloak administration console via
server:port/auth/. - In the realm trustcenter, go to Clients and open the client
trustcenter-test. - In Settings, enable the client and click
Save. - In Credentials, copy the client secret to the clipboard.
Perform test
- Start Postman.
- Create new POST request to
server:port/v1/process. - In Authorization, choose
OAuth 2.0and get new access token via the information described in the following table and use it (click at the bottom).
| Name | Value |
|---|---|
| Token Name | Choose any |
| Grant Type | Client Credentials |
| Access Token URL | server:port/auth/realms/trustcenter/protocol/openid-connect/token |
| Client ID | trustcenter-test |
| Client Secret | Secret from clipboard |
| Scope | - |
| Client Authentication | Send as Basic Auth header |
- In Body, choose
rawand typeJSON (application/json)and insert the following json:
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Encounter",
"identifier": [
{
"use": "official",
"system": "Test",
"value": "identifier-value-123",
"period": {
"start": "2017-01-01T10:46:19+01:00",
"end": "2017-02-01T10:46:19+01:00"
}
}
]
}
},
{
"resource": {
"resourceType": "Patient",
"identifier": [
{
"use": "official",
"system": "Test",
"value": "ABC123"
}
],
"name": [
{
"use": "official",
"family": "Müller"
}
]
}
},
{
"resource": {
"resourceType": "Provenance",
"id": "1",
"target": [
{
"identifier": {
"value": "MS_PATIENT:4dab72f1494596d306d870ff9a3dc666d37e4062"
}
}
],
"recorded": "2019-10-16T15:52:50.160+02:00",
"activity": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-DataOperation",
"code": "CREATE",
"display": "create"
}
]
},
"agent": [
{
"who": {
"identifier": {
"value": "instance-test-ms-v1:0.2.0-SNAPSHOT"
}
}
}
]
}
}
]
}
- Send the request.
- In your browser, go to
server:port/entity-list/and log in. - Search for
*ABC*(including the wildcard character*). - You should get
'Müller','ABC123'and a Pseudonymn.