FHIR CI-Build

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

Operationdefinition.shex

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for operationdefinition

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>
IMPORT <Coding.shex>
IMPORT <boolean.shex>
IMPORT <integer.shex>
IMPORT <dateTime.shex>
IMPORT <markdown.shex>
IMPORT <canonical.shex>
IMPORT <Identifier.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>

start=@<OperationDefinition> AND {fhir:nodeRole [fhir:treeRoot]}

# Definition of an operation or a named query
<OperationDefinition> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:OperationDefinition]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:url @<uri>?;                       # Canonical identifier for this 
                                            # operation definition, represented 
                                            # as an absolute URI (globally 
                                            # unique) 
    fhir:identifier @<OneOrMore_Identifier>?;  # Additional identifier for the 
                                            # implementation guide (business 
                                            # identifier) 
    fhir:version @<string>?;                # Business version of the operation 
                                            # definition 
    fhir:versionAlgorithm @<string>  OR 
    			@<Coding>  ?;  # How to compare versions
    fhir:name @<string>;                    # Name for this operation definition 
                                            # (computer friendly) 
    fhir:title @<string>?;                  # Name for this operation definition 
                                            # (human friendly) 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:kind @<code> AND
    	{fhir:v @fhirvs:operation-kind};  # operation | query
    fhir:experimental @<boolean>?;          # For testing purposes, not real 
                                            # usage 
    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 
                                            # the operation definition 
    fhir:useContext @<OneOrMore_UsageContext>?;  # The context that the content is 
                                            # intended to support 
    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Intended jurisdiction for 
                                            # operation definition (if 
                                            # applicable) 
    fhir:purpose @<markdown>?;              # Why this operation definition is 
                                            # defined 
    fhir:copyright @<markdown>?;            # Use and/or publishing restrictions
    fhir:copyrightLabel @<string>?;         # Copyright holder and year(s)
    fhir:affectsState @<boolean>?;          # Whether content is changed by the 
                                            # operation 
    fhir:code @<code>;                      # Recommended name for operation in 
                                            # search url 
    fhir:comment @<markdown>?;              # Additional information about use
    fhir:base @<canonical>?;                # Marks this as a profile of the base
    fhir:resource @<OneOrMore_code> AND
    	{fhir:v @fhirvs:version-independent-all-resource-types}?;  # Types this operation applies to
    fhir:system @<boolean>;                 # Invoke at the system level?
    fhir:type @<boolean>;                   # Invoke at the type level?
    fhir:instance @<boolean>;               # Invoke on an instance?
    fhir:inputProfile @<canonical>?;        # Validation information for in 
                                            # parameters 
    fhir:outputProfile @<canonical>?;       # Validation information for out 
                                            # parameters 
    fhir:parameter @<OneOrMore_OperationDefinition.parameter>?;  # Parameters for the operation/query
    fhir:overload @<OneOrMore_OperationDefinition.overload>?;  # Define overloaded variants for 
                                            # when  generating code 
}  

# References to this parameter
<OperationDefinition.parameter.referencedFrom> EXTENDS @<BackboneElement> CLOSED {   
    fhir:source @<string>;                  # Referencing parameter
    fhir:sourceId @<string>?;               # Element id of reference
}  

# Parameters for the operation/query
<OperationDefinition.parameter> EXTENDS @<BackboneElement> CLOSED {   
    fhir:name @<code>;                      # Name in Parameters.parameter.name 
                                            # or in URL 
    fhir:use @<code> AND
    	{fhir:v @fhirvs:operation-parameter-use};  # in | out
    fhir:scope @<OneOrMore_code> AND
    	{fhir:v @fhirvs:operation-parameter-scope}?;  # instance | type | system
    fhir:min @<integer>;                    # Minimum Cardinality
    fhir:max @<string>;                     # Maximum Cardinality (a number or *)
    fhir:documentation @<markdown>?;        # Description of meaning/use
    fhir:type @<code> AND
    	{fhir:v @fhirvs:fhir-types}?;  # What type this parameter has
    fhir:allowedType @<OneOrMore_code> AND
    	{fhir:v @fhirvs:fhir-types}?;  # Allowed sub-type this parameter 
                                            # can have (if type is abstract) 
    fhir:targetProfile @<OneOrMore_canonical>?;  # If type is Reference | canonical, 
                                            # allowed targets. If type is 
                                            # 'Resource', then this constrains 
                                            # the allowed resource types 
    fhir:searchType @<code> AND
    	{fhir:v @fhirvs:search-param-type}?;  # number | date | string | token | 
                                            # reference | composite | quantity | 
                                            # uri | special 
    fhir:binding @<OperationDefinition.parameter.binding>?;  # ValueSet details if this is coded
    fhir:referencedFrom @<OneOrMore_OperationDefinition.parameter.referencedFrom>?;  # References to this parameter
    fhir:part @<OneOrMore_OperationDefinition.parameter>?;  # Parts of a nested Parameter
}  

# Define overloaded variants for when  generating code
<OperationDefinition.overload> EXTENDS @<BackboneElement> CLOSED {   
    fhir:parameterName @<OneOrMore_string>?;  # Name of parameter to include in 
                                            # overload 
    fhir:comment @<string>?;                # Comments to go on overload
}  

# ValueSet details if this is coded
<OperationDefinition.parameter.binding> EXTENDS @<BackboneElement> CLOSED {   
    fhir:strength @<code> AND
    	{fhir:v @fhirvs:binding-strength};  # required | extensible | preferred 
                                            # | example 
    fhir:valueSet @<canonical>;             # Source of value set
}  

# Parts of a nested Parameter
<OperationDefinition.parameter.partnull> CLOSED {   
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<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_code> CLOSED {
    rdf:first @<code>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_code> 
}
<OneOrMore_OperationDefinition.parameter> CLOSED {
    rdf:first @<OperationDefinition.parameter>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_OperationDefinition.parameter> 
}
<OneOrMore_OperationDefinition.overload> CLOSED {
    rdf:first @<OperationDefinition.overload>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_OperationDefinition.overload> 
}
<OneOrMore_canonical> CLOSED {
    rdf:first @<canonical>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_canonical> 
}
<OneOrMore_OperationDefinition.parameter.referencedFrom> CLOSED {
    rdf:first @<OperationDefinition.parameter.referencedFrom>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_OperationDefinition.parameter.referencedFrom> 
}
<OneOrMore_string> CLOSED {
    rdf:first @<string>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_string> 
}

#---------------------- Value Sets ------------------------

# Indication of the degree of conformance expectations associated with a binding.
fhirvs:binding-strength ["required" "extensible" "preferred" "example"]

# All FHIR types
fhirvs:fhir-types ["Base" "Element" "BackboneElement" "DataType" "Address" "Annotation" "Attachment" "Availability" "BackboneType" "Dosage" "ElementDefinition" "MarketingStatus" "ProductShelfLife" "RelativeTime" "Timing" "CodeableConcept" "CodeableReference" "Coding" "ContactDetail" "ContactPoint" "Contributor" "DataRequirement" "Expression" "ExtendedContactDetail" "Extension" "HumanName" "Identifier" "Meta" "MonetaryComponent" "Money" "Narrative" "ParameterDefinition" "Period" "PrimitiveType" "base64Binary" "boolean" "date" "dateTime" "decimal" "instant" "integer" "positiveInt" "unsignedInt" "integer64" "string" "code" "id" "markdown" "time" "uri" "canonical" "oid" "url" "uuid" "Quantity" "Age" "Count" "Distance" "Duration" "Range" "Ratio" "RatioRange" "Reference" "RelatedArtifact" "SampledData" "Signature" "TriggerDefinition" "UsageContext" "VirtualServiceDetail" "xhtml" "Resource" "Binary" "Bundle" "DomainResource" "Account" "ActivityDefinition" "ActorDefinition" "AdministrableProductDefinition" "AdverseEvent" "AllergyIntolerance" "Appointment" "AppointmentResponse" "ArtifactAssessment" "AuditEvent" "Basic" "BiologicallyDerivedProduct" "BiologicallyDerivedProductDispense" "BodyStructure" "CanonicalResource" "CapabilityStatement" "CarePlan" "CareTeam" "ChargeItem" "ChargeItemDefinition" "Citation" "Claim" "ClaimResponse" "ClinicalImpression" "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" "EvidenceReport" "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" "MetadataResource" "MolecularDefinition" "MolecularSequence" "NamingSystem" "NutritionIntake" "NutritionOrder" "NutritionProduct" "Observation" "ObservationDefinition" "OperationDefinition" "OperationOutcome" "Organization" "OrganizationAffiliation" "PackagedProductDefinition" "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" "Parameters"]

# Whether an operation is a normal operation or a query.
fhirvs:operation-kind ["operation" "query"]

# Indicates that a parameter applies when the operation is being invoked at the specified level
fhirvs:operation-parameter-scope ["instance" "type" "system"]

# Whether an operation parameter is an input or an output parameter.
fhirvs:operation-parameter-use ["in" "out"]

# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]

# Data types allowed to be used for search parameters.
fhirvs:search-param-type ["number" "date" "string" "token" "reference" "composite" "quantity" "uri" "special"]

# Current and past FHIR resource types (deleted or renamed), including abstract types
fhirvs:version-independent-all-resource-types ["Account" "ActivityDefinition" "ActorDefinition" "AdministrableProductDefinition" "AdverseEvent" "AllergyIntolerance" "Appointment" "AppointmentResponse" "ArtifactAssessment" "AuditEvent" "Basic" "Binary" "BiologicallyDerivedProduct" "BiologicallyDerivedProductDispense" "BodyStructure" "Bundle" "CanonicalResource" "CapabilityStatement" "CarePlan" "CareTeam" "ChargeItem" "ChargeItemDefinition" "Citation" "Claim" "ClaimResponse" "ClinicalImpression" "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" "DomainResource" "Encounter" "EncounterHistory" "Endpoint" "EnrollmentRequest" "EnrollmentResponse" "EpisodeOfCare" "EventDefinition" "Evidence" "EvidenceReport" "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" "MetadataResource" "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" "Resource" "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" "BodySite" "CatalogEntry" "Conformance" "DataElement" "DeviceComponent" "DeviceUseRequest" "DeviceUseStatement" "DiagnosticOrder" "DocumentManifest" "EffectEvidenceSynthesis" "EligibilityRequest" "EligibilityResponse" "ExpansionProfile" "ImagingManifest" "ImagingObjectSelection" "Media" "MedicationOrder" "MedicationUsage" "MedicinalProduct" "MedicinalProductAuthorization" "MedicinalProductContraindication" "MedicinalProductIndication" "MedicinalProductIngredient" "MedicinalProductInteraction" "MedicinalProductManufactured" "MedicinalProductPackaged" "MedicinalProductPharmaceutical" "MedicinalProductUndesirableEffect" "Order" "OrderResponse" "ProcedureRequest" "ProcessRequest" "ProcessResponse" "ReferralRequest" "RequestGroup" "ResearchDefinition" "ResearchElementDefinition" "RiskEvidenceSynthesis" "Sequence" "ServiceDefinition" "SubstanceSpecification" "InsuranceProduct"]


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.