...
Code Block | ||
---|---|---|
| ||
openEHR-ELOM.breast_cancer_treatment.v1 language original_language = <[ISO_639-1::en]> description lifecycle_state = <"unmanaged"> original_author = <...> use_model org.openehr.rm data_context in $cancer_diagnosis: Terminology_code in $has_metastasis, $er_positive, $pr_positive, $her2_positive: Boolean in $ki67: Real in $tnm_t, $tnm_n, $tnm_g: String in $has_dx_transmural_mi, $hs_dx_hf_stage_2_4, $has_dx_severe_diabetes: Boolean in $ejection_fraction: Real in $hs_dx_hf_stage_2_4: Boolean out $recommendation: String preconditions $cancer_diagnosis = [ICD_10::C50|Breast cancer|] definition tumor_molecular_subtype (is_er_positive, is_pr_positive, is_her2_positive: Boolean; ki67_level: Real): Terminology_code { if is_er_positive and not is_her2_positive and ki67_level < 0.20 then return [1111|luminal A|] elseif is_er_positive and not is_her2_positive and ki67_level >= 0.20 then return [2222|Luminal B (HER2 negative)|] elseif is_er_positive and is_her2_positive then return [3333|Luminal B (HER2 positive)|] elseif not is_er_positive and not is_pr_positive and is_her2_positive then return [4444|HER2|] elseif not is_er_positive and not is_pr_positive and not is_her2_positive then return [55555|Triple negative|] } has_contraindications_to_anthracyclines(): Boolean { if $has_metastasis then return $has_dx_transmural_mi or $ejection_fraction < 0.4 -- Luminal A or $hs_dx_hf_stage_2_4 } chemo_1_recommendation (): Message { if tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [1111|luminal A|] then -- RECOMMENDATION -- consider contraindications to anthracyclines if has_contraindications_to_anthracyclines() then -- Luminal B (HER2 negative)return Recommend_cmf_message else elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [2222|Luminal B (HER2 negative)|] then -- RECOMMENDATION if $has_critical_cardio_pathology or $age > 75 then -- Luminal B (HER2 positive)return Recommend_apirubicin_cycloPosphamide_message elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [3333|Luminal B (HER2 positive)|] then else -- HER2 typereturn Recommend_ac_message elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [4444|HER2|] then end end } chemo_2_recommendation (): Message { -- Triple negative RECOMMENDATION if $has_dx_severe_diabetes or $allergic_to_taxanes or $has_taxane_intolerance then if has_contraindications_to_anthracyclines() then elseifreturn tumorRecommend_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [55555|Triple negative|] then end elsedc_message else -- CHOICE return [Recommend_ac4p4_message, Recommend_ac4p12_message, Recommend_ac4d4_message] end else -- RECOMMENDATION return chemo_1_recommendation () end } -- REQUIRED if $has_metastasis then -- Luminal A if tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [1111|luminal A|] then if tnm_major_number ($tnm_t) < 3 and tnm_major_number ($tnm_n) < 2 and tnm_major_number ($tnm_g) < 3 then -- Luminal B (HER2 negative) elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [2222|Luminal B (HER2 negative)|] then $recommendation := No_intervention_message -- Luminal B (HER2 positive) else elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [3333|Luminal B (HER2 -- consider contraindications to anthracyclinespositive)|] then -- HER2 type ifelseif $hastumor_dx_transmural_mi or $ejection_fraction < 0.4 or $hs_dx_hf_stage_2_4molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [4444|HER2|] then -- Triple negative $recommendation := Recommend_cmf_message elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [55555|Triple negative|] then else end else -- REQUIRED -- Luminal A if $has_critical_cardio_pathology or $age > 75 then if tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [1111|luminal A|] then -- REQUIRED $recommendation :=if Recommendtnm_apirubicin_cycloPosphamide_message major_number ($tnm_t) < 3 and tnm_major_number ($tnm_n) < 2 and tnm_major_number ($tnm_g) < 3 then else $recommendation := No_intervention_message $recommendation := Recommend_ac_messageelse -- RECOMMENDATION end $recommendation := endchemo_1_recommendation () end -- Luminal B (HER2 negative) elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [2222|Luminal B (HER2 negative)|] then -- REQUIRED if $tnm_t = "1a" and tnm_major_number ($tnm_n) = 0 then $recommendation := No_intervention_message else -- RECOMMENDATION $recommendation := chemo_2_recommendation () end -- Luminal B (HER2 positive) elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [3333|Luminal B (HER2 positive)|] then -- REQUIRED if $tnm_t = "1a" and tnm_major_number ($tnm_n) = 0 then elseif $tnm_t matches {"T1b", "T1c"} and tnm_major_number ($tnm_n) = 0 then elseif tnm_major_number ($tnm_t) matches {|2..4|} and tnm_major_number ($tnm_n) > 0 then else end -- HER2 type elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [4444|HER2|] then -- REQUIRED if $tnm_t = "1a" and tnm_major_number ($tnm_n) = 0 then elseif $tnm_t matches {"T1b", "T1c"} and tnm_major_number ($tnm_n) = 0 then elseif tnm_major_number ($tnm_t) matches {|2..4|} and tnm_major_number ($tnm_n) > 0 then else end -- Triple negative elseif tumor_molecular_subtype ($er_positive, $pr_positive, $her2_positive, $ki67) = [55555|Triple negative|] then end user_alert ($recommendation) end terminology symbol_definitions = < ["en"] = < ["er_positive"] = < text = <"Oestrogen receptor positive"> description = <"Oestrogen receptor positive"> > > > data_bindings content_bindings = < ["openEHR-EHR-OBSERVATION.cancer_investigation.v1"] = < ["er_positive"] = < target = <"/data/events[id3]/data/items[id5]/value/magnitude"> direction = <"in"> > > query_bindings = < ["https://oncology.health.org/cdr/"] = < ["has_dx_transmural_mi"] = < query_id = <"dx_transmural_mi">, parameters = < ["$type"] = <"'xxx'"> > > > > |
...