description: Profile for restricting access to patient data package_name: se.electronichealth.fhir.ppdr.r5 derivation: constraint name: RestrictionRe type: Consent elements: category: binding: {strength: required, valueSet: 'http://electronichealth.se/fhir/NDI/ValueSet/re-restriction-categories'} mustSupport: true index: 1 elements: coding: mustSupport: true index: 2 elements: system: {mustSupport: true, index: 3} code: {mustSupport: true, index: 4} required: [system, code] required: [coding] provision: mustSupport: true index: 33 elements: purpose: mustSupport: true index: 34 elements: system: {mustSupport: true, index: 35} code: {mustSupport: true, index: 36} required: [system, code] documentType: short: The category of data the provision concerns binding: {strength: required, valueSet: 'http://hl7.eu/fhir/base-r5/ValueSet/ehdsCategories-eu'} mustSupport: true index: 37 data: mustSupport: true index: 38 elements: meaning: {mustSupport: true, index: 39} reference: {mustSupport: true, index: 40} slicing: rules: open ordered: false description: Slice data based on meaning discriminator: - {path: meaning, type: value} min: null slices: fromCaregiverOrUnit: match: {meaning: authoredby} schema: mustSupport: true array: true index: 41 elements: meaning: pattern: {type: Code, value: authoredby} mustSupport: true index: 42 reference: type: Reference mustSupport: true refers: ['http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access'] index: 43 elements: reference: {mustSupport: true, index: 44} identifier: constraint: ndi-organization-identifier-value-1: {human: 'A Swedish organization identifier (sv: organisationsnummer) should follow format 7999000057', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^\\d{6}\\d{4}$'') or system != ''urn:oid:2.5.4.97'''} ndi-personal-identity-number-value-1: {human: 'A Swedish personal identity number (sv: personnummer) should follow format 198001032385', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{4}$'') or system != ''http://electronichealth.se/identifier/personnummer'''} ndi-coordination-number-value-1: {human: 'A Swedish coordination number (sv: samordningsnummer) should follow format 201903682399', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])([6-9][1-9])\\d{4}$'') or system != ''http://electronichealth.se/identifier/samordningsnummer'''} mustSupport: true index: 45 elements: system: {mustSupport: true, index: 46} value: {mustSupport: true, index: 47} required: [value, system] provision: {mustSupport: true, index: 48} date: short: Date the restriction was created constraint: ndi-consent-date-1: {human: Date SHALL have a lower or equal value than today's date, source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: $this <= today()} mustSupport: true index: 10 policyBasis: mustSupport: true index: 30 elements: url: {mustSupport: true, index: 31} regulatoryBasis: binding: {strength: required, valueSet: 'http://electronichealth.se/fhir/NDI/ValueSet/re-regulatory-bases-of-restriction'} mustSupport: true index: 26 elements: coding: mustSupport: true index: 27 elements: system: {mustSupport: true, index: 28} code: {mustSupport: true, index: 29} required: [system, code] required: [coding] grantor: type: Reference short: The individual that created the Restriction mustSupport: true refers: ['http://electronichealth.se/fhir/NDI/StructureDefinition/patient-data-access', 'http://hl7.org/fhir/StructureDefinition/PractitionerRole', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'] index: 14 elements: reference: {mustSupport: true, index: 15} type: {mustSupport: true, index: 16} identifier: constraint: ndi-personal-identity-number-value-1: {human: 'A Swedish personal identity number (sv: personnummer) should follow format 198001032385', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{4}$'') or system != ''http://electronichealth.se/identifier/personnummer'''} ndi-coordination-number-value-1: {human: 'A Swedish coordination number (sv: samordningsnummer) should follow format 201903682399', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])([6-9][1-9])\\d{4}$'') or system != ''http://electronichealth.se/identifier/samordningsnummer'''} ndi-hsa-identifier-value-1: {human: 'If identifier.system = urn:oid:1.2.752.29.4.19, value should follow format for HSA ID: SE1234567890-ABC1. Characters å, ä, ö, @ not valid.', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^SE[0-9]{10}-[A-za-z0-9]+$'') or system != ''urn:oid:1.2.752.29.4.19'''} mustSupport: true index: 17 elements: system: {mustSupport: true, index: 18} value: {mustSupport: true, index: 19} required: [value, system] required: [type] status: short: active | inactive binding: {strength: required, valueSet: 'http://electronichealth.se/fhir/NDI/ValueSet/re-restriction-statuses'} mustSupport: true index: 0 period: mustSupport: true index: 11 elements: start: constraint: ndi-consent-period-start-1: {human: Period.start SHALL have a higher or equal value than today's date, source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: $this >= today()} ndi-dateTime-1: {human: DateTime must be without timestamp, source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: $this.toString().contains('T') = false} mustSupport: true index: 12 end: constraint: ndi-consent-period-end-1: {human: Period.end SHALL have a higher or equal value than today's date, source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: $this >= today()} ndi-dateTime-1: {human: DateTime must be without timestamp, source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: $this.toString().contains('T') = false} mustSupport: true index: 13 required: [start] grantee: type: Reference short: The organization or individual whose access is being restricted mustSupport: true refers: ['http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access', 'http://electronichealth.se/fhir/NDI/StructureDefinition/patient-data-access', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'] index: 20 elements: reference: {mustSupport: true, index: 21} type: {mustSupport: true, index: 22} identifier: constraint: ndi-personal-identity-number-value-1: {human: 'A Swedish personal identity number (sv: personnummer) should follow format 198001032385', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{4}$'') or system != ''http://electronichealth.se/identifier/personnummer'''} ndi-coordination-number-value-1: {human: 'A Swedish coordination number (sv: samordningsnummer) should follow format 201903682399', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])([6-9][1-9])\\d{4}$'') or system != ''http://electronichealth.se/identifier/samordningsnummer'''} ndi-organization-identifier-value-1: {human: 'A Swedish organization identifier (sv: organisationsnummer) should follow format 7999000057', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^\\d{6}\\d{4}$'') or system != ''urn:oid:2.5.4.97'''} ndi-country-identifier-value-1: {human: 'A country identifier should follow ISO-3166 format, e.g. SE', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^[A-Z]{2}$'') or system != ''urn:iso:std:iso:3166'''} mustSupport: true index: 23 elements: system: {mustSupport: true, index: 24} value: {mustSupport: true, index: 25} required: [value, system] required: [type] subject: type: Reference short: The patient whom the Restriction concerns mustSupport: true refers: ['http://electronichealth.se/fhir/NDI/StructureDefinition/patient-data-access'] index: 5 elements: reference: {mustSupport: true, index: 6} identifier: constraint: ndi-personal-identity-number-value-1: {human: 'A Swedish personal identity number (sv: personnummer) should follow format 198001032385', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{4}$'') or system != ''http://electronichealth.se/identifier/personnummer'''} ndi-coordination-number-value-1: {human: 'A Swedish coordination number (sv: samordningsnummer) should follow format 201903682399', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])([6-9][1-9])\\d{4}$'') or system != ''http://electronichealth.se/identifier/samordningsnummer'''} mustSupport: true index: 7 elements: system: {mustSupport: true, index: 8} value: {mustSupport: true, index: 9} required: [value, system] decision: short: Fixed to deny to use Consent as a Restriction pattern: {type: Code, value: deny} mustSupport: true index: 32 package_version: 0.1.2-alpha class: profile kind: resource url: http://electronichealth.se/fhir/NDI/StructureDefinition/restriction-re base: http://hl7.org/fhir/StructureDefinition/Consent version: 0.1.0 required: [grantor, decision, subject, category, period]