clone the i2b2-etl & Mozilla repo
git clone https://github.com/i2b2/i2b2-etl.git
git clone https://github.com/i2b2/i2b2-cdi-qs-mozilla.git
cp -r mozilla-i2b2-etl/Mozilla/ i2b2-etl/
cd i2b2-etl
docker build -t i2b2/i2b2-etl:local-v1 .
open i2b2-etl-docker/postgres/.env file
update i2b2-etl tag to local-v1
docker rm -f i2b2-etl
docker-compose up -d i2b2-etl
Start a bash shell inside the i2b2-etl container
$ docker exec -it i2b2-etl bash
python -m unittest discover -s i2b2_cdi/test/
i2b2-etl provides a command line interface and api interface to import, delete concepts and facts and encounters.
refer to i2b2-docker project repo to deploy i2b2 with etl container
Start a bash shell inside the i2b2-etl container
$ docker exec -it i2b2-etl bash
For ease of documentation use etl as an alias for command invocation
$ alias etl="python -m i2b2_cdi ${ARGS}"
Below commands helps to play with I2B2-ETL
This will list all possible operation of i2b2-etl
$ etl --help
OR
$ etl -h
$ etl concept delete -c <env-file>
$ etl concept load -c <env-file> -i <input-dir>
Note: File name should have pattern like *_concepts.csv
$ etl fact delete -c <env-file>
Load facts with concept_cd validation.
$ etl fact load -c <env-file> -i <input-dir>
Load facts with no concept_cd validation.
$ etl fact load -c <env-file> -i <input-dir> --disable-fact-validation
Note: File name should have pattern like *_facts.csv
$ etl patient delete -c <env-file>
$ etl patient load -c <env-file> -i <input-dir>
$ etl encounter delete -c <env-file>
$ etl encounter load -c <env-file> -i <input-dir>
Create new project & user along with password , also assign new project to new user.
$ etl project add -c <config-file> --project-name <project-name> --project-user-password <project-user-password>
Copy data from one project to another.
$ etl project load -c <config-file> --project-name <project-name>
Change password for user in i2b2
$ etl project password -c <config-file> --user <user-id> --password <password>
Wagholikar KB, Ainsworth L, Zelle D, et.al. I2b2-etl: Python application for importing electronic health data into the informatics for integrating biology and the bedside platform. Bioinformatics. 2022 Oct 14;38(20):4833-4836.
Copyright 2023 Massachusetts General Hospital. Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.