get: tags: - Population statistics operationId: populationStatistics summary: Get a population count 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/RefDateDefaultToday' - name: groupByItems in: query required: true schema: type: array minItems: 1 items: type: string enum: - age - preferredDoctor - insurer - gender description: |- Several items can be added to the group by using a comma separated list, e.g. `groupByItems=gender,age`. If an item is twice or more repeated the first occurrence is used. - name: insurer in: query required: false schema: type: array items: $ref: '../schemas/insurer-Uzovi.yaml' description: |- Supply zero, one or more Uzovis to limit the responses to certain insurer. Use 0 to select all patients without insurer registered. Supply the Uzovi code as an integer in a comma separated list, e.g. `insurer=101,211,3344`. - name: passerBy in: query required: false schema: type: boolean description: |- `true` to include passer-by patients. This also includes Medicom's noni patients. (Noni = niet op naam ingeschreven.) By default passer-by patients are excluded from the response. - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: 200: description: |- The response body is a JSON-array with for each group, defined by a sequence of `groupByItem` query parameters, an object with a count `n`. Only patients with an active registration on the reference date are included. When age is chosen as a category, only patients with a birthdate are included and only known ages are included in the response. The insurer is outputted as an Uzovi (with name and concern). The most recent Uzovi table is used to convert codes to names and concerns. If an Uzovi is missing in that table it is still added to the response, but without name and/or concern. The sequence of the items in the URL is the same as the sequence in the grouping of the output. content: application/json: schema: type: object properties: cohorts: type: array items: type: object properties: age: type: integer minimum: 0 format: int32 example: 42 preferredDoctor: $ref: '../schemas/PatIdentity.yaml#/doctor' insurer: type: object properties: uzovi: $ref: '../schemas/insurer-Uzovi.yaml' name: type: string description: |- The name of the insurer according the [Vektis register](https://www.vektis.nl/uzovi-register). If the Uzovi is unknown, the Uzovi code is used as the name. The latest register is used to lookup the name for the code. example: FBTO Zorgverzekeringen N.V. concern: type: string description: The concern name, if any, otherwise the empty string. example: ACHMEA valid: type: boolean description: True if the insurer can be validated using the Uzovi table on the reference date. gender: $ref: '../schemas/PatIdentity.yaml#/gender' n: type: integer format: int32 description: "The number of unique patients in the group." example: 7 400: description: "Common HTTP semantics, see the response body." 401: $ref: '../zoo-api.yaml#/components/responses/JwtFailure' 403: description: "Indicated practice is known but has not authorized ZOO to share this information with signer." 404: $ref: '../zoo-api.yaml#/components/responses/PatNotFound'