diff --git a/.env b/.env index 103f4f72..c142e42d 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -SHR_VERSION=v0.7.1 -FHIR_CONVERTER_VERSION=v3.2.1 -OMANG_SVC_VERSION=v1.6.3 \ No newline at end of file +SHR_VERSION=v0.8.0 +FHIR_CONVERTER_VERSION=v3.3.0-beta +OMANG_SVC_VERSION=v1.6.5 \ No newline at end of file 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/.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/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 10f412fb..69551378 100644 --- a/configs/opencr/config.json +++ b/configs/opencr/config.json @@ -44,32 +44,46 @@ }, "clients": [ { - "id": "lis", - "displayName": "Lab Info System" + "id": "tester", + "displayName": "PIMS" + }, + { + "id": "postman", + "displayName": "Postman" + }, + { + "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/omang" + "http://moh.bw.org/ext/identifier/mr", + "http://omang.bw.org/ext/identifier/internalid", + "http://openelis-global.org/pat_nationalId" ], "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-31T19:24:26" + "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/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..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": "core.moh.org.bw", + "host": "hie-pilot.gov.bw", "hostPath": "", - "port": "", + "port": "8090", "title": "Botswana HIE Admin Console", "footerTitle": "OpenHIM Administration Console", "footerPoweredBy": "Powered by OpenHIM", 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 a45dd81c..ca1e6249 100644 --- a/configs/shr/config.json +++ b/configs/shr/config.json @@ -9,15 +9,17 @@ "password": "openhim", "apiURL": "https://openhim-core:8080", "trustSelfSigned": true, - "urn": "urn:mediator:bw-shared-health-record" + "urn": "urn:mediator:shared-health-record" }, "client": { - "id": "shr-client", + "username": "shr-client", "password": "shr-client" } }, "fhirServer": { - "baseURL": "http://shr-fhir:8080/fhir" + "baseURL": "http://shr-fhir:8080/fhir", + "username": "shr", + "password": "shr" }, "clientRegistryUrl": "http://openhim-core:5001/CR/fhir", "fhirConverterUrl": "http://openhim-core:5001/72f", @@ -27,18 +29,21 @@ ] }, "bwConfig": { - "pimsSystemUrl": "https://api.openconceptlab.org/orgs/B-TECHBW/sources/PIMS-LAB-TEST-DICT/", + "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": 10000, + "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": "localhost", - "targetAdtPort": 2100, - "targetOrmPort": 2100 + "targetIp": "10.175.5.69", + "targetAdtPort": 3001, + "targetOrmPort": 3002 } } -} +} \ No newline at end of file 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.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/docker-compose.yml b/docker-compose.yml index ace17647..901d13ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,38 +23,30 @@ 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 + - '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' certbot: - image: certbot/dns-route53 + image: certbot/certbot 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 + 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 ### @@ -71,15 +63,22 @@ 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' - '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`)' + - '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: - image: hapiproject/hapi:latest + image: hapiproject/hapi:v5.1.0 container_name: opencr-fhir hostname: opencr-fhir restart: unless-stopped @@ -133,14 +132,15 @@ services: - ./configs/shr/mediator.json:/app/config/mediator_docker.json ports: - 3001:3001 - - 3002:3002 + - 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: @@ -148,6 +148,13 @@ services: interval: 30s timeout: 30s retries: 3 + ports: + - 8099:8080 + environment: + SPRING_CONFIG_LOCATION: 'file:///data/hapi/application.yaml' + # configs: + # - source: shr-hapi + # target: /data/hapi/application.yaml ### # OpenHIM @@ -171,6 +178,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' @@ -180,18 +192,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: - - 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 @@ -209,9 +235,11 @@ 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: + - 4001:80 # Loads Default OpenHIM Config openhim-config: @@ -238,7 +266,6 @@ 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 networks: - hie labels: @@ -246,8 +273,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: + - 8093:2019 # Kafka zookeeper: image: "bitnami/zookeeper:latest" @@ -261,10 +296,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 @@ -281,7 +316,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 @@ -294,7 +329,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 @@ -310,7 +349,6 @@ services: - 1521:1521 volumes: - ./configs/omang/db:/docker-entrypoint-initdb.d - networks: - hie volumes: 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