Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions DATA_LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ Key terms (paraphrased — the original `License.txt` governs):
License and the CDCI `License.txt` for your situation. When in doubt, contact NRCeS
(`nrc-help@cdac.in`).

## Source data (NRCeS CLCI · LOINC)

The lab data under `data/source/clci/` is the **Common Lab Codes for India (CLCI)** by NRCeS / C-DAC — a
curated subset of **LOINC v2.82**. The original `NOTICE.txt` and `README.txt` are preserved alongside it.

- The CLCI subset contains content from **LOINC** (https://loinc.org), copyright © **Regenstrief
Institute, Inc.** and the LOINC Committee, available at no cost under the LOINC license
(https://loinc.org/license). **LOINC®** is a registered United States trademark of Regenstrief Institute,
Inc.
- The subset does **not** modify the meaning of the original LOINC codes. **Regenstrief Institute and the
LOINC Committee do not endorse this subset.**
- Refer to the official LOINC License for complete licensing and usage requirements. Attribution is
surfaced in the app footer and on the About page.

## Generated artifacts

`public/data/` is a derivative of the source data and inherits its terms (CC BY 4.0 + SNOMED CT
Expand Down
16 changes: 14 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CDCI Browser
============
Clinical Codes Browser
======================

This product includes and redistributes the "Common Drug Codes for India (CDCI)
Flat File Package" produced by the National Resource Centre for EHR Standards
Expand All @@ -25,6 +25,18 @@ The CDCI package permits redistribution and the creation of derivatives within
India. This project is intended for Indian healthcare use. C-DAC does not warrant
the accuracy, completeness, or adequacy of the content.

This product also includes and redistributes the "Common Lab Codes for India
(CLCI)" produced by NRCeS at C-DAC, Pune — a curated subset of LOINC v2.82.

This material contains content from LOINC (http://loinc.org). LOINC is
copyright (c) Regenstrief Institute, Inc. and the Logical Observation Identifiers
Names and Codes (LOINC) Committee and is available at no cost under the license
at http://loinc.org/license. LOINC(R) is a registered United States trademark of
Regenstrief Institute, Inc.

The CLCI subset does not modify the meaning of the original LOINC codes.
Regenstrief Institute and the LOINC Committee do not endorse this subset.

Community enrichment contributed to this project is licensed under CC BY 4.0.
Application source code is licensed under the MIT License.

Expand Down
75 changes: 54 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
# CDCI Browser
# Clinical Codes Browser

An open-source, **frontend-only** web app to search, browse and enrich India's
**Common Drug Codes for India (CDCI)** — the SNOMED CT national drug terminology
published by [NRCeS](https://www.nrces.in/) (C-DAC, MoHFW) — and export it as
[CARE](https://github.com/ohcnetwork/care) `ProductKnowledge` resources.
An open-source, **frontend-only** web app to search and browse India's NRCeS
([C-DAC, MoHFW](https://www.nrces.in/)) clinical terminologies, and export them for
[CARE](https://github.com/ohcnetwork/care). Two peer sections:

SNOMED CT is the canonical identifier throughout. No backend: the whole thing is a
static site built from the NRCeS flat files plus a community-curated enrichment overlay.
- **Drug codes** — **Common Drug Codes for India (CDCI)**, the SNOMED CT national drug
terminology. Export as CARE `ProductKnowledge`.
- **Lab test codes** — **Common Lab Codes for India (CLCI)**, a curated subset of **LOINC v2.82**.
Every test's cryptic LOINC Fully-Specified Name is decoded into plain English.

No backend: the whole thing is a static site built from the NRCeS releases.

```
NRCeS TSV ──▶ build pipeline ──▶ bucketed JSON + search index + CARE export ──▶ static site
community enrichment overlay (PR-reviewed)
NRCeS TSV (drugs) ─┐
├─▶ build pipeline ──▶ JSON + search index + CARE export ──▶ static site
NRCeS CSV (labs) ─┘ ▲
community enrichment overlay (PR-reviewed, drugs)
```

## What it does

**Drugs (SNOMED CT)**

- **Search** ~186k concepts (substances, generics, brands, products) with sub-50 ms prefix typeahead.
- **Browse** the substance → generic → brand hierarchy with shareable permalinks (`/concept/?id=<sctid>`).
- **Copy** any concept as a SNOMED code, a FHIR `Coding`, or a CARE `ProductKnowledge` resource — generated
client-side from the concept doc (no pre-built export artifacts).
- **Enrich** the sparse clinical fields (indication, contraindication, …) via in-app **Suggest edit** → GitHub PR.

**Labs (LOINC)**

- **Search** 1,473 lab tests by name, long common name, or LOINC code (`/labs`).
- **Decode** each test's LOINC FSN into its six axes — component, property, time, specimen, scale, method —
with a curated plain-English glossary (`/lab/?code=<loinc>`).
- **Browse** by specimen, scale, and derived clinical discipline (Chemistry, Hematology, Microbiology, …).
- **Copy** the LOINC code or a FHIR `Coding`. A CARE observation export is planned for v2.

DDI / interaction checking is intentionally **out of scope** for v1 — see the plan. The build still
computes a SNOMED→RxNorm bridge seed so a future CDSS can be layered on.

Expand All @@ -37,27 +51,43 @@ computes a SNOMED→RxNorm bridge seed so a future CDSS can be layered on.
Strengths are **parsed from the SNOMED names** (97.5% clean) and marked *derived/unverified*; the
original name is always the source of truth.

### Lab tests (CLCI · LOINC)

| Field | Notes |
|---|---|
| 1,473 lab tests | Keyed by **LOINC code** (`http://loinc.org`), a separate identity space from SNOMED — hence a self-contained module. |
| FSN split | `Component:Property:Time:System:Scale[:Method]` decomposed + **validated** (98.5% / 1,451 parse cleanly; 22 fall back to the Long Common Name). |
| Specimen / scale facets | Derived straight from the FSN. |
| Discipline categories | Derived by a transparent heuristic, correctable via `data/source/clci/categories.json`. Best-effort. |

The **Long Common Name** is always the authoritative display; the FSN breakdown is *derived*.

## Develop

```bash
npm install
npm run build:data # TSV → public/data/* (bucketed JSON + search index)
npm run build:data # drugs (TSV → bucketed JSON) + labs (CSV → JSON) into public/data/*
npm run dev # http://localhost:3000
npm run build # build:data + static export to out/
npm run test:labs # unit checks for the LOINC parse/derive helpers
npm run validate:enrichments
```

The NRCeS source TSVs live in `data/source/`. Generated artifacts (`public/data/`) are git-ignored
and produced by the build.
`build:data` chains `build:data:drugs` then `build:data:labs`; each scopes its cleanup to its own
output subtree. The NRCeS drug TSVs live in `data/source/`, the CLCI lab CSV in `data/source/clci/`.
Generated artifacts (`public/data/`) are git-ignored and produced by the build.

## Repo layout

```
data/source/ NRCeS TSV flat files (+ NOTICE/LICENSE)
enrichments/ community overlay, one JSON per concept keyed by SCTID
scripts/ build pipeline + validators
src/ Next.js app (App Router) + shared types/data layer
.github/ CI: validate PRs, build & deploy
data/source/ NRCeS drug TSV flat files (+ NOTICE/LICENSE)
data/source/clci/ NRCeS CLCI lab CSV (+ NOTICE/README) + categories.json overrides
enrichments/ community overlay, one JSON per drug concept keyed by SCTID
scripts/ build pipelines (build-data = drugs, build-labs = labs) + validators
src/lib/labs/ self-contained lab module: types, LOINC glossary, categories, data layer
src/components/labs/ LabsBrowser (search + facets) + LabTestView (the FSN "split")
src/ Next.js app (App Router) + shared drug types/data layer
.github/ CI: validate PRs, build & deploy
```

## Contributing & governance
Expand All @@ -68,10 +98,13 @@ is kept strictly separate from the immutable source, every PR is schema-validate

## Licence & attribution

Source data © C-DAC / NRCeS under **CC BY 4.0**; contains SNOMED CT® content used under the SNOMED CT
Drug data © C-DAC / NRCeS under **CC BY 4.0**; contains SNOMED CT® content used under the SNOMED CT
Affiliate Licence (SNOMED CT® is a trademark of SNOMED International). Brand/trade names belong to their
owners. Intended for Indian healthcare use. See [DATA_LICENSE.md](./DATA_LICENSE.md) and [NOTICE](./NOTICE).
App code is MIT; community enrichment is contributed under CC BY 4.0.
owners. Lab data contains content from **LOINC®** (loinc.org), © Regenstrief Institute, Inc. and the LOINC
Committee, used under the LOINC licence (LOINC® is a registered trademark of Regenstrief Institute, Inc.);
Regenstrief and the LOINC Committee do not endorse the CLCI subset. Intended for Indian healthcare use.
See [DATA_LICENSE.md](./DATA_LICENSE.md) and [NOTICE](./NOTICE). App code is MIT; community enrichment is
contributed under CC BY 4.0.

> Not a clinical decision-support tool. Community content is shown with its review status and must not be
> relied on for prescribing.
12 changes: 12 additions & 0 deletions data/source/clci/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) 2026, Centre for Development of Advanced Computing (C-DAC), Pune
All rights reserved.

The Common Lab Codes for India (CLCI) is released by the National Resource Centre for EHR Standards (NRCeS) at the Centre for Development of Advanced Computing (C-DAC), Pune.

The Common Lab Codes for India (CLCI) is a curated subset of commonly used laboratory tests and measurements in India, along with their suggested mappings to Logical Observation Identifiers Names and Codes (LOINC Version 2.82). CLCI is intended to support the standardisation, interoperability, and exchange of laboratory data across healthcare systems.

This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license . LOINC® is a registered United States trademark of Regenstrief Institute, Inc.

The subset has been developed for national implementation purposes and does not modify the meaning of the original LOINC codes. Regenstrief Institute and the LOINC Committee do not endorse this subset.

For complete information regarding LOINC licensing and usage requirements, users should refer to the official LOINC License and related documentation.
33 changes: 33 additions & 0 deletions data/source/clci/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
***************************************************************************
What is Common Lab Codes for India (CLCI)
***************************************************************************

The Common Lab Codes for India (CLCI) is a curated subset of Logical Observation Identifiers Names and Codes (LOINC) covering commonly referred laboratory tests and measurements in India. It provides a suggestive mapping between laboratory test names commonly used in India and their corresponding LOINC codes to support standardization and interoperability of laboratory data.

The package contains a single Comma Separated Values (CSV) file. This subset contains selected LOINC codes from LOINC Version 2.82

*****************************************************************
Folder Structure
*****************************************************************

The zip contains the following file:

common-lab-codes-for-india.csv

*******************************************************************
File Content
*******************************************************************

The file contains the following fields:

General Name - Local test names are commonly used by laboratories in India.

LOINC Code - Unique LOINC identifier for the test or measurement.

Fully Specified Name (FSN) - Includes component, property, time aspect, system, scale, and method of measurement.

Long Common Name (LCN) - A fully spelled-out, human-readable display name with property and system abbreviations expanded.

*******************************************************************
FINISH
*******************************************************************
1 change: 1 addition & 0 deletions data/source/clci/categories.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading
Loading