Skip to content

Commit

Permalink
#377: first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
benitsch committed Jul 10, 2024
1 parent b5cb370 commit eb25f97
Show file tree
Hide file tree
Showing 13 changed files with 712 additions and 40 deletions.
143 changes: 143 additions & 0 deletions openapi/StudyManagerAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,61 @@ paths:
'404':
description: not found

/studies/{studyId}/observations/{observationId}/views:
parameters:
- $ref: '#/components/parameters/StudyId'
- $ref: '#/components/parameters/ObservationId'
get:
operationId: getViewsForObservation
description: "Get a list of available views"
tags:
- data
responses:
200:
description: List of available Views
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ObservationDataView'

/studies/{studyId}/observations/{observationId}/views/{viewName}:
get:
tags:
- data
description: "Get observation view data"
operationId: getObservationData
parameters:
- $ref: '#/components/parameters/StudyId'
- $ref: '#/components/parameters/ObservationId'
- name: viewName
in: path
required: true
schema:
type: string
- name: studyGroupId
in: query
schema:
type: integer
required: false
- name: participantId
in: query
schema:
type: integer
required: false
- $ref: '#/components/parameters/From'
- $ref: '#/components/parameters/To'
responses:
'200':
description: Operation successful
content:
application/json:
schema:
$ref: '#/components/schemas/ObservationDataViewData'
'404':
description: not found

/studies/{studyId}/datapoints:
get:
tags:
Expand Down Expand Up @@ -1283,6 +1338,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/FrontendConfiguration'

/config/buildInfo:
get:
tags:
Expand Down Expand Up @@ -1669,6 +1725,49 @@ components:
type: string
format: date-time
readOnly: true

ObservationDataView:
type: object
properties:
name:
type: string
title:
type: string
description:
type: string
required:
- name

ObservationDataViewData:
type: object
properties:
view:
$ref: '#/components/schemas/ObservationDataView'
chartType:
type: string
enum:
- line
- bar
- pie
labels:
type: array
items:
type: string
data:
type: array
items:
$ref: '#/components/schemas/ObservationDataViewDataRow'

ObservationDataViewDataRow:
type: object
properties:
label:
type: string
values:
type: array
items:
type: integer

DataPoint:
type: object
properties:
Expand Down Expand Up @@ -1795,6 +1894,28 @@ components:
type: array
items:
$ref: '#/components/schemas/Intervention'
participants:
type: array
items:
$ref: '#/components/schemas/ParticipantInfo'
integrations:
type: array
items:
$ref: '#/components/schemas/IntegrationInfo'

ParticipantInfo:
type: object
properties:
studyGroup:
type: integer

IntegrationInfo:
type: object
properties:
name:
type: string
observationId:
$ref: '#/components/schemas/Id'

UserSearchResultList:
type: object
Expand Down Expand Up @@ -1992,6 +2113,7 @@ components:
required:
- auth
readOnly: true

BuildInfo:
type: object
properties:
Expand Down Expand Up @@ -2058,6 +2180,27 @@ components:
type: integer
format: int32
required: true
DateTime:
name: dateTime
in: query
schema:
type: string
format: date-time
readOnly: true
From:
name: from
in: query
schema:
type: string
format: date-time
readOnly: true
To:
name: to
in: query
schema:
type: string
format: date-time
readOnly: true

securitySchemes:
OAuth:
Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dependencies": {
"@vuepic/vue-datepicker": "8.6.0",
"axios": "1.7.1",
"chart.js": "^4.4.3",
"cron-validate": "1.4.5",
"keycloak-js": "24.0.4",
"normalize.css": "8.0.1",
Expand Down
Loading

0 comments on commit eb25f97

Please sign in to comment.