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
144 changes: 140 additions & 4 deletions reference/clinic.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,16 @@
description: Comma-separated list of patient tag IDs
style: form
explode: false
- name: sites
schema:
type: array
items:
type: string
format: '^[a-f0-9]{24}$'
in: query
description: Comma-separated list of clinic site IDs
style: form
explode: false
description: Retrieve a list of patients of a clinic
post:
summary: Create Patient Account
Expand Down Expand Up @@ -935,7 +945,11 @@
operationId: CreatePatientTag
responses:
'200':
description: OK
description: The newly-created patient tag
content:
application/json:
schema:
$ref: ./clinic/models/patientTag.v1.yaml
description: Create a new patient tag
requestBody:
content:
Expand All @@ -944,6 +958,80 @@
$ref: '#/components/schemas/patientTag.v1'
tags:
- Clinics
'/v1/clinics/{clinicId}/sites':
parameters:
- $ref: '#/components/parameters/clinicId'
post:
summary: Create a Site
operationId: CreateSite
responses:
'200':
description: The newly-created clinic site
content:
application/json:
schema:
$ref: ./clinic/models/site.v1.yaml
description: Create a Site
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/siteCreation.v1'
tags:
- Clinics
'/v1/clinics/{clinicId}/sites/{siteId}':
parameters:
- $ref: '#/components/parameters/clinicId'
- $ref: '#/components/parameters/siteId'
put:
summary: Update a Site
operationId: UpdateSite
responses:
'200':
description: The updated clinic site
content:
application/json:
schema:
$ref: ./clinic/models/site.v1.yaml
description: Update a Site
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/site.v1'
tags:
- Clinics
delete:
summary: Delete a Site
operationId: DeleteSite
responses:
'204':
description: No content
description: 'Delete a Site'
tags:
- Clinics
'/v1/clinics/{clinicId}/sites/{siteId}/merge':
parameters:
- $ref: '#/components/parameters/clinicId'
- $ref: '#/components/parameters/siteId'
post:
summary: Merge two sites
operationId: MergeSite
responses:
'200':
description: The merged clinic site
content:
application/json:
schema:
$ref: ./clinic/models/site.v1.yaml
description: Merge a site, identified in the request body, into the site identified in the URL.
requestBody:
content:
application/json:
schema:
$ref: ./clinic/models/siteById.v1.yaml
tags:
- Clinics
'/v1/clinics/{clinicId}/clinicians/{clinicianId}':
parameters:
- $ref: '#/components/parameters/clinicId'
Expand Down Expand Up @@ -1055,7 +1143,11 @@
operationId: UpdatePatientTag
responses:
'200':
description: OK
description: The updated patient tag
content:
application/json:
schema:
$ref: ./clinic/models/patientTag.v1.yaml
description: Update existing patient tag
tags:
- Clinics
Expand All @@ -1068,11 +1160,30 @@
summary: Delete Patient Tag
operationId: DeletePatientTag
responses:
'200':
description: OK
'204':
description: No content
description: Removes a patient tag from a clinic and tagged patients
tags:
- Clinics
'/v1/clinics/{clinicId}/patient_tags/{patientTagId}/site':
parameters:
- $ref: '#/components/parameters/clinicId'
- $ref: '#/components/parameters/patientTagId'
post:
summary: Convert Patient Tag to Site
operationId: ConvertPatientTagToSite
responses:
'200':
description: The newly converted site.
content:
application/json:
schema:
$ref: ./clinic/models/site.v1.yaml
'409':
description: Cannot convert the tag to a site. This could occur for example when the maximum number of sites has already been reached.
description: Convert a patient tag to a site.
tags:
- Clinics
'/v1/clinics/{clinicId}/invites/clinicians':
parameters:
- $ref: '#/components/parameters/clinicId'
Expand Down Expand Up @@ -1996,7 +2107,7 @@

https://sandbox.xealth.io/app/api-docs#tag/Digital-Care/paths/preorder/post
/v1/xealth/programs:
put:

Check warning on line 2110 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
summary: Get Programs
operationId: XealthGetPrograms
responses:
Expand All @@ -2013,7 +2124,7 @@
responses:
'200':
description: OK
description: ''

Check warning on line 2127 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
tags:
- Clinics
- Internal
Expand All @@ -2025,7 +2136,7 @@
responses:
'200':
description: OK
description: ''

Check warning on line 2139 in reference/clinic.v1.yaml

View workflow job for this annotation

GitHub Actions / check / check (check_specs)

operation-description Operation "description" must be present and non-empty string.
tags:
- Clinics
- Internal
Expand Down Expand Up @@ -2167,6 +2278,10 @@
type: array
items:
$ref: ./clinic/models/dataSource.v1.yaml
site.v1:
$ref: ./clinic/models/site.v1.yaml
siteCreation.v1:
$ref: ./clinic/models/siteCreation.v1.yaml
tidepoolUserIds.v1:
type: array
nullable: true
Expand Down Expand Up @@ -2218,6 +2333,13 @@
minLength: 1
tags:
$ref: ./clinic/models/patientTagIds.v1.yaml
sites:
type: array
x-go-type-skip-optional-pointer: true
x-omitempty: false
x-omitzero: true
items:
$ref: ./clinic/models/site.v1.yaml
associateClinicianToUser.v1:
title: Associate Clinician
type: object
Expand Down Expand Up @@ -2409,6 +2531,13 @@
minLength: 1
tags:
$ref: ./clinic/models/patientTagIds.v1.yaml
sites:
type: array
x-go-type-skip-optional-pointer: true
x-omitempty: false
x-omitzero: true
items:
$ref: ./clinic/models/site.v1.yaml
addServiceAccount.v1:
title: AddServiceAccount
x-stoplight:
Expand Down Expand Up @@ -2530,6 +2659,13 @@
schema:
type: string
pattern: '^[a-f0-9]{24}$'
siteId:
name: siteId
in: path
required: true
schema:
type: string
pattern: '^[a-f0-9]{24}$'
userId:
name: userId
in: path
Expand Down
5 changes: 5 additions & 0 deletions reference/clinic/models/clinic.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ properties:
type: array
items:
$ref: ./patientTag.v1.yaml
sites:
type: array
x-go-type-skip-optional-pointer: true
items:
$ref: ./site.v1.yaml
lastDeletedPatientTag:
$ref: ./patientTag.v1.yaml
phoneNumbers:
Expand Down
7 changes: 7 additions & 0 deletions reference/clinic/models/patient.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ properties:
id: 502rliv0l2tyy
description: Requests for each provider are listed in reverse chronological order
readOnly: true
sites:
type: array
x-go-type-skip-optional-pointer: true
x-omitempty: false
x-omitzero: true
items:
$ref: ./site.v1.yaml
required:
- id
- fullName
Expand Down
22 changes: 22 additions & 0 deletions reference/clinic/models/site.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
title: Site
description: "A clinic's physical or logical location."
properties:
id:
title: Object Id
type: string
x-go-type-skip-optional-pointer: true
description: String representation of a resource id
minLength: 24
maxLength: 24
pattern: '^[a-f0-9]{24}$'
name:
type: string
x-go-type-skip-optional-pointer: true
description: The site description.
minLength: 1
maxLength: 200
pattern: '^[[:graph:]\p{L}\p{N}][[:graph:]\p{L}\p{N} ]*$'
required:
- id
- name
8 changes: 8 additions & 0 deletions reference/clinic/models/siteById.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: object
title: SiteById
description: "A clinic's physical or logical location—id only."
properties:
id:
$ref: ../../../reference/common/models/objectid.v1.yaml
required:
- id
13 changes: 13 additions & 0 deletions reference/clinic/models/siteCreation.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: object
title: Site
description: "A clinic's physical or logical location."
properties:
name:
type: string
x-go-type-skip-optional-pointer: true
description: The site description.
minLength: 1
maxLength: 200
pattern: '^[[:graph:]\p{L}\p{N}][[:graph:]\p{L}\p{N} ]*$'
required:
- name
9 changes: 9 additions & 0 deletions reference/clinic/models/siteId.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Site ID
description: >-
Site identifier.
type: string
minLength: 24
maxLength: 24
pattern: '^[a-f0-9]{24}$'
readOnly: true
example: 2fe2488217ee43e1b2e83c2f
13 changes: 13 additions & 0 deletions reference/clinic/models/siteIds.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: array
title: Site ID List
uniqueItems: true
nullable: true
items:
title: Site ID
description: >-
Site identifier.
type: string
minLength: 24
maxLength: 24
pattern: '^[a-f0-9]{24}$'
readOnly: true
7 changes: 7 additions & 0 deletions reference/clinic/parameters/siteId.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: >-
Site ID
name: siteId
in: path
required: true
schema:
$ref: '../models/siteid.v1.yaml'
Loading