Skip to content

Pharma & Life Sciences

Use AI in Pharma and Life Sciences Without Sending Patient Data to the Model

Maskflare finds patient and investigator names, national IDs, dates, health identifiers and your own subject and site codes in prompts and text attachments. It replaces them with tokens before the request reaches the AI provider, so medical writers, safety teams and developers can use AI without passing those values on. On API traffic the values can be restored in the answer; in AI web apps the answer may show tokens, which people fill in or keep.
Data stays in your boundary
  1. 01

    Identify sensitive values

  2. 02

    Replace with stable tokens

  3. 03

    On API traffic, restore inside your boundary

574

Built-in detectors for personal data and secrets

47

Country packs, checksum-validated where the format has one

9

AI providers behind one gateway, plus the desktop agent and proxy

Where personal data meets AI in a life sciences company

A pharmacovigilance associate has a case narrative due and pastes the adverse event report into a chatbot for a summary. The report has the reporter's name and phone number, the patient's initials and date of birth, a hospital, and a treating physician. A medical writer does something similar with a site monitoring report, and a medical information team drafts a reply to a doctor's letter that names a patient.

Clinical trial data is usually key-coded, so it's tempting to treat it as anonymous. Under GDPR, key-coded data generally stays personal data for anyone who could reach the key, and free-text fields in safety reports and monitoring notes often carry the very details the coding was meant to remove. Health and genetic data are also special-category data under Article 9.

Maskflare applies one rule set across these routes: the desktop agent and browser protection for staff on AI chat, the gateway for the assistants you build, and Exact Data Match or custom rules for subject, site and batch codes in your own formats. It doesn't touch your validated systems, and the masked text keeps the clinical meaning a model needs.

Where pharma & life sciences is actually exposed

5 failure modes specific to this environment, not a restatement of general security advice.

01

Adverse event narratives pasted for summary

A safety case carries reporter details, dates, a hospital and a physician alongside the clinical story. The desktop agent masks those identifiers before the prompt reaches ChatGPT, Claude, Gemini, DeepSeek, Perplexity, Mistral Le Chat and Microsoft 365 Copilot. The answer isn't rewritten, so it may show tokens where it refers to them, and the associate fills them in or keeps them.

02

Key-coded subject IDs with house formats

Subject, randomization and site codes follow your protocol's format, and there's no built-in detector for them. A custom regex rule or Exact Data Match on your subject list masks them, so a code can't be tied back through a provider's logs.

03

Investigator and site correspondence

Monitoring reports and site emails name investigators, coordinators and institutions. The person names pack and contact detectors mask individuals; decide separately whether a site's name is confidential to you, and add it to a dictionary if so.

04

Unpublished trial results and formulas

Masking looks for identifiers. An unblinded efficacy table or a process parameter isn't an identifier and won't be caught without a dictionary or custom rule, so this kind of confidential data needs a policy decision on which tools may receive it.

05

Coding agents in data and bioinformatics teams

Statisticians and engineers point coding agents at real extracts and config files. Hooks for Claude Code, OpenAI Codex, Cursor, GitHub Copilot CLI and VS Code agent mode mask tool input and output, and block prompts containing secrets.

Who this page is for

Head of Pharmacovigilance
Wants case processing support from AI without each narrative becoming a personal data transfer.
Clinical operations lead
Needs monitoring and site documents summarized without investigator and subject details leaving the company.
Data protection officer
Has to justify any transfer of Article 9 health and genetic data, and show what each AI provider receives.
Quality and computerized systems validation
Needs to know what sits on the path of GxP-relevant work, and to keep AI use outside validated records unless it has been assessed.
CISO
Needs one control for staff AI chat, internal assistants and coding agents, with evidence for audits.

How a team would actually run this

Summarizing a safety case with AI

  1. 01 Deploy the desktop agent to safety and medical teams with Intune, Jamf or Group Policy. Only AI hosts are routed through Maskflare.
  2. 02 Apply the GDPR profile or the Swiss nDSG health data profile, plus the country packs for your markets.
  3. 03 Add a custom rule for your case number format, and upload known subject codes to Exact Data Match. Only keyed hashes leave your environment.
  4. 04 The associate pastes the narrative and asks for a summary. The provider sees tokens. The summary may show those tokens where it refers to masked details, and the associate fills them in or keeps them, then checks it as they would any draft.

Building a medical information assistant

  1. 01 Point the assistant's OpenAI or Anthropic SDK at the Maskflare gateway, which is a base-URL change.
  2. 02 Run new rules in alert mode for two weeks to see what turns up in real enquiries.
  3. 03 Move rules to mask with maker-checker approval, so a second person signs off each change.
  4. 04 Keep embeddings on deterministic tokens, so a retrieval index over past enquiries holds tokens rather than names.

Which modules apply, and why

Each links to the module page, where the boundaries and development status are set out in full. Or start at the Maskflare platform overview.

The data, and how it's found

Typical data in this sector, the detectors that cover it, and where you'll need your own rules.

DataHow Maskflare finds itProfile or rule
Patient and investigator namesPerson names pack and local named-entity layerGDPR, Swiss nDSG health data, HIPAA Safe Harbor
Medical record, encounter and lab numbersHealth pack detectors, using context keywordsHIPAA Safe Harbor, Swiss nDSG health data
Clinical and birth datesClinical date and date of birth detectorsHIPAA Safe Harbor
National and insurance IDs, such as Swiss AHV47 country packs with checksum and format validationGDPR, Swiss nDSG health data
Diagnoses and genetic data in free textSpecial categories pack: masked on the default starter, alert on Monitor firstYour policy decision
Trial subject, site and batch codesNo built-in detector: custom regex or Exact Data MatchYour own rules
Medical device identifiersUDI and device serial detectorsHIPAA Safe Harbor

Regulatory context

Readiness and relevance, not certification. Nothing here is a claim to hold an audit or authorization we do not have.

GDPR Art. 9 and key-coded data
Health and genetic data are special-category data, and key-coded data generally stays personal data for anyone who can reach the key. Reversible tokens are pseudonymized data for you too, so your legal basis still applies.
Clinical Trials Regulation (EU) 536/2014 and ICH E6
Set expectations for protecting subject data and confidentiality in trials. Masking is a data-minimization control you can document; it doesn't replace your sponsor or site duties.
EU GMP Annex 11 and draft Annex 22
Annex 11 covers computerised systems in GMP. Annex 22 on AI was published as a draft for consultation in 2025, and we couldn't confirm a final version as of November 2026. Maskflare isn't a validated GxP system, so keep it out of your validated record path unless you've assessed it.
FDA 21 CFR Part 11 and HIPAA
Part 11 concerns electronic records and signatures, which Maskflare doesn't manage. Where HIPAA applies, the HIPAA Safe Harbor profile covers the identifiers it names; expert determination and your BAA position stay with you.
Swiss Human Research Act and revised FADP
Swiss research rules and data protection law apply to health-related research data. The Swiss nDSG health data profile turns on the relevant detectors. Your ethics and legal review stays with you.
How Maskflare handles your data

What Maskflare does not do

  • Masking removes identifiers, not facts. A rare disease at a named small site can still point to a person, so judge what context you send.
  • No built-in detector exists for subject, site or batch codes, because they differ by protocol. You add them as custom rules or Exact Data Match.
  • It isn't a validated GxP system, an eTMF, or a safety database, and it doesn't validate what the AI writes.
  • Documents, including scanned pages read with OCR, are scanned under your document policy and recorded or refused, not rewritten. In browser apps, picture uploads pass unread or are refused, and uploads that go to a separate storage host are refused.
  • SOC 2 Type II and ISO 27001 audits are in progress.

5 questions to ask any vendor here

Including us. If our answer is worse than someone else's, you should know that before you buy, not after.

  1. 01Does the provider ever receive a subject code, a name or a date tied to a clinical story, or only tokens?
  2. 02Can it match our own subject and site codes without holding them in clear text?
  3. 03What happens to confidential data that isn't personal, such as unblinded results?
  4. 04Where does detection run, and does any third-party AI service read the text?
  5. 05Does the tool sit on the path of any GxP-relevant record, and how do we assess that?

Workflow guides for this industry

How a team applies each of these, including the contrast with the tool it replaces.

Pharma & Life Sciences questions we get asked

Is key-coded trial data anonymous?

Generally not under GDPR, for anyone who can reach the key. Treat it as personal data unless your legal team has concluded otherwise, and check free-text fields, which often contain details the coding was meant to remove. This is not legal advice.

Can Maskflare detect our subject and site codes?

Not out of the box, since each protocol has its own format. Add a regex rule for the format, or upload known codes to Exact Data Match, where only keyed hashes leave your environment.

Can safety teams paste adverse event reports into ChatGPT?

With the desktop agent installed, names, dates, IDs and contact details are masked before the report reaches ChatGPT. The answer may show tokens where it refers to them, and the person fills those in or keeps them. The clinical description is still sent, so decide with your DPO and safety lead which case types are in scope.

Does Maskflare protect unpublished results or formulas?

Only if you add terms or patterns for them, because masking looks for identifiers. For this kind of confidential data, a block rule or a decision on approved tools is the better control.

Is Maskflare validated for GxP use?

No. It controls what data reaches AI providers, and it doesn't create or manage GxP records. Assess it under your own procedures if it would sit on the path of GxP-relevant work.

Where is Maskflare hosted?

In the EU by default, with on-premises deployment available for enterprise. Prompts and responses are never stored; masked values are kept encrypted for 30 days so answers can be restored.

See it on your own data

Start a free trial or talk to us with the identifiers and AI workflows your pharma & life sciences team actually handles. Bring the case that makes it hard, because that is the part worth testing.

See it on your own data

Try Maskflare free.
Bring your hardest prompts.

28-day free trial or 10,000 requests, whichever comes first. Point one app at the gateway or enroll a few laptops,
and watch what gets masked. Or talk to us first.