Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A FHIR Bundle is a single call that can create, update, or delete multiple records in a single transaction. The following is documentation on a bundle https://www.hl7.org/fhir/bundle.html .

The following outlines

  • A bundle can reference other objects in the bundle. This will then create the related object and then associate it with a new object. For example if a service request contains a reference to a consent object then the bundle can contain both the new consent object and the new service request object with the reference in the bundle. For example

    • The consent object can contain the JSON attribute full URL

      Code Block
              {
                  request: {
                      method: 'POST',
                      url: 'Consent',
                  },
                  fullUrl: 'urn:uuid:05efabf0-4be2-4561-91ce-51548425acb9',
                  resource: {
                      resourceType: 'Consent'
                  },
              },
      

    • The service object then can reference that id when it makes the reference

      Code Block
                  resource: {
                      resourceType: 'ServiceRequest',
                      reasonReference: {
                          reference: 'urn:uuid:05efabf0-4be2-4561-91ce-51548425acb9',
                      },
      
  • For this version of the CIE implementation of the FHIR spec we will not be able to process patient records in a bundle. This is because of the de duplication processing that needs to be done on the patient record before it goes into the database.

Operations

The following are operations that can be performed and links to

  • Submit a transaction bundle

Sample Procedure Object

Code Block
export const testBundle: Bundle = {
    resourceType: 'Bundle',
    type: 'transaction',
    entry: [
        {
            request: {
                method: 'POST',
                url: 'Observation',
            },
            resource: {
                resourceType: 'Observation',
                id: 'SDOHCC-ObservationAssessmentSocialIsolationExample',
                status: 'preliminary',
                category: [
                    {
                        coding: [
                            {
                                system: 'http://terminology.hl7.org/CodeSystem/observation-category',
                                code: 'social-history',
                                display: 'Social History',
                            },
                        ],
                    },
                    {
                        coding: [
                            {
                                system: 'http://example.org/CodeSystem/other-code-system',
                                code: 'social-connectedness',
                                display: 'Social Connectedness',
                            },
                        ],
                    },
                ],
                code: {
                    coding: [
                        {
                            system: 'http://snomed.info/sct',
                            code: '422650009',
                            display: 'Social isolation',
                        },
                    ],
                },
                subject: {
                    reference: 'Patient/pete',
                },
                effectiveDateTime: '2021-05-10T21:56:54.671Z',
                valueBoolean: true,
            },
        },
        {
            request: {
                method: 'POST',
                url: 'ServiceRequest',
            },
            resource: {
                resourceType: 'ServiceRequest',
                subject: {
                    reference: 'Patient/TestID',

                },
                status: 'active',
                intent: 'order',
                category: [
                    {
                        coding: [
                            {
                                system: 'http://terminology.hl7.org/CodeSystem/observation-category',
                                code: 'social-history',
                                display: 'Social History',
                            },
                        ],
                    },
                    {
                        coding: [
                            {
                                system: 'http://example.org/CodeSystem/other-code-system',
                                code: 'social-connectedness',
                                display: 'Social Connectedness',
                            },
                        ],
                    },
                ],
                code: {
                    coding: [
                        {
                            system: 'http://snomed.info/sct',
                            code: '422650009',
                            display: 'Social isolation',
                        },
                    ],
                },

            },
        },
        {
            request: {
                method: 'POST',
                url: 'Organization',
            },
            resource: {
                resourceType: 'Organization',
                id: 'nemi',
                name: 'Northeast Michigan 211',
                alias: [
                    'HL7 International',
                ],
                telecom: [
                    {
                        system: 'phone',
                        value: '(+1) 734-677-7777',
                    },
                    {
                        system: 'fax',
                        value: '(+1) 734-677-6622',
                    },
                    {
                        system: 'email',
                        value: 'hq@HL7.org',
                    },
                ],
                address: [
                    {
                        line: [
                            '3300 Washtenaw Avenue, Suite 227',
                        ],
                        city: 'Ann Arbor',
                        state: 'MI',
                        postalCode: '48104',
                        country: 'USA',
                    },
                ],
                meta: {
                    tag: [
                        {
                            system: 'http://terminology.hl7.org/CodeSystem/v3-ActReason',
                            code: 'HTEST',
                            display: 'test health data',
                        },
                    ],
                },
            },
        },
    ],
};
 

Field Descriptions

The following are descriptions of the most important values that must be passed

Field

Description

References

 ResourceType

This needs to be Bundle.

 https://www.hl7.org/fhir/bundle-definitions.html

 type

This needs to allows be transaction.

 https://www.hl7.org/fhir/bundle-definitions.html

entry

The entry block is a array of resources to be added to the database. It has two high level objects a request and resource. The request object defines the method and the object(url). The resource is the resource data that will be submitted.

Code Block
request: {
   method: 'POST',
   url: 'Observation',
   },