Following this guide will set up a fully functioning local development environment. You will be able to ingest and process Electronic Lab Reports (ELRs), debug the various services, and view the processed patient data within NBS 6.
- Provide the necessary configurations
- Optional: Build and deploy NBS 6 Wildfly docker container (requires ability to git clone NEDSSDev)
./containers/build_classic.sh
- Start Keycloak, Kafka, SRTE data cache, and database container
docker compose up di-keycloak broker zookeeper di-mssql srte-data-service -d
- Start data-ingestion-service with gradle. Allows remote debugging using port
19040
./gradlew data-ingestion-service:bootRun
- Start data-processing-service with gradle. Allows remote debugging using port
19041
./gradlew data-processing-service:bootRun
- Optional: Start deduplication service with gradle. Allows remote debugging using port
19042
(requires running Record Linkage service)./gradlew deduplication:bootRun
Once the above steps have been completed, the postman collection can be used to fetch an authentication token from Keycloak, submit an ELR, and check the status of the ELR.
Swagger pages are also available
If the optional NBS 6 WildFly container was built, NBS 6 can be accessed here.
The docker compose file supports pulling information from a .dataingestion.env
file and each service supports creating an application-local.yml
. Below are sample configuration files.
DI_AUTH_URI=http://di-keycloak:8080/realms/NBS;
RTI_CACHE_AUTH_URI=http://di-keycloak:8080/realms/NBS
NBS_DBSERVER=di-mssql:1433
NBS_DBUSER=sa
NBS_DBPASSWORD=fake.fake.fake.1234
KC_BOOTSTRAP_ADMIN_USERNAME=admin
KC_BOOTSTRAP_ADMIN_PASSWORD=fake.fake.fake.1234
spring:
security:
oauth2:
resourceserver:
jwt:
issuer-uri: http://localhost:8100/realms/NBS
datasource:
username: sa
password: fake.fake.fake.1234
dataingest:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_DATAINGEST;encrypt=true;trustServerCertificate=true;
msgoute:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_MSGOUTE;encrypt=true;trustServerCertificate=true;
odse:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_ODSE;encrypt=true;trustServerCertificate=true;
spring:
datasource:
username: sa
password: fake.fake.fake.1234
nbs:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_MSGOUTE;encrypt=true;trustServerCertificate=true;
odse:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_ODSE;encrypt=true;trustServerCertificate=true;
srte:
url: jdbc:sqlserver://localhost:2433;databaseName=NBS_SRTE;encrypt=true;trustServerCertificate=true;
features:
modernizedMatching:
enabled: true
url: http://localhost:8083/api/deduplication/
cache:
clientId: di-keycloak-client
secret: OhBq1ar96aep8cnirHwkCNfgsO9yybZI
token: http://localhost:8084/data/api/auth/token
srte:
cacheString: http://localhost:8084/data/srte/cache/string
cacheContain: http://localhost:8084/data/srte/cache/contain
cacheObject: http://localhost:8084/data/srte/cache/object
odse:
localId: http://localhost:8084/data/odse/localId
spring:
datasource:
deduplication:
url: jdbc:sqlserver://localhost:2433;database=deduplication;encrypt=true;trustServerCertificate=true;
username: sa
password: fake.fake.fake.1234
nbs:
url: jdbc:sqlserver://localhost:2433;database=nbs_odse;encrypt=true;trustServerCertificate=true;
username: sa
password: fake.fake.fake.1234
mpi:
url: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: pw
batch:
jdbc:
initialize-schema: always
logging:
level:
org.springframework.jdbc.core.JdbcTemplate: debug
The data-ingestion-service and data-processing-service have been configured to allow remote debugging when started through ./gradlew <service-name>:bootRun
. The following launch.json
will enable VS-Code to connect to these services for debugging.
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Data Ingestion (Attach)",
"projectName": "data-ingestion-service",
"request": "attach",
"hostName": "localhost",
"port": 19040
},
{
"type": "java",
"name": "Data Processing (Attach)",
"projectName": "data-processing-service",
"request": "attach",
"hostName": "localhost",
"port": 19041
},
{
"type": "java",
"name": "Deduplication (Attach)",
"projectName": "Modernization-API",
"request": "attach",
"hostName": "localhost",
"port": 19042
}
]
}