imsweb / algorithms

Java implementation of cancer-related algorithms (NHIA, NAPIIA, Survival Time, etc...)
Other
6 stars 6 forks source link

Derived Summary Grade 2018 #160

Closed howew closed 1 year ago

howew commented 1 year ago

NAACCR and NPCR have requested we add a derived grade field to the library. The documentation is attached. DerivedGrade.From_NAACCRIG2024.docx

depryf commented 1 year ago

The input fields are two NAACCR standard field.

The output field is not standard (but will be in NAACCR 24). For now, I think it will need to be treated as non-standard (until next year). The number for that field will be 1975, the name is "Derived Summary Grade", so the XML ID will be "derivedSummaryGrade".

The logic uses the schema, that's "schemaId", item number 3800. The schema is breast if that field has the value "00480".

Other than that, this issue seems simple to implement...

depryf commented 1 year ago

Algorithm ID: seer-derived-summary-grade-2018 Algorithm name: SEER Derived Summary Grade Algorihtm version: 2018

Documentation URL: https://staging.seer.cancer.gov/ (logic came from the EOD staging framework)

Algorithm inputs:

Algorithm ouptut:

Logic:

  1. Determine priority list:
    • if schema ID is 00480 (breast) and behavior is 2, use "H, M, L, 3, 2, 1, D, C, B, A, 9, blank"
    • if schema ID is 00480 (breast) and behavior is 3, use "3, 2, 1, H, M, L, D, C, B, A, 9, blank"
    • if schema ID is not 00480 (breast), use "S, 5, 4, 3, 2, 1, E, D, C, B, A, H, M, L, 9, blank"
  2. If a pririty list could not be determined, leave the value blank.
  3. Otherwise use the best clinical or pathological garde value based on the prioirty list, ignore values that are not in the list.