diff --git a/Tests/Medication/PrescriptionTest.cs b/Tests/Medication/PrescriptionTest.cs
index 4686085..e84fd85 100755
--- a/Tests/Medication/PrescriptionTest.cs
+++ b/Tests/Medication/PrescriptionTest.cs
@@ -111,5 +111,18 @@ namespace Tests.Medication
Assert.AreEqual("alle zwei Tage", p.Comment);
Assert.AreEqual("Eusaprim forte\talle zwei Tage", p.ToString(), "ToString");
}
+
+ [Test]
+ [TestCase("CellCept 500 mg", true)]
+ [TestCase("Cell CEpt 500 mg", true)]
+ [TestCase("Myfortic", true)]
+ [TestCase("Mycophenolatmofetil 500 mg", true)]
+ [TestCase("Cellophan 5 g", false)]
+ [TestCase("MMF 500 mg", true)]
+ public void MmfProperty(string drug, bool isMmf)
+ {
+ Prescription p = new Prescription(drug);
+ Assert.AreEqual(isMmf, p.IsMmf);
+ }
}
}
diff --git a/zaaReloaded2/Medication/Formatter.cs b/zaaReloaded2/Medication/Formatter.cs
index a5035d7..498896b 100755
--- a/zaaReloaded2/Medication/Formatter.cs
+++ b/zaaReloaded2/Medication/Formatter.cs
@@ -105,6 +105,14 @@ namespace zaaReloaded2.Medication
void AddDisclaimer(zaaReloaded2.Formatter.DocumentWriter writer)
{
+ if (HasMMF())
+ {
+ writer.WriteLine();
+ writer.WriteLine("Hinweis: Während und nach Therapie mit Mycophenolsäurederivaten wie CellCept\u00ae " +
+ "und Myfortic\u00ae müssen Frauen und Männer eine Schwangerschaft sicher verhüten (siehe Rote-Hand-Brief zu " +
+ "CellCept\u00ae vom 10.11.2015).");
+ writer.WriteLine();
+ }
writer.WriteLine("Bitte Medikation überprüfen!");
}
@@ -188,6 +196,15 @@ namespace zaaReloaded2.Medication
Helpers.EndUndo();
}
+ ///
+ /// Determines whether MMF or MPA is contained in the prescriptions.
+ ///
+ /// True if MMF or MPA is prescribed.
+ bool HasMMF()
+ {
+ return Prescriptions.FirstOrDefault(p => p.IsMmf) != null;
+ }
+
#endregion
}
}
diff --git a/zaaReloaded2/Medication/Prescription.cs b/zaaReloaded2/Medication/Prescription.cs
index a4723cf..67bb130 100755
--- a/zaaReloaded2/Medication/Prescription.cs
+++ b/zaaReloaded2/Medication/Prescription.cs
@@ -110,6 +110,23 @@ namespace zaaReloaded2.Medication
public string Comment { get; set; }
+ ///
+ /// Determines whether the drug is MMF or a derivative.
+ ///
+ public bool IsMmf
+ {
+ get
+ {
+ string d = Drug.ToLower();
+ return
+ d.StartsWith("mmf") ||
+ d.StartsWith("cellcept") ||
+ d.StartsWith("cell cept") ||
+ d.StartsWith("myfortic") ||
+ d.StartsWith("mycophenol");
+ }
+ }
+
#endregion
#region Overrides
@@ -172,10 +189,16 @@ namespace zaaReloaded2.Medication
public Prescription() { }
- public Prescription(string drug, string morning, string noon,
- string evening, string night)
+ public Prescription(string drug)
+ : this()
{
Drug = drug.Trim();
+ }
+
+ public Prescription(string drug, string morning, string noon,
+ string evening, string night)
+ : this(drug)
+ {
Morning = morning.Trim();
Noon = noon.Trim();
Evening = evening.Trim();