From 2d5bd6c0ed9afbf82ce273e1e4a5ed67529e00f8 Mon Sep 17 00:00:00 2001 From: Eric Hoekstra Date: Tue, 2 Jul 2024 18:05:50 +0200 Subject: [PATCH] First draft for basic customer info API. --- paths/customer_basic.yaml | 63 ++++++++++++++++++++++++++++++++++++++ schemas/PatIdentity.yaml | 8 ++--- schemas/city.yaml | 3 ++ schemas/fundus-status.yaml | 5 +-- schemas/postcode.yaml | 3 ++ zoo-api.yaml | 2 ++ 6 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 paths/customer_basic.yaml create mode 100644 schemas/city.yaml create mode 100644 schemas/postcode.yaml diff --git a/paths/customer_basic.yaml b/paths/customer_basic.yaml new file mode 100644 index 0000000..f941cc3 --- /dev/null +++ b/paths/customer_basic.yaml @@ -0,0 +1,63 @@ +get: + operationId: customerBasic + tags: + - Customer management + summary: Basic info + parameters: + - name: agb + in: query + description: AGB of the practice which is known as Zorg op Orde customer (via a care group). + schema: + $ref: ../schemas/agb.yaml + - name: unid + in: query + description: Internal number used by Zorg op Orde + schema: + type: integer + responses: + '200': + description: Basic information of a practice. + content: + application/json: + schema: + type: object + properties: + practice: + type: object + properties: + name: + type: string + agb: + $ref: ../schemas/agb.yaml + gpis: + $ref: ../schemas/GPIS.yaml + address: + type: object + properties: + streetHouseNumber: + type: string + postcode: + $ref: ../schemas/postcode.yaml + city: + $ref: ../schemas/city.yaml + contact: + type: object + properties: + tel: + type: string + email: + type: string + fundus: + type: object + properties: + broker: + type: string + someOrganization: + type: string + # In de mock up te lezen als: oproeporganisatie, Ksyos. + '400': + description: If the specified customer is not a practice but some other entity, e.g. a care group. + '401': + $ref: '../zoo-api.yaml/#/components/responses/NoAuth' + '403': + $ref: '../zoo-api.yaml/#/components/responses/NoAccess' \ No newline at end of file diff --git a/schemas/PatIdentity.yaml b/schemas/PatIdentity.yaml index 23bf449..14ca8ae 100644 --- a/schemas/PatIdentity.yaml +++ b/schemas/PatIdentity.yaml @@ -58,13 +58,9 @@ address: example: A default: "" postcode: - description: The post code, in `1234AB` format. If not known, blank. - type: string - example: 2611PV + $ref: ../schemas/postcode.yaml city: - description: The city or town. - type: string - example: Delft + $ref: ../schemas/city.yaml contact: type: object properties: diff --git a/schemas/city.yaml b/schemas/city.yaml new file mode 100644 index 0000000..44252c2 --- /dev/null +++ b/schemas/city.yaml @@ -0,0 +1,3 @@ +description: The city or town. +type: string +example: Delft \ No newline at end of file diff --git a/schemas/fundus-status.yaml b/schemas/fundus-status.yaml index a003c25..26bfe91 100644 --- a/schemas/fundus-status.yaml +++ b/schemas/fundus-status.yaml @@ -8,10 +8,7 @@ properties: agb: description: |- The AGB code of the GP practice whose patients are provided in this object. - type: integer - format: int32 - minimum: 1 - maximum: 99999999 + $ref: agb.yaml name: description: |- A human readable name describing the GP practice (The entity whose AGB code is sent as `agb`). diff --git a/schemas/postcode.yaml b/schemas/postcode.yaml new file mode 100644 index 0000000..80723e7 --- /dev/null +++ b/schemas/postcode.yaml @@ -0,0 +1,3 @@ +description: The postcode, in `1234AB` format. If not known, blank. +type: string +example: 2611PV \ No newline at end of file diff --git a/zoo-api.yaml b/zoo-api.yaml index 9dc6a96..a250c93 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -87,6 +87,8 @@ paths: $ref: 'paths/customer_careprogram.yaml' /customer/careprogram/periodEnd: $ref: 'paths/customer_careprogram_periodEnd.yaml' + /customer/basic: + $ref: 'paths/customer_basic.yaml' components: parameters: Authorization: