Table of Contents |
---|
Introduction
Bahmni Line Reports offer flexible configuration options to seamlessly integrate with a series of extensions, enhancing functionalities like custom report generation. Among these extensions is the ICD-10 extension, a module designed for mapping SNOMED codes to ICD-10 codes within Bahmni Reports. This extension supports ICD-10 mapping in both Snowstorm and Snowstorm Lite environments. Snowstorm Lite is a compact FHIR terminology server tailored for low-resource settings.
SNOMED to ICD-10 Line Report Screenshot
Given below is an example of a SNOMED Diagnosis Line Report with SNOMED to ICD-10 mapping
...
Configuring Extensions
The provided configuration example illustrates how to set up a SNOMED Diagnosis Line Report to utilise the ICD-10 extension
...
The extension JAR file is mounted in the Bahmni Reports Docker image container using a Docker volume in the docker-compose file. This ensures that the extension class is available to the image. The following line needs to be uncommented in the reports service for the extension to get activated.
Code Block |
---|
reports: image: bahmni/reports:${REPORTS_IMAGE_TAG:?} ... volumes: - "${REPORTS_EXTENSIONS_CONFIG_PATH:?}../snomed-resources/icd10-extensions-1.0.0-SNAPSHOT.jar:/var/run/bahmni-reports/bahmni-reports/WEB-INF/lib/icd10-extensions-1.0.0-SNAPSHOT.jar:ro" |
After uncommenting, update reports container by running docker compose up -d reports
ICD-10 Extension Repository
Source Code Repository for ICD-10 reports extension is as follows:
...
Typically all the report extensions should implement the enrich
method from the interface org.bahmni.reports.extensions
.ResultSetExtension
Mapping ICD-10 in a Snowstorm Environment
ICD-10 Reports extension for Snowstorm borrows the same mechanism of the ICD-10 mappings Demonstrator found here: https://ihtsdo.github.io/iid-icd-maps/
...
The screenshot shows that the SNOMED CT code 421671002 matches the ICD-10 codes B20.8 and J17.8 (see green check mark) for a given age and gender.
Native API
SNOMED codes are mapped to ICD-10 codes by filtering a reference rule set based on the SNOMED code, patient age, and gender
...
MapTarget – the target ICD-10 code which will be mapped to SNOMED Code
Algorithm to extract ICD-10 code(s)
The algorithm for mapping SNOMED codes to ICD-10 codes using Snowstorm is as follows:
...
Order the mapping rules by mapGroup and then by mapPriority.
For each mapGroup, iterate over the rules in ascending order of priority and evaluate them until a matching mapTarget is found.
To evaluate each rule, the system uses the
javax.script.ScriptEngine
evaluator to convert the rule into a JavaScript expression and then evaluates the expression. The evaluator can optionally take into account the patient's age and gender.If the JavaScript expression evaluates to true, then the corresponding mapTarget has the matching ICD-10 code for the given mapGroup. The system collects these codes into an ArrayList of matching ICD-10 codes.
The ICD-10 codes that are generated by the mapping process will be displayed in the enriched column of the report.
Mapping ICD-10 in a Snowstorm Lite Environment
FHIR API
This API uses the following URL template configuration from the application.properties
file:
...
Code Block |
---|
{ "resourceType": "Parameters", "parameter": [ { "name": "result", "valueBoolean": false }, { "name": "message", "valueString": "Please observe the following map advice. Group:1, Priority:1, Rule:TRUE, Advice:'ALWAYS B20.8', Map Category:'447637006'." }, { "name": "match", "part": [ { "name": "equivalence", "valueCode": "unmatched" }, { "name": "concept", "valueCoding": { "system": "http://hl7.org/fhir/sid/icd-10", "code": "B20.8" } }, { "name": "source", "valueString": "http://snomed.info/sct/900000000000207008/version/20230731?fhir_cm=447562003" } ] }, { "name": "message", "valueString": "Please observe the following map advice. Group:2, Priority:1, Rule:TRUE, Advice:'ALWAYS J17.8 | THIS CODE MAY BE USED IN THE PRIMARY POSITION WHEN THE MANIFESTATION IS THE PRIMARY FOCUS OF CARE', Map Category:'447637006'." }, { "name": "match", "part": [ { "name": "equivalence", "valueCode": "unmatched" }, { "name": "concept", "valueCoding": { "system": "http://hl7.org/fhir/sid/icd-10", "code": "J17.8" } }, { "name": "source", "valueString": "http://snomed.info/sct/900000000000207008/version/20230731?fhir_cm=447562003" } ] } ] } |
Algorithm to extract ICD-10 code(s)
The algorithm for mapping SNOMED codes to ICD-10 codes is as follows:
...