pub struct MmiOutput {
pub id: String,
pub mmi: String,
pub score: f64,
pub name: String,
pub cui: String,
pub semantic_types: Vec<String>,
pub triggers: Vec<Trigger>,
pub location: Location,
pub positional_info: Vec<Position>,
pub tree_codes: Option<Vec<String>>,
}
Expand description
Main struct for entire library. Represents an entire fielded MMI record as one type.
Fields§
§id: String
unique identifier
mmi: String
always MMI
score: f64
score of concept relevance, 0-1000, 1000 being perfect
name: String
name of the concept matched
cui: String
CUI for identified UMLS concept
semantic_types: Vec<String>
Semantic Type abbreviations
triggers: Vec<Trigger>
Triggers for MMI to flag this concept
location: Location
Location of concept
positional_info: Vec<Position>
Positional information of concept
tree_codes: Option<Vec<String>>
Optional MeSH tree code(s)
Implementations§
Source§impl MmiOutput
impl MmiOutput
Sourcepub fn assemble(parts: HashMap<&str, &str>) -> Result<Self, Box<dyn Error>>
pub fn assemble(parts: HashMap<&str, &str>) -> Result<Self, Box<dyn Error>>
Parses a hashmap into MMiOutput field types. Utilizes all other functionality defined in this module to assemble/parse each field into its appropriate format and types.
While this function is useful for building MmiOutput
types,
parse_record
will probably be much more practical since it
accepts a string reference and does the field tagging/mapping for you.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MmiOutput
impl<'de> Deserialize<'de> for MmiOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for MmiOutput
Auto Trait Implementations§
impl Freeze for MmiOutput
impl RefUnwindSafe for MmiOutput
impl Send for MmiOutput
impl Sync for MmiOutput
impl Unpin for MmiOutput
impl UnwindSafe for MmiOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more