Since more lookup tables have been added we are not generating the full list of cvalue_codes needed because the list of codes is generated from the Limit and Condition column in the guidelines table.
cvalue_codes <- unique(c(extract_codes(limits$Limit), extract_codes(limits$Condition)))
Because a bunch of variables have been switched to using lookup tables instead of calculations within the Limit column, values like EMS_0130 are not present within any Limit or Condition value in the table.
The way the cvalue_codes vector is generated needs to be changed to not depend on those columns and needs to be generated through some other means that is dynamic and does not need to be updated each time new compounds are added.
Since more lookup tables have been added we are not generating the full list of
cvalue_codesneeded because the list of codes is generated from the Limit and Condition column in the guidelines table.Because a bunch of variables have been switched to using lookup tables instead of calculations within the Limit column, values like EMS_0130 are not present within any Limit or Condition value in the table.
The way the
cvalue_codesvector is generated needs to be changed to not depend on those columns and needs to be generated through some other means that is dynamic and does not need to be updated each time new compounds are added.