FHIR-Based Bulk Patient Data Export

Bahmni provides the ability to export bulk patient data in FHIR NDJSON format. This feature has options for exporting data as-is, or with anonymised data (default setting is anonymised export). To be able to use this feature a user must have requisite privileges to export data in bulk. See details below of sample formats, anonymisation options and privileges required.

Introduction

The FHIR-Based Bulk Patient Data Export feature in Bahmni facilitates efficient, standardized export of large patient datasets while ensuring interoperability using the FHIR standard. It incorporates robust anonymization measures to protect sensitive data, striking a crucial balance between data accessibility and privacy compliance. This functionality empowers users to responsibly share comprehensive datasets for analytics and reporting, upholding the highest standards of patient confidentiality and regulatory requirements.

Anonymisation in Bahmni encompasses transforming or redacting sensitive information to ensure privacy protection. Organisations can conduct meaningful analytics without compromising individual privacy. Bahmni offers a privileged FHIR data export option for data sharing across systems and analytics. For instance, Snolytical leverages this option for patient data analytics.

Handle patient data confidentially! It's advised to export data in anonymised mode, ensuring careful handling by authorised parties only. Consent responsibility lies with the system user in production.

Video demo: Anonymised Bulk Export of Patient Data Through FHIR for Analytics

The resources available for FHIR export include:

  1. Patient

  2. Condition(includes Diagnosis in Bahmni)

  3. MedicationRequest

  4. ServiceRequest (Procedure Order)

Privileges Required

To activate the export option, two privileges are required:

  • Export Patient Data: Allows anonymised export, as per the anonymisation configuration.

  • Export Non-Anonymised Patient Data: Permits plain export without anonymisation (use carefully!).

Preconfigured Concepts

The following concepts are required for presenting export details as tabular information in the FHIR task. These concepts are predefined and are available out of the box in the snomed-default-config and snomed-clinic-config.

  • Download URL

  • FHIR Export User Name

  • FHIR Export Start Date

  • FHIR Export End Date

  • FHIR Export Anonymise Flag

Screenshot of Admin Export Screen

In the Admin section under FHIR Export, the patient data export feature is accessible. Only users/admins with export privileges will be able to export the data. Any facility can decide which user / role must have that privilege, allowing them to initiate exports accordingly.

Once the privileges are configured, and anonymisation settings are in place, the FHIR export is ready for use.

You can download data in NDJSON format using the 'Download' link.

 

Sample Export Formats

With Anonymisation

Below are examples of anonymised resources resulting from FHIR export :

{ "resourceType": "Patient", "id": "6aa3fa07f7c9f4a54a1caa84689aa81c157c88a58a5931a27e1a4685be403568", "meta": { "lastUpdated": "2023-11-15T08:11:44.000+00:00" }, "active": true, "gender": "male", "birthDate": "1989-01-01", "deceasedBoolean": false }
{ "resourceType": "Condition", "id": "113d8cd5-130b-4689-a278-dd111b2b8d3c", "meta": { "lastUpdated": "2023-11-15T08:13:11.000+00:00" }, "clinicalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", "code": "active" } ] }, "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-category", "code": "encounter-diagnosis", "display": "Encounter Diagnosis" } ] } ], "code": { "coding": [ { "code": "e96cc22f-2e5b-4cb4-806e-719dcd4f6943", "display": "Mild asthma (disorder)" }, { "system": "http://snomed.info/sct", "code": "370218001" } ], "text": "Mild asthma (disorder)" }, "subject": { "reference": "Patient/6aa3fa07f7c9f4a54a1caa84689aa81c157c88a58a5931a27e1a4685be403568" }, "onsetDateTime": "2023-11-15T08:13:11+00:00" }

 

{ "resourceType": "MedicationRequest", "id": "53d231dc-47b3-45e2-82e3-d74c6b3d9164", "meta": { "lastUpdated": "2023-11-15T08:13:12.000+00:00" }, "status": "active", "intent": "order", "medicationCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "318353009", "display": "Propranolol hydrochloride 40 mg oral tablet" }, { "system": "https://fhir.openmrs.org", "code": "8e817314-a24f-4890-8a50-e24d6304de08", "display": "Propranolol hydrochloride 40 mg oral tablet" } ], "text": "Propranolol hydrochloride 40 mg oral tablet" }, "subject": { "reference": "Patient/6aa3fa07f7c9f4a54a1caa84689aa81c157c88a58a5931a27e1a4685be403568", "type": "Patient" }, "dispenseRequest": { "validityPeriod": { "start": "2023-11-15T08:13:12+00:00" }, "numberOfRepeatsAllowed": 0, "quantity": { "value": 3, "unit": "Tablet(s)", "code": "86239663-7b04-4563-b877-d7efc4fe6c46" } } }

 

Without Anonymisation

Below are examples of non-anonymised resources resulting from FHIR export :

Anonymisation Configuration

FHIR export anonymization options include:

  1. Redact: Omit specified sensitive information during export.

  2. Correlate: Use surrogate keys instead of sensitive data for tracking and correlation. Surrogate keys are generated through a one-way hash function, configured with 'oneWayHashSalt' to create unique identifiers.

  3. Add Noise: Randomise data for privacy, e.g., "firstOfMonth" transforms dates to the beginning of the year.

  4. Fixed: Mask data to a predetermined fixed value.

These methods empower users to customise anonymisation strategies for data export, ensuring privacy while enabling valuable analytics.

For instance, if we aim to anonymise the resources as follows:

Patient Attributes

Anticipated Export Results

Patient Attributes

Anticipated Export Results

resourceType

No change

id

Surrogate key for correlation

identifier

Redact all identifiers

active

No change

name

Redacted

telecom

Redacted

gender

No change

birthDate

Set to 1st Jan of the birth year

deceasedBoolean

No change

deceasedDateTime

Set to 1st Jan of the death year

address

Redacted

Condition Attributes

Anticipated Export Results

Condition Attributes

Anticipated Export Results

resourceType

No change

clinicalStatus

No change

category

No change

code

No change

subject

Surrogate key for correlating with patient resource

encounter

Redacted

onsetDateTime

No change

recordedDate

Redacted

recorder

Redacted

MedicationRequest Attributes

Anticipated Export Results

MedicationRequest Attributes

Anticipated Export Results

resourceType

No change

status

No change

intent

No change

priority

Redacted

medication

No change

subject

Surrogate key for correlating with patient resource

encounter

Redacted

authoredOn

Redacted

requester

Redacted

dosageInstruction

Redacted

dispenseRequest.validityPeriod

No change

dispenseRequest.numberOfRepeatsAllowed

No change

dispenseRequest.quantity

No change

Procedure Attributes

Anticipated Export Results

Procedure Attributes

Anticipated Export Results

resourceType

No change

status

No change

category

No change

code

No change

subject

Surrogate key for correlating with patient resource

encounter

Redacted

Here is the corresponding configuration that anonymises sensitive fields

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)