Skip to content

PlanCodeGenerator generator

Generate deterministic plan codes with configurable prefix and length.

Why: Use PlanCodeGenerator for compact catalogue keys whose business prefix identifies a plan family; use PrefixedIdGenerator when the body must follow a non-numeric pattern.

Category: insurance.

Output: str.

1
<key name="value" generator="PlanCodeGenerator(prefix='HMO', digits=5)"/>

Parameters

  • prefix: str | None; Default None — Business prefix placed before the numeric plan-code body.
  • digits: int; Default 6 — Fixed number of digits in the generated body.