A2D2 is a clinical decision-support, data integration, and workflow services platform. It supports contemporary healthcare interoperability standards including FHIR and CDS-Hooks.
You will need to install the following:
-
Git (Download)
-
JDK 11 (Download)
-
Eclipse (Download)
-
Maven (Download)
-
Tomcat 8.5 (Download)
-
MySQL (Download)
-
Clone the git repository
-
Compile the projects
mvn clean install -DskipTests --settings=a2d2-settings.xml
-
Create MySQL databases
-
Create database
a2d2
-
Run a2d2/sql/A2D2_mysql.sql against
a2d2
database -
Change DB name with
a2d2
and DB creds in local spring profile in a2d2/a2d2-api/src/main/resources/application.yml file
-
-
Import projects to Eclipse
In Eclipse’s project explorer, select import -> existing maven projects, and select the path to a2d2 repository. Import all existing projects
mvn test
Whenever changes are made to the project, it's important to update the version numbers in the project's POM files. This includes both the sub-project POM files the parent POM file and POM files where we want latest version changes mandatory.
If you make changes to a specific sub-project, navigate to its POM file and update the version number accordingly. Look for the <version>
element and modify it appropriately.
<project>
<groupId>com.example</groupId>
<artifactId>sub-project</artifactId>
<version>1.0.0</version> <!-- Update this version number -->
<!-- ... other configurations ... -->
</project>
If you make changes to a project, navigate to its POM file of parent and update the version number accordingly. Look for the <version>
element and modify it appropriately.
<project>
<groupId>com.example</groupId>
<artifactId>project</artifactId>
<version>1.0.0</version> <!-- Update this version number -->
<!-- ... other configurations ... -->
</project>
-
Add the following to the bin/setenv.sh in the Tomcat installation directory if you run on Linux or Mac:
JAVA_OPTS=$JAVA_OPTS -Dfhir.client.conpool=20 -Dmaven.repo.location=<your-maven-repo-location> -Dmaven.repo.pwd=<your-maven-repo-pwd> -Dmaven.repo.user=<your-maven-repo-user> -Dkie.wb.user=<your-kie-wb-user> -Dkie.wb.location=<your-kie-wb-location> -Dkie.wb.pwd=<your-kie-wb-pwd> -Dspring.profiles.active=local,test,default
Add the following to the bin/catalina.bat around line 108 if you run Windows:
JAVA_OPTS=%JAVA_OPTS% -Dfhir.client.conpool=20 -Dmaven.repo.location=<your-maven-repo-location> -Dmaven.repo.pwd=<your-maven-repo-pwd> -Dmaven.repo.user=<your-maven-repo-user> -Dkie.wb.user=<your-kie-wb-user> -Dkie.wb.location=<your-kie-wb-location> -Dkie.wb.pwd=<your-kie-wb-pwd> -Dspring.profiles.active=local,test,default
NOTE: To test offline mode, add flags -Dkie.maven.offline.force=true -Dservices.pom.path=/path/to/pom.xml in above JAVA_OPTS
-
Copy a2d2/a2d2-api/target/a2d2-api.war to webapps/
-
In the tomcat/bin folder, run the following to start the environment:
- For Linux/Mac:
catalina.sh run
- For Windows:
catalina.bat run
- For Linux/Mac:
-
Debugging
In order to debug the omnibus application, because the classloading of the rules / process engine is very sensitive to changes in structure, you must debug it running remotely, even within the same local environment. To do so, you need to start the application like this:
- For Linux/Mac:
catalina.sh jpda run
- For Windows:
catalina.bat jpda run
Then, from Eclipse, click on debug -> Run as -> Remote Java Application -> new, and connect using localhost port 8000
Also, if you want to debug the rule and process execution of a particular request, add the HTTP header X-Enable-Debug: true to the request for enabling it on the server logs, or X-Output-Debug: true to enable it on the HTTP output
- For Linux/Mac:
-
Use following docker build command in a2d2
docker build -t a2d2 . --target final
-
Run docker a2d2 with local database
docker run -e "JAVA_OPTS=-Dmaven.repo.location=<your-maven-repo-location> -Dmaven.repo.pwd=<your-maven-repo-pwd> -Dmaven.repo.user=<your-maven-repo-user> -Dkie.wb.user=<your-kie-wb-user> -Dkie.wb.location=<your-kie-wb-location> -Dkie.wb.pwd=<your-kie-wb-pwd> -Dspring.profiles.active=local,test,default" --network="host" -d --name a2d2 a2d2
-
Redis Cache: components like the
fhir-query-helper-r4
orgeneric-helpers
use cache implementations that are configurable via JVM properties. If you want to use JedisHelper, or jedis implementation of caching of values, you need to add these JVM properties:-Dcache.type.impl=REDIS -Dcache.jedis.host= -Dcache.jedis.port=
Also, if you want to also configure secure access to it, you will need the following JVM properties as well:
-Dcache.jedis.use_ssl=true -Dcache.jedis.password= -Dcache.jedis.connection.timeout=