OpenDQV Cloud starter template (v0.1) — your tenant inherits this baseline. First customer edit creates v1.0 in your audit trail; pin by yaml_hash for replay. Healthcare patient record validation aligned with NHS Data Dictionary standards, Caldicott Principles for patient data handling, and NHS DSP Toolkit data quality obligations. Enforces ICD-10 diagnosis code format, NHS number Modulus 11 check-digit verification, blood group ABO/Rhesus classification, ONS/NHS 16+1 ethnicity classification, admission type and referral source taxonomy, and discharge date monotonicity (discharge must be on or after admission). Prevents misidentified patients, malformed diagnosis codes, and clinically invalid values from entering PAS (Patient Administration System), SUS+ (Secondary Uses Service), and MSDS (Maternity Services Data Set) pipelines.
| Rule | Field | Severity | What it enforces (the message your team sees) |
|---|---|---|---|
| patient_id_required | patient_id | error | patient_id is required |
| first_name_required | first_name | error | first_name is required |
| last_name_required | last_name | error | last_name is required |
| date_of_birth_format | date_of_birth | error | date_of_birth must be a valid date (YYYY-MM-DD) |
| nhs_number_valid | nhs_number | error | nhs_number must be a valid 10-digit NHS number with a correct Modulus 11 check digit (e.g. 999 876 5439) — full check-digit verification (was: shape-only format check) |
| sex_values | sex | error | sex must be one of: male, female, indeterminate, unknown, not_stated (NHS Data Dictionary sex classification) |
| ethnicity_values | ethnicity | warning | ethnicity must be a valid ONS/NHS 16+1 ethnicity code — 'not_stated' must be recorded where patient declines (Equality Act 2010) |
| admission_date_format | admission_date | error | admission_date must be a valid date (YYYY-MM-DD) |
| admission_type_values | admission_type | warning | admission_type must be one of: elective, emergency, maternity, transfer, day_case, regular_attender, other (NHS HES admission method) |
| ward_required | ward | error | ward is required |
| diagnosis_code_required | diagnosis_code | error | diagnosis_code is required |
| diagnosis_code_format | diagnosis_code | error | diagnosis_code must be a valid ICD-10 code (e.g. A09, J45.0, Z00.00) — invalid codes are rejected by NHS SUS+ data warehouse |
| blood_type_format | blood_type | error | blood_type must be a valid ABO/Rhesus blood group (e.g. A+, O-, AB+, B-) — incorrect blood group is an NHS Never Event |
| discharge_date_format | discharge_date | warning | discharge_date must be a valid date (YYYY-MM-DD) |
| discharge_date_after_admission | discharge_date | error | discharge_date must be on or after admission_date — a discharge before admission corrupts Length of Stay reporting in NHS HES and SUS+ |
| discharge_reason_values | discharge_reason | warning | discharge_reason must be one of: clinical_discharge, transferred, self_discharge, against_medical_advice, died, still_admitted, other |
Run your own data against this contract in the free trial — drop a CSV in the dashboard, no code, no credit card. Start free trial →