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: - name: referenceDate in: query required: true schema: type: "string" pattern: "\\d\\d\\d\\d-\\d\\d-\\d\\d" format: "date" description: ISO formatted date example: 2015-12-15 - name: groupByItems in: query required: true style: form explode: false schema: 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 style: form explode: false required: false schema: $ref: ../schemas/insurer-Uzovi.yaml description: "Supply zero, one or more Uzovi's 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: array items: type: object properties: age: type: number example: 42 preferredDoctor: $ref: '../schemas/PatIdentity.yaml#/doctor' insurer: $ref: '../schemas/PatIdentity.yaml#/insurer' gender: $ref: '../schemas/PatIdentity.yaml#/gender' n: type: number 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'