{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Type",
"description": "A type definition for some HL7v2 type (incl. Segments and Datatypes).",
"properties": {
"fields": {
"description": "The (sub) fields this type has (if not primitive).",
"items": {
"$ref": "#/components/schemas/Field"
},
"type": "array"
},
"name": {
"description": "The name of this type. This would be the segment or datatype name. For example, \"PID\" or \"XPN\".",
"type": "string"
},
"primitive": {
"description": "If this is a primitive type then this field is the type of the primitive For example, STRING. Leave unspecified for composite types.",
"enum": [
"PRIMITIVE_UNSPECIFIED",
"STRING",
"VARIES",
"UNESCAPED_STRING"
],
"type": "string"
}
},
"type": "object"
}