Pipeline for detecting posology entities

Description

A pipeline with ner_posology. It will only extract medication entities.

Predicted Entities

DOSAGE, DRUG, DURATION, FORM, FREQUENCY, ROUTE, STRENGTH

Copy S3 URI

How to use

pipeline = PretrainedPipeline('recognize_entities_posology', 'en', 'clinical/models')

res = pipeline.fullAnnotate("""A 28-year-old female with a history of gestational diabetes mellitus, used to take metformin 1000 mg two times a day, presented with a one-week history of polyuria , polydipsia , poor appetite , and vomiting .
She was seen by the endocrinology service and discharged on 40 units of insulin glargine at night, 12 units of insulin lispro with meals.
""")
val era_pipeline = new PretrainedPipeline("recognize_entities_posology", "en", "clinical/models")

val result = era_pipeline.fullAnnotate("""A 28-year-old female with a history of gestational diabetes mellitus, used to take metformin 1000 mg two times a day, presented with a one-week history of polyuria , polydipsia , poor appetite , and vomiting .
She was seen by the endocrinology service and discharged on 40 units of insulin glargine at night, 12 units of insulin lispro with meals.
""")(0)

import nlu
nlu.load("en.recognize_entities.posology").predict("""A 28-year-old female with a history of gestational diabetes mellitus, used to take metformin 1000 mg two times a day, presented with a one-week history of polyuria , polydipsia , poor appetite , and vomiting .
She was seen by the endocrinology service and discharged on 40 units of insulin glargine at night, 12 units of insulin lispro with meals.
""")

Results

|    | chunk            |   begin |   end | entity    |
|---:|:-----------------|--------:|------:|:----------|
|  0 | metformin        |      83 |    91 | DRUG      |
|  1 | 1000 mg          |      93 |    99 | STRENGTH  |
|  2 | two times a day  |     101 |   115 | FREQUENCY |
|  3 | 40 units         |     270 |   277 | DOSAGE    |
|  4 | insulin glargine |     282 |   297 | DRUG      |
|  5 | at night         |     299 |   306 | FREQUENCY |
|  6 | 12 units         |     309 |   316 | DOSAGE    |
|  7 | insulin lispro   |     321 |   334 | DRUG      |
|  8 | with meals       |     336 |   345 | FREQUENCY |

Model Information

Model Name: recognize_entities_posology
Type: pipeline
Compatibility: Healthcare NLP 4.4.4+
License: Licensed
Edition: Official
Language: en
Size: 1.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetector
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverter