Skip to content

Commit 004023e

Browse files
committed
clinic sites
BACK-3634
1 parent d8f823c commit 004023e

File tree

9 files changed

+165
-1
lines changed

9 files changed

+165
-1
lines changed

reference/clinic.v1.yaml

Lines changed: 86 additions & 1 deletion
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,62 @@ paths:
908918
$ref: '#/components/schemas/PatientTag'
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: 'OK'
930+
content:
931+
application/json:
932+
schema:
933+
$ref: '#/components/schemas/ClinicSites'
934+
description: 'List sites'
935+
tags:
936+
- Clinics
937+
post:
938+
summary: 'Create a Site'
939+
operationId: 'CreateSite'
940+
responses:
941+
'200':
942+
description: OK
943+
requestBody:
944+
content:
945+
application/json:
946+
schema:
947+
$ref: '#/components/schemas/Site'
948+
tags:
949+
- Clinics
950+
'/v1/clinics/{clinicId}/sites/{siteId}':
951+
parameters:
952+
- $ref: '#/components/parameters/clinicId'
953+
- $ref: '#/components/parameters/siteId'
954+
put:
955+
summary: 'Update a Site'
956+
operationId: 'UpdateSite'
957+
responses:
958+
'204':
959+
description: 'No Content'
960+
description: 'Update a Site'
961+
requestBody:
962+
content:
963+
application/json:
964+
schema:
965+
$ref: './clinic/models/site.v1.yaml'
966+
tags:
967+
- Clinics
968+
delete:
969+
summary: 'Delete a Site'
970+
operationId: 'DeleteSite'
971+
responses:
972+
'204':
973+
description: 'No Content'
974+
description: 'Delete a Site'
975+
tags:
976+
- Clinics
911977
'/v1/clinics/{clinicId}/clinicians/{clinicianId}':
912978
parameters:
913979
- $ref: '#/components/parameters/clinicId'
@@ -2087,7 +2153,7 @@ paths:
20872153
- $ref: '#/components/parameters/patientId'
20882154
- $ref: '#/components/parameters/providerId'
20892155
post:
2090-
summary: ''
2156+
summary: 'Connection request'
20912157
operationId: ConnectProvider
20922158
responses:
20932159
'204':
@@ -2124,6 +2190,14 @@ components:
21242190
type: array
21252191
items:
21262192
$ref: '#/components/schemas/PatientTag'
2193+
ClinicSites:
2194+
type: array
2195+
items:
2196+
$ref: '#/components/schemas/ClinicSite'
2197+
ClinicSite:
2198+
$ref: ./clinic/models/clinicsite.v1.yaml
2199+
Site:
2200+
$ref: ./clinic/models/site.v1.yaml
21272201
DateTime:
21282202
$ref: ./common/models/datetime.v1.yaml
21292203
DataSource:
@@ -2195,6 +2269,8 @@ components:
21952269
minLength: 1
21962270
tags:
21972271
$ref: '#/components/schemas/PatientTagIds'
2272+
siteIds:
2273+
$ref: '#/components/schemas/SiteIds'
21982274
AssociateClinicianToUser:
21992275
title: Associate Clinician
22002276
type: object
@@ -2294,6 +2370,8 @@ components:
22942370
type: boolean
22952371
PatientTagIds:
22962372
$ref: ./clinic/models/patienttagids.v1.yaml
2373+
SiteIds:
2374+
$ref: ./clinic/models/siteids.v1.yaml
22972375
TideConfig:
22982376
$ref: ./clinic/models/tide/config.v1.yaml
22992377
TideFilters:
@@ -2575,6 +2653,13 @@ components:
25752653
schema:
25762654
type: string
25772655
pattern: '^[a-f0-9]{24}$'
2656+
siteId:
2657+
name: siteId
2658+
in: path
2659+
required: true
2660+
schema:
2661+
type: string
2662+
pattern: '^[a-f0-9]{24}$'
25782663
userId:
25792664
name: userId
25802665
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
@@ -60,6 +60,12 @@ properties:
6060
id: 502rliv0l2tyy
6161
description: Requests for each provider are listed in reverse chronological order
6262
readOnly: true
63+
sites:
64+
type: array
65+
nullable: true
66+
x-go-type-skip-optional-pointer: true
67+
items:
68+
$ref: "./site.v1.yaml"
6369
required:
6470
- id
6571
- fullName
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
type: 'object'
2+
title: 'Site'
3+
description: 'A clinic''s phyical 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+
readOnly: true
14+
15+
name:
16+
type: 'string'
17+
x-go-type-skip-optional-pointer: true
18+
description: 'The site description.'
19+
minLength: 1
20+
maxLength: 200
21+
pattern: '^[[:graph:]\p{L}\p{N}][[:graph:]\p{L}\p{N} ]*$'
22+
required:
23+
- id
24+
- 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)