Generate realistic clinical patient data including demographics, encounters, diagnoses, medications, labs, and vitals. Use when user requests: (1) patient records or clinical data, (2) EMR test data, (3) specific clinical cohorts like diabetes or heart failure, (4) HL7v2 or FHIR patient resources.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
The command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
File Explorer
20 files
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview
More from this repository
name
patientsim
description
Generate realistic clinical patient data including demographics, encounters, diagnoses, medications, labs, and vitals. Use when user requests: (1) patient records or clinical data, (2) EMR test data, (3) specific clinical cohorts like diabetes or heart failure, (4) HL7v2 or FHIR patient resources.
PatientSim - Clinical Patient Data Generation
For Claude
Use this skill when the user requests clinical patient data, EMR/EHR test data, or medical records. This is the primary skill for generating realistic synthetic patients with complete clinical histories.
When to apply this skill:
User mentions patients, clinical data, or medical records
User requests EMR or EHR test data
User specifies clinical cohorts (diabetes, heart failure, oncology, etc.)
User asks for HL7v2 messages, FHIR resources, or C-CDA documents
User needs encounters, diagnoses, medications, labs, or vitals
Key capabilities:
Generate patients with realistic demographics and identifiers
Create encounters across care settings (inpatient, outpatient, ED, observation)
Apply clinical cohorts from specialized skills (diabetes, oncology, etc.)
Produce appropriately coded data (ICD-10, CPT, HCPCS, LOINC, RxNorm, SNOMED)
{"mrn":"MRN00000001","name":{"given_name":"John","family_name":"Smith"},"birth_date":"1975-03-15","gender":"M","address":{"street_address":"123 Main Street","city":"Springfield","state":"IL","postal_code":"62701"}}
Clinical Cohort
Request: "Generate a diabetic patient with complications"
All PatientSim data is 100% synthetic (fictional and simulated). Enforce these rules at all times:
No real patient data. Never copy real medical records, real MRNs, or real SSNs into output. All identifiers must be generated.
No clinical advice. Output is test data, not medical guidance. Never phrase output as a recommendation for actual patient care.
No real provider NPIs in patient context. Use synthetic NPIs (prefix with 9999) unless explicitly pulling from NetworkSim reference data.
Validate code systems. Only emit ICD-10-CM codes from the current valid set (e.g., E11.65 not E11.999). Same for CPT, LOINC, and RxNorm -- use real codes, not invented ones.
PHI boundary. If a user supplies real patient details, refuse and explain that PatientSim generates synthetic data only.
Negative Examples (What NOT to Generate)
Mistake
Why It Fails
Correct Approach
Assigning pregnancy to a male patient
Gender-inappropriate
Check gender before obstetric conditions
Metformin without a diabetes diagnosis
Medication without indication
Always pair drugs with supporting Dx
A1C of 14.2% on a healthy patient
Lab contradicts condition list
Abnormal values require matching diagnosis
ICD-10 code E11.999
Invalid code -- does not exist
Use valid codes like E11.65 (with complications)
Discharge date before admission date
Temporal inversion
Ensure chronological ordering of all events
Using a real SSN (e.g., 078-05-1120)
PHI leak risk
Generate synthetic SSNs in 900-xx-xxxx range
Edge Case Handling
Scenario
Behavior
Partial data request ("just demographics")
Omit clinical entities (encounters, labs, meds); return only requested subset
Age-cohort conflict ("5-year-old with COPD")
Flag the clinical implausibility, suggest an age-appropriate alternative, and ask before proceeding
Invalid ICD-10 code from user (e.g., E11.999)
Reject the code, suggest the nearest valid code, explain why
Missing required fields (no age or gender given)
Apply defaults from Generation Parameters table; note assumptions in output
Contradictory instructions ("healthy patient with A1C of 12%")
Prioritize clinical coherence; ask user to clarify intent
Unsupported output format ("as X12 837")
Redirect to MemberSim which owns claims formats; explain the boundary
Output Formats
Format
Request
Use Case
JSON
default
API testing
FHIR R4
"as FHIR", "FHIR bundle"
Interoperability
HL7v2 ADT
"as HL7", "ADT message"
Legacy EMR
CSV
"as CSV"
Analytics
Data Integration (PopulationSim)
Add geography (5-digit county FIPS or 11-digit tract FIPS) to ground generation in real CDC PLACES, SVI, and ADI data. See data-integration.md for full patterns, data sources, and provenance tracking.
Examples
Example 1: Basic Patient with Encounter
Request: "Generate a 45-year-old male with an office visit for hypertension"
Integration Pattern: Generate clinical encounter in PatientSim first, then use MemberSim to create corresponding claims with matching dates, diagnoses, and procedures.
Cross-Product: RxMemberSim (Pharmacy)
PatientSim medication orders generate prescription fills in RxMemberSim:
Integration Pattern: Generate medication orders in PatientSim, then use RxMemberSim to model pharmacy fills with matching NDCs and appropriate fill timing.
When geography is specified, PatientSim grounds generation in real CDC PLACES, SVI, and ADI data via PopulationSim. See data-integration.md for the full data-driven generation pattern, data files, and provenance tracking.
Cross-Product: NetworkSim (Provider Networks)
NetworkSim provides realistic provider and facility entities for clinical encounters:
Integration Pattern: Generate encounters in PatientSim first, then use NetworkSim to add realistic provider entities with proper NPIs, credentials, and hospital affiliations.
Integration Pattern: Use PatientSim for clinical care journeys. When a patient enrolls in a trial, apply TrialSim skills for trial-specific data (RECIST, SDTM format, randomization).
PatientSim integrates with the Generative Framework for specification-driven generation at scale.
Profile-Driven:"Use the Medicare diabetic profile to generate 100 patients" — samples demographics, generates clinical attributes, links to NetworkSim providers.
Journey-Driven:"Add the diabetic first-year journey to each patient" — generates encounters over time, labs, medication changes, and complication branching.