staging-client-java icon indicating copy to clipboard operation
staging-client-java copied to clipboard

How should INPUT values with dashes that are not ranges be handled

Open ctmay4 opened this issue 10 years ago • 0 comments

This issue began with the CS breast schema. In the "lymph_nodes_positive_axillary_node_xcy.json" table, there are some invalid ranges. For example:

 ["720", "000", "VALUE:N1c", "VALUE:N1c"],
 ["748", "000", "VALUE:N2b", "VALUE:N2b"],
 ["250", "001-0003", "VALUE:N1a", "VALUE:N1a"],     <--- left and right sides of ranges do not match length
 ["258", "004-009", "VALUE:N2a", "VALUE:N2a"],
 ["260", "004-009", "VALUE:N2a", "VALUE:N2a"],

The rule of ranges is that they have to be the same length on both sides. In the best case scenario, I should be throwing an exception when I encounter this. The reason I don't is because we have tables like this:

  "id": "ajcc6_n_codes",
  "last_modified": "2014-11-07T18:15:47.798Z",
  "version": "02.05.50",
  "algorithm": "cs",
  "rows": [
    ["N0", "VALUE:00", "N0"],
    ["N0(i-)", "VALUE:01", "N0(i-)"],  <--- this is NOT a range, but has a dash in the value

Where the "real" values have a "-" in them. I have no easy way of telling whether it is an error or if it is a value with a dash. So if the two sides do not match in size, I just make the assumption that the value is not a range. So in your case above I assumed it to be a single value of "001-0003".

It seems we need to come up with a way to "escape" dashes in INPUT values so I can throw an exception when the sides of the range do not match.

ctmay4 avatar Mar 04 '15 22:03 ctmay4