From 28ba5a5b2c7096980174259102f93a6af7be6b83 Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Tue, 11 Nov 2025 14:29:39 -0700 Subject: [PATCH 1/2] add endpionts to list clinic sites and patient tags These endpoints include additional information not found in the get clinic endpoint, specifically counts of the number of patients associated with each site or patient tag. BACK-3797 --- reference/clinic.v1.yaml | 28 +++++++++++++++++++ .../clinic/models/patientTagDetail.v1.yaml | 7 +++++ reference/clinic/models/siteDetail.v1.yaml | 7 +++++ 3 files changed, 42 insertions(+) create mode 100644 reference/clinic/models/patientTagDetail.v1.yaml create mode 100644 reference/clinic/models/siteDetail.v1.yaml diff --git a/reference/clinic.v1.yaml b/reference/clinic.v1.yaml index 3ad43816..c7936d91 100644 --- a/reference/clinic.v1.yaml +++ b/reference/clinic.v1.yaml @@ -992,6 +992,20 @@ paths: '/v1/clinics/{clinicId}/patient_tags': parameters: - $ref: '#/components/parameters/clinicId' + get: + summary: List Patient Tags + operationId: ListClinicPatientTags + responses: + '200': + description: The clinic's patient tags. + content: + application/json: + schema: + type: array + items: + $ref: ./clinic/models/patientTagDetail.v1.yaml + tags: + - Clinics post: summary: Create Patient Tag operationId: CreatePatientTag @@ -1013,6 +1027,20 @@ paths: '/v1/clinics/{clinicId}/sites': parameters: - $ref: '#/components/parameters/clinicId' + get: + summary: List Clinic Sites + operationId: ListClinicSites + responses: + '200': + description: The clinic's sites. + content: + application/json: + schema: + type: array + items: + $ref: ./clinic/models/siteDetail.v1.yaml + tags: + - Clinics post: summary: Create a Site operationId: CreateSite diff --git a/reference/clinic/models/patientTagDetail.v1.yaml b/reference/clinic/models/patientTagDetail.v1.yaml new file mode 100644 index 00000000..ccbc4087 --- /dev/null +++ b/reference/clinic/models/patientTagDetail.v1.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: ./patientTag.v1.yaml + - type: object + properties: + patients: + type: integer + x-go-type-skip-optional-pointer: true diff --git a/reference/clinic/models/siteDetail.v1.yaml b/reference/clinic/models/siteDetail.v1.yaml new file mode 100644 index 00000000..cd653146 --- /dev/null +++ b/reference/clinic/models/siteDetail.v1.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: ./site.v1.yaml + - type: object + properties: + patients: + type: integer + x-go-type-skip-optional-pointer: true From 22f4f0fb414c9559dd51581745e6a8a69536fa7b Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Thu, 20 Nov 2025 10:02:06 -0700 Subject: [PATCH 2/2] WIP use patient_counts endpoints --- reference/clinic.v1.yaml | 48 +++++++++++-------- ...aml => patientTagWithPatientCount.v1.yaml} | 2 + ...l.v1.yaml => siteWithPatientCount.v1.yaml} | 2 + 3 files changed, 32 insertions(+), 20 deletions(-) rename reference/clinic/models/{patientTagDetail.v1.yaml => patientTagWithPatientCount.v1.yaml} (83%) rename reference/clinic/models/{siteDetail.v1.yaml => siteWithPatientCount.v1.yaml} (82%) diff --git a/reference/clinic.v1.yaml b/reference/clinic.v1.yaml index c7936d91..f47c650c 100644 --- a/reference/clinic.v1.yaml +++ b/reference/clinic.v1.yaml @@ -989,23 +989,45 @@ paths: $ref: ./clinic/models/patient.v1.yaml tags: - Clinics - '/v1/clinics/{clinicId}/patient_tags': + '/v1/clinics/{clinicId}/patient_counts/patient_tags': + parameters: + - $ref: '#/components/parameters/clinicId' + get: + summary: List A Clinic's Patient Tags With Patient Counts + operationId: ListClinicPatientTagsWithPatientCounts + responses: + '200': + description: | + A summary of the clinic's patient tags with patient counts. + content: + application/json: + schema: + type: array + items: + $ref: ./clinic/models/patientTagWithPatientCount.v1.yaml + tags: + - Clinics + '/v1/clinics/{clinicId}/patient_counts/sites': parameters: - $ref: '#/components/parameters/clinicId' get: - summary: List Patient Tags - operationId: ListClinicPatientTags + summary: List A Clinic's Sites With Patient Counts + operationId: ListClinicSitesWithPatientCounts responses: '200': - description: The clinic's patient tags. + description: | + A summary of the clinic's sites with patient counts. content: application/json: schema: type: array items: - $ref: ./clinic/models/patientTagDetail.v1.yaml + $ref: ./clinic/models/siteWithPatientCount.v1.yaml tags: - Clinics + '/v1/clinics/{clinicId}/patient_tags': + parameters: + - $ref: '#/components/parameters/clinicId' post: summary: Create Patient Tag operationId: CreatePatientTag @@ -1027,20 +1049,6 @@ paths: '/v1/clinics/{clinicId}/sites': parameters: - $ref: '#/components/parameters/clinicId' - get: - summary: List Clinic Sites - operationId: ListClinicSites - responses: - '200': - description: The clinic's sites. - content: - application/json: - schema: - type: array - items: - $ref: ./clinic/models/siteDetail.v1.yaml - tags: - - Clinics post: summary: Create a Site operationId: CreateSite @@ -1095,7 +1103,7 @@ paths: - $ref: '#/components/parameters/clinicId' - $ref: '#/components/parameters/siteId' post: - summary: Merge two sites + summary: Merge Two Sites operationId: MergeSite responses: '200': diff --git a/reference/clinic/models/patientTagDetail.v1.yaml b/reference/clinic/models/patientTagWithPatientCount.v1.yaml similarity index 83% rename from reference/clinic/models/patientTagDetail.v1.yaml rename to reference/clinic/models/patientTagWithPatientCount.v1.yaml index ccbc4087..fde6b2ec 100644 --- a/reference/clinic/models/patientTagDetail.v1.yaml +++ b/reference/clinic/models/patientTagWithPatientCount.v1.yaml @@ -5,3 +5,5 @@ allOf: patients: type: integer x-go-type-skip-optional-pointer: true + required: + - patients diff --git a/reference/clinic/models/siteDetail.v1.yaml b/reference/clinic/models/siteWithPatientCount.v1.yaml similarity index 82% rename from reference/clinic/models/siteDetail.v1.yaml rename to reference/clinic/models/siteWithPatientCount.v1.yaml index cd653146..fda72eab 100644 --- a/reference/clinic/models/siteDetail.v1.yaml +++ b/reference/clinic/models/siteWithPatientCount.v1.yaml @@ -5,3 +5,5 @@ allOf: patients: type: integer x-go-type-skip-optional-pointer: true + required: + - patients