Skip to content

Commit de8e612

Browse files
authored
Merge pull request #31 from mozzy11/develop
add test loinc csv file mapper
2 parents 6144b82 + 5048467 commit de8e612

File tree

95 files changed

+9240
-8196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+9240
-8196
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build OpenELIS-Global-2 Plugins
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build-and-upload-plugins:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up JDK 11
11+
uses: actions/setup-java@v1
12+
with:
13+
java-version: 11
14+
- name: Cache local Maven repository
15+
uses: actions/cache@v4
16+
with:
17+
path: ~/.m2/repository
18+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
19+
restore-keys: |
20+
${{ runner.os }}-maven-
21+
22+
- name: Checkout openelisglobal-plugins
23+
uses: actions/checkout@v2
24+
with:
25+
repository: ${{github.repository}}
26+
27+
- name: Build openelisglobal-plugins
28+
run: mvn clean install
29+
30+
- name: check plugins
31+
run: ls plugins
32+
33+
- name: Compress Folder
34+
run: |
35+
tar -czf plugins.tar.gz -C plugins .
36+
echo "FILE_PATH=plugins.tar.gz" >> $GITHUB_ENV
37+
echo "FILE_NAME=plugins.tar.gz" >> $GITHUB_ENV
38+
39+
- name: Upload Release Asset
40+
uses: actions/upload-release-asset@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
upload_url: ${{ github.event.release.upload_url }}
45+
asset_path: ${{ env.FILE_PATH }}
46+
asset_name: ${{ env.FILE_NAME }}
47+
asset_content_type: application/gzip
48+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ plugins/*
55
*.classpath
66
analyzers/**/.gitignore
77
*/*/target
8+
*.vscode/*
9+
target/*
10+
.DS_Store

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ For Building The Plugins
1212
```mvn clean install```
1313
1. Find the built plugin jars under the `plugins` directory
1414

15+
16+
ASTM PLugins
17+
GeneXpert (PNG) , SysmeXXN-L ,SysmexXP ,pocH-100i (HAITI)
18+
19+

analyzers/CobasC111/pom.xml

Lines changed: 65 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,67 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
<groupId>org.openelisglobal.plugins</groupId>
6-
<artifactId>CobasC111</artifactId>
7-
<parent>
8-
<groupId>org.openelisglobal</groupId>
9-
<artifactId>openelisglobal-plugins</artifactId>
10-
<version>1.0</version>
11-
<relativePath>../../pom.xml</relativePath>
12-
</parent>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.openelisglobal</groupId>
6+
<artifactId>openelisglobal-plugins</artifactId>
7+
<version>1.0</version>
8+
<relativePath>../../pom.xml</relativePath>
9+
</parent>
10+
<groupId>org.openelisglobal.plugins</groupId>
11+
<artifactId>CobasC111</artifactId>
1312

14-
<version>1.0</version>
15-
<properties>
16-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17-
</properties>
13+
<version>1.0</version>
14+
<properties>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
</properties>
1817

19-
<build>
20-
<sourceDirectory>src</sourceDirectory>
21-
<resources>
22-
<resource>
23-
<directory>src</directory>
24-
<excludes>
25-
<exclude>**/*.java</exclude>
26-
</excludes>
27-
</resource>
28-
</resources>
29-
<plugins>
30-
<plugin>
31-
<artifactId>maven-compiler-plugin</artifactId>
32-
<version>3.8.0</version>
33-
<configuration>
34-
<source>1.8</source>
35-
<target>1.8</target>
36-
</configuration>
37-
</plugin>
38-
<plugin>
39-
<artifactId>maven-resources-plugin</artifactId>
40-
<version>2.4.3</version>
41-
<executions>
42-
<execution>
43-
<id>copy-resources</id>
44-
<!-- here the phase you need -->
45-
<phase>install</phase>
46-
<goals>
47-
<goal>copy-resources</goal>
48-
</goals>
49-
<configuration>
50-
<outputDirectory>${project.basedir}/../../plugins</outputDirectory>
51-
<resources>
52-
<resource>
53-
<!-- Get main artifact -->
54-
<directory>target/</directory>
55-
<includes>
56-
<include>${project.build.finalName}.jar</include>
57-
</includes>
58-
<!-- Don't filter binary files -->
59-
<filtering>false</filtering>
60-
</resource>
61-
</resources>
62-
</configuration>
63-
</execution>
64-
</executions>
65-
</plugin>
66-
</plugins>
67-
</build>
68-
</project>
18+
<build>
19+
<resources>
20+
<resource>
21+
<directory>src</directory>
22+
<excludes>
23+
<exclude>**/*.java</exclude>
24+
</excludes>
25+
</resource>
26+
</resources>
27+
<plugins>
28+
<plugin>
29+
<artifactId>maven-compiler-plugin</artifactId>
30+
<version>3.8.0</version>
31+
<configuration>
32+
<source>1.8</source>
33+
<target>1.8</target>
34+
</configuration>
35+
</plugin>
36+
<plugin>
37+
<artifactId>maven-resources-plugin</artifactId>
38+
<version>2.4.3</version>
39+
<executions>
40+
<execution>
41+
<id>copy-resources</id>
42+
<goals>
43+
<goal>copy-resources</goal>
44+
</goals>
45+
<!-- here the phase you need -->
46+
<phase>install</phase>
47+
<configuration>
48+
<outputDirectory>${project.basedir}/../../plugins</outputDirectory>
49+
<resources>
50+
<resource>
51+
<!-- Get main artifact -->
52+
<directory>target/</directory>
53+
<includes>
54+
<include>${project.build.finalName}.jar</include>
55+
</includes>
56+
<!-- Don't filter binary files -->
57+
<filtering>false</filtering>
58+
</resource>
59+
</resources>
60+
</configuration>
61+
</execution>
62+
</executions>
63+
</plugin>
64+
</plugins>
65+
<sourceDirectory>src</sourceDirectory>
66+
</build>
67+
</project>

analyzers/CobasC111/src/oe/plugin/analyzer/CobasC111Analyzer.java

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,43 @@
2020

2121
import java.util.ArrayList;
2222
import java.util.List;
23-
2423
import org.openelisglobal.analyzerimport.analyzerreaders.AnalyzerLineInserter;
2524
import org.openelisglobal.common.services.PluginAnalyzerService;
2625
import org.openelisglobal.plugin.AnalyzerImporterPlugin;
2726

28-
2927
public class CobasC111Analyzer implements AnalyzerImporterPlugin {
3028

31-
public boolean connect(){
32-
List<PluginAnalyzerService.TestMapping> nameMappinng = new ArrayList<PluginAnalyzerService.TestMapping>();
33-
nameMappinng.add(new PluginAnalyzerService.TestMapping("GLU2", "Glucose"));
34-
nameMappinng.add(new PluginAnalyzerService.TestMapping("CREJ2", "Créatinine"));
35-
nameMappinng.add(new PluginAnalyzerService.TestMapping("ALTL", "Transaminases GPT (37°C)"));
36-
getInstance().addAnalyzerDatabaseParts("CobasC111Analyzer", "Plugin for Cobas C111 analyzer",nameMappinng);
37-
getInstance().registerAnalyzer(this);
38-
return true;
39-
}
40-
41-
@Override
42-
public boolean isTargetAnalyzer(List<String> lines) {
43-
44-
if(getColumnsLine(lines)<0) return false;
45-
46-
return true;
47-
48-
}
49-
50-
@Override
51-
public AnalyzerLineInserter getAnalyzerLineInserter() {
52-
return new CobasC111AnalyzerImplementation();
29+
public boolean connect() {
30+
List<PluginAnalyzerService.TestMapping> nameMappinng =
31+
new ArrayList<PluginAnalyzerService.TestMapping>();
32+
nameMappinng.add(new PluginAnalyzerService.TestMapping("GLU2", "Glucose"));
33+
nameMappinng.add(new PluginAnalyzerService.TestMapping("CREJ2", "Créatinine"));
34+
nameMappinng.add(new PluginAnalyzerService.TestMapping("ALTL", "Transaminases GPT (37°C)"));
35+
getInstance()
36+
.addAnalyzerDatabaseParts(
37+
"CobasC111Analyzer", "Plugin for Cobas C111 analyzer", nameMappinng);
38+
getInstance().registerAnalyzer(this);
39+
return true;
40+
}
41+
42+
@Override
43+
public boolean isTargetAnalyzer(List<String> lines) {
44+
45+
if (getColumnsLine(lines) < 0) return false;
46+
47+
return true;
48+
}
49+
50+
@Override
51+
public AnalyzerLineInserter getAnalyzerLineInserter() {
52+
return new CobasC111AnalyzerImplementation();
53+
}
54+
55+
public int getColumnsLine(List<String> lines) {
56+
for (int k = 0; k < lines.size(); k++) {
57+
if (lines.get(k).contains("Instr")) return k;
5358
}
5459

55-
public int getColumnsLine(List<String> lines) {
56-
for(int k=0;k<lines.size();k++){
57-
if(lines.get(k).contains("Instr"))
58-
return k;
59-
60-
}
61-
62-
return -1;
63-
}
60+
return -1;
61+
}
6462
}

0 commit comments

Comments
 (0)