From 7bcb3cf4fead0a95e47d34c978975652d7352226 Mon Sep 17 00:00:00 2001 From: 10alejospain <10alejo.est@gmail.com> Date: Sun, 7 May 2023 10:55:38 +0200 Subject: [PATCH] deployment updated swagger added and RM updated --- .dockerignore | 6 ++ README.md | 23 ++++--- YAMLs/001_terminology-deployment.yaml | 3 +- YAMLs/002_terminology-svc.yaml | 3 - YAMLs/003_terminology-vs.yaml | 2 + openapi.yaml | 86 +++++++++++++++++++++++++++ 6 files changed, 110 insertions(+), 13 deletions(-) create mode 100644 .dockerignore create mode 100644 openapi.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..836bffc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +YAMLs/ +node_modules/ +README.md +node_modules/ +.git/ +.gitignore \ No newline at end of file diff --git a/README.md b/README.md index 957ecf5..28a7d36 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,11 @@ Enviroment variables Usage ----- + + +FOSPS swagger with all the routes avaible [here](https://fosps.gravitatehealth.eu/swagger-fosps/?urls.primaryName=Terminology%20Service) + + There is 3 endpoint avaible on [GET] \/ | Endpoint | Description | @@ -80,33 +85,33 @@ For each endpoint there is the /all function that gets every condition with the - /problem-list/all ```JSON -... + { "Health problem": "HIV-infection/AIDS", "ICPC-2": "B90 HIV-infection/AIDS", "URL": "https://www.rxreasoner.com/icpc2codes/B90" - }, -... + } + ``` - /allergies ```JSON -... + { "Allergy": "Allergy to tree nut", "SNOMED-SCITD": "48821000119104" - }, -... + } + ``` - /intollerances ```JSON -... + { "Intollerance": "Intolerance to lactose", "SNOMED-SCITD": "782415009" - }, -... + } + ``` diff --git a/YAMLs/001_terminology-deployment.yaml b/YAMLs/001_terminology-deployment.yaml index 0047cb5..e602eb8 100644 --- a/YAMLs/001_terminology-deployment.yaml +++ b/YAMLs/001_terminology-deployment.yaml @@ -14,6 +14,7 @@ spec: spec: containers: - name: terminology-svc - image: gravitate-registry.cr.de-fra.ionos.com/terminology + image: gravitate-registry.cr.de-fra.ionos.com/terminology:test + imagePullPolicy: Always ports: - containerPort: 3000 \ No newline at end of file diff --git a/YAMLs/002_terminology-svc.yaml b/YAMLs/002_terminology-svc.yaml index 8fb0f4b..5fb77a8 100644 --- a/YAMLs/002_terminology-svc.yaml +++ b/YAMLs/002_terminology-svc.yaml @@ -2,9 +2,6 @@ apiVersion: v1 kind: Service metadata: name: terminology-svc - annotations: - prometheus.io/scrape: 'true' - prometheus.io/port: '3000' spec: selector: app: terminology-svc diff --git a/YAMLs/003_terminology-vs.yaml b/YAMLs/003_terminology-vs.yaml index 1a54948..a183c95 100644 --- a/YAMLs/003_terminology-vs.yaml +++ b/YAMLs/003_terminology-vs.yaml @@ -11,6 +11,8 @@ spec: - match: - uri: prefix: /terminologies/icpc2/ + rewrite: + uri: "/" route: - destination: host: terminology-svc.default.svc.cluster.local diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..ff31f81 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,86 @@ +openapi: "3.0.1" +info: + title: Terminology list + version: MVP2 + description: |- + Gravitate Health ICPC2 short list at the moment. + + Link to the [Terminology service](https://github.com/Gravitate-Health/terminology-service) repo. + contact: {} +servers: + - url: https://fosps.gravitatehealth.eu +paths: + + /terminologies/icpc2/problem-list/all: + get: + tags: + - Problem List + description: List a list of every health problem avaible in the database. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/health-problem" + + /terminologies/icpc2/allergies/all: + get: + tags: + - Allergies + description: Lists all the allergies avaible in the database. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/allergy" + + /terminologies/icpc2/intollerances/all: + get: + tags: + - Intollerances + description: Lists all the intollerances avaible in the database. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/intollerance" +components: + schemas: + + health-problem: + type: object + properties: + "Health problem": + type: string + example: "HIV-infection/AIDS" + "ICPC-2": + type: string + example: "B90 HIV-infection/AIDS" + "URL": + type: string + example: "https://www.rxreasoner.com/icpc2codes/B90" + + allergy: + type: object + properties: + "Allergy": + type: string + example: "Allergy to tree nut" + "SNOMED-SCITD": + type: string + example: "48821000119104" + + intollerance: + type: object + properties: + "Intollerance": + type: string + example: "Intolerance to lactose" + "SNOMED-SCITD": + type: string + example: "782415009" \ No newline at end of file