{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","title":"Food non-conformity register (food safety)","description":"The internal register in which a food operator records each deviation of its self-checking system (temperature, reception, hygiene, pests, allergens, labelling, foreign bodies, complaints, expired products), the fate of the product, the correction and the corrective action (art. 3 § 2, 5° to 7° and art. 8 of the royal decree of 14 November 2003).","additionalProperties":false,"required":["document","operator","period","entries","signatory"],"properties":{"document":{"type":"object","additionalProperties":false,"required":["date"],"properties":{"place":{"type":"string","description":"Place where the register is drawn up (optional)."},"date":{"type":"string","format":"date","description":"Date of the register."},"reference":{"type":"string","description":"Internal reference of the register (optional)."}}},"operator":{"type":"object","additionalProperties":false,"required":["name","address"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the operator."},"enterprise_number":{"type":"string","description":"Belgian enterprise number (BCE / KBO) of the operator (optional)."},"establishment_unit_number":{"type":"string","description":"Establishment-unit number of the operator (optional)."},"address":{"type":"string","minLength":1,"description":"Address of the establishment."},"seat_region":{"type":"string","enum":["nl_region","fr_region","brussels","de_region"],"description":"Linguistic region of the operating seat (optional): Dutch-language region, French-language region, Brussels-Capital or German-language region. Nothing is compared with it."}}},"regime":{"type":"string","enum":["full_haccp","relaxed_haccp","good_hygiene_practices_only"],"description":"The self-checking regime the operator states it applies (optional)."},"period":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"from":{"type":"string","format":"date","description":"First day of the period of this register."},"to":{"type":"string","format":"date","description":"Last day of the period of this register."}}},"retention_stated":{"type":"string","description":"How long the operator keeps this register, in its own words (optional)."},"entries":{"type":"array","minItems":1,"description":"The deviations recorded during the period.","items":{"type":"object","additionalProperties":false,"required":["reference","detected_on","detected_by","category","description","left_establishment","product_fate","correction"],"properties":{"reference":{"type":"string","minLength":1,"description":"Reference of the non-conformity in the register."},"detected_on":{"type":"string","format":"date","description":"Date the deviation was detected."},"detected_by":{"type":"string","minLength":1,"description":"Person who detected the deviation."},"category":{"type":"string","enum":["temperature","reception","hygiene","pest","allergen","labelling","foreign_body","expired","complaint","other"],"description":"Category of the deviation."},"control_point":{"type":"string","description":"Control point or good-hygiene-practice theme concerned (optional)."},"description":{"type":"string","minLength":1,"description":"Description of the deviation."},"product":{"type":"string","description":"Product concerned (optional)."},"lot_or_identification":{"type":"string","description":"Lot or identification of the product (optional)."},"quantity_stated":{"type":"string","description":"Quantity involved, as the operator writes it (optional)."},"left_establishment":{"type":"boolean","description":"Whether the product had already left the establishment when the deviation was detected."},"product_fate":{"type":"string","enum":["blocked","destroyed","returned_to_supplier","reprocessed","released_after_check","withdrawn_from_market","other"],"description":"What was done with the product."},"correction":{"type":"string","minLength":1,"description":"What was done at once (correction)."},"corrective_action":{"type":"string","description":"What prevents the deviation from recurring (optional)."},"root_cause":{"type":"string","description":"Root cause (optional)."},"may_harm_health":{"type":"string","enum":["no","yes","unknown"],"description":"The operator's own assessment whether the product may be harmful to health (optional)."},"notification_made":{"type":"string","enum":["not_required","made","pending"],"description":"Whether the food agency was notified, as the operator states it (optional)."},"notification_reference":{"type":"string","minLength":1,"description":"Reference of the notification (required when the notification was made)."},"closed_on":{"type":"string","format":"date","description":"Date the non-conformity was closed (optional)."},"verified_by":{"type":"string","description":"Person who verified the closure (optional)."}},"allOf":[{"if":{"properties":{"notification_made":{"const":"made"}},"required":["notification_made"]},"then":{"required":["notification_reference"]}}]}},"signatory":{"type":"object","additionalProperties":false,"required":["name","title"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the person who signs."},"title":{"type":"string","minLength":1,"description":"Function of the person who signs."}}}}}