Medical Informatics and Godel, Escher, Bach

In college I read (about half of) Godel, Escher, Bach by Douglas Hofstadter.  I understood less than 50% of what I read, and remember little now.  But I remember the challenge of trying to understand the “interweaving” of mathematics, art and music into common, recursive patterns.  It is a  transient glimpse into creative and brilliant minds, seeing information in awe-inspiring, unique ways.

  Medical informatics, especially my work on fpnotebook.com. blends clinical science with programming/coding and design/illustration.  My trifecta – as enticing for me as Godel, Escher, Bach.

Outside of my primary job (Emergency Department and Epic optimization for our organization), I split my work on fpnotebook in half: medical note taking in the first half of the month and programming/designing in the second half.  

  As with the masters I admire in medicine, I have my mentors in coding and design.  My over-flowing book shelf has been augmented in the last few years with EM:Rap (Emergency Medicine) audio and Pluralsight (coding) and Lynda.com (design) videos.  I’m a voyeur of brilliant and creative minds.  Lessons in emergency airway management and bedside ultrasound, mixed with c# or javascript, with a side of photoshop, illustrator or 3DS Max.  Eclectic but uniquely satisfying.

Unlike Godel, Escher, Bach, medical informatics offers a challenge that is practical – an end result with utility.  With no shortage of project ideas, every month I have a 2 week opportunity for a creativity deep dive – blending what I’ve learned as an online apprentice.  Two weeks is an ideal project time frame for a solo developer – a sprint of creativity and immersion, without the fatigue, frustration and unwieldy nature of my prior year-long mammoth projects.  These small projects tend to build on others in a modular way and mistakes are made on a much smaller scale.

This month I created a stand alone search application for the fpnotebook.com website.  Those clinicians who tolerated my ramblings to this point, may wish to stop reading here.  The rest is in the form of notes to self, and to developers up too late solving that last infuriating problem, that should work, and wondering why Google has led them here instead of well traveled stackoverflow.

 The application is a single page application, served from  asp.net mvc.   This allows for easy coding, compilation (js, less), web api, authentication, and deployment.  I like Typescript as well, but did not use it for this project.  Note to self – don’t forget to add to the web config:

    <modules runAllManagedModulesForAllRequests="true"/>

This is a data heavy application.  6000 pages, 4000 concepts, 20,000 titles with synonyms, and multiple maps linking topics to one another (in and out), as well as to concepts, keywords and the hierarchical tree the topics hang from.  

Complex data queries are my main focus for this project: how to filter topics in multiple ways. Ultimately (in a future 2 week project) I want to preview topic contents and their inter-relationships as well as to link custom user content. For this project, I needed to have easy access to processed site data for dynamic searches. I first made calls to the MVC controller, and then a web api, and then with odata queries.  All very seamless.  However, I kept thinking about how many times users would hit my server and database with over-lapping, inefficient queries.  That’s when I tried json files.

 I wrote a c# windows utility that queries the fpnotebook database and writes out the json to files using newtonsoft.  10 json files – most the size of small images or thumbnails (8 to 300 kb), 2 files at 1 mb each, and one file at 3 mb – in total less than 7 mb.   High bandwidth on the first download, but cached for a month until the data changes. Asynchronously loaded in a handful of seconds over a decent internet connection.

When loading json files with javascript, the parent directories will change on deployment; use server code to store the current parent URL path.

The application uses a themed version of bootstrap with angular-ui instead of the standard bootstrap plugins.  Angularjs and Typescript (along with jquery and underscorejs) are my favorite javascript tools.  Angular is tricky to write inside of Typescript.   But I like using angularjs for the view model and asynchronous data access and Typescript for the utility and business logic code.   Testing with jasmine works well in Visual Studio (with the Chutzpah plug-in).

So another 2 week development sprint is over and I’m ready to return to medical articles.  Next week I’ll attend the Levitan Airway course in Baltimore, kicking off another month of gently weaving together medicine with art and code.

Advertisements
This entry was posted in Coding, Uncategorized. Bookmark the permalink.