generating-synthetic-surrogates

Replace detected protected health information with type-matched synthetic surrogates in clinical notes.

5.0k|615|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/maziyarpanahi/openmed --skill generating-synthetic-surrogates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generating-synthetic-surrogates
Source: https://github.com/maziyarpanahi/openmed/tree/main/skills/generating-synthetic-surrogates
Command: npx skills add https://github.com/maziyarpanahi/openmed --skill generating-synthetic-surrogates

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill replaces detected protected health information with realistic, type-matched synthetic values so clinical notes remain readable, coherent, and useful without exposing real identifiers.

Core Features & Use Cases

  • Consistent Replacement: Generate the same surrogate identity for repeated names or identifiers within a document.
  • Reproducible and Localized Output: Use seeds and locales to create repeatable surrogates appropriate for different regions and languages.
  • Custom Generators and Providers: Register organization-specific formats for MRNs, account numbers, addresses, and other clinical identifiers.
  • Use Case: Prepare realistic de-identified clinical notes for NLP training, demonstrations, quality assurance, or review while preserving natural language structure.

Quick Start

Use the generating-synthetic-surrogates skill to replace all detected PHI in the provided clinical note with consistent, reproducible English-language surrogate values and retain the mapping securely if reversibility is required.

Frequently Asked Questions about generating-synthetic-surrogates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace PHI in clinical notes with realistic synthetic surrogates for NLP training?

To replace PHI with synthetic surrogates, you use a de-identification process that substitutes detected identifiers with realistic, type-matched fake values. This preserves clinical note readability and structure, making the data safe for NLP training and demonstrations.

Can I generate consistent fake identities across multiple mentions in the same clinical text?

Yes, you can generate consistent fake identities by applying consistency controls to the replacement process. This ensures that repeated names or identifiers within a document map to the same surrogate identity, maintaining logical coherence in clinical notes.

How do I create reproducible and localized surrogate data for multilingual clinical text?

You create reproducible and localized surrogate data by configuring seed values and locale settings during the replacement process. This generates repeatable surrogates appropriate for different regions and languages in multilingual clinical text.

Can I use custom generators to format specific clinical identifiers like MRNs and account numbers?

Yes, you can register custom generators and providers to create organization-specific formats for clinical identifiers. This allows you to define specific formatting rules for MRNs, account numbers, and addresses when replacing PHI.

What is the best way to de-identify clinical notes while keeping the original document structure intact?

The best way to de-identify clinical notes while keeping structure intact is using synthetic surrogates that match the original data type. This method replaces protected health information without disrupting the natural language structure and readability of the document.

How do I securely retain mappings for reversible pseudonymization of healthcare data?

To securely retain mappings for reversible pseudonymization, you must configure secure handling of optional mapping files during the surrogate generation process. This allows you to link synthetic identities back to original PHI if reversibility is required.