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
./containers/build_classic.sh
- Start Keycloak, Kafka, and database container
docker compose up di-keycloak broker zookeeper di-mssql -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 Record Linkage service
docker compose up di-record-linker -d
- Optional: Start deduplication service with gradle. Allows remote debugging using port
19042(Note: Sync and Record Linker communcation are feature flagged off by default)./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
DB_URI=mssql+pyodbc://sa:fake.fake.fake.1234@di-mssql:1433/mpi?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yesspring:
security:
oauth2:
resourceserver:
jwt:
issuer-uri: http://localhost:8101/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/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: debugThe 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
}
]
}