Click or drag to resize

IPrivacyEnforcementService Interface

Contract for services which enforce privacy directives

Namespace:  SanteDB.Core.Security
Assembly:  SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 2.2.1
Syntax
public interface IPrivacyEnforcementService : IServiceImplementation

The IPrivacyEnforcementService type exposes the following members.

Properties
  NameDescription
Public propertyServiceName
Gets the service name
(Inherited from IServiceImplementation.)
Top
Methods
Remarks

Implementers of this service contract are expected to provide support for the SanteDB Privacy Enforcement architecture. The responsibilities for implementers are:

  • Enforce the data privacy directives attached to Entity or Act instances prior to disclosure of the record (for example: redact, mask, or hide)
  • Ensure that data privacy directives are adhered to prior to updating data in the CDR
  • Ensure that fields which are sensitive or forbidden are not being used in queries

This service is used by the IRepositoryService layer. ValidateWrite is used prior to executing a write operation should ensure that the data being provided/written does not violate local privacy laws (i.e. if Race is forbidden, and the request contains Race the request should be aborted or scrubbed)

Additionally, the ValidateQuery method is invoked prior to querying to ensure that the query parameters don't violate local privacy laws (i.e. don't permit query on MaritalStatus) and that patient privacy policies would not be violated by the query. For example, if the jurisdiction has a policy which protects or hides HIV_PROGRAM identifiers, and a principal which lacks that policy attempts a query such as identifier[HIV_PROGRAM].value=!null, then patient privacy could be compromised just by the nature of a a result being returned (even it if the HIV_PROGRAM identifier is scrubbed). The ValidateQuery method should protect in these cases (note: the default implementation does not protect against this, however the capability is present for third party implementers of this service to produce such behavior)

See Also