forked from IBMStreams/streamsx.health
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IBMStreams#10: Contribute physionet adapter
- Loading branch information
Showing
32 changed files
with
2,662 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# streamsx.health | ||
|
||
This community is focused on using Streams in the health care industry. Go to the wiki to participate in the discussion. | ||
|
||
https://github.com/IBMStreams/streamsx.health/wiki | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
ingest/physionet/com.ibm.streamsx.health.ingest.physionet/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="impl/java/bin" path="impl/java/src"/> | ||
<classpathentry exported="true" kind="con" path="com.ibm.streams.java/com.ibm.streams.operator"/> | ||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="src" path=".apt_generated"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="impl/java/bin"/> | ||
</classpath> |
5 changes: 5 additions & 0 deletions
5
ingest/physionet/com.ibm.streamsx.health.ingest.physionet/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.apt_generated/ | ||
/.toolkitList | ||
/output/ | ||
/toolkit.xml | ||
/com.ibm.streamsx.health.physionet.PhysionetIngestService_temp.json |
29 changes: 29 additions & 0 deletions
29
ingest/physionet/com.ibm.streamsx.health.ingest.physionet/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>com.ibm.streamsx.health.ingest.physionet</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.ibm.streams.studio.splproject.builder.SPLProjectBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
<nature>com.ibm.streams.studio.splproject.SPLProjectNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
25 changes: 25 additions & 0 deletions
25
...health.ingest.physionet/.settings/application.PhysionetIngestService-BuildConfig.splbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE properties SYSTEM "http:https://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
<comment>SPL Build Configuration: BuildConfig</comment> | ||
<entry key="com.ibm.streams.studio.splproject:STATIC_LINKING">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:OPTIMIZED_CODE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:FUSION_MODE">FDEF</entry> | ||
<entry key="com.ibm.streams.studio.splproject:MAIN_COMPOSITE">application::PhysionetIngestService</entry> | ||
<entry key="com.ibm.streams.studio.splproject:NAME">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:GCC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:SC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:ACTIVE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:LD_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:PRE_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:DATA_DIR"/> | ||
<entry key="com.ibm.streams.studio.splproject:POST_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:REPLACE_ENVIRONMENT">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:USE_PROJECT_DATA_DIR">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:PROFILING"/> | ||
<entry key="com.ibm.streams.studio.splproject:SDB">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:DEFAULT_POOL_SIZE"/> | ||
<entry key="com.ibm.streams.studio.splproject:OUTPUT_DIR">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:SAMPLING_RATE"/> | ||
<entry key="com.ibm.streams.studio.splproject:STANDALONE">F</entry> | ||
</properties> |
25 changes: 25 additions & 0 deletions
25
....ibm.streamsx.health.ingest.physionet.service.PhysionetIngestService-BuildConfig.splbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE properties SYSTEM "http:https://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
<comment>SPL Build Configuration: BuildConfig</comment> | ||
<entry key="com.ibm.streams.studio.splproject:STATIC_LINKING">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:OPTIMIZED_CODE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:FUSION_MODE">FDEF</entry> | ||
<entry key="com.ibm.streams.studio.splproject:MAIN_COMPOSITE">com.ibm.streamsx.health.ingest.physionet.service::PhysionetIngestService</entry> | ||
<entry key="com.ibm.streams.studio.splproject:NAME">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:GCC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:SC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:ACTIVE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:LD_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:PRE_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:DATA_DIR"/> | ||
<entry key="com.ibm.streams.studio.splproject:POST_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:REPLACE_ENVIRONMENT">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:USE_PROJECT_DATA_DIR">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:PROFILING"/> | ||
<entry key="com.ibm.streams.studio.splproject:SDB">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:DEFAULT_POOL_SIZE"/> | ||
<entry key="com.ibm.streams.studio.splproject:OUTPUT_DIR">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:SAMPLING_RATE"/> | ||
<entry key="com.ibm.streams.studio.splproject:STANDALONE">F</entry> | ||
</properties> |
25 changes: 25 additions & 0 deletions
25
...bm.streamsx.health.ingest.physionet.service.test.PhysionetIngestTest-BuildConfig.splbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE properties SYSTEM "http:https://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
<comment>SPL Build Configuration: BuildConfig</comment> | ||
<entry key="com.ibm.streams.studio.splproject:STATIC_LINKING">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:OPTIMIZED_CODE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:FUSION_MODE">FDEF</entry> | ||
<entry key="com.ibm.streams.studio.splproject:MAIN_COMPOSITE">com.ibm.streamsx.health.ingest.physionet.service.test::PhysionetIngestTest</entry> | ||
<entry key="com.ibm.streams.studio.splproject:NAME">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:GCC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:SC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:ACTIVE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:LD_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:PRE_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:DATA_DIR"/> | ||
<entry key="com.ibm.streams.studio.splproject:POST_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:REPLACE_ENVIRONMENT">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:USE_PROJECT_DATA_DIR">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:PROFILING"/> | ||
<entry key="com.ibm.streams.studio.splproject:SDB">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:DEFAULT_POOL_SIZE"/> | ||
<entry key="com.ibm.streams.studio.splproject:OUTPUT_DIR">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:SAMPLING_RATE"/> | ||
<entry key="com.ibm.streams.studio.splproject:STANDALONE">F</entry> | ||
</properties> |
25 changes: 25 additions & 0 deletions
25
...t/.settings/com.ibm.streamsx.health.physionet.PhysionetIngestService-BuildConfig.splbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE properties SYSTEM "http:https://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
<comment>SPL Build Configuration: BuildConfig</comment> | ||
<entry key="com.ibm.streams.studio.splproject:STATIC_LINKING">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:OPTIMIZED_CODE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:FUSION_MODE">FDEF</entry> | ||
<entry key="com.ibm.streams.studio.splproject:MAIN_COMPOSITE">com.ibm.streamsx.health.physionet::PhysionetIngestService</entry> | ||
<entry key="com.ibm.streams.studio.splproject:NAME">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:GCC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:SC_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:ACTIVE">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:LD_OPTS"/> | ||
<entry key="com.ibm.streams.studio.splproject:PRE_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:DATA_DIR"/> | ||
<entry key="com.ibm.streams.studio.splproject:POST_BUILD_CMD"/> | ||
<entry key="com.ibm.streams.studio.splproject:REPLACE_ENVIRONMENT">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:USE_PROJECT_DATA_DIR">T</entry> | ||
<entry key="com.ibm.streams.studio.splproject:PROFILING"/> | ||
<entry key="com.ibm.streams.studio.splproject:SDB">F</entry> | ||
<entry key="com.ibm.streams.studio.splproject:DEFAULT_POOL_SIZE"/> | ||
<entry key="com.ibm.streams.studio.splproject:OUTPUT_DIR">BuildConfig</entry> | ||
<entry key="com.ibm.streams.studio.splproject:SAMPLING_RATE"/> | ||
<entry key="com.ibm.streams.studio.splproject:STANDALONE">F</entry> | ||
</properties> |
2 changes: 2 additions & 0 deletions
2
...ysionet/com.ibm.streamsx.health.ingest.physionet/.settings/org.eclipse.core.runtime.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
line.separator=\n |
3 changes: 3 additions & 0 deletions
3
...ysionet/com.ibm.streamsx.health.ingest.physionet/.settings/org.eclipse.jdt.apt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.apt.aptEnabled=true | ||
org.eclipse.jdt.apt.reconcileEnabled=false |
2 changes: 2 additions & 0 deletions
2
...t/physionet/com.ibm.streamsx.health.ingest.physionet/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.processAnnotations=enabled |
27 changes: 27 additions & 0 deletions
27
ingest/physionet/com.ibm.streamsx.health.ingest.physionet/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Physionet Ingest Service | ||
|
||
Ingest data from physionet.org. To use this service, submit the following application: | ||
|
||
* com.ibm.streamsx.health.ingest.physionet.service::PhysionetIngestService | ||
|
||
This service requires the following submission parameter: | ||
|
||
* record.name - indicates what record to retrieve from Physionet. | ||
|
||
This service exports data with the following topic: | ||
|
||
* ingest-physionet | ||
|
||
Data is exported as JSON with the following schema: | ||
|
||
`type PublishJson_T = rstring jsonString;` | ||
|
||
To consume data in SPL, subscribe to the topic, the output schema of the susbribe operator should be PublishJson_T. | ||
|
||
To process data, convert JSON to the following SPL type: | ||
|
||
`type SignalECG_T = float64 ts, int32 ch1, int32 ch2 ; | ||
type PatientECG_T = SignalECG_T, tuple<rstring patientId> ;` | ||
|
||
|
||
See com.ibm.streamsx.health.ingest.physionet.service.test::PhysionetIngestTest for details. |
Empty file.
54 changes: 54 additions & 0 deletions
54
...t.physionet/com.ibm.streamsx.health.ingest.physionet.service.test/PhysionetIngestTest.spl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// begin_generated_IBM_copyright_prolog | ||
// | ||
// This is an automatically generated copyright prolog. | ||
// After initializing, DO NOT MODIFY OR MOVE | ||
//**************************************************************************** | ||
// Copyright (C) 2016 International Business Machines Corporation | ||
// All Rights Reserved | ||
//**************************************************************************** | ||
// end_generated_IBM_copyright_prolog | ||
namespace com.ibm.streamsx.health.ingest.physionet.service.test ; | ||
|
||
use com.ibm.streamsx.health.ingest.physionet.service::* ; | ||
use com.ibm.streamsx.topology.topic::Subscribe ; | ||
use com.ibm.streamsx.json::JSONToTuple ; | ||
use com.ibm.streamsx.health.ingest.physionet.service::PatientECG_T ; | ||
use com.ibm.streamsx.inet.rest::HTTPTupleView ; | ||
|
||
use com.ibm.streamsx.health.ingest.types::*; | ||
|
||
composite PhysionetIngestTest | ||
{ | ||
graph | ||
(stream<PublishJson_T> Subscribe_1_out0) as Subscribe_1 = Subscribe() | ||
{ | ||
param | ||
topic : TOPIC() ; | ||
streamType : PublishJson_T ; | ||
} | ||
|
||
() as Custom_2 = Custom(JSONToTuple_3_out0 as inputStream) | ||
{ | ||
logic | ||
onTuple inputStream : | ||
{ | ||
printStringLn((rstring) inputStream) ; | ||
} | ||
|
||
} | ||
|
||
(stream<Observation_T> JSONToTuple_3_out0) as JSONToTuple_3 = | ||
JSONToTuple(Subscribe_1_out0) | ||
{ | ||
} | ||
|
||
() as ECGSignal = HTTPTupleView(JSONToTuple_3_out0 as inPort0Alias) | ||
{ | ||
window | ||
inPort0Alias : sliding, count(1000), time(1.0) ; | ||
param | ||
port: 8080; | ||
} | ||
|
||
} | ||
|
Empty file.
Oops, something went wrong.