-
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.
- Loading branch information
1 parent
aa7ab18
commit e9ad9cf
Showing
20 changed files
with
292 additions
and
102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
id;urn:fdbd3b62-57c1-11ee-a711-02a0527110a8:20231024:heart_rate_variability1;my_internal_id | ||
subject/reference;Patient/fdbd3b62-57c1-11ee-a711-02a0527110a8; | ||
id;; |
Large diffs are not rendered by default.
Oops, something went wrong.
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,62 @@ | ||
version: '3' | ||
|
||
services: | ||
# testserver: | ||
# image: testserver | ||
# ports: | ||
# - "55551:55551" | ||
nifireg: | ||
image: apache/nifi-registry | ||
ports: | ||
- "18080:18080" | ||
nifi: | ||
image: apache/nifi | ||
ports: | ||
- "8443:8443" | ||
- "8080:8080" | ||
environment: | ||
ENTITY_TYPES: Medication,https://fiware.github.io/data-models/context.jsonld,Patient,https://smartdatamodels.org/dataModel.Hl7/Patient,MedicationAdministration,https://smartdatamodels.org/dataModel.Hl7/MedicationAdministration,MedicationStatement,MedicationDispense,Observation,Media | ||
#AT_CONTEXT: https://fiware.github.io/data-models/context.jsonld | ||
FORCE_ARRAY: performer | ||
NGSILD_HOST: http://scorpio:9090 | ||
NOTIFICATION_PATH: notify | ||
NOTIFICATION_PORT: 4444 | ||
NOTIFICATION_HOST: http://nifi | ||
HL7_HOST: http://testserver:55551 | ||
TEMP_INTERVAL: 20 | ||
NIFI_REG: http://nifireg:18080 | ||
MY_HOST: http://nifi:8080 | ||
########## JVM ########## | ||
|
||
# -Xms | ||
# The initial JVM heap size. | ||
#NIFI_JVM_HEAP_INIT: 512m | ||
|
||
# -Xmx | ||
# The maximum JVM heap size. | ||
#NIFI_JVM_HEAP_MAX: 512m | ||
|
||
# -Xdebug | ||
# The JVM Debugger can be enabled by setting this environment variable to any value. | ||
#NIFI_JVM_DEBUGGER: '' | ||
|
||
|
||
|
||
########## Web ########## | ||
|
||
# nifi.web.http.host | ||
NIFI_WEB_HTTP_HOST: '0.0.0.0' | ||
|
||
# nifi.web.http.port | ||
# HTTP Port | ||
NIFI_WEB_HTTP_PORT: 8080 | ||
volumes: | ||
- ./NiFi_Flowmappingonlyfile2file.json:/home/nifi/NGSILDHL7Flow.json | ||
- ./loadtemplate.sh:/home/nifi/loadtemplate.sh | ||
- ./download:/home/nifi/download | ||
- ./mapping.csv:/home/nifi/mapping.csv | ||
- ./load:/home/nifi/load | ||
- ./original:/home/nifi/original | ||
entrypoint: ["bash", "/home/nifi/loadtemplate.sh"] | ||
depends_on: | ||
- nifireg |
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,48 @@ | ||
#!/bin/bash | ||
|
||
touch bla.temp | ||
/opt/nifi/scripts/start.sh & | ||
pid=$! | ||
if [[ ! -f "created" ]]; then | ||
while true; do | ||
curl -s --head http://localhost:8080/nifi | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null | ||
if [ $? -eq 0 ]; then | ||
echo "NIFI Website is up." | ||
break | ||
else | ||
echo "NIFI Website is down." | ||
sleep 5 | ||
fi | ||
done | ||
# Set the nifi cli path | ||
NIFI_CLI=/opt/nifi/nifi-toolkit-current/bin/cli.sh | ||
|
||
# Set the nifi url | ||
NIFI_URL=http://localhost:8080/nifi | ||
|
||
REG_CLIENT_EXISTS=$($NIFI_CLI nifi get-reg-client-id -rcn regclient1|grep -c regclient1) | ||
if [ $REG_CLIENT_EXISTS -gt 0 ]; then | ||
echo "Creating reg client" | ||
$NIFI_CLI nifi create-reg-client -u ${MY_HOST} --registryClientUrl ${NIFI_REG} --registryClientName regclient1 | ||
fi | ||
echo "checking bucket" | ||
BUCKETS_EXISTS=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}| grep -c "MyBucket") | ||
|
||
|
||
|
||
|
||
if [ $BUCKETS_EXISTS -lt 1 ]; then | ||
echo "bucket does not exist" | ||
$NIFI_CLI registry create-bucket -u ${NIFI_REG} --bucketName MyBucket | ||
BUCKET_ID=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}|grep MyBucket|awk '{print $3}') | ||
$NIFI_CLI registry create-flow -u ${NIFI_REG} --bucketIdentifier $BUCKET_ID --flowName MyFlow | ||
FLOWID=$($NIFI_CLI registry list-flows -u ${NIFI_REG} --bucketIdentifier=$BUCKET_ID|grep MyFlow|awk '{print $3}') | ||
$NIFI_CLI registry import-flow-version -u ${NIFI_REG} -f $FLOWID -i /home/nifi/NGSILDHL7Flow.json | ||
$NIFI_CLI nifi pg-import --bucketIdentifier $BUCKET_ID --flowIdentifier $FLOWID --flowVersion 1 | ||
fi | ||
PG_ID=$($NIFI_CLI nifi pg-list|grep 1|awk '{print $4}') | ||
$NIFI_CLI nifi pg-enable-services --processGroupId $PG_ID | ||
$NIFI_CLI nifi pg-start --processGroupId $PG_ID | ||
touch created | ||
fi | ||
wait $pid |
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 @@ | ||
id;urn:fdbd3b62-57c1-11ee-a711-02a0527110a8:20231024:heart_rate_variability1;my_internal_id | ||
subject/reference;Patient/fdbd3b62-57c1-11ee-a711-02a0527110a8; | ||
id;; |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
id;urn:fdbd3b62-57c1-11ee-a711-02a0527110a8:20231024:heart_rate_variability1;my_internal_id | ||
subject/reference;Patient/fdbd3b62-57c1-11ee-a711-02a0527110a8; | ||
id;; |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
id;urn:fdbd3b62-57c1-11ee-a711-02a0527110a8:20231024:heart_rate_variability1;my_internal_id | ||
subject/reference;Patient/fdbd3b62-57c1-11ee-a711-02a0527110a8; | ||
id;; |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.