Explain Document Pipeline - CRA

Description

A pretrained pipeline with ner_clinical, assertion_dl, re_clinical. It will extract clinical entities, assign assertion status and find relationships between clinical entities.

Open in Colab Copy S3 URI

How to use

cra_pipeline = PretrainedPipeline("explain_clinical_doc_cra","en","clinical/models")

annotations =  cra_pipeline.fullAnnotate("""She is admitted to The John Hopkins Hospital 2 days ago with a history of gestational diabetes mellitus diagnosed. She denied pain and any headache.She was seen by the endocrinology service and she was discharged on 03/02/2018 on 40 units of insulin glargine, 12 units of insulin lispro, and metformin 1000 mg two times a day. She had close follow-up with endocrinology post discharge. 
""")[0]

annotations.keys()


val cra_pipeline = new PretrainedPipeline("explain_clinical_doc_cra","en","clinical/models")

val result = cra_pipeline.fullAnnotate("""She is admitted to The John Hopkins Hospital 2 days ago with a history of gestational diabetes mellitus diagnosed. She denied pain and any headache.She was seen by the endocrinology service and she was discharged on 03/02/2018 on 40 units of insulin glargine, 12 units of insulin lispro, and metformin 1000 mg two times a day. She had close follow-up with endocrinology post discharge. 
""")(0)

Results

This pretrained pipeline gives the result of ner_clinical, re_clinical and assertion_dl models.

|   | chunk1                        | ner_clinical1 | assertion  | relation | chunk2        | ner_clinical2 |
|---|-------------------------------|---------------|------------|----------|---------------|---------------|
| 0 | gestational diabetes mellitus | PROBLEM       | present    | TrAP     | metformin     | TREATMENT     |
| 1 | gestational diabetes mellitus | PROBLEM       | present    | TrAP     | polyuria      | PROBLEM       |
| 2 | gestational diabetes mellitus | PROBLEM       | present    | TrCP     | polydipsia    | PROBLEM       |
| 3 | gestational diabetes mellitus | PROBLEM       | present    | TrCP     | poor appetite | PROBLEM       |
| 4 | metformin                     | TREATMENT     | present    | TrAP     | polyuria      | PROBLEM       |
| 5 | metformin                     | TREATMENT     | present    | TrAP     | polydipsia    | PROBLEM       |
| 6 | metformin                     | TREATMENT     | present    | TrAP     | poor appetite | PROBLEM       |
| 7 | polydipsia                    | PROBLEM       | present    | TrAP     | vomiting      | PROBLEM       |

Model Information

Name: explain_clinical_doc_cra
Type: PipelineModel
Compatibility: Spark NLP 2.5.5+
License: Licensed
Edition: Official
Language: en

Included Models

  • ner_clinical
  • assertion_dl
  • re_clinical