-
Notifications
You must be signed in to change notification settings - Fork 20
/
filteringTerms.json
119 lines (119 loc) · 4.75 KB
/
filteringTerms.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": true,
"definitions": {
"AlphanumericFilter": {
"description": "Filter results based on operators and values applied to alphanumeric fields.",
"properties": {
"id": {
"description": "Field identfier to be queried.",
"example": "ageOfOnset",
"type": "string"
},
"operator": {
"default": "=",
"description": "Defines how the value relates to the field `id`.",
"enum": [
"=",
"<",
">",
"!",
">=",
"<="
],
"example": ">",
"type": "string"
},
"scope": {
"description": "The entry type to which the filter applies",
"example": "individuals",
"type": "string"
},
"value": {
"description": "Alphanumeric search term to be used within the query which can contain wildcard characters (%) to denote any number of unknown characters. Values can be assocatied with units if applicable.",
"example": "P70Y",
"type": "string"
}
},
"required": [
"id",
"operator",
"value"
],
"type": "object"
},
"CustomFilter": {
"description": "Filter results to include records that contain a custom term defined by this Beacon.",
"properties": {
"id": {
"description": "Custom filter terms should contain a unique identifier.",
"example": "demographic.ethnicity:asian",
"type": "string"
},
"scope": {
"description": "The entry type to which the filter applies",
"example": "individuals",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"FilteringTerm": {
"anyOf": [
{
"$ref": "#/definitions/OntologyFilter"
},
{
"$ref": "#/definitions/AlphanumericFilter"
},
{
"$ref": "#/definitions/CustomFilter"
}
]
},
"OntologyFilter": {
"description": "Filter results to include records that contain a specific ontology term.",
"properties": {
"id": {
"description": "Term ID to be queried, using CURIE syntax where possible.",
"example": "HP:0002664",
"type": "string"
},
"includeDescendantTerms": {
"default": true,
"description": "Define if the Beacon should implement the ontology hierarchy, thus query the descendant terms of `id`.",
"type": "boolean"
},
"scope": {
"description": "The entry type to which the filter applies",
"example": "biosamples",
"type": "string"
},
"similarity": {
"default": "exact",
"description": "Allow the Beacon to return results which do not match the filter exactly, but do match to a certain degree of similarity. The Beacon defines the semantic similarity model implemented and how to apply the thresholds of 'high', 'medium' and 'low' similarity.",
"enum": [
"exact",
"high",
"medium",
"low"
],
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
},
"description": "Filtering terms are the main means to select subsets of records from a Beacon response. While the name implies the application to a generated response, in practice implementations may apply them at the query stage. Note: In the processing of Beacon v2.0 requests multiple filters are assumed to be chained by the logical AND operator.",
"items": {
"$ref": "#/definitions/FilteringTerm"
},
"title": "Filtering Term Element",
"type": "array"
}