An Approach to XML-based Description of Intraoperative Surgical Workflows Thomas Neumuth1 , Andreas Pretschner2 , Christos Trantakis1,3 , Milos Fischer1 Heinz. U. Lemke1,4 , Oliver Burgert1 1
University of Leipzig, Innovation Center Computer Assisted Surgery (ICCAS)
Philipp-Rosenthal-Str. 55, D-04103 Leipzig, @medizin.uni-leipzig.de 2
FTZ Leipzig, Inst. of Process Information Technology and Control Systems W¨achterstr. 13, D-04107 Leipzig,
[email protected] 3
University of Leipzig, Klinik f¨ur Neurochirurgie
OKL, Liebigstraße 20, D-04103 Leipzig,
[email protected] 4
Technical University of Berlin Dept. for Computer Science and Computer Assisted Medicine Franklinstr. 28/29, D-10587 Berlin,
[email protected]
Abstract: Establishing workflow systems in operating rooms requires a multi-staged development process beginning with the description of so called surgical workflows for analysis and evaluation of surgical procedures. These workflows are recorded during a surgical intervention and have to be processed by information systems for several means, e.g. visualisation of the workflow. This paper describes, how informations about the sequences of surgical steps can be obtained, processed and represented by using different XML-related technologies. A generalised and extendable schema for XML-based recording of workflows is proposed. The second part of the paper shows, how the representation can be transformed to a SVG-visualisation. This visualisation can be used by the surgeon for semantic analysis of the single workflow steps.
1
Introduction
The ICCAS-Institute is an interdisciplinary center covering surgery, informatics and medical engineering. The overall goal is to develop systems for computer aided surgery (CAS) driven by medical needs. Surgical workflow instances and SIP’s1 form the base of this concept: specification, simulation, design and rapid prototyping of CAS components. The CAS components will be integrated into S-PACS2 systems. Surgical workflows are used for the methodic and scientific analysis of surgical sequences. The specification of such surgical sequences in the form of workflows is achieved by applicating XML-related tech1 Surgical 2 Surgical
Integration Profiles as workflow schemes [JBS97] Picture Acquisition and Communication System
nologies as the base for simple visualisation, aggregation, storage, reporting and derivation of SIP’s. For the results based on these profiles, it is, for the first time, possible to virtually prove evaluation and concepts of possible CAS-prototypes by means of a representative database [Lem04]. Due to the large number of single tasks during a surgical intervention, pure XML or rendering as HTML are inapplicable for visualisations. Therefore the workflow has to be translated into a more user-friendly graphical representation like a state chart. We have chosen a discectomy3 as a first application of workflow analysis due to gather a multitude of data for a similar intervention type. A typical discectomy consists of 200-300 atomic tasks and lasts about one to two hours. Only pure surgical actions are recorded, starting with the arrival of the patient in the OR and ending with his transfer to postoperative facilities. The recording of a workflow had no influence to the surgical procedure nor to the intervention time. Therefore, no extra time exposure for the surgeon and the anaesthesia arose from the recording. The intervention was performed according to micro-surgical standards. This paper describes how XML is used as a uniform format for the structuring of the recorded workflow-data and how the recorded workflows can be visualised to medical professionals. Such an approach was chosen to keep informations in a uniform data source as base for further processing. What is meant to be presented thereby is (a) a proposal for a recording scheme for surgical tasks, (b) the extraction of the relevant information and transformation into an automata-based graphical description and (c) the transformation of the recorded workflow into SVG.
2
Data Representation in XML
2.1
Recording the Surgical Workflow
The recording of the surgical process forms the basis of a workflow instance. The workflow recording scheme (see fig. 1) contains header information like (a) the medical discipline with diagnosis, therapy and participants (surgeon, assistant, scrub nurse), (b) the date, (c) the location, (d) the tasks and (e) the recording persons. As instrument for recording a PHP-based editor is under continuous development. A single surgical task consists of the following composed parts: (d1 ) the task time, (d2 ) the executing person with his executing hand, (d3 ) the activity (e.g. insert, irrigate), (d4 ) the instrument for the activity (e.g. syringe, retractor) and (d5 ) the treated anatomic structure (e.g. spine, vertebra). Each task has a task-id and the relevant interventional phase as attributes. An explicit accentuation of the used hand of the executor is required as the six hands participating in a discectomy execute concurrent and parallel courses of actions at given times. For instance, the surgeon can treat an anatomic structure with his right hand and simultaneously keep the access to the surgical area open with an retractor in his left hand, while the assistant is sucking off fluids. 3a
frequently occurring intervertebral disc intervention in neurosurgery
Figure 1: Simplified presentation of the proposed scheme for workflow recording
2.2
Transformation into Markup Language Description
The extensive amount of tasks implicates a need for a two stage structured description. The first stage is the visualisation of the interventional phases. This can be realised by any illustration form of workflows, e.g. Petri Nets. As second intraphasal illustration method, a process state flow chart (PraP4 ) [Pre02] was chosen. The PraP is an event-controlled, untimed state machine and allows the use of techniques for formal verification known from automata theory. Main basic elements of the PraPML are operations and conditions. These are connected via vectorised edges. The PraP has the ability to affiliate processrelevant workflow informations as operational and process state variables. This form of specification is necessary, particularly with regard to later stages of the development: On the one hand, the tasks are to be kept in libraries and used for preoperative intervention planning and, on the other hand, workflows shall be used for event-controlled integration of mechatronic systems. The main challenge during this first transformation is to generate automated graphical positions from a information base that contains no data about graphical positions. The transformation into the PraPML-form begins with extractions of the relevant informations to be displayed, e.g. only the activities executed by the surgeon with his right hand, and sorting them based on surgical phases and task-id’s. Then the content text of an intervention is composed to appropriate describe the task. The calculation of the graphical positions in the example is based on the task-id’s multiplied with non-varying distances btw. operations and conditions. A task is determined by it’s state5 and by its transition. For pure displaying, the matching-condition is simply represented by ”done” (see fig. 2). As the final step, for every task the associated edges are calculated. 4 PraP
stands for ”Prozessablaufplan” by selected task informations
5 represented
The following listing shows an example (only operation): ... operation_ ... $x_col[1] ...
The result of the transformation from above is shown here: irrigation/nsyringe/nlumbar vertebra ... ...
3
Transformation to SVG
3.1
The Stylesheet
The stylesheet uses detached name spaces6 . The goal of the development of the stylesheets was to avoid changes of the XML-Scheme, because this would lead to an interference of the visualisation with the representation of the data. First problems occurred during the sizing of the frames of operations and conditions because the extent of functions of XSLT allows determining the amount of lines in a textblock only at great complexity [K¨oh02, M¨oh04]. Due to this fact and to the possibility to react to events by means of integrated scripts and their options to manipulate the DOM, it was resorted to using ECMAScript [ECM04] to solve the textblock problems: (a) The text-based size of a textblock was calculated with global script variables7 . The heigth and the width of signs contain values in the defined type style of lettering in pixels and are employed for the reason that XSLTfunctions, respectively XPath-functions usable in XSLT, do not allow the direct assignment of the perimeter of a text. The XPath-function ”stringlength()” allows the determination of the amount of characters in a line and multiplies this value with the character pitch. Moreover, the x- and y-distances add the expansion space between text and frame; (b) For text alignment two different type styles and a sign ”/n” were defined. The latter was used as line wrap sign for the operation element (the displayed content, cp. second listing above). This is parsed for the line wrap sign and in dependence of a single or multilined value the first or the second type style is applied for calculating the total dimensions of a text block. 6 xmlns:xsl 7 Variables:
and xmlns:svg heigth and width of a sign, x- and y-distance btw. text and textframe
3.2
The Templates
The processing of the second transformation to SVG is mainly structured in templates for the generation of the main elements operation, condition and edge. Due to the painters model rendering concept used by SVG the template for the exposition of the edges has to be applied preliminary to any other so that the edges will be displayed behind the other graphic elements. This is done by usual SVG commands. The edge-connected arrows are lastly calculated and appended to the document tree. The calculation is done by the script that translates and rotates the arrows depending on the positions and hence derived direction of the last part of an edge.
Figure 2: PraP of the last surgical Phase (simplified)
4
Results and Conclusion
Until today, various approaches for the mapping of markup languages towards SVG have been published. In the field of business economics, this holds true for the transformations of PNML into SVG [BCvH+ 03], of EPML into ARIS Markup Language (AML) [Ass05], and of EPML into SVG [MBN04]. The workflow recording and processing of surgical procedures can be reviewed in [Lem04], [FSB+ 05], [RMJ05] or [CMP96]. The proposed XML-based representation of surgical workflows allows a fine grained decomposition of a surgical intervention into atomic steps. It can be easily adapted and expanded. The goal is to find a generalised XML-representation which makes surgical workflows comparable between different clinics or even between different surgical disciplines. Ideally, there should be a worldwide standard for representing surgical workflows. The current stage of development deals with obtaining of surgical workflows and visualisation of them. The next stage will be the aggregation to workflow schemes. This paper presented a recording scheme for surgical workflows and one way for further processing as automatic transformation to SVG. The specific means of description chosen for this application were state machines which had been chosen to be adequate for the finegranular representation of surgical procedures with respect to later development stages. These graphical representations are very helpful to understand and analyse specific workflows. The occurred and mentioned problems affected mainly the graphical representation and some weaknesses of XPath and SVG. This approach wants to point them out and discuss them. Currently, add-ons to the basic implementation are being developed which allow an autonomous aggregation of the atomic tasks to surgical phases or which recognise recurrences within the process and adapt them automatically. In conclusion it can be said that an introduction of health care system wide standards for
the representation of medical workflows, i.e. a kind of ”Semantic Web for Medicine”, seems to be a useful future development. This would denote a uniform system for the storage of surgical know-how, in regard of workflow recording, storing, reproduction and control of integrated CAS systems for improved surgical interventions and improved patient satisfaction.
References [Ass05]
M. Assmann. Generierung webf¨ahiger EPK-Grafiken mittels ARIS, XML und SVG. Website: http://www-user.tu-chemnitz.de/ maas/projectpage/index2.html., May 2005. TU Chemnitz.
[BCvH+ 03] J. Billington, S. Christensen, K. E. van Hee, E. Kindler, O. Kummer, L. Petrucci, R. Post, C. Stenho, and M. Weber. The Petrinet Markup Language: Concepts, Technology and Tools. In W.M.P. van der Aalst and E. Best, editors, Applications and Theory of Petri Nets, 24th Int. Conf. ICATPN 2003, volume 2679 of Lectures Notes in Computer Sciences, pages 483–505, Eindhoven, 2003. Springer Berlin, Heidelberg. [CMP96]
C.G.L. Cao, C.L. MacKenzie, and S. Payandeh. Task and Motion Analyses in Endoskopic Surgery. In ASME IMECE Conf. Proc., pages 583–590, Atlanta, Georgia, 1996.
[ECM04]
ECMA. ECMAScript for XML (E4X) Specification. Standard ECMA-357. Standard 357, ECMA Int., Geneva, 2004.
[FSB+ 05]
M. Fischer, G. Strauss, O. Burgert, A. Dietz, C. Trantakis, J. Meixensberger, and H.U. Lemke. ENT-surgical workflow as an instrument to assess the efficiency of technological developments in medicine. In H.U. Lemke et al, editor, Proceedings of the 19th CARS 2005, volume 1281 of Elsevier B.V., pages 851–855. Elsevier, 2005.
[JBS97]
S. Jablonski, M. B¨ohm, and W. Schulze. Workflow-Management: Entwicklung von Anwendungen und Systemen. dpunkt-Verlag, Heidelberg, 1997.
[K¨oh02]
A. K¨ohn. Modellierung von grafischen Steuerungsnetzen in XML-Notation. Diploma thesis, HTWK Leipzig. Institut f¨ur Prozeßinformatik und Leittechnik, Leipzig, 2002.
[Lem04]
H.U. Lemke. Surgical Workflow and Surgical Picture Archiving and Communication Systems. Lecture at the UCLA Seminars on Imagigng and Informatics, Arrowhead, 2004.
[MBN04]
J. Mendling, A. Brabenetz, and G. Neumann. EPML2SVG - Generating Websites from EPML Processes. In M. N¨uttgens and F.J. Rump, editors, Proc. of the 3rd GI Workshop on Event-Driven Process Chains (EPK 2004), Luxembourg, 2004.
[M¨oh04]
T. M¨ohring. Transformation von XML-Strukturen in SVG. Research paper, HTWK Leipzig, Institut f¨ur Prozeßinformatik und Leittechnik, Leipzig, 2004.
[Pre02]
A. Pretschner. Visuelle Sprachen in der Automatisierung. Workshop des GMAFachausschusses Steuerungstechnik. Universit¨at Halle Wittenberg, M¨arz 2002.
[RMJ05]
M. Raimbault, X. Morandi, and P. Jannin. Towards Models of Surgical Procedures: Analyzing a Database of Neurosurgical Cases. In O.R. Ratib and S.C. Horii, editors, Medical Imaging 2005: PACS and imaging informatics, volume 5748 of Proceedings of SPIE, Bellingham, WA, 2005. SPIE.