https://github.com/mskcc/smile-request-filter
CMO MetaDB Request Filter app
https://github.com/mskcc/smile-request-filter
Last synced: 3 months ago
JSON representation
CMO MetaDB Request Filter app
- Host: GitHub
- URL: https://github.com/mskcc/smile-request-filter
- Owner: mskcc
- License: agpl-3.0
- Created: 2021-06-10T14:34:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-24T15:37:12.000Z (12 months ago)
- Last Synced: 2024-07-25T17:08:40.155Z (12 months ago)
- Language: Java
- Size: 179 KB
- Stars: 0
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CMO Sample Validator & SMILE Request Filter
The CMO sample validator and SMILE request filter is a microservice for the SMILE which subscribes to messages published by the LIMSRest service when a request is marked for delivery.
Messages received will undergo some validation steps to ensure that the request JSON delivered is complete. If a request is a CMO request (based on the JSON field `cmoRequest`) then it will undergo additional validation to ensure that all fields required for generating a CMO sample label are provided and contain valid values.
Invalid requests are logged and saved by the `RequestStatusLogger`.
Valid non-CMO requests are published to the IGO_NEW_REQUEST topic. Valid CMO requests are published to the CMO_LABEL_GENERATOR topic where they will be handled by the CMO Label Generator service which will then publish the request to IGO_NEW_REQUEST once CMO labels have been generated and added to the request JSON package.
## Run
### Custom properties
All properties are required with the exception of some NATS connection-specific properties. The following are only required if `nats.tls_channel` is set to `true`:
- `nats.keystore_path` : path to client keystore
- `nats.truststore_path` : path to client truststore
- `nats.key_password` : keystore password
- `nats.store_password` : truststore password### Locally
**Requirements:**
- maven 3.6.1
- java 8Add `application.properties` to the local application resources: `src/main/resources`
Build with
```
mvn clean install
```Run with
```
java -jar target/smile_request_filter.jar
```### With Docker
**Requirements**
- dockerBuild image with Docker
```
docker build -t /: .
```Push image to DockerHub
```
docker push /:
```If the Docker image is built with the properties baked in then simply run with:
```
docker run --name request-filter /: \
-jar /request-filter/smile_request_filter.jar
```Otherwise use a bind mount to make the local files available to the Docker image and add `--spring.config.location` to the java arg
```
docker run --mount type=bind,source=,target=/request-filter/src/main/resources \
--name request-filter /: \
-jar /request-filter/smile_request_filter.jar \
--spring.config.location=/request-filter/src/main/resources/application.properties
```