> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-quickstart-cleanup.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lab report

## Overview

EkaCare's Lab Report Parsing solution leverages its customised [vision-LLM](https://info.eka.care/services/lab-ready-and-prescription-perfect-ekas-small-llms-vs-industry-giants) to accurately extract structured data\
such as test names, results, units, and reference ranges. Designed specifically for the Indian healthcare ecosystem our solution offers high level of accuracy and doesn't involve human in a loop.

#### This service offers:

* Extraction of test name, result, unit, reference ranges, panel and specimen
* Linking of test name to [LOINC](https://loinc.org/) identifiers
* Linking of unit to [UCUM](https://ucum.org/) identifiers
* Interpretation of test results
* Output as [HL7 FHIR](https://www.hl7.org/fhir/overview.html) document
* Ability to work with PDFs as well as scanned / clicked images of lab reports

> We currently handle LOINC linking for 1400+ lab investigations that cover the majority of commonly performed lab investigations in India.
> [List of LOINC linkable tests](https://ekacare.notion.site/726b13df13ea4409b0cd30c6f3a80315?v=dcd10c722d3149d880ae889b06f4820a)

<ResponseField name="Example">
  <img className="block h-32 dark:hidden" src="https://mintcdn.com/ekacare-quickstart-cleanup/NVBbqJ4QY17ZI3ZY/images/eka_example_lab_report.jpg?fit=max&auto=format&n=NVBbqJ4QY17ZI3ZY&q=85&s=c0e75e880525f1a64810566dc2d63954" width="659" height="981" data-path="images/eka_example_lab_report.jpg" />

  <Expandable title="parsed data">
    <ResponseField name="parsed response" type="json">
      ```json theme={null}
      {
        "resourceType": "Bundle",
        "type": "document",
        "link": [
          {
            "url": "https://eka.care/ekacare-sr-56637f5c-1f65-42e7-b644-503b8854a369",
            "relation": "object"
          }
        ],
        "entry": [
          {
            "resource": {
              "author": [
                {
                  "reference": "Practitioner/169277295296607"
                }
              ],
              "date": "1754-08-31T04:37:09+05:53",
              "id": "ekacare-sr-56637f5c-1f65-42e7-b644-503b8854a369",
              "meta": {
                "lastUpdated": "1754-08-31T04:37:09+05:53",
                "profile": [
                  "https://nrces.in/ndhm/fhir/r4/StructureDefinition/HealthDocumentRecord"
                ],
                "versionId": "1"
              },
              "resourceType": "Composition",
              "section": [
                {
                  "entry": [
                    {
                      "reference": "Observation/063227e2-2d0d-42f3-8174-d3c5694b1eb9"
                    },
                    {
                      "reference": "Observation/50bb116d-b4f2-4021-a68e-1b265ba66dba"
                    },
                    {
                      "reference": "Observation/cbc1af1b-686c-4f91-8cec-cccb9d88fe79"
                    },
                    {
                      "reference": "Observation/fa833d5e-272f-4f7f-b669-c1ed7651f9b4"
                    }
                  ],
                  "title": "Health Document"
                }
              ],
              "status": "final",
              "subject": {
                "reference": "Patient/"
              },
              "title": "Health Document",
              "type": {
                "coding": [
                  {
                    "code": "419891008",
                    "display": "Record artifact",
                    "system": "http://snomed.info/sct"
                  }
                ]
              }
            },
            "fullUrl": "Composition/ekacare-sr-56637f5c-1f65-42e7-b644-503b8854a369"
          },
          {
            "resource": {
              "code": {
                "coding": [
                  {
                    "code": "lb-8584733439",
                    "display": "Total Iron Binding Capacity (TIBC)",
                    "system": "http://mdb.eka.care/technical"
                  },
                  {
                    "code": "2500-7",
                    "system": "http://loinc.org"
                  }
                ]
              },
              "id": "063227e2-2d0d-42f3-8174-d3c5694b1eb9",
              "identifier": [
                {
                  "system": "https://vault.eka.care/investigation_reading",
                  "value": "159093"
                }
              ],
              "interpretation": [
                {
                  "coding": [
                    {
                      "code": "sm-8146614980",
                      "system": "http://mdb.eka.care/technical"
                    }
                  ]
                }
              ],
              "meta": {
                "lastUpdated": "2024-12-06T10:50:42.364502Z",
                "source": "https://vault.eka.care",
                "versionId": "1"
              },
              "referenceRange": [
                {
                  "high": {
                    "code": "lu-998672454",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ug/dL",
                    "value": 425
                  },
                  "low": {
                    "code": "lu-998672454",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ug/dL",
                    "value": 250
                  },
                  "text": "250.0 - 425.0"
                }
              ],
              "resourceType": "Observation",
              "status": "final",
              "subject": {
                "reference": "Patient/"
              },
              "valueQuantity": {
                "code": "lu-998672454",
                "system": "http://mdb.eka.care/mdb/technical",
                "unit": "ug/dL",
                "value": 382.3
              }
            },
            "fullUrl": "Observation/063227e2-2d0d-42f3-8174-d3c5694b1eb9"
          },
          {
            "resource": {
              "code": {
                "coding": [
                  {
                    "code": "lb-750278684",
                    "display": "Iron",
                    "system": "http://mdb.eka.care/technical"
                  },
                  {
                    "code": "2498-4",
                    "system": "http://loinc.org"
                  }
                ]
              },
              "id": "50bb116d-b4f2-4021-a68e-1b265ba66dba",
              "identifier": [
                {
                  "system": "https://vault.eka.care/investigation_reading",
                  "value": "159092"
                }
              ],
              "interpretation": [
                {
                  "coding": [
                    {
                      "code": "sm-8146614980",
                      "system": "http://mdb.eka.care/technical"
                    }
                  ]
                }
              ],
              "meta": {
                "lastUpdated": "2024-12-06T10:50:42.364585Z",
                "source": "https://vault.eka.care",
                "versionId": "1"
              },
              "referenceRange": [
                {
                  "high": {
                    "code": "lu-998672454",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ug/dL",
                    "value": 175
                  },
                  "low": {
                    "code": "lu-998672454",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ug/dL",
                    "value": 65
                  },
                  "text": "65.0 - 175.0"
                }
              ],
              "resourceType": "Observation",
              "status": "final",
              "subject": {
                "reference": "Patient/"
              },
              "valueQuantity": {
                "code": "lu-998672454",
                "system": "http://mdb.eka.care/mdb/technical",
                "unit": "ug/dL",
                "value": 136.3
              }
            },
            "fullUrl": "Observation/50bb116d-b4f2-4021-a68e-1b265ba66dba"
          },
          {
            "resource": {
              "code": {
                "coding": [
                  {
                    "code": "lb-865313635",
                    "display": "Transferrin Saturation",
                    "system": "http://mdb.eka.care/technical"
                  },
                  {
                    "code": "2502-3",
                    "system": "http://loinc.org"
                  }
                ]
              },
              "id": "cbc1af1b-686c-4f91-8cec-cccb9d88fe79",
              "identifier": [
                {
                  "system": "https://vault.eka.care/investigation_reading",
                  "value": "159094"
                }
              ],
              "interpretation": [
                {
                  "coding": [
                    {
                      "code": "sm-8146614980",
                      "system": "http://mdb.eka.care/technical"
                    }
                  ]
                }
              ],
              "meta": {
                "lastUpdated": "2024-12-06T10:50:42.364603Z",
                "source": "https://vault.eka.care",
                "versionId": "1"
              },
              "referenceRange": [
                {
                  "high": {
                    "code": "lu-998",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "%",
                    "value": 50
                  },
                  "low": {
                    "code": "lu-998",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "%",
                    "value": 20
                  },
                  "text": "20.0 - 50.0"
                }
              ],
              "resourceType": "Observation",
              "status": "final",
              "subject": {
                "reference": "Patient/"
              },
              "valueQuantity": {
                "code": "lu-998",
                "system": "http://mdb.eka.care/mdb/technical",
                "unit": "%",
                "value": 35.65
              }
            },
            "fullUrl": "Observation/cbc1af1b-686c-4f91-8cec-cccb9d88fe79"
          },
          {
            "resource": {
              "code": {
                "coding": [
                  {
                    "code": "lb-3422462170",
                    "display": "Ferritin",
                    "system": "http://mdb.eka.care/technical"
                  },
                  {
                    "code": "2276-4",
                    "system": "http://loinc.org"
                  }
                ]
              },
              "id": "fa833d5e-272f-4f7f-b669-c1ed7651f9b4",
              "identifier": [
                {
                  "system": "https://vault.eka.care/investigation_reading",
                  "value": "159095"
                }
              ],
              "interpretation": [
                {
                  "coding": [
                    {
                      "code": "sm-8146614980",
                      "system": "http://mdb.eka.care/technical"
                    }
                  ]
                }
              ],
              "meta": {
                "lastUpdated": "2024-12-06T10:50:42.364563Z",
                "source": "https://vault.eka.care",
                "versionId": "1"
              },
              "referenceRange": [
                {
                  "high": {
                    "code": "lu-992208086",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ng/mL",
                    "value": 336.2
                  },
                  "low": {
                    "code": "lu-992208086",
                    "system": "http://mdb.eka.care/mdb/technical",
                    "unit": "ng/mL",
                    "value": 23.9
                  },
                  "text": "23.9 - 336.2"
                }
              ],
              "resourceType": "Observation",
              "status": "final",
              "subject": {
                "reference": "Patient/"
              },
              "valueQuantity": {
                "code": "lu-992208086",
                "system": "http://mdb.eka.care/mdb/technical",
                "unit": "ng/mL",
                "value": 24.5
              }
            },
            "fullUrl": "Observation/fa833d5e-272f-4f7f-b669-c1ed7651f9b4"
          }
        ],
        "id": "ekacare-sr-56637f5c-1f65-42e7-b644-503b8854a369",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2024-12-06T10:51:03.427+00:00",
          "profile": [
            "https://nrces.in/ndhm/fhir/r4/StructureDefinition/DocumentBundle"
          ],
          "security": [
            {
              "code": "V",
              "display": "very Restricted",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality"
            }
          ]
        },
        "identifier": {
          "system": "https://eka.care",
          "value": "ekacare-sr-56637f5c-1f65-42e7-b644-503b8854a369"
        },
        "timestamp": "2024-12-06T10:51:03.427+00:00"
      }
      ```
    </ResponseField>
  </Expandable>
</ResponseField>

## Use Cases

### 1. **HealthCare providers**

* Better clinical decision making leveraging longitudinal view of the diagnostic results results
* Enriched medical records enabled by seemless copy of lab outcomes to prescription

### 2. **Personal Health Record (PHR)**

* Comprehensive health view based on lab investigations done over years
* Improved awareness and management of health biomarkers

### 3. **Health Insurance Companies**

* Streamlining the processing of lab reports submitted during insurance claims.
* Automate fraud detection by validating extracted diagnostic data.

## Technology Deep-Dive

Our lab report parsing technology is powered by or custom Large Language Models (LLMs), specifically trained on millions of anonymized medical documents.
These documents span diverse formats and contexts, with a particular focus on the Indian healthcare ecosystem.

Our rigorous training and fine-tuning process ensures exceptional accuracy while minimizing common pitfalls like hallucinations that often impact other SOTA LLMs.\
The result is a highly reliable system, as demonstrated in the benchmarks provided in the subsequent section.

Our process consists of two core steps:

#### 1. **Medical Information Extraction:**

Extracting structured medical information from unstructured or pseudo-structured PDFs or images. This includes test names, results, units, ranges, panel names, specimen and method.

#### 2. **Medical Entity Linking:**

Assigning identifiers to the extracted medical concepts. We use LOINC identifiers for lab tests and UCUM identifiers for units.
This is what enables interoperability and interpretability of this rich diagnostic data.

***

## Evaluation and Benchmarks

Our benchmark experiments with evaluation dataset comprising thousands of documents showcase Eka’s superior performance in terms of accuracy compared to other SOTA models. NOTE this evaluation dataset contains both PDF and clicked images.

| Task               | Parrotlet-V (Eka Care's LLM) | OpenAI GPT-4o | Claude Sonnet 3.5 | Qwen2-VL (7B) | Llama-3.2-Vision (11B) | Phi-3.5-Vision (4.2B) |
| ------------------ | ---------------------------- | ------------- | ----------------- | ------------- | ---------------------- | --------------------- |
| Lab report parsing | 0.942                        | 0.836         | 0.879             | 0.618         | 0.489                  | 0.464                 |

A deeper view on results of these experiments are summarised below.

| Field Name     | Parrotlet-V | GPT-4o    | Claude Sonnet 3.5 |
| -------------- | ----------- | --------- | ----------------- |
| test\_name     | 0.959       | 0.851     | 0.942             |
| values         | 0.949       | 0.847     | 0.931             |
| unit           | 0.966       | 0.935     | 0.962             |
| range          | 0.943       | 0.915     | 0.943             |
| method         | 0.932       | 0.787     | 0.846             |
| specimen\_text | 0.929       | 0.765     | 0.790             |
| panel\_name    | 0.914       | 0.752     | 0.739             |
| **Average**    | **0.942**   | **0.836** | **0.879**         |

## Spotlight

* [Lab-Ready and Prescription-Perfect: Eka Care's Small LLMs vs. Industry Giants](https://info.eka.care/services/lab-ready-and-prescription-perfect-ekas-small-llms-vs-industry-giants)
* [Extracting Structured Information from Lab Reports: Challenges and Learnings](https://info.eka.care/services/eka-smart-report)

## Try Out

Experience the power of EkaCare's Lab Report Parsing with our developer-friendly API.

1. Visit our [API Documentation](https://developer.eka.care/api-reference/general-tools/medical/lab-report/create-records-v2) to get started.
2. Upload a sample lab report and see our technology in action.
3. Contact us for a custom demo tailored to your use case.

Ready to unlock the full potential of lab data? [Get in Touch](ekaconnect@eka.care) today.
