From b04ce9ab9c66938b365fe986e739e62d68a7fe7b Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Mon, 10 Nov 2025 14:34:20 -0700 Subject: [PATCH] add the includeCounts query parameter to Get Clinic When present, the count of patients associated with each site or patient_tag will be added to the clinic object that's returned. BACK-3797 --- reference/clinic.v1.yaml | 12 +++++++++++- reference/clinic/models/patientTag.v1.yaml | 4 ++++ reference/clinic/models/site.v1.yaml | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/reference/clinic.v1.yaml b/reference/clinic.v1.yaml index 3ad43816..baa232f2 100644 --- a/reference/clinic.v1.yaml +++ b/reference/clinic.v1.yaml @@ -149,7 +149,17 @@ paths: - TIDEPOOL_ADMIN - CLINIC_ADMIN - CLINIC_CLINICIAN - parameters: [] + parameters: + - name: includeCounts + in: query + description: | + Include counts of patients in tags and sites. + + This will add the optional "patients" field to the + clinic's sites and patient_tags fields which will indicate + the number of patients associated with each. + schema: + type: boolean put: summary: Update Clinic operationId: UpdateClinic diff --git a/reference/clinic/models/patientTag.v1.yaml b/reference/clinic/models/patientTag.v1.yaml index 62efa385..a803f8db 100644 --- a/reference/clinic/models/patientTag.v1.yaml +++ b/reference/clinic/models/patientTag.v1.yaml @@ -10,6 +10,10 @@ properties: minLength: 1 maxLength: 20 pattern: '^[\p{L}\p{N}_+><-]{1}[\p{L}\p{N}\s_+><-]*$' + patients: + type: integer + description: The number of patients tagged. + x-go-type-skip-optional-pointer: true required: - id - name diff --git a/reference/clinic/models/site.v1.yaml b/reference/clinic/models/site.v1.yaml index bc5f0227..7575a625 100644 --- a/reference/clinic/models/site.v1.yaml +++ b/reference/clinic/models/site.v1.yaml @@ -6,6 +6,10 @@ properties: $ref: ./siteId.v1.yaml name: $ref: ./siteName.v1.yaml + patients: + type: integer + description: The number of patients associated with the site. + x-go-type-skip-optional-pointer: true required: - id - name