Skip to content

Commit

Permalink
Sedish haiti updates (#48)
Browse files Browse the repository at this point in the history
* Server-side updates

* Streaming pipeline fixes

* Streaming pipeline fixes

* Fixed SHR hapi server configs

* lengthen intra-test time

* Minor run mods
  • Loading branch information
pmanko authored Dec 23, 2021
1 parent c5a15dc commit 9bef6ae
Show file tree
Hide file tree
Showing 17 changed files with 441 additions and 260 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: docker-compose -f docker-compose.ports.yml up -d shr-fhir opencr-fhir opencr-es kafka zookeeper isanteplus isanteplus-mysql

- name: Sleep for 1000 seconds
run: sleep 1000
run: sleep 1200
shell: bash

- name: Display docker logs for SHR & OpenCR
Expand All @@ -54,7 +54,7 @@ jobs:
run: docker-compose -f docker-compose.ports.yml up -d shr opencr streaming-pipeline

- name: Sleep for 30 seconds
run: sleep 30
run: sleep 60
shell: bash

- name: Display docker logs for OpenCR
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ server/log
*.log

hapi.properties

configs/shr/.env
configs/opencr-hapi/.env
configs/opencr/.env

configs/streaming-pipeline/data*
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ sudo docker-compose -f docker-compose.ports.yml up -d streaming-pipeline
```

## 4. Testing and Validation
Setup a Postman environment and run tests from this workspace: https://www.postman.com/itechuw/workspace/isanteplus-pilot

*Work in Progress*

Setup a Postman environment and run tests from this workspace: https://www.postman.com/itechuw/workspace/haiti-sedish

## 5. Domain-based setup
Follow section 3.2, but use the main `docker-compose.yml` file, so without the `-f` flag. Also, set up certificate generation like so:
Expand Down
12 changes: 7 additions & 5 deletions configs/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ http {

server {
listen 443 ssl;
server_name isanteplus-demo.sedish-haiti.org;
server_name isanteplus.sedish-haiti.org;

location / {
resolver 127.0.0.11 valid=30s;
Expand All @@ -101,14 +101,15 @@ http {
proxy_set_header Host $http_host;
proxy_redirect off;

set $upstream isanteplus-demo;
set $upstream isanteplus;
proxy_pass http://$upstream:8080;
}
}


server {
listen 443 ssl;
server_name isanteplus-test.sedish-haiti.org;
server_name shr-fhir.sedish-haiti.org;

location / {
resolver 127.0.0.11 valid=30s;
Expand All @@ -117,10 +118,11 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;

set $upstream isanteplus-test;
set $upstream shr-fhir;
proxy_pass http://$upstream:8080;
}
}


}
4 changes: 4 additions & 0 deletions configs/opencr/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CR_DATABASE_URL=
CR_DATABASE_USERNAME=
CR_DATABASE_PW=
JAVA_OPTS='-Dspring.datasource.url=${CR_DATABASE_URL} -Dspring.datasource.username=${CR_DATABASE_USERNAME} -Dspring.datasource.password=${CR_DATABASE_PW} -Dspring.datasource.driverClassName=org.postgresql.Driver'
90 changes: 90 additions & 0 deletions configs/opencr/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"auth": {
"secret": "3084e343-71bc-4247-86e4-ea210af82c28",
"tokenDuration": 5400
},
"app": {
"port": 3000,
"installed": false
},
"mediator": {
"api": {
"username": "[email protected]",
"password": "openhim",
"apiURL": "https://openhim-core:8080",
"trustSelfSigned": true,
"urn": "urn:mediator:haiti_clientregistry"
},
"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"
},
"clients": [
{
"id": "openmrs",
"displayName": "OpenMRS"
},
{
"id": "dhis2",
"displayName": "DHIS2"
},
{
"id": "lims",
"displayName": "Lab Info Management System"
},
{
"id": "cr",
"displayName": "Client Registry"
}
],
"matching": {
"tool": "elasticsearch"
},
"systems": {
"CRBaseURI": "http://openclientregistry.org/fhir",
"internalid": {
"uri": [
"http://health.go.ug/cr/internalid",
"http://clientregistry.org/openmrs",
"urn:ietf:rfc:3986",
"LOCAL",
"http://isanteplus.org/openmrs/fhir2/3-isanteplus-id"
],
"displayName": "Internal ID"
},
"nationalid": {
"uri": "http://isanteplus.org/openmrs/fhir2/5-code-national",
"displayName": "National ID"
},
"artnumber": {
"uri": "http://isanteplus.org/openmrs/fhir2/5-code-national",
"displayName": "ART Number"
},
"brokenMatch": {
"uri": "http://clientregistry.org/brokenMatch"
}
},
"sync": {
"lastFHIR2ESSync": "2021-12-22T22:32:42"
},
"__comments": {
"matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch"
}
}
2 changes: 1 addition & 1 deletion configs/opencr/config_ports.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
}
},
"sync": {
"lastFHIR2ESSync": "2021-12-17T22:15:02"
"lastFHIR2ESSync": "2021-12-22T21:58:58"
},
"__comments": {
"matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch"
Expand Down
29 changes: 14 additions & 15 deletions configs/opencr/mediator.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"urn": "urn:uuid:4bc42b2f-b5a8-473d-8207-5dd5c61f0c4a",
"version": "1.0.3",
"urn": "urn:mediator:haiti_clientregistry",
"version": "1.1.2",
"name": "Client Registry",
"description": "Haiti Client Registry",
"config": {
"fhirServer": {
"username": "hapi",
"password": "hapi",
"baseURL": "http://opencr-fhir:8080/fhir"
},
"elastic": {
Expand Down Expand Up @@ -44,7 +46,7 @@
"param": "password"
}
],
"values": ["","",""]
"values": []
},
{
"param": "elastic",
Expand Down Expand Up @@ -83,7 +85,7 @@
"param": "index"
}
],
"values": ["","","","",""]
"values": []
},
{
"param": "matching",
Expand All @@ -110,7 +112,7 @@
"requestBody": true,
"responseBody": true,
"name": "OpenCR Resource Endpoint",
"description": "Add or Get Resource in OpenCR",
"description": "Add or Get Resource Data From/To openCR",
"urlPattern": "^/CR/fhir$",
"matchContentRegex": null,
"matchContentXpath": null,
Expand All @@ -136,22 +138,19 @@
"type": "http",
"status": "enabled",
"forwardAuthHeader": false,
"name": "Add/Update/Get Resources",
"secured": true,
"name": "Add/Get Resources",
"secured": false,
"host": "opencr",
"port": 3000,
"path": "",
"pathTransform": "",
"pathTransform": "s/CR\\/fhir/fhir/g",
"primary": true,
"username": "",
"password": ""
}
],
"authType": "private",
"whitelist": [],
"allow": [
"openmrs"
],
"type": "http",
"methods": [
"GET",
Expand All @@ -168,13 +167,13 @@
"endpoints": [
{
"name": "Activate Client Registry",
"host": "opencr.sedish-haiti.org",
"path": "/fhir",
"port": 80,
"host": "opencr",
"path": "/",
"port": 3000,
"primary": true,
"forwardAuthHeader": false,
"status": "enabled",
"type": "http"
}
]
}
}
6 changes: 3 additions & 3 deletions configs/opencr/mediator_ports.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"urn": "urn:mediator:haiti_clientregistry",
"version": "1.1.1",
"version": "1.1.2",
"name": "Client Registry",
"description": "Haiti Client Registry",
"config": {
Expand Down Expand Up @@ -111,9 +111,9 @@
{
"requestBody": true,
"responseBody": true,
"name": "Add or Get Resource Data From/To openCR",
"name": "OpenCR Resource Endpoint",
"description": "Add or Get Resource Data From/To openCR",
"urlPattern": "/CR/fhir",
"urlPattern": "^/CR/fhir$",
"matchContentRegex": null,
"matchContentXpath": null,
"matchContentValue": null,
Expand Down
3 changes: 2 additions & 1 deletion configs/openhim-core/initial-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@
"type": "http",
"allow": [
"emr",
"test"
"test",
"pipeline"
],
"whitelist": [],
"authType": "private",
Expand Down
55 changes: 55 additions & 0 deletions configs/shr/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
spring:
datasource:
url: 'jdbc:h2:file:./target/database/h2'
username: sa
password: null
driverClassName: org.h2.Driver
max-active: 15

hikari:
maximum-pool-size: 10
flyway:
check-location: false
baselineOnMigrate: true
jpa:
properties:
hibernate.format_sql: false
hibernate.show_sql: false
batch:
job:
enabled: false
hapi:
fhir:
openapi_enabled: true
fhir_version: R4
server_address: http://shr-fhir:8080/fhir
implementationguides:
ips_1_0_0:
url: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz
name: hl7.fhir.uv.ips
version: 1.0.0
allow_cascading_deletes: true
allow_contains_searches: true
allow_external_references: true
allow_multiple_delete: true
narrative_enabled: false
auto_create_placeholder_reference_targets: true
default_page_size: 50
cors:
allow_Credentials: true
allowed_origin:
- '*'
search-coord-core-pool-size: 20
search-coord-max-pool-size: 100
search-coord-queue-capacity: 200
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
25 changes: 25 additions & 0 deletions configs/shr/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"app": {
"port": 3000
},
"mediator": {
"api": {
"username": "[email protected]",
"password": "openhim",
"apiURL": "https://openhim-core:8080",
"trustSelfSigned": true,
"urn": "urn:mediator:haiti_sharedhealthrecord"
},
"client": {
"id": "openshr",
"password": "openshr"
}
},
"fhirServer": {
"mpiURL": "https://openhim-core:5000/CR/fhir",
"baseURL": "http://shr-fhir:8080/fhir"
},
"taskRunner": {
"brokers" : ["kafka:9092"]
}
}
Loading

0 comments on commit 9bef6ae

Please sign in to comment.