Skip to content
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ GO_TOOLS = \
$(TOOLS_BIN)/oapi-codegen

$(TOOLS_BIN)/oapi-codegen: $(TOOLS_BIN)
GOBIN=$(shell pwd)/$(TOOLS_BIN) go install github.com/deepmap/oapi-codegen/cmd/[email protected]
GOBIN=$(shell pwd)/$(TOOLS_BIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/[email protected]


$(NPM_BIN)/%:
$(MAKE) install_npm_pkgs
Expand Down
38 changes: 31 additions & 7 deletions reference/clinic.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,46 @@ paths:
in: query
name: period
description: Time Period to display
- schema:
required: true
- name: tags
description: Comma-separated list of patient tag IDs
schema:
type: array
items:
type: string
format: '^[a-f0-9]{24}$'
pattern: '^[a-f0-9]{24}$'
minItems: 1
in: query
name: tags
description: Comma-separated list of patient tag IDs
style: form
explode: false
- schema:
required: true
- name: lastDataCutoff
description: Inclusive minimum of date of last data from a patient.
schema:
type: string
format: date-time
in: query
name: lastDataCutoff
description: Inclusive
required: true
- name: categories
description: Comma-separated list of TIDE report categories. If omitted or empty, the default TIDE categories will be returned.
schema:
type: array
x-go-type-skip-optional-pointer: true
x-omitempty: true
x-omitzero: true
items:
type: string
enum: ['timeInVeryLowPercent', 'timeInAnyLowPercent', 'timeInExtremeHighPercent', 'timeInVeryHighPercent', 'timeInHighPercent', 'dropInTimeInTargetPercent', 'timeInTargetPercent', 'timeCGMUsePercent', 'meetingTargets', 'noData']
in: query
style: form
explode: false
- name: excludeNoDataPatients
description: If true, then exclude / omit patients with no data in the TIDE report.
schema:
type: boolean
x-go-type-skip-optional-pointer: true
x-omitempty: true
in: query
'/v1/clinics/{clinicId}/patients':
parameters:
- $ref: '#/components/parameters/clinicId'
Expand Down
4 changes: 4 additions & 0 deletions reference/clinic/models/tide/tideConfig.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ properties:
description: Threshold used for determining if a value is very high
type: number
x-go-type: float64
extremeHighGlucoseThreshold:
description: Threshold used for determining if a value is extremely high
type: number
x-go-type: float64
lowGlucoseThreshold:
description: Threshold used for determining if a value is low
type: number
Expand Down
26 changes: 16 additions & 10 deletions reference/clinic/models/tide/tideFilters.v1.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
type: object
title: tidefilters.v1
description: ''
description: 'Visual representation of filtered categories selected'
properties:
timeInVeryLowPercent:
dropInTimeInTargetPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeCGMUsePercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeInAnyLowPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
dropInTimeInTargetPercent:
timeInExtremeHighPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeInHighPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeInTargetPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeCGMUsePercent:
timeInVeryHighPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'
timeInVeryLowPercent:
type: string
pattern: ^(>=|>|<=|<)\d\.\d\d?$
example: '>0.5'

required:
- timeInVeryLowPercent
- timeInAnyLowPercent
- dropInTimeInTargetPercent
- timeInTargetPercent
- timeCGMUsePercent
8 changes: 0 additions & 8 deletions reference/clinic/models/tide/tideResults.v1.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
type: object
title: tideresults.v1
description: ''
required:
- timeInVeryLowPercent
- timeInLowPercent
- dropInTimeInTargetPercent
- timeInTargetPercent
- timeCGMUsePercent
- meetingTargets
- noData
additionalProperties:
type: array
items:
Expand Down
9 changes: 7 additions & 2 deletions scripts/check_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
TOOLS_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
if [[ $OSTYPE =~ darwin ]] && command -v grealpath &> /dev/null; then
TOOLS_BIN=$(grealpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(grealpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
else
TOOLS_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
fi
PATH=$TOOLS_BIN:$NPM_BIN:$PATH

trace() {
Expand Down
9 changes: 7 additions & 2 deletions scripts/generate_clinic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
set -eou pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
TOOLS_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
if [[ $OSTYPE =~ darwin ]] && command -v grealpath &> /dev/null; then
TOOLS_BIN=$(grealpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(grealpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
else
TOOLS_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../tools/bin")
NPM_BIN=$(realpath --canonicalize-existing "$SCRIPT_DIR/../node_modules/.bin")
fi
PATH=$TOOLS_BIN:$NPM_BIN:$PATH

trace() {
Expand Down