Please, go through the following steps if you want to contribute to this project:
- Report an issue. Describe it as much as possible.
- Fork the repository, create a new branch.
- Develop your changes, make sure all unit tests are working. Add new unit tests as needed.
- Create a pull request.
Build:
docker compose build
Run:
docker compose up
IRIS instance:
- Credentials:
superuser
/SYS
- URL: http://localhost:52773/csp/sys/UtilHome.csp
See README.md, QuickStart section.
Generate 100 sample hl7 files for processing in test production:
do ##class(DataPipe.Test.HL7.Helper).GenerateFilesHL7ADT(100)
Generate 100 REST requests for processing in test production:
do ##class(DataPipe.Test.REST.Helper).SendHTTPRequests(100)
Delete DataPipe.Data.*
data:
do ##class(DataPipe.Test.Helper).KillData()
Open an IRIS interactive session:
docker exec -it datapipe bash
iris session IRIS
Run all unit tests:
zn "dpipe"
set ^UnitTestRoot = "/app/src/DataPipe/UnitTest"
do ##class(%UnitTest.Manager).RunTest("", "/nodelete")
Run an specific test case:
zn "dpipe"
set ^UnitTestRoot = "/app/src/DataPipe/UnitTest"
do ##class(%UnitTest.Manager).RunTest(":DataPipe.UnitTest.HL7:TestDone", "/nodelete")
Load module from local dev environment:
zpm "load /app"
Set up testing IPM repository:
zpm "repo -n registry -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42"
Search packages already published in testing IPM repository:
zpm "search"
Test publishing process:
zpm "iris-datapipe publish -verbose"
Search published package in testing IPM repository:
zpm "search"
Run a container with an IRIS instance
docker compose -f docker-compose.test.yml up -d
Install ipm
docker compose -f docker-compose.test.yml exec -it iris bash
iris session iris
zn "USER"
set r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
Set up testing IPM repository:
zpm "repo -n test -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42"
Search published packages:
zpm "search"
Install the package:
zpm "install iris-datapipe 2.0.0"
You can test an upgrade from DataPipe 0.0.2 to DataPipe 2.x following these steps
Run a container with a brand new IRIS (upgrade)
docker compose -f docker-compose.test.yml up -d
Install ipm
docker compose -f docker-compose.test.yml exec -it iris bash
iris session iris
set r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
Install previous datapipe version
zpm "install iris-datapipe 0.0.2"
Start production
Generate data:
do ##class(DataPipe.Test.HL7.Helper).GenerateFilesHL7ADT(100)
Stop Production
Create a temporary table to store Flows, they will be migrated into Pipes in new version
CREATE TABLE TempDataPipeMigration(Code CHAR(255) NOT NULL)
INSERT INTO TempDataPipeMigration (Code) SELECT DISTINCT Flow FROM DataPipe_Data.Inbox
Install latest local datapipe version
zpm "load /app"
Delete WebApp "/dpipe/api/rf2"
Make sure all your references to "Flow" field are transformed to "Pipe" field (e.g. in your data transformations)
Migrate legacy Flows to Pipes:
INSERT INTO DataPipe_Data.Pipe (Code, Description) SELECT Code, 'Migrated' FROM TempDataPipeMigration
DROP TABLE TempDataPipeMigration
Rebuild indices:
write ##class(DataPipe.Data.Inbox).%BuildIndices($lb("PipeIdx"))
Setup security privileges as in README.md Users and privileges section.
Enable CORS for deploying datapipe-UI:
do $system.OBJ.Load("/app/src/Form/REST/Abstract.cls", "ck")
Make sure CSPSystem
has read privileges on DataPipe database.
Deploy datapipe-UI changing environment.ts
config as needed.
Start production