Skip to content

HeyDonto FHIR R4 API - Exchange (1.0)

FHIR is designed as an interface specification - it specifies the content of the data exchanged between healthcare applications, and how the exchange is implemented and managed. FHIR defines the following methods for exchanging data between systems:

  • RESTful API
  • Messaging
  • Documents
  • Services
  • Database / Persistent Storage

Each of these approaches can be used to exchange information, and each has its own strengths and weaknesses and applicability. Note that applications are allowed to use any other method to exchange resources; the methods described in this specification are the common methods that are used enough to justify the effort to describe or standardize their use.


RESTful API

Most implementers focus on RESTful API. This is a client/server API designed to follow the principles of RESTful design for Create, Read, Update and Delete operations, along with Search and Execute (Operations) support.

The RESTful API is a general-purpose interface that can be used to push and pull data between systems. Which is appropriate depends on architecture and deployment considerations. The RESTful API also supports Asynchronous Use and GraphQL.


Messaging

In addition to the RESTful API, a messaging exchange framework is documented, which supports exchange between systems by sending routed messages from system to system. This exchange can be implemented on the RESTful API or using some other messaging technology.

Implementers should note that the messaging framework is not provided to fill any functional deficiency in the RESTful API (or vice versa), these frameworks are provided to allow implementers to choose how to exchange content based on their own architectural and deployment considerations. Messaging may be more suitable for exchange between disparate organizations with low levels of process integration and/or trust.


Documents

This specification also defines a document based exchange framework, where content to be exchanged is wrapped by a Composition that provides the context of the content, and that has a fixed presentation for a human reader. The document framework is provided to help with computer-assisted human to human communication uses - which are not uncommon in healthcare.

Typically, exchanging documents is associated with exchanging clinical information across clinical governance borders, while data-based exchange using the RESTful API is appropriate within where there are well established clinical governance arrangements.


Services / SOA

In addition, this specification describes the use of FHIR in a services framework (e.g. a SOA). Note that any use of any of the above approaches in production is a 'service' by some or many definitions. The services description provides context regarding the use of FHIR (and particularly the RESTful API) in a wider enterprise architecture.


Database / Persistent Store

Another way to make use of the resources defined by FHIR is to store them natively in a database or persistent store, where different applications or modules write and read the resources as part of their implementation. Using resources in this fashion is described here.


Security and Privacy

All forms of data exchange should be appropriately secured. This requires the following:

  • Only the parties to the exchange can access the communication
  • The parties are authenticated and authorized as required
  • Access control always checks that the only the appropriate data is exchanged
  • Appropriate patient consent has been obtained for the exchange

This subject is described further in the Security Page.

With regard to the RESTful API, implementers should always consider the Smart App Launch protocol as part of the overall secure API approach.


Developmental Roadmap

Exchange MethodStatus
RESTful APIThis is stable and currently being balloted as Normative. No breaking changes are expected. No significant development is planned, but HL7 will continue to respond to user experience
MessagingMessaging has only be implemented in a few projects; some of the infrastructure has not yet been used in production. It is not clear whether significant development will be needed or appropriate
DocumentsDocuments have mostly only been used in prototype projects, though there is considerable impetus around implementation at this time. No significant development is planned, but HL7 will continue to respond to user experience
ServicesAt this point in time, it's not clear whether further work is required or appropriate in terms of service orientated architecture / enterprise integration. HL7 will continue to monitor implementer experience and feedback
Database / Persistent StorageThis is a new area with considerable action at this time, and many production implementations, though RDF itself is not getting much use. At this time, HL7 is monitoring implementer experience and feedback to see whether additional standardization is required

Trial-Use Note: There's some interest in standardizing the use of ProtocolBuffers directly in the specification itself (basis). Ballot comments are welcome.

Overview
Languages
Servers
Mock server

https://docs.heydonto.com/_mock/apis/fhir/exchange/

Sandbox

https://api-staging.heydonto.com/

Production

https://api.heydonto.com/

Operations

Request

Security
bearer or bearer
Path
siteIdstringrequired

Site identifier

Query
_countnumber

Number of items to return (default=20).

Example: _count=10
_page_tokenstring

Token for fetching the next page of results.

Example: _page_token=CgYK...
_sortstring

Sort the results by a given field, e.g. _sort=family or _sort=-date.

Example: _sort=family
_elementsstring

Restrict returned fields, e.g. _elements=identifier,name.

Example: _elements=identifier,name
telecomstring

Filter by resource telecom, e.g. date=[SYSTEM]|[VALUE].

Example: telecom=telecom=phone|555-555-5555
_idstring

Search for a specific resource by ID, e.g. _id=abc123.

Example: _id=abc123
identifierstring

Search for resources by identifier token, e.g. identifier=http://hospital.org|12345.

Example: identifier=http://hospital.org|12345
_includeArray of strings

Include related resources, e.g. _include=Appointment:patient.

patientstring

Include related patient resources, e.g. patient=Patient/[id]&.

Example: patient=patient=Patient/[id]&
_revincludeArray of strings

Reverse include related resources, e.g. _revinclude=Observation:subject.

_hasstring

Reverse chaining, e.g. _has:Observation:subject:code=http://loinc.org|1234-5.

Example: _has=Observation:subject:code=http://loinc.org|1234-5
_tagstring

Search by tag on the resource meta, e.g. _tag=http://example.org/tags|sample-tag.

Example: _tag=http://example.org/tags|sample-tag
_securitystring

Search by security label on resource meta, e.g. _security=RBAC|CONFIDENTIAL.

Example: _security=RBAC|CONFIDENTIAL
_profilestring

Search by profile in resource meta, e.g. _profile=http://example.org/fhir/StructureDefinition/custom-profile.

Example: _profile=http://example.org/fhir/StructureDefinition/custom-profile
curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle?_count=10&_page_token=CgYK...&_sort=family&_elements=identifier%2Cname&telecom=telecom%3Dphone%2C555-555-5555&_id=abc123&identifier=http%3A%2F%2Fhospital.org%2C12345&_include=string&patient=patient%3DPatient%2F%5Bid%5D%26&_revinclude=string&_has=Observation%3Asubject%3Acode%3Dhttp%3A%2F%2Floinc.org%2C1234-5&_tag=http%3A%2F%2Fexample.org%2Ftags%2Csample-tag&_security=RBAC%2CCONFIDENTIAL&_profile=http%3A%2F%2Fexample.org%2Ffhir%2FStructureDefinition%2Fcustom-profile' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Bodyapplication/json
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"search","url":"https://api.heydonto.com/fhir/bundle/?_count=20"},{"relation":"next","url":"https://api.heydonto.com/fhir/bundle/?_count=20&_page_token=TOKEN"},{"relation":"first","url":"https://api.heydonto.com/fhir/bundle/?_count=20"},{"relation":"self","url":"https://api.heydonto.com/fhir/bundle/?_count=20"}]
entryArray of objects(Bundle)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"resourceType":"Bundle","id":"bundle-example","meta":{"lastUpdated":"2014-08-18T01:43:30Z"},"type":"searchset","total":3,"link":[{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}],"entry":[{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

Response
application/json
{ "resourceType": "Bundle", "type": "searchset", "total": 100, "link": [ { … }, { … }, { … }, { … } ], "entry": [ { … } ] }

Request

Security
bearer or bearer
Path
siteIdstringrequired

Site identifier

Bodyapplication/jsonrequired
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}]
entryArray of objects(Bundle_Entry)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

curl -i -X POST \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "resourceType": "Bundle",
    "id": "bundle-example",
    "meta": {
      "lastUpdated": "2014-08-18T01:43:30Z"
    },
    "type": "searchset",
    "total": 3,
    "link": [
      {
        "relation": "self",
        "url": "https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"
      },
      {
        "relation": "next",
        "url": "https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"
      }
    ],
    "entry": [
      {
        "fullUrl": "https://example.com/base/MedicationRequest/3123",
        "resource": {
          "resourceType": "MedicationRequest",
          "id": "3123",
          "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"
          },
          "status": "unknown",
          "intent": "order",
          "medicationReference": {
            "reference": "Medication/example"
          },
          "subject": {
            "reference": "Patient/347"
          }
        },
        "search": {
          "mode": "match",
          "score": 1
        }
      },
      {
        "fullUrl": "https://example.com/base/Medication/example",
        "resource": {
          "resourceType": "Medication",
          "id": "example",
          "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"
          }
        },
        "search": {
          "mode": "include"
        }
      }
    ]
  }'

Responses

Bodyapplication/json
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}]
entryArray of objects(Bundle_Entry)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

Response
application/json
{ "resourceType": "Bundle", "id": "bundle-example", "meta": { "lastUpdated": "2014-08-18T01:43:30Z" }, "type": "searchset", "total": 3, "link": [ { … }, { … } ], "entry": [ { … }, { … } ] }

Request

Security
bearer or bearer
Path
idstringrequired

ID of the Bundle

siteIdstringrequired

Site identifier

curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Bodyapplication/json
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}]
entryArray of objects(Bundle_Entry)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

Response
application/json
{ "resourceType": "Bundle", "id": "bundle-example", "meta": { "lastUpdated": "2014-08-18T01:43:30Z" }, "type": "searchset", "total": 3, "link": [ { … }, { … } ], "entry": [ { … }, { … } ] }

Request

Security
bearer or bearer
Path
siteIdstringrequired

Site identifier

idstringrequired

ID of the Bundle to update

Bodyapplication/jsonrequired
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}]
entryArray of objects(Bundle_Entry)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

curl -i -X PUT \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "resourceType": "Bundle",
    "id": "bundle-example",
    "meta": {
      "lastUpdated": "2014-08-18T01:43:30Z"
    },
    "type": "searchset",
    "total": 3,
    "link": [
      {
        "relation": "self",
        "url": "https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"
      },
      {
        "relation": "next",
        "url": "https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"
      }
    ],
    "entry": [
      {
        "fullUrl": "https://example.com/base/MedicationRequest/3123",
        "resource": {
          "resourceType": "MedicationRequest",
          "id": "3123",
          "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"
          },
          "status": "unknown",
          "intent": "order",
          "medicationReference": {
            "reference": "Medication/example"
          },
          "subject": {
            "reference": "Patient/347"
          }
        },
        "search": {
          "mode": "match",
          "score": 1
        }
      },
      {
        "fullUrl": "https://example.com/base/Medication/example",
        "resource": {
          "resourceType": "Medication",
          "id": "example",
          "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"
          }
        },
        "search": {
          "mode": "include"
        }
      }
    ]
  }'

Responses

Bodyapplication/json
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
idstring(id)^[A-Za-z0-9\-\.]{1,64}$

Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.

Example: "example-id"
metaobject(Meta)

The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

implicitRulesstring(uri)^\S*$

String of characters used to identify a name or a resource

Example: "https://example.org/resource"
_implicitRulesobject(Element)

Base definition for all elements in a resource.

languagestring(code)^[^\s]+(\s[^\s]+)*$

A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Example: "sample-code"
_languageobject(Element)

Base definition for all elements in a resource.

identifierobject(Identifier)

An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.

typeany

Indicates the purpose of this bundle - how it is intended to be used.

Enum"document""message""transaction""transaction-response""batch""batch-response""history""searchset""collection"
Example: "searchset"
_typeobject(Element)

Base definition for all elements in a resource.

timestampstring(date-time)(instant)^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-...

An instant in time - known at least to the second

Example: "2024-01-01T00:00:00Z"
_timestampobject(Element)

Base definition for all elements in a resource.

totalnumber(unsignedInt)^[0]|([1-9][0-9]*)$

An integer with a value that is not negative (e.g. >= 0)

Example: 0
_totalobject(Element)

Base definition for all elements in a resource.

linkArray of objects(Bundle_Link)

A series of links that provide context to this bundle.

Example: [{"relation":"self","url":"https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"},{"relation":"next","url":"https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"}]
entryArray of objects(Bundle_Entry)

An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).

Example: [{"fullUrl":"https://example.com/base/MedicationRequest/3123","resource":{"resourceType":"MedicationRequest","id":"3123","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"},"status":"unknown","intent":"order","medicationReference":{"reference":"Medication/example"},"subject":{"reference":"Patient/347"}},"search":{"mode":"match","score":1}},{"fullUrl":"https://example.com/base/Medication/example","resource":{"resourceType":"Medication","id":"example","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"}},"search":{"mode":"include"}}]
signatureobject(Signature)

A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.

Response
application/json
{ "resourceType": "Bundle", "id": "bundle-example", "meta": { "lastUpdated": "2014-08-18T01:43:30Z" }, "type": "searchset", "total": 3, "link": [ { … }, { … } ], "entry": [ { … }, { … } ] }

Request

Security
bearer or bearer
Path
idstringrequired

ID of the Bundle to delete

siteIdstringrequired

Site identifier

curl -i -X DELETE \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Bundle successfully deleted

Bodyapplication/json
statusTextstringrequired
Example: "OK"
statusnumberrequired
Example: 200
Response
application/json
{ "statusText": "OK", "status": 200 }

Request

Security
bearer or bearer
Path
siteIdstringrequired

Site identifier

idstringrequired

ID of the Bundle

curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/fhir/exchange/site/{siteId}/fhir/bundle/{id}/history' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Bodyapplication/json
resourceTypeanyrequired

This is a Bundle resource

Value"Bundle"
Example: "Bundle"
typeanyrequired

Indicates that this is a history bundle.

Value"history"
Example: "history"
entryArray of objectsrequired

A list of entries representing historical versions of the resource.

entry[].​fullUrlstringrequired
Example: "https://api.heydonto.com/bundle/6eca4369-7183-446e-bab7-addc609972d3"
entry[].​requestobjectrequired
entry[].​request.​methodstring
Enum"PUT""POST"
Example: "PUT"
entry[].​request.​urlstring
Example: "https://api.heydonto.com/bundle/6eca4369-7183-446e-bab7-addc609972d3"
entry[].​resourceobjectrequired
Example: {"resourceType":"Resource","id":"example"}
entry[].​responseobjectrequired
entry[].​response.​lastModifiedstring(date-time)
Example: "2024-10-29T01:05:22.739517+00:00"
entry[].​response.​locationstring
Example: "https://api.heydonto.com/bundle/6eca4369-7183-446e-bab7-addc609972d3/_history/MTczMDE2MzkyMjczOTUxNzAwMA"
entry[].​response.​statusstring
Example: "200 OK"
totalintegerrequired
Example: 2
Response
application/json
{ "resourceType": "Bundle", "type": "history", "entry": [ { … } ], "total": 2 }
Operations
Operations
Operations
Operations