description: Conformance profile to check zib profiles for conformance to the [Nictiz profiling guidelines for FHIR R4](https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_Profiling_Guidelines_R4).
package_name: nictiz.fhir.nl.r4.profilingguidelines
derivation: constraint
name: ProfilingGuidelinesR4StructureDefinitionsZib
type: StructureDefinition
elements:
purpose: {index: 0}
mapping:
constraint:
sd-zpg-04: {human: Zib mapping name and identity should follow the profiling guidelines, source: 'http://nictiz.nl/fhir/StructureDefinition/ProfilingGuidelinesR4-StructureDefinitions-Zib', severity: error, expression: name.lower().startsWith('zib') implies (name.startsWith('zib ') and identity.startsWith('zib-'))}
sd-zpg-05: {human: The URI for zib mappings should align with the mapping name, source: 'http://nictiz.nl/fhir/StructureDefinition/ProfilingGuidelinesR4-StructureDefinitions-Zib', severity: error, expression: 'name.lower().startsWith(''zib'') implies uri = ''https://zibs.nl/wiki/'' + name.replaceMatches(''.* '', '''')'}
sd-zpg-06: {human: The mapping identity and mapping name for zibs should align according to the profiling guidelines, source: 'http://nictiz.nl/fhir/StructureDefinition/ProfilingGuidelinesR4-StructureDefinitions-Zib', severity: error, expression: 'identity.lower().startsWith(''zib'') implies identity = name.replaceMatches(''\\(.*'', '''').replace('' '', ''-'').lower() + name.replaceMatches(''.*\\((?.*)\\)'', ''-${suffix}'')'}
index: 1
differential:
elements:
element:
constraint:
sd-zpg-08: {human: 'If an alias exists, mapping.map needs to be present.', source: 'https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_Profiling_Guidelines_R4', severity: error, expression: alias.exists() implies mapping.map.exists()}
sd-pg-02: {human: 'If mapping.map exists and the mapping is not implicit, short should exist', source: 'https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_Profiling_Guidelines_R4', severity: error, expression: 'mapping.select(map.exists() and comment.contains('' (implicit, main mapping is on '').not()).anyTrue() implies short.exists()'}
sd-pg-03: {human: 'If mapping.map exists and the mapping is not implicit and the element is not the root element, definition should exist.', source: 'https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_Profiling_Guidelines_R4', severity: error, expression: '(mapping.select(map.exists() and (comment.contains('' (implicit, main mapping is on '') or comment.startsWith(''Reversed reference for '')).not()).anyTrue() and (id.indexOf(''.'') != -1) and mapping.select(map.endsWith(''.1'').not()).anyTrue()) implies definition.exists()'}
sd-pg-04: {human: 'If mapping.map exists and the mapping is not implicit, alias should exist.', source: 'https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_Profiling_Guidelines_R4', severity: error, expression: 'mapping.select(map.exists() and comment.contains('' (implicit, main mapping is on '').not()).anyTrue() implies alias.exists()'}
index: 2
package_version: 0.9.0
class: profile
kind: resource
url: http://nictiz.nl/fhir/StructureDefinition/ProfilingGuidelinesR4-StructureDefinitions-Zib
base: http://nictiz.nl/fhir/StructureDefinition/ProfilingGuidelinesR4-StructureDefinitions
version: null
required: [purpose]