CH EPR PPQm (R4)
2.0.0 - draft
This page is part of the CH EPR PPQm (R4) (v2.0.0: DSTU 2 Draft) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions
Official URL: http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent | Version: 2.0.0 | |||
Active as of 2023-12-20 | Computable Name: PpqmConsent | |||
Copyright/Legal: CC0-1.0 |
Swiss EPR Policy Set as a Consent
Usage:
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from Consent
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates |
Slices for identifier | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding | |
identifier:All Slices | Content/Rules for all slices | |||
value | 0..1 | string | The value that is unique | |
identifier:policySetId | 1..1 | Identifier | UUID of the Policy Set | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |
system | 0..0 | |||
value | C | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format |
period | 0..0 | |||
assigner | 0..0 | |||
identifier:templateId | 1..1 | Identifier | Template ID of the policy set | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |
system | 0..0 | |||
value | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) | |
period | 0..0 | |||
assigner | 0..0 | |||
status | 1..1 | code | Fixed status value Required Pattern: active | |
scope | 1..1 | CodeableConcept | Fixed scope value Required Pattern: At least the following | |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |
coding | 1..1 | Coding | Code defined by a terminology system | |
category | 1..1 | CodeableConcept | Fixed category value Required Pattern: At least the following | |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |
coding | 1..1 | Coding | Code defined by a terminology system | |
patient | 1..1 | Reference(Patient) | Who the consent applies to | |
reference | 0..0 | |||
type | 0..0 | |||
identifier | 1..1 | Identifier | Logical reference, when literal reference is not known | |
use | 0..0 | |||
type | 0..0 | |||
system | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 | |
value | C | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID |
period | 0..0 | |||
assigner | 0..0 | |||
display | 0..0 | |||
dateTime | 0..0 | |||
performer | 0..0 | |||
organization | 0..0 | |||
source[x] | 0..0 | |||
policy | 0..0 | |||
policyRule | 1..1 | CodeableConcept | ID of the referenced basis policy set | |
coding | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) | |
system | 1..1 | uri | Identity of the terminology system | |
version | 0..0 | |||
code | 1..1 | code | Symbol in syntax defined by the system | |
userSelected | 0..0 | |||
verification | 0..0 | |||
provision | 1..1 | BackboneElement | Constraints to the base Consent.policyRule | |
type | 0..0 | |||
period | ||||
start | C | 0..1 | dateTime | Start date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part |
end | C | 1..1 | dateTime | End date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part |
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |
coding | ||||
system | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.6 | |
code | 1..1 | code | EPR actor role code | |
reference | ||||
reference | 0..0 | |||
type | 0..0 | |||
identifier | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) | |
system | 1..1 | uri | Identity of the terminology system | |
version | 0..0 | |||
code | 1..1 | code | Actor identifier type code (name qualifier) | |
userSelected | 0..0 | |||
text | 0..0 | |||
value | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative | |
period | 0..0 | |||
assigner | 0..0 | |||
display | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors | |
action | 0..0 | |||
securityLabel | 0..0 | |||
purpose | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) | |
system | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 | |
code | 1..1 | code | Symbol in syntax defined by the system | |
class | 0..0 | |||
code | 0..0 | |||
dataPeriod | 0..0 | |||
data | 0..0 | |||
provision | 0..0 | |||
Documentation for this format |
Path | Conformance | ValueSet |
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) |
Consent.policyRule.coding | required | PpqmReferencedPolicySet |
Consent.provision.actor.role | required | EprRole |
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType |
Consent.provision.purpose | required | EprPurposeOfUse |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-date-format | error | Consent.provision.period.start, Consent.provision.period.end | Timestamp must have precision of days, i.e. not contain the time part : toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') | |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') |
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
Slices for identifier | Σ | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
identifier:All Slices | Content/Rules for all slices | |||
use | ?!Σ | 0..1 | code | usual | official | temp | secondary | old (If known) Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known . |
value | Σ | 0..1 | string | The value that is unique Example General: 123456 |
identifier:policySetId | Σ | 1..1 | Identifier | UUID of the Policy Set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |
value | ΣC | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format Example General: 123456 |
identifier:templateId | Σ | 1..1 | Identifier | Template ID of the policy set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |
value | Σ | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) Example General: 123456 |
status | ?!Σ | 1..1 | code | Fixed status value Binding: ConsentState (required): Indicates the state of the consent. Required Pattern: active |
scope | ?!Σ | 1..1 | CodeableConcept | Fixed scope value Binding: ConsentScopeCodes (extensible): The four anticipated uses for the Consent Resource. Required Pattern: At least the following |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |
coding | Σ | 1..1 | Coding | Code defined by a terminology system |
category | Σ | 1..1 | CodeableConcept | Fixed category value Binding: ConsentCategoryCodes (extensible): A classification of the type of consents found in a consent statement. Required Pattern: At least the following |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |
coding | Σ | 1..1 | Coding | Code defined by a terminology system |
patient | Σ | 1..1 | Reference(Patient) | Who the consent applies to |
identifier | Σ | 1..1 | Identifier | Logical reference, when literal reference is not known |
system | Σ | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 |
value | ΣC | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID Example General: 123456 |
policyRule | ΣC | 1..1 | CodeableConcept | ID of the referenced basis policy set Binding: ConsentPolicyRuleCodes (extensible): Regulatory policy examples. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) |
system | Σ | 1..1 | uri | Identity of the terminology system |
code | Σ | 1..1 | code | Symbol in syntax defined by the system |
provision | Σ | 1..1 | BackboneElement | Constraints to the base Consent.policyRule |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |
reference | 1..1 | Reference(Device | Group | CareTeam | Organization | Patient | Practitioner | RelatedPerson | PractitionerRole) | Resource for the actor (or group, by role) | |
identifier | Σ | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) |
system | Σ | 1..1 | uri | Identity of the terminology system |
code | Σ | 1..1 | code | Actor identifier type code (name qualifier) |
value | Σ | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative Example General: 123456 |
display | Σ | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors |
purpose | Σ | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) |
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 |
code | Σ | 1..1 | code | Symbol in syntax defined by the system |
Documentation for this format |
Path | Conformance | ValueSet / Code |
Consent.identifier.use | required | IdentifierUse |
Consent.identifier:policySetId.type | extensible | Identifier Type Codes |
Consent.identifier:templateId.type | extensible | Identifier Type Codes |
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) |
Consent.status | required | Pattern: active |
Consent.scope | extensible | Pattern: patient-privacy |
Consent.category | extensible | Pattern: INFA |
Consent.policyRule | extensible | ConsentPolicyRuleCodes |
Consent.policyRule.coding | required | PpqmReferencedPolicySet |
Consent.provision.actor.role | required | EprRole |
Consent.provision.actor.reference.identifier.type | extensible | Identifier Type Codes |
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType |
Consent.provision.purpose | required | EprPurposeOfUse |
Consent.provision.data.meaning | required | ConsentDataMeaning |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') | |
dom-2 | error | Consent | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | Consent | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | Consent | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ppc-1 | error | Consent | Either a Policy or PolicyRule : policy.exists() or policyRule.exists() | |
ppc-2 | error | Consent | IF Scope=privacy, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not() | |
ppc-3 | error | Consent | IF Scope=research, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='research').exists().not() | |
ppc-4 | error | Consent | IF Scope=adr, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='adr').exists().not() | |
ppc-5 | error | Consent | IF Scope=treatment, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not() |
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates | ||||
id | Σ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
language | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
Slices for identifier | Σ | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
identifier:All Slices | Content/Rules for all slices | |||||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
use | ?!Σ | 0..1 | code | usual | official | temp | secondary | old (If known) Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known . | ||||
type | Σ | 0..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
system | Σ | 0..1 | uri | The namespace for the identifier value Example General: http://www.acme.com/identifiers/patient | ||||
value | Σ | 0..1 | string | The value that is unique Example General: 123456 | ||||
period | Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
assigner | Σ | 0..1 | Reference(Organization) | Organization that issued id (may be just text) | ||||
identifier:policySetId | Σ | 1..1 | Identifier | UUID of the Policy Set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
value | ΣC | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format Example General: 123456 | ||||
identifier:templateId | Σ | 1..1 | Identifier | Template ID of the policy set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
value | Σ | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) Example General: 123456 | ||||
status | ?!Σ | 1..1 | code | Fixed status value Binding: ConsentState (required): Indicates the state of the consent. Required Pattern: active | ||||
scope | ?!Σ | 1..1 | CodeableConcept | Fixed scope value Binding: ConsentScopeCodes (extensible): The four anticipated uses for the Consent Resource. Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | 0..1 | string | Plain text representation of the concept | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
category | Σ | 1..1 | CodeableConcept | Fixed category value Binding: ConsentCategoryCodes (extensible): A classification of the type of consents found in a consent statement. Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | 0..1 | string | Plain text representation of the concept | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
patient | Σ | 1..1 | Reference(Patient) | Who the consent applies to | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identifier | Σ | 1..1 | Identifier | Logical reference, when literal reference is not known | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 | ||||
value | ΣC | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID Example General: 123456 | ||||
policyRule | ΣC | 1..1 | CodeableConcept | ID of the referenced basis policy set Binding: ConsentPolicyRuleCodes (extensible): Regulatory policy examples. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system | ||||
code | Σ | 1..1 | code | Symbol in syntax defined by the system | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
provision | Σ | 1..1 | BackboneElement | Constraints to the base Consent.policyRule | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
period | Σ | 0..1 | Period | Timeframe for this rule | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
start | ΣC | 0..1 | dateTime | Start date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part | ||||
end | ΣC | 1..1 | dateTime | End date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part | ||||
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 0..* | Coding | Code defined by a terminology system | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.6 | ||||
version | Σ | 0..1 | string | Version of the system - if relevant | ||||
code | Σ | 1..1 | code | EPR actor role code | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
reference | 1..1 | Reference(Device | Group | CareTeam | Organization | Patient | Practitioner | RelatedPerson | PractitionerRole) | Resource for the actor (or group, by role) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identifier | Σ | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system | ||||
code | Σ | 1..1 | code | Actor identifier type code (name qualifier) | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
system | Σ | 0..1 | uri | The namespace for the identifier value Example General: http://www.acme.com/identifiers/patient | ||||
value | Σ | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative Example General: 123456 | ||||
display | Σ | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors | ||||
purpose | Σ | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 | ||||
version | Σ | 0..1 | string | Version of the system - if relevant | ||||
code | Σ | 1..1 | code | Symbol in syntax defined by the system | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
Documentation for this format |
Path | Conformance | ValueSet / Code | ||||
Consent.language | preferred | CommonLanguages
| ||||
Consent.identifier.use | required | IdentifierUse | ||||
Consent.identifier.type | extensible | Identifier Type Codes | ||||
Consent.identifier:policySetId.type | extensible | Identifier Type Codes | ||||
Consent.identifier:templateId.type | extensible | Identifier Type Codes | ||||
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) | ||||
Consent.status | required | Pattern: active | ||||
Consent.scope | extensible | Pattern: patient-privacy | ||||
Consent.category | extensible | Pattern: INFA | ||||
Consent.policyRule | extensible | ConsentPolicyRuleCodes | ||||
Consent.policyRule.coding | required | PpqmReferencedPolicySet | ||||
Consent.provision.actor.role | required | EprRole | ||||
Consent.provision.actor.reference.identifier.type | extensible | Identifier Type Codes | ||||
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType | ||||
Consent.provision.purpose | required | EprPurposeOfUse | ||||
Consent.provision.data.meaning | required | ConsentDataMeaning |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-date-format | error | Consent.provision.period.start, Consent.provision.period.end | Timestamp must have precision of days, i.e. not contain the time part : toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') | |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') | |
dom-2 | error | Consent | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | Consent | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | Consent | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ppc-1 | error | Consent | Either a Policy or PolicyRule : policy.exists() or policyRule.exists() | |
ppc-2 | error | Consent | IF Scope=privacy, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not() | |
ppc-3 | error | Consent | IF Scope=research, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='research').exists().not() | |
ppc-4 | error | Consent | IF Scope=adr, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='adr').exists().not() | |
ppc-5 | error | Consent | IF Scope=treatment, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not() |
Differential View
This structure is derived from Consent
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates |
Slices for identifier | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding | |
identifier:All Slices | Content/Rules for all slices | |||
value | 0..1 | string | The value that is unique | |
identifier:policySetId | 1..1 | Identifier | UUID of the Policy Set | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |
system | 0..0 | |||
value | C | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format |
period | 0..0 | |||
assigner | 0..0 | |||
identifier:templateId | 1..1 | Identifier | Template ID of the policy set | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |
system | 0..0 | |||
value | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) | |
period | 0..0 | |||
assigner | 0..0 | |||
status | 1..1 | code | Fixed status value Required Pattern: active | |
scope | 1..1 | CodeableConcept | Fixed scope value Required Pattern: At least the following | |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |
coding | 1..1 | Coding | Code defined by a terminology system | |
category | 1..1 | CodeableConcept | Fixed category value Required Pattern: At least the following | |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |
coding | 1..1 | Coding | Code defined by a terminology system | |
patient | 1..1 | Reference(Patient) | Who the consent applies to | |
reference | 0..0 | |||
type | 0..0 | |||
identifier | 1..1 | Identifier | Logical reference, when literal reference is not known | |
use | 0..0 | |||
type | 0..0 | |||
system | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 | |
value | C | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID |
period | 0..0 | |||
assigner | 0..0 | |||
display | 0..0 | |||
dateTime | 0..0 | |||
performer | 0..0 | |||
organization | 0..0 | |||
source[x] | 0..0 | |||
policy | 0..0 | |||
policyRule | 1..1 | CodeableConcept | ID of the referenced basis policy set | |
coding | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) | |
system | 1..1 | uri | Identity of the terminology system | |
version | 0..0 | |||
code | 1..1 | code | Symbol in syntax defined by the system | |
userSelected | 0..0 | |||
verification | 0..0 | |||
provision | 1..1 | BackboneElement | Constraints to the base Consent.policyRule | |
type | 0..0 | |||
period | ||||
start | C | 0..1 | dateTime | Start date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part |
end | C | 1..1 | dateTime | End date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part |
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |
coding | ||||
system | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.6 | |
code | 1..1 | code | EPR actor role code | |
reference | ||||
reference | 0..0 | |||
type | 0..0 | |||
identifier | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative | |
use | 0..0 | |||
type | 1..1 | CodeableConcept | Description of identifier | |
coding | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) | |
system | 1..1 | uri | Identity of the terminology system | |
version | 0..0 | |||
code | 1..1 | code | Actor identifier type code (name qualifier) | |
userSelected | 0..0 | |||
text | 0..0 | |||
value | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative | |
period | 0..0 | |||
assigner | 0..0 | |||
display | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors | |
action | 0..0 | |||
securityLabel | 0..0 | |||
purpose | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) | |
system | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 | |
code | 1..1 | code | Symbol in syntax defined by the system | |
class | 0..0 | |||
code | 0..0 | |||
dataPeriod | 0..0 | |||
data | 0..0 | |||
provision | 0..0 | |||
Documentation for this format |
Path | Conformance | ValueSet |
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) |
Consent.policyRule.coding | required | PpqmReferencedPolicySet |
Consent.provision.actor.role | required | EprRole |
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType |
Consent.provision.purpose | required | EprPurposeOfUse |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-date-format | error | Consent.provision.period.start, Consent.provision.period.end | Timestamp must have precision of days, i.e. not contain the time part : toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') | |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') |
Key Elements View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
Slices for identifier | Σ | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
identifier:All Slices | Content/Rules for all slices | |||
use | ?!Σ | 0..1 | code | usual | official | temp | secondary | old (If known) Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known . |
value | Σ | 0..1 | string | The value that is unique Example General: 123456 |
identifier:policySetId | Σ | 1..1 | Identifier | UUID of the Policy Set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |
value | ΣC | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format Example General: 123456 |
identifier:templateId | Σ | 1..1 | Identifier | Template ID of the policy set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |
value | Σ | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) Example General: 123456 |
status | ?!Σ | 1..1 | code | Fixed status value Binding: ConsentState (required): Indicates the state of the consent. Required Pattern: active |
scope | ?!Σ | 1..1 | CodeableConcept | Fixed scope value Binding: ConsentScopeCodes (extensible): The four anticipated uses for the Consent Resource. Required Pattern: At least the following |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |
coding | Σ | 1..1 | Coding | Code defined by a terminology system |
category | Σ | 1..1 | CodeableConcept | Fixed category value Binding: ConsentCategoryCodes (extensible): A classification of the type of consents found in a consent statement. Required Pattern: At least the following |
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |
coding | Σ | 1..1 | Coding | Code defined by a terminology system |
patient | Σ | 1..1 | Reference(Patient) | Who the consent applies to |
identifier | Σ | 1..1 | Identifier | Logical reference, when literal reference is not known |
system | Σ | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 |
value | ΣC | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID Example General: 123456 |
policyRule | ΣC | 1..1 | CodeableConcept | ID of the referenced basis policy set Binding: ConsentPolicyRuleCodes (extensible): Regulatory policy examples. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) |
system | Σ | 1..1 | uri | Identity of the terminology system |
code | Σ | 1..1 | code | Symbol in syntax defined by the system |
provision | Σ | 1..1 | BackboneElement | Constraints to the base Consent.policyRule |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |
reference | 1..1 | Reference(Device | Group | CareTeam | Organization | Patient | Practitioner | RelatedPerson | PractitionerRole) | Resource for the actor (or group, by role) | |
identifier | Σ | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative |
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. |
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) |
system | Σ | 1..1 | uri | Identity of the terminology system |
code | Σ | 1..1 | code | Actor identifier type code (name qualifier) |
value | Σ | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative Example General: 123456 |
display | Σ | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors |
purpose | Σ | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) |
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 |
code | Σ | 1..1 | code | Symbol in syntax defined by the system |
Documentation for this format |
Path | Conformance | ValueSet / Code |
Consent.identifier.use | required | IdentifierUse |
Consent.identifier:policySetId.type | extensible | Identifier Type Codes |
Consent.identifier:templateId.type | extensible | Identifier Type Codes |
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) |
Consent.status | required | Pattern: active |
Consent.scope | extensible | Pattern: patient-privacy |
Consent.category | extensible | Pattern: INFA |
Consent.policyRule | extensible | ConsentPolicyRuleCodes |
Consent.policyRule.coding | required | PpqmReferencedPolicySet |
Consent.provision.actor.role | required | EprRole |
Consent.provision.actor.reference.identifier.type | extensible | Identifier Type Codes |
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType |
Consent.provision.purpose | required | EprPurposeOfUse |
Consent.provision.data.meaning | required | ConsentDataMeaning |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') | |
dom-2 | error | Consent | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | Consent | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | Consent | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ppc-1 | error | Consent | Either a Policy or PolicyRule : policy.exists() or policyRule.exists() | |
ppc-2 | error | Consent | IF Scope=privacy, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not() | |
ppc-3 | error | Consent | IF Scope=research, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='research').exists().not() | |
ppc-4 | error | Consent | IF Scope=adr, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='adr').exists().not() | |
ppc-5 | error | Consent | IF Scope=treatment, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not() |
Snapshot View
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
Consent | C | 0..* | Consent | A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time ch-epr-ppqm-template-structure: The resource shall correspond to one of official policy set templates | ||||
id | Σ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
language | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
Slices for identifier | Σ | 2..* | Identifier | Identifier for this record (external references) Slice: Unordered, Open by pattern:type.coding Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
identifier:All Slices | Content/Rules for all slices | |||||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
use | ?!Σ | 0..1 | code | usual | official | temp | secondary | old (If known) Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known . | ||||
type | Σ | 0..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
system | Σ | 0..1 | uri | The namespace for the identifier value Example General: http://www.acme.com/identifiers/patient | ||||
value | Σ | 0..1 | string | The value that is unique Example General: 123456 | ||||
period | Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
assigner | Σ | 0..1 | Reference(Organization) | Organization that issued id (may be just text) | ||||
identifier:policySetId | Σ | 1..1 | Identifier | UUID of the Policy Set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: policySetId | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
value | ΣC | 1..1 | string | UUID of the policy set in URN format ch-epr-ppqm-uuid-format: The policy set ID must be a UUID in URN format Example General: 123456 | ||||
identifier:templateId | Σ | 1..1 | Identifier | Template ID of the policy set Example General: {"system":"http://acme.org/identifier/local/eCMS","value":"Local eCMS identifier"} | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: templateId | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
value | Σ | 1..1 | string | Template ID of the policy set Binding: PPQm Policy Set Template ID (required) Example General: 123456 | ||||
status | ?!Σ | 1..1 | code | Fixed status value Binding: ConsentState (required): Indicates the state of the consent. Required Pattern: active | ||||
scope | ?!Σ | 1..1 | CodeableConcept | Fixed scope value Binding: ConsentScopeCodes (extensible): The four anticipated uses for the Consent Resource. Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/consentscope | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: patient-privacy | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | 0..1 | string | Plain text representation of the concept | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
category | Σ | 1..1 | CodeableConcept | Fixed category value Binding: ConsentCategoryCodes (extensible): A classification of the type of consents found in a consent statement. Required Pattern: At least the following | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
coding | 1..* | Coding | Code defined by a terminology system Fixed Value: (complex) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
system | 1..1 | uri | Identity of the terminology system Fixed Value: http://terminology.hl7.org/CodeSystem/v3-ActCode | |||||
version | 0..1 | string | Version of the system - if relevant | |||||
code | 1..1 | code | Symbol in syntax defined by the system Fixed Value: INFA | |||||
display | 0..1 | string | Representation defined by the system | |||||
userSelected | 0..1 | boolean | If this coding was chosen directly by the user | |||||
text | 0..1 | string | Plain text representation of the concept | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
patient | Σ | 1..1 | Reference(Patient) | Who the consent applies to | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identifier | Σ | 1..1 | Identifier | Logical reference, when literal reference is not known | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | The namespace for the identifier value Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.3 | ||||
value | ΣC | 1..1 | string | EPR-SPID of the patient (18 digits) ch-epr-ppqm-epr-spid-format: The patient ID must be an EPR-SPID Example General: 123456 | ||||
policyRule | ΣC | 1..1 | CodeableConcept | ID of the referenced basis policy set Binding: ConsentPolicyRuleCodes (extensible): Regulatory policy examples. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Referenced Policy Set (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system | ||||
code | Σ | 1..1 | code | Symbol in syntax defined by the system | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
provision | Σ | 1..1 | BackboneElement | Constraints to the base Consent.policyRule | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
period | Σ | 0..1 | Period | Timeframe for this rule | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
start | ΣC | 0..1 | dateTime | Start date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part | ||||
end | ΣC | 1..1 | dateTime | End date of the policy set validity, yyyy-mm-dd ch-epr-ppqm-date-format: Timestamp must have precision of days, i.e. not contain the time part | ||||
actor | 1..1 | BackboneElement | Who|what controlled by this rule (or group, by role) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
role | 1..1 | CodeableConcept | How the actor is involved Binding: EprRole (required) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 0..* | Coding | Code defined by a terminology system | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.6 | ||||
version | Σ | 0..1 | string | Version of the system - if relevant | ||||
code | Σ | 1..1 | code | EPR actor role code | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
text | Σ | 0..1 | string | Plain text representation of the concept | ||||
reference | 1..1 | Reference(Device | Group | CareTeam | Organization | Patient | Practitioner | RelatedPerson | PractitionerRole) | Resource for the actor (or group, by role) | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identifier | Σ | 0..1 | Identifier | This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | CodeableConcept | Description of identifier Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
coding | Σ | 1..1 | Coding | Code defined by a terminology system Binding: PPQm Actor Identifier Type (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system | ||||
code | Σ | 1..1 | code | Actor identifier type code (name qualifier) | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
system | Σ | 0..1 | uri | The namespace for the identifier value Example General: http://www.acme.com/identifiers/patient | ||||
value | Σ | 1..1 | string | ID of an healthcare professional, group of healthcare professionals, patient, or representative Example General: 123456 | ||||
display | Σ | 0..1 | string | This element is present only in policy sets which reference indefinite sets of actors | ||||
purpose | Σ | 0..* | Coding | Context of activities covered by this rule Binding: EprPurposeOfUse (required) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Required Pattern: urn:oid:2.16.756.5.30.1.127.3.10.5 | ||||
version | Σ | 0..1 | string | Version of the system - if relevant | ||||
code | Σ | 1..1 | code | Symbol in syntax defined by the system | ||||
display | Σ | 0..1 | string | Representation defined by the system | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
Documentation for this format |
Path | Conformance | ValueSet / Code | ||||
Consent.language | preferred | CommonLanguages
| ||||
Consent.identifier.use | required | IdentifierUse | ||||
Consent.identifier.type | extensible | Identifier Type Codes | ||||
Consent.identifier:policySetId.type | extensible | Identifier Type Codes | ||||
Consent.identifier:templateId.type | extensible | Identifier Type Codes | ||||
Consent.identifier:templateId.value | required | PpqmPolicySetTemplateId (a valid code from PPQm Policy Set Template ID) | ||||
Consent.status | required | Pattern: active | ||||
Consent.scope | extensible | Pattern: patient-privacy | ||||
Consent.category | extensible | Pattern: INFA | ||||
Consent.policyRule | extensible | ConsentPolicyRuleCodes | ||||
Consent.policyRule.coding | required | PpqmReferencedPolicySet | ||||
Consent.provision.actor.role | required | EprRole | ||||
Consent.provision.actor.reference.identifier.type | extensible | Identifier Type Codes | ||||
Consent.provision.actor.reference.identifier.type.coding | required | PpqmActorIdentifierType | ||||
Consent.provision.purpose | required | EprPurposeOfUse | ||||
Consent.provision.data.meaning | required | ConsentDataMeaning |
Id | Grade | Path(s) | Details | Requirements |
ch-epr-ppqm-date-format | error | Consent.provision.period.start, Consent.provision.period.end | Timestamp must have precision of days, i.e. not contain the time part : toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') | |
ch-epr-ppqm-epr-spid-format | error | Consent.patient.identifier.value | The patient ID must be an EPR-SPID : matches('^[0-9]{18}$') | |
ch-epr-ppqm-template-structure | error | Consent | The resource shall correspond to one of official policy set templates : ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '201')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'PAT') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and provision[0].actor.reference.identifier.value.matches('^[0-9]{18}$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() and (provision[0].actor.reference.identifier[0].value = patient.identifier.value) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '202')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'EMER') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '203')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted') ) and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'HCP') and provision[0].actor.reference.identifier.empty() and (provision[0].actor.reference.display = 'all') and (provision[0].purpose.count() = 3) and (provision[0].purpose.exists(code = 'NORM')) and (provision[0].purpose.exists(code = 'AUTO')) and (provision[0].purpose.exists(code = 'DICOM_AUTO')) ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '301')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:exclusion-list') ) and (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and provision[0].actor.reference.identifier.value.matches('^[0-9]{13}$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '302')) and ( (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') ) and provision[0].period.end.exists() and (provision[0].actor.role.coding.code = 'HCP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and provision[0].actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\.0)|(\\.[1-9][0-9]*))*$') and provision[0].actor.reference.display.empty() and (provision[0].purpose.count() = 1) and (provision[0].purpose.code = 'NORM') ) or ( identifier.exists(type.coding.exists((system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (code = 'templateId')) and (value = '303')) and (policyRule[0].coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and provision[0].period.empty() and (provision[0].actor.role.coding.code = 'REP') and (provision[0].actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and provision[0].actor.reference.identifier.value.matches('^\\S+$') and provision[0].actor.reference.display.empty() and provision[0].purpose.empty() ) | |
ch-epr-ppqm-uuid-format | error | Consent.identifier:policySetId.value | The policy set ID must be a UUID in URN format : lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') | |
dom-2 | error | Consent | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | Consent | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | Consent | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | Consent | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ppc-1 | error | Consent | Either a Policy or PolicyRule : policy.exists() or policyRule.exists() | |
ppc-2 | error | Consent | IF Scope=privacy, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not() | |
ppc-3 | error | Consent | IF Scope=research, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='research').exists().not() | |
ppc-4 | error | Consent | IF Scope=adr, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='adr').exists().not() | |
ppc-5 | error | Consent | IF Scope=treatment, there must be a patient : patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not() |
Other representations of profile: CSV, Excel, Schematron