From a57f7f4c4ee00f2c3989676eed8dc1d79a1b216c Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 1 Apr 2024 20:24:16 +0200 Subject: [PATCH] [qoc] group and indicatorset parameter no longer mandatory where sane defaults exist --- ...or_{setKey}_{indicatorKey}_practices.yaml} | 7 +++-- ....yaml => qoc_participating-practices.yaml} | 28 +++++++++---------- schemas/IndicatorParticipants.yaml | 2 +- zoo-api.yaml | 8 +++--- 4 files changed, 22 insertions(+), 23 deletions(-) rename paths/{qoc_indicator_{setKey}_{indicatorKey}_practices_{group}.yaml => qoc_indicator_{setKey}_{indicatorKey}_practices.yaml} (91%) rename paths/{qoc_participating-practices_{group}_{setKey}.yaml => qoc_participating-practices.yaml} (88%) diff --git a/paths/qoc_indicator_{setKey}_{indicatorKey}_practices_{group}.yaml b/paths/qoc_indicator_{setKey}_{indicatorKey}_practices.yaml similarity index 91% rename from paths/qoc_indicator_{setKey}_{indicatorKey}_practices_{group}.yaml rename to paths/qoc_indicator_{setKey}_{indicatorKey}_practices.yaml index d3ac9d7..b427c52 100644 --- a/paths/qoc_indicator_{setKey}_{indicatorKey}_practices_{group}.yaml +++ b/paths/qoc_indicator_{setKey}_{indicatorKey}_practices.yaml @@ -13,13 +13,14 @@ get: - name: indicatorKey in: path description: The key as listed in the indicatorset. + required: true schema: type: string example: ZOO-dm2-hb-3 - name: group - in: path - description: The key as listed in the `list-groups` endpoint. - required: true + in: query + description: The key as listed in the `list-groups` endpoint. Defaults to the only allowed group if the authentication party only has one; otherwise required. + required: false schema: type: string example: hwf diff --git a/paths/qoc_participating-practices_{group}_{setKey}.yaml b/paths/qoc_participating-practices.yaml similarity index 88% rename from paths/qoc_participating-practices_{group}_{setKey}.yaml rename to paths/qoc_participating-practices.yaml index bfe4b0b..561ab3e 100644 --- a/paths/qoc_participating-practices_{group}_{setKey}.yaml +++ b/paths/qoc_participating-practices.yaml @@ -3,20 +3,20 @@ get: - Quality of Care summary: Show each participating GP practice as well as the status of their data for a given indicator report and a given group. parameters: - - name: group - in: path - description: The key as listed in the `list-groups` endpoint. - required: true - schema: - type: string - example: hwf - name: setKey - in: path - description: The key as listed in the `CareProgram` schema. - required: true + in: query + description: The key as listed in the `CareProgram` schema. If omitted, information about participating in a specific care program will not be provided. + required: false schema: type: string example: ZEL-dm + - name: group + in: query + description: The key as listed in the `list-groups` endpoint. Defaults to the only allowed group if the authentication party only has one; otherwise required. + required: false + schema: + type: string + example: hwf - name: refDate in: query description: |- @@ -36,7 +36,7 @@ get: type: object properties: group: - description: Repeats the `group` parameter. + description: The chosen group (repeats `group` parameter if present, otherwise, the group defaulted to for authenticating user). type: string example: hwf calculatedAt: @@ -51,11 +51,11 @@ get: format: date example: 2023-04-01 key: - description: Repeats the `setKey` parameter. + description: Repeats the `setKey` parameter, if present. type: string example: ZOO-dm title: - description: The title of the requested indicator set. + description: The title of the requested indicator set, if `setKey` was present. type: string example: Diabetes Mellitus type 2 participants: @@ -101,8 +101,6 @@ get: required: - group - refDate - - key - - title - participants '401': $ref: '../zoo-api.yaml/#/components/responses/NoAuth' diff --git a/schemas/IndicatorParticipants.yaml b/schemas/IndicatorParticipants.yaml index d933925..8729fe8 100644 --- a/schemas/IndicatorParticipants.yaml +++ b/schemas/IndicatorParticipants.yaml @@ -3,7 +3,7 @@ description: |- type: object properties: group: - description: Repeats the `group` parameter. + description: The chosen group (repeats `group` parameter if present, otherwise, the group defaulted to for authenticating user). type: string example: hwf key: diff --git a/zoo-api.yaml b/zoo-api.yaml index 9515133..68a0b2d 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -52,12 +52,12 @@ paths: $ref: 'paths/qoc_indicatorset_{setKey}.yaml' /qoc/indicator/{setKey}/{indicatorKey}/patients: $ref: 'paths/qoc_indicator_{setKey}_{indicatorKey}_patients.yaml' - /qoc/indicator/{setKey}/{indicatorKey}/practices/{group}: - $ref: 'paths/qoc_indicator_{setKey}_{indicatorKey}_practices_{group}.yaml' + /qoc/indicator/{setKey}/{indicatorKey}/practices: + $ref: 'paths/qoc_indicator_{setKey}_{indicatorKey}_practices.yaml' /qoc/list-groups: $ref: 'paths/qoc_list-groups.yaml' - /qoc/participating-practices/{group}/{setKey}: - $ref: 'paths/qoc_participating-practices_{group}_{setKey}.yaml' + /qoc/participating-practices: + $ref: 'paths/qoc_participating-practices.yaml' components: parameters: Authorization: