mkinyua53/orthanc

Orthanc API for Laravel

v0.2.0 2024-11-09 13:33 UTC

This package is auto-updated.

Last update: 2025-03-09 11:10:03 UTC


README

Latest Version on Packagist Total Downloads

This is a Laravel package that provides a simple and elegant interface for interacting with the Orthanc REST API, enabling developers to easily manage medical imaging studies within their Laravel applications.

Api documentation: https://orthanc.uclouvain.be/api/

Please note: Work in progress

Installation

You can install the package via composer:

composer require mkinyua53/orthanc

Set the required environment variables in the .env file

ORTHANC_ENDPOINT=http://localhost
ORTHANC_PORT=8042
ORTHANC_AUTH_TYPE=Basic
ORTHANC_USERNAME=your_username
ORTHANC_PASSWORD=your_password
ORTHANC_VERIFY_SSL=true

Optionally, you can publish the configuration file

php artisan vendor:publish --provider="Mkinyua53\Orthanc\OrthancServiceProvider" --tag="orthanc-config"

Usage

Studies

use Mkinyua53\Orthanc\Facades\Studies;

// Get all studies
$studies = Studies::getAll();

// Get all studies with details
$studies = Studies::getAllDetailed();

// Get a study by ID
$study = Studies::get($studyId);

// anonymize a study
$study = Studies::anonymize($studyId);

// create a zip archive of a study
$study = Studies::createArchive($studyId);

// list attachments of a study
$attachments = Studies::getAttachments($studyId);

// delete an attachment of a study
$study = Studies::deleteAttachment($studyId, $attachmentId);

// attach a file to a study
$study = Studies::setAttachment($studyId, $attachmentName, [$attachmentFile]);

// compress attachments
$study = Studies::compressAttachments($studyId, $attachmentName, $attachmentId);

// get attachment
$attachment = Studies::getAttachment($studyId, $attachmentName, $attachmentId);

// get attachment MD5
$attachment = Studies::getAttachmentMd5($studyId, $attachmentName, $attachmentId);

Patients

use Mkinyua53\Orthanc\Facades\Patients;

// Get all patients
$patients = Patients::getAll();

// Get a patient by ID
$patient = Patients::get($patientId);

// Get all patients with details
$patients = Patients::getAllDetailed();

// anonymize a patient
$patient = Patients::anonymize($patientId);

System

use Mkinyua53\Orthanc\Facades\System;

// Get all plugins
$plugins = System::plugins();

// Get a plugin by ID
$plugin = System::getPlugin($pluginId);

// Get statistics
$statistics = System::statistics();

// Get system information
$system = System::about();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mwatha.kinyua@hotmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.