From bbc351536b17e2165f8a0a05fdaafd2a820b02c6 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 31 Jul 2024 04:31:41 +0200 Subject: [PATCH] [exports] Added API for initial delivery of feature --- paths/exports_available.yaml | 52 +++++++++++++++++++++++++++++ paths/exports_{agb}_{filename}.yaml | 26 +++++++++++++++ zoo-api.yaml | 10 ++++-- 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 paths/exports_available.yaml create mode 100644 paths/exports_{agb}_{filename}.yaml diff --git a/paths/exports_available.yaml b/paths/exports_available.yaml new file mode 100644 index 0000000..cef7615 --- /dev/null +++ b/paths/exports_available.yaml @@ -0,0 +1,52 @@ +get: + operationId: exportsAvailable + tags: + - Exports + summary: List available exports + responses: + '200': + description: |- + Lists all available HIS export snapshots. + A HIS export snapshot contains parts of medical dossier info for a subset of all patients in a GP practice. Exactly which filters are applied, + which data is provided, and how it is formatted is arranged between Zorg op Orde and a party using the ZOO API. + content: + application/json: + schema: + type: object + properties: + exportSources: + type: array + items: + type: object + properties: + agb: + $ref: ../schemas/agb.yaml + name: + type: string + description: Name of the GP practice + available: + type: array + items: + type: object + properties: + filename: + type: string + description: |- + This filename can be used in the `/agb/filename` endpoint to fetch this data. + timestamp: + type: string + format: date-time + description: |- + The export contains data sourced from an EPD system at this time; it will not + contain any medical dossier data later than this timestamp. + required: + - filename + - timestamp + required: + - agb + - name + - available + '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/paths/exports_{agb}_{filename}.yaml b/paths/exports_{agb}_{filename}.yaml new file mode 100644 index 0000000..fcf3516 --- /dev/null +++ b/paths/exports_{agb}_{filename}.yaml @@ -0,0 +1,26 @@ +get: + operationId: exportsDownload + tags: + - Exports + summary: Download an available export + parameters: + - name: agb + in: path + description: The AGB code of the practice for the export file you want to download. + required: true + schema: + $ref: ../schemas/agb.yaml + - name: filename + in: path + required: true + description: The name of the file as provided by the `/exports/available` endpoint. + schema: + type: string + responses: + '200': + description: |- + Fetches the requested HIS export as ZIP file. + '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/zoo-api.yaml b/zoo-api.yaml index a250c93..a6bf124 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -20,8 +20,7 @@ security: tags: - name: Patient description: |- - API for retrieving medical dossier data and concerns based on looking up a - specific patient. + API for retrieving medical dossier data and concerns based on looking up a specific patient. - name: Population statistics description: |- Statistics of a patient population. @@ -42,6 +41,9 @@ tags: As well as a 'config' view where they see _all_ care programs that could possibly be relevant for that customer, where the customer can preview the report (essentially, run the report as normal), favourite something they don't get by default, or unfavourite something they get by default. - name: Customer management + - name: Exports + description: |- + List and download exported parts of HIS dossiers. paths: /patient/dossier: $ref: 'paths/patient_dossier.yaml' @@ -89,6 +91,10 @@ paths: $ref: 'paths/customer_careprogram_periodEnd.yaml' /customer/basic: $ref: 'paths/customer_basic.yaml' + /exports/available: + $ref: 'paths/exports_available.yaml' + /exports/{agb}/{filename}: + $ref: 'paths/exports_{agb}_{filename}.yaml' components: parameters: Authorization: