{"id":22699,"date":"2021-03-22T08:17:00","date_gmt":"2021-03-22T08:17:00","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/auto-generating-ekg-documents\/"},"modified":"2023-08-29T11:44:23","modified_gmt":"2023-08-29T11:44:23","slug":"auto-generating-ekg-documents","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/auto-generating-ekg-documents\/","title":{"rendered":"Auto-Generating EKG Documents"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"22699\" class=\"elementor elementor-22699\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-00f4c50 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"00f4c50\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e9de235\" data-id=\"e9de235\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e07174d elementor-widget elementor-widget-text-editor\" data-id=\"e07174d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"ee67\">As Enterprise Knowledge Graphs (EKGs) grow, support teams will see an increase in demand for documentation about your EKG and how to access it. This means you will be spending more time writing and maintaining documentation.<\/p>\n<p id=\"f140\">This blog will review some of the best practices for generating high-quality, up-to-date documentation directly from your EKG\u2019s metadata.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6825d13 elementor-widget elementor-widget-heading\" data-id=\"6825d13\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Microsite Revolution<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a3b7478 elementor-widget elementor-widget-text-editor\" data-id=\"a3b7478\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"b218\">In the past, high-quality documentation was created by separate teams of technical writers that had the task of interviewing IT staff and then using tools such as Microsoft Word, Adobe Illustrator, Adobe Photoshop, and other expensive proprietary documentation tools. The content would be created in these tools and then put through elaborate, centralized content management systems (CMS) that transformed the documents into searchable and bookmarkable HTML and PDF formats.<\/p>\n<p id=\"f05b\">This all began to change when a new generation of documentation tools began to grow out of the Model-Driven architecture movement. The general idea is that your data model was a source-of-truth about what was in your database. By transforming this model metadata into HTML, you could make sure that your documentation was current. There are no additional technical writers needed to generate the initial EKG documentation on many projects \u2014 although having a proof-reader on the team is still a good idea! We are moving from centralized content management to decentralized models of content creation. We can still use centralized search if our intranet search tools can be notified when we check in new content into our software repositories.<\/p>\n<p id=\"97e2\">Although some people call these new tools \u201cstatic site generators\u201d, I think the word \u201cstatic\u201d does not do the architecture justice. I like the term&nbsp;<em>microsite<\/em>&nbsp;because it shows how quickly a small but useful website with many dynamic features can be generated. One example of a microsite is the&nbsp;<a href=\"https:\/\/www.coderdojotc.org\/python\/\" rel=\"noopener\">Python training curriculum<\/a>&nbsp;we are developing for our local CoderDojo chapter.<\/p>\n<p id=\"65f1\">Although the distributed content management revolution started with specialized data transformation tools like XSLT and&nbsp;<a href=\"https:\/\/en.wikibooks.org\/wiki\/XQuery\" rel=\"noopener\">XQuery<\/a>, it has evolved into more accessible and integrated tools in the developer\u2019s world. We moved from storing metadata in XML into more user-friendly formats like&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Markdown\" rel=\"noopener\">Markdown<\/a>. Markdown can then be parsed and converted into HTML. Documentation build tools like&nbsp;<a href=\"https:\/\/www.mkdocs.org\/\" rel=\"noopener\">mkdocs<\/a>&nbsp;evolved to make this part of the deployment process. Generating high-quality documentation became part of the definition-of-done for many agile teams.<\/p>\n<p id=\"6900\">The need for high-quality Markdown to HTML transformations gave rise to a series of command-line tools that could be integrated directly into developers&#8217; build process. One of the most popular of these tools is the open-source mkdocs library. Mkdocs is incredibly easy to use. You run a single command at the command line ($ pip3 install mkdocs), and you then have four simple commands ready to use:<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-459d49c elementor-widget elementor-widget-text-editor\" data-id=\"459d49c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ol><li>Initialize your files (mkdocs new)<\/li><li>Build your HTML web site (mkdocs build)<\/li><li>View it locally in a server (mkdocs serve)<\/li><li>Deploy it to a web server or your GitHub Pages branch of your repository (mkdocs gh-deploy)<\/li><\/ol>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-405ce97 elementor-widget elementor-widget-text-editor\" data-id=\"405ce97\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"a4f4\">You can control the exact look-and-feel, navigation, and search by editing a single mkdocs.yml file. Simple is good!<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04188f4 elementor-widget elementor-widget-heading\" data-id=\"04188f4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Mkdocs Becomes a Platform<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-44888b9 elementor-widget elementor-widget-text-editor\" data-id=\"44888b9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"c86e\">An interesting item to note is that mkdocs is <a href=\"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/data-analytics-with-python-by-web-scraping-illustration-with-cia-world-factbook\/\" target=\"_blank\" rel=\"noreferrer noopener\">written in Python<\/a>. Although it is not the only tool to convert Markdown into HTML, the large and quickly growing community of Python developers that surround the mkdocs system have created a strong demand for new themes (presentation styling), new features, new extensions, and new plugins. Mkdocs quickly became the first choice for many teams because of the incredible community of mature open source contributors behind it.<\/p>\n<p id=\"9946\">Mkdocs rapidly differentiated itself from other documentation tools that developers wanted. It had many navigation features, lots of things like code highlighters for almost any language, and powerful microsite search options. The fantastic search feature alone was worth throwing out our old content management systems. Microsite search takes every word in your website and builds a small, compact reverse index in a JSON file. When users type in the search bar, an in-browser auto-complete script matches each keystroke with a drop-down list of every document that contains that word. If users can\u2019t find what they are looking for in the navigation system, they can quickly find the information they need using the microsite search. This is a new level of self-service that keeps developer teams focused on writing code, not answering support questions.<\/p>\n<p id=\"c20a\">Note that there are limitations here. If you have hundreds of thousands of documents, the index&#8217;s load time will slow your search response time. But for our projects that contain under 10,000 documents, we have not seen performance problems.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-835ce84 elementor-widget elementor-widget-heading\" data-id=\"835ce84\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Google\u2019s Material Design Language<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1fc1f2e elementor-widget elementor-widget-text-editor\" data-id=\"1fc1f2e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"6212\">One of the other things that Mkdocs enabled was the creation of themes that are themselves extensible. One of the highest quality mkdocs themes is built around Google\u2019s&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Material_Design\" rel=\"noopener\">Material Design Language<\/a>&nbsp;user interface components. Technically, Material is more than a User Interface library; it is a full language for expressing user interface concepts. It includes standard components that are both intuitive, and because of their popularity, familiar to users.<\/p>\n<p id=\"f9a2\">The&nbsp;<a href=\"https:\/\/squidfunk.github.io\/mkdocs-material\/\" rel=\"noopener\">mkdocs-material theme<\/a>&nbsp;itself has become a mini-platform of new features. One of these is a&nbsp;<a href=\"https:\/\/github.com\/fralau\/mkdocs-mermaid2-plugin\" rel=\"noopener\">plugin<\/a>&nbsp;based on the&nbsp;<a href=\"https:\/\/mermaid-js.github.io\/mermaid\/#\/\" rel=\"noopener\">mermaid<\/a>&nbsp;JavaScript library that allows you to convert a written description of a drawing directly into the drawing. These tools are part of a long legacy of auto-layout drawing tools that go back to Bell Labs in the 1980s. When I was writing papers for the Bell Labs Technical Journal, I would create my drawings in a language called \u201c<a href=\"https:\/\/en.wikipedia.org\/wiki\/DOT_(graph_description_language)\" rel=\"noopener\">dot<\/a>\u201d which was then rendered as images in our papers. The syntax is a bit different, but the concept is the same. You don\u2019t need complex drawing tools to create simple technical diagrams.<\/p>\n<p id=\"9ffe\">You can try these tools out with the&nbsp;<a href=\"https:\/\/mermaid-js.github.io\/mermaid-live-editor\/#\/edit\/eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW0NocmlzdG1hc10gLS0-fEdldCBtb25leXwgQihHbyBzaG9wcGluZylcbiAgICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgICBDIC0tPnxPbmV8IERbTGFwdG9wXVxuICAgIEMgLS0-fFR3b3wgRVtpUGhvbmVdXG4gICAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ\" rel=\"noopener\">Mermaid Live Editor<\/a>.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f8ebde elementor-widget elementor-widget-heading\" data-id=\"0f8ebde\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">EKG Graph Models<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-23611b4 elementor-widget elementor-widget-text-editor\" data-id=\"23611b4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"82d7\">Now let\u2019s take a look at how the models render. Here is an input of a simple model for a clinical setting:<\/p>\n<pre class=\"wp-block-preformatted\"><strong>graph<\/strong> LR<br>   d1((Physician))<br>   <strong>---<\/strong> HAS_PATIENT <strong>--&gt;<br>   <\/strong>p1((Patient))   p1((Patient))<br>   <strong>---<\/strong> HAS_CONDITION <strong>--&gt;<br>   <\/strong>c1((Condition))<\/pre>\n<p id=\"13d1\">This says to draw an LR (Left to Right) graph layout that shows the relationship between a Physician, a Patient, and a Condition. Here is what that layout generates:<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8d1d634 elementor-widget elementor-widget-image\" data-id=\"8d1d634\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"714\" height=\"104\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1_qPutKUxHk08vL2ZYzE34g.png\" class=\"attachment-large size-large wp-image-19000\" alt=\"Auto-Generating EKG Documents\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1_qPutKUxHk08vL2ZYzE34g.png 714w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1_qPutKUxHk08vL2ZYzE34g-300x44.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1_qPutKUxHk08vL2ZYzE34g-610x89.png 610w\" sizes=\"(max-width: 714px) 100vw, 714px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Simple LPG graph layout created by the mermaid automatic layout tools. Image by the author.<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9564e63 elementor-widget elementor-widget-text-editor\" data-id=\"9564e63\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"ea79\">The double parenthesis tells the layout engine to use a circle in the layout. What is critical is that you don\u2019t have to fret about the layout and the placement of the items in the diagram as an author. This is done for you. All you need to do is extract the metadata from your EKG to generate the diagram.<\/p>\n<p id=\"e681\">Mermaid also has its own way of modifying the colors, fonts, and other elements in its own&nbsp;<a href=\"https:\/\/mermaid-js.github.io\/mermaid\/#\/theming\" rel=\"noopener\">theme<\/a>&nbsp;directives.<\/p>\n<p id=\"8822\">The drawings are fine for small diagrams. When you reach a certain size of about a dozen objects, you begin to lose control over how the diagram is drawn. Tools like dot and GraphViz allow you to specify constraints as to how this layout was done. Although the Mermaid plugin is excellent, it will take some time before all the advanced layout tools from dot get moved over.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75f2a82 elementor-widget elementor-widget-heading\" data-id=\"75f2a82\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Future of EKG Documentation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-24f3370 elementor-widget elementor-widget-text-editor\" data-id=\"24f3370\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"7b84\">The hard work by the ISO\/IEC Joint Technical Committee on the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Graph_Query_Language\" rel=\"noopener\">GQL language<\/a>&nbsp;shows that we will have a standardized way to represent our labeled property graph data models and a standardized language to describe our graph queries in the near term future. This means that we will describe our business models and business logic in portable ways that will not trap us into a single database vendor or a single cloud service provider. Once the GQL Working Draft is published, we expect to see a flood of new tools to make it easy to automatically generate documentation and AI-based&nbsp;<a href=\"https:\/\/jena.apache.org\/documentation\/javadoc\/jena\/org\/apache\/jena\/reasoner\/rulesys\/OWLMicroReasoner.html\" class=\"broken_link\" rel=\"noopener\">micro-reasoner<\/a>&nbsp;training curriculum directly from our graph metadata.<\/p>\n<p id=\"f548\">I also want to tie this autogeneration of documentation with some of the natural language processing (NLP)community work. My work on&nbsp;<a href=\"https:\/\/towardsdatascience.com\/grading-gpt-3-for-stem-lesson-plan-content-generation-c8d9d1f59806\" class=\"broken_link\" rel=\"noopener\">using GPT-3 to generate STEM content<\/a>&nbsp;has opened my eyes to an entirely new auto-content generation era. Specifically the work concerning converting a high-level English-language description of a scene or drawing into a detailed rendering. For example, OpenAI\u2019s&nbsp;<a href=\"https:\/\/openai.com\/blog\/dall-e\/\" class=\"broken_link\" rel=\"noopener\">DALL-E<\/a>&nbsp;project allows you to write an English language narrative of a scene, and it then generates a high-quality image of that scene. These new tools will clearly disrupt the stock image industry. They will also enable your IDE to convert a short description of a diagram into a high-quality searchable image for you! It may even allow you to modify the diagram by changing the markdown-like syntax for the diagram.<\/p>\n<p id=\"7736\">None of these tools and frameworks would be possible without the generous contribution of the open-source community. These are the developers that created Markdown, mkdocs, material, and mermaid. For this, we must all be grateful. I hope we all support these developers by sponsoring their work.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>This blog will review some of the best practices for generating high-quality, up-to-date documentation directly from your EKG\u2019s metadata.<\/p>\n","protected":false},"author":993,"featured_media":19001,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[183],"tags":[97,1440,1441,1119,1442],"ppma_author":[3677],"class_list":["post-22699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-artificial-intelligence","tag-autolayout","tag-documentation","tag-knowledge-graph","tag-mkdocs"],"authors":[{"term_id":3677,"user_id":993,"is_guest":0,"slug":"dan-mccreary","display_name":"Dan McCreary","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/Dan-McCreary.jpeg","user_url":"https:\/\/www.optum.com\/","last_name":"McCreary","first_name":"Dan","job_title":"","description":"Dan McCreary is a distinguished Engineer in AI and Graph at Optum, a health services and innovation company. He is the co-author of the highly rated book \"Making Sense of NoSQL\" and co-founder of the \"NoSQL Now!\" conference."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/993"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=22699"}],"version-history":[{"count":4,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22699\/revisions"}],"predecessor-version":[{"id":31842,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22699\/revisions\/31842"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/19001"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=22699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=22699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=22699"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=22699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}