mdm2neo4j/README.md
2024-10-07 16:28:10 +02:00

63 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mdm2neo4j
mdm2neo4j imports ODM-XML-files into a Neo4j graph database.
## Quickstart
Create a configuration file, storing your details for the database-connection.
E.g. in your home-directory with the name `mdm.conf`.
```ini
[neo4j]
uri = bolt://localhost:7687
username = neo4j
password = myfancypassword
```
Start the program by providing the location of your configuration-file and the location of the XML-files.
```sh
python3 src/run.py --conf ~/mdm.conf --files ~/Desktop/datasource
```
## Requirements
- make sure, `python3` is installed
- install the required libraries with `pip install -r requirements.txt`
- download all ODM-XML-files from the [MDM portal]( https://mdm.mi.uni-heidelberg.de/access/register ) and place all XML-files you want to load in one folder
- have a running Neo4j DB (Neo4j version 5)
- create the configuration-file as described in the [Quickstart section](#quickstart)
## General Structure of Repo
![](docs/uml/structure_python.svg)
The two main scripts that do things are `database_connector.py` and `xml_processor.py`.
`run.py` is the "main" script where everything comes together and that is responsible for running everything.
## Detailled Infos
The mapping of the odm-xml files to Neo4j is based on specification for ODM version 1.3.2.
The specification document is available on the CDISC website http://www.cdisc.org/odm.
The mapping includes 18 of 39 elements of the "Study" section (section 3.1.1) of the "General Elements" (section 3) of the ODM specification.
The Neo4j graph has eleven labels:
- Study
- StudyEvent
- Form
- ItemGroup
- Item
- RangeCheck
- CodeList
- CodeListItem
- BasicDefinitions
- MeasurementUnit
- Alias
## Tech Docu
Find the technical documentation in the [`docs`-folder.](docs/)
## Licence
This program is released under [Version 3 of the GPL or any later version](https://www.gnu.org/licenses/gpl-3.0.en.html).