Create a TNMStageGroup Observation (profile: mcode-tnm-stage-group): set Observation.code to a LOINC staging code — clinical (21908-9), pathologic (21902-2), or other (21914-7) — matching the staging method used
Set Observation.valueCodeableConcept to the overall stage group (e.g., AJCC Stage IIB) using codes from the AJCC stage group value set bound by the IG
Set Observation.method to a CodeableConcept identifying the staging system version (e.g., AJCC 8th edition); this is critical for reproducibility
Create the T, N, and M category Observations (mcode-tnm-primary-tumor-category, mcode-tnm-regional-nodes-category, mcode-tnm-distant-metastases-category) each with their appropriate LOINC code and AJCC category value
Link the category Observations to the TNMStageGroup Observation using Observation.hasMember references so the stage group bundles all component categories
Set Observation.subject to the cancer patient and Observation.focus to the PrimaryCancerCondition to establish the clinical context for the staging
Known gotchas
The LOINC code for the TNMStageGroup Observation.code (21908-9 clinical, 21902-2 pathologic, 21914-7 other) must match the actual staging method — mixing clinical and pathologic codes in the same stage group is a semantic error
TNMStageGroup uses Observation.hasMember (not Observation.component) to reference T/N/M category Observations — using component is a structural error that prevents interoperability
mCODE STU4 separated CancerStage (a generic staging profile) from TNMStageGroup (TNM-specific); always use TNMStageGroup for AJCC TNM staging and CancerStage only for non-TNM systems (e.g., FIGO, Binet)
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp