Skip to content

Commit

Permalink
Head and Neck - Table 4 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bekeles committed Dec 26, 2024
1 parent 101c411 commit 8bc4745
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/main/java/com/imsweb/mph/MphConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -1139,9 +1139,16 @@ private MphConstants() {

// Table 4 ----------------------------------------
thisTableSubTypes = new HashMap<>();
thisTableSubTypes.put("8745/3", "8745/3");
thisTableSubTypes.put("8746/3", "8746/3");
thisTableSubTypes.put("8721/3", "8721/3");
thisTableSubTypes.put("8075", "8075");
thisTableSubTypes.put("8083", "8083");
thisTableSubTypes.put("8082", "8082");
thisTableSubTypes.put("8071", "8071");
thisTableSubTypes.put("8072", "8072");
thisTableSubTypes.put("8052", "8052");
thisTableSubTypes.put("8074", "8074");
thisTableSubTypes.put("8051", "8051");
for (String site : HEAD_AND_NECK_2018_TABLE4_SITES)
content.put(site, thisTableSubTypes);
Expand Down Expand Up @@ -1308,13 +1315,22 @@ private MphConstants() {
// Table 4 ----------------------------------------------------------------------------------------------------------------------
thisTableRows = new HashMap<>();

thisTableRows.put("8560", "8560"); // Adenosquamous carcinoma 8560
thisTableRows.put("9580", "9580"); // Granular cell tumor 9580
thisTableRows.put("8430", "8430"); // Mucoepidermoid carcinoma 8430
thisTableRows.put("8825", "8825"); // Myofibroblastic sarcoma 8825
thisTableRows.put("8720", "8720"); // Oral mucosal melanoma 8720
thisTableRows.put("8745/3", "8720"); // Oral mucosal melanoma 8720
thisTableRows.put("8746/3", "8720"); // Oral mucosal melanoma 8720
thisTableRows.put("8721/3", "8720"); // Oral mucosal melanoma 8720
thisTableRows.put("8825", "8825"); // Myofibroblastic sarcoma 8825
thisTableRows.put("8070", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8075", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8083", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8082", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8071", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8072", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8052", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8074", "8070"); // Squamous cell carcinoma 8070
thisTableRows.put("8051", "8070"); // Squamous cell carcinoma 8070
for (String site : HEAD_AND_NECK_2018_TABLE4_SITES)
content.put(site, thisTableRows);
Expand Down
48 changes: 48 additions & 0 deletions src/test/java/com/imsweb/mph/Mph2018RuleTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,28 @@ public void test2018HeadAndNeck() {
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());
//table 4
i1.setPrimarySite("C020");
i2.setPrimarySite("C020");
i1.setHistologyIcdO3("8745");
i2.setHistologyIcdO3("8746");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MphConstants.SOLID_TUMOR_2018_HEAD_AND_NECK, output.getGroupName());
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());
i1.setHistologyIcdO3("8083");
i2.setHistologyIcdO3("8082");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MphConstants.SOLID_TUMOR_2018_HEAD_AND_NECK, output.getGroupName());
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
i1.setHistologyIcdO3("8052");
i2.setHistologyIcdO3("8074");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MphConstants.SOLID_TUMOR_2018_HEAD_AND_NECK, output.getGroupName());
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());

// Rule M8 Abstract multiple primaries when separate, non-contiguous tumors are on different rows in the appropriate site table (Tables 1-9) in the Equivalent Terms and Definitions. Timing is irrelevant.
ruleStepToTest = "M8";
Expand Down Expand Up @@ -2075,6 +2097,15 @@ public void test2018HeadAndNeck() {
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());
//Table 4
i1.setPrimarySite("C020");
i2.setPrimarySite("C020");
i1.setHistologyIcdO3("8560");
i2.setHistologyIcdO3("9580");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MpResult.MULTIPLE_PRIMARIES, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());

// Rule M9 Abstract a single primary (the invasive)when an in situ tumor is diagnosed after an invasive tumor.
ruleStepToTest = "M9";
Expand Down Expand Up @@ -2303,6 +2334,23 @@ public void test2018HeadAndNeck() {
Assert.assertEquals(MpResult.SINGLE_PRIMARY, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());
//Table 4
i1.setPrimarySite("C020");
i2.setPrimarySite("C020");
i1.setHistologyIcdO3("8720");
i2.setHistologyIcdO3("8746");
i1.setBehaviorIcdO3("3");
i2.setBehaviorIcdO3("3");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MpResult.SINGLE_PRIMARY, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());
i1.setHistologyIcdO3("8083");
i2.setHistologyIcdO3("8070");
output = _utils.computePrimaries(i1, i2);
Assert.assertEquals(MpResult.SINGLE_PRIMARY, output.getResult());
Assert.assertEquals(ruleStepToTest, output.getStep());
Assert.assertEquals(ruleCountToTest, output.getAppliedRules().size());

// Rule M13 Abstract a single primary when none of the previous rules apply.
//No case will reach here
Expand Down

0 comments on commit 8bc4745

Please sign in to comment.