Amazon Comprehend Medical is a service offered as part of the Amazon AWS lineup, allowing AI-based analysis of medical data. It’s built on top of their Amazon Comprehend service which is a more broad-range Natural Language Processing (NLP) offering, allowing you to feed it any type of documents (as plain-text or as a PDF or as a Microsoft Word document) and get some AI-based analysis of those documents. That service would analyze a document and identify things like people, places, Personally Identifiable Information (PII), language, general tone (sentiment) of the document, and syntactical structure of sentences. Amazon Comprehend Medical takes these features a step further by identifying symptoms, medical procedures, medicines, dosage information, organs/systems and diagnoses. Among other things, Amazon Comprehend Medical service is informed by these two systems for its analytical work:
- RxNorm: A system produced by The National Library of Medicine (NLM), offering a normalized naming system for drugs.
- International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): A classification system developed by the World Health Organization, modified by the CDC for medical diagnoses.
Try it Out
Provided that you have an Amazon AWS account, Amazon has made it quite frictionless to try this service out. You don’t have to write any code or jump through any major hoops to get a feel for what this service has to offer with your own input data. To do so, login to the AWS Management Console and search for “comprehend” in the search bar and select “Amazon Comprehend”.
![search results showing Amazon Comprehend in the search bar for Amazon AWS Management Console.](https://tvaidyan.com/wp-content/uploads/2021/10/image-13.png)
![Launch Amazon Comprehend Medical button in the Amazon Comprehend landing page.](https://tvaidyan.com/wp-content/uploads/2021/10/image-14.png)
![Input Text box that you can use to enter your own input data for Amazon Comprehend Medical to analyze.](https://tvaidyan.com/wp-content/uploads/2021/10/image-15-1024x486.png)
The Insights section gives you an aesthetically pleasing representation of the analysis, highlighting various identifiers that the service has picked up in the text along with possible links in the key pieces of information.
![Analyzed data by Amazon Comprehend Medical](https://tvaidyan.com/wp-content/uploads/2021/10/image-16.png)
In addition to the Entities tab that you’re on, visit the RxNorm concepts and ICD-10-CM concepts tab to see any data elements it derived from your input that bear special meaning when viewed through those lenses.
Application Integration
While this gives you a quick glimpse of the capabilities of Amazon Comprehend Medical, you’re wondering what the effort is going to be, to wire-up this service to your own applications. As with pretty much any other Amazon AWS integration, this service too is exposed as a REST API. That beautiful representation above is really a JSON blob that you can consume in your application, slice and dice in ways that you see fit and act upon. The dashboard page also gives you a glimpse of this, towards the bottom of the screen.
![Amazon Comprehend Medical dashboard showing the JSON representing the input and output of the underlying API call.](https://tvaidyan.com/wp-content/uploads/2021/10/image-17.png)
Parting Thoughts
- As with anything else, there is nothing overly magical about this service. I often have to remind the business folk about this reality. People often get sucked in by marketing vaporware and get upset when their own datasets don’t produce the same magical results that the sales guy showed them! In other words, your mileage may vary. If you think your business has a use-case that can be met by this service, go get a list of input documents. Make sure that the test set that you gather for your own rating of this service is indeed a good representation of what you expect your real world caseload to look like. Don’t curate this list; simply gather a good bunch and run it through this. If the results are to your liking, move forward. You’ll notice that Amazon makes their own such disclaimer right at the top of this page, labeled “Important Note” stating that the results may not be accurate in all cases.
- Consider the character limitations to each call that you can make. There are also ways to interact with the API synchronously and asynchronously which can change these limitations so refer to the docs to figure out these limits at the time you try these out.
- Consider pricing. This also can change based on when you are doing this. There are also different pricing for different things – such as named entities, Protected Health Information (PHI), ICD-10-CM analysis and RxNorm analysis.
- There is room for some customization. You do get an opportunity to train our own models for custom classification. If your team has the aptitude for this, you can certainly tune the service a bit to meet your specific needs.