imsweb / mph

Java implementation of the Multiple Primary and Histology Coding Rules.
Other
4 stars 2 forks source link

Change HematoDB provider to pass two years instead of one for a few methods #35

Closed depryf closed 6 years ago

depryf commented 6 years ago

the seerdata-utility has been updated to take two years instead of one in the following method:

I think this library call through to those methods (it uses isSamePrimary instead of isMultiplePrimary); and so we need those call through to also support two years instead of one.

depryf commented 6 years ago

@bekeles I tried to fix this myself, but I am running into things that I don't fully understand.

I am not even sure I did the right thing in the seerdata-utility.

The issue I have is that the "samePrimary" call is inverted; one can pass disease A vs B or B vs A, it doesn't matter, both calls work the same way. But from what I see, it's not true for the acute and chronic calls; those give meaning in the left code vs right code. But the default provider doesn't really use two two different years in the logic, only one, and I am not sure if that makes sense to switch to two years.

Please take a look at this file from seerdata-utility: https://github.com/imsweb/seerdata-utility/blob/master/src/main/java/com/imsweb/seerdata/hematodb/HematoDbUtils.java

I think you added the acute and chronic calls originally; noticed how I changed those to use two years, because the methods fetch two diseases and so it make sense that they each use their own year. That's why I thought the provider also had to be switched to use two years, but now I am not so sure.