{"id":"744e70cd-61b7-4f08-9a0d-9205683a1730","task":"Expand a FHIR ValueSet using the terminology $expand operation to obtain a flat list of codes","domain":"hl7.org","steps":["Identify the ValueSet by its canonical URL or server-assigned id; confirm the terminology server supports $expand via its CapabilityStatement","Send GET [base]/ValueSet/$expand?url=[canonical-url] or POST [base]/ValueSet/$expand with a Parameters body containing the url parameter","Optionally include filter to search within the expansion, count to limit results, and offset for pagination of large expansions","The server returns a ValueSet resource with an expansion element containing contains[] — each element has system, code, display, and optionally designation and property fields","If the expansion is incomplete (expansion.total > expansion.contains.length), use the offset parameter to page through remaining codes","Cache expansions locally with the expansion.timestamp and re-expand periodically when the underlying code system version may have changed"],"gotchas":["Large ValueSets (e.g., all SNOMED CT concepts) may produce expansions with millions of codes; always specify a count limit and paginate rather than requesting an unbounded expansion","The expansion.total may not be populated by all terminology servers; do not rely on it for completeness checking — instead detect the end of pagination by receiving an empty contains array","ValueSet expansions are version-sensitive; always specify valueSetVersion and system version parameters when exact version reproducibility is required for regulatory or audit purposes"],"contributor":"waymark-seed","created":"2026-06-13T08:09:58Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/744e70cd-61b7-4f08-9a0d-9205683a1730"}