{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2018-10-30",
    "endpointPrefix":"comprehendmedical",
    "jsonVersion":"1.1",
    "protocol":"json",
    "serviceAbbreviation":"ComprehendMedical",
    "serviceFullName":"AWS Comprehend Medical",
    "serviceId":"ComprehendMedical",
    "signatureVersion":"v4",
    "signingName":"comprehendmedical",
    "targetPrefix":"ComprehendMedical_20181030",
    "uid":"comprehendmedical-2018-10-30"
  },
  "operations":{
    "DetectEntities":{
      "name":"DetectEntities",
      "http":{
        "method":"POST",
        "requestUri":"/"
      },
      "input":{"shape":"DetectEntitiesRequest"},
      "output":{"shape":"DetectEntitiesResponse"},
      "errors":[
        {"shape":"InternalServerException"},
        {"shape":"ServiceUnavailableException"},
        {"shape":"TooManyRequestsException"},
        {"shape":"InvalidRequestException"},
        {"shape":"InvalidEncodingException"},
        {"shape":"TextSizeLimitExceededException"}
      ],
      "documentation":"<p> Inspects the clinical text for a variety of medical entities and returns specific information about them such as entity category, location, and confidence score on that information .</p>"
    },
    "DetectPHI":{
      "name":"DetectPHI",
      "http":{
        "method":"POST",
        "requestUri":"/"
      },
      "input":{"shape":"DetectPHIRequest"},
      "output":{"shape":"DetectPHIResponse"},
      "errors":[
        {"shape":"InternalServerException"},
        {"shape":"ServiceUnavailableException"},
        {"shape":"TooManyRequestsException"},
        {"shape":"InvalidRequestException"},
        {"shape":"InvalidEncodingException"},
        {"shape":"TextSizeLimitExceededException"}
      ],
      "documentation":"<p> Inspects the clinical text for personal health information (PHI) entities and entity category, location, and confidence score on that information.</p>"
    }
  },
  "shapes":{
    "Attribute":{
      "type":"structure",
      "members":{
        "Type":{
          "shape":"EntitySubType",
          "documentation":"<p> The type of attribute. </p>"
        },
        "Score":{
          "shape":"Float",
          "documentation":"<p> The level of confidence that Comprehend Medical has that the segment of text is correctly recognized as an attribute. </p>"
        },
        "RelationshipScore":{
          "shape":"Float",
          "documentation":"<p> The level of confidence that Comprehend Medical has that this attribute is correctly related to this entity. </p>"
        },
        "Id":{
          "shape":"Integer",
          "documentation":"<p> The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier. </p>"
        },
        "BeginOffset":{
          "shape":"Integer",
          "documentation":"<p> The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string. </p>"
        },
        "EndOffset":{
          "shape":"Integer",
          "documentation":"<p> The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string. </p>"
        },
        "Text":{
          "shape":"String",
          "documentation":"<p> The segment of input text extracted as this attribute.</p>"
        },
        "Traits":{
          "shape":"TraitList",
          "documentation":"<p> Contextual information for this attribute. </p>"
        }
      },
      "documentation":"<p> An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken. It contains information about the attribute such as id, begin and end offset within the input text, and the segment of the input text. </p>"
    },
    "AttributeList":{
      "type":"list",
      "member":{"shape":"Attribute"}
    },
    "AttributeName":{
      "type":"string",
      "enum":[
        "SIGN",
        "SYMPTOM",
        "DIAGNOSIS",
        "NEGATION"
      ]
    },
    "BoundedLengthString":{
      "type":"string",
      "max":20000,
      "min":1
    },
    "DetectEntitiesRequest":{
      "type":"structure",
      "required":["Text"],
      "members":{
        "Text":{
          "shape":"BoundedLengthString",
          "documentation":"<p> A UTF-8 text string containing the clinical content being examined for entities. Each string must contain fewer than 20,000 bytes of characters.</p>"
        }
      }
    },
    "DetectEntitiesResponse":{
      "type":"structure",
      "required":["Entities"],
      "members":{
        "Entities":{
          "shape":"EntityList",
          "documentation":"<p> The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.</p>"
        },
        "UnmappedAttributes":{
          "shape":"UnmappedAttributeList",
          "documentation":"<p> Attributes extracted from the input text that we were unable to relate to an entity.</p>"
        },
        "PaginationToken":{
          "shape":"String",
          "documentation":"<p> If the result of the previous request to DetectEntities was truncated, include the Paginationtoken to fetch the next page of entities.</p>"
        }
      }
    },
    "DetectPHIRequest":{
      "type":"structure",
      "required":["Text"],
      "members":{
        "Text":{
          "shape":"BoundedLengthString",
          "documentation":"<p> A UTF-8 text string containing the clinical content being examined for PHI entities. Each string must contain fewer than 20,000 bytes of characters. </p>"
        }
      }
    },
    "DetectPHIResponse":{
      "type":"structure",
      "required":["Entities"],
      "members":{
        "Entities":{
          "shape":"EntityList",
          "documentation":"<p> The collection of PHI entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical has in its detection. </p>"
        },
        "PaginationToken":{
          "shape":"String",
          "documentation":"<p> If the result of the previous request to DetectPHI was truncated, include the Paginationtoken to fetch the next page of PHI entities. </p>"
        }
      }
    },
    "Entity":{
      "type":"structure",
      "members":{
        "Id":{
          "shape":"Integer",
          "documentation":"<p> The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier. </p>"
        },
        "BeginOffset":{
          "shape":"Integer",
          "documentation":"<p> The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string. </p>"
        },
        "EndOffset":{
          "shape":"Integer",
          "documentation":"<p> The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string. </p>"
        },
        "Score":{
          "shape":"Float",
          "documentation":"<p>The level of confidence that Comprehend Medical has in the accuracy of the detection.</p>"
        },
        "Text":{
          "shape":"String",
          "documentation":"<p> The segment of input text extracted as this entity.</p>"
        },
        "Category":{
          "shape":"EntityType",
          "documentation":"<p> The category of the entity.</p>"
        },
        "Type":{
          "shape":"EntitySubType",
          "documentation":"<p> Describes the specific type of entity with category of entities. </p>"
        },
        "Traits":{
          "shape":"TraitList",
          "documentation":"<p>Contextual information for the entity</p>"
        },
        "Attributes":{
          "shape":"AttributeList",
          "documentation":"<p> The extracted attributes that relate to this entity.</p>"
        }
      },
      "documentation":"<p> Provides information about an extracted medical entity.</p>"
    },
    "EntityList":{
      "type":"list",
      "member":{"shape":"Entity"}
    },
    "EntitySubType":{
      "type":"string",
      "enum":[
        "NAME",
        "DOSAGE",
        "ROUTE_OR_MODE",
        "FORM",
        "FREQUENCY",
        "DURATION",
        "GENERIC_NAME",
        "BRAND_NAME",
        "STRENGTH",
        "RATE",
        "ACUITY",
        "TEST_NAME",
        "TEST_VALUE",
        "TEST_UNITS",
        "PROCEDURE_NAME",
        "TREATMENT_NAME",
        "DATE",
        "AGE",
        "CONTACT_POINT",
        "EMAIL",
        "IDENTIFIER",
        "URL",
        "ADDRESS",
        "PROFESSION",
        "SYSTEM_ORGAN_SITE",
        "DIRECTION",
        "QUALITY",
        "QUANTITY"
      ]
    },
    "EntityType":{
      "type":"string",
      "enum":[
        "MEDICATION",
        "MEDICAL_CONDITION",
        "PROTECTED_HEALTH_INFORMATION",
        "TEST_TREATMENT_PROCEDURE",
        "ANATOMY"
      ]
    },
    "Float":{"type":"float"},
    "Integer":{"type":"integer"},
    "InternalServerException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> An internal server error occurred. Retry your request. </p>",
      "exception":true,
      "fault":true
    },
    "InvalidEncodingException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The input text was not in valid UTF-8 character encoding. Check your text then retry your request.</p>",
      "exception":true
    },
    "InvalidRequestException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.</p>",
      "exception":true
    },
    "ServiceUnavailableException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The Comprehend Medical service is temporarily unavailable. Please wait and then retry your request. </p>",
      "exception":true
    },
    "String":{
      "type":"string",
      "min":1
    },
    "TextSizeLimitExceededException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller document and then retry your request. </p>",
      "exception":true
    },
    "TooManyRequestsException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase. </p>",
      "exception":true
    },
    "Trait":{
      "type":"structure",
      "members":{
        "Name":{
          "shape":"AttributeName",
          "documentation":"<p> Provides a name or contextual description about the trait. </p>"
        },
        "Score":{
          "shape":"Float",
          "documentation":"<p> The level of confidence that Comprehend Medical has in the accuracy of this trait.</p>"
        }
      },
      "documentation":"<p> Provides contextual information about the extracted entity. </p>"
    },
    "TraitList":{
      "type":"list",
      "member":{"shape":"Trait"}
    },
    "UnmappedAttribute":{
      "type":"structure",
      "members":{
        "Type":{
          "shape":"EntityType",
          "documentation":"<p> The type of the attribute, could be one of the following values: \"MEDICATION\", \"MEDICAL_CONDITION\", \"ANATOMY\", \"TEST_AND_TREATMENT_PROCEDURE\" or \"PERSONAL_HEALTH_INFORMATION\". </p>"
        },
        "Attribute":{
          "shape":"Attribute",
          "documentation":"<p> The specific attribute that has been extracted but not mapped to an entity. </p>"
        }
      },
      "documentation":"<p> An attribute that we extracted, but were unable to relate to an entity. </p>"
    },
    "UnmappedAttributeList":{
      "type":"list",
      "member":{"shape":"UnmappedAttribute"}
    }
  },
  "documentation":"<p> Comprehend Medical extracts structured information from unstructured clinical text. Use these actions to gain insight in your documents. </p>"
}
