Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
types: [ created ]
jobs:
publish:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion MessageBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ m2sys.response.error.CS077="Picture capture not permitted by Biometric api";
m2sys.response.error.CS078="BioMetricWith: Default value not permitted.";
m2sys.response.error.CS079="BiometricImage license not available"
m2sys.response.error.CS036="Capture data not found"

// BiometricEngineStatus status code descriptions
m2sys.getStatus.decription.200="Everything works fine"
m2sys.getStatus.decription.default="Server doesn't work properly"
1 change: 0 additions & 1 deletion MessageBundle_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ m2sys.response.error.CS077="Picture capture not permitted by Biometric api";
m2sys.response.error.CS078="BioMetricWith: Default value not permitted.";
m2sys.response.error.CS079="BiometricImage license not available"
m2sys.response.error.CS036="Capture data not found"

// BiometricEngineStatus status code descriptions
m2sys.getStatus.decription.200="Everything works fine"
m2sys.getStatus.decription.default="Server doesn't work properly"
1 change: 0 additions & 1 deletion MessageBundle_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ m2sys.response.error.CS077="Picture capture not permitted by Biometric api";
m2sys.response.error.CS078="BioMetricWith: Default value not permitted.";
m2sys.response.error.CS079="BiometricImage license not available"
m2sys.response.error.CS036="Capture data not found"

// BiometricEngineStatus status code descriptions
m2sys.getStatus.decription.200="Everything works fine"
m2sys.getStatus.decription.default="Server doesn't work properly"
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@

# iSantePlus m2Sys Biometrics Module

[![CI](https://github.com/IsantePlus/openmrs-module-m2sys-biometrics/actions/workflows/ci.yml/badge.svg)](https://github.com/IsantePlus/openmrs-module-m2sys-biometrics/actions/workflows/ci.yml)

[![Publish package to GitHub Packages](https://github.com/IsantePlus/openmrs-module-m2sys-biometrics/actions/workflows/release.yml/badge.svg)](https://github.com/IsantePlus/openmrs-module-m2sys-biometrics/actions/workflows/release.yml)

This an implementation of the Biometrics interfaces from the registration core module that use the m2sys Biometrics server. The module uses the CloudScanner API by m2sys in order to communicate with the server and invoke the fingerprint reader.
This an implementation of the Biometrics interfaces from the registration core module that use the m2sys Biometrics server.
The module uses the CloudScanner API by m2sys in order to communicate with the server and invoke the fingerprint reader.

## Requirements

To set up this module, so it works properly there are three things needed:

- BioPlugin server 8
- Cloudscanner
- Cloudscanner
- M2Sys fingerprint reader

This module is using REST to communicate with CloudScanner API and send requests.
Expand All @@ -23,8 +25,8 @@ In order to build the module you must use mvn command. Example below:
mvn clean install
```

Note: in the api/src/main/resource/wsdl directory you can find the BioPlugin Web Service WSDL file.
Currently the module uses the **V8** version of the service.
Note: in the api/src/main/resource/wsdl directory you can find the BioPlugin Web Service WSDL file. Currently the module uses
the **V8** version of the service.

## Worklflow

Expand All @@ -36,19 +38,23 @@ Currently the module uses the **V8** version of the service.
6. This module sends a REST request to the national CloudABIS server
7. This module gets the response from both the local BioPlugin server and the national CloudABIS server interprets it.
8. If the fingerprint(s) are missing in either of the servers, this module registers them
9. If a patient already exists with a biometric identifier matching the processed Id, this module prompts the use to laod that patient
9. If a patient already exists with a biometric identifier matching the processed Id, this module prompts the use to laod
that patient

## Configuration variables

### Template if no scanner exists

If no fingerprint scanner exists, simulations may be performed using a pre-loaded fingerprint template to be stored as a global property:
If no fingerprint scanner exists, simulations may be performed using a pre-loaded fingerprint template to be stored as a
global property:
m2sys-biometrics.server.constTestTemplate - String representation of the fingerprint template

### Local variables

m2sys-biometrics.accessPointID - The m2sys server AccessPointID<br/>
m2sys-biometrics.accessPointMap - A map of IP addresses to Access Point IDs. Has format of IP1:AccessPointID1;IP2:AccessPointID2;...
For example 127.0.0.1:APID1;8.8.8.8:APID2... The IPs must match the IPs of the clients calling the server.<br/>
m2sys-biometrics.accessPointMap - A map of IP addresses to Access Point IDs. Has format of IP1:AccessPointID1;IP2:
AccessPointID2;... For example 127.0.0.1:APID1;8.8.8.8:APID2... The IPs must match the IPs of the clients calling the
server.<br/>
m2sys-biometrics.captureTimeout - The m2sys server CaptureTimeout<br/>
m2sys-biometrics.customKey - The m2sys server CustomKey<br/>
m2sys-biometrics.locationID - The m2sys server location ID<br/>
Expand All @@ -59,6 +65,7 @@ m2sys-biometrics.server.user - The m2sys server username<br/>
m2sys-biometrics.local-service.url - The URL to the SOAP service of the local (local to the clinic) M2Sys BioPlugin Server.

### National variables

m2sys-biometrics.cloudabis.app.key - The cloud client app key<br/>
m2sys-biometrics.cloudabis.secret.key - The cloud client secret key<br/>
m2sys-biometrics.cloudabis.grant.type - The cloud client grant type<br/>
Expand Down
214 changes: 107 additions & 107 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,114 +1,114 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>m2sys-biometrics</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>m2sys-biometrics</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>

<artifactId>m2sys-biometrics-api</artifactId>
<packaging>jar</packaging>
<name>m2sys Biometrics Module API</name>
<description>API project for m2SysBiometrics</description>
<artifactId>m2sys-biometrics-api</artifactId>
<packaging>jar</packaging>
<name>m2sys Biometrics Module API</name>
<description>API project for m2SysBiometrics</description>

<dependencies>
<dependency>
<groupId>org.openmrs</groupId>
<artifactId>event-api-2.x</artifactId>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>idgen-api</artifactId>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>jar</type>
</dependency>
<dependencies>
<dependency>
<groupId>org.openmrs</groupId>
<artifactId>event-api-2.x</artifactId>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>idgen-api</artifactId>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>registrationcore-api</artifactId>
<version>${registrationCoreVersion}</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/registrationcore-api.jar</systemPath>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>registrationcore-api</artifactId>
<version>${registrationCoreVersion}</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/registrationcore-api.jar</systemPath>
</dependency>

<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>2.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>2.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>org.openmrs.module.m2sysbiometrics.bioplugin</generatePackage>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
</configuration>
</plugin>
</plugins>
</build>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>org.openmrs.module.m2sysbiometrics.bioplugin</generatePackage>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
*/
public class M2SysBiometricsActivator extends BaseModuleActivator {

private static final Logger LOGGER = LoggerFactory.getLogger(M2SysBiometricsActivator.class);
private static final Logger LOGGER = LoggerFactory.getLogger(M2SysBiometricsActivator.class);

@Override
public void started() {
LOGGER.info("Starting m2sys Biometrics Module");
Context.getRegisteredComponents(M2SysSchedulerServiceImpl.class).get(0).runM2SysScheduler();
}
@Override
public void started() {
LOGGER.info("Starting m2sys Biometrics Module");
Context.getRegisteredComponents(M2SysSchedulerServiceImpl.class).get(0).runM2SysScheduler();
}

@Override
public void stopped() {
LOGGER.info("Shutting down m2sys Biometrics Module");
}
@Override
public void stopped() {
LOGGER.info("Shutting down m2sys Biometrics Module");
}

}
Loading