Showing posts with label health IT. Show all posts
Showing posts with label health IT. Show all posts

Sunday, May 22, 2016

A quick and dirty medical dictionary for your Mac

I work on a lot of health IT projects at work and, as such, I face a constant stream of red squiggles provided by the spellcheck utilities of almost every major editor.  Over the years, I've built up quite a few 'User Dictionaries' by adding terms to each spellchecker one-by-one.

Today, I decided to look into whether my Mac offers a more centralized user dictionary to see if I might pre-populate it with all these medical terms instead.  Answer: Yup. And its just a simple text file with one term per line.

Now this is where the little-known SPECIALIST Lexicon from the US National Library of Medicine comes in.  The lexicon is a freely available "syntactic lexicon of biomedical and general English" that includes terms in the following format:
{base=cotton roll gingivitis
spelling_variant=cotton-roll gingivitis
entry=E0000001
        cat=noun
        variants=glreg
        variants=uncount
}
{base=2060 virus
entry=E0000010
        cat=noun
        variants=reg
}
...
There may be a version with one term per line, but I figured it would be easier just to use some unix-fu to get it in the right format.  So, if you're following along, simply open a Terminal and do the following:

1. Navigate to the latest Lexicon release and download the Lexicon (text) by right-clicking the link and choosing the appropriate save option (don't left-click/navigate to the link unless you want your browser to hang for a bit...the file is fairly large).

2. Make a LocalDictionary backup (optional)
If you already have a LocalDictionary, you may want to back it up first in case something goes wrong:
cp ~/Library/Spelling/LocalDictionary ~/Library/Spelling/LocalDictionary.backup
3. Navigate to where you downloaded the LEXICON file and add the terms from it
Perhaps a little dirty, but I don't think this LEXICON format has changed in like 10 years, so here are a couple lines to add the terms to your Local Dictionary in the proper format:
grep "{base=" LEXICON | cut -c 7- >> ~/Library/Spelling/LocalDictionary
grep "spelling_variant=" LEXICON | cut -c 14- >> ~/Library/Spelling/LocalDictionary
4. Sort the terms
According to that tutsplus article I linked earlier, the Mac spellcheck file needs to be sorted alphabetically.
sort -o ~/Library/Spelling/LocalDictionary ~/Library/Spelling/LocalDictionary 
If you made a LocalDictionary backup, I won't tell you to go delete it yet because I've only just made the change and so I'm not sure whether having an 8 MB LocalDictionary will have any downsides, but so far it seems to be working.

Saturday, May 1, 2010

HIT ME

This was an old update that I wrote for my boss.  I wrote it with as many acronyms and identifiers as possible just to test her :-)
Is everyone forced to work with this many TLA or is it just me?


The Stepstone project's transition from the SODA subproject of Eclipse OHF (moving to RT) to OHT is almost complete. We have been working on support for the ISO/IEEE P11073-20601 PAN protocol and are slowly adding support for the various 11073-104xx specializations. Most of this support involves generating the java class model from the ASN.1 model and adding support for the MDER encoding.

We have also began work on a WAN interface prototype using WS-I Basic (SOAP/HTTP with WS-Addressing) to send the XER encoded ASN.1 event reports from the AHD to the RMS (WAN Device). As part of this work, we have analyzed some other web service standards including WS-RX (WS-RM and WS-MC), WS-Event/WS-Notification, WS-Man/WSDM, and others.

One alternative being discussed in Continua is the re-purposing of the IHE PCD protocol (HL7 V2.5 over MLLP--a TCP/IP protocol with some extra framing characters)

Once the data arrives, it is up to the RMS to translate these messages from the IEEE DIM model to HL7 RIM in order to generate a CDA-based PHM (CCHIT approved?) and convert the IEEE nomenclature to the various medical nomenclature standards like SNOMED or LOINC. Once this is complete, the PHM is sent over the xHR (x=PHR, EHR, EMR, etc) interface using IHE XDR or XDM (both from the XDS family). If XDS is used instead, such as across a RHIO or HIE, we will have to deal with handling patient IDs through profiles like IHE PIX/PDQ.