This page demonstrates the JSON API at POST /breast-cancer/api. The JSON below is the request body — edit it, upload a file, or extract from free-text clinical notes using Gemini. Then run to see recommendations and answer gap questions inline.

Extract from clinical notesUse Gemini to turn free-text notes into JSON

Bring your own Google AI Studio key — get one at aistudio.google.com/apikey. Gemini 2.5 Flash is free within generous daily limits.

Free-text radiology / pathology / clinical summary. No PHI should be pasted here.

0/8,000 chars
PatientReport JSON

Example: postmenopausal HR+/HER2− T1N0 lumpectomy — exercises the luminal endocrine-only pathway.

Press Run to compute recommendations
PatientReport JSON SchemaClick to expand

Full JSON Schema (draft-07). Every field is optional — a partial report is valid and the engine fills in the rest via interactive gap questions.

{
  "type": "object",
  "description": "Structured patient data extracted from NCG breast cancer radiology and pathology reports, clinical dictation, or electronic records. All fields are optional — extract only what is explicitly stated in the source material. Do not infer or assume values.",
  "properties": {
    "patient_age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 120,
      "description": "Patient age in completed years at time of diagnosis. Required for genetic counselling referral (<40), DCIS boost (≤50), and APBI eligibility (>40)."
    },
    "menopausal_status": {
      "type": "string",
      "enum": [
        "premenopausal",
        "postmenopausal"
      ],
      "description": "Menopausal status at diagnosis. premenopausal = ongoing cycles or <12 months since last period. postmenopausal = ≥12 months amenorrhoea or confirmed surgical/medical menopause."
    },
    "clinical_t_stage": {
      "type": "string",
      "enum": [
        "Tis",
        "T1",
        "T2",
        "T3",
        "T4"
      ],
      "description": "Clinical T-stage (AJCC/UICC). Tis = DCIS/in-situ only."
    },
    "clinical_n_stage": {
      "type": "string",
      "enum": [
        "N0",
        "N1",
        "N2",
        "N3"
      ],
      "description": "Clinical N-stage. N0 = no palpable/enlarged nodes. N1 = mobile ipsilateral level I-II nodes. N2 = fixed/matted nodes or IMN positive. N3 = supraclavicular or infraclavicular involvement."
    },
    "clinical_m_stage": {
      "type": "string",
      "enum": [
        "M0",
        "M1"
      ],
      "description": "Presence of distant metastases. M0 = none confirmed. M1 = distant mets confirmed."
    },
    "patient_preference_bcs": {
      "type": "boolean",
      "description": "Does the patient wish breast-conserving surgery (lumpectomy)?"
    },
    "bcs_initially_feasible": {
      "type": "boolean",
      "description": "Surgeon's pre-op judgement on whether BCS is technically feasible right now (favourable tumour-to-breast ratio, single focus, no contraindication to whole-breast RT). Combined with patient_preference_bcs to decide BCS vs mastectomy vs NACT-then-reassess."
    },
    "post_nact_bcs_feasible": {
      "type": "boolean",
      "description": "After NACT downsizing, is BCS now technically feasible? Only meaningful for the \"wants BCS but not initially eligible\" pathway."
    },
    "labc_upfront_mrm_feasible": {
      "type": "boolean",
      "description": "For locally advanced BC (T3 N+, T4, or any N2/N3): can upfront Modified Radical Mastectomy with primary closure be performed without NACT? Surgeon's call."
    },
    "labc_nact_responded": {
      "type": "boolean",
      "description": "For LABC patients given NACT: did the tumour respond enough to permit subsequent surgery (MRM or BCS)?"
    },
    "genetic_risk_factors": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "family_history",
          "male_bc",
          "sync_meta"
        ]
      },
      "description": "Genetic risk factors present. family_history = first/second-degree relative with breast or ovarian cancer. male_bc = this patient is male with breast cancer. sync_meta = synchronous or metachronous bilateral breast cancer."
    },
    "laterality": {
      "type": "string",
      "enum": [
        "left",
        "right",
        "bilateral"
      ],
      "description": "Laterality of the primary breast tumour. Critical for RT planning — left-sided requires cardiac dosimetry evaluation."
    },
    "imaging_tumour_size_cm": {
      "type": "number",
      "minimum": 0,
      "description": "Tumour size on imaging (US or MRI), in cm. Use pathological size post-surgery if available."
    },
    "skin_invasion": {
      "type": "boolean",
      "description": "Skin invasion (T4 feature): thickening or direct invasion of overlying skin confirmed."
    },
    "chest_wall_invasion": {
      "type": "boolean",
      "description": "Chest wall invasion (T4 feature): involvement of ribs, intercostal muscles, or serratus anterior."
    },
    "axillary_nodes_enlarged_on_imaging": {
      "type": "boolean",
      "description": "Enlarged axillary nodes seen on CT or ultrasound (clinical N positive indicator)."
    },
    "metastatic_disease_confirmed": {
      "type": "boolean",
      "description": "Distant metastatic disease confirmed on staging CT (thorax/abdomen/pelvis) and/or bone scan. true = M1 disease → metastatic pathway."
    },
    "metastatic_lesion_count": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of distinct metastatic lesions across all sites. ≤5 lesions in a single organ may qualify for oligo-metastatic SBRT."
    },
    "metastatic_organ_count": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of distinct organs involved by metastatic disease. Single-organ = oligo-met criterion."
    },
    "metastatic_sites": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "bone",
          "liver",
          "lung",
          "brain",
          "adrenal",
          "lymph_node",
          "other"
        ]
      },
      "description": "List of organs/sites with confirmed metastatic disease."
    },
    "internal_mammary_nodes_positive": {
      "type": "boolean",
      "description": "Internal mammary nodes positive on imaging or histology — affects RT target volumes."
    },
    "rt_standard_dosimetry_acceptable": {
      "type": "boolean",
      "description": "For left-sided breast cancers: does standard bi-tangential RT technique meet cardiac dose constraints? false → DIBH/IMRT/prone positioning indicated. Ignored for right-sided cancers."
    },
    "specimen_type": {
      "type": "string",
      "enum": [
        "lumpectomy",
        "wide_excision",
        "simple_mastectomy",
        "mrm",
        "re_excision",
        "other"
      ],
      "description": "Type of surgical specimen: lumpectomy/wide_excision = BCS; mrm = modified radical mastectomy."
    },
    "nact_given": {
      "type": "boolean",
      "description": "Was neoadjuvant chemotherapy (NACT) given before this specimen was obtained?"
    },
    "histological_type": {
      "type": "string",
      "enum": [
        "infiltrating_duct_nos",
        "infiltrating_lobular",
        "invasive_papillary",
        "tubular_cribriform",
        "other"
      ],
      "description": "Histological type of the invasive carcinoma per WHO classification."
    },
    "histological_grade": {
      "type": "integer",
      "enum": [
        1,
        2,
        3
      ],
      "description": "Nottingham grade (Modified Bloom-Richardson). 1=well, 2=moderate, 3=poor differentiation. Grade 3 is an independent indication for chemotherapy."
    },
    "invasive_tumour_size_cm": {
      "type": "number",
      "minimum": 0,
      "description": "Microscopic invasive tumour size in cm (EXCLUDING DCIS component). Used for pT staging and endocrine-only eligibility (must be <2 cm for endocrine-only in low-risk Luminal T1/T2 N0)."
    },
    "pathological_t_stage": {
      "type": "string",
      "enum": [
        "pT1",
        "pT2",
        "pT3",
        "pT4"
      ],
      "description": "Pathological T stage after surgery."
    },
    "lymphovascular_invasion": {
      "type": "boolean",
      "description": "Lymphovascular space invasion (LVSI) on histology. Absent LVSI is required for APBI eligibility."
    },
    "perineural_invasion": {
      "type": "boolean",
      "description": "Perineural invasion on histology."
    },
    "margin_status": {
      "type": "string",
      "enum": [
        "free",
        "close_lt_2mm",
        "positive"
      ],
      "description": "Surgical margin status. free = no tumour on inked surface (NCG negative margin definition). close_lt_2mm = tumour within 2 mm. positive = tumour on inked surface."
    },
    "dcis_associated": {
      "type": "boolean",
      "description": "Associated DCIS component present in specimen."
    },
    "dcis_grade": {
      "type": "string",
      "enum": [
        "low",
        "intermediate",
        "high"
      ],
      "description": "Grade of associated DCIS. High-grade DCIS = mandatory sequential boost after BCS."
    },
    "extensive_intraductal_component": {
      "type": "boolean",
      "description": "Extensive intraductal component (EIC) present. Absent EIC required for APBI eligibility."
    },
    "pagets_disease": {
      "type": "boolean",
      "description": "Paget's disease of the nipple present."
    },
    "axillary_nodes_total": {
      "type": "integer",
      "minimum": 0,
      "description": "Total axillary nodes examined."
    },
    "axillary_nodes_positive_macro": {
      "type": "integer",
      "minimum": 0,
      "description": "Axillary nodes with macrometastases (>2 mm). Used for pN staging and risk stratification."
    },
    "pathological_n_stage": {
      "type": "string",
      "enum": [
        "pN0",
        "pN1",
        "pN2",
        "pN3"
      ],
      "description": "Pathological N stage. pN0=node-negative; pN1=1-3 positive; pN2=4-9; pN3=≥10 or supraclavicular."
    },
    "er_status": {
      "type": "string",
      "enum": [
        "positive",
        "negative",
        "unsatisfactory"
      ],
      "description": "ER status by IHC. positive = ≥1% nuclear staining."
    },
    "er_intensity": {
      "type": "string",
      "enum": [
        "weak",
        "moderate",
        "strong"
      ],
      "description": "ER staining intensity. Strong intensity contributes to \"strongly positive\" classification."
    },
    "er_allred_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8,
      "description": "ER Allred score (0-8). ≥6 is considered strongly positive — required for endocrine-only therapy eligibility in low-risk T1/T2 N0 Luminal disease."
    },
    "er_percent_positive": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Percentage of cells with ER positivity."
    },
    "pr_status": {
      "type": "string",
      "enum": [
        "positive",
        "negative",
        "unsatisfactory"
      ],
      "description": "PR status by IHC."
    },
    "pr_intensity": {
      "type": "string",
      "enum": [
        "weak",
        "moderate",
        "strong"
      ],
      "description": "PR staining intensity."
    },
    "pr_allred_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8,
      "description": "PR Allred score (0-8)."
    },
    "her2_status": {
      "type": "string",
      "enum": [
        "positive",
        "equivocal",
        "negative"
      ],
      "description": "HER2 status. positive = IHC 3+ or IHC 2+ with FISH amplification. equivocal = IHC 2+ awaiting FISH. negative = IHC 0/1+ or non-amplified FISH."
    },
    "her2_ihc_score": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "description": "Raw HER2 IHC score before FISH adjudication."
    },
    "ki67_percent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Ki67 proliferation index (% positive cells)."
    },
    "post_nact_pcr_achieved": {
      "type": "boolean",
      "description": "Pathological complete response (pCR) after NACT: no residual invasive cancer in breast AND axilla (ypT0/is ypN0). TNBC no-pCR → capecitabine; HER2+ no-pCR → TDM1."
    },
    "residual_cancer_burden": {
      "type": "string",
      "enum": [
        "RCB-0",
        "RCB-I",
        "RCB-II",
        "RCB-III"
      ],
      "description": "Residual Cancer Burden class post-NACT. RCB-0 = pCR."
    },
    "mbc_type": {
      "type": "string",
      "enum": [
        "de_novo",
        "recurrent"
      ],
      "description": "de_novo = MBC at first diagnosis (no prior curative-intent treatment). recurrent = relapse after prior treatment."
    },
    "visceral_crisis": {
      "type": "boolean",
      "description": "Visceral crisis: rapid life-threatening organ dysfunction (hepatic failure, pulmonary lymphangitis, carcinomatous meningitis). Requires immediate chemotherapy regardless of HR status."
    },
    "treatment_line": {
      "type": "string",
      "enum": [
        "first_line",
        "second_plus"
      ],
      "description": "Treatment line for MBC: first_line = no prior systemic therapy for metastatic disease."
    },
    "oligometastatic_eligible": {
      "type": "boolean",
      "description": "Oligo-metastatic eligibility: ≤5 metastatic lesions confined to a single organ, potentially amenable to local ablative treatment. true = qualifies for ablation pathway; false = diffuse/widespread disease."
    },
    "oligometastatic_all_sites_ablatable": {
      "type": "boolean",
      "description": "For oligo-metastatic patients: is local ablation of ALL metastatic sites technically feasible without undue toxicity (surgery, RT, or other modality)? Only meaningful when oligometastatic_eligible = true."
    },
    "sbrt_available": {
      "type": "boolean",
      "description": "Stereotactic Body Radiotherapy (SBRT) facility availability at or accessible from the treating centre. Institutional capability flag."
    },
    "palliative_rt_target": {
      "type": "string",
      "enum": [
        "bone",
        "brain",
        "not_indicated"
      ],
      "description": "Whether palliative radiotherapy is being considered and which metastatic site it would target. not_indicated = no palliative RT planned."
    },
    "palliative_rt_bone_decision": {
      "type": "string",
      "enum": [
        "conservative",
        "focal_no_sre",
        "disseminated_no_sre",
        "sre_present"
      ],
      "description": "For bone metastases (palliative_rt_target=bone): combined merits + extent + SRE decision. conservative=no RT; focal_no_sre=focal disease no SRE; disseminated_no_sre=widespread no SRE; sre_present=impending fracture/cord compression/soft tissue."
    },
    "palliative_rt_brain_decision": {
      "type": "string",
      "enum": [
        "unfit",
        "multiple_lesions",
        "single_favourable",
        "single_unfavourable"
      ],
      "description": "For brain metastases (palliative_rt_target=brain): combined fitness + count + criteria. unfit=BSC only; multiple_lesions=fit for WBRT; single_favourable=single met with controlled primary and >6mo life expectancy; single_unfavourable=single met but uncontrolled primary or significant systemic disease."
    }
  },
  "additionalProperties": false
}
Recommendations

Derived from the PatientReport above plus any gap answers below.

Run the report to see recommendations.