From 582a1a36da381d438263df49dc8b7ee3286ff1cb Mon Sep 17 00:00:00 2001 From: user Date: Fri, 8 Jul 2022 05:50:38 +0000 Subject: [PATCH 01/12] Server-side configuration changes --- configs/opencr/config_port.json | 74 +++++++++++++++++++++++++++++++++ configs/shr/config.json | 6 +++ docker-compose.yml | 6 ++- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 configs/opencr/config_port.json diff --git a/configs/opencr/config_port.json b/configs/opencr/config_port.json new file mode 100644 index 00000000..4745d93a --- /dev/null +++ b/configs/opencr/config_port.json @@ -0,0 +1,74 @@ +{ + "auth": { + "secret": "3084e343-71bc-4247-86e4-ea210af89c28", + "tokenDuration": 5400 + }, + "app": { + "port": 3000, + "installed": false + }, + "mediator": { + "api": { + "username": "root@openhim.org", + "password": "openhim", + "apiURL": "https://openhim-core:8080", + "trustSelfSigned": true, + "urn": "" + }, + "register": true + }, + "fhirServer": { + "username": "hapi", + "password": "hapi", + "baseURL": "http://opencr-fhir:8080/fhir" + }, + "elastic": { + "server": "http://es:9200", + "username": "", + "password": "", + "max_compilations_rate": "10000/1m", + "index": "patients" + }, + "codes": { + "goldenRecord": "5c827da5-4858-4f3d-a50c-62ece001efea" + }, + "structureDefinition": { + "uri": "http://openclientregistry.org/fhir", + "reportRelationship": "patientreport" + }, + "matching": { + "tool": "elasticsearch" + }, + "clients": [ + { + "id": "lis", + "displayName": "Lab Info System" + } + ], + "systems": { + "CRBaseURI": "http://openclientregistry.org/fhir", + "internalid": { + "uri": [ + "http://moh.bw.org/ext/identifier/omang" + ], + "displayName": "Internal ID" + }, + "nationalid": { + "uri": "http://health.go.ug/cr/natioanlid", + "displayName": "National ID" + }, + "artnumber": { + "uri": "http://health.go.ug/cr/artnumber", + "displayName": "ART Number" + }, + "brokenMatch": { + "uri": "http://clientregistry.org/brokenMatch" + } + }, + "sync": { + "lastFHIR2ESSync": "2022-07-08T05:04:28" + }, + "__comments": { + "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" + } +} \ No newline at end of file diff --git a/configs/shr/config.json b/configs/shr/config.json index a45dd81c..1f8ff161 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -3,6 +3,12 @@ "port": 3000, "mllpPort": 3001 }, + "mllp": { + "targetIp": "10.175.5.69", + "targetPort": 3001, + "targetAdtPort": 3001, + "targetOrmPort": 3002 + }, "mediator": { "api": { "username": "root@openhim.org", diff --git a/docker-compose.yml b/docker-compose.yml index ace17647..0f826edf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -132,6 +132,7 @@ services: - ./configs/shr/config.json:/app/config/config_docker.json - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: + - 80:3001 - 3001:3001 - 3002:3002 shr-fhir: @@ -187,7 +188,10 @@ services: - 'traefik.http.routers.openhim-core.service=openhim-core' - 'traefik.http.routers.openhim-core.tls=true' - 'traefik.http.routers.openhim-core.entrypoints=web-secure' - - 'traefik.http.routers.openhim-core.rule=Host(`openhim.moh.org.bw`)' + - 'traefik.http.routers.openhim-core.rule=PathPrefix(`/openhim-core`)' + - 'traefik.http.routers.openhim-core.middlewares=openhim-core' + - 'traefik.http.middlewares.openhim-core.stripprefix.prefixes=/openhim-core' + - 'traefik.http.middlewares.openhim-core.stripprefix.forceSlash=false' ports: - 5001:5001 - 8091:8080 From 24a37d9fc9cfa05f48c98439e51c5762b1a7c972 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 8 Jul 2022 06:40:01 +0000 Subject: [PATCH 02/12] Updated docker config --- configs/opencr/config.json | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 10f412fb..1b047d26 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -69,7 +69,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2022-08-31T19:24:26" + "lastFHIR2ESSync": "2022-07-08T06:09:08" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/docker-compose.yml b/docker-compose.yml index 0f826edf..02942d5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -188,9 +188,9 @@ services: - 'traefik.http.routers.openhim-core.service=openhim-core' - 'traefik.http.routers.openhim-core.tls=true' - 'traefik.http.routers.openhim-core.entrypoints=web-secure' - - 'traefik.http.routers.openhim-core.rule=PathPrefix(`/openhim-core`)' + - 'traefik.http.routers.openhim-core.rule=PathPrefix(`/openhim-ssl`)' - 'traefik.http.routers.openhim-core.middlewares=openhim-core' - - 'traefik.http.middlewares.openhim-core.stripprefix.prefixes=/openhim-core' + - 'traefik.http.middlewares.openhim-core.stripprefix.prefixes=/openhim-ssl' - 'traefik.http.middlewares.openhim-core.stripprefix.forceSlash=false' ports: - 5001:5001 From 9b09bf5c44b78d827d6bf2d8ffebb50b28fe38ca Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 25 Jul 2022 21:59:29 +0000 Subject: [PATCH 03/12] Cleanup --- configs/opencr/config_port.json | 74 --------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 configs/opencr/config_port.json diff --git a/configs/opencr/config_port.json b/configs/opencr/config_port.json deleted file mode 100644 index 4745d93a..00000000 --- a/configs/opencr/config_port.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "auth": { - "secret": "3084e343-71bc-4247-86e4-ea210af89c28", - "tokenDuration": 5400 - }, - "app": { - "port": 3000, - "installed": false - }, - "mediator": { - "api": { - "username": "root@openhim.org", - "password": "openhim", - "apiURL": "https://openhim-core:8080", - "trustSelfSigned": true, - "urn": "" - }, - "register": true - }, - "fhirServer": { - "username": "hapi", - "password": "hapi", - "baseURL": "http://opencr-fhir:8080/fhir" - }, - "elastic": { - "server": "http://es:9200", - "username": "", - "password": "", - "max_compilations_rate": "10000/1m", - "index": "patients" - }, - "codes": { - "goldenRecord": "5c827da5-4858-4f3d-a50c-62ece001efea" - }, - "structureDefinition": { - "uri": "http://openclientregistry.org/fhir", - "reportRelationship": "patientreport" - }, - "matching": { - "tool": "elasticsearch" - }, - "clients": [ - { - "id": "lis", - "displayName": "Lab Info System" - } - ], - "systems": { - "CRBaseURI": "http://openclientregistry.org/fhir", - "internalid": { - "uri": [ - "http://moh.bw.org/ext/identifier/omang" - ], - "displayName": "Internal ID" - }, - "nationalid": { - "uri": "http://health.go.ug/cr/natioanlid", - "displayName": "National ID" - }, - "artnumber": { - "uri": "http://health.go.ug/cr/artnumber", - "displayName": "ART Number" - }, - "brokenMatch": { - "uri": "http://clientregistry.org/brokenMatch" - } - }, - "sync": { - "lastFHIR2ESSync": "2022-07-08T05:04:28" - }, - "__comments": { - "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" - } -} \ No newline at end of file From 5cc22185aa4c8ceb3eaa8ad2a283488a17f88eb8 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 30 Aug 2022 20:56:50 +0000 Subject: [PATCH 04/12] Fixes --- configs/opencr/config.json | 2 +- configs/traefik/traefik.yml | 4 ++-- docker-compose.yml | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 1b047d26..1fd01437 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -69,7 +69,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2022-07-08T06:09:08" + "lastFHIR2ESSync": "2022-08-24T18:23:42" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/traefik/traefik.yml b/configs/traefik/traefik.yml index 20f0d5de..62e103f6 100644 --- a/configs/traefik/traefik.yml +++ b/configs/traefik/traefik.yml @@ -1,7 +1,7 @@ log: level: DEBUG -serversTransport: - insecureSkipVerify: true +# serversTransport: +# insecureSkipVerify: true entryPoints: web: address: ":80" diff --git a/docker-compose.yml b/docker-compose.yml index 02942d5f..ace17647 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -132,7 +132,6 @@ services: - ./configs/shr/config.json:/app/config/config_docker.json - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: - - 80:3001 - 3001:3001 - 3002:3002 shr-fhir: @@ -188,10 +187,7 @@ services: - 'traefik.http.routers.openhim-core.service=openhim-core' - 'traefik.http.routers.openhim-core.tls=true' - 'traefik.http.routers.openhim-core.entrypoints=web-secure' - - 'traefik.http.routers.openhim-core.rule=PathPrefix(`/openhim-ssl`)' - - 'traefik.http.routers.openhim-core.middlewares=openhim-core' - - 'traefik.http.middlewares.openhim-core.stripprefix.prefixes=/openhim-ssl' - - 'traefik.http.middlewares.openhim-core.stripprefix.forceSlash=false' + - 'traefik.http.routers.openhim-core.rule=Host(`openhim.moh.org.bw`)' ports: - 5001:5001 - 8091:8080 From a89fcd5ec393a0d48687c4874083ca6ca8953666 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Wed, 31 Aug 2022 13:34:37 +0000 Subject: [PATCH 05/12] AWS testing fixes --- configs/opencr/config.json | 2 +- configs/shr/config.json | 8 ++++---- configs/traefik/traefik.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 1fd01437..6ebad71d 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -69,7 +69,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2022-08-24T18:23:42" + "lastFHIR2ESSync": "2022-08-31T13:16:51" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/shr/config.json b/configs/shr/config.json index 1f8ff161..188a6f98 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -4,10 +4,10 @@ "mllpPort": 3001 }, "mllp": { - "targetIp": "10.175.5.69", - "targetPort": 3001, - "targetAdtPort": 3001, - "targetOrmPort": 3002 + "targetIp": "localhost", + "targetPort": 2100, + "targetAdtPort": 2100, + "targetOrmPort": 2100 }, "mediator": { "api": { diff --git a/configs/traefik/traefik.yml b/configs/traefik/traefik.yml index 62e103f6..20f0d5de 100644 --- a/configs/traefik/traefik.yml +++ b/configs/traefik/traefik.yml @@ -1,7 +1,7 @@ log: level: DEBUG -# serversTransport: -# insecureSkipVerify: true +serversTransport: + insecureSkipVerify: true entryPoints: web: address: ":80" From 5bee61b098310fa542109089c9d2f072ec15a43f Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 27 Sep 2022 11:32:46 -0700 Subject: [PATCH 06/12] Workflow fixes and updates --- configs/opencr/PatientRelationship.json | 142 ++++++++++++++++++++++++ configs/opencr/config.json | 24 ++-- configs/opencr/decisionRules.json | 81 ++++++++++++++ configs/openhim-console/default.json | 4 +- docker-compose.yml | 18 ++- test/mllp/messages/example-oru.hl7 | 13 +-- 6 files changed, 261 insertions(+), 21 deletions(-) create mode 100644 configs/opencr/PatientRelationship.json diff --git a/configs/opencr/PatientRelationship.json b/configs/opencr/PatientRelationship.json new file mode 100644 index 00000000..89d75a6b --- /dev/null +++ b/configs/opencr/PatientRelationship.json @@ -0,0 +1,142 @@ +{ + "resourceType": "Basic", + "id": "patientreport", + "meta": { + "versionId": "1", + "lastUpdated": "2019-07-30T07:34:24.098+00:00", + "profile": [ + "http://ihris.org/fhir/StructureDefinition/iHRISRelationship" + ] + }, + "extension": [ + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportDetails", + "extension": [ + { + "url": "label", + "valueString": "Patient Report" + }, + { + "url": "name", + "valueString": "patients" + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "gender" + }, + { + "url": "name", + "valueString": "gender" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "birthDate" + }, + { + "url": "name", + "valueString": "birthDate" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "given" + }, + { + "url": "name", + "valueString": "name.where(use='official').last().given" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "family" + }, + { + "url": "name", + "valueString": "name.where(use='official').last().family" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "fullname" + }, + { + "url": "name", + "valueString": "name.where(use='official').last().text" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "phone" + }, + { + "url": "name", + "valueString": "telecom.where(system='phone').value" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "artnumber" + }, + { + "url": "name", + "valueString": "identifier.where(system='http://moh.bw.org/ext/identifier/pi').value" + } + ] + }, + { + "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", + "extension": [ + { + "url": "label", + "valueString": "nationalid" + }, + { + "url": "name", + "valueString": "identifier.where(system='http://moh.bw.org/ext/identifier/omang').last().value" + } + ] + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://ihris.org/fhir/ValueSet/ihris-resource", + "code": "iHRISRelationship" + } + ], + "text": "iHRISRelationship" + }, + "subject": { + "reference": "StructureDefinition/Patient" + } + } \ No newline at end of file diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 6ebad71d..9249ea3f 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -44,32 +44,40 @@ }, "clients": [ { - "id": "lis", - "displayName": "Lab Info System" + "id": "tester", + "displayName": "PIMS" + }, + { + "id": "shr", + "displayName": "SHR" + }, + { + "id": "postman", + "displayName": "Postman" } ], "systems": { "CRBaseURI": "http://openclientregistry.org/fhir", "internalid": { "uri": [ - "http://moh.bw.org/ext/identifier/omang" + "http://moh.bw.org/ext/identifier/mr" ], "displayName": "Internal ID" }, "nationalid": { - "uri": "http://health.go.ug/cr/natioanlid", - "displayName": "National ID" + "uri": "http://moh.bw.org/ext/identifier/omang", + "displayName": "National ID - Omang" }, "artnumber": { - "uri": "http://health.go.ug/cr/artnumber", - "displayName": "ART Number" + "uri": "http://moh.bw.org/ext/identifier/pi", + "displayName": "Patient Identifier" }, "brokenMatch": { "uri": "http://clientregistry.org/brokenMatch" } }, "sync": { - "lastFHIR2ESSync": "2022-08-31T13:16:51" + "lastFHIR2ESSync": "2022-09-27T17:46:24" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/opencr/decisionRules.json b/configs/opencr/decisionRules.json index e69de29b..65cc5269 100644 --- a/configs/opencr/decisionRules.json +++ b/configs/opencr/decisionRules.json @@ -0,0 +1,81 @@ +{ + "__comments": { + "path": "Its a fhir path, for syntax refer to https://www.hl7.org/fhir/fhirpath.html", + "matchingType": "Must be specified, it can either", + "threshold": { + "levenshtein": "Lower the number, the closer the match, 0 being exact match, max threshold is 2", + "jaro-winkler": "number between 0 and 1, where 0 for no match and 1 for exact match" + }, + "nullHandling": { + "description": "this option tells openCR what to do when a field is empty, when set at the top level of the rule then it will apply to all fields, if set at the respective field then it will apply for that particular field", + "values": "either conservative, moderate or greedy" + }, + "nullHandlingBothFields": { + "description": "this option tells openCR what to do when both fields are empty and When this is set, then nullHandling applies to when only 1 of the fields is null, when set at the top level of the rule then it will apply to all fields, if set at the respective field then it will apply for that particular field", + "values": "either conservative, moderate or greedy" + }, + "supported_algorithms": { + "elasticsearch": [ + "https://github.com/intrahealth/similarity-scoring" + ] + } + }, + "rules": [ + { + "matchingType": "deterministic", + "fields": { + "nationalid": { + "algorithm": "jaro-winkler-similarity", + "threshold": 1, + "fhirpath": "identifier.where(system='http://moh.bw.org/ext/identifier/omang').value", + "null_handling": "conservative", + "null_handling_both": "conservative", + "espath": "nationalid" + } + }, + "autoMatchThreshold": 2 + }, + { + "matchingType": "deterministic", + "fields": { + "given": { + "algorithm": "jaro-winkler-similarity", + "threshold": 0.8, + "fhirpath": "name.where(use='official').given", + "null_handling": "moderate", + "null_handling_both": "moderate", + "espath": "given" + }, + "family": { + "algorithm": "jaro-winkler-similarity", + "threshold": 0.9, + "fhirpath": "name.where(use='official').family", + "null_handling": "moderate", + "null_handling_both": "moderate", + "espath": "family" + }, + "birthdate": { + "algorithm": "exact", + "fhirpath": "birthDate", + "null_handling": "moderate", + "null_handling_both": "moderate", + "espath": "birthDate" + }, + "artnumber": { + "algorithm": "exact", + "fhirpath": "identifier.where(system='http://moh.bw.org/ext/identifier/pi').value", + "null_handling": "moderate", + "null_handling_both": "moderate", + "espath": "artnumber" + } + }, + "potentialMatchThreshold": 3, + "filters": { + "gender": { + "fhirpath": "gender", + "espath": "gender" + } + } + } + ] +} \ No newline at end of file diff --git a/configs/openhim-console/default.json b/configs/openhim-console/default.json index 38c53b80..0b5e4498 100644 --- a/configs/openhim-console/default.json +++ b/configs/openhim-console/default.json @@ -2,9 +2,9 @@ "version": "1.13.2", "minimumCoreVersion": "5.2.0", "protocol": "https", - "host": "core.moh.org.bw", + "host": "localhost", "hostPath": "", - "port": "", + "port": "8091", "title": "Botswana HIE Admin Console", "footerTitle": "OpenHIM Administration Console", "footerPoweredBy": "Powered by OpenHIM", diff --git a/docker-compose.yml b/docker-compose.yml index ace17647..930ff8cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,9 @@ services: volumes: - ./configs/opencr/config.json:/src/server/config/config_docker.json - ./configs/opencr/mediator.json:/src/server/config/mediator.json + - ./configs/opencr/decisionRules.json:/src/server/config/decisionRules.json + - ./configs/opencr/PatientRelationship.json:/src/resources/Relationships/PatientRelationship.json + labels: - 'traefik.enable=true' - 'traefik.docker.network=hie-botswana_hie' @@ -78,6 +81,8 @@ services: - 'traefik.http.routers.opencr.entrypoints=web-secure' - 'traefik.http.services.opencr.loadbalancer.server.port=3000' - 'traefik.http.routers.opencr.rule=Host(`opencr.moh.org.bw`)' + ports: + - 3000:3000 opencr-fhir: image: hapiproject/hapi:latest container_name: opencr-fhir @@ -120,6 +125,8 @@ services: # SHR ### shr: + profiles: + - debug container_name: shr hostname: shr image: ghcr.io/i-tech-uw/shared-health-record:${SHR_VERSION-latest} @@ -132,6 +139,7 @@ services: - ./configs/shr/config.json:/app/config/config_docker.json - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: + - 4000:3000 - 3001:3001 - 3002:3002 shr-fhir: @@ -148,6 +156,8 @@ services: interval: 30s timeout: 30s retries: 3 + ports: + - 8099:8080 ### # OpenHIM @@ -189,6 +199,7 @@ services: - 'traefik.http.routers.openhim-core.entrypoints=web-secure' - 'traefik.http.routers.openhim-core.rule=Host(`openhim.moh.org.bw`)' ports: + - 5000:5000 - 5001:5001 - 8091:8080 @@ -212,6 +223,8 @@ services: - 'traefik.http.routers.openhim-console.rule=Host(`moh.org.bw`)' networks: - hie + ports: + - 4001:80 # Loads Default OpenHIM Config openhim-config: @@ -238,7 +251,7 @@ services: image: ghcr.io/b-techbw/openhim-mediator-fhir-converter:${FHIR_CONVERTER_VERSION-latest} volumes: - ./configs/fhir-converter/config.json:/app/config.json - - /app/src/service-templates + - ./configs/fhir-converter/templates:/app/data/service-templates networks: - hie labels: @@ -247,7 +260,8 @@ services: - 'traefik.http.routers.converter.tls=true' - 'traefik.http.routers.converter.entrypoints=web-secure' - 'traefik.http.routers.converter.rule=Host(`converter.moh.org.bw`)' - + ports: + - 4002:2019 # Kafka zookeeper: image: "bitnami/zookeeper:latest" diff --git a/test/mllp/messages/example-oru.hl7 b/test/mllp/messages/example-oru.hl7 index 4d1411ee..ebf586e3 100644 --- a/test/mllp/messages/example-oru.hl7 +++ b/test/mllp/messages/example-oru.hl7 @@ -1,9 +1,4 @@ -MSH|^~\&|LAB|GGC|||202106101550||ORU^R01|165293.1|D| -PID|1|TEST0062404|GG00042482^^^^MR^GGC~GG5714^^^^PI^GGC~TEST0062404^^^^HUB^GGC||Murambi^Tawanda||19880616|M||CT|Plot 1011^^Gaborone^Botswana^00267|||||M|| ZG0000044218| -OBR|1|MOH001^LAB|68222^LAB|COVID^SARS-CoV-2 PCR^L|||202106031400|||||||202106101545||ZZHGGMMO^Healthpost^Mmopane||00049731||||||LAB|F||^^^^^R| -OBX|1|ST|SARS-CoV-2 PCR^SARS-CoV-2 PCR^L||INCONCLUSIVE|||N||A^S|F||||GNHL^National Health Laboratory^L| -OBX|2|ST|S-Cov-2 RVW^SARS-CoV-2 PCR REVIEW^L||.|||N||A^S|F|||202106101549|GNHL^National Health Laboratory^L| -NTE|1| -NTE|2| -NTE|3||SARS-CoV-2 PCR Tests Authorised by: MEDITECH| -NTE|4||Authorised Date: 10/06/21 1549| +MSH|^~\&|LAB|MOH|LAB|SHR|202206101550||ORU^R01|165293.1|D|2.4 +PID|1|TEST0062404|GG00042482^^^^MR^GGC~OMANG7939597^^^^SS^GGC~GG5714^^^^PI^GGC~TEST0062404^^^^HUB^GGC||Vandervort^Rudolph^^^^^F|2015-09-12|M||CT|Plot 40095^^Gaborone^B^0101||791609023^^^testpatient@mail.com|791609023||M|AC||OMANG7939597 +OBR|1|MOH001^LAB|68222^LAB|ZCD4ABS^L|||202206031400|||||||202206101545||ZZHGGMMO^Healthpost^Mmopane||00049731||||||LAB|F||^^^^^R +OBX|1|ST|ZCD4ABS^L||100|copies/mL|0-100000|||A^S|F|||202206031400|GNHL^National Health Laboratory^L From 70154c316be26982d3867d242da83ebdbe151286 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 27 Sep 2022 13:39:01 -0700 Subject: [PATCH 07/12] Version update --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 103f4f72..e730ee3e 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -SHR_VERSION=v0.7.1 -FHIR_CONVERTER_VERSION=v3.2.1 +SHR_VERSION=v0.8.0 +FHIR_CONVERTER_VERSION=v3.3.0-beta OMANG_SVC_VERSION=v1.6.3 \ No newline at end of file From ea7e5016acc80070f6e26e6157031b9f55d5c063 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 27 Sep 2022 23:28:05 +0200 Subject: [PATCH 08/12] Pilot server updates --- .gitignore | 4 +- certs/selfsigned.crt | 25 ++++++++ certs/selfsigned.key | 28 ++++++++ configs/opencr/config.json | 8 ++- configs/openhim-console/default.json | 4 +- configs/shr/config.json | 85 ++++++++++++------------- configs/traefik/certs.yml | 4 +- configs/traefik/traefik.yml | 5 -- dist/package/.gitkeep | 0 docker-compose.yml | 95 ++++++++++++++-------------- index.html | 1 + 11 files changed, 155 insertions(+), 104 deletions(-) create mode 100644 certs/selfsigned.crt create mode 100644 certs/selfsigned.key create mode 100644 dist/package/.gitkeep create mode 100644 index.html diff --git a/.gitignore b/.gitignore index a4cbb566..20a9c25c 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,6 @@ server/log *.tar -data/* \ No newline at end of file +data/* + +*.bak \ No newline at end of file diff --git a/certs/selfsigned.crt b/certs/selfsigned.crt new file mode 100644 index 00000000..ce2c08aa --- /dev/null +++ b/certs/selfsigned.crt @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIUPZuJLyvfxhaedprEdyqgcvbVhIcwDQYJKoZIhvcNAQEL +BQAwgagxCzAJBgNVBAYTAkJXMRMwEQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQH +DAhHYWJvcm9uZTEbMBkGA1UECgwSTWluaXN0cnkgb2YgSGVhbHRoMRQwEgYDVQQL +DAtJbmZvcm1hdGljczEZMBcGA1UEAwwQaGllLXBpbG90Lmdvdi5idzEjMCEGCSqG +SIb3DQEJARYUa2dha2dlLnRhbEBnbWFpbC5jb20wHhcNMjIwODIxMDM0MzUzWhcN +MjMwODIxMDM0MzUzWjCBqDELMAkGA1UEBhMCQlcxEzARBgNVBAgMClNvbWUtU3Rh +dGUxETAPBgNVBAcMCEdhYm9yb25lMRswGQYDVQQKDBJNaW5pc3RyeSBvZiBIZWFs +dGgxFDASBgNVBAsMC0luZm9ybWF0aWNzMRkwFwYDVQQDDBBoaWUtcGlsb3QuZ292 +LmJ3MSMwIQYJKoZIhvcNAQkBFhRrZ2FrZ2UudGFsQGdtYWlsLmNvbTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKWG7bCAtrbrXn/gvAjmfewtrrw2cgGh +DO8dC8NWVDBz8YOHYZ+l/i6GYtoKP/AbMLgHrBDRBaMOlEjbdCH9IrxqiUD2li8/ +GxoFG13OqtedMkJ4IWNOQmVxUM98A8BYQgDdRtV9doa6Qg4/0XaTGEn4gTNaIMAE +qGI5kP0d7+MVLm9xlYJGWb+QQR+t5qGQokghLL7psgfHSt8tn9TrjAhUouIPVm08 +TcCEI0fO31nYFw2yWoheR7HbNOiuJuWbCu4upMQFiQMo+7PZpPoq2DyQPVhqA3Mx +sLhvSeKeHJqttgR86njxzGMmYi/rHXjb8hBNWMVcyuk1Fii3bNdb9bcCAwEAAaNT +MFEwHQYDVR0OBBYEFAd5L+/D3bbjLOa+bA/wLCWy9kDgMB8GA1UdIwQYMBaAFAd5 +L+/D3bbjLOa+bA/wLCWy9kDgMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBAKJbhsJnKZEKIZGEvuVa46n/qio3zwGZKJT/GO9CNykrpBFU8fHxUjLY +NtcZaOXfo9XGVIbKb6f05/w1PEan/qzJORAjnNUlUMa3eNJpTasGn/CcWkg86nnc +aed05+c57GhxESS09eLxNaHvA9sAzb75uyZKjgslnla958JxPttU7fA3ynA4rhhr +9ZtGEjg2VG9qw2JC9cwlCdYxpSyH4Ux1ntJNQviQfcuDaee/KDII4nN0pWqok46n +rRGG8lKwDnaGABGktFZpvN6nfR25fJCQtLLeAatOgSxsrQ0wsnX9RhIiYiMt5E5f +S0NPyB0NFIv4RlUEWF8hSZUE5J7EczA= +-----END CERTIFICATE----- diff --git a/certs/selfsigned.key b/certs/selfsigned.key new file mode 100644 index 00000000..73ed9b0e --- /dev/null +++ b/certs/selfsigned.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQClhu2wgLa2615/ +4LwI5n3sLa68NnIBoQzvHQvDVlQwc/GDh2Gfpf4uhmLaCj/wGzC4B6wQ0QWjDpRI +23Qh/SK8aolA9pYvPxsaBRtdzqrXnTJCeCFjTkJlcVDPfAPAWEIA3UbVfXaGukIO +P9F2kxhJ+IEzWiDABKhiOZD9He/jFS5vcZWCRlm/kEEfreahkKJIISy+6bIHx0rf +LZ/U64wIVKLiD1ZtPE3AhCNHzt9Z2BcNslqIXkex2zToriblmwruLqTEBYkDKPuz +2aT6Ktg8kD1YagNzMbC4b0ninhyarbYEfOp48cxjJmIv6x142/IQTVjFXMrpNRYo +t2zXW/W3AgMBAAECggEAZi9XyOCM63t+CR+ptSzli8nf1x0dYFgV7f9WZa6Dpq3M +6M/Iuo/0zK/1knlFY2rFtrY1yOPgwPqdHCUuGlV0/jAer1YK/PvONU/1xwFwgk7u +2g3jPrTvVESSCKSchD9376Sqt90OMLoHUVigbLz9/5xD1nnLQf8eHBVBpqC2mM5a +ObNqtPGNfxcW7Glk3kIH/xo2zuNXFl2v0h1THLqcRCZHzsySo0DQ6xn4gmWipWzw +W/6YXS4x2DxxcX7dyzmU0iFp7ppkK90J/fQ1gQ7f1754GIsTMRYSVbrTgQ2ORCO6 +vS9oZWMXKWOyQy5guhof/vbogJQTAjJC3oEPy92VYQKBgQDX/2ZLfQuSIuvPSUFx +8LhahDAzO7ZVH0UenRIxxp3oW2tiJUCKZosZWkP44PpfTNwqCGTf893cshz71jX5 +AfBgJ/FhCr81nbXV3CyrcmqRzaxE3eOpLaVE+Vx4/qHOr1oaXN/1+0vlUKyUY2V1 +tP7pv1z63qlGGl49MJb71MHhPwKBgQDELq7KWn9+f9KvsulUB7qj9pkslN3AV1l/ +iu4UNE7sg2yc8srDeO7o7MgIgk2qijI+L0LLsCMHjXC84BmmcPO//7Elmr+h9SDN +UFQACiWWDh1wPXTgqvVfj48UzHC8T8UoG58Yrer4fsXQCIdNE1t7SyMd+8fvHypw +vKxq54/ViQKBgDJgYcZXarxxopfc2QOvBgAudmNsmNDvkxpZveWYEjogIEJqt8vP +sL9/+vxv1FUnwu2WuZg181fGvtXJlxr1Zc+3YSel7wSdPMydJlnyPIK2+mexbKiH +edVFZ1jc4nYnFZeyc5WWP5RDJY0SRZaXWSDBPflQtyAfhD03OO+RJorXAoGAJgju +9mhpQ3tAu7OyLQp6kwNiWxRZkcrdnS6wTdZ+Xrh0PFGOIiu2Fg6iEZRBvoigiRHc +n2T8xaAUdWn1TyGjAFxwWdwQvzOpMmUahA9zjg4agwJHQK+kdux8Twn76WaF0Ora +A4zke10IuPaOVNEl8Vd17YA9GQ0vyz+pJejTKBECgYEAjm/D2DWNrap61C7TFfSI +fd11O1vLiTnWs81w2xjA8qlwTugH4avwoHrnRweDL+EQWfaxdMVlSV3+73Be117e +IAauSgbdE8xdl8UdjLSGZnjTAG70k8UcBeCKez7bs0f0fUooIPxqCJnbIIUP7GMD +XOZPHZ7suxe6Ysa1ivyuj1M= +-----END PRIVATE KEY----- diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 9249ea3f..61adca66 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -54,6 +54,10 @@ { "id": "postman", "displayName": "Postman" + }, + { + "id": "shr", + "displayName": "Shared Health Record" } ], "systems": { @@ -66,7 +70,7 @@ }, "nationalid": { "uri": "http://moh.bw.org/ext/identifier/omang", - "displayName": "National ID - Omang" + "displayName": "National ID - OMANG" }, "artnumber": { "uri": "http://moh.bw.org/ext/identifier/pi", @@ -77,7 +81,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2022-09-27T17:46:24" + "lastFHIR2ESSync": "2022-09-22T17:44:46" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/openhim-console/default.json b/configs/openhim-console/default.json index 0b5e4498..7e7e940b 100644 --- a/configs/openhim-console/default.json +++ b/configs/openhim-console/default.json @@ -2,9 +2,9 @@ "version": "1.13.2", "minimumCoreVersion": "5.2.0", "protocol": "https", - "host": "localhost", + "host": "hie-pilot.gov.bw", "hostPath": "", - "port": "8091", + "port": "8090", "title": "Botswana HIE Admin Console", "footerTitle": "OpenHIM Administration Console", "footerPoweredBy": "Powered by OpenHIM", diff --git a/configs/shr/config.json b/configs/shr/config.json index 188a6f98..45319025 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -1,50 +1,43 @@ { - "app": { - "port": 3000, - "mllpPort": 3001 - }, - "mllp": { - "targetIp": "localhost", - "targetPort": 2100, - "targetAdtPort": 2100, - "targetOrmPort": 2100 - }, - "mediator": { - "api": { - "username": "root@openhim.org", - "password": "openhim", - "apiURL": "https://openhim-core:8080", - "trustSelfSigned": true, - "urn": "urn:mediator:bw-shared-health-record" + "app": { + "port": 3000, + "mllpPort": 3001 }, - "client": { - "id": "shr-client", - "password": "shr-client" - } - }, - "fhirServer": { - "baseURL": "http://shr-fhir:8080/fhir" - }, - "clientRegistryUrl": "http://openhim-core:5001/CR/fhir", - "fhirConverterUrl": "http://openhim-core:5001/72f", - "taskRunner": { - "brokers": [ - "kafka:9092" - ] - }, - "bwConfig": { - "pimsSystemUrl": "https://api.openconceptlab.org/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/", - "omangSystemUrl": "http://moh.bw.org/ext/identifier/omang", - "oclUrl": "https://api.openconceptlab.org", - "requestTimeout": 10000, - "toIpmsAdtTemplate": "ADT_A04_TO_IPMS.hbs", - "fromIpmsAdtTemplate": "ADT_A04_FROM_IPMS.hbs", - "toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs", - "fromIpmsOruTemplate": "ORU_R01_FROM_IPMS.hbs", - "mllp": { - "targetIp": "localhost", - "targetAdtPort": 2100, - "targetOrmPort": 2100 + "mediator": { + "api": { + "username": "root@openhim.org", + "password": "openhim", + "apiURL": "https://openhim-core:8080", + "trustSelfSigned": true, + "urn": "urn:mediator:bw-shared-health-record" + }, + "client": { + "id": "shr-client", + "password": "shr-client" + } + }, + "fhirServer": { + "baseURL": "http://shr-fhir:8080/fhir" + }, + "clientRegistryUrl": "http://openhim-core:5001/CR/fhir", + "fhirConverterUrl": "http://openhim-core:5001/72f", + "taskRunner": { + "brokers": [ + "kafka:9092" + ] }, + "bwConfig": { + "pimsSystemUrl": "https://api.openconceptlab.org/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/", + "omangSystemUrl": "http://moh.bw.org/ext/identifier/omang", + "oclUrl": "https://api.openconceptlab.org", + "requestTimeout": 10000, + "toIpmsAdtTemplate": "ADT_A04_TO_IPMS.hbs", + "fromIpmsAdtTemplate": "ADT_A04_FROM_IPMS.hbs", + "toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs", + "fromIpmsOruTemplate": "ORU_R01_FROM_IPMS.hbs", + "mllp": { + "targetIp": "10.175.5.69", + "targetAdtPort": 3001, + "targetOrmPort": 3002 + } } } -} diff --git a/configs/traefik/certs.yml b/configs/traefik/certs.yml index 19571b3b..0a1775b3 100644 --- a/configs/traefik/certs.yml +++ b/configs/traefik/certs.yml @@ -1,4 +1,4 @@ tls: certificates: - - certFile: /etc/certs/live/moh.org.bw/fullchain.pem - keyFile: /etc/certs/live/moh.org.bw/privkey.pem + - certFile: /etc/certs/selfsigned.crt + keyFile: /etc/certs/selfsigned.key diff --git a/configs/traefik/traefik.yml b/configs/traefik/traefik.yml index 20f0d5de..d8004132 100644 --- a/configs/traefik/traefik.yml +++ b/configs/traefik/traefik.yml @@ -5,11 +5,6 @@ serversTransport: entryPoints: web: address: ":80" - http: - redirections: - entrypoint: - to: web-secure - scheme: https web-secure: address: :443 api: diff --git a/dist/package/.gitkeep b/dist/package/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docker-compose.yml b/docker-compose.yml index 930ff8cf..5587dbd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,38 +23,20 @@ services: ports: - '80:80' - '443:443' - - '8080:8080' volumes: - /var/run/docker.sock:/var/run/docker.sock - ./configs/traefik/traefik.yml:/etc/traefik/traefik.yml - ./configs/traefik/certs.yml:/etc/traefik/dynamic_conf/certs.yml - - certs:/etc/certs + - ./certs:/etc/certs networks: - hie labels: - - 'traefik.enable=true' - - 'traefik.docker.network=hie-botswana_hie' - - "traefik.http.routers.api.rule=Host(`traefik.moh.org.bw`)" - - "traefik.http.routers.api.service=api@internal" - - 'traefik.http.routers.api.tls=true' - - 'traefik.http.routers.api.entrypoints=web-secure' - # - "traefik.http.routers.api.middlewares=auth" - # - "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" - - ## TODO: Set up Traefik for AWS DNS properly and remove - certbot: - image: certbot/dns-route53 - container_name: certbot - entrypoint: "certbot certonly -n --agree-tos --email pmanko@uw.edu -d 'moh.org.bw' -d '*.moh.org.bw' --dns-route53 --preferred-challenges=dns" - environment: - - AWS_ACCESS_KEY_ID - - AWS_SECRET_ACCESS_KEY - volumes: - - certs:/etc/letsencrypt - - letsencrypt:/var/lib/letsencrypt - networks: - - hie - + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - "traefik.http.routers.api.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/dashboard`) || PathPrefix(`/api`)" + - "traefik.http.routers.api.service=api@internal" + - 'traefik.http.routers.api.tls=true' + - 'traefik.http.routers.api.entrypoints=web-secure' ### # OpenCR ### @@ -80,9 +62,7 @@ services: - 'traefik.http.routers.opencr.tls=true' - 'traefik.http.routers.opencr.entrypoints=web-secure' - 'traefik.http.services.opencr.loadbalancer.server.port=3000' - - 'traefik.http.routers.opencr.rule=Host(`opencr.moh.org.bw`)' - ports: - - 3000:3000 + - 'traefik.http.routers.opencr.rule=Host(`opencr.hie-pilot.gov.bw`)' opencr-fhir: image: hapiproject/hapi:latest container_name: opencr-fhir @@ -139,7 +119,6 @@ services: - ./configs/shr/config.json:/app/config/config_docker.json - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: - - 4000:3000 - 3001:3001 - 3002:3002 shr-fhir: @@ -181,6 +160,11 @@ services: volumes: - ./configs/openhim/healthcheck.js:/healthcheck.js # - ./configs/openhim/config.json:/app/config/default.json + ports: + - 8090:8080 + - 8081:5000 + - 8080:5001 + labels: - 'traefik.enable=true' - 'traefik.docker.network=hie-botswana_hie' @@ -190,19 +174,32 @@ services: - 'traefik.http.routers.openhim-api.service=openhim-api' - 'traefik.http.routers.openhim-api.tls=true' - 'traefik.http.routers.openhim-api.entrypoints=web-secure' - - 'traefik.http.routers.openhim-api.rule=Host(`core.moh.org.bw`)' - - - 'traefik.http.services.openhim-core.loadbalancer.server.port=5000' - - 'traefik.http.services.openhim-core.loadbalancer.server.scheme=https' - - 'traefik.http.routers.openhim-core.service=openhim-core' - - 'traefik.http.routers.openhim-core.tls=true' - - 'traefik.http.routers.openhim-core.entrypoints=web-secure' - - 'traefik.http.routers.openhim-core.rule=Host(`openhim.moh.org.bw`)' - ports: - - 5000:5000 - - 5001:5001 - - 8091:8080 + - 'traefik.http.routers.openhim-api.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-api`)' + - 'traefik.http.routers.openhim-api.middlewares=openhim-api' + - 'traefik.http.middlewares.openhim-api.stripprefix.prefixes=/openhim-api' + - 'traefik.http.middlewares.openhim-api.stripprefix.forceSlash=false' + + + - 'traefik.http.services.openhim-ssl.loadbalancer.server.port=5000' + - 'traefik.http.services.openhim-ssl.loadbalancer.server.scheme=https' + - 'traefik.http.routers.openhim-ssl.service=openhim-ssl' + - 'traefik.http.routers.openhim-ssl.tls=true' + - 'traefik.http.routers.openhim-ssl.entrypoints=web-secure' + - 'traefik.http.routers.openhim-ssl.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-ssl`)' + - 'traefik.http.routers.openhim-ssl.middlewares=openhim-ssl' + - 'traefik.http.middlewares.openhim-ssl.stripprefix.prefixes=/openhim-ssl' + - 'traefik.http.middlewares.openhim-ssl.stripprefix.forceSlash=false' + - 'traefik.http.services.openhim-http.loadbalancer.server.port=5001' + - 'traefik.http.services.openhim-http.loadbalancer.server.scheme=http' + - 'traefik.http.routers.openhim-http.service=openhim-http' + - 'traefik.http.routers.openhim-http.tls=false' + - 'traefik.http.routers.openhim-http.entrypoints=web' + - 'traefik.http.routers.openhim-http.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-http`)' + - 'traefik.http.routers.openhim-http.middlewares=openhim-http' + - 'traefik.http.middlewares.openhim-http.stripprefix.prefixes=/openhim-http' + - 'traefik.http.middlewares.openhim-http.stripprefix.forceSlash=false' + openhim-console: container_name: openhim-console hostname: openhim-console @@ -220,7 +217,7 @@ services: - 'traefik.docker.network=hie-botswana_hie' - 'traefik.http.routers.openhim-console.tls=true' - 'traefik.http.routers.openhim-console.entrypoints=web-secure' - - 'traefik.http.routers.openhim-console.rule=Host(`moh.org.bw`)' + - 'traefik.http.routers.openhim-console.rule=Host(`hie-pilot.gov.bw`)' networks: - hie ports: @@ -259,9 +256,16 @@ services: - 'traefik.docker.network=hie-botswana_hie' - 'traefik.http.routers.converter.tls=true' - 'traefik.http.routers.converter.entrypoints=web-secure' - - 'traefik.http.routers.converter.rule=Host(`converter.moh.org.bw`)' + - 'traefik.http.routers.converter.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/converter`)' + - 'traefik.http.routers.converter.middlewares=converter' + - 'traefik.http.middlewares.converter.stripprefix.prefixes=/converter' + - 'traefik.http.middlewares.converter.stripprefix.forceSlash=false' + - 'traefik.http.services.converter.loadbalancer.server.port=2019' + - 'traefik.http.services.converter.loadbalancer.server.scheme=http' + - 'traefik.http.routers.converters.service=converter' + ports: - - 4002:2019 + - 8093:2019 # Kafka zookeeper: image: "bitnami/zookeeper:latest" @@ -275,10 +279,10 @@ services: volumes: - /data kafka: + restart: unless-stopped image: "bitnami/kafka:latest" hostname: kafka container_name: kafka - restart: unless-stopped environment: - KAFKA_BROKER_ID=1 - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092 @@ -324,7 +328,6 @@ services: - 1521:1521 volumes: - ./configs/omang/db:/docker-entrypoint-initdb.d - networks: - hie volumes: diff --git a/index.html b/index.html new file mode 100644 index 00000000..93be2358 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +[{"external_id":"548e3533-ce79-4600-906e-5a0efbb4bbba","retired":false,"map_type":"SAME-AS","source":"PIMS-LAB-TEST-DICT","owner":"B-TECHBW","owner_type":"Organization","from_concept_code":"3","from_concept_name":null,"from_concept_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/concepts/3/","to_concept_code":"856","to_concept_name":"HIV viral load","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/856/","from_source_owner":"B-TECHBW","from_source_owner_type":"Organization","from_source_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/","from_source_name":"PIMS-LAB-TEST-DICT","to_source_owner":"CIEL","to_source_owner_type":"Organization","to_source_url":"/orgs/CIEL/sources/CIEL/","to_source_name":"CIEL","url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/","version":"824989","id":"631372","versioned_object_id":631372,"versioned_object_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/","is_latest_version":true,"update_comment":null,"version_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/824989/","uuid":"824989","version_created_on":"2021-08-01T03:15:58.469306Z","from_source_version":null,"to_source_version":null,"from_concept_name_resolved":"3 - Viral load","to_concept_name_resolved":"HIV viral load","type":"Mapping","references":["/orgs/B-TECHBW/collections/PIMS-LAB-TEST-DICT/references/181300/"],"previous_version_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/631373/"}] \ No newline at end of file From ad8a45d67f3c99fa323b0f635dcdbecfae2bf7ce Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Thu, 12 Jan 2023 17:41:31 +0200 Subject: [PATCH 09/12] Outdated changes --- .env | 2 +- configs/opencr/config.json | 15 ++++++++------- configs/shr/config.json | 4 ++-- docker-compose.yml | 14 ++++++++++---- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.env b/.env index e730ee3e..c142e42d 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ SHR_VERSION=v0.8.0 FHIR_CONVERTER_VERSION=v3.3.0-beta -OMANG_SVC_VERSION=v1.6.3 \ No newline at end of file +OMANG_SVC_VERSION=v1.6.5 \ No newline at end of file diff --git a/configs/opencr/config.json b/configs/opencr/config.json index 61adca66..ed26d4ba 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -47,24 +47,25 @@ "id": "tester", "displayName": "PIMS" }, - { - "id": "shr", - "displayName": "SHR" - }, { "id": "postman", "displayName": "Postman" }, { - "id": "shr", + "id": "shr-client", "displayName": "Shared Health Record" + }, + { + "id": "omang-api", + "displayName": "Omang Service" } ], "systems": { "CRBaseURI": "http://openclientregistry.org/fhir", "internalid": { "uri": [ - "http://moh.bw.org/ext/identifier/mr" + "http://moh.bw.org/ext/identifier/mr", + "http://omang.bw.org/ext/identifier/internalid" ], "displayName": "Internal ID" }, @@ -81,7 +82,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2022-09-22T17:44:46" + "lastFHIR2ESSync": "2023-01-06T03:12:10" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/shr/config.json b/configs/shr/config.json index 45319025..0e134f49 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -12,7 +12,7 @@ "urn": "urn:mediator:bw-shared-health-record" }, "client": { - "id": "shr-client", + "username": "shr-client", "password": "shr-client" } }, @@ -29,7 +29,7 @@ "pimsSystemUrl": "https://api.openconceptlab.org/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/", "omangSystemUrl": "http://moh.bw.org/ext/identifier/omang", "oclUrl": "https://api.openconceptlab.org", - "requestTimeout": 10000, + "requestTimeout": 60000, "toIpmsAdtTemplate": "ADT_A04_TO_IPMS.hbs", "fromIpmsAdtTemplate": "ADT_A04_FROM_IPMS.hbs", "toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs", diff --git a/docker-compose.yml b/docker-compose.yml index 5587dbd4..ebfe930c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,8 +63,10 @@ services: - 'traefik.http.routers.opencr.entrypoints=web-secure' - 'traefik.http.services.opencr.loadbalancer.server.port=3000' - 'traefik.http.routers.opencr.rule=Host(`opencr.hie-pilot.gov.bw`)' + ports: + - 8087:3000 opencr-fhir: - image: hapiproject/hapi:latest + image: hapiproject/hapi:v5.1.0 container_name: opencr-fhir hostname: opencr-fhir restart: unless-stopped @@ -120,7 +122,7 @@ services: - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: - 3001:3001 - - 3002:3002 + - 3002:3001 shr-fhir: image: hapiproject/hapi:latest container_name: shr-fhir @@ -299,7 +301,7 @@ services: entrypoint: sh -c 'sleep 30 && /opt/bitnami/scripts/kafka/entrypoint.sh /opt/bitnami/scripts/kafka/run.sh' # prevent zookeeper conflict error omang-api: - image: ghcr.io/b-techbw/omangsvc:${OMANG_SVC_VERSION-latest} + image: ghcr.io/i-tech-uw/omangsvc:${OMANG_SVC_VERSION-latest} hostname: omang-api container_name: omang-api restart: unless-stopped @@ -312,7 +314,11 @@ services: - 'traefik.docker.network=hie-botswana_hie' - 'traefik.http.routers.omang.tls=true' - 'traefik.http.routers.omang.entrypoints=web-secure' - - 'traefik.http.routers.omang.rule=Host(`omang.moh.org.bw`)' + - 'traefik.http.routers.omang.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/omang`)' + - 'traefik.http.routers.omang.middlewares=omang' + - 'traefik.http.middlewares.omang.stripprefix.prefixes=/omang' + - 'traefik.http.middlewares.omang.stripprefix.forceSlash=false' + environment: - TZ=GMT From 893b4a61ac426e44be0ec4a2c2f7b57cfcb1a4bc Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Fri, 20 Jan 2023 07:02:58 +0000 Subject: [PATCH 10/12] Merge fixes --- docker-compose.pilot.yml | 357 +++++++++++++++++++++++++++++++++++++++ index.html | 1 - 2 files changed, 357 insertions(+), 1 deletion(-) create mode 100644 docker-compose.pilot.yml delete mode 100644 index.html diff --git a/docker-compose.pilot.yml b/docker-compose.pilot.yml new file mode 100644 index 00000000..ebfe930c --- /dev/null +++ b/docker-compose.pilot.yml @@ -0,0 +1,357 @@ +version: '3.8' + +## Port Assignments: +## See .env file + +## Container debugging: +# 1. append the following lines to desired container +# 2. boot up the container using `docker-compose up -d` +# 3 run `docker exec -it bash` to start interactive shell +# +# tty: true +# stdin_open: true +# entrypoint: bash + +services: + ### + # reverse proxy + ### + traefik: + image: traefik:v2.8.3 + container_name: traefik + restart: unless-stopped + ports: + - '80:80' + - '443:443' + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./configs/traefik/traefik.yml:/etc/traefik/traefik.yml + - ./configs/traefik/certs.yml:/etc/traefik/dynamic_conf/certs.yml + - ./certs:/etc/certs + networks: + - hie + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - "traefik.http.routers.api.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/dashboard`) || PathPrefix(`/api`)" + - "traefik.http.routers.api.service=api@internal" + - 'traefik.http.routers.api.tls=true' + - 'traefik.http.routers.api.entrypoints=web-secure' + ### + # OpenCR + ### + opencr: + container_name: opencr + hostname: opencr + image: intrahealth/opencr:latest #76efe76 + restart: unless-stopped + environment: + - NODE_ENV=docker + - HAPI_FHIR_URL=http://opencr-fhir:8080/fhir/metadata + networks: + - hie + volumes: + - ./configs/opencr/config.json:/src/server/config/config_docker.json + - ./configs/opencr/mediator.json:/src/server/config/mediator.json + - ./configs/opencr/decisionRules.json:/src/server/config/decisionRules.json + - ./configs/opencr/PatientRelationship.json:/src/resources/Relationships/PatientRelationship.json + + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - 'traefik.http.routers.opencr.tls=true' + - 'traefik.http.routers.opencr.entrypoints=web-secure' + - 'traefik.http.services.opencr.loadbalancer.server.port=3000' + - 'traefik.http.routers.opencr.rule=Host(`opencr.hie-pilot.gov.bw`)' + ports: + - 8087:3000 + opencr-fhir: + image: hapiproject/hapi:v5.1.0 + container_name: opencr-fhir + hostname: opencr-fhir + restart: unless-stopped + networks: + - hie + healthcheck: + test: "curl -sS http://opencr-fhir:8080/fhir/metadata || exit 1" + interval: 90s + timeout: 30s + retries: 3 + ports: + - 8082:8080 + volumes: + - cr-data:/data/hapi + + es: + container_name: es + hostname: es + image: intrahealth/elasticsearch:latest + restart: unless-stopped + environment: + - node.name=es01 + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m" + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - es:/usr/share/elasticsearch/data + networks: + - hie + healthcheck: + test: "curl --silent --fail http://localhost:9200/_cluster/health || exit 1" + + ### + # SHR + ### + shr: + profiles: + - debug + container_name: shr + hostname: shr + image: ghcr.io/i-tech-uw/shared-health-record:${SHR_VERSION-latest} + restart: unless-stopped + environment: + - NODE_ENV=docker + networks: + - hie + volumes: + - ./configs/shr/config.json:/app/config/config_docker.json + - ./configs/shr/mediator.json:/app/config/mediator_docker.json + ports: + - 3001:3001 + - 3002:3001 + shr-fhir: + image: hapiproject/hapi:latest + container_name: shr-fhir + hostname: shr-fhir + restart: unless-stopped + volumes: + - shr-data:/data/hapi + networks: + - hie + healthcheck: + test: "curl -sS http://shr-fhir:8080/fhir/metadata || exit 1" + interval: 30s + timeout: 30s + retries: 3 + ports: + - 8099:8080 + + ### + # OpenHIM + ### + openhim-core: + container_name: openhim-core + hostname: openhim-core + image: jembi/openhim-core:latest + restart: unless-stopped + environment: + mongo_url: "mongodb://mongo-db/openhim" + mongo_atnaUrl: "mongodb://mongo-db/openhim" + NODE_ENV: "development" + healthcheck: + test: "node /healthcheck.js" + interval: 20s + timeout: 20s + retries: 2 + networks: + - hie + volumes: + - ./configs/openhim/healthcheck.js:/healthcheck.js + # - ./configs/openhim/config.json:/app/config/default.json + ports: + - 8090:8080 + - 8081:5000 + - 8080:5001 + + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + + - 'traefik.http.services.openhim-api.loadbalancer.server.port=8080' + - 'traefik.http.services.openhim-api.loadbalancer.server.scheme=https' + - 'traefik.http.routers.openhim-api.service=openhim-api' + - 'traefik.http.routers.openhim-api.tls=true' + - 'traefik.http.routers.openhim-api.entrypoints=web-secure' + - 'traefik.http.routers.openhim-api.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-api`)' + - 'traefik.http.routers.openhim-api.middlewares=openhim-api' + - 'traefik.http.middlewares.openhim-api.stripprefix.prefixes=/openhim-api' + - 'traefik.http.middlewares.openhim-api.stripprefix.forceSlash=false' + + + - 'traefik.http.services.openhim-ssl.loadbalancer.server.port=5000' + - 'traefik.http.services.openhim-ssl.loadbalancer.server.scheme=https' + - 'traefik.http.routers.openhim-ssl.service=openhim-ssl' + - 'traefik.http.routers.openhim-ssl.tls=true' + - 'traefik.http.routers.openhim-ssl.entrypoints=web-secure' + - 'traefik.http.routers.openhim-ssl.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-ssl`)' + - 'traefik.http.routers.openhim-ssl.middlewares=openhim-ssl' + - 'traefik.http.middlewares.openhim-ssl.stripprefix.prefixes=/openhim-ssl' + - 'traefik.http.middlewares.openhim-ssl.stripprefix.forceSlash=false' + + - 'traefik.http.services.openhim-http.loadbalancer.server.port=5001' + - 'traefik.http.services.openhim-http.loadbalancer.server.scheme=http' + - 'traefik.http.routers.openhim-http.service=openhim-http' + - 'traefik.http.routers.openhim-http.tls=false' + - 'traefik.http.routers.openhim-http.entrypoints=web' + - 'traefik.http.routers.openhim-http.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/openhim-http`)' + - 'traefik.http.routers.openhim-http.middlewares=openhim-http' + - 'traefik.http.middlewares.openhim-http.stripprefix.prefixes=/openhim-http' + - 'traefik.http.middlewares.openhim-http.stripprefix.forceSlash=false' + + openhim-console: + container_name: openhim-console + hostname: openhim-console + image: jembi/openhim-console:latest + restart: unless-stopped + volumes: + - ./configs/openhim-console/default.json:/usr/share/nginx/html/config/default.json + healthcheck: + test: "curl -sS http://openhim-console || exit 1" + interval: 10s + timeout: 60s + retries: 3 + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - 'traefik.http.routers.openhim-console.tls=true' + - 'traefik.http.routers.openhim-console.entrypoints=web-secure' + - 'traefik.http.routers.openhim-console.rule=Host(`hie-pilot.gov.bw`)' + networks: + - hie + ports: + - 4001:80 + + # Loads Default OpenHIM Config + openhim-config: + container_name: openhim-config + image: ghcr.io/i-tech-uw/openhim-config:v0.0.0 + volumes: + - ./configs/openhim/test-openhim-config.json:/app/test-openhim-config.json + networks: + - hie + + mongo-db: + container_name: mongo-db + image: mongo:3.4 + volumes: + - "mongo-data:/data/db" + restart: unless-stopped + networks: + - hie + + fhir-converter: + container_name: fhir-converter + hostname: fhir-converter + restart: unless-stopped + image: ghcr.io/b-techbw/openhim-mediator-fhir-converter:${FHIR_CONVERTER_VERSION-latest} + volumes: + - ./configs/fhir-converter/config.json:/app/config.json + - ./configs/fhir-converter/templates:/app/data/service-templates + networks: + - hie + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - 'traefik.http.routers.converter.tls=true' + - 'traefik.http.routers.converter.entrypoints=web-secure' + - 'traefik.http.routers.converter.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/converter`)' + - 'traefik.http.routers.converter.middlewares=converter' + - 'traefik.http.middlewares.converter.stripprefix.prefixes=/converter' + - 'traefik.http.middlewares.converter.stripprefix.forceSlash=false' + - 'traefik.http.services.converter.loadbalancer.server.port=2019' + - 'traefik.http.services.converter.loadbalancer.server.scheme=http' + - 'traefik.http.routers.converters.service=converter' + + ports: + - 8093:2019 + # Kafka + zookeeper: + image: "bitnami/zookeeper:latest" + container_name: zookeeper + restart: unless-stopped + hostname: zookeeper + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + networks: + - hie + volumes: + - /data + kafka: + restart: unless-stopped + image: "bitnami/kafka:latest" + hostname: kafka + container_name: kafka + environment: + - KAFKA_BROKER_ID=1 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 + - ALLOW_PLAINTEXT_LISTENER=yes + - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true + volumes: + - kafka-data:/bitnami/kafka + depends_on: + - zookeeper + networks: + - hie + entrypoint: sh -c 'sleep 30 && /opt/bitnami/scripts/kafka/entrypoint.sh /opt/bitnami/scripts/kafka/run.sh' # prevent zookeeper conflict error + + omang-api: + image: ghcr.io/i-tech-uw/omangsvc:${OMANG_SVC_VERSION-latest} + hostname: omang-api + container_name: omang-api + restart: unless-stopped + volumes: + - ./configs/omang/appsettings.json:/app/appsettings.json + networks: + - hie + labels: + - 'traefik.enable=true' + - 'traefik.docker.network=hie-botswana_hie' + - 'traefik.http.routers.omang.tls=true' + - 'traefik.http.routers.omang.entrypoints=web-secure' + - 'traefik.http.routers.omang.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/omang`)' + - 'traefik.http.routers.omang.middlewares=omang' + - 'traefik.http.middlewares.omang.stripprefix.prefixes=/omang' + - 'traefik.http.middlewares.omang.stripprefix.forceSlash=false' + + environment: + - TZ=GMT + + oracle-db: + hostname: oracle-db + container_name: oracle-db + restart: unless-stopped + image: wnameless/oracle-xe-11g-r2:latest + environment: + - ORACLE_ALLOW_REMOTE=true + - TZ=GMT + ports: + - 1521:1521 + volumes: + - ./configs/omang/db:/docker-entrypoint-initdb.d + networks: + - hie +volumes: + es: + driver: local + mongo-data: + driver: local + sqldata: + driver: local + shr-data: + driver: local + cr-data: + driver: local + certs: + driver: local + kafka-data: + driver: local + letsencrypt: + driver: local +networks: + hie: diff --git a/index.html b/index.html deleted file mode 100644 index 93be2358..00000000 --- a/index.html +++ /dev/null @@ -1 +0,0 @@ -[{"external_id":"548e3533-ce79-4600-906e-5a0efbb4bbba","retired":false,"map_type":"SAME-AS","source":"PIMS-LAB-TEST-DICT","owner":"B-TECHBW","owner_type":"Organization","from_concept_code":"3","from_concept_name":null,"from_concept_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/concepts/3/","to_concept_code":"856","to_concept_name":"HIV viral load","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/856/","from_source_owner":"B-TECHBW","from_source_owner_type":"Organization","from_source_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/","from_source_name":"PIMS-LAB-TEST-DICT","to_source_owner":"CIEL","to_source_owner_type":"Organization","to_source_url":"/orgs/CIEL/sources/CIEL/","to_source_name":"CIEL","url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/","version":"824989","id":"631372","versioned_object_id":631372,"versioned_object_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/","is_latest_version":true,"update_comment":null,"version_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/824989/","uuid":"824989","version_created_on":"2021-08-01T03:15:58.469306Z","from_source_version":null,"to_source_version":null,"from_concept_name_resolved":"3 - Viral load","to_concept_name_resolved":"HIV viral load","type":"Mapping","references":["/orgs/B-TECHBW/collections/PIMS-LAB-TEST-DICT/references/181300/"],"previous_version_url":"/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/mappings/631372/631373/"}] \ No newline at end of file From be5f1dcd9bc8d757613db5aa915e14c07f0265a1 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 11 Apr 2023 00:49:58 +0200 Subject: [PATCH 11/12] Lab Testing Updates --- configs/opencr/config.json | 5 +- configs/shr/application.yml | 199 ++++++++++++++++++++++++++++++++++++ configs/shr/config.json | 84 ++++++++------- docker-compose.yml | 25 ++++- 4 files changed, 268 insertions(+), 45 deletions(-) create mode 100644 configs/shr/application.yml diff --git a/configs/opencr/config.json b/configs/opencr/config.json index ed26d4ba..69551378 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -65,7 +65,8 @@ "internalid": { "uri": [ "http://moh.bw.org/ext/identifier/mr", - "http://omang.bw.org/ext/identifier/internalid" + "http://omang.bw.org/ext/identifier/internalid", + "http://openelis-global.org/pat_nationalId" ], "displayName": "Internal ID" }, @@ -82,7 +83,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2023-01-06T03:12:10" + "lastFHIR2ESSync": "2023-04-04T22:03:09" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/configs/shr/application.yml b/configs/shr/application.yml new file mode 100644 index 00000000..48ad2063 --- /dev/null +++ b/configs/shr/application.yml @@ -0,0 +1,199 @@ +#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration +#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints +management: + endpoints: + web: + exposure: + include: "health,prometheus" +spring: + main: + allow-circular-references: true + #allow-bean-definition-overriding: true + flyway: + enabled: false + check-location: false + baselineOnMigrate: true + datasource: + url: 'jdbc:h2:file:./target/database/h2' + #url: jdbc:h2:mem:test_mem + username: sa + password: null + driverClassName: org.h2.Driver + max-active: 15 + + # database connection pool size + hikari: + maximum-pool-size: 10 + jpa: + properties: + hibernate.format_sql: false + hibernate.show_sql: false + #Hibernate dialect is automatically detected except Postgres and H2. + #If using H2, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect + #If using postgres, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect + + hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect + # hibernate.hbm2ddl.auto: update + # hibernate.jdbc.batch_size: 20 + # hibernate.cache.use_query_cache: false + # hibernate.cache.use_second_level_cache: false + # hibernate.cache.use_structured_entries: false + # hibernate.cache.use_minimal_puts: false + ### These settings will enable fulltext search with lucene or elastic + hibernate.search.enabled: true + ### lucene parameters +# hibernate.search.backend.type: lucene +# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiLuceneAnalysisConfigurer +# hibernate.search.backend.directory.type: local-filesystem +# hibernate.search.backend.directory.root: target/lucenefiles +# hibernate.search.backend.lucene_version: lucene_current + ### elastic parameters ===> see also elasticsearch section below <=== +# hibernate.search.backend.type: elasticsearch +# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiElasticAnalysisConfigurer +hapi: + fhir: + ### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html) + openapi_enabled: true + ### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5 + fhir_version: R4 + ### enable to use the ApacheProxyAddressStrategy which uses X-Forwarded-* headers + ### to determine the FHIR server address + # use_apache_address_strategy: false + ### forces the use of the https:// protocol for the returned server address. + ### alternatively, it may be set using the X-Forwarded-Proto header. + # use_apache_address_strategy_https: false + ### enable to set the Server URL + # server_address: http://hapi.fhir.org/baseR4 + # defer_indexing_for_codesystems_of_size: 101 + # install_transitive_ig_dependencies: true + # implementationguides: + ### example from registry (packages.fhir.org) + # swiss: + # name: swiss.mednet.fhir + # version: 0.8.0 + # example not from registry + # ips_1_0_0: + # url: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz + # name: hl7.fhir.uv.ips + # version: 1.0.0 + # supported_resource_types: + # - Patient + # - Observation + ################################################## + # Allowed Bundle Types for persistence (defaults are: COLLECTION,DOCUMENT,MESSAGE) + ################################################## + # allowed_bundle_types: COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET + # allow_cascading_deletes: true + # allow_contains_searches: true + # allow_external_references: true + # allow_multiple_delete: true + # allow_override_default_search_params: true + auto_create_placeholder_reference_targets: true + # cql_enabled: true + # default_encoding: JSON + # default_pretty_print: true + # default_page_size: 20 + # delete_expunge_enabled: true + # enable_repository_validating_interceptor: true + # enable_index_missing_fields: false + # enable_index_of_type: true + # enable_index_contained_resource: false + ### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!! + ### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html + advanced_lucene_indexing: false + bulk_export_enabled: false + bulk_import_enabled: false + # enforce_referential_integrity_on_delete: false + # This is an experimental feature, and does not fully support _total and other FHIR features. + # enforce_referential_integrity_on_delete: false + # enforce_referential_integrity_on_write: false + # etag_support_enabled: true + # expunge_enabled: true + # client_id_strategy: ALPHANUMERIC + # fhirpath_interceptor_enabled: false + # filter_search_enabled: true + # graphql_enabled: true + # narrative_enabled: true + # mdm_enabled: true + # local_base_urls: + # - https://hapi.fhir.org/baseR4 + mdm_enabled: false + # partitioning: + # allow_references_across_partitions: false + # partitioning_include_in_search_hashes: false + cors: + allow_Credentials: true + # These are allowed_origin patterns, see: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/CorsConfiguration.html#setAllowedOriginPatterns-java.util.List- + allowed_origin: + - '*' + + # Search coordinator thread pool sizes + search-coord-core-pool-size: 20 + search-coord-max-pool-size: 100 + search-coord-queue-capacity: 200 + + # Threadpool size for BATCH'ed GETs in a bundle. + # bundle_batch_pool_size: 10 + # bundle_batch_pool_max_size: 50 + + # logger: + # error_format: 'ERROR - ${requestVerb} ${requestUrl}' + # format: >- + # Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] + # Operation[${operationType} ${operationName} ${idOrResourceName}] + # UA[${requestHeader.user-agent}] Params[${requestParameters}] + # ResponseEncoding[${responseEncodingNoDefault}] + # log_exceptions: true + # name: fhirtest.access + # max_binary_size: 104857600 + # max_page_size: 200 + # retain_cached_searches_mins: 60 + # reuse_cached_search_results_millis: 60000 + tester: + home: + name: Local Tester + server_address: 'http://localhost:8080/fhir' + refuse_to_fetch_third_party_urls: false + fhir_version: R4 + global: + name: Global Tester + server_address: "http://hapi.fhir.org/baseR4" + refuse_to_fetch_third_party_urls: false + fhir_version: R4 + # validation: + # requests_enabled: true + # responses_enabled: true + # binary_storage_enabled: true + inline_resource_storage_below_size: 4000 +# bulk_export_enabled: true +# subscription: +# resthook_enabled: true +# websocket_enabled: false +# email: +# from: some@test.com +# host: google.com +# port: +# username: +# password: +# auth: +# startTlsEnable: +# startTlsRequired: +# quitWait: +# lastn_enabled: true +# store_resource_in_lucene_index_enabled: true +### This is configuration for normalized quantity serach level default is 0 +### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default +### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED +### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED +# normalized_quantity_search_level: 2 +#elasticsearch: +# debug: +# pretty_print_json_log: false +# refresh_after_write: false +# enabled: false +# password: SomePassword +# required_index_status: YELLOW +# rest_url: 'localhost:9200' +# protocol: 'http' +# schema_management_strategy: CREATE +# username: SomeUsername \ No newline at end of file diff --git a/configs/shr/config.json b/configs/shr/config.json index 0e134f49..ca1e6249 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -1,43 +1,49 @@ { - "app": { - "port": 3000, - "mllpPort": 3001 + "app": { + "port": 3000, + "mllpPort": 3001 + }, + "mediator": { + "api": { + "username": "root@openhim.org", + "password": "openhim", + "apiURL": "https://openhim-core:8080", + "trustSelfSigned": true, + "urn": "urn:mediator:shared-health-record" }, - "mediator": { - "api": { - "username": "root@openhim.org", - "password": "openhim", - "apiURL": "https://openhim-core:8080", - "trustSelfSigned": true, - "urn": "urn:mediator:bw-shared-health-record" - }, - "client": { - "username": "shr-client", - "password": "shr-client" - } - }, - "fhirServer": { - "baseURL": "http://shr-fhir:8080/fhir" - }, - "clientRegistryUrl": "http://openhim-core:5001/CR/fhir", - "fhirConverterUrl": "http://openhim-core:5001/72f", - "taskRunner": { - "brokers": [ - "kafka:9092" - ] }, - "bwConfig": { - "pimsSystemUrl": "https://api.openconceptlab.org/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/", - "omangSystemUrl": "http://moh.bw.org/ext/identifier/omang", - "oclUrl": "https://api.openconceptlab.org", - "requestTimeout": 60000, - "toIpmsAdtTemplate": "ADT_A04_TO_IPMS.hbs", - "fromIpmsAdtTemplate": "ADT_A04_FROM_IPMS.hbs", - "toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs", - "fromIpmsOruTemplate": "ORU_R01_FROM_IPMS.hbs", - "mllp": { - "targetIp": "10.175.5.69", - "targetAdtPort": 3001, - "targetOrmPort": 3002 - } + "client": { + "username": "shr-client", + "password": "shr-client" + } + }, + "fhirServer": { + "baseURL": "http://shr-fhir:8080/fhir", + "username": "shr", + "password": "shr" + }, + "clientRegistryUrl": "http://openhim-core:5001/CR/fhir", + "fhirConverterUrl": "http://openhim-core:5001/72f", + "taskRunner": { + "brokers": [ + "kafka:9092" + ] + }, + "bwConfig": { + "pimsSystemUrl": "https://api.openconceptlab.org/orgs/I-TECH-UW/sources/PIMSLAB/", + "ipmsSystemUrl": "https://api.openconceptlab.org/orgs/I-TECH-UW/sources/IPMSLAB/", + "cielSystemUrl": "https://openconceptlab.org/orgs/CIEL/sources/CIEL", + "loincSystemUrl": "https://api.openconceptlab.org/orgs/Regenstrief/sources/LOINC/", + "omangSystemUrl": "http://moh.bw.org/ext/identifier/omang", + "oclUrl": "https://api.openconceptlab.org", + "requestTimeout": 60000, + "toIpmsAdtTemplate": "ADT_A04_TO_IPMS.hbs", + "fromIpmsAdtTemplate": "ADT_A04_FROM_IPMS.hbs", + "toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs", + "fromIpmsOruTemplate": "ORU_R01_FROM_IPMS.hbs", + "mllp": { + "targetIp": "10.175.5.69", + "targetAdtPort": 3001, + "targetOrmPort": 3002 } } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ebfe930c..671d0e27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,6 +37,16 @@ services: - "traefik.http.routers.api.service=api@internal" - 'traefik.http.routers.api.tls=true' - 'traefik.http.routers.api.entrypoints=web-secure' + certbot: + image: certbot/certbot + container_name: certbot + entrypoint: "certbot certonly --standalone -n --agree-tos --email pmanko@uw.edu -d hie-pilot.gov.bw" + volumes: + - certs:/etc/letsencrypt + - letsencrypt:/var/lib/letsencrypt + networks: + - hie + ### # OpenCR ### @@ -62,7 +72,9 @@ services: - 'traefik.http.routers.opencr.tls=true' - 'traefik.http.routers.opencr.entrypoints=web-secure' - 'traefik.http.services.opencr.loadbalancer.server.port=3000' - - 'traefik.http.routers.opencr.rule=Host(`opencr.hie-pilot.gov.bw`)' + - 'traefik.http.routers.opencr.rule=Host(`hie-pilot.gov.bw`) && PathPrefix(`/crux`) || PathPrefix(`/ocrux`)' + - 'traefik.http.services.opencr.loadbalancer.server.scheme=http' + - 'traefik.http.routers.opencr.service=opencr' ports: - 8087:3000 opencr-fhir: @@ -124,12 +136,13 @@ services: - 3001:3001 - 3002:3001 shr-fhir: - image: hapiproject/hapi:latest + image: hapiproject/hapi:latest-tomcat container_name: shr-fhir hostname: shr-fhir restart: unless-stopped volumes: - - shr-data:/data/hapi + # - ./configs/shr/app:/data/hapi + - ./configs/shr/application.yml:/data/hapi/application.yaml networks: - hie healthcheck: @@ -139,6 +152,11 @@ services: retries: 3 ports: - 8099:8080 + environment: + SPRING_CONFIG_LOCATION: 'file:///data/hapi/application.yaml' + # configs: + # - source: shr-hapi + # target: /data/hapi/application.yaml ### # OpenHIM @@ -250,7 +268,6 @@ services: image: ghcr.io/b-techbw/openhim-mediator-fhir-converter:${FHIR_CONVERTER_VERSION-latest} volumes: - ./configs/fhir-converter/config.json:/app/config.json - - ./configs/fhir-converter/templates:/app/data/service-templates networks: - hie labels: From 9aa7e9a1947cb2bc3c1f7ba0d28e98911e842a57 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Wed, 19 Apr 2023 06:30:46 -0700 Subject: [PATCH 12/12] CI fixes --- .github/workflows/main.yml | 6 +++--- docker-compose.yml | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7edadd7d..630370c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,14 +14,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USER }} diff --git a/docker-compose.yml b/docker-compose.yml index 671d0e27..901d13ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -119,8 +119,6 @@ services: # SHR ### shr: - profiles: - - debug container_name: shr hostname: shr image: ghcr.io/i-tech-uw/shared-health-record:${SHR_VERSION-latest}