DCM4CHEE Archive 5.x

repository·master·Indexed 19 days ago

https://github.com/dcm4che/dcm4chee-arc-light

A DICOM Archive Java EE application running on WildFly. Version 5.x is a rewrite of the 2.x series that utilizes LDAP for central configuration compliant with DICOM standards. The project includes documentation for building from source using Java 17 and Maven, configuring various database data sources (DB2, Firebird, H2, MariaDB, MySQL, Oracle, PostgreSQL, SQL Server) via CLI, and setting up the dcm4chee-arc-ui2 development environment.

Tokens
8.2K
Snippets
25
Records
33
Agent score
64%

What's inside dcm4chee-arc-light

  1. Understand the DCM4CHEE Archive 5.x architecture

    master

    DCM4CHEE Archive 5.x is a DICOM Archive Java EE application designed to run in WildFly.

    A core architectural feature of version 5.x is the use of LDAP as central configuration, which complies with the DICOM Application Configuration Management Profile (DICOM 2015, Part 15, Annex H). This replaces the configuration methods used in the 2.x series.

  2. Access the PostgreSQL database schema documentation

    master
    DCM4CHEE Archive 5.x provides detailed database schema documentation for PostgreSQL, organized by version. You can find the schema definitions for specific versions (ranging from 5.5.x to 5.34.x) to understand the table structures, relationships, and constraints used by the archive.
  3. Build DCM4CHEE Archive 5.x from source

    master

    To build the Archive, you must have Java 17 (JDK) or newer installed.

    If you are building unreleased versions that are not yet in the Maven repository, you must first build the dcm4che 3 Library and dcm4chee-arc-lang from their respective master branches.

    Follow these steps to build the Archive for a specific database using Maven.

    # 1. Build dcm4che 3 Library (if needed)
    git clone https://github.com/dcm4che/dcm4che.git
    cd dcm4che
    ./mvnw install
    
    # 2. Build dcm4chee-arc-lang (if needed)
    git clone https://github.com/dcm4che/dcm4chee-arc-lang.git
    cd dcm4chee-arc-lang
    ./mvnw install
    
    # 3. Build the Archive for a specific database
    # Replace {db} with: db2, firebird, h2, mysql, oracle, psql, or sqlserver
    ./mvnw install -D db={db}
  4. Local Development Setup: Serving Schema Files via Apache

    master
    The dcm4chee-arc-ui2 project requires schema files to be accessible at /assets/schema/*. During local development, these files are served from the dcm4chee-arc-lang project using Apache and a symbolic link. This setup avoids manual file copying and ensures that changes in dcm4chee-arc-lang are reflected immediately in the UI development environment.
  5. Configure Apache to serve dcm4chee-arc-lang schema files

    master

    To serve schema files from the dcm4chee-arc-lang project, follow these steps to create a symlink, configure an Apache Alias, and set permissions.

    ### 1. Create Symlink
    Link the `webapp` folder of the language project into Apache’s web root:
    ```bash
    sudo mkdir -p /var/www/html/dcm4chee-arc-lang
    sudo ln -s /home/<user>/workspace/dcm4chee-arc-lang/src/main/webapp \
               /var/www/html/dcm4chee-arc-lang/webapp

    2. Configure Apache Alias

    Edit your Apache site configuration (e.g. 000-default.conf) and add:

    Alias /dcm4chee-arc-lang/ /var/www/html/dcm4chee-arc-lang/webapp/
    
    <Directory /var/www/html/dcm4chee-arc-lang/webapp>
        Options FollowSymLinks
        Require all granted
    </Directory>

    Reload Apache after saving changes.

    3. Set Permissions

    Allow the Apache user (www-data) to access the project files:

    sudo usermod -aG <user> www-data
    # Optional: restrict access to owner and group only (recommended)
    chmod -R 750 /home/<user>/workspace/dcm4chee-arc-lang

    Restart Apache after applying permissions.

  6. Configure Angular Proxy for schema files

    master

    To ensure the Angular development server correctly maps requests for /assets/schema to the Apache-served files, update your Angular proxy configuration with the following mapping. This rewrites the path to include the language prefix used by Apache.

    "/assets/schema": {
      target: "http://localhost",
      pathRewrite: {
        "^/assets/schema": "/dcm4chee-arc-lang/en/assets/schema"
      }
    }
  7. Configure build security options

    master

    When building the Archive, you can specify security levels for the Web UI and RESTful services using the -D secure flag.

    Available options:

    • ui: Builds with a secured WEB UI.
    • all: Builds with both a secured WEB UI and secured RESTful services.
    # Build with secured WEB UI
    ./mvnw install -D db={db} -D secure=ui
    
    # Build with secured WEB UI and secured RESTful services
    ./mvnw install -D db={db} -D secure=all
  8. Use SQL scripts for PostgreSQL setup and updates

    master

    The project provides a suite of SQL scripts to manage the PostgreSQL database lifecycle for DCM4CHEE Archive. These include scripts for initial creation, index management, and version-specific updates.

    Core PostgreSQL Scripts

    • create-psql.sql: Used for initial database creation.
    • create-fk-index.sql: Used to create foreign key indexes.
    • create-case-insensitive-index.sql: Used to create case-insensitive indexes.
    • drop-psql.sql: Used to drop the database schema.

    Version Update Scripts

    When upgrading the archive, use the corresponding update script for your target version (e.g., update-5.34-psql.sql). These scripts are located in the dcm4chee-arc-entity/src/main/resources/sql/ directory of the repository.

    ### PostgreSQL Script Reference
    - create-psql.sql
    - create-fk-index.sql
    - create-case-insensitive-index.sql
    - drop-psql.sql
    - update-[VERSION]-psql.sql
  9. Manage MySQL database schema with SQL scripts

    master

    DCM4CHEE Archive 5.x provides a set of SQL scripts to manage the MySQL database schema. Use these scripts for initial creation, dropping the schema, or performing version-specific updates.

    Available Scripts

    • Creation: create-mysql.sql for initial schema setup.
    • Deletion: drop-mysql.sql to remove the schema.
    • Updates: Version-specific update scripts (e.g., update-5.34-mysql.sql) to migrate the database from one version to another. These are located in the dcm4chee-arc-entity module resources.
  10. Manage Oracle database schema with SQL scripts

    master

    DCM4CHEE Archive 5.x provides specialized SQL scripts for Oracle database environments. These include scripts for schema creation, index optimization, and versioned updates.

    Available Scripts

    • Creation: create-oracle.sql for initial schema setup.
    • Optimization:
      • create-fk-index.sql: Creates indexes for foreign keys.
      • create-case-insensitive-index.sql: Creates case-insensitive indexes.
    • Deletion: drop-oracle.sql to remove the schema.
    • Updates: Version-specific update scripts (e.g., update-5.34-oracle.sql) to migrate the database. These are located in the dcm4chee-arc-entity module resources.
  11. Manage SQL Server database schemas and updates

    master

    DCM4CHEE Archive provides a comprehensive set of SQL scripts for managing Microsoft SQL Server databases. These scripts allow you to perform initial schema creation, apply specific index optimizations, and execute versioned database updates to migrate your schema between different versions of the software.

    Initial Setup

    • Create Schema: Use create-sqlserver.sql to initialize the database.
    • Optimize Indexes: Use create-fk-index.sql for foreign key indexing and create-case-insensitive-index-sqlserver.sql for case-insensitive index support.
    • Cleanup: Use drop-sqlserver.sql to remove the schema.

    Versioned Updates

    When upgrading DCM4CHEE, you must apply the corresponding update script for your target version (e.g., update-5.34-sqlserver.sql). Scripts are available for all major versions from 5.1 through 5.34.

    ### SQL Server Script Reference
    
    **Initial Setup:**
    - `create-sqlserver.sql`
    - `create-fk-index.sql`
    - `create-case-insensitive-index-sqlserver.sql`
    - `drop-sqlserver.sql`
    
    **Versioned Updates:**
    - `update-5.34-sqlserver.sql`
    - `update-5.33-sqlserver.sql`
    - ... (available for all versions from 5.1 up to 5.34)