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

Add/update analyzers plugins #23

Open
wants to merge 3 commits into
base: develop
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
79 changes: 79 additions & 0 deletions analyzers/AB7500Fast/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openelisglobal</groupId>
<artifactId>openelisglobal-plugins</artifactId>
<version>0.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.openelisglobal.plugins</groupId>
<artifactId>AB7500Fast</artifactId>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
</dependency>

</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/../../plugins</outputDirectory>
<resources>
<resource>
<!-- Get main artifact -->
<directory>target/</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
<!-- Don't filter binary files -->
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
22 changes: 22 additions & 0 deletions analyzers/AB7500Fast/src/main/java/AB7500Fast.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<openElisGlobalPlugin>
<version>1.0</version>
<analyzerImporter>
<extension_point path="org.openelisglobal.plugin.AnalyzerImporterPlugin" >
<extension path="oe.plugin.analyzer.AB7500VLAnalyzer" />
<description value="Virologie: AB 7500 VL analyzer importer" />
</extension_point>
</analyzerImporter>
<menu>
<extension_point path="org.openelisglobal.plugin.MenuPlugin" >
<extension path="oe.plugin.analyzer.AB7500VLMenu" />
<description value="Virologie: AB 7500 VL Analyzer menu" />
</extension_point>
</menu>
<permission>
<extension_point path="org.openelisglobal.plugin.PermissionPlugin" >
<extension path="oe.plugin.analyzer.AB7500VLPermission" />
<description value="Virologie: AB 7500 VL Analyzer permission" />
</extension_point>
</permission>
</openElisGlobalPlugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations under
* the License.
*
* The Original Code is OpenELIS code.
*
* Copyright (C) ITECH, University of Washington, Seattle WA. All Rights Reserved.
*/

package oe.plugin.analyzer;

import java.util.ArrayList;
import java.util.List;

import org.openelisglobal.analyzerimport.analyzerreaders.AnalyzerLineInserter;
import org.openelisglobal.common.services.PluginAnalyzerService;
import org.openelisglobal.plugin.AnalyzerImporterPlugin;

public class AB7500VLAnalyzer implements AnalyzerImporterPlugin {
//private static final String DELIMITER = ",";
private static final CharSequence AB7500VL_INDICATOR = "sds7500fast";

int InstrumentIndex = -1;

public boolean connect() {
// List nameMappinng = new ArrayList();
List<PluginAnalyzerService.TestMapping> nameMappinng = new ArrayList<PluginAnalyzerService.TestMapping>();
nameMappinng.add(new PluginAnalyzerService.TestMapping("Quantity", "Viral Load"));

PluginAnalyzerService.getInstance().addAnalyzerDatabaseParts("AB7500VLAnalyzer", "Plugin for AB 7500 analyzer",
nameMappinng);
PluginAnalyzerService.getInstance().registerAnalyzer(this);

return true;
}

public boolean isTargetAnalyzer(List<String> lines) {
for (int j = 0; j < lines.size(); j++) {
if (lines.get(j).contains(AB7500VL_INDICATOR))
return true;

}

return false;
}

public AnalyzerLineInserter getAnalyzerLineInserter() {
return new AB7500VLAnalyzerImplementation();
}

}
Loading