analyzeEntities(nlpService, body=None, x__xgafv=None)
Analyze heathcare entity in a document. Its response includes the recognized entity mentions and the relationships between them. AnalyzeEntities uses context aware models to detect entities. This method can only analyze documents written in English.
Close httplib2 connections.
analyzeEntities(nlpService, body=None, x__xgafv=None)
Analyze heathcare entity in a document. Its response includes the recognized entity mentions and the relationships between them. AnalyzeEntities uses context aware models to detect entities. This method can only analyze documents written in English. Args: nlpService: string, The resource name of the service of the form: "projects/{project_id}/locations/{location_id}/services/nlp". (required) body: object, The request body. The object takes the form of: { # The request to analyze healthcare entities in a document. "alternativeOutputFormat": "A String", # Optional. Alternative output format to be generated based on the results of analysis. "documentContent": "A String", # document_content is a document to be annotated. "licensedVocabularies": [ # A list of licensed vocabularies to use in the request, in addition to the default unlicensed vocabularies. "A String", ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Includes recognized entity mentions and relationships between them. "entities": [ # The union of all the candidate entities that the entity_mentions in this response could link to. These are UMLS concepts or normalized mention content. { # The candidate entities that an entity mention could link to. "entityId": "A String", # entity_id is a first class field entity_id uniquely identifies this concept and its meta-vocabulary. For example, "UMLS/C0000970". "preferredTerm": "A String", # preferred_term is the preferred term for this concept. For example, "Acetaminophen". For ad hoc entities formed by normalization, this is the most popular unnormalized string. "vocabularyCodes": [ # Vocabulary codes are first-class fields and differentiated from the concept unique identifier (entity_id). vocabulary_codes contains the representation of this concept in particular vocabularies, such as ICD-10, SNOMED-CT and RxNORM. These are prefixed by the name of the vocabulary, followed by the unique code within that vocabulary. For example, "RXNORM/A10334543". "A String", ], }, ], "entityMentions": [ # The `entity_mentions` field contains all the annotated medical entities that were mentioned in the provided document. { # An entity mention in the document. "additionalInfo": [ # Additional information about the entity mention. For example, for an entity mention of type `DATE` this can be its more specific date types from the following list: `ADMISSION_DATE`, `CONSULTATION_DATE`, `DISCHARGE_DATE`, `SERVICE_DATE`, `VISIT_DATE`, `DIAGNOSIS_DATE`, `MED_STARTED_DATE`, `MED_ENDED_DATE`, `NOTE_DATE`, `PROCEDURE_DATE`, `RADIATION_STARTED_DATE`, `RADIATION_ENDED_DATE`, `STAGE_DATE` { # A feature of an entity mention. "confidence": 3.14, # The model's confidence in this feature annotation. A number between 0 and 1. "value": "A String", # The value of this feature annotation. Its range depends on the type of the feature. }, ], "certaintyAssessment": { # A feature of an entity mention. # The certainty assessment of the entity mention. Its value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, SOMEWHAT_UNLIKELY, UNLIKELY, CONDITIONAL "confidence": 3.14, # The model's confidence in this feature annotation. A number between 0 and 1. "value": "A String", # The value of this feature annotation. Its range depends on the type of the feature. }, "confidence": 3.14, # The model's confidence in this entity mention annotation. A number between 0 and 1. "linkedEntities": [ # linked_entities are candidate ontological concepts that this entity mention may refer to. They are sorted by decreasing confidence. { # EntityMentions can be linked to multiple entities using a LinkedEntity message lets us add other fields, e.g. confidence. "entityId": "A String", # entity_id is a concept unique identifier. These are prefixed by a string that identifies the entity coding system, followed by the unique identifier within that system. For example, "UMLS/C0000970". This also supports ad hoc entities, which are formed by normalizing entity mention content. }, ], "mentionId": "A String", # mention_id uniquely identifies each entity mention in a single response. "subject": { # A feature of an entity mention. # The subject this entity mention relates to. Its value is one of: PATIENT, FAMILY_MEMBER, OTHER "confidence": 3.14, # The model's confidence in this feature annotation. A number between 0 and 1. "value": "A String", # The value of this feature annotation. Its range depends on the type of the feature. }, "temporalAssessment": { # A feature of an entity mention. # How this entity mention relates to the subject temporally. Its value is one of: CURRENT, CLINICAL_HISTORY, FAMILY_HISTORY, UPCOMING, ALLERGY "confidence": 3.14, # The model's confidence in this feature annotation. A number between 0 and 1. "value": "A String", # The value of this feature annotation. Its range depends on the type of the feature. }, "text": { # A span of text in the provided document. # text is the location of the entity mention in the document. "beginOffset": 42, # The unicode codepoint index of the beginning of this span. "content": "A String", # The original text contained in this span. }, "type": "A String", # The semantic type of the entity: UNKNOWN_ENTITY_TYPE, ALONE, ANATOMICAL_STRUCTURE, ASSISTED_LIVING, BF_RESULT, BM_RESULT, BM_UNIT, BM_VALUE, BODY_FUNCTION, BODY_MEASUREMENT, COMPLIANT, DOESNOT_FOLLOWUP, FAMILY, FOLLOWSUP, LABORATORY_DATA, LAB_RESULT, LAB_UNIT, LAB_VALUE, MEDICAL_DEVICE, MEDICINE, MED_DOSE, MED_DURATION, MED_FORM, MED_FREQUENCY, MED_ROUTE, MED_STATUS, MED_STRENGTH, MED_TOTALDOSE, MED_UNIT, NON_COMPLIANT, OTHER_LIVINGSTATUS, PROBLEM, PROCEDURE, PROCEDURE_RESULT, PROC_METHOD, REASON_FOR_NONCOMPLIANCE, SEVERITY, SUBSTANCE_ABUSE, UNCLEAR_FOLLOWUP. }, ], "fhirBundle": "A String", # The FHIR bundle ([`R4`](http://hl7.org/fhir/R4/bundle.html)) that includes all the entities, the entity mentions, and the relationships in JSON format. "relationships": [ # relationships contains all the binary relationships that were identified between entity mentions within the provided document. { # Defines directed relationship from one entity mention to another. "confidence": 3.14, # The model's confidence in this annotation. A number between 0 and 1. "objectId": "A String", # object_id is the id of the object entity mention. "subjectId": "A String", # subject_id is the id of the subject entity mention. }, ], }
close()
Close httplib2 connections.