diff --git a/paths/population_statistics.yaml b/paths/population_statistics.yaml index 088f457..1f6a2f4 100644 --- a/paths/population_statistics.yaml +++ b/paths/population_statistics.yaml @@ -43,7 +43,11 @@ get: 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. + 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 therefore 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: diff --git a/paths/population_statistics_deprived.yaml b/paths/population_statistics_deprived.yaml index bef7d68..47b1050 100644 --- a/paths/population_statistics_deprived.yaml +++ b/paths/population_statistics_deprived.yaml @@ -6,7 +6,6 @@ get: description: A simple report with a count of all patients living in a deprived neighborhood or regular one based on the well-known postcode table. parameters: - $ref: '../zoo-api.yaml#/components/parameters/RefDateDefaultToday' - - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: 200: description: |- @@ -14,7 +13,6 @@ get: * Known to live in a deprived neighborhood * known to live in a regular neighborhood * Status of neighborhood unknown (for example, because living address of patient is not known or deprived status of that location is not known). - content: application/json: schema: diff --git a/paths/population_statistics_deprived_{neighborhood}.yaml b/paths/population_statistics_deprived_{neighborhood}.yaml new file mode 100644 index 0000000..4f1a332 --- /dev/null +++ b/paths/population_statistics_deprived_{neighborhood}.yaml @@ -0,0 +1,74 @@ +get: + tags: + - Population statistics + operationId: populationStatisticsDeprivedNeighborhoodPatients + 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/RefDateDefaultToday' + - name: neighborhood + in: path + schema: + type: string + enum: + - deprived + - regular + - unknown + example: deprived + description: The neighborhood is derived from the postcode. If the postcode is not valid, e.g. not in the regular language defined by `[0-9]{4}\s*[a-zA-Z][a-zA-Z]`, then the neighborhood is 'unknown', otherwise the neighborhood is 'deprived' or 'regular'. The difference between the latter is based on national tables. + - name: pii + in: query + example: true + description: If false, limits the response to only id's. + schema: + type: boolean + default: false + responses: + 200: + description: Returns the list of all patients from of the supplied category. + content: + application/json: + schema: + type: array + items: + type: object + required: + - category + - doctor + - patid + - patUnid + - feats + properties: + bsn: + $ref: '../schemas/PatIdentity.yaml#/bsn' + name: + $ref: '../schemas/PatIdentity.yaml#/name' + gender: + $ref: '../schemas/PatIdentity.yaml#/gender' + dob: + $ref: '../schemas/PatIdentity.yaml#/dob' + category: + $ref: '../schemas/PatIdentity.yaml#/category' + doctor: + $ref: '../schemas/PatIdentity.yaml#/doctor' + address: + $ref: '../schemas/PatIdentity.yaml#/address' + contact: + $ref: '../schemas/PatIdentity.yaml#/contact' + insurance: + $ref: '../schemas/PatIdentity.yaml#/insurance' + patid: + $ref: '../schemas/PatIdentity.yaml#/patid' + patUnid: + $ref: '../schemas/PatIdentity.yaml#/patUnid' + startDate: + $ref: '../schemas/date.yaml' + 400: + $ref: '../zoo-api.yaml#/components/responses/ReqFailure' + 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/zoo-api.yaml b/zoo-api.yaml index 4e08814..9dc6a96 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -57,6 +57,8 @@ paths: $ref: 'paths/population_statistics_groupByItems.yaml' /population/statistics/deprivedNeighborhood: $ref: 'paths/population_statistics_deprived.yaml' + /population/statistics/deprivedNeighborhood/{neighborhood}: + $ref: 'paths/population_statistics_deprived_{neighborhood}.yaml' /population/statistics/employeeFeat: $ref: 'paths/population_statistics_employeeFeat.yaml' /population/frequentUser/count: