QI-Core Implementation Guide
5.0.0-ballot - STU Ballot US

This page is part of the Quality Improvement Core Framework (v5.0.0-ballot: STU 5 Ballot 1) based on FHIR R4. The current version which supercedes this version is 4.1.1. For a full list of available versions, see the Directory of published versions

Resource Profile: QICore Allergy Intolerance

Official URL: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-allergyintolerance Version: 5.0.0-ballot
Active as of 2018-08-22 Computable Name: QICoreAllergyIntolerance

Profile of AllergyIntolerance for decision support/quality metrics. Defines the core set of elements and extensions for quality rule and measure authors.

Usage

See the patterns page for implementation and usage patterns.

define "Statin Allergy":
  ["AllergyIntolerance": "Statin Allergen"] StatinAllergy
    where (StatinAllergy.clinicalStatus is null or StatinAllergy.clinicalStatus ~ Global."allergy-active")
      and (
        StatinAllergy.verificationStatus ~ Global."allergy-unconfirmed"
         or StatinAllergy.verificationStatus ~ Global."allergy-confirmed"
      )

Examples

Typical Food Allergy
Refuted Food Allergy

Usage:

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

This structure is derived from USCoreAllergyIntolerance

NameFlagsCard.TypeDescription & Constraintsdoco
.. AllergyIntolerance I0..*USCoreAllergyIntoleranceAllergy or Intolerance (generally: Risk of adverse reaction to a substance)
1: extension: reasonRefuted is only permitted if status is refuted
... resolutionAge 0..1AgeAge that the allergy or intolerance resolved
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge
... reasonRefuted I0..1CodeableConceptExplanation associated with refuted status
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted
Binding: Reasons for refuting allergy or intolerance codes (example): The value set to instantiate this attribute should be drawn from a terminologically robust code system for reasons of refuting an allergy or intolerance. This value set is provided as a suggestive example.

... type S0..1codeallergy | intolerance - Underlying mechanism (if known)
... criticality S0..1codelow | high | unable-to-assess
... patient S1..1Reference(QICorePatient)Who the sensitivity is for
... encounter S0..1Reference(QICore Encounter)Encounter when the allergy or intolerance was asserted
... onset[x] 0..1When allergy or intolerance was identified
.... onsetDateTimedateTime
.... onsetAgeAge
.... onsetPeriodPeriod
.... onsetRangeRange
... recordedDate S0..1dateTimeDate first version of the resource instance was recorded
... recorder 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Who recorded the sensitivity
... asserter 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Source of the information about the allergy
... reaction S0..*BackboneElementAdverse Reaction Events linked to exposure to substance
.... reaction-duration S0..1DurationHow long Manifestations persisted
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration
.... onset S0..1dateTimeDate(/time) when manifestations showed
.... severity S0..1codemild | moderate | severe (of event as a whole)

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. AllergyIntolerance I0..*USCoreAllergyIntoleranceAllergy or Intolerance (generally: Risk of adverse reaction to a substance)
1: extension: reasonRefuted is only permitted if status is refuted
... id Σ0..1stringLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... resolutionAge 0..1AgeAge that the allergy or intolerance resolved
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge
... reasonRefuted I0..1CodeableConceptExplanation associated with refuted status
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier Σ0..*IdentifierExternal ids for this item
... clinicalStatus ?!SΣI0..1CodeableConceptactive | inactive | resolved
Binding: AllergyIntoleranceClinicalStatusCodes (required)
... verificationStatus ?!SΣI0..1CodeableConceptunconfirmed | confirmed | refuted | entered-in-error
Binding: AllergyIntoleranceVerificationStatusCodes (required)
... type SΣ0..1codeallergy | intolerance - Underlying mechanism (if known)
Binding: AllergyIntoleranceType (required): Identification of the underlying physiological mechanism for a Reaction Risk.

... category SΣ0..*codefood | medication | environment | biologic
Binding: AllergyIntoleranceCategory (required): Category of an identified substance associated with allergies or intolerances.


... criticality SΣ0..1codelow | high | unable-to-assess
Binding: AllergyIntoleranceCriticality (required): Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.

... code SΣ1..1CodeableConceptCode that identifies the allergy or intolerance
Binding: Common substances for allergy and intolerance documentation including refutations (extensible)
... patient SΣ1..1Reference(QICorePatient)Who the sensitivity is for
... encounter S0..1Reference(QICore Encounter)Encounter when the allergy or intolerance was asserted
... onset[x] 0..1When allergy or intolerance was identified
.... onsetDateTimedateTime
.... onsetAgeAge
.... onsetPeriodPeriod
.... onsetRangeRange
... recordedDate S0..1dateTimeDate first version of the resource instance was recorded
... recorder 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Who recorded the sensitivity
... asserter Σ0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Source of the information about the allergy
... lastOccurrence 0..1dateTimeDate(/time) of last known occurrence of a reaction
... note 0..*AnnotationAdditional text not captured in other fields
... reaction S0..*BackboneElementAdverse Reaction Events linked to exposure to substance
.... id 0..1stringUnique id for inter-element referencing
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
.... reaction-duration S0..1DurationHow long Manifestations persisted
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... substance 0..1CodeableConceptSpecific substance or pharmaceutical product considered to be responsible for event
Binding: SubstanceCode (example): Codes defining the type of the substance (including pharmaceutical products).

.... manifestation S1..*CodeableConceptClinical symptoms/signs associated with the Event
Binding: SNOMEDCTClinicalFindings (extensible)
.... description 0..1stringDescription of the event as a whole
.... onset S0..1dateTimeDate(/time) when manifestations showed
.... severity S0..1codemild | moderate | severe (of event as a whole)
Binding: AllergyIntoleranceSeverity (required): Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.

.... exposureRoute 0..1CodeableConceptHow the subject was exposed to the substance
Binding: SNOMEDCTRouteCodes (example): A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.

.... note 0..*AnnotationText about event not captured in other fields

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. AllergyIntolerance I0..*USCoreAllergyIntoleranceAllergy or Intolerance (generally: Risk of adverse reaction to a substance)
1: extension: reasonRefuted is only permitted if status is refuted
... clinicalStatus ?!ΣI0..1CodeableConceptactive | inactive | resolved
Binding: AllergyIntoleranceClinicalStatusCodes (required)
... verificationStatus ?!ΣI0..1CodeableConceptunconfirmed | confirmed | refuted | entered-in-error
Binding: AllergyIntoleranceVerificationStatusCodes (required)
... type Σ0..1codeallergy | intolerance - Underlying mechanism (if known)
Binding: AllergyIntoleranceType (required): Identification of the underlying physiological mechanism for a Reaction Risk.

... criticality Σ0..1codelow | high | unable-to-assess
Binding: AllergyIntoleranceCriticality (required): Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.

... code Σ1..1CodeableConceptCode that identifies the allergy or intolerance
Binding: Common substances for allergy and intolerance documentation including refutations (extensible)
... patient Σ1..1Reference(QICorePatient)Who the sensitivity is for
... encounter 0..1Reference(QICore Encounter)Encounter when the allergy or intolerance was asserted
... recordedDate 0..1dateTimeDate first version of the resource instance was recorded
... reaction 0..*BackboneElementAdverse Reaction Events linked to exposure to substance
.... reaction-duration 0..1DurationHow long Manifestations persisted
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration
.... manifestation 1..*CodeableConceptClinical symptoms/signs associated with the Event
Binding: SNOMEDCTClinicalFindings (extensible)
.... onset 0..1dateTimeDate(/time) when manifestations showed
.... severity 0..1codemild | moderate | severe (of event as a whole)
Binding: AllergyIntoleranceSeverity (required): Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.


doco Documentation for this format

Differential View

This structure is derived from USCoreAllergyIntolerance

NameFlagsCard.TypeDescription & Constraintsdoco
.. AllergyIntolerance I0..*USCoreAllergyIntoleranceAllergy or Intolerance (generally: Risk of adverse reaction to a substance)
1: extension: reasonRefuted is only permitted if status is refuted
... resolutionAge 0..1AgeAge that the allergy or intolerance resolved
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge
... reasonRefuted I0..1CodeableConceptExplanation associated with refuted status
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted
Binding: Reasons for refuting allergy or intolerance codes (example): The value set to instantiate this attribute should be drawn from a terminologically robust code system for reasons of refuting an allergy or intolerance. This value set is provided as a suggestive example.

... type S0..1codeallergy | intolerance - Underlying mechanism (if known)
... criticality S0..1codelow | high | unable-to-assess
... patient S1..1Reference(QICorePatient)Who the sensitivity is for
... encounter S0..1Reference(QICore Encounter)Encounter when the allergy or intolerance was asserted
... onset[x] 0..1When allergy or intolerance was identified
.... onsetDateTimedateTime
.... onsetAgeAge
.... onsetPeriodPeriod
.... onsetRangeRange
... recordedDate S0..1dateTimeDate first version of the resource instance was recorded
... recorder 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Who recorded the sensitivity
... asserter 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Source of the information about the allergy
... reaction S0..*BackboneElementAdverse Reaction Events linked to exposure to substance
.... reaction-duration S0..1DurationHow long Manifestations persisted
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration
.... onset S0..1dateTimeDate(/time) when manifestations showed
.... severity S0..1codemild | moderate | severe (of event as a whole)

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. AllergyIntolerance I0..*USCoreAllergyIntoleranceAllergy or Intolerance (generally: Risk of adverse reaction to a substance)
1: extension: reasonRefuted is only permitted if status is refuted
... id Σ0..1stringLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... resolutionAge 0..1AgeAge that the allergy or intolerance resolved
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge
... reasonRefuted I0..1CodeableConceptExplanation associated with refuted status
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier Σ0..*IdentifierExternal ids for this item
... clinicalStatus ?!SΣI0..1CodeableConceptactive | inactive | resolved
Binding: AllergyIntoleranceClinicalStatusCodes (required)
... verificationStatus ?!SΣI0..1CodeableConceptunconfirmed | confirmed | refuted | entered-in-error
Binding: AllergyIntoleranceVerificationStatusCodes (required)
... type SΣ0..1codeallergy | intolerance - Underlying mechanism (if known)
Binding: AllergyIntoleranceType (required): Identification of the underlying physiological mechanism for a Reaction Risk.

... category SΣ0..*codefood | medication | environment | biologic
Binding: AllergyIntoleranceCategory (required): Category of an identified substance associated with allergies or intolerances.


... criticality SΣ0..1codelow | high | unable-to-assess
Binding: AllergyIntoleranceCriticality (required): Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.

... code SΣ1..1CodeableConceptCode that identifies the allergy or intolerance
Binding: Common substances for allergy and intolerance documentation including refutations (extensible)
... patient SΣ1..1Reference(QICorePatient)Who the sensitivity is for
... encounter S0..1Reference(QICore Encounter)Encounter when the allergy or intolerance was asserted
... onset[x] 0..1When allergy or intolerance was identified
.... onsetDateTimedateTime
.... onsetAgeAge
.... onsetPeriodPeriod
.... onsetRangeRange
... recordedDate S0..1dateTimeDate first version of the resource instance was recorded
... recorder 0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Who recorded the sensitivity
... asserter Σ0..1Reference(QICore Practitioner | QICorePractitionerRole | QICorePatient | QICoreRelatedPerson)Source of the information about the allergy
... lastOccurrence 0..1dateTimeDate(/time) of last known occurrence of a reaction
... note 0..*AnnotationAdditional text not captured in other fields
... reaction S0..*BackboneElementAdverse Reaction Events linked to exposure to substance
.... id 0..1stringUnique id for inter-element referencing
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
.... reaction-duration S0..1DurationHow long Manifestations persisted
URL: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... substance 0..1CodeableConceptSpecific substance or pharmaceutical product considered to be responsible for event
Binding: SubstanceCode (example): Codes defining the type of the substance (including pharmaceutical products).

.... manifestation S1..*CodeableConceptClinical symptoms/signs associated with the Event
Binding: SNOMEDCTClinicalFindings (extensible)
.... description 0..1stringDescription of the event as a whole
.... onset S0..1dateTimeDate(/time) when manifestations showed
.... severity S0..1codemild | moderate | severe (of event as a whole)
Binding: AllergyIntoleranceSeverity (required): Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.

.... exposureRoute 0..1CodeableConceptHow the subject was exposed to the substance
Binding: SNOMEDCTRouteCodes (example): A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.

.... note 0..*AnnotationText about event not captured in other fields

doco Documentation for this format

 

Other representations of profile: CSV, Excel, Schematron

Terminology Bindings

PathConformanceValueSet
AllergyIntolerance.languagepreferredCommonLanguages
Max Binding: AllLanguages
AllergyIntolerance.clinicalStatusrequiredAllergyIntoleranceClinicalStatusCodes
AllergyIntolerance.verificationStatusrequiredAllergyIntoleranceVerificationStatusCodes
AllergyIntolerance.typerequiredAllergyIntoleranceType
AllergyIntolerance.categoryrequiredAllergyIntoleranceCategory
AllergyIntolerance.criticalityrequiredAllergyIntoleranceCriticality
AllergyIntolerance.codeextensibleCommon substances for allergy and intolerance documentation including refutations
AllergyIntolerance.reaction.substanceexampleSubstanceCode
AllergyIntolerance.reaction.manifestationextensibleSNOMEDCTClinicalFindings
AllergyIntolerance.reaction.severityrequiredAllergyIntoleranceSeverity
AllergyIntolerance.reaction.exposureRouteexampleSNOMEDCTRouteCodes

Constraints

IdGradePathDetailsRequirements
ait-1errorAllergyIntoleranceAllergyIntolerance.clinicalStatus SHALL be present if verificationStatus is not entered-in-error.
: verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').exists() or clinicalStatus.exists()
ait-2errorAllergyIntoleranceAllergyIntolerance.clinicalStatus SHALL NOT be present if verification Status is entered-in-error
: verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').empty() or clinicalStatus.empty()
dom-2errorAllergyIntoleranceIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorAllergyIntoleranceIf 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-4errorAllergyIntoleranceIf 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-5errorAllergyIntoleranceIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6Best PracticeAllergyIntoleranceA resource should have narrative for robust management
: text.`div`.exists()
1errorAllergyIntoleranceextension: reasonRefuted is only permitted if status is refuted
: verificationStatus.coding.code = 'refuted' or extension.where(url='http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted').empty()
ele-1errorAllergyIntolerance.metaAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.implicitRulesAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.languageAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.textAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.extension:resolutionAgeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.extension:resolutionAgeMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.extension:reasonRefutedAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.extension:reasonRefutedMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.identifierAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.clinicalStatusAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.verificationStatusAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.typeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.categoryAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.criticalityAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.codeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.patientAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.encounterAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.onset[x]All FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.recordedDateAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.recorderAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.asserterAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.lastOccurrenceAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.noteAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reactionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.reaction.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.reaction.extension:reaction-durationAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.reaction.extension:reaction-durationMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.reaction.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorAllergyIntolerance.reaction.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorAllergyIntolerance.reaction.substanceAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.manifestationAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.descriptionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.onsetAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.severityAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.exposureRouteAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorAllergyIntolerance.reaction.noteAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())