DosageExtractor
Parses and extracts drug dosage
Attributes:
Name | Type | Description |
---|---|---|
model |
str
|
The name of the model to be used for dosage extraction. |
dosage_extractor |
Language
|
The Spacy pipeline for dosage extraction. |
Source code in miade/dosageextractor.py
extract(text, calculate=True)
¶
Processes a string that contains dosage instructions (excluding drug concept as this is handled by core)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
The string containing dosage instructions. |
required |
calculate |
bool
|
Whether to calculate duration from total and daily dose, if given. |
True
|
Returns:
Type | Description |
---|---|
Optional[Dosage]
|
The dosage object with parsed dosages in CDA format. |