Skip to main content

Overview

Given a set of concept codes, computes all subsumption (is-a) relationships among them and returns a FHIR ConceptMap. Used by advanced FHIR clients for offline hierarchy reasoning. This is a stateless operation — the closure is computed fresh each request.

Request

curl -X POST "https://fhir.omophub.com/fhir/r4/ConceptMap/\$closure" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "resourceType": "Parameters",
    "parameter": [
      { "name": "name", "valueString": "my-closure" },
      { "name": "concept", "valueCoding": { "system": "http://snomed.info/sct", "code": "73211009" } },
      { "name": "concept", "valueCoding": { "system": "http://snomed.info/sct", "code": "44054006" } },
      { "name": "concept", "valueCoding": { "system": "http://snomed.info/sct", "code": "46635009" } }
    ]
  }'

Parameters

ParameterTypeRequiredDescription
namestringNoClient-defined closure table name (accepted but not persisted)
conceptCodingYes (repeatable)Concept codes to include in the closure (max 50)

Response

{
  "resourceType": "ConceptMap",
  "name": "my-closure",
  "status": "active",
  "group": [
    {
      "source": "http://snomed.info/sct",
      "target": "http://snomed.info/sct",
      "element": [
        {
          "code": "73211009",
          "target": [
            { "code": "44054006", "equivalence": "subsumes" },
            { "code": "46635009", "equivalence": "subsumes" }
          ]
        }
      ]
    }
  ]
}
In this example, “Diabetes mellitus” (73211009) subsumes both “Type 2 diabetes mellitus” (44054006) and “Type 1 diabetes mellitus” (46635009).

Limits

  • Maximum 50 concepts per request
  • POST only (per FHIR specification)
  • Stateless — no server-side closure table is maintained

Errors

HTTPIssue CodeCause
400invalidNo concept parameters provided, or exceeds 50 concepts