use crate::overlay::DomainGloss;
pub static DRUG_INTERACTIONS_OVERLAY: DomainGloss = DomainGloss {
templates: &[
("prevents", "{x1} inhibits {x2}"),
("cuts", "{x2} is metabolized by {x1}"),
("thin", "{x1} has a narrow therapeutic index"),
("increases", "{x1} has a raised concentration"),
("dangerous", "{x1} is at toxicity risk"),
("warns", "{x1} warrants a safety alert"),
("chemical", "{x1} is a drug"),
("uses", "{x1} takes {x2}"),
],
glosses: &[("chemical", "drug")],
names: &[
("varfarin", "warfarin"),
("flukonazol", "fluconazole"),
("apiksaban", "apixaban"),
("fenitoin", "phenytoin"),
("siptucin", "CYP2C9"),
("sipcivon", "CYP3A4"),
("adam", "Adam"),
],
};
pub static GDPR_OVERLAY: DomainGloss = DomainGloss {
templates: &[
("permits", "{x2} has a lawful basis for processing"),
("data", "{x1} is personal data"),
("approves", "{x1} consents"),
("promise", "{x1} is bound by a contract"),
("obliged", "{x1} is under a legal obligation"),
("flaw", "{x1} has suffered a breach"),
("correct", "{x1} is accurate"),
("shelter", "{x1} is kept secure"),
("necessary", "{x1} is necessary"),
("exact", "{x1} has a specific basis"),
("message", "{x1} notifies"),
("removes", "{x1} is erased"),
("discovers", "{x1} accesses {x2}"),
],
glosses: &[("data", "personal data")],
names: &[
("adam", "Adam"),
("akmes", "AkmeCorp"),
("gugli", "Google"),
("kanrek", "Adam's health record"),
("ordrek", "Adam's ordinary record"),
],
};
pub static UTOPIA_OVERLAY: DomainGloss = DomainGloss {
templates: &[
("false", "{x1}'s standing is voided"),
("home", "{x1} is under home confinement"),
("family", "{x1} has a domestic offense"),
("severe", "{x1}'s offense is severe"),
("reward", "{x1} is rewarded"),
("prisoner", "{x1} is a prisoner"),
("travel", "{x1} may travel"),
("dwell", "{x1} has shelter"),
("expresses", "{x1} may express"),
("lose", "{x2} loses {x1}"),
("building", "{x2} is placed at {x1}"),
("capture", "{x1} captures fraud by {x2}"),
("deceive", "{x1} falsely accuses {x2}"),
("judge", "{x1} judges {x2}"),
("parent", "{x1} is a parent of {x2}"),
("injure", "{x1} injures {x2}"),
("work", "{x1} works on {x2}"),
("teaches", "{x1} teaches {x2}"),
("permits", "{x1} permits {x2}"),
],
glosses: &[],
names: &[
("points", "merit tokens"),
("highsec", "High Security"),
("lowsec", "Low Security"),
("court", "the Court"),
("appeals", "Appeals"),
("review", "Review"),
("census", "the Census"),
],
};
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn ddi_overlay_key_mappings() {
assert_eq!(
DRUG_INTERACTIONS_OVERLAY.template("prevents"),
Some("{x1} inhibits {x2}")
);
assert_eq!(
DRUG_INTERACTIONS_OVERLAY.template("cuts"),
Some("{x2} is metabolized by {x1}")
);
assert_eq!(
DRUG_INTERACTIONS_OVERLAY.template("dangerous"),
Some("{x1} is at toxicity risk")
);
assert_eq!(DRUG_INTERACTIONS_OVERLAY.name("varfarin"), Some("warfarin"));
assert_eq!(DRUG_INTERACTIONS_OVERLAY.name("siptucin"), Some("CYP2C9"));
}
#[test]
fn utopia_overlay_key_mappings() {
assert_eq!(
UTOPIA_OVERLAY.template("false"),
Some("{x1}'s standing is voided")
);
assert_eq!(UTOPIA_OVERLAY.name("highsec"), Some("High Security"));
assert_eq!(UTOPIA_OVERLAY.name("points"), Some("merit tokens"));
}
#[test]
fn gdpr_overlay_key_mappings() {
assert_eq!(
GDPR_OVERLAY.template("permits"),
Some("{x2} has a lawful basis for processing")
);
assert_eq!(GDPR_OVERLAY.template("data"), Some("{x1} is personal data"));
assert_eq!(GDPR_OVERLAY.name("akmes"), Some("AkmeCorp"));
}
}