Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LastData instead of LastUploadData for Patient List and TIDE Filtering #123

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 55 additions & 7 deletions reference/clinic.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@
type: string
format: date-time
in: query
name: cgm.lastUploadDateFrom
name: cgm.lastDataFrom
description: Inclusive
- schema:
type: string
format: date-time
in: query
name: cgm.lastUploadDateTo
name: cgm.lastDataTo
description: Exclusive
'/v1/clinics/{clinicId}/patients':
parameters:
Expand Down Expand Up @@ -315,6 +315,12 @@
name: offsetPeriods
required: false
description: 'If we should display, filter, and sort based on the offset periods or default periods'
- schema:
type: string
format: date-time
in: query
name: lastReviewed
description: Inclusive
- schema:
$ref: '#/components/schemas/FloatFilter'
in: query
Expand Down Expand Up @@ -750,13 +756,13 @@
type: string
format: date-time
in: query
name: cgm.lastUploadDateFrom
name: cgm.lastDataFrom
description: Inclusive
- schema:
type: string
format: date-time
in: query
name: cgm.lastUploadDateTo
name: cgm.lastDataTo
description: Exclusive

- schema:
Expand Down Expand Up @@ -854,13 +860,13 @@
type: string
format: date-time
in: query
name: bgm.lastUploadDateFrom
name: bgm.lastDataFrom
description: Inclusive
- schema:
type: string
format: date-time
in: query
name: bgm.lastUploadDateTo
name: bgm.lastDataTo
description: Exclusive
- schema:
type: array
Expand Down Expand Up @@ -1176,6 +1182,42 @@
application/json:
schema:
$ref: '#/components/schemas/AcceptPatientInvitation'
'/v1/clinics/{clinicId}/patients/{patientId}/reviews':
parameters:
- $ref: '#/components/parameters/clinicId'
- $ref: '#/components/parameters/patientId'
put:
summary: Update Patient Reviews
operationId: UpdatePatientReviews
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PatientReviews'
description: |-
Update the patient's last reviewed date and clinician ID
tags:
- Clinics
delete:
summary: Delete Patient Reviews
operationId: DeletePatientReviews
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PatientReviews'
'409':
description: Cannot revert a different clinician's review
'404':
description: No review to delete
description: |-
Revert the patient's last reviewed date to the previous set
tags:
- Clinics
'/v1/clinics/{clinicId}/patients/{patientId}/permissions':
parameters:
- $ref: '#/components/parameters/clinicId'
Expand All @@ -1189,7 +1231,7 @@
content:
application/json:
schema:
$ref: '#/components/schemas/PatientPermissions'
$ref: '#/components/schemas/PatientReviews'
description: |-
Update permissions that a clinic has over a patient account. If all permissions are revoked as a result of the update, the patient profile will be removed from the clinic.

Expand Down Expand Up @@ -1928,7 +1970,7 @@

https://sandbox.xealth.io/app/api-docs#tag/Digital-Care/paths/preorder/post
/v1/xealth/programs:
put:

Check warning on line 1973 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
summary: Get Programs
operationId: XealthGetPrograms
responses:
Expand All @@ -1945,7 +1987,7 @@
responses:
'200':
description: OK
description: ''

Check warning on line 1990 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
tags:
- Clinics
- Internal
Expand All @@ -1957,7 +1999,7 @@
responses:
'200':
description: OK
description: ''

Check warning on line 2002 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
tags:
- Clinics
- Internal
Expand Down Expand Up @@ -2051,11 +2093,11 @@
$ref: ./clinic/models/patient.v1.yaml
PatientTag:
$ref: ./clinic/models/patienttag.v1.yaml
PatientTags:

Check warning on line 2096 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
type: array
items:
$ref: '#/components/schemas/PatientTag'
DateTime:

Check warning on line 2100 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./common/models/datetime.v1.yaml
DataSource:
$ref: ./clinic/models/datasource.v1.yaml
Expand All @@ -2076,13 +2118,13 @@
minItems: 1
maxItems: 1000
uniqueItems: true
ClinicianRoles:

Check warning on line 2121 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./clinic/models/clinicianroles.v1.yaml
PhoneNumber:

Check warning on line 2123 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./clinic/models/phonenumber.v1.yaml
PatientPermissions:
$ref: ./clinic/models/patientpermissions.v1.yaml
Id:

Check warning on line 2127 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./clinic/models/clinicid.v1.yaml
PatientClinicRelationship:
title: PatientClinicRelationship
Expand Down Expand Up @@ -2189,7 +2231,7 @@
$ref: ./clinic/models/migrationstatus.v1.yaml
required:
- status
MigrationStatus:

Check warning on line 2234 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./clinic/models/migrationstatus.v1.yaml
Meta:
title: Meta
Expand Down Expand Up @@ -2225,7 +2267,7 @@
type: boolean
PatientTagIds:
$ref: ./clinic/models/patienttagids.v1.yaml
TideConfig:

Check warning on line 2270 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

oas3-unused-component Potentially unused component has been detected.
$ref: ./clinic/models/tide/config.v1.yaml
TideFilters:
$ref: ./clinic/models/tide/filters.v1.yaml
Expand Down Expand Up @@ -2253,6 +2295,12 @@
$ref: ./summary/models/dates.v1.yaml
PatientSummary:
$ref: ./clinic/models/summaries/patientsummary.v1.yaml
PatientReview:
$ref: "./clinic/models/patientreview.v1.yaml"
PatientReviews:
type: array
items:
$ref: "#/components/schemas/PatientReview"
FloatFilter:
type: string
pattern: ^(>=|>|<=|<)[+-]?((\d+(\.\d*)?)|(\.\d+))$
Expand Down
6 changes: 6 additions & 0 deletions reference/clinic/models/patient.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ properties:
readOnly: true
summary:
$ref: ./summaries/patientsummary.v1.yaml
reviews:
type: array
nullable: true
x-go-type-skip-optional-pointer: true
items:
$ref: "./patientreview.v1.yaml"
required:
- id
- fullName
Expand Down
12 changes: 12 additions & 0 deletions reference/clinic/models/patientreview.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
title: patientreview.v1
description: A summary of a patients recent data
properties:
clinicianId:
type: string
time:
type: string
format: date-time
required:
- clinicianId
- time
8 changes: 4 additions & 4 deletions reference/clinic/models/tide/config.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ properties:
type: string
pattern: ^(1d|7d|14d|30d)$
example: 7d
lastUploadDateFrom:
lastDataFrom:
type: string
format: date-time
lastUploadDateTo:
lastDataTo:
type: string
format: date-time
highGlucoseThreshold:
Expand Down Expand Up @@ -43,8 +43,8 @@ required:
- schemaVersion
- clinicId
- period
- lastUploadDateFrom
- lastUploadDateTo
- lastDataDateFrom
- lastDataDateTo
- highGlucoseThreshold
- veryHighGlucoseThreshold
- lowGlucoseThreshold
Expand Down
6 changes: 6 additions & 0 deletions reference/clinic/models/tide/patient.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ properties:
minLength: 1
tags:
$ref: ../patienttagids.v1.yaml
reviews:
type: array
nullable: true
x-go-type-skip-optional-pointer: true
items:
$ref: "../patientreview.v1.yaml"

required:
- id
Expand Down
Loading