PACIO Advance Directive Interoperability Implementation Guide
0.1.0 - STU 1 Ballot

Publication Build: This will be filled in by the publication tooling

## Security, Privacy, and Consent

### General Considerations

Advance Directive Interoperability (ADI) involves communication of advance directive information across multiple parties including who the information is about, their healthcare agents and identified advisors, and care providers. The author, who is also the person the information is about, needs access to create, modify, remove, and share this information either directly or through an authorized third party. Users of this information are the appointed healthcare agents or advisors, care providers in emergency, intensive, or critical care environments, or others providing longer term care in a skilled nursing or other similar facility.

Advance directive information contains patient specific information, which means that it needs to be protected with proper security and privacy protections to avoid malicious or unintentional exposure of such information. All Advance Directive Interoperability exchanges must be appropriately secured in transit and access limited only to authorized individuals.

The ADI IG focuses on providing a structure to share data and information. Policy, legal, and regulatory differences across states and local areas may impact the workflow and requirements associated with Advance Directives Information. Implementors should review the current context for where this IG is expected to be used to ensure those requirements are met.

#### Security Considerations and Guidance

All implementers of the Advance Directive Interoperability Implementation Guide (IG) SHOULD follow the FHIR Security guidance, Security and Privacy Module, and the FHIR Implementer’s Safety Checklist guidance as defined in the FHIR standard where applicable and not otherwise superseded by this Section of the ADI IG.

1. The FHIR Security specification provides guidance related to communication security, authentication, authorization/access control, audit, digital signatures, attachments, labels, narrative, and input validation. The FHIR security specification is available here.
2. The FHIR Security and Privacy Module describes access control and authorization considerations to protect a FHIR server, how to document permissions granted, and hot to keep records of performed events. The FHIR Security and privacy module can be found here.
3. The FHIR Implementer’s Safety Checklist helps implementers be sure that they have considered all the parts of FHIR that impact their system design regarding safety. The FHIR safety check list is available here.

#### Security Requirements

For the purposes of Advance Directive Interoperability, additional security conformance requirements are as follows:

##### Exchange Security

1. The exchange of information SHOULD use the current version and SHALL use either current or the immediately prior release of Transport Level Security (TLS) as specified by the current release of NIST guidelines (SP 800-52).
2. Implementers of this Implementation Guide SHOULD support SMART on FHIR Authorization best practices Transport Security section.

##### Authentication and Authorization Requirements

1. Implementations SHALL support the FHIR US Core Patient Privacy and Security requirements.
2. Server systems SHALL publish their authorization and token endpoints for discovery in accordance with the SMART App Launch framework and publicly publish the Well-Known Uniform Resource Identifiers (URIs) JSON file with scopes defined in the `scopes_supported` property.
3. Implementations SHOULD consider the SMART on FHIR Best Practices in Authorization found here
4. Implementation MAY support Health Relationship Trust Profile for User-Managed Access (HEART).
5. This guide defines the following server requirements for SMART on FHIR Core Capabilities
   1. Launch Modes
      1. SHOULD support `launch-ehr`: support for SMART’s EHR Launch mode
      2. SHALL support `launch-standalone`: support for SMART’s Standalone Launch mode
   2. Client Types
      1. SHALL support `client-public`: support for SMART’s public client profile (no client authentication)
      2. SHALL support `client-confidential-symmetric`: support for SMART’s confidential client profile (symmetric client secret authentication)
   3. Single Sign-on
      1. SHALL support `sso-openid-connect`: support for SMART’s OpenID Connect profile
   4. Launch Context
      1. SHOULD support `context-banner`: support for “need patient banner” launch context (conveyed via need_patient_banner token parameter)
      2. MAY support `context-style`: support for “SMART style URL” launch context (conveyed via smart_style_url token parameter)
   5. Launch Context for EHR Launch, if `launch-ehr` is supported
      1. SHALL support `context-ehr-patient`: support for patient-level launch context (requested by launch/patient scope, conveyed via patient token parameter)
      2. SHALL support `context-ehr-encounter`: support for encounter-level launch context (requested by launch/encounter scope, conveyed via encounter token parameter)
   6. Launch Context for Standalone Launch
      1. SHALL support `context-standalone-patient`: support for patient-level launch context (requested by launch/patient scope, conveyed via patient token parameter)
      2. MAY support `context-standalone-encounter`: support for encounter-level launch context (requested by launch/encounter scope, conveyed via encounter token
   7. Permissions
      1. SHOULD support `permission-offline`: support for refresh tokens (requested by `offline_access` scope)
      2. SHALL support, at a minimum, the following granted authorization scopes:
         1. openid
         2. fhirUser
         3. launch/patient
         4. patient/Patient.read
         5. patient/DocumentReference.*
         6. user/Patient.read
         7. user/DocumentReference.*

#### Privacy Requirement

For the purposes of Advance Directive Interoperability, privacy conformance requirements are as follows:

- Implementers SHOULD support data sharing policies with use of the Consent resource.

#### Audit Logging and Provenance

1. Server implementations SHOULD record all IG related data access using the AuditEvent resource.
2. Server implementations SHOULD support the ability to directly record and/or enable clients to assert (store) provenance associated with advance directive information using the Provenance resource.