Redact medications from text, JSON, and CSV
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
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"}'
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 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 conditionsRedact diagnoses and medical conditions from clinical notes, claim narratives, and support transcripts.
- Health statusRedact statements about a person's health, disability, or medical status from free text.
- Medical record numbersRedact MRNs and patient record identifiers from clinical notes, referrals, and export files.
Redact medications in production
Get an API key and send your first request in a minute. Plans start at $24/month.
See pricing