Medical Device Text Matcher Pipeline

Description

This pipeline, extracts medical device entities in clinical text. It recognizes devices including ventilator, defibrillator, stent, insulin pump, glucometer, nebulizer, and more.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

pipeline = PretrainedPipeline("medical_device_matcher_pipeline", "en", "clinical/models")

sample_text = """ The patient was placed on a ventilator for respiratory support. A pacemaker was implanted to regulate heart rhythm. Blood glucose levels were monitored using a glucometer, and insulin was delivered via an insulin pump."""

result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))


from johnsnowlabs import nlp, medical

pipeline = nlp.PretrainedPipeline("medical_device_matcher_pipeline", "en", "clinical/models")

sample_text = """ The patient was placed on a ventilator for respiratory support. A pacemaker was implanted to regulate heart rhythm. Blood glucose levels were monitored using a glucometer, and insulin was delivered via an insulin pump."""

result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = PretrainedPipeline("medical_device_matcher_pipeline", "en", "clinical/models")

val sample_text = """ The patient was placed on a ventilator for respiratory support. A pacemaker was implanted to regulate heart rhythm. Blood glucose levels were monitored using a glucometer, and insulin was delivered via an insulin pump."""

val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))

Results


| chunk        | begin | end | label          |
| :----------- | ----: | --: | :------------- |
| ventilator   |    28 |  37 | MEDICAL_DEVICE |
| pacemaker    |    66 |  74 | MEDICAL_DEVICE |
| glucometer   |   160 | 169 | MEDICAL_DEVICE |
| insulin pump |   205 | 216 | MEDICAL_DEVICE |

Model Information

Model Name: medical_device_matcher_pipeline
Type: pipeline
Compatibility: Healthcare NLP 6.3.0+
License: Licensed
Edition: Official
Language: en
Size: 944.5 KB

Included Models

  • DocumentAssembler
  • SentenceDetector
  • TokenizerModel
  • TextMatcherInternalModel
  • ChunkConverter