forked from esilgard/argos_nlp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.json
185 lines (184 loc) · 6.46 KB
/
schema.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
"$schema": "schema_url",
"title": "NLP Engine Output",
"description": "Output from the natural language processing engine.",
"type": "object",
"properties": {
"controlInfo": {
"description": "The information about the batch run along with relevant metadata and groupings to inform the UI.",
"type": "object",
"properties": {
"diseaseGroup": {"type":"string"},
"docDate": {"type":"string"},
"docName": {"type":"string"},
"docType": {"type":"string"},
"docVersion": {"type":"string"},
"engineVersion": {"type":"string"},
"metadata": {
"type":"object",
"properties": {
"tables": {
"type": "array",
"description": "Relevant metadata for the document type processed (based on input parameter -t), organized by tables in target destination.",
"items": {
"type":"object",
"properties": {
"table": {
"type": "string",
"description": "The name of the destination table'."
},
"fields": {
"type": "array",
"description": "The possible fields in the destination table.",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "The name of the field in the destination table."
},
"closedClass": {
"type": "string",
"description": "A binary choice of whether or not their is a closed class of possible values for the field e.g. 'False' means there is no given limit to the field values."
},
"datatype": {
"type": "string",
"description": "The datatype of the output filed e.g. 'string' or 'integer'."
},
"diseaseProperties": {
"type": "array",
"description": "A list of different 'disease properties' objects, which will dictate possible outputs for various disease groups.",
"items": {
"properties": {
"diseaseGroup": {
"type": "array",
"description": "the name(s) of the appropriate disease group, or '*' for all disease groups."
},
"values": {
"type": "array",
"description": "An array (possibly empty in the case of an open class) of potential values for this field given the disease group."
}
},
"required": ["diseaseGroup", "values"]
}
}
},
"required": ["diseaseProperties", "datatype", "closedClass", "field"]
}
}
},
"required": ["table", "fields"]
}
},
"groupings": {
"type":"array",
"items": {
"type":"object",
"properties": {
"level": {
"type": "string",
"description": "The title in the output of the metadata being grouped e.g. 'table' or 'recordKey'."
},
"order": {
"type":"string",
"description": "The mechanism for ordering the data e.g. 'alpha'."
},
"orientation": {
"type":"string",
"description": "The orientation in the UI of the grouped items e.g. 'horizontal'."
}
},
"required": ["level", "order", "orientation"]
}
}
},
"required": ["groupings","tables"]
}
},
"required": ["docType", "docName", "engineVersion", "metadata"]
},
"errors": {
"description": "An array of any errors or warnings encountered in processing the batch",
"type": "array",
"items": {
"type":"object",
"properties": {
"errorString": {
"type": "string",
"description": "A string describing the source or cause of the error."
},
"errorType": {
"type":"string",
"description": "The type of error encountered e.g. 'Warning' (most Errors will crash the engine before anything is output)."
}
},
"required": ["errorString", "errorType"]
}
},
"reports": {
"description": "Output information for the documents themselves",
"type": "array",
"items": {
"type":"object",
"properties": {
"mrn": {
"type": "string",
"description": "The medical record number for the patient to whom the report belongs"
},
"report": {
"type":"string",
"description": "The unique identifier for the report processed"
},
"tables":{
"type":"array",
"description":"a list of tables containing fields that have been output by the engine for this report","items": {"type":"object",
"properties":{
"table":{
"type":"string",
"description":"the name of the destination table"
},
"fields":{
"type":"array",
"description":"a list of the fields that have been output by the engine for this report and the relevant table",
"items": {
"type":"object",
"properties":{
"algorithmVersion": {
"type":"string",
"description":"the version of the algorithm that output this value (this comes from the algorithm class itself)"
},
"confidence": {
"type":"string",
"description":"an internal confidence measure for the value output by the engine"
},
"name": {
"type":"string",
"description":"the name of the field"
},
"recordKey":{
"type":"string",
"description":"an identifier to signal which record (e.g. specimen or finding) the field value relates to"
},
"startStops": {
"type":"array",
"description":"an array of character offsets for the supporting evidence/strings"
},
"table": {
"type":"string",
"description":"the name of the table to which the field belongs"
},
"value": {
"description":"the value(s) of the field output by the engine. The datatype of this value is variable and dictated by the metadata."
}
}
}
}
}
}
}
}
}
}
},
"required": ["controlInfo", "errors"]
}