Created
May 12, 2017 18:45
-
-
Save jacobmischka/5e709b6ade956604f5447995b4648349 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl DataSchemaValue for schema::MonitorCodeType { | |
fn from_value(data: &calamine::DataType) -> Result<schema::MonitorCodeType, MCWAnesthError> { | |
if let calamine::DataType::String(ref input) = *data { | |
match &input as &str { | |
"A Line" => Ok(schema::MonitorCodeType("Arterial Line".to_string())), | |
"CVP Line" => Ok(schema::MonitorCodeType("Central Venous Line".to_string())), | |
"PA Line" => Ok(schema::MonitorCodeType("Pulmonary Artery Line".to_string())), | |
"TEE" => Ok(schema::MonitorCodeType("Transesophageal Echocardiogram".to_string())), | |
"BIS" => Ok(schema::MonitorCodeType("Bispectral Index".to_string())), | |
"EEG" => Ok(schema::MonitorCodeType("Electroencephalogram".to_string())), | |
x => Ok(schema::MonitorCodeType(input.to_string())), | |
} | |
} else { | |
Err(MCWAnesthError::Error) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment