Created
March 6, 2020 17:24
-
-
Save jacobmischka/97fe4ca00377dc4dbb26e8c856cf51e5 to your computer and use it in GitHub Desktop.
This file contains 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 Location { | |
pub fn is_in_or(&self) -> bool { | |
use Location::*; | |
match self { | |
OrCmh | OrCmhEct | OrDtssc | OrFhIpp | OrFhe | OrFhw | OrFsc | OrLcsc | OrObCmh | |
| OrObFh | OrObSjh | OrSjh | OrWbsc => true, | |
_ => false, | |
} | |
} | |
pub fn is_fh(&self) -> bool { | |
use Location::*; | |
match self { | |
FhNonOrCathEp | FhNonOrEcho | FhNonOrIr | FhNonOrMpa | FhNonOrProcedures | |
| OrCystoFh | OrEiFh | OrFhAnesthesiaAway | OrFhIpp | OrFhMpa | OrFhe | OrFhw | |
| OrGiFh => true, | |
_ => false, | |
} | |
} | |
} | |
impl Room { | |
pub fn is_fh(&self) -> bool { | |
use self::Room::*; | |
match self { | |
FhIPP(_) | FhOr(_) | FhwOr(_) | EiToOr | OrEastPending | OrWestPending | |
| OrIppPending(_) | FmlhHybridIPP(_) | FhIrHybridOr(_) | FhGiOr(_) | FhCysto(_) | |
| FhCystoPending | FhGiCapsEndos | FhGiOutOfLab | FhProcedure | OrStaffAway | |
| FmlhMpaIp(_) | FmlhMpaBronch(_) => true, | |
_ => false, | |
} | |
} | |
pub fn is_in_or(&self) -> bool { | |
use self::Room::*; | |
match *self { | |
FhIPP(x) if x > 15 => true, | |
FhOr(x) if x <= 40 => true, | |
EiToOr | OrEastPending | OrWestPending | OrIppPending(_) | FmlhHybridIPP(_) | |
| FhIrHybridOr(_) => true, | |
FhwOr(_) => true, | |
SjhOr(_) | CmhOr(_) => true, | |
_ => false, | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment