Änderungen in I_Device_Managment_Insurant.yaml
Änderung in Operation registerDevice
description: |
Initializes the registration of a new device.</br>
This operation is limited to users of role oid_versicherter. An entitlement
is not required.
**Client**:</br>
A client receives device identifier and device token for a new, not yet registered, device.
Identifier and token shall be kept for subsequent operations with a health record.
A client will then receive an email containing a confirmation code. The addressed email accounts
are part of the operation response.
This confirmation code shall be used to confirm the new device registration within 6 hours from
registration request time on (_createdAt_, see response content).
A client shall NOT register a new device if the user is NOT the owner of the device! This
applies in an "Authorize Representative" use case with a user operating on a borrowed device.
**Provider**</br>
A new device registration associated to the kvnr of the requestor shall be created with:
- status 'pending'.
- timestamp _createdAt_ set to current system time
- a unique confirmation code assigned, valid for 6 hours from _createdAt_ time on
- a retry counter for failed confirmation attempts, allowing 4 consecutive failed confirmations
- a _displayName_ using the provided _deviceName_
- a new unique _deviceToken_
- a new unique _deviceIdentifier_ (uuid)
If no _deviceName_ is provided, a generic but among the kvnr associated devices unique
device name shall be applied (e.g "newDevice001")."
An email shall be sent to all stored email addresses associated to the kvnr of the user. This email shall
request device registration confirmation by the user and contain the confirmation code.
All notified email addresses shall be listed in the reponse.
The registration shall fail in case:
- no email address of the user can be evaluated or
- too many failed attempts for registration occur in the past
- 3 consecutive failed device registrations were requested for the kvnr of the user within a period of 8 hours and
- the last failed device registration is less than 8 hours in the past of current system time (waiting time) or
- in a "Authorize Representative" use case.
"Authorize Representative" applies when the last preceding _I_Authorization_Service::sendAuthorizationRequestfdV_ operation
for login used a parameter _x-authorize_representative_ == _true_.
A failed device registration is evident in case a not yet confirmed device registration is deleted,
either caused by an expired confirmation code or by too many failed attempts for confirmation.
Device identifier and -token shall be persisted associated to the kvnr. The kvnr shall never be persistet in plain
text but must be stored pseudonymously.
responses:
'201':
description: "Created"
content:
application/json:
schema:
type: object
properties:
deviceIdentifier:
$ref: '#/components/schemas/DeviceIdentifierType'
deviceToken:
$ref: '#/components/schemas/DeviceTokenType'
data:
$ref: '#/components/schemas/PendingDeviceType'
emailNotification:
$ref: '#/components/schemas/EmailListType'
examples:
New_Device_1:
summary: A new device registration
value:
deviceIdentifier: '1d20dfa6-e920-4196-80ab-d411ee257748'
deviceToken: 8827da6359c78d81a5df7650b972308aa88394fa8f325b742b125372d7f70f50
data:
status: pending
displayName: "my health care device"
createdAt: 2025-04-22T14:23:01Z
remainingConfirmationRetries: 4
emailNotification:
- myPrivateMailAccount@example.com
New_Device_2:
summary: Another new device registration
value:
deviceIdentifier: '3def7890-f754-4db5-b563-adc8e888495a'
deviceToken: ae9877f42898a24674d75aed479cabbf02adfa68ebb40a03020c910599337c53
data:
status: pending
displayName: "newDevice001"
createdAt: 2025-05-01T08:47:12Z
remainingConfirmationRetries: 4
emailNotification:
- myPrivateMailAccount@example.com
- myAdditionalMailAccount@example.com
Änderung in schemas:
EmailListType:
type: array
items:
type: string
format: email