PTS API → Patient Safety Validation
The AccessRestrictions concerning Patient Safety API-area covers APIs to manpulate data that is related to safety of the patient.
Validation rules
There are several fields that could be used to specify delay disclosure / postpone delivery of PatientSafetyObjects. Only one of the fields DelayDeliveryUntil, DelayDays or DelayFromTime could be specified.
Field: DelayDeliveryUntil
DelayDeliveryUntil is used to specify the actual time when a PatientSafetyObject at earliest could be disclosed.
There are special rules depending on the value for the field ConfidentialityCode.
Field: ConfidentialityCode | Valid values for field DelayDeliveryUntil | Error-message if violated |
---|---|---|
N | null | DelayDeliveryUntil cannot be specified with ConfidentialityCode N |
NORN_* | null | DelayDeliveryUntil and DelayDays must be null for confidentialityCode NORN. DelayDeliveryUntil will be set by the service |
Any other code | Any valid time in the future | DelayDeliveryUntil or DelayDays must have values for confidentialityCode ConfidentialityCode |
DelayDeliveryUntil must be set to a value in the future |
For ConfidentialityCode that starts with NORN_*, such as NORN_FFL, NORN_KUT, NORN_EPO, NORN_ALL, NORN_FOR, NORN_FFH, NORN_FPB, NORN_DUP, NORN_ANG, the input value for DelayDeliveryUntil field in the request is expected to be null, and will be set by the service itself to Maximum DateTime, which will be in year 9999, and thus will be delayed forever.
Field: DelayDays
DelayDays is used for a parent PatientSafetyObject to specify the number of days until a siebling PatientSafetyObject at earliest could be disclosed. Because at the creation time of a parent PatientSafetyObject, the creation time of the siebling PatientSafetyObject is unknown, so the DelayDeliveryUntil of the siebling PatientSafetyObject have to be calculated at a later time.
There are special rules depending on the value for the field ConfidentialityCode.
Field: ConfidentialityCode | Valid values for field DelayDays | Error-message if violated |
---|---|---|
N | null | DelayDays cannot be specified with ConfidentialityCode N |
NORN_* | null | DelayDeliveryUntil and DelayDays must be null for confidentialityCode NORN. DelayDeliveryUntil will be set by the service |
Any other code | Any valid positive number of days | DelayDeliveryUntil or DelayDays must have values for confidentialityCode ConfidentialityCode |
DelayDays must be a positive value |
Field: DelayFromTime
DelayFromTime is used in conjuction with a siebling PatientSafetyObject to specify what time DelayDeliveryUntil will be calculated from. The calculated DelayDeliveryUntil time of the siebling will then be the DelayFromTime (for the siebling) plus the DelayDays number of days of the parent. In addition to DelayFromTime also the ParentConfidentialObjectId must be specified. If not both DelayFromTime and ParentConfidentialObjectId fields are specified this error-message will be returned: "Parent Confidential Object must be specified when DelayFromTime is specified".