From e088891bac52179f122c7b851696c38a4252ac43 Mon Sep 17 00:00:00 2001 From: Eric Hoekstra Date: Fri, 11 Oct 2024 13:31:19 +0200 Subject: [PATCH 1/2] Customer basic info GET improved and POST added. --- ...r_basic.yaml => customer_basic_{agb}.yaml} | 52 +++++++++++++++++-- paths/customer_gpisType.yaml | 25 +++++++++ schemas/GPIS.yaml | 4 +- schemas/gpisType.yaml | 13 +++++ zoo-api.yaml | 6 ++- 5 files changed, 92 insertions(+), 8 deletions(-) rename paths/{customer_basic.yaml => customer_basic_{agb}.yaml} (63%) create mode 100644 paths/customer_gpisType.yaml create mode 100644 schemas/gpisType.yaml diff --git a/paths/customer_basic.yaml b/paths/customer_basic_{agb}.yaml similarity index 63% rename from paths/customer_basic.yaml rename to paths/customer_basic_{agb}.yaml index cf91a8b..b0a69fa 100644 --- a/paths/customer_basic.yaml +++ b/paths/customer_basic_{agb}.yaml @@ -1,11 +1,11 @@ get: - operationId: customerBasic + operationId: customerBasicGet tags: - Customer management summary: Basic info parameters: - name: agb - in: query + in: path description: AGB of the practice which is known as Zorg op Orde customer (via a care group). schema: $ref: ../schemas/agb.yaml @@ -30,6 +30,9 @@ get: institutionAgb: description: The AGB of the institution, if the customer is a care group or other institute, otherwise omitted. One of practiceAgb or institutionAgb is always present. $ref: ../schemas/agb.yaml + setGpisType: + description: The intended GPIS type. This may differ from the actual import in the `gpis` property. Especially if the GPIS type is newly changed. + type: string gpis: $ref: ../schemas/GPIS.yaml doctors: @@ -81,4 +84,47 @@ get: '401': $ref: '../zoo-api.yaml/#/components/responses/NoAuth' '403': - $ref: '../zoo-api.yaml/#/components/responses/NoAccess' \ No newline at end of file + $ref: '../zoo-api.yaml/#/components/responses/NoAccess' +post: + operationId: customerBasicPost + tags: + - Customer management + summary: Basic info + description: Only certain properties of a practice can be updated. After updating the same response is outputted as when using GET. + parameters: + - name: agb + in: path + description: AGB of the practice which is known as Zorg op Orde customer (via a care group). + schema: + $ref: ../schemas/agb.yaml + requestBody: + description: |- + When authorized as a care group the GPIS type can be changed. As a practice the address and + contact data can be changed. This request cannot be used to remove or set any of these properties empty. + content: + 'application/x-www-form-urlencoded': + schema: + oneOf: + - type: object + properties: + gpisType: + $ref: '../schemas/gpisType.yaml' + - type: object + properties: + address1: + type: string + description: The first line of the practice postal address (street name and house number, generally). + postcode: + description: Any valid Dutch postcode, with or without whitespacing and in lower- or uppercase. + $ref: ../schemas/postcode.yaml + city: + $ref: ../schemas/city.yaml + tel: + description: A Dutch phone number of 10 digits. Additional dashes and spacing are removed before validating. + type: string + email: + type: string + format: email + responses: + $ref: '#/get/responses' + \ No newline at end of file diff --git a/paths/customer_gpisType.yaml b/paths/customer_gpisType.yaml new file mode 100644 index 0000000..e18ba06 --- /dev/null +++ b/paths/customer_gpisType.yaml @@ -0,0 +1,25 @@ +get: + operationId: customerGpisType + tags: + - Customer management + summary: GPIS types + description: Names used for identifying GPIS's (or EDP's) in this API. + responses: + '200': + description: Names of GPIS's (or EDP's) as recognized by Zorg op Orde. + content: + application/json: + schema: + type: array + items: + type: object + properties: + gpisType: + $ref: ../schemas/gpisType.yaml + "description": + type: string + example: "Een innovatief HIS and NIS." + '401': + $ref: '../zoo-api.yaml/#/components/responses/NoAuth' + '403': + $ref: '../zoo-api.yaml/#/components/responses/NoAccess' diff --git a/schemas/GPIS.yaml b/schemas/GPIS.yaml index 9d9095d..d8629e5 100644 --- a/schemas/GPIS.yaml +++ b/schemas/GPIS.yaml @@ -3,9 +3,7 @@ description: |- type: object properties: gpisType: - description: The type of GP Information System - type: string - example: Tetrapod + $ref: gpisType.yaml timestamp: description: |- The report is based on dossier data as it was on this timestamp; due to inaccuracies by GP information systems that source the data, diff --git a/schemas/gpisType.yaml b/schemas/gpisType.yaml new file mode 100644 index 0000000..c90eed6 --- /dev/null +++ b/schemas/gpisType.yaml @@ -0,0 +1,13 @@ +type: string +description: |- + Type brand (or type) of the general practitioner information system (EDP). Query the `/customer/gpisType` end point for a list of all brands. +enum: + - healthconnected + - medicom + - scipio + - microhis + - promedico + - tetra + - sanday + - microhis + - medikit diff --git a/zoo-api.yaml b/zoo-api.yaml index b7522af..e6c6e52 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -89,8 +89,10 @@ paths: $ref: 'paths/customer_careprogram.yaml' /customer/careprogram/periodEnd: $ref: 'paths/customer_careprogram_periodEnd.yaml' - /customer/basic: - $ref: 'paths/customer_basic.yaml' + /customer/basic/{agb}: + $ref: 'paths/customer_basic_{agb}.yaml' + /customer/gpisType: + $ref: 'paths/customer_gpisType.yaml' /exports/available: $ref: 'paths/exports_available.yaml' /exports/{agb}/{filename}: From 287794204c6360c5d3ad692f9f28ef27d90d2224 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 17 Oct 2024 05:35:22 +0200 Subject: [PATCH 2/2] [subscription] Reflect updates to subscription API for `customer/basic`. --- ...r_basic_{agb}.yaml => customer_basic.yaml} | 60 +++++++++---------- paths/customer_gpisType.yaml | 25 -------- zoo-api.yaml | 6 +- 3 files changed, 31 insertions(+), 60 deletions(-) rename paths/{customer_basic_{agb}.yaml => customer_basic.yaml} (70%) delete mode 100644 paths/customer_gpisType.yaml diff --git a/paths/customer_basic_{agb}.yaml b/paths/customer_basic.yaml similarity index 70% rename from paths/customer_basic_{agb}.yaml rename to paths/customer_basic.yaml index b0a69fa..3162a08 100644 --- a/paths/customer_basic_{agb}.yaml +++ b/paths/customer_basic.yaml @@ -5,8 +5,10 @@ get: summary: Basic info parameters: - name: agb - in: path - description: AGB of the practice which is known as Zorg op Orde customer (via a care group). + in: query + description: |- + AGB of the practice for which basic info is requested. + If the requesting entity is a single GP practice, this parameter can be omitted. schema: $ref: ../schemas/agb.yaml responses: @@ -30,13 +32,10 @@ get: institutionAgb: description: The AGB of the institution, if the customer is a care group or other institute, otherwise omitted. One of practiceAgb or institutionAgb is always present. $ref: ../schemas/agb.yaml - setGpisType: - description: The intended GPIS type. This may differ from the actual import in the `gpis` property. Especially if the GPIS type is newly changed. - type: string gpis: $ref: ../schemas/GPIS.yaml doctors: - description: AGB's of the doctors working in the practice. + description: AGBs of the doctors working in the practice. type: array items: $ref: '../schemas/PatIdentity.yaml#/doctor' @@ -93,38 +92,37 @@ post: description: Only certain properties of a practice can be updated. After updating the same response is outputted as when using GET. parameters: - name: agb - in: path - description: AGB of the practice which is known as Zorg op Orde customer (via a care group). + in: query + description: |- + AGB of the practice for which basic info is requested. + If the requesting entity is a single GP practice, this parameter can be omitted. schema: $ref: ../schemas/agb.yaml requestBody: description: |- - When authorized as a care group the GPIS type can be changed. As a practice the address and - contact data can be changed. This request cannot be used to remove or set any of these properties empty. + When authorized as a practice the address and contact data can be changed. + Currently, if authorized as a care group, no properties can be changed. + + Properties can be omitted if you do not want to change them. `address1` and `postcode` cannot be set to empty. content: 'application/x-www-form-urlencoded': schema: - oneOf: - - type: object - properties: - gpisType: - $ref: '../schemas/gpisType.yaml' - - type: object - properties: - address1: - type: string - description: The first line of the practice postal address (street name and house number, generally). - postcode: - description: Any valid Dutch postcode, with or without whitespacing and in lower- or uppercase. - $ref: ../schemas/postcode.yaml - city: - $ref: ../schemas/city.yaml - tel: - description: A Dutch phone number of 10 digits. Additional dashes and spacing are removed before validating. - type: string - email: - type: string - format: email + type: object + properties: + address1: + type: string + description: The first line of the practice postal address (street name and house number, generally). + postcode: + description: Any valid Dutch postcode, with or without whitespacing and in lower- or uppercase. + $ref: ../schemas/postcode.yaml + city: + $ref: ../schemas/city.yaml + tel: + description: A Dutch phone number of 10 digits. Additional dashes and spacing are removed before validating. + type: string + email: + type: string + format: email responses: $ref: '#/get/responses' \ No newline at end of file diff --git a/paths/customer_gpisType.yaml b/paths/customer_gpisType.yaml deleted file mode 100644 index e18ba06..0000000 --- a/paths/customer_gpisType.yaml +++ /dev/null @@ -1,25 +0,0 @@ -get: - operationId: customerGpisType - tags: - - Customer management - summary: GPIS types - description: Names used for identifying GPIS's (or EDP's) in this API. - responses: - '200': - description: Names of GPIS's (or EDP's) as recognized by Zorg op Orde. - content: - application/json: - schema: - type: array - items: - type: object - properties: - gpisType: - $ref: ../schemas/gpisType.yaml - "description": - type: string - example: "Een innovatief HIS and NIS." - '401': - $ref: '../zoo-api.yaml/#/components/responses/NoAuth' - '403': - $ref: '../zoo-api.yaml/#/components/responses/NoAccess' diff --git a/zoo-api.yaml b/zoo-api.yaml index e6c6e52..b7522af 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -89,10 +89,8 @@ paths: $ref: 'paths/customer_careprogram.yaml' /customer/careprogram/periodEnd: $ref: 'paths/customer_careprogram_periodEnd.yaml' - /customer/basic/{agb}: - $ref: 'paths/customer_basic_{agb}.yaml' - /customer/gpisType: - $ref: 'paths/customer_gpisType.yaml' + /customer/basic: + $ref: 'paths/customer_basic.yaml' /exports/available: $ref: 'paths/exports_available.yaml' /exports/{agb}/{filename}: