This code is provided as a companion to InterSystems Virtual Summit 2020 session DEE001 "IRIS Java Client SDK – Learn all the ways you can connect your Java application to IRIS"
The demo shows how to use the XEP, JDBC, and Native APIs in the context of a simplified clinical trial application.
The data model consists of three parts:
- Participant - This is a person who has agreed to be in the trial. In this case, we just have a name and data-of-birth.
- Cohort - This is a named group of participants.
- TestResult - This is a test result for a participant.
There are 6 steps to the simplified clinical trial (and the demo)
- Create the database schema
- Enlist the participants
- Create the cohorts
- Assign participants to cohorts
- Do testing
- Report results
Notes:
- The Participant and Cohort objects are created through XEP, which is InterSystem's object-oriented API.
- TestResult's schema is created through JDBC and populated via the IRIS Native API.
- Participants are assigned to cohorts through the IRIS Native API.
- Reporting is done through JDBC
This repository is a Java maven application. You'll need both java 8 and maven installed.
You also need to have the InterSystems IRIS Java client libraries as part of your maven cache. If you haven't done so already, this can be done by a command similar to this:
mvn install:install-file -Dfile=c:\InterSystems\IRIS\dev\java\lib\JDK18\intersystems-jdbc-3.1.0.jar -DgroupId=com.intersystems -DartifactId=intersystems-jdbc -Dversion=3.1.0 -Dpackaging=jar -DgeneratePom=true
Review App.java
to make sure that the connection details and namespace are correct to connect to your IRIS instance. Note: The namespace probably doesn't exist on your instance, so either change it to one that you have or create it.
Import SummitAssigner.cls
into your IRIS instance.
Now you should be able to build and run the demo"
mvn compile exec:java -Dexec.mainClass="summit._Main"
To learn more about developing with Java in InterSystems IRIS, please see our online training materials:
- https://www.intersystems.com/resources/detail/intersystems-and-java-quickstart/
- https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_XEP
- https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_DBNATIVE
- https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_JDBC