Gain medical insights from clinical notes stored in the OMOP Common Data Model using the Amazon Comprehend Medical NLP service.
This R code can be used to read clinical notes from the OMOP 'note' table, process them using Amazon Comprehend Medical, and write them into the OMOP 'note_nlp' table. The high-level architecture used to do this is shown below.
You can quickly deploy an OHDSI environment on AWS environment from which you can execute this code or you can also use this code from outside of AWS to call Amazon Comprehend Medical. If you deploy the OHDSI environment on AWS using the automation linked above, there is no additional configuration needed to use Comprehend Medical. If you want to use it outside of AWS, you only need to configure a credentials file that allows this code to call the Comprehend Medical service. You can find instructions for doing that here.
An example of the type of mapping Amazon Comprehemend Medical provides and the corresponding 'note_nlp' records are show below.