Hello there
I’m running Orthanc server on my machine (BSD) and everything looks good, I’ve enabled more verbosity to get more information from Orthanc server.
So basically I’ve authorized a modality in network to send DICOM files to Orthanc server, from logs I can tell there is no problem and everthing looks fine (please check attached image).
However, I cannot seem to find actual delivered *.dcm files on my machine, and OrthancStorage directory is empty (same as /tmp/Orthanc directory)
I also attached my Orthanc configuration. Thanks.
Configuration.json (20.9 KB)
This is a little bit odd, but all tables are empty as well:
List of relations
Schema | Name | Type | Owner
According to your config file you are storing the images in PostgreSQL db.
Thanks Rana, I guess I was day dreaming our something … data is actually stored in postgres db. data is there …
“PostgreSQL” : {
“EnableIndex” : true,
“EnableStorage” : true,
“Host” : “localhost”,
“Port” : 5432,
“Database” : “orthanc_db”,
“Username” : “orthanc_usr”,
“Password” : “gv741300”,
“EnableSsl” : false // New in version 3.0
},
I’d like to know if i wanted to enforce Orthanc to write down the files in file-system instead of db (but still using postgre db) , should i change “EnableStorage” parameter to “false”. Is it gonna work that way ?
Hi,
I am a beginner of Orthanc but interested in this issue.
I have just started to read source code and check database schema in
using PostgreSQL plugin like attached file.
I guess that .dcm files exist in BLOB area associated with
resources_internalid_seq that be able to access by oid at content
column in storagearea table of orthanc database.
Is it right?
Which is it faster to get .dcm file in using file system or database
storage when another dicom node call it like C-GET method?
In HorliX/Horos/OsiriX, I think that tag information or so is stored
in sqlite3 DB created by coreData, a kind of ORM, and .dcm files exist
in ordinary Folder.
Anyone know ORM library available in C++?
I like using ORM rather than writing sql-statement directly.
By the way, I cannot find source code of PostgreSQL plugin. Is it in public?
Hiroaki Inomata
1- From the Orthanc Book:
http://book.orthanc-server.com/faq/orthanc-storage.html#direct-access
You should never try and access the Orthanc database by yourself. Use the REST API instead:
http://book.orthanc-server.com/users/rest.html#downloading-images
2- The fastest way to retrieve a DICOM file is through the REST API.
3- “Anyone know ORM library available in C++?” => This forum is about Orthanc, not about database programming.
4- “I cannot find source code of PostgreSQL plugin. Is it in public?” => Of course it is. Have you ever opened the homepage?
https://www.orthanc-server.com/static.php?page=postgresql
Thank you for your reply, Sebastian.
I have no intention to access the Orthanc database directly when the
hospital information system, HIS, including Orthanc works well.
However, it always would be so.
In Japan, for example, we had a big earthquake in 2011/3/11. A large
number of HISs stopped at that time for various reasons. Physical
machine crash, communication line disconnection, poor power
supply...etc.
Under these circumstances, medical activities must be kept being offered.
In these cases, I think, it is better to access database and/or
filesystem directly in order to recover patient data.
You have distributed Orthanc source code under the license like GPL or so.
This means also ' THERE IS NO WARRNTY FOR THE PROGRAM.'
It looks difficult point for me to use Open Source Software, OSS, when
OSS programs use for clinical use.
In addition, I think that legal responsibility about the management of
patient data is shouldered by clinician in most countries, not by
programmers or so.
Your commercial partner Osimis have not constructed world-wide support
system yet though I believe that the stuff have high-skill about IT.
I think medical stuff concerning HIS should grasp the basic
understanding of their system especially in using OSS software.
Hiroaki Inomata, MD
PHAZOR, LLC
https://phazor.info
I would respectfully argue that Open source puts you on a much better footing to plan for disaster
I am a US based Veterinarian, and at least in our field, all the Vendor based solutions are very proprietary, and they don’t go out of their way
and sometimes even seem to put impediments into data migration, and backup by any means other than which they supply.
I have seen systems become obsolete, and then Veterinarians more or less extorted large sums of money to bring their old
pacs data forward.
At least with open source, you can for very low amounts of money, have as many backup sites up and running so your data isn’t vulnerable to one point of failure.
Also I have found orthanc to be accessable by any number of viewers, and dicom programs, both commercial and freeware, including it’s own ability to migrate/download a dicom directory to an individual machine if need be.
As to data security, and backup of access and data, you can handle that in house assuming you have a decently trained IT person or staff.
On the commercial side, you have a vendor who supposedly is covering those concerns, but in reality when trouble arises, the responsibility still
resides with the institution, and it’s backup practices.
Many thanks for your answer, John! I obviously fully endorse your argumentation.
In addition, Hiroaki, here is a link that explains how to backup Orthanc for disaster recovery:
http://book.orthanc-server.com/users/backup.html
If you still want direct access to the database, the database schema is self-explaining to any developer who is familiar with DB programming. Here is the direct link for PostgreSQL:
Index plugin: https://bitbucket.org/sjodogne/orthanc-databases/src/default/PostgreSQL/Plugins/PrepareIndex.sql
Storage plugin: https://bitbucket.org/sjodogne/orthanc-databases/src/default/PostgreSQL/Plugins/PostgreSQLStorageArea.cpp
Sébastien-
Hi,
I appreciate for your practical advises, John.
I am a psychiatrist in Japan and also one of the contributors of Horos
project, open-source DICOM viewer, although my contribution was just
about ROI-UI or so. I looked for open-source PACS server because some
users need more storage. Then, I found Orthanc. However, I am worried
that putting patient data into only one place has potential risk for
disaster as you said.
Thank you for your ideas.
Thank you for references as you presented, Sebastien.
I have almost forgotten how to open/read large object in PostgreSQL.
https://www.postgresql.org/docs/11/lo-interfaces.html
I am reading it now!
Hiroaki Inomata, MD
PHAZOR, LLC
https://phazor.info
Hello,
As I’ve come to understand, the gold standard in data security is the 3-2-1 strategy. This means having at least 3 total copies of your data, 2 of which are local but on different mediums/devices, and at least 1 copy offsite. I believe your concerns are manageable with this Orthanc distribution as there are many possible solutions such as autorouting via Lua scripts and the ability to support Postgre SQL which supports “hot backups”. These 2 options would allow you to send tandem copies of your study data through the orthanc peer mechanisms in conjunction with autorouting as well as taking snapshots of your datasets as they change thanks to hot backups.
Hi,
Thank you for your ideas, @jsalas424.
I have just wrote a test program which can export specified instance
into .dcm file and .json one from orthanc database.
https://www.youtube.com/watch?v=nTwcpU1tOkY
As you said, PostgreSQL runs as server. Therefore, the program could
run whether Orthanc is runnning or not as far as the PostgreSQL is
alive.
It is more difficult to export all studies or specified ones you want
than this case.
It is a just practice.
Hiroaki Inomata, MD