diff --git a/gnu/packages/medical.scm b/gnu/packages/medical.scm index 68a9260cf6e..8e344b6dd61 100644 --- a/gnu/packages/medical.scm +++ b/gnu/packages/medical.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2017 Quiliro ;;; Copyright © 2022 Petr Hodina +;;; Copyright © 2025 Jake Forster ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,23 +20,40 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages medical) + #:use-module (guix build-system cmake) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix download) #:use-module (guix gexp) - #:use-module (guix licenses) + #:use-module (guix hg-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (gnu packages base) #:use-module (gnu packages bash) ; wrap-program + #:use-module (gnu packages boost) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) #:use-module (gnu packages databases) + #:use-module (gnu packages documentation) + #:use-module (gnu packages image) + #:use-module (gnu packages image-processing) #:use-module (gnu packages kde-frameworks) ; kirigami + #:use-module (gnu packages linux) + #:use-module (gnu packages lua) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) - #:use-module (gnu packages qt)) + #:use-module (gnu packages qt) + #:use-module (gnu packages serialization) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls) + #:use-module (gnu packages web) + #:use-module (gnu packages xml)) (define-public mygnuhealth (package @@ -125,3 +143,73 @@ functionality includes appointments, patient records, treatment planning, billing etc. It is a full featured, reliable and thoroughly tested application and has been translated into many languages.") (license license:gpl3+))) + +(define-public orthanc + (package + (name "orthanc") + (version "1.12.7") + (source + (origin + (method hg-fetch) + (uri (hg-reference (url "https://orthanc.uclouvain.be/hg/orthanc") + (changeset "a30cc2fa7250"))) + (file-name (hg-file-name name version)) + (sha256 + (base32 "1n8v0dh17g9ihny8cpq63qd6ai5l95i5h3sz9vwzfnd7q3qh0rb9")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list (string-append "-DDCMTK_DICTIONARY_DIR=" + #$(this-package-input "dcmtk") "/share/dcmtk-" + #$(package-version (this-package-input "dcmtk"))) + ;; Building Connectivity Checks plugin requires the network. + "-DBUILD_CONNECTIVITY_CHECKS=OFF" + ;; Disable 4 tests that require the network. + "-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + ;; The OrthancServer/ subdirectory contains the root + ;; CMakeLists.txt file. + (chdir "OrthancServer"))) + (add-after 'unpack 'remove-localtime-requirement + (lambda _ + ;; /etc/localtime is not present in the build container; + ;; don't let that stop the build. + (substitute* "OrthancFramework/Sources/Toolbox.cpp" + (("if \\(!SystemToolbox::IsExistingFile\\(LOCALTIME\\)\\)") + "if (false)")))) + ;; There is no test target; simply run the binary. + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./UnitTests"))))))) + (native-inputs (list doxygen + glibc-utf8-locales ;for one test + googletest + python)) + (inputs (list boost + civetweb + curl + dcmtk + jsoncpp + libjpeg-turbo + libpng + lua + openssl + protobuf + pugixml + `(,util-linux "lib") ;for uuid.h + sqlite + unzip)) + (home-page "https://orthanc-server.com") + (synopsis + "Standalone @acronym{DICOM, Digital Imaging and Communications in +Medicine} server") + (description + "Orthanc is a standalone @acronym{DICOM, Digital Imaging and +Communications in Medicine} server with a RESTful API and plugin +mechanism for extending its functionality.") + (license license:gpl3+)))