Skip to content

Commit 9ee8ab1

Browse files
committed
clinic sites
Update: re-based on top of the redocly changes. BACK-3634
1 parent 2c00e64 commit 9ee8ab1

File tree

9 files changed

+171
-0
lines changed

9 files changed

+171
-0
lines changed

reference/clinic.v1.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,16 @@ paths:
872872
description: Comma-separated list of patient tag IDs
873873
style: form
874874
explode: false
875+
- name: sites
876+
schema:
877+
type: array
878+
items:
879+
type: string
880+
format: '^[a-f0-9]{24}$'
881+
in: query
882+
description: Comma-separated list of clinic site IDs
883+
style: form
884+
explode: false
875885
description: Retrieve a list of patients of a clinic
876886
post:
877887
summary: Create Patient Account
@@ -908,6 +918,75 @@ paths:
908918
$ref: '#/components/schemas/patientTag.v1'
909919
tags:
910920
- Clinics
921+
'/v1/clinics/{clinicId}/sites':
922+
parameters:
923+
- $ref: '#/components/parameters/clinicId'
924+
get:
925+
summary: List Sites
926+
operationId: ListSites
927+
responses:
928+
'200':
929+
description: List of clinic sites
930+
content:
931+
application/json:
932+
schema:
933+
$ref: '#/components/schemas/clinicSites.v1'
934+
description: List sites
935+
tags:
936+
- Clinics
937+
post:
938+
summary: Create a Site
939+
operationId: CreateSite
940+
responses:
941+
'200':
942+
description: List of clinic sites
943+
content:
944+
application/json:
945+
schema:
946+
$ref: '#/components/schemas/clinicSites.v1'
947+
description: Create a Site
948+
requestBody:
949+
content:
950+
application/json:
951+
schema:
952+
$ref: '#/components/schemas/site.v1'
953+
tags:
954+
- Clinics
955+
'/v1/clinics/{clinicId}/sites/{siteId}':
956+
parameters:
957+
- $ref: '#/components/parameters/clinicId'
958+
- $ref: '#/components/parameters/siteId'
959+
put:
960+
summary: Update a Site
961+
operationId: UpdateSite
962+
responses:
963+
'200':
964+
description: List of clinic sites
965+
content:
966+
application/json:
967+
schema:
968+
$ref: '#/components/schemas/clinicSites.v1'
969+
description: Update a Site
970+
requestBody:
971+
content:
972+
application/json:
973+
schema:
974+
$ref: '#/components/schemas/site.v1'
975+
tags:
976+
- Clinics
977+
delete:
978+
summary: Delete a Site
979+
operationId: DeleteSite
980+
responses:
981+
'200':
982+
description: List of clinic sites
983+
content:
984+
application/json:
985+
schema:
986+
$ref: '#/components/schemas/clinicSites.v1'
987+
description: 'Delete a Site'
988+
tags:
989+
- Clinics
911990
'/v1/clinics/{clinicId}/clinicians/{clinicianId}':
912991
parameters:
913992
- $ref: '#/components/parameters/clinicId'
@@ -2131,6 +2210,12 @@ components:
21312210
type: array
21322211
items:
21332212
$ref: ./clinic/models/dataSource.v1.yaml
2213+
clinicSites.v1:
2214+
type: array
2215+
items:
2216+
$ref: ./clinic/models/clinicSite.v1.yaml
2217+
site.v1:
2218+
$ref: ./clinic/models/site.v1.yaml
21342219
tidepoolUserIds.v1:
21352220
type: array
21362221
nullable: true
@@ -2182,6 +2267,8 @@ components:
21822267
minLength: 1
21832268
tags:
21842269
$ref: ./clinic/models/patientTagIds.v1.yaml
2270+
siteIds:
2271+
$ref: ./clinic/models/siteIds.v1.yaml
21852272
associateClinicianToUser.v1:
21862273
title: Associate Clinician
21872274
type: object
@@ -2494,6 +2581,13 @@ components:
24942581
schema:
24952582
type: string
24962583
pattern: '^[a-f0-9]{24}$'
2584+
siteId:
2585+
name: siteId
2586+
in: path
2587+
required: true
2588+
schema:
2589+
type: string
2590+
pattern: '^[a-f0-9]{24}$'
24972591
userId:
24982592
name: userId
24992593
in: path

reference/clinic/models/clinic.v1.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ properties:
1818
type: array
1919
items:
2020
$ref: ./patientTag.v1.yaml
21+
sites:
22+
type: array
23+
items:
24+
$ref: ./clinicSite.v1.yaml
2125
lastDeletedPatientTag:
2226
$ref: ./patientTag.v1.yaml
2327
phoneNumbers:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
allOf:
2+
- $ref: ./site.v1.yaml
3+
- $ref: ./sitePatients.v1.yaml

reference/clinic/models/patient.v1.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ properties:
6161
id: 502rliv0l2tyy
6262
description: Requests for each provider are listed in reverse chronological order
6363
readOnly: true
64+
sites:
65+
type: array
66+
nullable: true
67+
x-go-type-skip-optional-pointer: true
68+
items:
69+
$ref: ./site.v1.yaml
6470
required:
6571
- id
6672
- fullName
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
type: object
2+
title: Site
3+
description: "A clinic's physical or logical location."
4+
properties:
5+
id:
6+
title: Object Id
7+
type: string
8+
x-go-type-skip-optional-pointer: true
9+
description: String representation of a resource id
10+
minLength: 24
11+
maxLength: 24
12+
pattern: '^[a-f0-9]{24}$'
13+
name:
14+
type: string
15+
x-go-type-skip-optional-pointer: true
16+
description: The site description.
17+
minLength: 1
18+
maxLength: 200
19+
pattern: '^[[:graph:]\p{L}\p{N}][[:graph:]\p{L}\p{N} ]*$'
20+
required:
21+
- id
22+
- name
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title: Site ID
2+
description: >-
3+
Site identifier.
4+
type: string
5+
minLength: 24
6+
maxLength: 24
7+
pattern: '^[a-f0-9]{24}$'
8+
readOnly: true
9+
example: 2fe2488217ee43e1b2e83c2f
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type: array
2+
title: Site ID List
3+
uniqueItems: true
4+
nullable: true
5+
items:
6+
title: Site ID
7+
description: >-
8+
Site identifier.
9+
type: string
10+
minLength: 24
11+
maxLength: 24
12+
pattern: '^[a-f0-9]{24}$'
13+
readOnly: true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# sitepatients extends site with the clinic-specific patient count
2+
type: object
3+
title: Site Patients
4+
description: Site properties specific to a clinic.
5+
properties:
6+
patients:
7+
type: integer
8+
x-go-type-skip-optional-pointer: true
9+
description: The number of patients associated with the site.
10+
readOnly: true
11+
minimum: 0
12+
required:
13+
- patients
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description: >-
2+
Site ID
3+
name: siteId
4+
in: path
5+
required: true
6+
schema:
7+
$ref: '../models/siteid.v1.yaml'

0 commit comments

Comments
 (0)