<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Clinical Guidelines | Soroush Dianaty, M.D.</title><link>https://soroushdianaty.com/tags/clinical-guidelines/</link><atom:link href="https://soroushdianaty.com/tags/clinical-guidelines/index.xml" rel="self" type="application/rss+xml"/><description>Clinical Guidelines</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 07 Oct 2026 00:00:00 +0000</lastBuildDate><image><url>https://soroushdianaty.com/media/icon_hu_a589f346fc4c3e9d.png</url><title>Clinical Guidelines</title><link>https://soroushdianaty.com/tags/clinical-guidelines/</link></image><item><title>CutGL: GEM Cutter III in the Browser</title><link>https://soroushdianaty.com/projects/cutgl/</link><pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate><guid>https://soroushdianaty.com/projects/cutgl/</guid><description>&lt;p&gt;CutGL (Cutter for Guidelines) is GEM Cutter III as a web page. It shows a clinical guideline marked up as a Guideline Elements Model (GEM III, ASTM E2210) XML document side by side with the guideline it was cut from, and it can mark up new ones. Nothing needs to be installed, and the guideline and the markup stay in the browser.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="at-a-glance"&gt;At a glance&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Status&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Early version (0.1.0). The code is public; a hosted version is not yet available.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Role&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Author and maintainer. Written with Claude (Anthropic), as the README states; each commit carries a Claude co-author line.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Origin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A port of GEM Cutter III, a Java desktop application from the Yale Center for Medical Informatics (2012). Re-implemented in JavaScript from the desktop application&amp;rsquo;s behaviour and file formats; none of its Java code is included.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Clinical practice guidelines, guideline knowledge representation (GEM III)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;License&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MIT for CutGL. The GEM III schema and the six report stylesheets from GEM Cutter III are included unchanged and are not covered by the MIT license; copyright stays with their authors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Repository&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;The Guideline Elements Model and GEM Cutter III are the work of the Yale Center for Medical Informatics. GEM III describes the parts of a clinical guideline (its identity, its recommendations, their conditions, decision variables, actions, evidence quality and strength, and so on) as elements of an XML schema. GEM Cutter III is the desktop application for &amp;ldquo;cutting&amp;rdquo; a guideline into that schema: a person selects a passage of the guideline and places it in the matching element of a tree, and the result is saved as a GEM XML document. The application also produced six reports from the marked-up document through XSLT stylesheets.&lt;/p&gt;
&lt;p&gt;GEM Cutter III is a Java desktop program run from &lt;code&gt;GemCutter.jar&lt;/code&gt;. CutGL keeps its file formats and reports and moves the work to a static web page.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="what-cutgl-does"&gt;What CutGL does&lt;/h2&gt;
&lt;h3 id="view-a-marked-up-guideline"&gt;View a marked-up guideline&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Drop a GEM &lt;code&gt;.xml&lt;/code&gt; file on the page, or open it from the Project menu. A GEM XML opened on its own starts in &lt;strong&gt;View&lt;/strong&gt; mode: the editing tools are put away and &lt;strong&gt;Filled only&lt;/strong&gt; hides the empty elements.&lt;/li&gt;
&lt;li&gt;The element tree shows each element&amp;rsquo;s definition from the GEM III schema.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Report&lt;/strong&gt; menu gives the original Recommendations, Detailed, Rules, Decision Variables, Actions and GEM-COGS reports.&lt;/li&gt;
&lt;li&gt;Attach the guideline the document was cut from, and &lt;strong&gt;Link element text to passages&lt;/strong&gt; finds the text of each element in it and highlights the passages. &lt;strong&gt;Edit&lt;/strong&gt; brings the tools back.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="open-a-document-from-a-link"&gt;Open a document from a link&lt;/h3&gt;
&lt;p&gt;A link can open a document directly, so a marked-up guideline can be put on a web page:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cutgl/?xml=guidelines/asthma.xml&amp;amp;guideline=guidelines/asthma.pdf
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cutgl/?project=https://example.org/asthma_project.zip
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cutgl/?sample=blood-pressure
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;xml&lt;/code&gt; is a GEM XML file and &lt;code&gt;guideline&lt;/code&gt; (optional) the guideline it was cut from; &lt;code&gt;project&lt;/code&gt; is a zipped project folder; &lt;code&gt;sample&lt;/code&gt; is one of the three sample projects. Adding &lt;code&gt;&amp;amp;edit&lt;/code&gt; opens the document in Edit mode. A file on another site opens only if that site allows it (CORS). A document opened from a link is not stored in the browser.&lt;/p&gt;
&lt;h3 id="mark-up-a-guideline"&gt;Mark up a guideline&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;New project&lt;/strong&gt; from a guideline in PDF, HTML, RTF, Word &lt;code&gt;.docx&lt;/code&gt; or plain text. The tree starts as the full GEM III schema, every element once.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Insert, Append, Replace, Clear&lt;/strong&gt; move the text selected in the guideline into the selected element, as in the desktop application. Text taken from the guideline is marked &lt;code&gt;explicit&lt;/code&gt;, typed text is marked &lt;code&gt;inferred&lt;/code&gt;, and the source can be set by hand.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subtree&lt;/strong&gt; and &lt;strong&gt;Delete&lt;/strong&gt; add or remove a copy of an element with its children.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code sets&lt;/strong&gt; on &lt;code&gt;…Code&lt;/code&gt; elements, fixed type lists on &lt;code&gt;ActionType&lt;/code&gt; and &lt;code&gt;DirectiveType&lt;/code&gt;, and drag and drop for &lt;code&gt;Conditional&lt;/code&gt; and &lt;code&gt;Imperative&lt;/code&gt; elements.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;logic window&lt;/strong&gt; for Conditional and Imperative recommendations, with If and Then panes, &lt;code&gt;( ) AND OR NOT&lt;/code&gt;, and the decision variables and actions to click into place.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GEM II ⇒ GEM III&lt;/strong&gt; adds every element the GEM III schema defines that an older document lacks, in schema order.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find&lt;/strong&gt; in the guideline ignores case, spacing, line breaks and hyphens, so a phrase is found even where a PDF wraps it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="passage-links"&gt;Passage links&lt;/h3&gt;
&lt;p&gt;Every element remembers where its text came from. Linked passages are underlined in the guideline, passages used by more than one element are shown in yellow, and clicking a passage selects its element. This also works for PDF guidelines, where the desktop application kept no record of where text came from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link element text to passages&lt;/strong&gt; searches the guideline for the text of elements that have no link, for one element or for the whole tree. Each element is looked for beside the passages already linked around it (its recommendation, its neighbours), so a phrase that recurs, such as &amp;ldquo;Strong recommendation&amp;rdquo;, lands on its own recommendation, and short text such as a date is linked only where it cannot be mistaken. According to the README, on the three sample projects it puts back every link as it was made by hand. It is also how a desktop PDF project gets its highlights back.&lt;/p&gt;
&lt;h3 id="get-the-results-out"&gt;Get the results out&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Save project&lt;/strong&gt; downloads a zip in the desktop layout: the GEM XML, the tree model, the properties file, the guideline, and one extra file with the passage links.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Export GEM XML&lt;/strong&gt; and &lt;strong&gt;View XML&lt;/strong&gt; give the document in the layout the desktop application writes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reports&lt;/strong&gt; are produced by the original XSLT stylesheets. A report can be saved as HTML, printed, or run with a modified stylesheet (Custom XSL).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="compatibility-with-the-desktop-application"&gt;Compatibility with the desktop application&lt;/h2&gt;
&lt;p&gt;The desktop formats were worked out from projects written by GEM Cutter III, and are documented in the repository&amp;rsquo;s &lt;code&gt;docs/formats.md&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Project folders.&lt;/strong&gt; CutGL opens a desktop project folder (the one that holds &lt;code&gt;resources/&lt;/code&gt;), a zip of it, or either dropped on the page. The tree comes from &lt;code&gt;GEMCutterTreeModel.xml&lt;/code&gt;, the Swing tree the desktop application writes with &lt;code&gt;java.beans.XMLEncoder&lt;/code&gt;. A GEM Cutter II project&amp;rsquo;s links are read too.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Passage links from the desktop.&lt;/strong&gt; The desktop application stored links in &lt;code&gt;linkbean&lt;/code&gt;, a Java-serialised list of link objects. CutGL includes a small reader for the Java object stream to recover each link&amp;rsquo;s offsets and element. For plain-text and RTF guidelines it rebuilds the same text the desktop pane held, so the stored offsets apply directly. For HTML, the desktop counted characters differently from a browser, so CutGL looks for the element&amp;rsquo;s text near the stored offset. For PDF, the desktop application stored offsets of &lt;code&gt;0&lt;/code&gt;, so there is nothing to restore and the links are found again with &lt;strong&gt;Link element text to passages&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Saving back.&lt;/strong&gt; A project saved from CutGL, unzipped next to &lt;code&gt;GemCutter.jar&lt;/code&gt;, opens in the desktop application. CutGL keeps its own passage links in &lt;code&gt;resources/cutgl.json&lt;/code&gt;, which the desktop application ignores, and does not write &lt;code&gt;linkbean&lt;/code&gt;, so the desktop application shows such a project without highlights.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GEM XML.&lt;/strong&gt; CutGL writes the document as the desktop application does: one element per line, no indentation, attributes in the same order. The README reports that the port was also checked against a real desktop project that is not in the repository, and that its exported XML was identical, character for character, to the file the desktop application had written.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reports.&lt;/strong&gt; The GEM III schema and the six report stylesheets are the files from the GEM Cutter III distribution, unchanged. At run time CutGL changes two things without touching the files: it supplies the Detailed report&amp;rsquo;s date, which the stylesheet used to request from a Yale server that is no longer available, and it runs two stylesheets that declare XSLT 2.0 (but use only 1.0 features) as XSLT 1.0.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The README lists where CutGL deliberately differs from the desktop application, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;passage links are kept for PDF guidelines and for text added with Append;&lt;/li&gt;
&lt;li&gt;typing in an element marks it &lt;code&gt;inferred&lt;/code&gt; (the desktop application did so as soon as the text box was clicked), and Clear sets the source back to &lt;code&gt;nd&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;new subtrees take the highest &lt;code&gt;id&lt;/code&gt; in use for that element name plus one, where the desktop application counted from the start of each session, so ids could repeat after a restart;&lt;/li&gt;
&lt;li&gt;GEM II ⇒ GEM III completes the tree from the schema rather than a fixed list;&lt;/li&gt;
&lt;li&gt;Word &lt;code&gt;.docx&lt;/code&gt; guidelines are accepted; old &lt;code&gt;.doc&lt;/code&gt; files are not;&lt;/li&gt;
&lt;li&gt;projects live in the browser&amp;rsquo;s storage and in the saved zip, not in a folder beside the program.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="how-it-works"&gt;How it works&lt;/h2&gt;
&lt;p&gt;CutGL is a static page with no build step: &lt;code&gt;index.html&lt;/code&gt; and a few scripts. &lt;code&gt;src/core.js&lt;/code&gt; holds the document model, the GEM III schema handling, GEM XML and the desktop tree model, and an RTF reader; &lt;code&gt;src/javaser.js&lt;/code&gt; reads the desktop &lt;code&gt;linkbean&lt;/code&gt; files; &lt;code&gt;src/app.js&lt;/code&gt; is the interface. Libraries are loaded from a CDN the first time they are needed: PDF.js for PDF guidelines, JSZip for project zips, mammoth for &lt;code&gt;.docx&lt;/code&gt;, and an XSLT replacement. Browsers are removing XSLT; where it is gone, the page loads libxslt compiled to WebAssembly so the reports still come out. HTML guidelines and report output are passed through an allow-list sanitiser before they are shown.&lt;/p&gt;
&lt;div class="mermaid"&gt;
flowchart LR
subgraph In ["Inputs (read in the browser)"]
A["GEM III XML"]
B["Desktop project folder or zip&lt;br/&gt;GEMCutterTreeModel.xml, linkbean"]
C["Guideline&lt;br/&gt;PDF, HTML, RTF, .docx, text"]
D["Link parameters&lt;br/&gt;?xml, ?guideline, ?project, ?sample"]
end
subgraph Page ["CutGL page"]
E["Element tree&lt;br/&gt;GEM III schema"]
F["Guideline pane&lt;br/&gt;PDF.js, sanitised HTML"]
G["Passage links&lt;br/&gt;linkbean reader, text search"]
H["Browser storage&lt;br/&gt;(IndexedDB)"]
end
subgraph Out ["Outputs (downloads)"]
I["GEM XML in desktop layout"]
J["Project zip&lt;br/&gt;opens in GemCutter.jar"]
K["Six reports via original XSLT&lt;br/&gt;browser XSLT or libxslt (WebAssembly)"]
end
A --&gt; E
B --&gt; E
B --&gt; G
C --&gt; F
D --&gt; E
D --&gt; F
E &lt;--&gt; G
F &lt;--&gt; G
E --&gt; H
E --&gt; I
E --&gt; J
G --&gt; J
E --&gt; K
&lt;/div&gt;
&lt;p&gt;The repository includes a Playwright test suite that drives the real page in headless Chromium, with the CDN libraries served locally. Per the README, it covers the samples and demo folders, projects in the desktop formats, the six reports with both XSLT engines, tree editing, the logic window, taking text from a PDF, search, and narrow screens. Desktop-format test fixtures are written with the JDK&amp;rsquo;s own classes, and all fixtures and samples are generated from invented text. Continuous integration runs the tests on pull requests.&lt;/p&gt;
&lt;p&gt;The page has light and dark themes and shares GaitScope&amp;rsquo;s palette, so the two tools read as one family. A script can also pack the page into a single self-contained HTML file for places that take one file.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="privacy"&gt;Privacy&lt;/h2&gt;
&lt;p&gt;Files are read in the browser and are not uploaded. The guideline and the markup do not leave the browser; the project being worked on is kept in that browser&amp;rsquo;s storage until it is saved as a zip, and the zip is the copy to keep. A document opened from a link is fetched from that link and is not stored. The only other network requests are for the page&amp;rsquo;s libraries (and the files they need) and its web font, loaded from public CDNs.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="status"&gt;Status&lt;/h2&gt;
&lt;p&gt;CutGL is at an early version (0.1.0). The source code is public on GitHub; a hosted version is not yet available. Locally it runs from any static file server, or by opening &lt;code&gt;index.html&lt;/code&gt; from disk.&lt;/p&gt;
&lt;p&gt;A later stage is planned in which a model would propose the GEM III markup of a guideline, as GEM XML, for a person to review in CutGL, with each element linked to its passage so that what the model copied, reworded or left out is visible beside the source. The review tools that stage needs are the ones described above; the part that would take a model&amp;rsquo;s output is not built yet.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="limitations"&gt;Limitations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;PDF, zip, &lt;code&gt;.docx&lt;/code&gt; and fallback XSLT support load libraries from a CDN the first time they are used, so those features need a network connection.&lt;/li&gt;
&lt;li&gt;Desktop PDF projects carry no passage positions; their links have to be found again by text search. Links in desktop HTML projects are placed by looking near the stored offset rather than by the offset itself.&lt;/li&gt;
&lt;li&gt;Projects saved from CutGL open in the desktop application without highlights, because CutGL does not write &lt;code&gt;linkbean&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Old Word &lt;code&gt;.doc&lt;/code&gt; files are not accepted.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;id&lt;/code&gt; values CutGL writes follow the desktop application&amp;rsquo;s output, which does not satisfy the schema&amp;rsquo;s &lt;code&gt;xs:ID&lt;/code&gt; type.&lt;/li&gt;
&lt;li&gt;Browser storage is not a backup; the saved zip is.&lt;/li&gt;
&lt;li&gt;The three sample guidelines are invented for the demonstration and are not clinical guidance.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GEM Cutter III&lt;/strong&gt; and the &lt;strong&gt;Guideline Elements Model&lt;/strong&gt; are the work of the Yale Center for Medical Informatics. The GEM III schema and the six report stylesheets in CutGL come unchanged from the GEM Cutter III distribution and remain their authors'.&lt;/li&gt;
&lt;li&gt;CutGL uses PDF.js, JSZip, mammoth and an XSLT polyfill built on libxslt, loaded at run time.&lt;/li&gt;
&lt;li&gt;CutGL was written with Claude (Anthropic).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="related-work-on-this-site"&gt;Related work on this site&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
: the research theme of tying statements about clinical guidelines back to their source. CutGL&amp;rsquo;s passage links show, for each GEM element, the guideline text it came from.&lt;/li&gt;
&lt;li&gt;
: CutGL uses GaitScope&amp;rsquo;s palette and type, so the two tools read as one family.&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>