# Redact medications

> Redact drug names and prescriptions from clinical text and support transcripts.

Canonical: https://bitbanger.in/entities/medication
Last updated: 2026-10-27

Category: Health data · Entity type: `healthcare.medication`

Medication names reveal a condition by inference, so redacting a diagnosis while leaving the prescription visible defeats the purpose.

## How Redactly detects medications

- Detected by the model rather than a drug dictionary, so brand and generic names are both covered.
- Spans are extended across contiguous word characters, which fixes the common failure where only part of a drug name is tagged.
- Dosages are left in place unless they are separately detected as an amount.

## Why redact medications?

A prescription names the condition indirectly and is often easier to detect than the diagnosis itself.

## Example request

```bash
curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "Current prescription: atorvastatin 20mg nightly.", "style": "replace"}'
```

## FAQ

**Does Redactly redact medications automatically?**

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

**What happens to medications after redaction?**

With style set to replace, each match becomes [healthcare.medication] — 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

- [Medical conditions](https://bitbanger.in/entities/condition) — Redact diagnoses and medical conditions from clinical notes, claim narratives, and support transcripts.
- [Health status](https://bitbanger.in/entities/health-status) — Redact statements about a person's health, disability, or medical status from free text.
- [Medical record numbers](https://bitbanger.in/entities/medical-record) — Redact MRNs and patient record identifiers from clinical notes, referrals, and export files.

Try it on your own text: https://bitbanger.in/entities/medication
