This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcovid19-algorithme-orientation-openapi.yaml
517 lines (516 loc) · 15.2 KB
/
covid19-algorithme-orientation-openapi.yaml
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
openapi: 3.0.0
info:
title: API d'orientation COVID19
version: '2020-04-17'
servers:
- url: 'http://localhost:4000'
variables: {}
paths:
/questionnaire:
post:
parameters:
- description: Token to send the questionnaire
in: header
name: x-token
required: true
schema:
type: string
responses:
'202':
content:
application/json:
schema:
description: Accepted
type: string
description: Questionnaire
'400':
content:
application/json:
schema:
description: Bad Request
type: string
description: Questionnaire
'401':
content:
application/json:
schema:
description: Unauthorized
type: string
description: Questionnaire
'403':
content:
application/json:
schema:
description: Forbidden
type: string
description: Questionnaire
'407':
content:
application/json:
schema:
description: Proxy Authentication Required
type: string
description: Questionnaire
'422':
content:
application/json:
schema:
description: Unprocessable Entity
type: string
description: Questionnaire
'451':
content:
application/json:
schema:
description: Unavailable For Legal Reasons
type: string
description: Questionnaire
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Questionnaire
tags: []
callbacks: {}
deprecated: false
description: Évaluer le test d'orientation du COVID19
operationId: QuestionnaireController.create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuestionnaireRequest'
description: Paramètres du test d'orientation
required: true
summary: Évaluer le test d'orientation du COVID19
/token:
post:
parameters: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
description: Questionnaire
'400':
content:
application/json:
schema:
description: Bad Request
type: string
description: Questionnaire
'407':
content:
application/json:
schema:
description: Proxy Authentication Required
type: string
description: Questionnaire
'409':
content:
application/json:
schema:
description: Conflict
type: string
description: Questionnaire
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Questionnaire
tags: []
callbacks: {}
deprecated: false
description: Create a token
operationId: TokenController.create
summary: Create a token
components:
responses: {}
schemas:
Calculations:
description: >-
[Calculations](https://github.com/Delegation-numerique-en-sante/covid19-algorithme-questionnaire/blob/master/implementation.org#conseils-pour-limpl%C3%A9mentation-de-lalgorithme)
example:
fever_algo: true
heart_disease_algo: true
immunosuppressant_disease_algo: true
properties:
fever_algo:
description: Si la personne a de la fièvre
type: boolean
heart_disease_algo:
description: Maladie cardiaque
type: boolean
immunosuppressant_disease_algo:
description: Maladie défenses immunitaires
type: boolean
title: Calculations
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Calculations
Error:
description: Something bad happened!
example:
message: >-
Failed to cast value using any of: Schema(title: "Questionnaire",
type: :object)
source:
pointer: /questionnaire
title: Invalid value
properties:
message:
description: Explanation of what happened
type: string
source:
description: Where did that happen
type: object
title:
description: What happened
type: string
required:
- title
- source
- message
title: Error
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Error
ErrorResponse:
description: Something bad happened!
example:
errors:
- message: >-
Failed to cast value using any of: Schema(title: "Questionnaire",
type: :object)
source:
pointer: /questionnaire
title: Invalid value
properties:
error:
items:
anyOf:
- $ref: '#/components/schemas/Error'
type: array
title: ErrorResponse
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.ErrorResponse
Metadata:
description: >-
[Caractéristiques du
questionnaire](https://docs.google.com/spreadsheets/d/1Ne7QEp_oMHRxxYhqT56AWugfTaywu-cNRZsWPrMGvkY/edit#gid=0)
example:
algo_version: '2020-05-10'
date: '2020-04-29T13:24:44.389249Z'
duration: 3600
form_version: '2020-05-10'
orientation: SAMU
properties:
algo_version:
description: Version de l’algorithme
format: date
type: string
date:
description: Date de saisie
format: date-time
type: string
duration:
description: Durée de saisie en secondes
type: integer
form_version:
description: Version du formulaire
format: date
type: string
orientation:
description: >-
[Orientations
possibles](https://github.com/Delegation-numerique-en-sante/covid19-algorithme-orientation/blob/master/implementation.org#variables-qui-correspondent-%C3%A0-lorientation-affich%C3%A9e)
enum:
- less_15
- consultation_surveillance_1
- consultation_surveillance_2
- SAMU
- consultation_surveillance_3
- consultation_surveillance_4
- surveillance
type: string
required:
- form_version
- algo_version
title: Metadata
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Metadata
Questionnaire:
description: >-
[Algorithme d'orientation du
COVID19](https://github.com/Delegation-numerique-en-sante/covid19-algorithme-questionnaire/blob/master/pseudo-code.org#pr%C3%A9sentation-de-lalgorithme-dquestionnaire-covid19)
example:
calculations:
fever_algo: true
heart_disease_algo: true
immunosuppressant_disease_algo: true
metadata:
algo_version: '2020-05-10'
date: '2020-04-29T13:24:44.389249Z'
duration: 3600
form_version: '2020-05-10'
orientation: SAMU
respondent:
age_range: sup_65
imc: 21.9
postal_code: '75000'
risk_factors:
breathing_disease: true
cancer: true
diabetes: true
heart_disease: 1
immunosuppressant_disease: 1
kidney_disease: true
liver_disease: true
pregnant: 1
sickle_cell: true
symptoms:
agueusia_anosmia: true
breathlessness: true
cough: true
diarrhea: true
feeding_day: true
sore_throat_aches: true
temperature_cat: 35.5-37.7
tiredness: true
tiredness_details: true
token:
date: '2020-03-29 15:20:11.875767Z'
uuid: c9e77845-83cf-4891-88d6-804d659e81c5
properties:
calculations:
$ref: '#/components/schemas/Calculations'
metadata:
$ref: '#/components/schemas/Metadata'
respondent:
$ref: '#/components/schemas/Respondent'
risk_factors:
$ref: '#/components/schemas/RiskFactors'
symptoms:
$ref: '#/components/schemas/Symptoms'
token:
$ref: '#/components/schemas/Token'
required:
- metadata
- respondent
- symptoms
- risk_factors
- calculations
title: Questionnaire
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Questionnaire
QuestionnaireRequest:
description: Corps de la requête POST pour lancer l'algorithme d'orientation
example:
questionnaire:
calculations:
fever_algo: true
heart_disease_algo: true
immunosuppressant_disease_algo: true
metadata:
algo_version: '2020-05-10'
form_version: '2020-05-10'
orientation: SAMU
respondent:
age_range: sup_65
imc: 21.9
postal_code: '75000'
risk_factors:
breathing_disease: true
cancer: true
diabetes: true
heart_disease: 1
immunosuppressant_disease: 1
kidney_disease: true
liver_disease: true
pregnant: 1
sickle_cell: true
symptoms:
agueusia_anosmia: true
breathlessness: true
cough: true
diarrhea: true
feeding_day: true
sore_throat_aches: true
temperature_cat: 35.5-37.7
tiredness: true
tiredness_details: true
properties:
questionnaire:
anyOf:
- $ref: '#/components/schemas/Questionnaire'
required:
- questionnaire
title: QuestionnaireRequest
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.QuestionnaireRequest
Respondent:
description: >-
[Caractéristiques du
respondent](https://docs.google.com/spreadsheets/d/1Ne7QEp_oMHRxxYhqT56AWugfTaywu-cNRZsWPrMGvkY/edit#gid=0)
example:
age_range: sup_65
imc: 21.9
postal_code: '75000'
properties:
age_range:
description: Tranche d’âge
enum:
- inf_15
- from_15_to_49
- from_50_to_64
- sup_65
type: string
imc:
description: IMC de la personne en kg/(cm/100)2
type: number
postal_code:
description: Le code postal
type: string
title: Respondent
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Respondent
RiskFactors:
description: >-
[Questions sur les facteurs risk_factors défavorables au
terrain](https://github.com/Delegation-numerique-en-sante/covid19-algorithme-questionnaire/blob/master/pseudo-code.org#questions-sur-les-facteurs-risk_factors-d%C3%A9favorables-au-terrain)
example:
breathing_disease: true
cancer: true
diabetes: true
heart_disease: 1
immunosuppressant_disease_algo: true
kidney_disease: true
liver_disease: true
pregnant: 1
sickle_cell: true
properties:
breathing_disease:
description: Maladie respiratoire
type: boolean
cancer:
description: Cancer actuel ou < moins de 3 ans
type: boolean
diabetes:
description: Diabète
type: boolean
heart_disease:
description: Maladie cardiaque
enum:
- 0
- 1
- 999
type: integer
immunosuppressant_disease:
description: Maladie défenses immunitaires
enum:
- 0
- 1
- 999
type: integer
kidney_disease:
description: Insuffisance rénale
type: boolean
liver_disease:
description: Maladie chronique du foie
type: boolean
pregnant:
description: Enceinte
enum:
- 0
- 1
- 888
type: integer
sickle_cell:
description: Drépanocytose homozygote
type: boolean
title: RiskFactors
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.RiskFactors
Symptoms:
description: >-
[Questions sur les
symptômes](https://github.com/Delegation-numerique-en-sante/covid19-algorithme-questionnaire/blob/master/pseudo-code.org#questions-sur-les-sympt%C3%B4mes)
example:
agueusia_anosmia: true
breathlessness: true
cough: true
diarrhea: true
feeding_day: true
sore_throat_aches: true
temperature_cat: 35.5-37.7
tiredness: true
tiredness_details: true
properties:
agueusia_anosmia:
description: Perte de goût et d’odorat
type: boolean
breathlessness:
description: Essoufflement
type: boolean
cough:
description: Toux
type: boolean
diarrhea:
description: Diarrhée
type: boolean
feeding_day:
description: Difficulté pour manger/boire
type: boolean
sore_throat_aches:
description: Mal de gorge ou douleurs
type: boolean
temperature_cat:
description: Catégorie de température
enum:
- inf_35.5
- 35.5-37.7
- 37.8-38.9
- sup_39
- NSP
type: string
tiredness:
description: Fatigue
type: boolean
tiredness_details:
description: Alitement >=50% du temps diurne
type: boolean
title: Symptoms
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Symptoms
Token:
description: Token
example:
date: '2020-04-29T13:24:44.389249Z'
uuid: c9e77845-83cf-4891-88d6-804d659e81c5
properties:
date:
description: Date de crátion du token
format: date-time
type: string
uuid:
description: UUID du token
format: uuid
type: string
title: Token
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.Token
TokenResponse:
description: TokenResponse
example:
data:
date: '2020-03-29 15:20:11.875767Z'
uuid: c9e77845-83cf-4891-88d6-804d659e81c5
properties:
data:
$ref: '#/components/schemas/Token'
title: TokenResponse
type: object
x-struct: Elixir.Covid19QuestionnaireWeb.Schemas.TokenResponse
security: []
tags: []