From 68999a6a36ec3acf5804cad1e945eaed37e4adb4 Mon Sep 17 00:00:00 2001 From: Eric Hoekstra Date: Tue, 9 Apr 2024 15:42:10 +0200 Subject: [PATCH] [api] Added deprived neighborhood statistics. --- paths/population_statistics.yaml | 1 - paths/population_statistics_deprived.yaml | 46 +++++++++++++++++++++++ schemas/PatIdentity.yaml | 3 ++ zoo-api.yaml | 2 + 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 paths/population_statistics_deprived.yaml diff --git a/paths/population_statistics.yaml b/paths/population_statistics.yaml index c974808..4a7d68e 100644 --- a/paths/population_statistics.yaml +++ b/paths/population_statistics.yaml @@ -29,7 +29,6 @@ get: - preferredDoctor - insurer - gender - - deprivedNeighborhood 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 occurance is used. Only known ages are outputted. 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. The sequence of the items in the URL is the same as the sequence in the grouping of the output." - name: insurer in: query diff --git a/paths/population_statistics_deprived.yaml b/paths/population_statistics_deprived.yaml new file mode 100644 index 0000000..6729f2a --- /dev/null +++ b/paths/population_statistics_deprived.yaml @@ -0,0 +1,46 @@ +get: + tags: + - population + operationId: "populationStatisticsDeprivedNeighborhood" + summary: "Get a deprived neighborhood versus regular count." + description: |- + Patients who are no longer registrered are excluded, so only patients with an active registration are included. Passer-by and NONI-patients are excluded. Patients without birthdate are excluded (rare). + 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 + - $ref: '../zoo-api.yaml#/components/parameters/Authorization' + responses: + 200: + description: "The response body is a JSON-array with exactly two objects." + content: + application/json: + schema: + type: array + items: + oneOf: + - type: object + properties: + deprivedNeighborhood: + type: number + example: 42 + - type: object + properties: + regularNeighborhood: + type: number + example: 256 + 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' + diff --git a/schemas/PatIdentity.yaml b/schemas/PatIdentity.yaml index 577ada7..e9e5be8 100644 --- a/schemas/PatIdentity.yaml +++ b/schemas/PatIdentity.yaml @@ -125,6 +125,9 @@ insurer: 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." patid: $ref: 'pat-patId.yaml' pat_unid: diff --git a/zoo-api.yaml b/zoo-api.yaml index 6f7baf0..b64911a 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -49,6 +49,8 @@ paths: $ref: 'paths/patient_base.yaml' /population/statistics: $ref: 'paths/population_statistics.yaml' + /population/statistics/deprivedNeighborhood: + $ref: 'paths/population_statistics_deprived.yaml' /qoc/careprogram: $ref: 'paths/qoc_careprogram.yaml' /qoc/careprogram/{careprogramKey}/fave: