{
    "bmm_version": "2.4",
    "rm_publisher": "openehr",
    "schema_name": "term",
    "rm_release": "3.0.0",
    "schema_revision": "3.0.0.2",
    "schema_lifecycle_state": "stable",
    "schema_description": "term",
    "schema_author": "Thomas Beale <thomas.beale@openehr.org>, code-generator",
    "packages": {
        "org.openehr.term.terminology": {
            "name": "org.openehr.term.terminology",
            "classes": [
                "CODE_SET",
                "TERMINOLOGY_GROUP",
                "CODE",
                "TERMINOLOGY_CONCEPT",
                "TERMINOLOGY",
                "TERMINOLOGY_STATUS"
            ]
        }
    },
    "class_definitions": {
        "CODE_SET": {
            "name": "CODE_SET",
            "documentation": "A code set.",
            "properties": {
                "name": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "name",
                    "documentation": "Name of this code set.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "openehr_id": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "openehr_id",
                    "documentation": "Identifier used for code set in the openEHR Reference Model. The value is inferred from the `_name_` attribute.\n\nValid values take the form of an xs:NCName value, i.e. cannot contain:\n\n* symbol characters `:, @, $, %, &, \/, +, ,, ;`;\n* whitespace characters or different parentheses. \n\nAn NCName cannot begin with a number, dot or minus character although these can appear later in the value.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "issuer": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "issuer",
                    "documentation": "Name of the issuing organisation.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "codes": {
                    "_type": "P_BMM_CONTAINER_PROPERTY",
                    "name": "codes",
                    "documentation": "Codes in this code set.",
                    "type_def": {
                        "container_type": "List",
                        "type": "CODE"
                    },
                    "cardinality": {
                        "lower": 0,
                        "upper_unbounded": true
                    }
                },
                "external_id": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "external_id",
                    "documentation": "An optional identifier assumed by openEHR to be the identifier of this code set, based on its published name, with spaces replaced by underscores.\n\nValid values take the form of an xs:NCName value, i.e. cannot contain:\n\n* symbol characters `:, @, $, %, &, \/, +, ,, ;`;\n* whitespace characters or different parentheses. \n\nAn NCName cannot begin with a number, dot or minus character although these can appear later in the value.",
                    "type": "String"
                },
                "status": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "status",
                    "documentation": "Status of this code set.",
                    "type": "TERMINOLOGY_STATUS",
                    "default": ""
                }
            }
        },
        "TERMINOLOGY_GROUP": {
            "name": "TERMINOLOGY_GROUP",
            "documentation": "A single vocabulary, in a particular language, within a Terminology.",
            "properties": {
                "name": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "name",
                    "documentation": "Name of this vocabulary.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "concepts": {
                    "_type": "P_BMM_CONTAINER_PROPERTY",
                    "name": "concepts",
                    "documentation": "List of concepts (i.e. coded terms) in this vocabulary.",
                    "type_def": {
                        "container_type": "List",
                        "type": "TERMINOLOGY_CONCEPT"
                    },
                    "cardinality": {
                        "lower": 0,
                        "upper_unbounded": true
                    }
                },
                "openehr_id": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "openehr_id",
                    "documentation": "Identifier used for terminology group in the openEHR Reference Model. The value is inferred from the `_name_` attribute.\n\nValid values take the form of an xs:NCName value, i.e. cannot contain:\n\n* symbol characters `:, @, $, %, &, \/, +, ,, ;`;\n* whitespace characters or different parentheses. \n\nAn NCName cannot begin with a number, dot or minus character although these can appear later in the value.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "status": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "status",
                    "documentation": "Status of this vocabulary.",
                    "type": "TERMINOLOGY_STATUS",
                    "default": ""
                }
            }
        },
        "CODE": {
            "name": "CODE",
            "documentation": "A single code entity in a code set.",
            "properties": {
                "value": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "value",
                    "documentation": "The code string for this code entity, e.g. `\"AF\"`.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "description": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "description",
                    "documentation": "Optional description of this code, e.g. `\"AFGHANISTAN\"`.\n\nThis field may be used to hold translations of the description in a language-specific copy of the English language original code set.",
                    "type": "String"
                },
                "status": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "status",
                    "documentation": "Status of this code within the code set.",
                    "type": "TERMINOLOGY_STATUS",
                    "default": ""
                }
            }
        },
        "TERMINOLOGY_CONCEPT": {
            "name": "TERMINOLOGY_CONCEPT",
            "documentation": "A single terminology concept in a vocabulary.",
            "properties": {
                "id": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "id",
                    "documentation": "The code of this concept.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "rubric": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "rubric",
                    "documentation": "The rubric, i.e. linguistic expression, of this concept, in the language of this terminology instance.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "status": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "status",
                    "documentation": "Status of this concept within the vocabulary.",
                    "type": "TERMINOLOGY_STATUS",
                    "default": ""
                }
            }
        },
        "TERMINOLOGY": {
            "name": "TERMINOLOGY",
            "documentation": "Container for code sets and\/or vocabularies that belong to a given logical terminology.",
            "properties": {
                "name": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "name",
                    "documentation": "Name of this terminology.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "language": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "language",
                    "documentation": "Language of this terminology, as an ISO:639 2-letter code.",
                    "is_mandatory": true,
                    "type": "String"
                },
                "code_sets": {
                    "_type": "P_BMM_CONTAINER_PROPERTY",
                    "name": "code_sets",
                    "documentation": "Code sets in this Terminology.",
                    "type_def": {
                        "container_type": "List",
                        "type": "CODE_SET"
                    },
                    "cardinality": {
                        "lower": 0,
                        "upper_unbounded": true
                    }
                },
                "vocabularies": {
                    "_type": "P_BMM_CONTAINER_PROPERTY",
                    "name": "vocabularies",
                    "documentation": "Vocabularies of coded terms in this terminology.",
                    "type_def": {
                        "container_type": "List",
                        "type": "TERMINOLOGY_GROUP"
                    },
                    "cardinality": {
                        "lower": 0,
                        "upper_unbounded": true
                    }
                },
                "version": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "version",
                    "documentation": "Version of this instance of the terminology.",
                    "type": "String"
                },
                "date": {
                    "_type": "P_BMM_SINGLE_PROPERTY",
                    "name": "date",
                    "documentation": "Date of issue of this version of the terminology.",
                    "type": "Iso8601_date"
                }
            }
        },
        "TERMINOLOGY_STATUS": {
            "_type": "P_BMM_ENUMERATION_STRING",
            "name": "TERMINOLOGY_STATUS",
            "documentation": "Enumeration of possible lifecycle states of any part of the terminomlogy.",
            "ancestors": [
                "String"
            ],
            "item_names": [
                "trial",
                "active",
                "retired"
            ],
            "item_documentations": [
                "Terminology element is in Trial state.",
                "Terminology element is in Active state, i.e. published and in use.",
                "Terminology element has been Retired, i.e. deprecated."
            ]
        }
    }
}
