1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The extracted attributes that relate to an entity. 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.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SnomedctAttribute {
/// <p>The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.</p>
pub category: ::std::option::Option<crate::types::SnomedctEntityCategory>,
/// <p>The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.</p>
pub r#type: ::std::option::Option<crate::types::SnomedctAttributeType>,
/// <p>The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.</p>
pub score: ::std::option::Option<f32>,
/// <p>The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.</p>
pub relationship_score: ::std::option::Option<f32>,
/// <p>The type of relationship that exists between the entity and the related attribute.</p>
pub relationship_type: ::std::option::Option<crate::types::SnomedctRelationshipType>,
/// <p>The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.</p>
pub id: ::std::option::Option<i32>,
/// <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>
pub begin_offset: ::std::option::Option<i32>,
/// <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>
pub end_offset: ::std::option::Option<i32>,
/// <p>The segment of input text extracted as this attribute.</p>
pub text: ::std::option::Option<::std::string::String>,
/// <p>Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.</p>
pub traits: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctTrait>>,
/// <p>The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.</p>
pub snomedct_concepts: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctConcept>>,
}
impl SnomedctAttribute {
/// <p>The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.</p>
pub fn category(&self) -> ::std::option::Option<&crate::types::SnomedctEntityCategory> {
self.category.as_ref()
}
/// <p>The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::SnomedctAttributeType> {
self.r#type.as_ref()
}
/// <p>The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.</p>
pub fn score(&self) -> ::std::option::Option<f32> {
self.score
}
/// <p>The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.</p>
pub fn relationship_score(&self) -> ::std::option::Option<f32> {
self.relationship_score
}
/// <p>The type of relationship that exists between the entity and the related attribute.</p>
pub fn relationship_type(&self) -> ::std::option::Option<&crate::types::SnomedctRelationshipType> {
self.relationship_type.as_ref()
}
/// <p>The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.</p>
pub fn id(&self) -> ::std::option::Option<i32> {
self.id
}
/// <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>
pub fn begin_offset(&self) -> ::std::option::Option<i32> {
self.begin_offset
}
/// <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>
pub fn end_offset(&self) -> ::std::option::Option<i32> {
self.end_offset
}
/// <p>The segment of input text extracted as this attribute.</p>
pub fn text(&self) -> ::std::option::Option<&str> {
self.text.as_deref()
}
/// <p>Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.traits.is_none()`.
pub fn traits(&self) -> &[crate::types::SnomedctTrait] {
self.traits.as_deref().unwrap_or_default()
}
/// <p>The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.snomedct_concepts.is_none()`.
pub fn snomedct_concepts(&self) -> &[crate::types::SnomedctConcept] {
self.snomedct_concepts.as_deref().unwrap_or_default()
}
}
impl SnomedctAttribute {
/// Creates a new builder-style object to manufacture [`SnomedctAttribute`](crate::types::SnomedctAttribute).
pub fn builder() -> crate::types::builders::SnomedctAttributeBuilder {
crate::types::builders::SnomedctAttributeBuilder::default()
}
}
/// A builder for [`SnomedctAttribute`](crate::types::SnomedctAttribute).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SnomedctAttributeBuilder {
pub(crate) category: ::std::option::Option<crate::types::SnomedctEntityCategory>,
pub(crate) r#type: ::std::option::Option<crate::types::SnomedctAttributeType>,
pub(crate) score: ::std::option::Option<f32>,
pub(crate) relationship_score: ::std::option::Option<f32>,
pub(crate) relationship_type: ::std::option::Option<crate::types::SnomedctRelationshipType>,
pub(crate) id: ::std::option::Option<i32>,
pub(crate) begin_offset: ::std::option::Option<i32>,
pub(crate) end_offset: ::std::option::Option<i32>,
pub(crate) text: ::std::option::Option<::std::string::String>,
pub(crate) traits: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctTrait>>,
pub(crate) snomedct_concepts: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctConcept>>,
}
impl SnomedctAttributeBuilder {
/// <p>The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.</p>
pub fn category(mut self, input: crate::types::SnomedctEntityCategory) -> Self {
self.category = ::std::option::Option::Some(input);
self
}
/// <p>The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.</p>
pub fn set_category(mut self, input: ::std::option::Option<crate::types::SnomedctEntityCategory>) -> Self {
self.category = input;
self
}
/// <p>The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.</p>
pub fn get_category(&self) -> &::std::option::Option<crate::types::SnomedctEntityCategory> {
&self.category
}
/// <p>The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.</p>
pub fn r#type(mut self, input: crate::types::SnomedctAttributeType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::SnomedctAttributeType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::SnomedctAttributeType> {
&self.r#type
}
/// <p>The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.</p>
pub fn score(mut self, input: f32) -> Self {
self.score = ::std::option::Option::Some(input);
self
}
/// <p>The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.</p>
pub fn set_score(mut self, input: ::std::option::Option<f32>) -> Self {
self.score = input;
self
}
/// <p>The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.</p>
pub fn get_score(&self) -> &::std::option::Option<f32> {
&self.score
}
/// <p>The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.</p>
pub fn relationship_score(mut self, input: f32) -> Self {
self.relationship_score = ::std::option::Option::Some(input);
self
}
/// <p>The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.</p>
pub fn set_relationship_score(mut self, input: ::std::option::Option<f32>) -> Self {
self.relationship_score = input;
self
}
/// <p>The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.</p>
pub fn get_relationship_score(&self) -> &::std::option::Option<f32> {
&self.relationship_score
}
/// <p>The type of relationship that exists between the entity and the related attribute.</p>
pub fn relationship_type(mut self, input: crate::types::SnomedctRelationshipType) -> Self {
self.relationship_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of relationship that exists between the entity and the related attribute.</p>
pub fn set_relationship_type(mut self, input: ::std::option::Option<crate::types::SnomedctRelationshipType>) -> Self {
self.relationship_type = input;
self
}
/// <p>The type of relationship that exists between the entity and the related attribute.</p>
pub fn get_relationship_type(&self) -> &::std::option::Option<crate::types::SnomedctRelationshipType> {
&self.relationship_type
}
/// <p>The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.</p>
pub fn id(mut self, input: i32) -> Self {
self.id = ::std::option::Option::Some(input);
self
}
/// <p>The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.</p>
pub fn set_id(mut self, input: ::std::option::Option<i32>) -> Self {
self.id = input;
self
}
/// <p>The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.</p>
pub fn get_id(&self) -> &::std::option::Option<i32> {
&self.id
}
/// <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>
pub fn begin_offset(mut self, input: i32) -> Self {
self.begin_offset = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_begin_offset(mut self, input: ::std::option::Option<i32>) -> Self {
self.begin_offset = input;
self
}
/// <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>
pub fn get_begin_offset(&self) -> &::std::option::Option<i32> {
&self.begin_offset
}
/// <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>
pub fn end_offset(mut self, input: i32) -> Self {
self.end_offset = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_end_offset(mut self, input: ::std::option::Option<i32>) -> Self {
self.end_offset = input;
self
}
/// <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>
pub fn get_end_offset(&self) -> &::std::option::Option<i32> {
&self.end_offset
}
/// <p>The segment of input text extracted as this attribute.</p>
pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.text = ::std::option::Option::Some(input.into());
self
}
/// <p>The segment of input text extracted as this attribute.</p>
pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.text = input;
self
}
/// <p>The segment of input text extracted as this attribute.</p>
pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
&self.text
}
/// Appends an item to `traits`.
///
/// To override the contents of this collection use [`set_traits`](Self::set_traits).
///
/// <p>Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.</p>
pub fn traits(mut self, input: crate::types::SnomedctTrait) -> Self {
let mut v = self.traits.unwrap_or_default();
v.push(input);
self.traits = ::std::option::Option::Some(v);
self
}
/// <p>Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.</p>
pub fn set_traits(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctTrait>>) -> Self {
self.traits = input;
self
}
/// <p>Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.</p>
pub fn get_traits(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SnomedctTrait>> {
&self.traits
}
/// Appends an item to `snomedct_concepts`.
///
/// To override the contents of this collection use [`set_snomedct_concepts`](Self::set_snomedct_concepts).
///
/// <p>The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.</p>
pub fn snomedct_concepts(mut self, input: crate::types::SnomedctConcept) -> Self {
let mut v = self.snomedct_concepts.unwrap_or_default();
v.push(input);
self.snomedct_concepts = ::std::option::Option::Some(v);
self
}
/// <p>The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.</p>
pub fn set_snomedct_concepts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SnomedctConcept>>) -> Self {
self.snomedct_concepts = input;
self
}
/// <p>The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.</p>
pub fn get_snomedct_concepts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SnomedctConcept>> {
&self.snomedct_concepts
}
/// Consumes the builder and constructs a [`SnomedctAttribute`](crate::types::SnomedctAttribute).
pub fn build(self) -> crate::types::SnomedctAttribute {
crate::types::SnomedctAttribute {
category: self.category,
r#type: self.r#type,
score: self.score,
relationship_score: self.relationship_score,
relationship_type: self.relationship_type,
id: self.id,
begin_offset: self.begin_offset,
end_offset: self.end_offset,
text: self.text,
traits: self.traits,
snomedct_concepts: self.snomedct_concepts,
}
}
}