ultrasound structured report parsing

We are attempting to abstract certain ob/gyn data from a structured report generated by ultrasound machines. We need to import a small number of parameters such as endometrial thickness, right ovarian follicle count, measurements of right ovarian follicles, left ovarian follicle count, measurements of left ovarian follicles.

How might we develop a plugin to assist with this parsing and delivery of data to our mySQL?

Many thanks


The first question to ask yourself is: Which language do you want to use?

If you must directly interface with MySQL (without using a separate Web service), this rules out the possibility of using Lua.

If you know C/C++, seriously consider creating a plugin [1]. This will provide the best integration with Orthanc. Have a look at the “OrthancPluginRegisterOnStoredInstanceCallback()” and “OrthancPluginGetInstanceJson()” functions in the Orthanc plugin SDK [2]. This will give you a JSON string (that is easier to parse than a raw DICOM file) each time a new instance is stored by Orthanc. The JSON string can be parsed using e.g. JsonCpp [3].

Finally, you can develop an external script that will communicate with Orthanc through its REST API [4]. This script can be written using any language (such as Python, Java or C#).


[1] https://github.com/jodogne/OrthancContributed/tree/master/Plugins
[2] https://orthanc.chu.ulg.ac.be/sdk/index.html
[3] https://github.com/open-source-parsers/jsoncpp
[4] https://orthanc.chu.ulg.ac.be/book/users/rest.html