Foundation
Publish-box
(todo)
This
is
the
Continuous
Integration
Build
of
FHIR
(will
be
incorrect/inconsistent
at
times).
See
the
Directory
of
published
versions
| Responsible Owner: FHIR Infrastructure Work Group | Standards Status : Informative | Compartments : No defined compartments |
ShEx statement for questionnaire
PREFIX fhir: <http://hl7.org/fhir/> PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>IMPORT <uri.shex> IMPORT <code.shex> IMPORT <date.shex> IMPORT <time.shex> IMPORT <string.shex># ShEx Version 2.2 IMPORT <Uri.shex> IMPORT <Code.shex> IMPORT <Date.shex> IMPORT <Time.shex> IMPORT <String.shex> IMPORT <Coding.shex> IMPORT <Period.shex>IMPORT <boolean.shex> IMPORT <decimal.shex> IMPORT <integer.shex> IMPORT <dateTime.shex> IMPORT <markdown.shex>IMPORT <Boolean.shex> IMPORT <Integer.shex> IMPORT <Decimal.shex> IMPORT <DateTime.shex> IMPORT <Markdown.shex> IMPORT <Resource.shex>IMPORT <canonical.shex>IMPORT <Canonical.shex> IMPORT <Reference.shex> IMPORT <Identifier.shex> IMPORT <Attachment.shex> IMPORT <UsageContext.shex> IMPORT <ContactDetail.shex> IMPORT <DomainResource.shex> IMPORT <SimpleQuantity.shex> IMPORT <CodeableConcept.shex> IMPORT <BackboneElement.shex> start=@<Questionnaire> AND {fhir:nodeRole [fhir:treeRoot]} # A structured set of questions <Questionnaire> EXTENDS @<DomainResource> CLOSED { a [fhir:Questionnaire]?;fhir:nodeRole [fhir:treeRoot]?;fhir:url @<uri>?; # Canonical identifier for thisfhir:url @<Uri>?; # Canonical identifier for this # questionnaire, represented as an # absolute URI (globally unique) fhir:identifier @<OneOrMore_Identifier>?; # Business identifier for # questionnairefhir:version @<string>?; # Business version of thefhir:version @<String>?; # Business version of the # questionnairefhir:versionAlgorithm @<string> ORfhir:versionAlgorithm @<String> OR @<Coding> ?; # How to compare versionsfhir:name @<string>?; # Name for this questionnairefhir:name @<String>?; # Name for this questionnaire # (computer friendly)fhir:title @<string>?; # Name for this questionnaire (humanfhir:title @<String>?; # Name for this questionnaire (human # friendly)fhir:derivedFrom @<OneOrMore_canonical>?; # Based on Questionnaire fhir:status @<code> ANDfhir:derivedFrom @<OneOrMore_Canonical>?; # Based on Questionnaire fhir:status @<Code> AND {fhir:v @fhirvs:publication-status}; # draft | active | retired | unknownfhir:experimental @<boolean>?; # For testing only - never for realfhir:experimental @<Boolean>?; # For testing only - never for real # usagefhir:subjectType @<OneOrMore_code> ANDfhir:subjectType @<OneOrMore_Code> AND {fhir:v @fhirvs:resource-types}?; # Resource that can be subject of # QuestionnaireResponsefhir:date @<dateTime>?; # Date last changed fhir:publisher @<string>?; # Name of the publisher/stewardfhir:date @<DateTime>?; # Date last changed fhir:publisher @<String>?; # Name of the publisher/steward # (organization or individual) fhir:contact @<OneOrMore_ContactDetail>?; # Contact details for the publisherfhir:description @<markdown>?; # Natural language description offhir:description @<Markdown>?; # Natural language description of # the questionnaire fhir:useContext @<OneOrMore_UsageContext>?; # The context that the content is # intended to supportfhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Intended jurisdiction for # questionnaire (if applicable) fhir:purpose @<markdown>?; # Why this questionnaire is defined fhir:copyright @<markdown>?; # Use and/or publishing restrictions fhir:copyrightLabel @<string>?; # Copyright holder and year(s) fhir:approvalDate @<date>?; # When the questionnaire wasfhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Jurisdiction of the authority that # maintains the questionnaire (if # applicable) fhir:purpose @<Markdown>?; # Why this questionnaire is defined fhir:copyright @<Markdown>?; # Notice about intellectual property # ownership, can include # restrictions on use fhir:copyrightLabel @<String>?; # Copyright holder and year(s) fhir:approvalDate @<Date>?; # When the questionnaire was # approved by publisherfhir:lastReviewDate @<date>?; # When the questionnaire was lastfhir:lastReviewDate @<Date>?; # When the questionnaire was last # reviewed by the publisher fhir:effectivePeriod @<Period>?; # When the questionnaire is expected # to be used fhir:code @<OneOrMore_Coding>?; # Concept that represents the # overall questionnaire fhir:item @<OneOrMore_Questionnaire.item>?; # Questions and sections within the # Questionnaire }# Only allow data when <Questionnaire.item.enableWhen> EXTENDS @<BackboneElement> CLOSED { fhir:question @<string>; # The linkId of question that # determines whether item is # enabled/disabled fhir:operator @<code> AND {fhir:v @fhirvs:questionnaire-enable-operator}; # exists | = | != | > | < | >= | <= fhir:answer @<boolean> OR @<decimal> OR @<integer> OR @<date> OR @<dateTime> OR @<time> OR @<string> OR @<Coding> OR @<SimpleQuantity> OR (@<Reference> AND {fhir:link @<Resource> }) ; # Value for question comparison # based on operator }# Nested questionnaire items <Questionnaire.item.itemnull> CLOSED { } # Questions and sections within the Questionnaire <Questionnaire.item> EXTENDS @<BackboneElement> CLOSED {fhir:linkId @<string>; # Unique id for item in questionnaire fhir:definition @<uri>?; # ElementDefinition - details forfhir:linkId @<String>; # Unique id for item in questionnaire fhir:definition @<OneOrMore_Uri>?; # ElementDefinition - details for # the item fhir:code @<OneOrMore_Coding>?; # Corresponding concept for this # item in a terminologyfhir:prefix @<string>?; # E.g. "1(a)", "2.5.3" fhir:text @<string>?; # Primary text for the item fhir:type @<code> ANDfhir:prefix @<String>?; # E.g. "1(a)", "2.5.3" fhir:text @<String>?; # Primary text for the item fhir:type @<Code> AND {fhir:v @fhirvs:item-type-useable}; # group | display | boolean | # decimal | integer | date | # dateTime + fhir:enableWhen @<OneOrMore_Questionnaire.item.enableWhen>?; # Only allow data whenfhir:enableBehavior @<code> ANDfhir:enableBehavior @<Code> AND {fhir:v @fhirvs:questionnaire-enable-behavior}?; # all | anyfhir:disabledDisplay @<code> ANDfhir:disabledDisplay @<Code> AND {fhir:v @fhirvs:questionnaire-disabled-display}?; # hidden | protectedfhir:required @<boolean>?; # Whether the item must be includedfhir:required @<Boolean>?; # Whether the item must be included # in data resultsfhir:repeats @<boolean>?; # Whether the item may repeat fhir:readOnly @<boolean>?; # Don't allow human editing fhir:maxLength @<integer>?; # No more than these many characters fhir:answerConstraint @<code> ANDfhir:repeats @<Boolean>?; # Whether the item may repeat fhir:readOnly @<Boolean>?; # Don't allow human editing fhir:maxLength @<Integer>?; # No more than these many characters fhir:answerConstraint @<Code> AND {fhir:v @fhirvs:questionnaire-answer-constraint}?; # optionsOnly | optionsOrType | # optionsOrStringfhir:answerValueSet @<canonical>?; # ValueSet containing permittedfhir:answerValueSet @<Canonical>?; # ValueSet containing permitted # answers fhir:answerOption @<OneOrMore_Questionnaire.item.answerOption>?; # Permitted answer fhir:initial @<OneOrMore_Questionnaire.item.initial>?; # Initial value(s) when item is # first rendered fhir:item @<OneOrMore_Questionnaire.item>?; # Nested questionnaire items } # Permitted answer <Questionnaire.item.answerOption> EXTENDS @<BackboneElement> CLOSED {fhir:value @<decimal> OR @<integer> OR @<date> OR @<dateTime> OR @<time> OR @<string> OR @<uri> ORfhir:value @<Decimal> OR @<Integer> OR @<Date> OR @<DateTime> OR @<Time> OR @<String> OR @<Uri> OR @<Coding> OR @<SimpleQuantity> OR(@<Reference> AND {fhir:link @<Resource> }) ; # Answer value fhir:initialSelected @<boolean>?; # Whether option is selected by(@<Reference> AND {fhir:l @<Resource> }) ; # Answer value fhir:initialSelected @<Boolean>?; # Whether option is selected by # default } # Initial value(s) when item is first rendered <Questionnaire.item.initial> EXTENDS @<BackboneElement> CLOSED {fhir:value @<boolean> OR @<decimal> OR @<integer> OR @<date> OR @<dateTime> OR @<time> OR @<string> OR @<uri> ORfhir:value @<Boolean> OR @<Decimal> OR @<Integer> OR @<Date> OR @<DateTime> OR @<Time> OR @<String> OR @<Uri> OR @<Attachment> OR @<Coding> OR @<SimpleQuantity> OR(@<Reference> AND {fhir:link @<Resource> }) ; # Actual value for initializing the(@<Reference> AND {fhir:l @<Resource> }) ; # Actual value for initializing the # question } # Only allow data when <Questionnaire.item.enableWhen> EXTENDS @<BackboneElement> CLOSED { fhir:question @<String>; # The linkId of question that # determines whether item is # enabled/disabled fhir:operator @<Code> AND {fhir:v @fhirvs:questionnaire-enable-operator}; # exists | = | != | > | < | >= | <= fhir:answer @<Boolean> OR @<Decimal> OR @<Integer> OR @<Date> OR @<DateTime> OR @<Time> OR @<String> OR @<Coding> OR @<SimpleQuantity> OR (@<Reference> AND {fhir:l @<Resource> }) OR @<Uri> OR @<Attachment> ; # Value for question comparison # based on operator } #---------------------- Cardinality Types (OneOrMore) ------------------- <OneOrMore_Identifier> CLOSED { rdf:first @<Identifier> ; rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> }<OneOrMore_canonical> CLOSED { rdf:first @<canonical> ; rdf:rest [rdf:nil] OR @<OneOrMore_canonical><OneOrMore_Canonical> CLOSED { rdf:first @<Canonical> ; rdf:rest [rdf:nil] OR @<OneOrMore_Canonical> }<OneOrMore_code> CLOSED { rdf:first @<code> ; rdf:rest [rdf:nil] OR @<OneOrMore_code><OneOrMore_Code> CLOSED { rdf:first @<Code> ; rdf:rest [rdf:nil] OR @<OneOrMore_Code> } <OneOrMore_ContactDetail> CLOSED { rdf:first @<ContactDetail> ; rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail> } <OneOrMore_UsageContext> CLOSED { rdf:first @<UsageContext> ; rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext> } <OneOrMore_CodeableConcept> CLOSED { rdf:first @<CodeableConcept> ; rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> } <OneOrMore_Coding> CLOSED { rdf:first @<Coding> ; rdf:rest [rdf:nil] OR @<OneOrMore_Coding> } <OneOrMore_Questionnaire.item> CLOSED { rdf:first @<Questionnaire.item> ; rdf:rest [rdf:nil] OR @<OneOrMore_Questionnaire.item> } <OneOrMore_Uri> CLOSED { rdf:first @<Uri> ; rdf:rest [rdf:nil] OR @<OneOrMore_Uri> } <OneOrMore_Questionnaire.item.enableWhen> CLOSED { rdf:first @<Questionnaire.item.enableWhen> ; rdf:rest [rdf:nil] OR @<OneOrMore_Questionnaire.item.enableWhen> } <OneOrMore_Questionnaire.item.answerOption> CLOSED { rdf:first @<Questionnaire.item.answerOption> ; rdf:rest [rdf:nil] OR @<OneOrMore_Questionnaire.item.answerOption> } <OneOrMore_Questionnaire.item.initial> CLOSED { rdf:first @<Questionnaire.item.initial> ; rdf:rest [rdf:nil] OR @<OneOrMore_Questionnaire.item.initial> } #---------------------- Value Sets ------------------------ # Item types allowed to appear on Questionnaire.type (excludes the abstract 'questionnaire' code. fhirvs:item-type-useable ["group" "display" "boolean" "decimal" "integer" "date" "dateTime" "time" "string" "text" "url" "coding" "attachment" "reference" "quantity"] # The lifecycle status of an artifact. fhirvs:publication-status ["draft" "active" "retired" "unknown"] # Codes that describe the types of constraints possible on a question item that has a list of permitted answers fhirvs:questionnaire-answer-constraint ["optionsOnly" "optionsOrType" "optionsOrString"] # Codes that guide the display of disabled questionnaire items fhirvs:questionnaire-disabled-display ["hidden" "protected"] # Controls how multiple enableWhen values are interpreted - whether all or any must be true. fhirvs:questionnaire-enable-behavior ["all" "any"] # The criteria by which a question is enabled. fhirvs:questionnaire-enable-operator ["exists" "=" "!=" ">" "<" ">=" "<="] # Concrete FHIR Resource Typesfhirvs:resource-types ["Account" "ActivityDefinition" "ActorDefinition" "AdministrableProductDefinition" "AdverseEvent" "AllergyIntolerance" "Appointment" "AppointmentResponse" "ArtifactAssessment" "AuditEvent" "Basic" "Binary" "BiologicallyDerivedProduct" "BiologicallyDerivedProductDispense" "BodyStructure" "Bundle" "CapabilityStatement" "CarePlan" "CareTeam" "ChargeItem" "ChargeItemDefinition" "Citation" "Claim" "ClaimResponse" "ClinicalAssessment" "ClinicalUseDefinition" "CodeSystem" "Communication" "CommunicationRequest" "CompartmentDefinition" "Composition" "ConceptMap" "Condition" "ConditionDefinition" "Consent" "Contract" "Coverage" "CoverageEligibilityRequest" "CoverageEligibilityResponse" "DetectedIssue" "Device" "DeviceAlert" "DeviceAssociation" "DeviceDefinition" "DeviceDispense" "DeviceMetric" "DeviceRequest" "DeviceUsage" "DiagnosticReport" "DocumentReference" "Encounter" "EncounterHistory" "Endpoint" "EnrollmentRequest" "EnrollmentResponse" "EpisodeOfCare" "EventDefinition" "Evidence" "EvidenceVariable" "ExampleScenario" "ExplanationOfBenefit" "FamilyMemberHistory" "Flag" "FormularyItem" "GenomicStudy" "Goal" "GraphDefinition" "Group" "GuidanceResponse" "HealthcareService" "ImagingSelection" "ImagingStudy" "Immunization" "ImmunizationEvaluation" "ImmunizationRecommendation" "ImplementationGuide" "Ingredient" "InsurancePlan" "InsuranceProduct" "InventoryItem" "InventoryReport" "Invoice" "Library" "Linkage" "List" "Location" "ManufacturedItemDefinition" "Measure" "MeasureReport" "Medication" "MedicationAdministration" "MedicationDispense" "MedicationKnowledge" "MedicationRequest" "MedicationStatement" "MedicinalProductDefinition" "MessageDefinition" "MessageHeader" "MolecularDefinition" "MolecularSequence" "NamingSystem" "NutritionIntake" "NutritionOrder" "NutritionProduct" "Observation" "ObservationDefinition" "OperationDefinition" "OperationOutcome" "Organization" "OrganizationAffiliation" "PackagedProductDefinition" "Parameters" "Patient" "PaymentNotice" "PaymentReconciliation" "Permission" "Person" "PersonalRelationship" "PlanDefinition" "Practitioner" "PractitionerRole" "Procedure" "Provenance" "Questionnaire" "QuestionnaireResponse" "RegulatedAuthorization" "RelatedPerson" "RequestOrchestration" "Requirements" "ResearchStudy" "ResearchSubject" "RiskAssessment" "Schedule" "SearchParameter" "ServiceRequest" "Slot" "Specimen" "SpecimenDefinition" "StructureDefinition" "StructureMap" "Subscription" "SubscriptionStatus" "SubscriptionTopic" "Substance" "SubstanceDefinition" "SubstanceNucleicAcid" "SubstancePolymer" "SubstanceProtein" "SubstanceReferenceInformation" "SubstanceSourceMaterial" "SupplyDelivery" "SupplyRequest" "Task" "TerminologyCapabilities" "TestPlan" "TestReport" "TestScript" "Transport" "ValueSet" "VerificationResult" "VisionPrescription"]fhirvs:resource-types ["Account" "ActivityDefinition" "ActorDefinition" "AdministrableProductDefinition" "AdverseEvent" "AllergyIntolerance" "Appointment" "AppointmentResponse" "ArtifactAssessment" "AuditEvent" "Basic" "Binary" "BiologicallyDerivedProduct" "BodyStructure" "Bundle" "CapabilityStatement" "CarePlan" "CareTeam" "Claim" "ClaimResponse" "ClinicalUseDefinition" "CodeSystem" "Communication" "CommunicationRequest" "CompartmentDefinition" "Composition" "ConceptMap" "Condition" "Consent" "Contract" "Coverage" "CoverageEligibilityRequest" "CoverageEligibilityResponse" "DetectedIssue" "Device" "DeviceAlert" "DeviceAssociation" "DeviceDefinition" "DeviceMetric" "DeviceRequest" "DiagnosticReport" "DocumentReference" "Encounter" "Endpoint" "EnrollmentRequest" "EnrollmentResponse" "EpisodeOfCare" "EventDefinition" "Evidence" "EvidenceVariable" "ExampleScenario" "ExplanationOfBenefit" "FamilyMemberHistory" "Flag" "Goal" "Group" "GuidanceResponse" "HealthcareService" "ImagingSelection" "ImagingStudy" "Immunization" "ImplementationGuide" "Ingredient" "InsurancePlan" "InsuranceProduct" "Invoice" "Library" "List" "Location" "ManufacturedItemDefinition" "Measure" "MeasureReport" "Medication" "MedicationAdministration" "MedicationDispense" "MedicationRequest" "MedicationStatement" "MedicinalProductDefinition" "MessageDefinition" "MessageHeader" "NamingSystem" "NutritionIntake" "NutritionOrder" "NutritionProduct" "Observation" "ObservationDefinition" "OperationDefinition" "OperationOutcome" "Organization" "OrganizationAffiliation" "PackagedProductDefinition" "Parameters" "Patient" "PaymentNotice" "PaymentReconciliation" "Person" "PlanDefinition" "Practitioner" "PractitionerRole" "Procedure" "Provenance" "Questionnaire" "QuestionnaireResponse" "RegulatedAuthorization" "RelatedPerson" "RequestOrchestration" "Requirements" "ResearchStudy" "ResearchSubject" "RiskAssessment" "Schedule" "SearchParameter" "ServiceRequest" "Slot" "Specimen" "SpecimenDefinition" "StructureDefinition" "StructureMap" "Subscription" "SubscriptionStatus" "SubscriptionTopic" "Substance" "SubstanceDefinition" "Task" "TerminologyCapabilities" "ValueSet" "VisionPrescription"]
Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.
FHIR
®©
HL7.org
2011+.
FHIR
R6
hl7.fhir.core#6.0.0-ballot3
generated
on
Tue,
Apr
1,
Mon,
Nov
24,
2025
12:26+1100.
20:52+0000.
Links:
Search
|
Version
History
|
Contents
|
Glossary
|
QA
|
Compare
to
R4
|
Compare
to
R5
|
Compare
to
Last
Ballot
|
|
Propose
a
change