Skip to content

Commit

Permalink
[BACK-2693] Enforce patient count limit
Browse files Browse the repository at this point in the history
- Add patient count APIs
- Add patient count settings APIs
- https://tidepool.atlassian.net/browse/BACK-2693
  • Loading branch information
darinkrauss committed Jan 10, 2024
1 parent 31103a5 commit 29e3d93
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
69 changes: 69 additions & 0 deletions reference/clinic.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,69 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/MRNSettings'
'/v1/clinics/{clinicId}/settings/patient_count':
parameters:
- $ref: '#/components/parameters/clinicId'
get:
operationId: GetPatientCountSettings
summary: Get Patient Count Settings
description: Get Patient Count settings
tags:
- Clinics
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCountSettings'
x-internal: true
put:
operationId: UpdatePatientCountSettings
summary: Update Patient Count Settings
description: Update Patient Count Settings
tags:
- Clinics
- Internal
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCountSettings'
responses:
'200':
description: OK
'/v1/clinics/{clinicId}/patient_count':
parameters:
- $ref: '#/components/parameters/clinicId'
get:
operationId: GetPatientCount
summary: Get Patient Count
description: Get Patient Count
tags:
- Clinics
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCount'
put:
operationId: UpdatePatientCount
summary: Update Patient Count
description: Update Patient Count
tags:
- Clinics
- Internal
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatientCount'
responses:
'200':
description: OK
'/v1/clinics/{clinicId}/ehr/sync':
parameters:
- $ref: '#/components/parameters/clinicId'
Expand Down Expand Up @@ -1834,6 +1897,12 @@ components:
- settings
MRNSettings:
$ref: ./clinic/models/mrnsettings.v1.yaml
PatientCount:
$ref: ./clinic/models/patientcount.v1.yaml
PatientCountLimit:
$ref: ./clinic/models/patientcountlimit.v1.yaml
PatientCountSettings:
$ref: ./clinic/models/patientcountsettings.v1.yaml
EHRDestinationIds:
$ref: ./clinic/models/ehrdestinations.v1.yaml
EHRProcedureCodes:
Expand Down
9 changes: 9 additions & 0 deletions reference/clinic/models/patientcount.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Patient Count
type: object
properties:
patientCount:
description: The patient count for a clinic
type: integer
minimum: 0
required:
- patientCount
15 changes: 15 additions & 0 deletions reference/clinic/models/patientcountlimit.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: Patient Count Limit
type: object
properties:
patientCount:
description: The patient count limit
type: integer
minimum: 0
startDate:
description: The start date when the patient count limit should be applied
$ref: '../../common/models/datetime.v1.yaml'
endDate:
description: The end date when the patient count limit should no longer be applied
$ref: '../../common/models/datetime.v1.yaml'
required:
- patientCount
9 changes: 9 additions & 0 deletions reference/clinic/models/patientcountsettings.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Patient Count Settings
type: object
properties:
hardLimit:
description: The hard limit for the clinic patient count where new patients cannot be created
$ref: './patientcountlimit.v1.yaml'
softLimit:
description: The soft limit for the clinic patient count where new patients may still be created
$ref: './patientcountlimit.v1.yaml'

0 comments on commit 29e3d93

Please sign in to comment.