A cljs version of the predict model, enhanced with radiotherapy and bisphosphonates, and extended to 15 years.
A cljs version of the predict model, enhanced with radiotherapy and bisphosphonates, and extended to 15 years.
(base-m-cum-br erstat tm)
baseline survival. Actually baseline-mortality! R: base.m.cum.br
baseline survival. Actually baseline-mortality! R: base.m.cum.br
(cljs-predict {:keys [age size nodes grade erstat detection her2 ki67 rtime
radio? bis? chemoGen horm radio bis tra]
:as inputs})
clojure/script implementation of predict-v2 model.
Predicts survival based on patient input parameters.
Arguments age, size and nodes are entered as values; the others as lookups
We are now passing in the selected treatments so we don't have to calculate all possible treatment combinations on each call. Instead, we calculate the treatment combinations that could make up the current set in hrctb order
This means that if we see non-null horm, chemoGen, bis values, we will calculate h, hc, hb, hcb only.
Note: For uncertainties in the coefficients h,c,t etc, see docs/Predictv2-uncertainties.docx
clojure/script implementation of predict-v2 model. Predicts survival based on patient input parameters. Arguments age, size and nodes are entered as values; the others as lookups # This is how the model assigns some input parameters (or ranges) into variables # i.e. parameter (or ranges) -> web form setting -> Predict model variable setting # Tumour Grade (1,2,3,unknown) -> (1,2,3,9) -> (1.0,2.0,3.0,2.13) # ER Status (-ve,+ve) -> (0,1) -> (0,1) n.b. unknown not allowed # Detection (Clinical,Screening,Other) -> (0,1,2) -> (0.0,1.0,0.204) # HER2 Status (-ve,+ve,unknown) -> (0,1,9) # KI67 Status (-ve,+ve,unknown) -> (0,1,9) We are now passing in the selected treatments so we don't have to calculate all possible treatment combinations on each call. Instead, we calculate the treatment combinations that could make up the current set in hrctb order This means that if we see non-null horm, chemoGen, bis values, we will calculate h, hc, hb, hcb only. Note: For uncertainties in the coefficients h,c,t etc, see docs/Predictv2-uncertainties.docx
(prognostic-index {:keys [age size nodes grade erstat detection her2-rh ki67-rh
grade-a radio? bis?]
:or {detection 0
ki67-rh -0.11333
age 65
bis? true
her2-rh -0.0762
grade-a 0
radio? true
size 19
nodes 1
grade 1
erstat 1}})
Calculate the breast cancer mortality prognostic index (pi). Comments relate this code to the corresponding R variables.
Calculate the breast cancer mortality prognostic index (pi). Comments relate this code to the corresponding R variables.
(r-base-br radio?)
R: r.base.br Base breast cancer mortality coefficient for radiotherapy enabled or disabled.
R: r.base.br Base breast cancer mortality coefficient for radiotherapy enabled or disabled.
(r-base-oth radio?)
R: r.base.oth Base other cause mortality coefficient
R: r.base.oth Base other cause mortality coefficient
(r-br radio?)
R: r.br breast mortality coefficient for radiotherapy treatment if enabled
R: r.br breast mortality coefficient for radiotherapy treatment if enabled
(types-rx {:keys [erstat her2 horm chemoGen radio? radio bis? bis tra]})
Calculate treatment coefficients radio indicates radiotherapy is available in the interface and selected bis indicates bisphosphonates is available in the interface and selected c = chemo, h = hormone therapy, t = trastuzumab, r = radiotherapy, b = bisphosphonates
Note that we always calculate the same columns, but if a treatment is not selected, then its associated treatment coefficients will be zero.
e.g. The treatment combination hcb will be calculated as hrctb, but with r and c coefficients zeroed.
Calculate treatment coefficients radio indicates radiotherapy is available in the interface and selected bis indicates bisphosphonates is available in the interface and selected c = chemo, h = hormone therapy, t = trastuzumab, r = radiotherapy, b = bisphosphonates Note that we _always_ calculate the same columns, but if a treatment is _not_ selected, then its associated treatment coefficients will be zero. e.g. The treatment combination hcb will be calculated as hrctb, but with r and c coefficients zeroed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close