FHIR Release 3 (STU) R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.0.2: STU 3). (v3.3.0: R4 Ballot 2). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

5.4 Resource OperationDefinition - Content

FHIR Infrastructure Work Group Maturity Level : 4   Trial Use Normative Compartments : Not linked to any defined compartments

Normative Candidate Note: This page is candidate normative content for R4 in the Conformance Package . Once normative, it will lose it's Maturity Level, and breaking changes will no longer be made.

A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).

The OperationDefinition resource provides a formal computable definition of an operation or a named query . The OperationDefinition serves two principal purposes:

  • To allow for automatic determination of system compatibility
  • To allow for dynamic generation of forms to drive the operations

See below for further information about these, and about how operations and named queries are executed.

OperationDefinitions are published to define operations that servers can implement in a common fashion. The FHIR specification itself describes some (see below), and other organizations (including IHE, national programs, jurisdictions and vendors) are able to publish additional OperationDefinitions.

OperationDefinition resources are referred to from two different places:

  • From a Capability Statement CapabilityStatement , to declare what operations a system does or should implement
  • From another OperationDefinition resource. This allows for a server to describe a limited implementation of a standard operation, or to allow traceability if the server has to rename the operation due to a name clash

This resource is referenced by CapabilityStatement and ServiceDefinition capabilitystatement

Structure

profile 0..1 Reference ( StructureDefinition ) Profile on the type
Name Flags Card. Type Description & Constraints doco
. . OperationDefinition N DomainResource Definition of an operation or a named query
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference Canonical identifier for this operation definition definition, represented as a URI (globally unique)
. . . version Σ 0..1 string Business version of the operation definition
. . . name Σ 1..1 string Name for this operation definition (computer friendly)
. . . status ?! Σ 1..1 code draft | active | retired | unknown
PublicationStatus ( Required )
. . . kind Σ 1..1 code operation | query
OperationKind ( Required )
. . . experimental ?! Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date this was last changed
. . . publisher Σ 0..1 string Name of the publisher (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher
. . . description 0..1 markdown Natural language description of the operation definition
. . . useContext Σ TU 0..* UsageContext Context The context that the content is intended to support
. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for operation definition (if applicable)
Jurisdiction ValueSet ( Extensible )
. . . purpose 0..1 markdown Why this operation definition is defined
. . . idempotent affectsState Σ 0..1 boolean Whether content is unchanged by the operation
. . . code Σ 1..1 code Name used to invoke the operation
. . . comment 0..1 string markdown Additional information about use
. . . base Σ 0..1 Reference ( OperationDefinition canonical ) Marks this as a profile of the base
. . . resource Σ 0..* code Types this operation applies to
ResourceType ( Required )
. . . system Σ 1..1 boolean Invoke at the system level?
. . . type Σ 1..1 boolean Invole Invoke at the type level?
. . . instance Σ 1..1 boolean Invoke on an instance?
. . . inputProfile 0..1 canonical Validation information for in parameters
... outputProfile 0..1 canonical Validation information for out parameters
. . . parameter I 0..* BackboneElement Parameters for the operation/query
+ Either a type must be provided, or parts
+ A search type can only be specified for parameters of type string
. . . . name 1..1 code Name in Parameters.parameter.name or in URL
. . . . use 1..1 code in | out
OperationParameterUse ( Required )
. . . . min 1..1 integer Minimum Cardinality
. . . . max 1..1 string Maximum Cardinality (a number or *)
. . . . documentation 0..1 string Description of meaning/use
. . . . type I 0..1 code What type this parameter has
FHIRAllTypes ( Required )
. . . . targetProfile 0..* canonical If type is Reference, allowed targets
.... searchType I 0..1 code number | date | string | token | reference | composite | quantity | uri
SearchParamType ( Required )
. . . . binding 0..1 BackboneElement ValueSet details if this is coded
. . . . . strength 1..1 code required | extensible | preferred | example
BindingStrength ( Required )
. . . . . valueSet[x] 1..1 Source of value set
. . . . . . valueSetUri uri
. . . . . valueSetReference . valueSetCanonical Reference ( ValueSet canonical )
. . . . part I 0..* see parameter Parts of a nested Parameter
. . . overload 0..* BackboneElement Define overloaded variants for when generating code
. . . . parameterName 0..* string Name of parameter to include in overload
. . . . comment 0..1 string Comments to go on overload

doco Documentation for this format

UML Diagram ( Legend )

OperationDefinition ( DomainResource ) An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. instance; also called its canonical identifier. This SHALL be a URL, SHOULD be globally unique, unique and SHOULD be an a literal address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions) published url : uri [0..1] The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] The status of this operation definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. an artifact. (Strength=Required) PublicationStatus ! » Whether this is an operation or a named query kind : code [1..1] « Whether an operation is a normal operation or a query. (Strength=Required) OperationKind ! » A boolean Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), education/evaluation/marketing) and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes date : dateTime [0..1] The name of the individual or organization or individual that published the operation definition publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the operation definition from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances useContext : UsageContext [0..*] A legal or geographic region in which the operation definition is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + » Explaination Explanation of why this operation definition is needed and why it has been designed as it has purpose : markdown [0..1] Operations that are idempotent have affects state = false (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST idempotent affectsState : boolean [0..1] The name used to invoke the operation code : code [1..1] Additional information about how to use this operation or named query comment : string markdown [0..1] Indicates that this operation definition is a constraining profile on the base base : Reference canonical [0..1] OperationDefinition The types on which this operation can be executed resource : code [0..*] « One of the resource types defined as part of this version of FHIR. (Strength=Required) ResourceType ! » Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context) system : boolean [1..1] Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context) type : boolean [1..1] Indicates whether this operation can be invoked on a particular instance of one of the given types instance : boolean [1..1] Additional validation information for the in parameters. The profile is a constraint on the parameters resource inputProfile : canonical [0..1] Additional validation information for the out parameters. The profile is a constraint on the parameters resource outputProfile : canonical [0..1] Parameter The name of used to identify the parameter name : code [1..1] Whether this is an input or an output parameter use : code [1..1] « Whether an operation parameter is an input or an output parameter. (Strength=Required) OperationParameterUse ! » The minimum number of times this parameter SHALL appear in the request or response min : integer [1..1] The maximum number of times this element is permitted to appear in the request or response max : string [1..1] Describes the meaning or use of this parameter documentation : string [0..1] The type for this parameter type : code [0..1] « Either an abstract type, a resource or a data type. A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types (Strength=Required) FHIRAllTypes ! » If the type is "Reference", then targetProfile lists a one or more profiles that the Reference can refer to targetProfile : canonical [0..*] How the parameter is understood as a search parameter. This is only used if the parameter type is 'string' searchType : code [0..1] « Data types allowed to be used for search parameters. (Strength=Required) SearchParamType ! » A profile the specifies the rules that this parameter must conform to profile : Reference [0..1] StructureDefinition Binding Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances strength : code [1..1] « Indication of the degree of conformance expectations associated with a binding. (Strength=Required) BindingStrength ! » Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used valueSet[x] : Type [1..1] « uri | Reference canonical ( ValueSet ) » Overload Name of parameter to include in overload parameterName : string [0..*] Comments to go on overload comment : string [0..1] Binds to a value set if this parameter is coded (code, Coding, CodeableConcept) binding [0..1] The parts of a nested Parameter part [0..*] The parameters for the operation/query parameter [0..*] Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation overload [0..*]

XML Template

<

<OperationDefinition xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <
 <
 <
 <
 <
 <
 <
 <

 <url value="[uri]"/><!-- 0..1 Canonical identifier for this operation definition, represented as a URI (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the operation definition -->
 <name value="[string]"/><!-- 1..1 Name for this operation definition (computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <kind value="[code]"/><!-- 1..1 operation | query -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <
 <</useContext>

 <description value="[markdown]"/><!-- 0..1 Natural language description of the operation definition -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>

 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for operation definition (if applicable) --></jurisdiction>
 <
 <
 <
 <
 <</base>
 <
 <
 <
 <

 <purpose value="[markdown]"/><!-- 0..1 Why this operation definition is defined -->
 <affectsState value="[boolean]"/><!-- 0..1 Whether content is unchanged by the operation -->
 <code value="[code]"/><!-- 1..1 Name used to invoke the operation -->
 <comment value="[markdown]"/><!-- 0..1 Additional information about use -->
 <base><!-- 0..1 canonical(OperationDefinition) Marks this as a profile of the base --></base>
 <resource value="[code]"/><!-- 0..* Types this operation applies to -->
 <system value="[boolean]"/><!-- 1..1 Invoke at the system level? -->
 <type value="[boolean]"/><!-- 1..1 Invoke at the type level? -->
 <instance value="[boolean]"/><!-- 1..1 Invoke on an instance? -->
 <inputProfile><!-- 0..1 canonical(StructureDefinition) Validation information for in parameters --></inputProfile>
 <outputProfile><!-- 0..1 canonical(StructureDefinition) Validation information for out parameters --></outputProfile>

 <parameter>  <!-- 0..* Parameters for the operation/query -->
  <
  <
  <
  <
  <
  <
  <
  <</profile>

  <name value="[code]"/><!-- 1..1 Name in Parameters.parameter.name or in URL -->
  <use value="[code]"/><!-- 1..1 in | out -->
  <min value="[integer]"/><!-- 1..1 Minimum Cardinality -->
  <max value="[string]"/><!-- 1..1 Maximum Cardinality (a number or *) -->
  <documentation value="[string]"/><!-- 0..1 Description of meaning/use -->
  <type value="[code]"/><!-- ?? 0..1 What type this parameter has -->
  <targetProfile><!-- 0..* canonical(StructureDefinition) If type is Reference, allowed targets --></targetProfile>
  <searchType value="[code]"/><!-- ?? 0..1 number | date | string | token | reference | composite | quantity | uri -->

  <binding>  <!-- 0..1 ValueSet details if this is coded -->
   <
   <</valueSet[x]>

   <strength value="[code]"/><!-- 1..1 required | extensible | preferred | example -->
   <valueSet[x]><!-- 1..1 uri|canonical(ValueSet) Source of value set --></valueSet[x]>

  </binding>
  <part><!-- ?? 0..* Content as for OperationDefinition.parameter Parts of a nested Parameter --></part>
 </parameter>
 <overload>  <!-- 0..* Define overloaded variants for when  generating code -->
  <
  <

  <parameterName value="[string]"/><!-- 0..* Name of parameter to include in overload -->
  <comment value="[string]"/><!-- 0..1 Comments to go on overload -->

 </overload>
</OperationDefinition>

JSON Template

{doco
  "resourceType" : "",

  "resourceType" : "OperationDefinition",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
    "
    "
    "
    "
    "
    "
    "
    "
    "
      "

  "url" : "<uri>", // Canonical identifier for this operation definition, represented as a URI (globally unique)
  "version" : "<string>", // Business version of the operation definition
  "name" : "<string>", // R!  Name for this operation definition (computer friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "kind" : "<code>", // R!  operation | query
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the operation definition
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for operation definition (if applicable)
  "purpose" : "<markdown>", // Why this operation definition is defined
  "affectsState" : <boolean>, // Whether content is unchanged by the operation
  "code" : "<code>", // R!  Name used to invoke the operation
  "comment" : "<markdown>", // Additional information about use
  "base" : "<canonical>", // Marks this as a profile of the base
  "resource" : ["<code>"], // Types this operation applies to
  "system" : <boolean>, // R!  Invoke at the system level?
  "type" : <boolean>, // R!  Invoke at the type level?
  "instance" : <boolean>, // R!  Invoke on an instance?
  "inputProfile" : "<canonical>", // Validation information for in parameters
  "outputProfile" : "<canonical>", // Validation information for out parameters
  "parameter" : [{ // Parameters for the operation/query
    "name" : "<code>", // R!  Name in Parameters.parameter.name or in URL
    "use" : "<code>", // R!  in | out
    "min" : <integer>, // R!  Minimum Cardinality
    "max" : "<string>", // R!  Maximum Cardinality (a number or *)
    "documentation" : "<string>", // Description of meaning/use
    "type" : "<code>", // C? What type this parameter has
    "targetProfile" : ["<canonical>"], // If type is Reference, allowed targets
    "searchType" : "<code>", // C? number | date | string | token | reference | composite | quantity | uri
    "binding" : { // ValueSet details if this is coded
      "strength" : "<code>", // R!  required | extensible | preferred | example

      // valueSet[x]: Source of value set. One of these 2:
      ">"
      " }

      "valueSetUri" : "<uri>"
      "valueSetCanonical" : "<canonical>"

    },
    "

    "part" : [{ Content as for OperationDefinition.parameter }] // C? Parts of a nested Parameter

  }],
  "
    "
    "

  "overload" : [{ // Define overloaded variants for when  generating code
    "parameterName" : ["<string>"], // Name of parameter to include in overload
    "comment" : "<string>" // Comments to go on overload

  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:OperationDefinition;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:

  fhir:OperationDefinition.url [ uri ]; # 0..1 Canonical identifier for this operation definition, represented as a URI (globally unique)

  fhir:OperationDefinition.version [ string ]; # 0..1 Business version of the operation definition
  fhir:OperationDefinition.name [ string ]; # 1..1 Name for this operation definition (computer friendly)
  fhir:OperationDefinition.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:OperationDefinition.kind [ code ]; # 1..1 operation | query
  fhir:
  fhir:
  fhir:

  fhir:OperationDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:OperationDefinition.date [ dateTime ]; # 0..1 Date last changed
  fhir:OperationDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)

  fhir:OperationDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:OperationDefinition.description [ markdown ]; # 0..1 Natural language description of the operation definition
  fhir:

  fhir:OperationDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support

  fhir:OperationDefinition.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for operation definition (if applicable)
  fhir:
  fhir:

  fhir:OperationDefinition.purpose [ markdown ]; # 0..1 Why this operation definition is defined
  fhir:OperationDefinition.affectsState [ boolean ]; # 0..1 Whether content is unchanged by the operation

  fhir:OperationDefinition.code [ code ]; # 1..1 Name used to invoke the operation
  fhir:
  fhir:

  fhir:OperationDefinition.comment [ markdown ]; # 0..1 Additional information about use
  fhir:OperationDefinition.base [ canonical(OperationDefinition) ]; # 0..1 Marks this as a profile of the base

  fhir:OperationDefinition.resource [ code ], ... ; # 0..* Types this operation applies to
  fhir:OperationDefinition.system [ boolean ]; # 1..1 Invoke at the system level?
  fhir:

  fhir:OperationDefinition.type [ boolean ]; # 1..1 Invoke at the type level?

  fhir:OperationDefinition.instance [ boolean ]; # 1..1 Invoke on an instance?
  fhir:OperationDefinition.inputProfile [ canonical(StructureDefinition) ]; # 0..1 Validation information for in parameters
  fhir:OperationDefinition.outputProfile [ canonical(StructureDefinition) ]; # 0..1 Validation information for out parameters

  fhir:OperationDefinition.parameter [ # 0..* Parameters for the operation/query
    fhir:OperationDefinition.parameter.name [ code ]; # 1..1 Name in Parameters.parameter.name or in URL
    fhir:OperationDefinition.parameter.use [ code ]; # 1..1 in | out
    fhir:OperationDefinition.parameter.min [ integer ]; # 1..1 Minimum Cardinality
    fhir:OperationDefinition.parameter.max [ string ]; # 1..1 Maximum Cardinality (a number or *)
    fhir:OperationDefinition.parameter.documentation [ string ]; # 0..1 Description of meaning/use
    fhir:OperationDefinition.parameter.type [ code ]; # 0..1 What type this parameter has
    fhir:OperationDefinition.parameter.targetProfile [ canonical(StructureDefinition) ], ... ; # 0..* If type is Reference, allowed targets

    fhir:OperationDefinition.parameter.searchType [ code ]; # 0..1 number | date | string | token | reference | composite | quantity | uri
    fhir:

    fhir:OperationDefinition.parameter.binding [ # 0..1 ValueSet details if this is coded
      fhir:OperationDefinition.parameter.binding.strength [ code ]; # 1..1 required | extensible | preferred | example
      # OperationDefinition.parameter.binding.valueSet[x] : 1..1 Source of value set. One of these 2
        fhir:OperationDefinition.parameter.binding.valueSetUri [ uri ]
        fhir:) ]

        fhir:OperationDefinition.parameter.binding.valueSetCanonical [ canonical(ValueSet) ]

    ];
    fhir:OperationDefinition.parameter.part [ See OperationDefinition.parameter ], ... ; # 0..* Parts of a nested Parameter
  ], ...;
  fhir:OperationDefinition.overload [ # 0..* Define overloaded variants for when  generating code
    fhir:OperationDefinition.overload.parameterName [ string ], ... ; # 0..* Name of parameter to include in overload
    fhir:OperationDefinition.overload.comment [ string ]; # 0..1 Comments to go on overload
  ], ...;
]

Changes since DSTU2 R3

OperationDefinition.status Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status OperationDefinition.experimental Now marked as Modifier OperationDefinition.contact Type changed from BackboneElement to ContactDetail OperationDefinition.description Type changed from string to markdown OperationDefinition.useContext
OperationDefinition Added Element
OperationDefinition.jurisdiction OperationDefinition.affectsState
  • Added Element
OperationDefinition.purpose OperationDefinition.comment
  • Renamed from requirements to purpose Type changed from string to markdown
OperationDefinition.comment Renamed from notes to comment OperationDefinition.resource Renamed from type to resource OperationDefinition.type OperationDefinition.base
  • Min Cardinality changed from 0 to 1 Max Cardinality changed from * to 1 Type changed from code to boolean Remove Binding http://hl7.org/fhir/ValueSet/resource-types (required) OperationDefinition.parameter.type Change value set from http://hl7.org/fhir/ValueSet/operation-parameter-type Reference(OperationDefinition) to http://hl7.org/fhir/ValueSet/all-types canonical
OperationDefinition.parameter.searchType OperationDefinition.inputProfile
  • Added Element
OperationDefinition.overload OperationDefinition.outputProfile
  • Added Element
OperationDefinition.overload.parameterName OperationDefinition.parameter.targetProfile
  • Added Element
OperationDefinition.overload.comment OperationDefinition.parameter.binding.valueSet[x]
  • Added Element Remove Reference(ValueSet), Add canonical
OperationDefinition.contact.name OperationDefinition.idempotent
  • deleted
OperationDefinition.contact.telecom OperationDefinition.parameter.profile
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

See R2 <--> R3 Conversion Maps (status = 18 tests that all execute ok. 1 fail round-trip testing and all r3 resources are valid.). Note: these have note yet been updated to be R3 to R4

Structure

profile 0..1 Reference ( StructureDefinition ) Profile on the type
Name Flags Card. Type Description & Constraints doco
. . OperationDefinition N DomainResource Definition of an operation or a named query
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference Canonical identifier for this operation definition definition, represented as a URI (globally unique)
. . . version Σ 0..1 string Business version of the operation definition
. . . name Σ 1..1 string Name for this operation definition (computer friendly)
. . . status ?! Σ 1..1 code draft | active | retired | unknown
PublicationStatus ( Required )
. . . kind Σ 1..1 code operation | query
OperationKind ( Required )
. . . experimental ?! Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date this was last changed
. . . publisher Σ 0..1 string Name of the publisher (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher
. . . description 0..1 markdown Natural language description of the operation definition
. . . useContext Σ TU 0..* UsageContext Context The context that the content is intended to support
. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for operation definition (if applicable)
Jurisdiction ValueSet ( Extensible )
. . . purpose 0..1 markdown Why this operation definition is defined
. . . idempotent affectsState Σ 0..1 boolean Whether content is unchanged by the operation
. . . code Σ 1..1 code Name used to invoke the operation
. . . comment 0..1 string markdown Additional information about use
. . . base Σ 0..1 Reference ( OperationDefinition canonical ) Marks this as a profile of the base
. . . resource Σ 0..* code Types this operation applies to
ResourceType ( Required )
. . . system Σ 1..1 boolean Invoke at the system level?
. . . type Σ 1..1 boolean Invole Invoke at the type level?
. . . instance Σ 1..1 boolean Invoke on an instance?
. . . inputProfile 0..1 canonical Validation information for in parameters
... outputProfile 0..1 canonical Validation information for out parameters
. . . parameter I 0..* BackboneElement Parameters for the operation/query
+ Either a type must be provided, or parts
+ A search type can only be specified for parameters of type string
. . . . name 1..1 code Name in Parameters.parameter.name or in URL
. . . . use 1..1 code in | out
OperationParameterUse ( Required )
. . . . min 1..1 integer Minimum Cardinality
. . . . max 1..1 string Maximum Cardinality (a number or *)
. . . . documentation 0..1 string Description of meaning/use
. . . . type I 0..1 code What type this parameter has
FHIRAllTypes ( Required )
. . . . targetProfile 0..* canonical If type is Reference, allowed targets
.... searchType I 0..1 code number | date | string | token | reference | composite | quantity | uri
SearchParamType ( Required )
. . . . binding 0..1 BackboneElement ValueSet details if this is coded
. . . . . strength 1..1 code required | extensible | preferred | example
BindingStrength ( Required )
. . . . . valueSet[x] 1..1 Source of value set
. . . . . . valueSetUri uri
. . . . . valueSetReference . valueSetCanonical Reference ( ValueSet canonical )
. . . . part I 0..* see parameter Parts of a nested Parameter
. . . overload 0..* BackboneElement Define overloaded variants for when generating code
. . . . parameterName 0..* string Name of parameter to include in overload
. . . . comment 0..1 string Comments to go on overload

doco Documentation for this format

UML Diagram ( Legend )

OperationDefinition ( DomainResource ) An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. instance; also called its canonical identifier. This SHALL be a URL, SHOULD be globally unique, unique and SHOULD be an a literal address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions) published url : uri [0..1] The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] The status of this operation definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. an artifact. (Strength=Required) PublicationStatus ! » Whether this is an operation or a named query kind : code [1..1] « Whether an operation is a normal operation or a query. (Strength=Required) OperationKind ! » A boolean Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), education/evaluation/marketing) and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes date : dateTime [0..1] The name of the individual or organization or individual that published the operation definition publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the operation definition from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances useContext : UsageContext [0..*] A legal or geographic region in which the operation definition is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + » Explaination Explanation of why this operation definition is needed and why it has been designed as it has purpose : markdown [0..1] Operations that are idempotent have affects state = false (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST idempotent affectsState : boolean [0..1] The name used to invoke the operation code : code [1..1] Additional information about how to use this operation or named query comment : string markdown [0..1] Indicates that this operation definition is a constraining profile on the base base : Reference canonical [0..1] OperationDefinition The types on which this operation can be executed resource : code [0..*] « One of the resource types defined as part of this version of FHIR. (Strength=Required) ResourceType ! » Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context) system : boolean [1..1] Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context) type : boolean [1..1] Indicates whether this operation can be invoked on a particular instance of one of the given types instance : boolean [1..1] Additional validation information for the in parameters. The profile is a constraint on the parameters resource inputProfile : canonical [0..1] Additional validation information for the out parameters. The profile is a constraint on the parameters resource outputProfile : canonical [0..1] Parameter The name of used to identify the parameter name : code [1..1] Whether this is an input or an output parameter use : code [1..1] « Whether an operation parameter is an input or an output parameter. (Strength=Required) OperationParameterUse ! » The minimum number of times this parameter SHALL appear in the request or response min : integer [1..1] The maximum number of times this element is permitted to appear in the request or response max : string [1..1] Describes the meaning or use of this parameter documentation : string [0..1] The type for this parameter type : code [0..1] « Either an abstract type, a resource or a data type. A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types (Strength=Required) FHIRAllTypes ! » If the type is "Reference", then targetProfile lists a one or more profiles that the Reference can refer to targetProfile : canonical [0..*] How the parameter is understood as a search parameter. This is only used if the parameter type is 'string' searchType : code [0..1] « Data types allowed to be used for search parameters. (Strength=Required) SearchParamType ! » A profile the specifies the rules that this parameter must conform to profile : Reference [0..1] StructureDefinition Binding Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances strength : code [1..1] « Indication of the degree of conformance expectations associated with a binding. (Strength=Required) BindingStrength ! » Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used valueSet[x] : Type [1..1] « uri | Reference canonical ( ValueSet ) » Overload Name of parameter to include in overload parameterName : string [0..*] Comments to go on overload comment : string [0..1] Binds to a value set if this parameter is coded (code, Coding, CodeableConcept) binding [0..1] The parts of a nested Parameter part [0..*] The parameters for the operation/query parameter [0..*] Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation overload [0..*]

XML Template

<

<OperationDefinition xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <
 <
 <
 <
 <
 <
 <
 <

 <url value="[uri]"/><!-- 0..1 Canonical identifier for this operation definition, represented as a URI (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the operation definition -->
 <name value="[string]"/><!-- 1..1 Name for this operation definition (computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <kind value="[code]"/><!-- 1..1 operation | query -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <
 <</useContext>

 <description value="[markdown]"/><!-- 0..1 Natural language description of the operation definition -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>

 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for operation definition (if applicable) --></jurisdiction>
 <
 <
 <
 <
 <</base>
 <
 <
 <
 <

 <purpose value="[markdown]"/><!-- 0..1 Why this operation definition is defined -->
 <affectsState value="[boolean]"/><!-- 0..1 Whether content is unchanged by the operation -->
 <code value="[code]"/><!-- 1..1 Name used to invoke the operation -->
 <comment value="[markdown]"/><!-- 0..1 Additional information about use -->
 <base><!-- 0..1 canonical(OperationDefinition) Marks this as a profile of the base --></base>
 <resource value="[code]"/><!-- 0..* Types this operation applies to -->
 <system value="[boolean]"/><!-- 1..1 Invoke at the system level? -->
 <type value="[boolean]"/><!-- 1..1 Invoke at the type level? -->
 <instance value="[boolean]"/><!-- 1..1 Invoke on an instance? -->
 <inputProfile><!-- 0..1 canonical(StructureDefinition) Validation information for in parameters --></inputProfile>
 <outputProfile><!-- 0..1 canonical(StructureDefinition) Validation information for out parameters --></outputProfile>

 <parameter>  <!-- 0..* Parameters for the operation/query -->
  <
  <
  <
  <
  <
  <
  <
  <</profile>

  <name value="[code]"/><!-- 1..1 Name in Parameters.parameter.name or in URL -->
  <use value="[code]"/><!-- 1..1 in | out -->
  <min value="[integer]"/><!-- 1..1 Minimum Cardinality -->
  <max value="[string]"/><!-- 1..1 Maximum Cardinality (a number or *) -->
  <documentation value="[string]"/><!-- 0..1 Description of meaning/use -->
  <type value="[code]"/><!-- ?? 0..1 What type this parameter has -->
  <targetProfile><!-- 0..* canonical(StructureDefinition) If type is Reference, allowed targets --></targetProfile>
  <searchType value="[code]"/><!-- ?? 0..1 number | date | string | token | reference | composite | quantity | uri -->

  <binding>  <!-- 0..1 ValueSet details if this is coded -->
   <
   <</valueSet[x]>

   <strength value="[code]"/><!-- 1..1 required | extensible | preferred | example -->
   <valueSet[x]><!-- 1..1 uri|canonical(ValueSet) Source of value set --></valueSet[x]>

  </binding>
  <part><!-- ?? 0..* Content as for OperationDefinition.parameter Parts of a nested Parameter --></part>
 </parameter>
 <overload>  <!-- 0..* Define overloaded variants for when  generating code -->
  <
  <

  <parameterName value="[string]"/><!-- 0..* Name of parameter to include in overload -->
  <comment value="[string]"/><!-- 0..1 Comments to go on overload -->

 </overload>
</OperationDefinition>

JSON Template

{doco
  "resourceType" : "",

  "resourceType" : "OperationDefinition",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
  "
    "
    "
    "
    "
    "
    "
    "
    "
    "
      "

  "url" : "<uri>", // Canonical identifier for this operation definition, represented as a URI (globally unique)
  "version" : "<string>", // Business version of the operation definition
  "name" : "<string>", // R!  Name for this operation definition (computer friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "kind" : "<code>", // R!  operation | query
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the operation definition
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for operation definition (if applicable)
  "purpose" : "<markdown>", // Why this operation definition is defined
  "affectsState" : <boolean>, // Whether content is unchanged by the operation
  "code" : "<code>", // R!  Name used to invoke the operation
  "comment" : "<markdown>", // Additional information about use
  "base" : "<canonical>", // Marks this as a profile of the base
  "resource" : ["<code>"], // Types this operation applies to
  "system" : <boolean>, // R!  Invoke at the system level?
  "type" : <boolean>, // R!  Invoke at the type level?
  "instance" : <boolean>, // R!  Invoke on an instance?
  "inputProfile" : "<canonical>", // Validation information for in parameters
  "outputProfile" : "<canonical>", // Validation information for out parameters
  "parameter" : [{ // Parameters for the operation/query
    "name" : "<code>", // R!  Name in Parameters.parameter.name or in URL
    "use" : "<code>", // R!  in | out
    "min" : <integer>, // R!  Minimum Cardinality
    "max" : "<string>", // R!  Maximum Cardinality (a number or *)
    "documentation" : "<string>", // Description of meaning/use
    "type" : "<code>", // C? What type this parameter has
    "targetProfile" : ["<canonical>"], // If type is Reference, allowed targets
    "searchType" : "<code>", // C? number | date | string | token | reference | composite | quantity | uri
    "binding" : { // ValueSet details if this is coded
      "strength" : "<code>", // R!  required | extensible | preferred | example

      // valueSet[x]: Source of value set. One of these 2:
      ">"
      " }

      "valueSetUri" : "<uri>"
      "valueSetCanonical" : "<canonical>"

    },
    "

    "part" : [{ Content as for OperationDefinition.parameter }] // C? Parts of a nested Parameter

  }],
  "
    "
    "

  "overload" : [{ // Define overloaded variants for when  generating code
    "parameterName" : ["<string>"], // Name of parameter to include in overload
    "comment" : "<string>" // Comments to go on overload

  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:OperationDefinition;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:

  fhir:OperationDefinition.url [ uri ]; # 0..1 Canonical identifier for this operation definition, represented as a URI (globally unique)

  fhir:OperationDefinition.version [ string ]; # 0..1 Business version of the operation definition
  fhir:OperationDefinition.name [ string ]; # 1..1 Name for this operation definition (computer friendly)
  fhir:OperationDefinition.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:OperationDefinition.kind [ code ]; # 1..1 operation | query
  fhir:
  fhir:
  fhir:

  fhir:OperationDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:OperationDefinition.date [ dateTime ]; # 0..1 Date last changed
  fhir:OperationDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)

  fhir:OperationDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:OperationDefinition.description [ markdown ]; # 0..1 Natural language description of the operation definition
  fhir:

  fhir:OperationDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support

  fhir:OperationDefinition.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for operation definition (if applicable)
  fhir:
  fhir:

  fhir:OperationDefinition.purpose [ markdown ]; # 0..1 Why this operation definition is defined
  fhir:OperationDefinition.affectsState [ boolean ]; # 0..1 Whether content is unchanged by the operation

  fhir:OperationDefinition.code [ code ]; # 1..1 Name used to invoke the operation
  fhir:
  fhir:

  fhir:OperationDefinition.comment [ markdown ]; # 0..1 Additional information about use
  fhir:OperationDefinition.base [ canonical(OperationDefinition) ]; # 0..1 Marks this as a profile of the base

  fhir:OperationDefinition.resource [ code ], ... ; # 0..* Types this operation applies to
  fhir:OperationDefinition.system [ boolean ]; # 1..1 Invoke at the system level?
  fhir:

  fhir:OperationDefinition.type [ boolean ]; # 1..1 Invoke at the type level?

  fhir:OperationDefinition.instance [ boolean ]; # 1..1 Invoke on an instance?
  fhir:OperationDefinition.inputProfile [ canonical(StructureDefinition) ]; # 0..1 Validation information for in parameters
  fhir:OperationDefinition.outputProfile [ canonical(StructureDefinition) ]; # 0..1 Validation information for out parameters

  fhir:OperationDefinition.parameter [ # 0..* Parameters for the operation/query
    fhir:OperationDefinition.parameter.name [ code ]; # 1..1 Name in Parameters.parameter.name or in URL
    fhir:OperationDefinition.parameter.use [ code ]; # 1..1 in | out
    fhir:OperationDefinition.parameter.min [ integer ]; # 1..1 Minimum Cardinality
    fhir:OperationDefinition.parameter.max [ string ]; # 1..1 Maximum Cardinality (a number or *)
    fhir:OperationDefinition.parameter.documentation [ string ]; # 0..1 Description of meaning/use
    fhir:OperationDefinition.parameter.type [ code ]; # 0..1 What type this parameter has
    fhir:OperationDefinition.parameter.targetProfile [ canonical(StructureDefinition) ], ... ; # 0..* If type is Reference, allowed targets

    fhir:OperationDefinition.parameter.searchType [ code ]; # 0..1 number | date | string | token | reference | composite | quantity | uri
    fhir:

    fhir:OperationDefinition.parameter.binding [ # 0..1 ValueSet details if this is coded
      fhir:OperationDefinition.parameter.binding.strength [ code ]; # 1..1 required | extensible | preferred | example
      # OperationDefinition.parameter.binding.valueSet[x] : 1..1 Source of value set. One of these 2
        fhir:OperationDefinition.parameter.binding.valueSetUri [ uri ]
        fhir:) ]

        fhir:OperationDefinition.parameter.binding.valueSetCanonical [ canonical(ValueSet) ]

    ];
    fhir:OperationDefinition.parameter.part [ See OperationDefinition.parameter ], ... ; # 0..* Parts of a nested Parameter
  ], ...;
  fhir:OperationDefinition.overload [ # 0..* Define overloaded variants for when  generating code
    fhir:OperationDefinition.overload.parameterName [ string ], ... ; # 0..* Name of parameter to include in overload
    fhir:OperationDefinition.overload.comment [ string ]; # 0..1 Comments to go on overload
  ], ...;
]

Changes since DSTU2

OperationDefinition.status
OperationDefinition Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status OperationDefinition.experimental Now marked as Modifier OperationDefinition.contact Type changed from BackboneElement to ContactDetail OperationDefinition.description Type changed from string to markdown OperationDefinition.useContext Added Element
OperationDefinition.jurisdiction OperationDefinition.affectsState
  • Added Element
OperationDefinition.purpose OperationDefinition.comment
  • Renamed from requirements to purpose Type changed from string to markdown
OperationDefinition.comment Renamed from notes to comment OperationDefinition.resource Renamed from type to resource OperationDefinition.type OperationDefinition.base
  • Min Cardinality changed from 0 to 1 Max Cardinality changed from * to 1 Type changed from code to boolean Remove Binding http://hl7.org/fhir/ValueSet/resource-types (required) OperationDefinition.parameter.type Change value set from http://hl7.org/fhir/ValueSet/operation-parameter-type Reference(OperationDefinition) to http://hl7.org/fhir/ValueSet/all-types canonical
OperationDefinition.parameter.searchType OperationDefinition.inputProfile
  • Added Element
OperationDefinition.overload OperationDefinition.outputProfile
  • Added Element
OperationDefinition.overload.parameterName OperationDefinition.parameter.targetProfile
  • Added Element
OperationDefinition.overload.comment OperationDefinition.parameter.binding.valueSet[x]
  • Added Element Remove Reference(ValueSet), Add canonical
OperationDefinition.contact.name OperationDefinition.idempotent
  • deleted
OperationDefinition.contact.telecom OperationDefinition.parameter.profile
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

See R2 <--> R3 Conversion Maps (status = 18 tests that all execute ok. 1 fail round-trip testing and all r3 resources are valid.). Note: these have note yet been updated to be R3 to R4

 

Alternate definitions: Master Definition ( XML , + JSON ), , XML Schema / Schematron (for ) + JSON Schema , ShEx (for Turtle ) + see the extensions & the dependency analysis

Path Definition Type Reference
OperationDefinition.status The lifecycle status of a Value Set or Concept Map. an artifact. Required PublicationStatus
OperationDefinition.kind Whether an operation is a normal operation or a query. Required OperationKind
OperationDefinition.jurisdiction Countries and regions within which this artifact is targeted for use Extensible Jurisdiction ValueSet
OperationDefinition.resource One of the resource types defined as part of this version of FHIR. Required Resource Types
OperationDefinition.parameter.use Whether an operation parameter is an input or an output parameter. Required OperationParameterUse
OperationDefinition.parameter.type Either an abstract type, a resource or a data type. A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types Required All Types
OperationDefinition.parameter.searchType Data types allowed to be used for search parameters. Required SearchParamType
OperationDefinition.parameter.binding.strength Indication of the degree of conformance expectations associated with a binding. Required BindingStrength

  • opd-1 : On OperationDefinition.parameter: Either a type must be provided, or parts ( expression on OperationDefinition.parameter: type.exists() or part.exists() )
  • opd-2 : On OperationDefinition.parameter: A search type can only be specified for parameters of type string ( expression on OperationDefinition.parameter: searchType searchType.exists() implies type = 'string' )
Base Operations (All resource types)
Validate a resource [base]/[Resource]/$validate | [base]/[Resource]/[id]/$validate
Access a list of profiles, tags, and security labels [base]/$meta | [base]/[Resource]/$meta | [base]/[Resource]/[id]/$meta
Add profiles, tags, and security labels to a resource [base]/[Resource]/[id]/$meta-add
Delete profiles, tags, and security labels for a resource [base]/[Resource]/[id]/$meta-delete
Operations Defined by Resource Types
Apply [base]/ActivityDefinition/[id]/$apply
Data Requirements [base]/ActivityDefinition/[id]/$data-requirements
Fetch a subset of the CapabilityStatement resource [base]/CapabilityStatement/$subset | [base]/CapabilityStatement/[id]/$subset
Test if a server implements a client's required operations [base]/CapabilityStatement/$implements | [base]/CapabilityStatement/[id]/$implements
Test if a server implements a client's required operations [base]/CapabilityStatement/$conforms
Submit a Claim resource for adjudication [base]/Claim/$submit
Concept Look Up & Decomposition [base]/CodeSystem/$lookup
Code System based Validation [base]/CodeSystem/$validate-code | [base]/CodeSystem/[id]/$validate-code
Subsumption Testing [base]/CodeSystem/$subsumes | [base]/CodeSystem/[id]/$subsumes
Code Composition based on supplied properties [base]/CodeSystem/$compose | [base]/CodeSystem/[id]/$compose
Generate a Document [base]/Composition/$document | [base]/Composition/[id]/$document
Concept Translation [base]/ConceptMap/$translate | [base]/ConceptMap/[id]/$translate
Closure Table Maintenance [base]/$closure
Submit an EligibilityRequest resource for assessment [base]/EligibilityRequest/$submit
Fetch Encounter Record [base]/Encounter/[id]/$everything
Fetch a group of Patient Records [base]/Group/[id]/$everything
Data Requirements [base]/$data-requirements | [base]/Library/[id]/$data-requirements
Find a functional list [base]/List/$find
Evaluate Measure [base]/Measure/$evaluate-measure | [base]/Measure/[id]/$evaluate-measure
Data Requirements [base]/Measure/[id]/$data-requirements
Process Message [base]/$process-message
Fetch Preferred it [base]/NamingSystem/$preferred-id
Observation Statistics [base]/Observation/$stats
Last N Observations Query [base]/Observation/$lastn
Find patient matches using MPI based logic [base]/Patient/$match
Fetch Patient Record [base]/Patient/$everything | [base]/Patient/[id]/$everything
Apply [base]/PlanDefinition/[id]/$apply
Data Requirements [base]/PlanDefinition/[id]/$data-requirements
Submit an ProcessRequest resource for assessment [base]/ProcessRequest/$submit
Populate Questionnaire [base]/Questionnaire/$populate | [base]/Questionnaire/[id]/$populate
Generate HTML for Questionnaire [base]/Questionnaire/$populatehtml | [base]/Questionnaire/[id]/$populatehtml
Generate a link to a Questionnaire completion webpage [base]/Questionnaire/$populatelink | [base]/Questionnaire/[id]/$populatelink
Evaluate [base]/ServiceDefinition/[id]/$evaluate Data Requirements Build Questionnaire [base]/ServiceDefinition/[id]/$data-requirements [base]/StructureDefinition/$questionnaire | [base]/StructureDefinition/[id]/$questionnaire
Build Questionnaire Generate Snapshot [base]/StructureDefinition/$questionnaire [base]/StructureDefinition/$snapshot | [base]/StructureDefinition/[id]/$questionnaire [base]/StructureDefinition/[id]/$snapshot
Model Instance Transformation [base]/StructureMap/$transform | [base]/StructureMap/[id]/$transform
Value Set Expansion [base]/ValueSet/$expand | [base]/ValueSet/[id]/$expand
Value Set based Validation [base]/ValueSet/$validate-code | [base]/ValueSet/[id]/$validate-code

There are 2 ways to describe the input and output parameters for an operation:

  • Using OperationDefinition.parameter to describe the parameters
  • Using OperationDefinition.inputProfile and OperationDefinition.outputProfile

The parameters is a simple list of possible parameters, along with cardinalities and types. The profiles allow a rich set of validation rules etc. to be provided. OperationDefinitions SHALL always define the parameters using OperationDefinition.parameter in the resource, and MAY also provide profiles for the parameters. If present, the profiles SHALL NOT disagree with the parameters defined for the operation.

Operations are executed by POSTing to a URL that is defined by the operation definition . Named queries are executed by performing a search with the value of the search parameter "_query" "_query" set to the name provided in the definition.

If the named query is to be performed over the RESTful API, all the parameters must be simple search parameters, so that they can be represented directly in the URL without tricky encoding issues. Named queries always return a bundle containing a set of resources, so all the out parameters must be resources, not data types.

There are two ways to pass resources to an operation: directly or by reference. The definition of an operation distinguishes between these two, since they have very different behaviors and consequences.

As an example, take the Questionnaire.$populate operation . This operation takes a questionnaire as a direct parameter. The type of the parameter is defined as 'Questionnaire'. In a Parameters resource, it would be represented like this:

  <parameter>
    <name value="questionnaire"/>

    <name value="questionnaire"/>

    <resource>
      <Questionnaire>
        <!-- Questionnaire contents -->
      </Questionnaire>
    </resource>
  </parameter> 

or, in JSON:

 "parameter": [

 "parameter": [

    {
      "name": "questionnaire",
      "resource": {
        "resourceType": "Questionnaire",

      "name": "questionnaire",
      "resource": {
        "resourceType": "Questionnaire",

        // Questionnaire contents 
      }
    }
  ]

Other parameters are passed by reference. For example, $populate takes a set of references to other resources that should be used to pre-populate the questionnaire. These are passed by reference, and the type of the parameter is Reference(Any) - a reference to any kind of resource. In a parameters resource, it would be represented like this:

  <parameter>
    <name value="content"/>

    <name value="content"/>

    <valueReference>
      <reference value="Patient/123">

      <reference value="Patient/123">

      </Questionnaire>
    </valueReference>
  </parameter> 

or, in JSON:

 "parameter": [

 "parameter": [

    {
      "name": "questionnaire",
      "valueReference" : {
        "reference" : "Patient/123"

      "name": "questionnaire",
      "valueReference" : {
        "reference" : "Patient/123"

      }
    }
  ]

Some operations can take either form; in that case, two distinct parameters must be defined, one for a resource as a direct parameter, and one for a reference.

It is possible for two different organizations to create different operation definitions with the same name or, perhaps more likely, to define equivalent operations that have the same name but incompatible approaches in their parameter lists.

It is also possible, though unlikely, that a server will be required to support both of these operations. If this is the case, the server is able to do this by giving one of them a new name and referring to it by definition in the capability statement. To illustrate this, assume that two different organizations, "orgA" "orgA" and "orgB", "orgB", both define an operation called "dothis", "dothis", and the definitions are incompatible. OrgA publishes its operation definition at http://orga.com/fhir/dothis.xml, and OrgB publishes its operation at http://fhir.orgb.com/meta/OperationDefinition/dothis. The server is able to implement both. Its capability statement will say:

<CapabilityStatement xmlns="http://hl7.org/fhir">

<CapabilityStatement xmlns="http://hl7.org/fhir">

  <!-- snip -->
  <rest>
    <!-- snip -->
    <operation>
      <name value="dothis"/>

      <name value="dothis"/>

      <definition>
        <reference value="http://orga.com/fhir/dothis.xml"/>

        <reference value="http://orga.com/fhir/dothis.xml"/>

      </definition>
    </operation>
    <operation>
      <name value="dothis2"/>

      <name value="dothis2"/>

      <definition>
        <reference value="http://fhir.orgb.com/meta/OperationDefinition/dothis"/>

        <reference value="http://fhir.orgb.com/meta/OperationDefinition/dothis"/>

      </definition>
    </operation>
    <!-- snip -->
  </rest>
  <!-- snip -->
</CapabilityStatement>

If a general purpose cross server client is looking for the implementation of the http://fhir.orgb.com/meta/OperationDefinition/dothis operation and wants to be robust against this name clash problem, instead of simply executing the $dothis operation, it can look at the server's CapabilityStatement for the underlying definition URI and then execute the name given in the capability statement.

A client can determine the compatibility of the server by processing its capability statement and ensuring that the server implements the specific operation definitions and parameters required by the client. The client can then report a useful error to the user rather than allowing mystifying operational errors to occur.

However, there are fundamental limitations to this approach because there are many aspects of these operations that are not (or cannot be) defined in a formal fashion using OperationDefinition, for example, co-occurrence constraints among parameters.

In the same sense, a 3rd party tool can examine a server's CapabilityStatement and a client's definition of an acceptable server to determine whether those two system are interoperable or not.

Finally, it is possible to generate user interface forms automatically from the OperationDefinition. The documentation in the OperationDefinition.description and OperationDefinition.parameter.documentation should be sufficient to allow moderately technical users to guess at the correct content of the form. For this reason, highly technical documentation should go in OperationDefinition.comment .

It is anticipated that this would be used to automate development processes, rather than to generate end-user forms: such users will usually need more support than can be offered in a generated form.

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
base reference Marks this as a profile of the base OperationDefinition.base
( OperationDefinition )
code token Name used to invoke the operation OperationDefinition.code
context-type token A type of use context assigned to the operation definition OperationDefinition.useContext.code
date date The operation definition publication date OperationDefinition.date
description string The description of the operation definition OperationDefinition.description
input-profile reference Validation information for in parameters OperationDefinition.inputProfile
( StructureDefinition )
instance token Invoke on an instance? OperationDefinition.instance
jurisdiction token Intended jurisdiction for the operation definition OperationDefinition.jurisdiction
kind token operation | query OperationDefinition.kind
name string Computationally friendly name of the operation definition OperationDefinition.name
param-profile output-profile reference Profile on the type Validation information for out parameters OperationDefinition.parameter.profile OperationDefinition.outputProfile
( StructureDefinition )
publisher string Name of the publisher of the operation definition OperationDefinition.publisher
status token The current status of the operation definition OperationDefinition.status
system token Invoke at the system level? OperationDefinition.system
type token Invole Invoke at the type level? OperationDefinition.type
url uri The uri that identifies the operation definition OperationDefinition.url
version token The business version of the operation definition OperationDefinition.version