{
  "openapi": "3.0.3",
  "info": {
    "title": "Knowledge graph L1: Terminology code API",
    "description": "A code in an external terminology — ICD-10, ICD-11, SNOMED CT, ATC, or a WHO classification such as CDHI. CROSS-REFERENCE ONLY. It records system, code and display, and asserts NOTHING about the terminology: no hierarchy, no subsumption, no synonyms, no post-coordination. The terminology has its own authority, its own release cycle and its own tooling, and a partial copy here would be wrong within one release. Resolve meaning against the terminology server, not against this graph. Derives from Coding (FHIR R4 core datatype); system, code, display, version are its elements. Class IRI: http://smart.who.int/kg/terminology-code.",
    "version": "1.0.0"
  },
  "paths": {
    "/StructureDefinition-KGTerminologyCode.schema.json": {
      "get": {
        "summary": "JSON Schema definition for the Logical Model StructureDefinition-KGTerminologyCode",
        "description": "This endpoint serves the JSON Schema definition for the Logical Model StructureDefinition-KGTerminologyCode.",
        "responses": {
          "200": {
            "description": "The JSON Schema for StructureDefinition-KGTerminologyCode",
            "content": {
              "application/schema+json": {
                "schema": {
                  "$ref": "./StructureDefinition-KGTerminologyCode.schema.json"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StructureDefinition-KGTerminologyCode": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "http://smart.who.int/base/StructureDefinition-KGTerminologyCode.schema.json",
        "title": "Knowledge graph L1: Terminology code",
        "description": "A code in an external terminology — ICD-10, ICD-11, SNOMED CT, ATC, or a WHO classification such as CDHI. CROSS-REFERENCE ONLY. It records system, code and display, and asserts NOTHING about the terminology: no hierarchy, no subsumption, no synonyms, no post-coordination. The terminology has its own authority, its own release cycle and its own tooling, and a partial copy here would be wrong within one release. Resolve meaning against the terminology server, not against this graph. Derives from Coding (FHIR R4 core datatype); system, code, display, version are its elements. Class IRI: http://smart.who.int/kg/terminology-code.",
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "KGTerminologyCode",
            "description": "Resource type identifier for KGTerminologyCode logical model"
          },
          "id": {
            "type": "object",
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."
          },
          "system": {
            "type": "string",
            "format": "uri",
            "description": "The identification of the code system that defines the meaning of the symbol in the code."
          },
          "version": {
            "type": "string",
            "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
          },
          "code": {
            "type": "string",
            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."
          },
          "display": {
            "type": "string",
            "description": "A representation of the meaning of the code in the system, following the rules of the system."
          },
          "userSelected": {
            "type": "boolean",
            "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."
          }
        },
        "required": [
          "resourceType"
        ],
        "resourceDefinition": "http://smart.who.int/base/StructureDefinition/KGTerminologyCode",
        "fhir:parent": "http://hl7.org/fhir/StructureDefinition/Coding"
      }
    }
  }
}