A framework for testing the validity of SNOMED CT releases.
These instructions will provide guidance in getting the RVF running on your local machine for development and testing.
You will need:
- Git Client to clone the project
- JDK 1.8
- Maven to build
Clone the project then use maven to build it:
mvn clean install
The RVF currently requires a local MySQL database to be available. Setting up this database and user can be done using the following:
CREATE DATABASE rvf_master;
CREATE USER 'rvf_user'@'localhost';
// Alternatively give a password: CREATE USER 'rvf_user'@'localhost' IDENTIFIED BY 'password_here';
GRANT ALL PRIVILEGES ON *.* TO 'rvf_user'@'localhost';
Be sure to include details of the connection in the execution-service.properties file mentioned below. The privileges of the user 'rvf_user' should not be restricted to the 'rvf_master' database because additional databases will be generated for each SNOMED release.
There are various services that can be configured. There are default values but these can be overridden using properties files. The following is a list of property files that can be used to configure services:
File name | Description | RVF deployment location |
---|---|---|
data-service.properties | Settings to configure the data store for RVF domain entities (assertions, test, etc) | /etc/opt/rvf-api/ |
execution-service.properties | Settings to configure the location of SNOMED CT data used by RVF | /etc/opt/rvf-api/ |
validation-service.properties | Settings to configure structural tests report location and threshold | /etc/opt/rvf-api/ |
Sample files for configuring the services can be found in the config folder.
Start the stand-alone web application using the executable jar, replacing "{config_dir}" with an absolute path.
java -Xms512m -Xmx4g -DrvfConfigLocation={config_dir} -jar api/target/dependency/webapp-runner.jar api/target/api.war --path /api --port 8081
The RVF API is documented using Swagger http://localhost:8081/api/v1/api-doc.html
Option 1: The release endpoint of the REST API can be used to list releases and to upload a published release. Find the endpoint at http://localhost:8081/api/v1/releases
Example upload
curl -X POST -F 'file=@SnomedCT_RF2Release_INT_20160731.zip' http://localhost:8081/api/v1/releases/int/20160731
Option 2: Using Swagger API as shown above. See Manage published releases section for detailed information.
To run unit tests use:
mvn clean test
Integration tests require a MySQL database containing SNOMED CT data. To run integration tests once this is in place, use:
mvn clean integration-test -Dskip.integration.tests=false -DrvfConfigLocation={config_dir}
Assertions are imported automatically during RVF application startup. The list of assertions is documented in the manifest.xml file under importer/src/main/resources/xml/lists/ folder. Actual assertion SQL files can be found in the importer/src/main/resources/scripts folder.