Reference source · 0.1.0-dev.11
visibility.schema.json
schemas/visibility.schema.json · Download original file
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:oprp:experimental:0.1:visibility",
"title": "OPRP experimental visibility configuration and page metadata",
"$defs": {
"label": {
"type": "object",
"required": [
"system",
"code"
],
"properties": {
"system": {
"type": "string",
"maxLength": 200,
"pattern": "^[A-Za-z][A-Za-z0-9+.-]*:\\S+$"
},
"code": {
"type": "string",
"maxLength": 100,
"pattern": "^[^\\s]{1,100}$"
},
"display": {
"type": "string",
"maxLength": 200
}
},
"additionalProperties": false
},
"epoch": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$"
},
"pageMetadata": {
"type": "object",
"required": [
"status",
"cursor",
"has_more",
"visibility_epoch"
],
"properties": {
"status": {
"const": "ok"
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 12000
},
"has_more": {
"type": "boolean"
},
"visibility_epoch": {
"$ref": "#/$defs/epoch"
}
},
"additionalProperties": true
}
},
"description": "Trusted Host-local configuration, not a public requester operation. Executable path/prototype/label uniqueness checks supplement this schema.",
"type": "object",
"required": [
"labels",
"allow_unlabelled",
"deny_fields"
],
"properties": {
"labels": {
"oneOf": [
{
"const": "all"
},
{
"type": "array",
"maxItems": 32,
"uniqueItems": true,
"items": {
"$ref": "#/$defs/label"
}
}
]
},
"allow_unlabelled": {
"type": "boolean"
},
"deny_fields": {
"type": "object",
"propertyNames": {
"enum": [
"Patient",
"Observation",
"Condition",
"AllergyIntolerance",
"MedicationStatement",
"Encounter",
"Procedure",
"Immunization"
]
},
"additionalProperties": {
"type": "array",
"maxItems": 32,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 2,
"maxLength": 300,
"pattern": "^/"
}
}
}
},
"additionalProperties": false
}