From da0b0b25c6172717a82e25395f49f17a3fbc1030 Mon Sep 17 00:00:00 2001 From: "Dr. Andreas Fischer" <45405681+AndreasFischer1985@users.noreply.github.com> Date: Sat, 9 Sep 2023 21:54:46 +0200 Subject: [PATCH] Add files via upload --- README.md | 35 +++++++- openapi.yaml | 229 ++++++++++++++++++++++++--------------------------- 2 files changed, 140 insertions(+), 124 deletions(-) diff --git a/README.md b/README.md index 1d45ffe..e2e2c5e 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,39 @@ API zum DiGA-Verzeichnis https://diga.bfarm.de/de/ des Bundesinstituts für Arzneimittel und Medizinprodukte BfArM. Das Verzeichnis bietet eine Auswahl an digitalen Gesundheitsanwendungen (DiGA), die vom BfArM gemäß § 139e SGB V bewertet wurden. +Anfragen sind als GET-requests zu stellen, wobei zur Authorisierung ein Bearer Token im Header "authorization" anzugeben ist, der wiederum einem GET-request an https://diga.bfarm.de/de/verzeichnis zu entnehmen ist (Im contetn von meta name="host-app/config/environment" unter "APP"/"fhir"/"token"). + ## Beispiel ```bash -apps=$(curl 'https://diga-api.bfarm.de/diga-vz/apps') -appDetails=$(curl 'https://diga-api.bfarm.de/diga-vz/apps/961') -appPrescription=$(curl 'https://diga-api.bfarm.de/diga-vz/prescriptions?filter%5Bapp%5D=961') +token="116b0a73-6e3b-4a88-9313-9947a4fed9ef" + +devDef1=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/DeviceDefinition?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthApp') + +devDev2=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/DeviceDefinition?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppModule') + +catalogEntry=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/CatalogEntry?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppCatalogEntry') + +organization=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/Organization?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppManufacturer') + +chargeItemDefinition=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/ChargeItemDefinition?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppPrescriptionUnit') + +questionnaire=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/Questionnaire?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppQuestionnaire') + +questionnaireResponse=$(curl -m 60 \ +-H "authorization: Bearer $token" \ +'https://diga.bfarm.de/api/fhir/v2.0/QuestionnaireResponse?_count=1000&_profile=https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppQuestionnaireResponse') + ``` diff --git a/openapi.yaml b/openapi.yaml index 26c2f0a..f3343d5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,158 +1,145 @@ openapi: "3.0.0" info: - description: "API zum DiGA-Verzeichnis https://diga.bfarm.de/de/ des Bundesinstituts für Arzneimittel und Medizinprodukte BfArM. Das Verzeichnis bietet eine Auswahl an digitalen Gesundheitsanwendungen (DiGA), die vom BfArM gemäß § 139e SGB V bewertet wurden." - version: "1.0.0" + description: | + API zum DiGA-Verzeichnis https://diga.bfarm.de/de/ des Bundesinstituts für Arzneimittel und Medizinprodukte BfArM. Das Verzeichnis bietet eine Auswahl an digitalen Gesundheitsanwendungen (DiGA), die vom BfArM gemäß § 139e SGB V bewertet wurden. + + Anfragen sind als GET-requests zu stellen, wobei zur Authorisierung ein Bearer Token im Header "authorization" anzugeben ist, der wiederum einem GET-request an https://diga.bfarm.de/de/verzeichnis zu entnehmen ist (Im contetn von meta name="host-app/config/environment" unter "APP"/"fhir"/"token"). + version: "2.0.0" title: "DiGA API" contact: name: "AndreasFischer1985" email: "andreasfischer1985@web.de" url: "https://github.com/AndreasFischer1985/diga-api" servers: - - url: "https://diga-api.bfarm.de/diga-vz" + - url: "https://diga.bfarm.de/api/fhir/v2.0" externalDocs: description: "Weiterführende Dokumentation" url: "https://github.com/AndreasFischer1985/diga-api" paths: - /apps: + /DeviceDefinition: get: - summary: "Liste aller DiGAs" + summary: "DeviceDefinition" responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/digalist' - - /apps/{id}: + parameters: + - in: query + name: _count + example: 1000 + required: true + schema: + type: integer + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthApp + required: true + schema: + type: string + /CatalogEntry: + get: + summary: "CatalogEntry" + responses: + '200': + description: OK + parameters: + - in: query + name: _count + example: 1000 + required: true + schema: + type: integer + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppCatalogEntry + required: true + schema: + type: string + /Organization: get: - summary: "Detail-Informationen zu einer DiGa." - description: "Detail-Informationen zu einer DiGa." + summary: "Organization" responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/digadetails' parameters: - - in: path - name: id - example: 961 + - in: query + name: _count + example: 1000 required: true schema: type: integer - /prescriptions: + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppManufacturer + required: true + schema: + type: string + /ChargeItemDefinition: get: - summary: "Technische Informationen zu einer DiGa." - description: "Detail-Informationen zu einer DiGa." + summary: "ChargeItemDefinition" responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/digaprescription' parameters: - in: query - name: filter%5Bapp%5D - example: 961 + name: _count + example: 1000 required: true schema: type: integer + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppPrescriptionUnit + required: true + schema: + type: string + /Questionnaire: + get: + summary: "Questionnaire" + responses: + '200': + description: OK + parameters: + - in: query + name: _count + example: 1000 + required: true + schema: + type: integer + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppQuestionnaire + required: true + schema: + type: string + /QuestionnaireResponse: + get: + summary: "Questionnaire" + responses: + '200': + description: OK + parameters: + - in: query + name: _count + example: 1000 + required: true + schema: + type: integer + - in: query + name: _profile + example: https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppQuestionnaireResponse + required: true + schema: + type: string + components: - schemas: - digalist: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: integer - example: 294 - type: - type: string - example: apps - attributes: - type: object - relationships: - type: object - included: - type: array - items: - type: object - properties: - id: - type: integer - example: 294 - type: - type: string - example: app-answer - attributes: - type: object - relationships: - type: object - meta: - type: object - properties: - id: - type: string - example: "1659011258436:wl0-l-web0:35304:l61ldvti:21666" - - digadetails: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: integer - example: 294 - type: - type: string - example: apps - attributes: - type: object - relationships: - type: object - meta: - type: object - properties: - id: - type: string - example: "1659009146573:wl0-l-web0:35304:l61ldvti:20170" - - digaprescription: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: integer - example: 27 - type: - type: string - example: prescriptions - attributes: - type: object - relationships: - type: object - meta: - type: object - properties: - id: - type: string - example: "1659009146572:wl0-l-web0:35304:l61ldvti:20169" - - \ No newline at end of file + securitySchemes: + bearerAuth: + type: http + scheme: bearer + description: "Bearer Token" + +security: + - bearerAuth: [] \ No newline at end of file