FHIR RESTful API

Vonk supports most of the features in the FHIR RESTful API.

FHIR Versions

All the operations below can be called for FHIR STU3 or FHIR R4. Vonk supports the fhirVersion mimetype parameter for that purpose. See Running multiple versions of FHIR for more information.

Create, read, update, delete

These four operations to manage the contents of the Vonk FHIR Server, commonly referenced by the acronym CRUD, are implemented as per the specification. This includes version-read and the conditional variations. Only a few limitations apply.

Vonk enables create-on-update: If you request an update and no resource exists for the given id, the provided resource will be created under the provided id.

Vonk can reject a resource based on Validating incoming resources.

Configuration

A conditional delete interaction may match multiple resources. You can configure the server to delete all matches, or reject the operation (effectively only allowing single matches to be deleted). Allowing multiple deletes requires support for transactions on the database (SQL Server or SQLite). If you allow for multiple deletes, you have to specify a maximum number of resources that can be deleted at once, to save you from accidentally deleting too many resources.

"FhirCapabilities": {
    "ConditionalDeleteOptions": {
        "ConditionalDeleteType": "Single", // Single or Multiple,
        "ConditionalDeleteMaxItems": 1
    }
}

Limitations on CRUD

  1. Simultaneous conditional creates and updates are not entirely transactionally safe:
    • Two conditional updates may both result in a create, although the result of one may be a match to the other.
    • Two conditional creates may both succeed, although the result of one may be a match to the other.
    • A conditional create and a simultaneous conditional update may both result in a create, although the result of one may be a match to the other.

Versioning

Vonk keeps a full version history of every resource, including the resources on the Vonk Administration API.

History

History is supported as described in the specification, on the system, type and instance level. The _since and _count parameters are also supported.

Limitations on history

  1. _at parameter is not yet supported.
  2. Paging is supported, but it is not isolated from intermediate changes to resources.

Batch

Batch is fully supported.

You can limit the number of entries accepted in a single batch. See Batch and transaction.

Transaction

Transactions are supported, with these limitations:

  1. Of the three storage implementations, only SQL Server and SQLite truly support transactions. On MongoDB and Memory, transaction support can be simulated at the FHIR level, but not be enforced on the database level.
  2. References between resources in the transaction can point backwards or forwards. Only circular references are not supported.

You can limit the number of entries accepted in a single transaction. See Batch and transaction.

Capabilities

On the Capabilities interaction (<vonk-endpoint>/metadata) Vonk returns a CapabilityStatement that is built dynamically from the supported ResourceTypes, SearchParameters and interactions. E.g. if you Configure Search Parameters, the SearchParameters that are actually loaded appear in the CapabilityStatement.

Not supported interactions

These interactions are not yet supported by Vonk:

  1. patch