R6 Ballot (3rd Draft) FHIR CI-Build

Publish-box (todo) This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Messagedefinition.shex

Maturity Level : N/A
Responsible Owner: Infrastructure And Messaging Work Group Standards Status : Informative Compartments : No defined compartments

Raw ShEx

ShEx statement for messagedefinition

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 <string.shex>

# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <String.shex>

IMPORT <Coding.shex>
IMPORT <boolean.shex>
IMPORT <dateTime.shex>
IMPORT <markdown.shex>
IMPORT <canonical.shex>

IMPORT <Boolean.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <Canonical.shex>

IMPORT <Identifier.shex>
IMPORT <unsignedInt.shex>

IMPORT <UnsignedInt.shex>

IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
start=@<MessageDefinition> AND {fhir:nodeRole [fhir:treeRoot]}
# A resource that defines a type of message that can be exchanged between systems
<MessageDefinition> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:MessageDefinition]?;fhir:nodeRole [fhir:treeRoot]?;
    fhir:url @<uri>?;                       # The cannonical URL for a given 

    fhir:url @<Uri>?;                       # The cannonical URL for a given 

                                            # MessageDefinition 
    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for a given 
                                            # MessageDefinition 
    fhir:version @<string>?;                # Business version of the message 

    fhir:version @<String>?;                # Business version of the message 

                                            # definition 
    fhir:versionAlgorithm @<string>  OR 

    fhir:versionAlgorithm @<String>  OR 

    			@<Coding>  ?;  # How to compare versions
    fhir:name @<string>?;                   # Name for this message definition 

    fhir:name @<String>?;                   # Name for this message definition 

                                            # (computer friendly) 
    fhir:title @<string>?;                  # Name for this message definition 

    fhir:title @<String>?;                  # Name for this message definition 

                                            # (human friendly) 
    fhir:replaces @<OneOrMore_canonical>?;  # Takes the place of
    fhir:status @<code> AND

    fhir:replaces @<OneOrMore_Canonical>?;  # Takes the place of
    fhir:status @<Code> AND

    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:experimental @<boolean>?;          # For testing only - never for real 

    fhir:experimental @<Boolean>?;          # For testing only - never for real 

                                            # usage 
    fhir:date @<dateTime>;                  # Date last changed
    fhir:publisher @<string>?;              # Name of the publisher/steward 

    fhir:date @<DateTime>;                  # Date last changed
    fhir:publisher @<String>?;              # Name of the publisher/steward 

                                            # (organization or individual) 
    fhir:contact @<OneOrMore_ContactDetail>?;  # Contact details for the publisher
    fhir:description @<markdown>?;          # Natural language description of 

    fhir:description @<Markdown>?;          # Natural language description of 

                                            # the message definition 
    fhir:useContext @<OneOrMore_UsageContext>?;  # The context that the content is 
                                            # intended to support 
    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Intended jurisdiction for message 
                                            # definition (if applicable) 
    fhir:purpose @<markdown>?;              # Why this message definition is 

    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Jurisdiction of the authority that 
                                            # maintains the message definition 
                                            # (if applicable) 
    fhir:purpose @<Markdown>?;              # Why this message definition is 

                                            # defined 
    fhir:copyright @<markdown>?;            # Use and/or publishing restrictions
    fhir:copyrightLabel @<string>?;         # Copyright holder and year(s)
    fhir:base @<canonical>?;                # Definition this one is based on
    fhir:parent @<OneOrMore_canonical>?;    # Protocol/workflow this is part of

    fhir:copyright @<Markdown>?;            # Notice about intellectual property 
                                            # ownership, can include 
                                            # restrictions on use 
    fhir:copyrightLabel @<String>?;         # Copyright holder and year(s)
    fhir:base @<Canonical>?;                # Definition this one is based on
    fhir:parent @<OneOrMore_Canonical>?;    # Protocol/workflow this is part of

    fhir:event @<Coding>  OR 
    			@<uri>  ;  # Event code  or link to the 

    			@<Uri>  ;  # Event code  or link to the 

                                            # EventDefinition 
    fhir:category @<code> AND

    fhir:category @<Code> AND

    	{fhir:v @fhirvs:message-significance-category}?;  # consequence | currency | 
                                            # notification 
    fhir:focus @<OneOrMore_MessageDefinition.focus>?;  # Resource(s) that are the subject 
                                            # of the event 
    fhir:responseRequired @<code> AND

    fhir:responseRequired @<Code> AND

    	{fhir:v @fhirvs:messageheader-response-request}?;  # always | on-error | never | 
                                            # on-success 
    fhir:allowedResponse @<OneOrMore_MessageDefinition.allowedResponse>?;  # Responses to this message
    fhir:graph @<canonical>?;               # Canonical reference to a 
                                            # GraphDefinition 

}  
# Resource(s) that are the subject of the event
<MessageDefinition.focus> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<code> AND

    fhir:code @<Code> AND

    	{fhir:v @fhirvs:resource-types};  # Type of resource
    fhir:profile @<canonical>?;             # Profile that must be adhered to by 

    fhir:profile @<Canonical>?;             # Profile that must be adhered to by 

                                            # focus 
    fhir:min @<unsignedInt>;                # Minimum number of focuses of this 

    fhir:min @<UnsignedInt>;                # Minimum number of focuses of this 

                                            # type 
    fhir:max @<string>?;                    # Maximum number of focuses of this 

    fhir:max @<String>?;                    # Maximum number of focuses of this 

                                            # type 
}  
# Responses to this message
<MessageDefinition.allowedResponse> EXTENDS @<BackboneElement> CLOSED {   
    fhir:message @<canonical>;              # Reference to allowed message 

    fhir:message @<Canonical>;              # Reference to allowed message 

                                            # definition response 
    fhir:situation @<markdown>?;            # When should this response be used

    fhir:situation @<Markdown>?;            # When should this response be used

}  
#---------------------- 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_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_MessageDefinition.focus> CLOSED {
    rdf:first @<MessageDefinition.focus>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_MessageDefinition.focus> 
}
<OneOrMore_MessageDefinition.allowedResponse> CLOSED {
    rdf:first @<MessageDefinition.allowedResponse>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_MessageDefinition.allowedResponse> 
}
#---------------------- Value Sets ------------------------
# The impact of the content of a message.
fhirvs:message-significance-category ["consequence" "currency" "notification"]
# HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.
fhirvs:messageheader-response-request ["always" "on-error" "never" "on-success"]
# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]
# Concrete FHIR Resource Types
fhirvs: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.