Skip to main content

Prerequisites

  • Pidgeon CLI installed (dotnet tool install -g pidgeon)
  • Optionally: a vendor profile from real sample messages

Generate your first messages

Start with a basic HL7 ADT admission message:
pidgeon generate ADT^A01 --count 5
This produces 5 synthetic ADT^A01 messages with realistic patient demographics, encounter data, and properly structured segments (MSH, EVN, PID, PV1).
Use --seed 42 for reproducible output — the same seed always generates the same messages.

Multi-standard generation

Pidgeon auto-detects the standard from the message type. You can also specify it explicitly:
pidgeon generate ADT^A01 --count 3
pidgeon generate ORU^R01 --count 3
pidgeon generate ORM^O01 --count 3

Use vendor profiles for realistic patterns

Real-world messages vary by EHR vendor. Use vendor profiles to match specific patterns:
1

Analyze sample messages

If you have real messages (de-identified), analyze them to create a profile:
pidgeon config analyze --samples ./epic-er-samples --save epic_er
2

Generate with the profile

pidgeon generate ADT^A01 --vendor epic_er --count 10
Generated messages now match the field population patterns, segment ordering, and value sets from your samples.
3

Validate against the profile

pidgeon validate --file generated.hl7 --profile epic_er

Batch generation with output files

Save generated messages to files for use in integration testing:
# Single file with all messages
pidgeon generate ADT^A01 --count 100 --output ./test-data/adt-batch.hl7

# JSON format for FHIR
pidgeon generate Patient --count 50 --format json --output ./test-data/patients.json

# NDJSON for streaming
pidgeon generate ORU^R01 --count 200 --format ndjson --output ./test-data/labs.ndjson

Common message type combinations

Here are typical combinations for integration testing scenarios:
ScenarioMessage TypesDescription
ED VisitADT^A01, ORU^R01, ADT^A03Admit, lab results, discharge
PharmacyORM^O01, RDE^O11Order, dispense
Lab OrderORM^O01, ORU^R01Order, result
ImmunizationVXU^V04Vaccination record
BillingDFT^P03Charge posting

Next steps