Skip to content

Commit

Permalink
Merge pull request #284 from jembi/CU-86byf2dr7_Update-Platform-JeMPI…
Browse files Browse the repository at this point in the history
…-Configuration

JeMPI Configuration Update
  • Loading branch information
MatthewErispe authored Apr 25, 2024
2 parents 9b5ff1a + e1226e0 commit 1da58b0
Show file tree
Hide file tree
Showing 16 changed files with 244 additions and 78 deletions.
19 changes: 11 additions & 8 deletions client-registry-jempi/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

# JeMPI Client Registry Component - docker-swarm

This component consists of two services:

* JeMPI Web UI - http://localhost:3033
* JeMPI API - http://localhost:50000/JeMPI
- JeMPI Web UI - http://localhost:3033
- JeMPI API - http://localhost:50000/JeMPI

## Api endpoints

Expand All @@ -15,7 +14,7 @@ This component consists of two services:
via the api (in JeMPI format)

```sh
POST - http://localhost:50000/JeMPI/cr-register
POST - http://localhost:50000/JeMPI/crRegister

{
"candidateThreshold": 0.9,
Expand Down Expand Up @@ -83,14 +82,18 @@ The `candidateThreshold` can optionally be set in the request query. The default
]
}
```

> The identifier with the system 'NationalID' maps to the 'nationalId' property in JeMPI
## Querying a patient by id

via the api (returns patient in JeMPI formated)

```sh
GET - http://localhost:50000/JeMPI/expanded-golden-record/<PATIENT_GOLDEN_ID>
POST - http://localhost:50000/JeMPI/expandedGoldenRecord
{
"gid":"<PATIENT_GOLDEN_ID>"
}
```

via the [mapping mediator](https://github.com/jembi/openhim-mediator-mapping) (returns patient in fhir format)
Expand All @@ -104,7 +107,7 @@ GET - http://localhost:3003/fhir/Patient/<PATIENT_GOLDEN_ID>
via the api (in JeMPI format)

```sh
PATCH - http://localhost:50000/JeMPI/cr-update-fields
POST - http://localhost:50000/JeMPI/crUpdateFields

{
"goldenId": "0x5",
Expand Down Expand Up @@ -167,7 +170,7 @@ PUT - http://localhost:3003/fhir/Patient/<PATIENT_GOLDEN_RECORD>
via the api (returns in JeMPI format)

```sh
POST http://localhost:50000/JeMPI/cr-find
POST http://localhost:50000/JeMPI/crFind

{
"operand": {
Expand Down Expand Up @@ -201,7 +204,7 @@ Query parameters - family, given, telecom, identifier, gender, birthDate, addres
via the api (in JeMPI format)

```sh
POST - http://localhost:50000/JeMPI/cr-find
POST - http://localhost:50000/JeMPI/crFind

{
"operand": {
Expand Down
11 changes: 9 additions & 2 deletions client-registry-jempi/docker-compose.api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ services:
LOG4J2_LEVEL: ${LOG4J2_LEVEL}
POSTGRESQL_IP: ${JEMPI_REPMGR_PRIMARY_HOST}
POSTGRESQL_PORT: 5432
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
POSTGRESQL_USER: ${POSTGRESQL_USERNAME}
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRESQL_NOTIFICATIONS_DB: ${POSTGRESQL_NOTIFICATIONS_DB}
POSTGRESQL_AUDIT_DB: ${POSTGRESQL_AUDIT_DB}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_HOSTS}
KAFKA_APPLICATION_ID: ${KAFKA_APPLICATION_ID_API}
DGRAPH_HOSTS: ${DGRAPH_HOSTS}
DGRAPH_PORTS: ${DGRAPH_PORTS}
API_HTTP_PORT: 50000
LINKER_IP: jempi-linker
LINKER_HTTP_PORT: 50000
CONTROLLER_IP: jempi-controller
CONTROLLER_HTTP_PORT: 50000
volumes:
- "jempi-shared-data:/app/csv"
deploy:
Expand Down Expand Up @@ -47,16 +50,20 @@ services:
JEMPI_SESSION_DOMAIN_NAME: ${JEMPI_SESSION_DOMAIN_NAME}
POSTGRESQL_IP: ${JEMPI_REPMGR_PRIMARY_HOST}
POSTGRESQL_PORT: 5432
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
POSTGRESQL_USER: ${POSTGRESQL_USERNAME}
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRESQL_USERS_DB: ${POSTGRESQL_USERS_DB}
POSTGRESQL_NOTIFICATIONS_DB: ${POSTGRESQL_NOTIFICATIONS_DB}
POSTGRESQL_AUDIT_DB: ${POSTGRESQL_AUDIT_DB}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_HOSTS}
KAFKA_APPLICATION_ID: ${KAFKA_APPLICATION_ID_API}
DGRAPH_HOSTS: ${DGRAPH_HOSTS}
DGRAPH_PORTS: ${DGRAPH_PORTS}
API_KC_HTTP_PORT: 50000
LINKER_IP: jempi-linker
LINKER_HTTP_PORT: 50000
CONTROLLER_IP: jempi-controller
CONTROLLER_HTTP_PORT: 50000
volumes:
- "jempi-shared-data:/app/csv"
deploy:
Expand Down
25 changes: 25 additions & 0 deletions client-registry-jempi/docker-compose.combined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ services:
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
POSTGRESQL_USER: ${POSTGRESQL_USERNAME}
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRESQL_NOTIFICATIONS_DB: ${POSTGRESQL_NOTIFICATIONS_DB}
POSTGRESQL_AUDIT_DB: ${POSTGRESQL_AUDIT_DB}
DGRAPH_HOSTS: ${DGRAPH_HOSTS}
DGRAPH_PORTS: ${DGRAPH_PORTS}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_HOSTS}
KAFKA_APPLICATION_ID: ${KAFKA_APPLICATION_ID_CTRL}
KAFKA_CLIENT_ID: ${KAFKA_CLIENT_ID_CTRL}
Expand Down Expand Up @@ -77,6 +81,8 @@ services:
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
POSTGRESQL_USER: ${POSTGRESQL_USERNAME}
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRESQL_NOTIFICATIONS_DB: ${POSTGRESQL_NOTIFICATIONS_DB}
POSTGRESQL_AUDIT_DB: ${POSTGRESQL_AUDIT_DB}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_HOSTS}
KAFKA_APPLICATION_ID_INTERACTIONS: ${KAFKA_APPLICATION_ID_INTERACTIONS}
KAFKA_APPLICATION_ID_MU: ${KAFKA_APPLICATION_ID_MU}
Expand All @@ -99,6 +105,25 @@ services:
kafka:
default:

jempi-bootstrapper:
image: jembi/jempi-bootstrapper:${JEMPI_BOOTSTRAPPER_IMAGE_TAG}
environment:
POSTGRESQL_IP: ${JEMPI_REPMGR_PRIMARY_HOST}
POSTGRESQL_PORT: 5432
POSTGRESQL_USER: ${POSTGRESQL_USERNAME}
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
POSTGRESQL_USERS_DB: ${POSTGRESQL_USERS_DB}
POSTGRESQL_NOTIFICATIONS_DB: ${POSTGRESQL_NOTIFICATIONS_DB}
POSTGRESQL_AUDIT_DB: ${POSTGRESQL_AUDIT_DB}
POSTGRESQL_KC_TEST_DB: ${POSTGRESQL_KC_TEST_DB}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_HOSTS}
KAFKA_APPLICATION_ID: ${KAFKA_APPLICATION_ID_BOOTSTRAPPER}
DGRAPH_HOSTS: ${DGRAPH_HOSTS}
DGRAPH_PORTS: ${DGRAPH_PORTS}
networks:
kafka:
default:

jempi-postgresql-01:
image: bitnami/postgresql-repmgr:15.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ services:
target: /searchAll.json
- source: mediator-config-patientLinks.json
target: /patientLinks.json
- source: mediator-config-patientLinksInteractionResponse.json
target: /patientLinksInteractionResponse.json
- source: mediator-config-patientLinksResponse.json
target: /patientLinksResponse.json
- source: mediator-config-searchAllResponse.json
target: /searchAllResponse.json
- source: mediator-config-searchResponse.json
target: /searchResponse.json
- source: mediator-config-searchAllProbabilistic.json
target: /searchAllProbabilistic.json
- source: mediator-config-searchAllProbabilisticResponse.json
Expand Down Expand Up @@ -77,6 +81,11 @@ configs:
name: mediator-config-patientLinks.json-${mediator_config_patientLinks_json_DIGEST:?err}
labels:
name: jempi
mediator-config-patientLinksInteractionResponse.json:
file: ./patientLinksInteractionResponse.json
name: mediator-config-patientLinksInteractionResponse.json-${mediator_config_patientLinksInteractionResponse_json_DIGEST:?err}
labels:
name: jempi
mediator-config-patientLinksResponse.json:
file: ./patientLinksResponse.json
name: mediator-config-patientLinksResponse.json-${mediator_config_patientLinksResponse_json_DIGEST:?err}
Expand All @@ -87,6 +96,11 @@ configs:
name: mediator-config-searchAllResponse.json-${mediator_config_searchAllResponse_json_DIGEST:?err}
labels:
name: jempi
mediator-config-searchResponse.json:
file: ./searchResponse.json
name: mediator-config-searchResponse.json-${mediator_config_searchResponse_json_DIGEST:?err}
labels:
name: jempi
mediator-config-searchAllProbabilistic.json:
file: ./searchAllProbabilistic.json
name: mediator-config-searchAllProbabilistic.json-${mediator_config_searchAllProbabilistic_json_DIGEST:?err}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Get patient links interaction response",
"endpoint": {
"pattern": "/response/links/interaction/:patientId",
"method": "GET"
},
"transformation": {
"output": "JSON"
},
"inputMapping": {
"urlParams.patientId": "uidList[]+"
},
"requests": {
"response": {
"id": "jempiSearchInteractionForGoldenId",
"config": {
"method": "post",
"url": "http://jempi-api:50000/JeMPI/expandedInteractionsCsv"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Get patient links response",
"name": "Get interaction links response",
"endpoint": {
"pattern": "/response/links/:patientId",
"method": "GET"
Expand All @@ -11,29 +11,25 @@
"inputTransforms": {
"goldenId": "$exists(lookupRequests.jempiSearchGoldenId.data[0].goldenRecordsWithScore[0].goldenRecord.uid) ? lookupRequests.jempiSearchGoldenId.data[0].goldenRecordsWithScore[0].goldenRecord.uid : ''"
},
"inputMapping": {
"transforms.goldenId": "gid"
},
"requests": {
"response": {
"id": "jempiSearchResponse",
"config": {
"method": "get",
"url": "http://jempi-api:50000/JeMPI/expanded-golden-record/:goldenId",
"params": {
"url": {
"goldenId": {
"path": "transforms.goldenId"
}
}
}
"method": "post",
"url": "http://jempi-api:50000/JeMPI/expandedGoldenRecord"
}
},
"lookup": {
"id": "jempiSearchGoldenId",
"config": {
"method": "get",
"url": "http://jempi-api:50000/JeMPI/expanded-interactions-csv",
"url": "http://openhim-mapping-mediator:3003/response/links/interaction/:patientId",
"params": {
"query": {
"uidList": {
"url": {
"patientId": {
"path": "urlParams.patientId"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"headers": {
"contentType": "application/fhir+json"
},
"url": "http://jempi-api:50000/JeMPI/link-interaction"
"url": "http://jempi-api:50000/JeMPI/crLink"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions client-registry-jempi/importer/mapping-mediator/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"input": "JSON",
"output": "JSON"
},
"inputTransforms" : {
"inputTransforms": {
"id": "lookupRequests.jempiSearch.data.goldenRecord.uid",
"gender": "$exists(lookupRequests.jempiSearch.data.goldenRecord.demographicData.gender) ? lookupRequests.jempiSearch.data.goldenRecord.demographicData.gender : null",
"birthDate": "$exists(lookupRequests.jempiSearch.data.goldenRecord.demographicData.dob) ? lookupRequests.jempiSearch.data.goldenRecord.demographicData.dob : null",
Expand Down Expand Up @@ -45,7 +45,7 @@
"id": "jempiSearch",
"config": {
"method": "get",
"url": "http://jempi-api:50000/JeMPI/expanded-golden-record/:patientId",
"url": "http://openhim-mapping-mediator:3003/search-response/:patientId",
"params": {
"url": {
"patientId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
}
},
"url": "http://openhim-mapping-mediator:3003/search-response"
"url": "http://openhim-mapping-mediator:3003/search-response-all"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"id": "jempiSearchAllProbabilisticResponse",
"config": {
"method": "post",
"url": "http://jempi-api:50000/JeMPI/cr-find"
"url": "http://jempi-api:50000/JeMPI/crFind"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Search Endpoint deterministic response",
"endpoint": {
"pattern": "/search-response",
"pattern": "/search-response-all",
"method": "GET"
},
"transformation": {
Expand All @@ -21,7 +21,7 @@
"forwardExistingRequestBody": true,
"config": {
"method": "post",
"url": "http://jempi-api:50000/JeMPI/cr-find"
"url": "http://jempi-api:50000/JeMPI/crFind"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Search patient response by patient id",
"endpoint": {
"pattern": "/search-response/:patientId",
"method": "GET"
},
"transformation": {
"output": "JSON"
},
"inputMapping": {
"urlParams.patientId": "gid"
},
"requests": {
"response": {
"id": "jempiSearchGoldenRecordById",
"config": {
"method": "post",
"url": "http://jempi-api:50000/JeMPI/expandedGoldenRecord"
}
}
}
}
Loading

0 comments on commit 1da58b0

Please sign in to comment.