HealthcareRelation Class

HealthcareRelation is a result object which represents a relation detected in a document.

Every HealthcareRelation is an entity graph of a certain relation type, where all entities are connected and have specific roles within the relation context.

New in version 2023-04-01: The confidence_score property.

Inheritance
azure.ai.textanalytics._dict_mixin.DictMixin
HealthcareRelation

Constructor

HealthcareRelation(**kwargs: Any)

Methods

get
has_key
items
keys
update
values

get

get(key: str, default: Any | None = None) -> Any

Parameters

Name Description
key
Required
default
default value: None

has_key

has_key(k: str) -> bool

Parameters

Name Description
k
Required

items

items() -> Iterable[Tuple[str, Any]]

keys

keys() -> Iterable[str]

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> Iterable[Any]

Attributes

confidence_score

Confidence score between 0 and 1 of the extracted relation.

confidence_score: float | None = None

relation_type

The type of relation, i.e. the relationship between "100mg" and "ibuprofen" in the document "The subject took 100 mg of ibuprofen" is "DosageOfMedication". Possible values found in HealthcareEntityRelation

relation_type: str

roles

The roles present in this relation. I.e., in the document "The subject took 100 mg of ibuprofen", the present roles are "Dosage" and "Medication".

roles: List[HealthcareRelationRole]