Modification to Breast Cancer staging calculation
Closed this issue · 4 comments
add a Stage 0 to ‘Overall clinical TNM stage’ in the Clinical form of breast cancer as follows:
- re-instate cTis as a response (at position 2) into CDE TNMCTBC (Clinical tumour stage) in the Clinical form of breast cancer .
- add the following ‘Overall clinical TNM stage’ calculations to calculate Stage 0 to CDE ‘Overall clinical TNM stage’ in the Clinical form of breast cancer
TNMCTBC = cTis TNMCNBC = cN0 TNMCMBC = cMX
TNMCTBC = cTis TNMCNBC = cN0 TNMCMBC = cM0
The email uses wrong cde codes;
TNMCTBC = cTis TNMCNBC = cN0 TNMCMBC = cMX
TNMCTBC = cTis TNMCNBC = cN0 TNMCMBC = cM0
The actual calc spec is now:
Stage IA
TNMCT = cT1 TNMCN = cN0 TNMCM = cMX
TNMCT = cT1 TNMCN = cN0 TNMCM = cM0
Stage 0
TNMCT = cTis TNMCN = cN0 TNMCM = cMX
TNMCT = cTis TNMCN = cN0 TNMCM = cM0
Stage IIA
TNMCT = cT0 TNMCN = cN1 TNMCM = cMX
TNMCT = cT0 TNMCN = cN1 TNMCM = cM0
TNMCT = cT1 TNMCN = cN1 TNMCM = cMX
TNMCT = cT1 TNMCN = cN1 TNMCM = cM0
TNMCT = cT2 TNMCN = cN0 TNMCM = cMX
TNMCT = cT2 TNMCN = cN0 TNMCM = cM0
Stage IIB
TNMCT = cT2 TNMCN = cN1 TNMCM = cMX
TNMCT = cT2 TNMCN = cN1 TNMCM = cM0
TNMCT = cT3 TNMCN = cN0 TNMCM = cMX
TNMCT = cT3 TNMCN = cN0 TNMCM = cM0
Stage IIIA
TNMCT = cT0 TNMCN = cN2 TNMCM = cMX
TNMCT = cT0 TNMCN = cN2 TNMCM = cM0
TNMCT = cT1 TNMCN = cN2 TNMCM = cMX
TNMCT = cT1 TNMCN = cN2 TNMCM = cM0
TNMCT = cT2 TNMCN = cN2 TNMCM = cMX
TNMCT = cT2 TNMCN = cN2 TNMCM = cM0
TNMCT = cT3 TNMCN = cN1 TNMCM = cMX
TNMCT = cT3 TNMCN = cN1 TNMCM = cM0
TNMCT = cT3 TNMCN = cN2 TNMCM = cMX
TNMCT = cT3 TNMCN = cN2 TNMCM = cM0
Stage IIIB
TNMCT = cT4 TNMCN = cN0 TNMCM = cMX
TNMCT = cT4 TNMCN = cN0 TNMCM = cM0
TNMCT = cT4 TNMCN = cN1 TNMCM = cMX
TNMCT = cT4 TNMCN = cN1 TNMCM = cM0
TNMCT = cT4 TNMCN = cN2 TNMCM = cMX
TNMCT = cT4 TNMCN = cN2 TNMCM = cM0
Stage IIIC
TNMCT = cT0 TNMCN = cN3 TNMCM = cMX
TNMCT = cT0 TNMCN = cN3 TNMCM = cM0
TNMCT = cT1 TNMCN = cN3 TNMCM = cMX
TNMCT = cT1 TNMCN = cN3 TNMCM = cM0
TNMCT = cT2 TNMCN = cN3 TNMCM = cMX
TNMCT = cT2 TNMCN = cN3 TNMCM = cM0
TNMCT = cT3 TNMCN = cN3 TNMCM = cMX
TNMCT = cT3 TNMCN = cN3 TNMCM = cM0
TNMCT = cT4 TNMCN = cN3 TNMCM = cMX
TNMCT = cT4 TNMCN = cN3 TNMCM = cM0
Stage IV
TNMCT = * TNMCN = * TNMCM = cM1
"""
seeing a failed test in Travis:
======================================================================
ERROR [8.917s]: test_bc_clinical_cancer_stage (rdrf.testing.unit.tests.CICCancerStageTestCase)
Traceback (most recent call last):
File "/app/rdrf/rdrf/testing/unit/tests.py", line 2979, in test_bc_clinical_cancer_stage
evaluator = evaluator_class(spec=spec, cde_prefix="TNMC")
File "/app/rdrf/rdrf/forms/fields/calculated_functions.py", line 918, in init
self.rules_dict = self.parse_spec(spec)
File "/app/rdrf/rdrf/forms/fields/calculated_functions.py", line 996, in parse_spec
dicts = self.parse_spec_inputs(line)
File "/app/rdrf/rdrf/forms/fields/calculated_functions.py", line 974, in parse_spec_inputs
raise Exception(
Exception: impossible value in rule: cde=TNMCT value=cTis
Ran 84 tests in 453.672s
FAILED (errors=1)
bc version 31 bc31.yaml not 32
tests now pass, closing.