NutritionDeclarationCalculator_RGN_EU
Nutrition Declaration Calculator RGN EU
food-all food-label food-iso-*-haccp CSV→JSON LabWare-compatible URS & FS rule-based
Open selectionUtility description: Nutrition Declaration Calculator RGN EU
NutritionDeclarationCalculator_RGN_EU — Calculates nutrition declaration values for the EU ℹ️ Intended use A deterministic food-QC utility for label review; a regional executable applies only to the market named in the EXE. Each input.csv row is evaluated independently, and the rule logic is implemented directly in this product's Program.cs. ⚠️ Scope boundary The utility performs screening/verification and does not replace the HACCP team, food-safety owner, laboratory specialist or legal applicability review. Before operational use, the site approves the product, matrix, method, sampling plan, limits and local SOP. Regulatory or method basis: Regulation (EU) No 1169/2011, Annex XIV and Article 30 URS / user requirements • accept a fixed UTF-8 CSV contract • produce a reproducible result without remote services or a hidden JSON rule schema • return only PASS, FAIL or ERROR for each record • create a LabWare-compatible output.json • retain record identity, test name, analysis code, numeric results and review messages • reject missing, malformed and logically impossible values explicitly FS / functional behavior • the business rule is unique to NutritionDeclarationCalculator_RGN_EU and implemented in its Program.cs • no arguments run the demonstration input.csv beside the EXE • two arguments identify input.csv and output.json • an internal WARNING screening result is exported as FAIL because the LIMS contract uses PASS/FAIL/ERROR • an exception creates a Sample with Status=ERROR and StatusCode=-1 input.csv contract: ProductId,Fat_g,CarbohydrateExcludingPolyols_g,Polyols_g,Fibre_g,Protein_g,Alcohol_g,OrganicAcids_g,Erythritol_g,Sodium_g,DeclaredKcal,DeclaredKJ,DeclaredSalt_g,AllowedDifferencePercent Example: NUT-EU-001,10,20,0,5,8,0,1,0,0.4,215,899,1.0,5 Usage: NutritionDeclarationCalculator_RGN_EU.exe NutritionDeclarationCalculator_RGN_EU.exe input.csv output.json output.json contract Header: UtilityName, Version, Timestamp, InstrumentID, OperatorID Samples: SampleID, BatchNumber, ProductName, TestName, AnalysisCode, Status, StatusCode, ErrorMessage, Description, DescriptionEN, Results Results: ParameterName, ResultValue, UnitOfMeasure, SpecificationLimit, IsWithinSpec Verification • the positive demonstration row shall return PASS • the adverse row shall return FAIL • malformed CSV or an invalid type shall return ERROR • JSON shall deserialize against the Header/Samples/Results model • site verification/PQ confirms actual limits, method, equipment and product disposition Change control Version 0.2.4. A change to market, source edition, allergen list, legal limit, method or decision rule requires review and a new utility version.
input.csv
ProductId,Fat_g,CarbohydrateExcludingPolyols_g,Polyols_g,Fibre_g,Protein_g,Alcohol_g,OrganicAcids_g,Erythritol_g,Sodium_g,DeclaredKcal,DeclaredKJ,DeclaredSalt_g,AllowedDifferencePercent NUT-EU-001,10,20,0,5,8,0,1,0,0.4,215,899,1.0,5 NUT-EU-002,2,15,5,2,4,0,0,5,0.2,100,300,0.2,5
URS & FS — user requirements and functional specification
URS — User Requirements Specification
• accept a fixed UTF-8 CSV contract • produce a reproducible result without remote services or a hidden JSON rule schema • return only PASS, FAIL or ERROR for each record • create a LabWare-compatible output.json • retain record identity, test name, analysis code, numeric results and review messages • reject missing, malformed and logically impossible values explicitly
FS — Functional Specification
• the business rule is unique to NutritionDeclarationCalculator_RGN_EU and implemented in its Program.cs • no arguments run the demonstration input.csv beside the EXE • two arguments identify input.csv and output.json • an internal WARNING screening result is exported as FAIL because the LIMS contract uses PASS/FAIL/ERROR • an exception creates a Sample with Status=ERROR and StatusCode=-1 input.csv contract: ProductId,Fat_g,CarbohydrateExcludingPolyols_g,Polyols_g,Fibre_g,Protein_g,Alcohol_g,OrganicAcids_g,Erythritol_g,Sodium_g,DeclaredKcal,DeclaredKJ,DeclaredSalt_g,AllowedDifferencePercent Example: NUT-EU-001,10,20,0,5,8,0,1,0,0.4,215,899,1.0,5 Usage: NutritionDeclarationCalculator_RGN_EU.exe NutritionDeclarationCalculator_RGN_EU.exe input.csv output.json output.json contract Header: UtilityName, Version, Timestamp, InstrumentID, OperatorID Samples: SampleID, BatchNumber, ProductName, TestName, AnalysisCode, Status, StatusCode, ErrorMessage, Description, DescriptionEN, Results Results: ParameterName, ResultValue, UnitOfMeasure, SpecificationLimit, IsWithinSpec Verification • the positive demonstration row shall return PASS • the adverse row shall return FAIL • malformed CSV or an invalid type shall return ERROR • JSON shall deserialize against the Header/Samples/Results model • site verification/PQ confirms actual limits, method, equipment and product disposition Change control Version 0.2.4. A change to market, source edition, allergen list, legal limit, method or decision rule requires review and a new utility version.
Included in packages
Food — ISO 22000, HACCP and Food QC
35 deterministic utilities for ISO 22000/HACCP, food laboratories, labelling, process control, sanitation and traceability.
Open