Skip to content

Commit

Permalink
Sedish haiti server (#59)
Browse files Browse the repository at this point in the history
* Workflow fix

* Fix

* Fixed postgres setup

* Fixed postgres setup

* Fix

* Fix

* Fix

* Fixes #54

* Fixes

* Fixes

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed wait for isanteplus

* Fixed isanteplus wait

* Fixed isanteplus wait

* fix

* Version Update

* Haiti server updates

* Ton of cleanup

* Reverted to nginx due to ssl issues

* Reverted to nginx due to ssl issues

* Bumped iSantePlus to v2.3.4

* wait fix

* Internal ID fix

* Small fix

* Small fix

* Small fix
  • Loading branch information
pmanko authored Aug 19, 2022
1 parent 4ea52a7 commit 8fd4a0e
Show file tree
Hide file tree
Showing 18 changed files with 659 additions and 483 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Versions
ISANTEPLUS_DOCKER_VERSION=v2.0.2
ISANTEPLUS_DB_VERSION=v2.0.2
ISANTEPLUS_DOCKER_VERSION=v2.3.4
ISANTEPLUS_DB_VERSION=v2.2.1
ISANTEPLUS_QA_VERSION=v1.0.2

# Port Assignments
Expand Down
88 changes: 52 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,59 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Copy config templates
run: |
cp ${GITHUB_WORKSPACE}/configs/opencr/.env.template ${GITHUB_WORKSPACE}/configs/opencr/.env
cp ${GITHUB_WORKSPACE}/configs/shr/.env.template ${GITHUB_WORKSPACE}/configs/shr/.env
cp ${GITHUB_WORKSPACE}/configs/isanteplus/isanteplus.env.template ${GITHUB_WORKSPACE}/configs/isanteplus/isanteplus.env
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Pull containers
run: docker-compose -f docker-compose.ports.yml pull
run: docker-compose pull

- name: Cache containers
uses: satackey/[email protected]
continue-on-error: true

- name: generate certs
run: docker-compose -f docker-compose.ports.yml up -d certgen

- name: Start core containers
run: docker-compose -f docker-compose.ports.yml up -d nginx openhim-core openhim-console mongo-db openhim-config
- name: Start all containers
run: docker-compose up -d

- name: Sleep for 10 seconds
run: sleep 30
- name: Sleep for 120 seconds
run: sleep 120
shell: bash

- name: Display docker logs for openhim config
run: docker-compose -f docker-compose.ports.yml logs openhim-config

- name: Start up support containers
run: docker-compose -f docker-compose.ports.yml up -d shr-fhir opencr-fhir opencr-es kafka zookeeper isanteplus isanteplus-mysql chrome

- name: Sleep for 1200 seconds
run: sleep 1200
shell: bash
run: docker-compose logs openhim-config

- name: Show docker logs for isanteplus
run: docker logs isanteplus

- name: Display docker logs for SHR & OpenCR
run: docker-compose -f docker-compose.ports.yml logs shr-fhir opencr-fhir

- name: Start up mediators
run: docker-compose -f docker-compose.ports.yml up -d shr opencr streaming-pipeline
run: docker-compose logs shr-fhir opencr-fhir

- name: Sleep for 120 seconds
run: sleep 120
- name: Wait For OpenMRS
run: docker-compose --profile=utility up --exit-code-from wait-for-openmrs wait-for-openmrs

- name: Restart streaming pipeline
run: docker-compose up -d --force-recreate streaming-pipeline

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

- name: Display docker logs for iSantePlus
run: docker-compose logs isanteplus

- name: Display docker logs for Streaming Pipeline
run: docker-compose logs streaming-pipeline

- name: Display docker logs for OpenCR
run: docker-compose -f docker-compose.ports.yml logs opencr
run: docker-compose logs opencr

- name: Display docker logs for SHR
run: docker-compose -f docker-compose.ports.yml logs shr
run: docker-compose logs shr

- name: Display docker logs for isanteplus mysql
run: docker logs -n 500 isanteplus-mysql
Expand All @@ -70,25 +78,25 @@ jobs:
run: docker logs isanteplus

- name: Display container status
run: docker-compose -f docker-compose.ports.yml ps
run: docker-compose ps

# - name: Run iSantePlus QA Framework (https://github.com/IsantePlus/isanteplus-qaframework)
# run: docker-compose -f docker-compose.ports.yml up --exit-code-from qa qa
# run: docker-compose up --exit-code-from qa qa

- name: Run General Tests (https://www.postman.com/itechuw/workspace/haiti-sedish/collection/1525496-943a668e-664f-44a3-86b5-a4d4bc14c0e9)
env:
POSTMAN_COLLECTION: https://www.getpostman.com/collections/46fd37386092a9f460e4
run: docker-compose --profile test -f docker-compose.ports.yml up --exit-code-from newman newman
run: docker-compose --profile test up --exit-code-from newman newman

# - name: Run CR Tests (https://www.postman.com/itechuw/workspace/haiti-sedish/collection/1525496-943a668e-664f-44a3-86b5-a4d4bc14c0e9)
# env:
# POSTMAN_COLLECTION: https://www.getpostman.com/collections/4d682cbb222bb538d365
# run: docker-compose --profile test -f docker-compose.ports.yml up --exit-code-from newman newman
- name: Run CR Tests (https://www.postman.com/itechuw/workspace/haiti-sedish/collection/1525496-943a668e-664f-44a3-86b5-a4d4bc14c0e9)
env:
POSTMAN_COLLECTION: https://www.getpostman.com/collections/4d682cbb222bb538d365
run: docker-compose --profile test up --exit-code-from newman newman

# - name: Run iSantePlus Tests (https://www.postman.com/itechuw/workspace/haiti-sedish/collection/1525496-ed828464-9287-4f1f-8bf0-61444f186c61)
# env:
# POSTMAN_COLLECTION: https://www.getpostman.com/collections/d3ccb73c1a402b1f6dd4
# run: docker-compose --profile test -f docker-compose.ports.yml up --exit-code-from newman newman
- name: Run iSantePlus Tests (https://www.postman.com/itechuw/workspace/haiti-sedish/collection/1525496-ed828464-9287-4f1f-8bf0-61444f186c61)
env:
POSTMAN_COLLECTION: https://www.getpostman.com/collections/d3ccb73c1a402b1f6dd4
run: docker-compose --profile test up --exit-code-from newman newman

- name: Display docker logs for OpenCR
if: always()
Expand All @@ -102,6 +110,14 @@ jobs:
if: always()
run: docker logs -n 100 isanteplus

- name: Display docker logs for OpenHIM
if: always()
run: docker-compose logs openhim-core openhim-console

- name: Display docker logs for SHR FHIR
if: always()
run: docker-compose logs -n 500 shr-fhir

- name: Stop containers
if: always()
run: docker-compose -f docker-compose.ports.yml down -v
run: docker-compose down -v
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ configs/isanteplus/custom_modules/*.omod
configs/isanteplus/*.env
configs/isanteplus/db/*.sql

configs/streaming-pipeline/data*
configs/streaming-pipeline/data*

*.bak

parquet
18 changes: 17 additions & 1 deletion configs/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ http {

server {
listen 443 ssl;
server_name core.sedish-haiti.org;
server_name openhim-api.sedish-haiti.org;

location / {
resolver 127.0.0.11 valid=30s;
Expand Down Expand Up @@ -141,5 +141,21 @@ http {
}
}

server {
listen 443 ssl;
server_name opencr-fhir.sedish-haiti.org;

location / {
resolver 127.0.0.11 valid=30s;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;

set $upstream opencr-fhir;
proxy_pass http://$upstream:8080;
}
}

}
155 changes: 155 additions & 0 deletions configs/opencr/PatientRelationship.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"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": "art"
},
{
"url": "name",
"valueString": "identifier.where(system='http://clientregistry.org/artnumber').value"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "biometric"
},
{
"url": "name",
"valueString": "identifier.where(system='http://isanteplus.org/openmrs/fhir2/6-biometrics-national-reference-code').value"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "codeNational"
},
{
"url": "name",
"valueString": "identifier.where(system='http://isanteplus.org/openmrs/fhir2/5-code-national').value"
}
]
}
]
}
],
"code": {
"coding": [
{
"system": "http://ihris.org/fhir/ValueSet/ihris-resource",
"code": "iHRISRelationship"
}
],
"text": "iHRISRelationship"
},
"subject": {
"reference": "StructureDefinition/Patient"
}
}
40 changes: 40 additions & 0 deletions configs/opencr/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
spring:
datasource:
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://opencr-fhir:8080/fhir
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

Loading

0 comments on commit 8fd4a0e

Please sign in to comment.