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.
The resources available for FHIR export include:
Patient
Condition(includes Diagnosis in Bahmni)
MedicationRequest
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!).
The following concepts are required for passing export details tabular values as part of FHIR task. These concepts are predefined and are available out of the box in the snomed-default-config and snomed-clinic-config.
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.
With Anonymisation
Below are examples of anonymised resources resulting from FHIR export :
Patient
{
"resourceType": "Patient",
"id": "6aa3fa07f7c9f4a54a1caa84689aa81c157c88a58a5931a27e1a4685be403568",
"meta": {
"lastUpdated": "2023-11-15T08:11:44.000+00:00"
},
"active": true,
"gender": "male",
"birthDate": "1989-01-01",
"deceasedBoolean": false
}
Condition
{
"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"
}
MedicationRequest
{
"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"
}
}
}
ServiceRequest (Procedure Order)
{
"resourceType": "ServiceRequest",
"id": "4a1360b6-3861-4525-9333-f501a6ba036a",
"status": "active",
"category": [
{
"coding": [
{
"code": "8d401984-9816-446d-a936-e1298812fb9d",
"display": "Surgical procedure"
},
{
"system": "http://snomed.info/sct",
"code": "387713003"
}
],
"text": "Surgical procedure"
}
],
"code": {
"coding": [
{
"code": "2a1a8c1f-5713-486a-938a-99fe1a4c9545",
"display": "Operation on nasal septum (procedure)"
},
{
"system": "http://snomed.info/sct",
"code": "5781000"
}
],
"text": "Operation on nasal septum (procedure)"
},
"subject": {
"reference": "Patient/6aa3fa07f7c9f4a54a1caa84689aa81c157c88a58a5931a27e1a4685be403568"
},
"authoredOn": "2023-11-15T08:13:12+00:00"
}
Without Anonymisation
Below are examples of non-anonymised resources resulting from FHIR export :
Patient
{
"resourceType": "Patient",
"id": "d3c119ca-789d-4aa5-8443-704e815264f7",
"meta": {
"lastUpdated": "2023-11-15T08:11:44.000+00:00"
},
"identifier": [
{
"id": "39928a98-966b-4706-b4a0-3480d03224e4",
"use": "official",
"type": {
"coding": [
{
"code": "81433852-3f10-11e4-adec-0800271c1b75"
}
],
"text": "Patient Identifier"
},
"value": "GAN203012"
},
{
"id": "fb3c3cb1-7589-44d0-82d4-e1357f176883",
"use": "usual",
"type": {
"coding": [
{
"code": "0d2ac572-8de3-46c8-9976-1f78899c599f"
}
],
"text": "National ID"
},
"value": "NAT2811"
}
],
"active": true,
"name": [
{
"id": "3bc619b3-3004-4d7e-ae31-af944df512ca",
"family": "Jacob",
"given": [
"John"
]
}
],
"gender": "male",
"birthDate": "1989-11-15",
"deceasedBoolean": false,
"address": [
{
"id": "ff1471f9-8367-4ee7-baf2-a70e1c7c08da",
"extension": [
{
"url": "http://fhir.openmrs.org/ext/address",
"extension": [
{
"url": "http://fhir.openmrs.org/ext/address#address1",
"valueString": "Sunshine Avenue"
},
{
"url": "http://fhir.openmrs.org/ext/address#address3",
"valueString": "Talukabad"
}
]
}
],
"use": "home",
"city": "Sarpanchpura",
"district": "Nagar"
}
]
}
Condition
{
"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/d3c119ca-789d-4aa5-8443-704e815264f7"
},
"encounter": {
"reference": "Encounter/bd1ad25c-2c82-41be-a4d6-0abc9270873e"
},
"onsetDateTime": "2023-11-15T08:13:11+00:00",
"recordedDate": "2023-11-15T08:13:11+00:00",
"recorder": {
"reference": "Practitioner/c1c21e11-3f10-11e4-adec-0800271c1b75",
"type": "Practitioner",
"display": "Super Man (superman)"
}
}
MedicationRequest
{
"resourceType": "MedicationRequest",
"id": "53d231dc-47b3-45e2-82e3-d74c6b3d9164",
"meta": {
"lastUpdated": "2023-11-15T08:13:12.000+00:00"
},
"status": "active",
"intent": "order",
"priority": "routine",
"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/d3c119ca-789d-4aa5-8443-704e815264f7",
"type": "Patient",
"display": "John Jacob (Patient Identifier: GAN203012)"
},
"encounter": {
"reference": "Encounter/bd1ad25c-2c82-41be-a4d6-0abc9270873e",
"type": "Encounter"
},
"authoredOn": "2023-11-15T08:13:12+00:00",
"requester": {
"reference": "Practitioner/c1c26908-3f10-11e4-adec-0800271c1b75",
"type": "Practitioner",
"identifier": {
"value": "superman"
},
"display": "Super Man (Identifier: superman)"
},
"dosageInstruction": [
{
"text": "{\"instructions\":\"As directed\"}",
"timing": {
"event": [
"2023-11-15T08:13:11+00:00"
],
"repeat": {
"duration": 3,
"durationUnit": "d"
},
"code": {
"coding": [
{
"code": "9d77abd7-3f10-11e4-adec-0800271c1b75",
"display": "Once a day"
}
],
"text": "Once a day"
}
},
"asNeededBoolean": false,
"route": {
"coding": [
{
"code": "9d6bc13f-3f10-11e4-adec-0800271c1b75",
"display": "Oral"
}
],
"text": "Oral"
},
"doseAndRate": [
{
"doseQuantity": {
"value": 1,
"unit": "Tablet(s)",
"code": "86239663-7b04-4563-b877-d7efc4fe6c46"
}
}
]
}
],
"dispenseRequest": {
"validityPeriod": {
"start": "2023-11-15T08:13:12+00:00"
},
"numberOfRepeatsAllowed": 0,
"quantity": {
"value": 3,
"unit": "Tablet(s)",
"code": "86239663-7b04-4563-b877-d7efc4fe6c46"
}
}
}
ServiceRequest (Procedure Order)
{
"resourceType": "ServiceRequest",
"id": "4a1360b6-3861-4525-9333-f501a6ba036a",
"status": "active",
"category": [
{
"coding": [
{
"code": "8d401984-9816-446d-a936-e1298812fb9d",
"display": "Surgical procedure"
},
{
"system": "http://snomed.info/sct",
"code": "387713003"
}
],
"text": "Surgical procedure"
}
],
"code": {
"coding": [
{
"code": "2a1a8c1f-5713-486a-938a-99fe1a4c9545",
"display": "Operation on nasal septum (procedure)"
},
{
"system": "http://snomed.info/sct",
"code": "5781000"
}
],
"text": "Operation on nasal septum (procedure)"
},
"subject": {
"reference": "Patient/d3c119ca-789d-4aa5-8443-704e815264f7"
},
"encounter": {
"reference": "Encounter/bd1ad25c-2c82-41be-a4d6-0abc9270873e"
},
"authoredOn": "2023-11-15T08:13:12+00:00"
}
Anonymisation Configuration
FHIR export anonymization options include:
Redact: Omit specified sensitive information during export.
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.
Add Noise: Randomise data for privacy, e.g., "firstOfMonth" transforms dates to the beginning of the year.
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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