Class PhiEntity

java.lang.Object
com.azure.health.deidentification.models.PhiEntity
All Implemented Interfaces:
com.azure.json.JsonSerializable<PhiEntity>

public final class PhiEntity extends Object implements com.azure.json.JsonSerializable<PhiEntity>
PHI Entity tag in the input.
  • Method Details

    • getCategory

      public PhiCategory getCategory()
      Get the category property: PHI Category of the entity.
      Returns:
      the category value.
    • getOffset

      public StringIndex getOffset()
      Get the offset property: Starting index of the location from within the input text.
      Returns:
      the offset value.
    • getLength

      public StringIndex getLength()
      Get the length property: Length of the input text.
      Returns:
      the length value.
    • getText

      public String getText()
      Get the text property: Text of the entity.
      Returns:
      the text value.
    • getConfidenceScore

      public Double getConfidenceScore()
      Get the confidenceScore property: Confidence score of the category match.
      Returns:
      the confidenceScore value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<PhiEntity>
      Throws:
      IOException
    • fromJson

      public static PhiEntity fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PhiEntity from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PhiEntity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the PhiEntity.