Skip to main content
Privacy-first ETL · Open source

Thresh

Strip identifiers from spreadsheets, anonymize patient codes, convert dates of birth to ages, and ship analysis-ready CSVs — without the workbook ever touching a database. Run it as a server or run it in a browser tab.

Two ways to use it

Same cleaning rules in both. Pick the surface that matches how you work.

In your browser

No uploadNo serverFree

Open the page, drop a workbook in, and the cleaning runs locally on your machine. The file never leaves the tab. Best for one-off cleaning, demos, and privacy-sensitive workflows.

As a server

ExpressAPI key authRate limitedVirus-scan hook

Run a Node process behind a POST /upload endpoint. Same cleaning, plus optional ClamAV scanning, Redis-backed rate limits, configurable retention, and downloadable per-sheet outputs.

How it works

The pipeline is three small modules. Each does one thing, and they hand each other plain JavaScript values.

1

Extract

Read every sheet from the uploaded workbook into a 2-D array of cells. Empty sheets are skipped.

2

Transform

Apply column rules (NHI → ID, DOB → Age, drop Address/Contact), skip blank rows, and dedupe. Per-sheet stats are emitted alongside the cleaned rows.

3

Load

Write one CSV per sheet plus a per-upload manifest. The route returns JSON pointing at every output file by name.

One curl away

The HTTP surface is small on purpose. One endpoint, one response shape, no surprises.

$ curl -F "excel=@./case-mix.xlsx" \
       -H "Authorization: Bearer $CLINISYNC_API_KEY" \
       http://localhost:3000/upload

{
  "message": "Upload and transformation completed successfully.",
  "sheetsProcessed": 3,
  "rowsProcessed": 17,
  "duplicatesRemoved": 1,
  "invalidDobCount": 1,
  "missingNhiCount": 1,
  "files": [...],
  "manifest": "manifest-case_mix-...-.json"
}

Why Thresh

Three principles the codebase actively defends.

De-identify by default

Output never contains the original NHI, DOB, address, or contact details. The most common mistake (forgetting to scrub a column) is prevented by the pipeline, not procedure.

Hold no data

Cleaned files are swept by a TTL sweeper. There is no database, no patient registry, no audit table — just transient on-disk artifacts and a per-upload manifest.

Honest about scope

Thresh isn't HIPAA-certified, isn't a managed service, and isn't a place to store data. It is the cleaning layer that sits in front of one — and the docs say exactly that.

Drop in a workbook?

The in-browser tool processes the file locally. Nothing is uploaded.