diff --git a/paths/population_statistics.yaml b/paths/population_statistics.yaml index aaf5f30..7321507 100644 --- a/paths/population_statistics.yaml +++ b/paths/population_statistics.yaml @@ -6,6 +6,7 @@ get: description: |- Groups the patient population by any combination of age, preferred doctor, etc. and calculates the count of each category. parameters: + - $ref: '../zoo-api.yaml#/components/parameters/AgbSubject' - $ref: '../zoo-api.yaml#/components/parameters/RefDateDefaultToday' - name: groupByItems in: query diff --git a/paths/population_statistics_authorisation.yaml b/paths/population_statistics_authorisation.yaml index f2d987e..0fc6821 100644 --- a/paths/population_statistics_authorisation.yaml +++ b/paths/population_statistics_authorisation.yaml @@ -32,11 +32,10 @@ get: properties: item: $ref: ../schemas/StatisticsGroupBy-enum.yaml - enddate: - $ref: ../schemas/date.yaml + description: All possible enum values are always in the output. active: type: boolean - description: False if the end date is today or in the past. + description: True if authorised, otherwise false. caregroups: type: array items: diff --git a/paths/population_statistics_authorisation_{item}_caregroup_{tag}.yaml b/paths/population_statistics_authorisation_{item}_caregroup_{tag}.yaml index e3a4afa..67fca7d 100644 --- a/paths/population_statistics_authorisation_{item}_caregroup_{tag}.yaml +++ b/paths/population_statistics_authorisation_{item}_caregroup_{tag}.yaml @@ -15,17 +15,15 @@ post: in: path schema: $ref: '../schemas/tag.yaml' - - name: agb - in: query - schema: - $ref: '../schemas/agb.yaml' - description: AGB of the practice for which the authorisation should be set. This should match the JWT-authorisation. + - $ref: '../zoo-api.yaml#/components/parameters/AgbSubject' required: true - - name: enddate + description: AGB of the practice for which the authorisation should be set. This should match the JWT-authorisation. + - name: active in: query schema: - $ref: ../schemas/date.yaml - description: End date of the authorisation (exclusive). If omitted no end date is applied, or the end date is removed of an existing authorisation. Setting an end date to today or in past, effectively removes the authorisation. + type: boolean + required: true + description: True to set the authorisation, false to remove. - name: employee in: query schema: diff --git a/paths/population_statistics_authorisation_{item}_practice.yaml b/paths/population_statistics_authorisation_{item}_practice.yaml index 7aeea76..6f35581 100644 --- a/paths/population_statistics_authorisation_{item}_practice.yaml +++ b/paths/population_statistics_authorisation_{item}_practice.yaml @@ -11,17 +11,15 @@ post: schema: $ref: '../schemas/StatisticsGroupBy-enum.yaml' required: true - - name: agb - in: query - schema: - $ref: '../schemas/agb.yaml' - description: AGB of the practice for which the authorisation should be set. This should match the JWT-authorisation. + - $ref: '../zoo-api.yaml#/components/parameters/AgbSubject' required: true - - name: enddate + description: AGB of the practice for which the authorisation should be set. This should match the JWT-authorisation. + - name: active in: query schema: - $ref: ../schemas/date.yaml - description: End date of the authorisation (exclusive). If omitted no end date is applied, or the end date is removed of an existing authorisation. Setting an end date to today or in past, effectively removes the authorisation. + type: boolean + description: True to set the authorisation, false to remove. + required: true - name: employee in: query schema: diff --git a/paths/population_statistics_deprived_{neighborhood}.yaml b/paths/population_statistics_deprived_{neighborhood}.yaml index a38ed0f..9db6557 100644 --- a/paths/population_statistics_deprived_{neighborhood}.yaml +++ b/paths/population_statistics_deprived_{neighborhood}.yaml @@ -5,6 +5,7 @@ get: summary: Deprived neighborhood, patients description: The list of patients belonging to one of the categories, see `neighborhood` below. parameters: + - $ref: '../zoo-api.yaml#/components/parameters/AgbSubject' - $ref: '../zoo-api.yaml#/components/parameters/RefDateDefaultToday' - name: neighborhood in: path diff --git a/paths/population_statistics_groupByItems.yaml b/paths/population_statistics_groupByItems.yaml index 5e16aeb..3ba9145 100644 --- a/paths/population_statistics_groupByItems.yaml +++ b/paths/population_statistics_groupByItems.yaml @@ -4,10 +4,8 @@ get: operationId: groupByItems summary: Group-by items parameters: - - name: agb - in: query - schema: - $ref: ../schemas/agb.yaml + - $ref: '../zoo-api.yaml#/components/parameters/AgbSubject' + required: true responses: 200: description: |- diff --git a/zoo-api.yaml b/zoo-api.yaml index cee88cf..7d0a78c 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -133,6 +133,13 @@ components: required: false schema: $ref: schemas/agb.yaml + AgbSubject: + name: agb + in: query + schema: + $ref: schemas/agb.yaml + description: |- + The AGB of the practice for which the operation is executed. In other words: the subject of the operation. It is expected that the AGB is the same as the AGB of the logged in practice or one of the AGB's of the care group its practices. Pretty: name: pretty in: query