Skip to content

Commit

Permalink
Created first draft of study json schema object
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Jan 15, 2024
1 parent 13d020e commit f09d41b
Showing 1 changed file with 169 additions and 0 deletions.
169 changes: 169 additions & 0 deletions inst/analysis-specification-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"apiVersion": {
"type": "string"
},
"sharedResources": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"cohortDefinitionSet": {
"type": "object",
"properties": {
"cohortDefinitions": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
},
"required": ["self"]
},
"cohortName": {
"type": "string"
},
"cohortDefinitionId": {
"type": "integer"
}
},
"required": ["_links", "cohortName", "cohortDefinitionId"]
},
{
"type": "object",
"properties": {
"cohortDefinitionId": {"type": "integer"},
"targetCohortDefinitionId": {"type": "integer"},
"subsetDefinitionId": {"type": "integer"},
"cohortName": {
"type": "string"
}
},
"required": ["cohortDefinitionId", "targetCohortDefinitionId", "subsetDefinitionId"]
}
]
}
},
"subsetDefinitions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {"type": "object", "properties": {"href": {"type": "string"}}}
},
"required": ["self"]
},
"subsetDefinitionName": {"type": "string"},
"subsetDefinitionId": {"type": "integer"}
},
"required": ["_links", "subsetDefinitionName", "subsetDefinitionId"]
}
}
},
"required": ["cohortDefinitions", "subsetDefinitions"]
}
},
"required": ["cohortDefinitionSet"]
},
{
"type": "object",
"properties": {
"conceptSetDefinition": {
"type": "object",
"properties": {
"id": {"type": "integer"},
"conceptSetName": {"type": "string"},
"isNegativeControlConceptSet": {"type": "boolean"},
"concepts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conceptId": {"type": "integer"},
"conceptName": {"type": "string"},
"standardConcept": {"type": "boolean"},
"standardConceptCaption": {"type": "string"},
"invalidReason": {"type": "string"},
"invalidReasonCaption": {"type": "string"},
"conceptCode": {"type": "string"},
"domainId": {"type": "integer"},
"vocabularyId": {"type": "integer"},
"conceptClassId": {"type": "integer"},
"validStartDate": {"type": "string", "format": "date"},
"validEndDate": {"type": "string", "format": "date"},
"cohortDefinitionId": {"type": "integer"}
},
"required": ["conceptId", "conceptName", "standardConcept", "standardConceptCaption", "invalidReason", "invalidReasonCaption", "conceptCode", "domainId", "vocabularyId", "conceptClassId", "validStartDate", "validEndDate"]
}
}
},
"required": ["id", "conceptSetName", "concepts"]
}
},
"required": ["conceptSetDefinition"]
},
{
"type": "object",
"properties": {
"sharedResource": {
"type": "object",
"properties": {
"name": {"type": "string"},
"schemaRef": {"type": "string", "format": "uri"}
},
"required": ["name", "schemaRef"]
}
},
"required": ["sharedResource"]
}
]
}
},
"renv": {
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {"type": "object", "properties": {"href": {"type": "string"}}}
},
"required": ["self"]
}
},
"required": ["_links"]
},
"modules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"module": {"type": "string"},
"version": {"type": "string"},
"schemaRef": {"type": "string", "format": "uri"},
"settings": {"$ref": "#"}
},
"required": ["module", "version", "schemaRef", "settings"]
}
}
},
"required": ["apiVersion", "sharedResources", "renv", "modules"]
}

0 comments on commit f09d41b

Please sign in to comment.