{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-health/json-schema/azure-health-deidentification-result-schema.json",
  "title": "DeidentificationResult",
  "description": "Response body for de-identification operation.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-health-deid-api-openapi.yml#/components/schemas/DeidentificationResult",
  "type": "object",
  "properties": {
    "outputText": {
      "type": "string",
      "description": "Output text after de-identification. Not available for \"Tag\" operation."
    },
    "taggerResult": {
      "$ref": "#/$defs/PhiTaggerResult",
      "description": "Result of the \"Tag\" operation. Only available for \"Tag\" Operation."
    }
  },
  "$defs": {
    "PhiCategory": {
      "type": "string",
      "description": "List of PHI Entities.",
      "enum": [
        "Unknown",
        "Account",
        "Age",
        "BioID",
        "City",
        "CountryOrRegion",
        "Date",
        "Device",
        "Doctor",
        "Email",
        "Fax",
        "HealthPlan",
        "Hospital",
        "IDNum",
        "IPAddress",
        "License",
        "LocationOther",
        "MedicalRecord",
        "Organization",
        "Patient",
        "Phone",
        "Profession",
        "SocialSecurity",
        "State",
        "Street",
        "Url",
        "Username",
        "Vehicle",
        "Zip"
      ],
      "x-ms-enum": {
        "name": "PhiCategory",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown PHI Type."
          },
          {
            "name": "Account",
            "value": "Account",
            "description": "Account Number."
          },
          {
            "name": "Age",
            "value": "Age",
            "description": "Age."
          },
          {
            "name": "BioID",
            "value": "BioID",
            "description": "Biological Identifier, such as a fingerprint or retinal scan."
          },
          {
            "name": "City",
            "value": "City",
            "description": "City."
          },
          {
            "name": "CountryOrRegion",
            "value": "CountryOrRegion",
            "description": "Country or Region."
          },
          {
            "name": "Date",
            "value": "Date",
            "description": "Date."
          },
          {
            "name": "Device",
            "value": "Device",
            "description": "Device ID or serial numbers."
          },
          {
            "name": "Doctor",
            "value": "Doctor",
            "description": "Doctor's Name."
          },
          {
            "name": "Email",
            "value": "Email",
            "description": "Email Addresses."
          },
          {
            "name": "Fax",
            "value": "Fax",
            "description": "Fax Number."
          },
          {
            "name": "HealthPlan",
            "value": "HealthPlan",
            "description": "Health Plan ID Numbers."
          },
          {
            "name": "Hospital",
            "value": "Hospital",
            "description": "Hospital Name."
          },
          {
            "name": "IDNum",
            "value": "IDNum",
            "description": "Id Number, eg. passport number."
          },
          {
            "name": "IPAddress",
            "value": "IPAddress",
            "description": "IP Address."
          },
          {
            "name": "License",
            "value": "License",
            "description": "License, eg. Driver's license or medical license."
          },
          {
            "name": "LocationOther",
            "value": "LocationOther",
            "description": "Location Other, eg. Golden Gate Park."
          },
          {
            "name": "MedicalRecord",
            "value": "MedicalRecord",
            "description": "Medical Record Number."
          },
          {
            "name": "Organization",
            "value": "Organization",
            "description": "Organization, eg. Microsoft."
          },
          {
            "name": "Patient",
            "value": "Patient",
            "description": "Patient Name."
          },
          {
            "name": "Phone",
            "value": "Phone",
            "description": "Phone Number."
          },
          {
            "name": "Profession",
            "value": "Profession",
            "description": "Profession."
          },
          {
            "name": "SocialSecurity",
            "value": "SocialSecurity",
            "description": "Social Security Number."
          },
          {
            "name": "State",
            "value": "State",
            "description": "State."
          },
          {
            "name": "Street",
            "value": "Street",
            "description": "Street."
          },
          {
            "name": "Url",
            "value": "Url",
            "description": "Web URL."
          },
          {
            "name": "Username",
            "value": "Username",
            "description": "Usernames, eg. a social media handle."
          },
          {
            "name": "Vehicle",
            "value": "Vehicle",
            "description": "Vehicle IDs, eg. license plate or VIN number."
          },
          {
            "name": "Zip",
            "value": "Zip",
            "description": "Zip Code."
          }
        ]
      }
    },
    "PhiEntity": {
      "type": "object",
      "description": "PHI Entity tag in the input.",
      "properties": {
        "category": {
          "$ref": "#/$defs/PhiCategory",
          "description": "PHI Category of the entity."
        },
        "offset": {
          "$ref": "#/$defs/StringIndex",
          "description": "Starting index of the location from within the input text."
        },
        "length": {
          "$ref": "#/$defs/StringIndex",
          "description": "Length of the input text."
        },
        "text": {
          "type": "string",
          "description": "Text of the entity."
        },
        "confidenceScore": {
          "type": "number",
          "format": "double",
          "description": "Confidence score of the category match."
        }
      },
      "required": [
        "category",
        "offset",
        "length"
      ]
    },
    "PhiTaggerResult": {
      "type": "object",
      "description": "Result of the \"Tag\" operation.",
      "properties": {
        "entities": {
          "type": "array",
          "description": "List of entities detected in the input.",
          "items": {
            "$ref": "#/$defs/PhiEntity"
          }
        }
      },
      "required": [
        "entities"
      ]
    },
    "StringIndex": {
      "type": "object",
      "description": "String index encoding model.",
      "properties": {
        "utf8": {
          "type": "integer",
          "format": "int32",
          "description": "The offset or length of the substring in UTF-8 encoding"
        },
        "utf16": {
          "type": "integer",
          "format": "int32",
          "description": "The offset or length of the substring in UTF-16 encoding.\n\nPrimary encoding used by .NET, Java, and JavaScript."
        },
        "codePoint": {
          "type": "integer",
          "format": "int32",
          "description": "The offset or length of the substring in CodePoint encoding.\n\nPrimary encoding used by Python."
        }
      },
      "required": [
        "utf8",
        "utf16",
        "codePoint"
      ]
    }
  }
}