Tools › Entity types

Health data

Redact medical record numbers from text, JSON, and CSV

An MRN is the join key for a patient's entire history inside a provider. Redacting it is often the difference between a de-identified extract and a fully identifiable one.

Try it on the live API No signup. 2,000 characters, 20 runs per 10 minutes.
Output appears here.

How Redactly detects medical record numbers

  • Detected by a context cue that pairs an MRN or record-number label with the value.
  • No format assumption, because MRN schemes are provider-specific.
  • Health plan identifiers are reported separately as healthcare.health_plan_id.

Why redact medical record numbers?

Under HIPAA the MRN is one of the 18 identifiers that must be removed for safe-harbour de-identification.

Example request

curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "MRN: 004512378, referred to cardiology on 2026-09-30.", "style": "replace"}'

Every hit in the response carries entity, text, start, and end. The offsets index into the text you sent, so you can apply the redactions to your own copy of the document. The full response schema is in the API reference.

Questions

Does Redactly redact medical record numbers automatically?

Yes. Send text to the API and every detected type is redacted, including medical record numbers. To redact only this type, pass the value healthcare.medical_record in the entities filter. No training or configuration is required.

What happens to medical record numbers after redaction?

With style set to replace, each match becomes [healthcare.medical_record] — the entity type in square brackets. Setting style to mask replaces every character with a block character, and remove deletes the span entirely.

Related entity types

Redact medical record numbers in production

Get an API key and send your first request in a minute. Plans start at $24/month.

See pricing