Bulk Scan CCD event handler
This library will be used to handle CCD events related to creating a case from an bulk-scan exception record.
Usage
-
Create an instance of case transformer by implementing
ExceptionRecordToCaseTransformer
interface. -
Create an instance of a handler:
ExceptionRecordEventHandler handler = ExceptionRecordEventHandlerFactory.getHandler( transformer, ccdUrl, s2sTokenSupplier );
where
s2sTokenSupplier
is an function returning s2s token for your service. -
Call the handler by passing
CaseCreationRequest
to it:CaseCreationResult result = handler.handle(careCreationRequest);
The handler will create a case in CCD for you and return the ID of the new case.
You can check a sample implementation in this repository.
Developing
Prerequisites
Unit tests
To run all unit tests execute the following command:
./gradlew test
Code quality checks
We use checkstyle and PMD.
To run all checks execute the following command:
./lint.sh
License
This project is licensed under the MIT License - see the LICENSE file for details.