R6 Ballot (2nd Draft)

Publish-box (todo)

FHIR Infrastructure icon Work Group Maturity Level: 1Trial Use Compartments: N/A

Returns the most current version of the canonical resource with the specified url available on the server. It optionally also allows filtering to only expose the most current version with a particular status or set of statuses.

Note that 'current' is determined by comparing version values using the specified versionAlgorithm, NOT by looking at lastUpdated.

The canonical URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/CanonicalResource-current-canonical

Formal Definition (as a OperationDefinition).

URL: [base]/$current-canonical

URL: [base]/CanonicalResource/$current-canonical

This is an idempotent operation

In Parameters:
Name Scope Cardinality Type Binding Profile Documentation
url 1..1 uri

This is the canonical URL (with no version declared)

status 0..* code

The statuses to allow to be returned. If no status codes are provided, then any status is ok

Out Parameters:
Name Scope Cardinality Type Binding Profile Documentation
result 0..1 CanonicalResource

If no resources can be found, will return nothing. If multiple resources are found for the specified statuses and 'most current' can't be determined by comparing the versions, the operation will fail with an operation outcome.

If none of the instances define the versionAlgorithm to use, a server may dynamically attempt to determine which versioning system is implied by the data.

If the instances found with the provided canonical URL define different versionAlgorithm values the server may return an error.

Note that the CanonicalResource is an interface and not an actual resource type, as such the operation is actually called on the canonical resource types such as CodeSystem, Questionnaire etc.

Request: Using GET

GET [base]/CodeSystem/$current-canonical?url=http%3A%2F%2Fhl7.org%2Ffhir%2Faccount-status&status=active

Request: Using POST

POST [base]/CodeSystem/$current-canonical
[other headers]

{
  "resourceType" : "Parameters",
  "parameter" : [ {
     "name" : "url",
     "valueUrl" : "http://hl7.org/fhir/account-status"
   }, {
     "name" : "status",
     "valueCode" : "active"
   }
  ]
}

Response:

HTTP/1.1 200 OK
[other headers]

{
  "resourceType" : "CodeSystem",
  "id" : "account-status",
  ...
  "url" : "http://hl7.org/fhir/account-status",
  "version" : "6.0.0",
  "name" : "AccountStatus",
  "title" : "AccountStatus",
  "status" : "active",
  ....
}

 

For more information about operations, including how they are invoked, see Operations.