diff --git a/reference/clinic.v1.yaml b/reference/clinic.v1.yaml index 3610dd5..0c4bb76 100644 --- a/reference/clinic.v1.yaml +++ b/reference/clinic.v1.yaml @@ -267,13 +267,13 @@ paths: 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: @@ -315,6 +315,12 @@ paths: 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 @@ -750,13 +756,13 @@ paths: 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: @@ -854,13 +860,13 @@ paths: 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 @@ -1176,6 +1182,42 @@ paths: 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' @@ -1189,7 +1231,7 @@ paths: 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. @@ -2253,6 +2295,12 @@ components: $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+))$ diff --git a/reference/clinic/models/patient.v1.yaml b/reference/clinic/models/patient.v1.yaml index 319f254..9838f52 100644 --- a/reference/clinic/models/patient.v1.yaml +++ b/reference/clinic/models/patient.v1.yaml @@ -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 diff --git a/reference/clinic/models/patientreview.v1.yaml b/reference/clinic/models/patientreview.v1.yaml new file mode 100644 index 0000000..ce06268 --- /dev/null +++ b/reference/clinic/models/patientreview.v1.yaml @@ -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 \ No newline at end of file diff --git a/reference/clinic/models/tide/config.v1.yaml b/reference/clinic/models/tide/config.v1.yaml index 0c3aeb3..7f7e6e6 100644 --- a/reference/clinic/models/tide/config.v1.yaml +++ b/reference/clinic/models/tide/config.v1.yaml @@ -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: @@ -43,8 +43,8 @@ required: - schemaVersion - clinicId - period - - lastUploadDateFrom - - lastUploadDateTo + - lastDataDateFrom + - lastDataDateTo - highGlucoseThreshold - veryHighGlucoseThreshold - lowGlucoseThreshold diff --git a/reference/clinic/models/tide/patient.v1.yaml b/reference/clinic/models/tide/patient.v1.yaml index 53d2355..eef5c2d 100644 --- a/reference/clinic/models/tide/patient.v1.yaml +++ b/reference/clinic/models/tide/patient.v1.yaml @@ -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