Skip to content

Commit 9e016c5

Browse files
committed
Remove tide filters from response and replace w/ categories as all filters are just categories.
1 parent 884bad9 commit 9e016c5

File tree

6 files changed

+133
-32
lines changed

6 files changed

+133
-32
lines changed

reference/clinic.v1.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,13 @@ paths:
270270
name: lastDataCutoff
271271
description: Inclusive
272272
- schema:
273-
type: array
274-
items:
275-
$ref: ./clinic/models/tide/tideCategoryName.v1.yaml
273+
oneOf:
274+
- type: array
275+
items:
276+
$ref: '#/components/schemas/predefinedCategoryName.v1'
277+
- type: array
278+
items:
279+
type: string
276280
in: query
277281
name: categories
278282
description: Comma-separated list of category names to include in the report. Omit to include all.
@@ -2539,6 +2543,17 @@ components:
25392543
description: Optional action to be performed when a unique match has been found
25402544
required:
25412545
- criteria
2546+
predefinedCategoryName.v1:
2547+
type: string
2548+
enum:
2549+
- timeInVeryLowPercent
2550+
- timeInAnyLowPercent
2551+
- dropInTimeInTargetPercent
2552+
- timeInTargetPercent
2553+
- timeCGMUsePercent
2554+
- meetingTargets
2555+
- noData
2556+
description: Existing default pre-defined TIDE report categories.
25422557
securitySchemes:
25432558
sessionToken:
25442559
name: x-tidepool-session-token
Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
type: object
22
title: tidecategory.v1
33
properties:
4-
heading:
4+
name:
55
description: Name of the category.
66
type: string
7-
field:
8-
description: The target field to compare against. It is one of the two operands to the comparison operator.
9-
type: string
10-
value:
11-
description: The reference value to compare the field against.
12-
type: number
13-
x-go-type: float64
147
comparison:
15-
description: The comparison operator to make between the field's value and the category's reference value, with field being the first operand and value being the second. `field comparison value`
16-
type: string
17-
enum: ['>', '>=', '<', '<=', '=']
8+
description: Describes a comparison filter against a summary field.
9+
type: object
10+
properties:
11+
summaryField:
12+
description: Summary field to compare against.
13+
$ref: './tideSummaryField.v1.yaml'
14+
op:
15+
description: Comparison operator.
16+
type: string
17+
enum: ['>', '>=', '<', '<=', '=']
18+
value:
19+
description: Value to compare summaryField against.
20+
required:
21+
- summaryField
22+
- op
23+
- value
24+
sort:
25+
description: Describes a sorting operation against a summary field.
26+
type: object
27+
properties:
28+
summaryField:
29+
description: Summary field to use as a sort key.
30+
$ref: './tideSummaryField.v1.yaml'
31+
direction:
32+
description: Sort direction.
33+
type: string
34+
enum: ['ascending', 'descending']
35+
required:
36+
- summaryField
37+
- direction
38+
priority:
39+
description: Priority of category to use when iterating against a list of categories when generating a TIDE report with a lower value having higher priority. This is used to because of a TIDE report patient limit so higher priority categories will be queried first.
40+
type: integer
1841
required:
19-
- heading
20-
- comparison
21-
- field
22-
- value
42+
- name
43+
- sort

reference/clinic/models/tide/tideCategoryName.v1.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

reference/clinic/models/tide/tideConfig.v1.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ properties:
3333
x-go-type: float64
3434
tags:
3535
$ref: ../patientTagIds.v1.yaml
36-
filters:
37-
$ref: ./tideFilters.v1.yaml
36+
categories:
37+
description: Categories that were used during report generation.
38+
type: array
39+
items:
40+
$ref: ./tideCategory.v1.yaml
3841

3942
required:
4043
- schemaVersion
@@ -46,4 +49,3 @@ required:
4649
- lowGlucoseThreshold
4750
- veryLowGlucoseThreshold
4851
- tags
49-
- filters

reference/clinic/models/tide/tideSettings.v1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ properties:
88
$ref: ./tideCategory.v1.yaml
99
thresholds:
1010
$ref: ./tideThresholds.v1.yaml
11-
description: Thresholds for values to be considered low / high. Read-only as the values are hardcoded in the summary service.
11+
description: Thresholds for values to be considered low / high. Read-only as the values are hardcoded in the platform summary service.
1212
required:
1313
- categories
1414
- thresholds
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
title: tidesummaryfield.v1.yaml
2+
description: Available summary fields for a TIDE report category to filter / sort against.
3+
type: string
4+
enum:
5+
- averageDailyRecords
6+
- averageDailyRecordsDelta
7+
- averageGlucoseMmol
8+
- averageGlucoseMmolDelta
9+
- coefficientOfVariation
10+
- coefficientOfVariationDelta
11+
- daysWithData
12+
- daysWithDataDelta
13+
- hoursWithData
14+
- hoursWithDataDelta
15+
- standardDeviation
16+
- standardDeviationDelta
17+
- timeCGMUseMinutes
18+
- timeCGMUseMinutesDelta
19+
- timeCGMUsePercent
20+
- timeCGMUsePercentDelta
21+
- timeCGMUseRecords
22+
- timeCGMUseRecordsDelta
23+
- timeInAnyHighMinutes
24+
- timeInAnyHighMinutesDelta
25+
- timeInAnyHighPercent
26+
- timeInAnyHighPercentDelta
27+
- timeInAnyHighRecords
28+
- timeInAnyHighRecordsDelta
29+
- timeInAnyLowMinutes
30+
- timeInAnyLowMinutesDelta
31+
- timeInAnyLowPercent
32+
- timeInAnyLowPercentDelta
33+
- timeInAnyLowRecords
34+
- timeInAnyLowRecordsDelta
35+
- timeInExtremeHighMinutes
36+
- timeInExtremeHighMinutesDelta
37+
- timeInExtremeHighPercent
38+
- timeInExtremeHighPercentDelta
39+
- timeInExtremeHighRecords
40+
- timeInExtremeHighRecordsDelta
41+
- timeInHighMinutes
42+
- timeInHighMinutesDelta
43+
- timeInHighPercent
44+
- timeInHighPercentDelta
45+
- timeInHighRecords
46+
- timeInHighRecordsDelta
47+
- timeInLowMinutes
48+
- timeInLowMinutesDelta
49+
- timeInLowPercent
50+
- timeInLowPercentDelta
51+
- timeInLowRecords
52+
- timeInLowRecordsDelta
53+
- timeInTargetMinutes
54+
- timeInTargetMinutesDelta
55+
- timeInTargetPercent
56+
- timeInTargetPercentDelta
57+
- timeInTargetRecords
58+
- timeInTargetRecordsDelta
59+
- timeInVeryHighMinutes
60+
- timeInVeryHighMinutesDelta
61+
- timeInVeryHighPercent
62+
- timeInVeryHighPercentDelta
63+
- timeInVeryHighRecords
64+
- timeInVeryHighRecordsDelta
65+
- timeInVeryLowMinutes
66+
- timeInVeryLowMinutesDelta
67+
- timeInVeryLowPercent
68+
- timeInVeryLowPercentDelta
69+
- timeInVeryLowRecords
70+
- timeInVeryLowRecordsDelta
71+
- totalRecords
72+
- totalRecordsDelta
73+

0 commit comments

Comments
 (0)