Files
yara724api/docs/driving-licence-type-integrity.md
T

1.9 KiB

Driving licence selection and display

GET /lookups/driving-licence-types is the source of licence type IDs and captions. It uses the existing tenant-specific Fanavaran disk/DB cache and remote lookup chain. The response is a normalized array of { Id, Caption, IsActive }; unusable or contradictory lookups fail instead of supplying guessed options.

Both creation interfaces select the actual lookup ID. They disable selection and provide retry when the list is unavailable. They never assume numeric IDs 1, 2, or 3 correspond to licence grades, and never substitute free text for a provider ID.

All ten inquiry entry points in RequestManagementService validate licensed drivers against this lookup before saving their inquiry attributes or running the participant inquiries. Unknown/inactive IDs are rejected. Drivers without a licence do not need the lookup.

licenseType remains the selected provider ID. The API adds licenseTypeLabel, a caption resolved by the server from that ID, to the normalized driver participant and legacy person data. The existing schemas persist this optional display snapshot; claim party snapshots reuse the same schema. Downstream Fanavaran submissions continue using the original ID.

Expert views keep IDs unchanged during normalization and resolve them at render time. A saved caption takes priority; older records use the current canonical lookup. Without either source, an unresolved numeric code is explicitly marked as missing its title. Reports no longer apply guessed numeric grade mappings, and licence numbers are not passed through licence type label resolution.

Deploy API, expert UI, and user UI together. Existing records created with an invented fallback ID cannot be distinguished from valid provider IDs using the stored number alone. Do not automatically remap those records: review the original selection or licence evidence and correct only confirmed cases. No bulk data migration is part of this fix.