public ActionResult Status(string dfn) { LactationStatus model = new LactationStatus(); model.Patient = this.CurrentPatient; model.CurrentStatus = (this.CurrentPatient.Lactating) ? "Lactating" : "Not Lactating"; return(View(model)); }
public ActionResult Status(LactationStatus model) { ActionResult returnResult; bool okToContinue = false; if (model.NewStatus.HasValue) { IenResult wvrpcorResult = this.DashboardRepository.Observations.AddWvrpcorLactationObservation(model.Patient.Dfn, model.NewStatus.Value); if (!wvrpcorResult.Success) { this.Error(wvrpcorResult.Message); } else { IenResult result = this.DashboardRepository.Observations.AddLactationObservation(model.Patient.Dfn, model.NewStatus.Value); if (!result.Success) { this.Error(result.Message); } else { this.Information("Lactation Status Updated"); okToContinue = true; } } } else { this.Error("Please select a lactation status"); } if (okToContinue) { returnResult = RedirectToAction("Summary", "Patient", new { dfn = model.Patient.Dfn }); } else { this.CurrentPatientDfn = model.Patient.Dfn; model.Patient = this.CurrentPatient; model.CurrentStatus = model.CurrentStatus = (this.CurrentPatient.Lactating) ? "Lactating" : "Not Lactating"; returnResult = View(model); } return(returnResult); }
public static double MinThreshold(this LactationStatus lactationStatus) { switch (lactationStatus) { case LactationStatus.EPIC: return(Genitals.EPIC_LACTATION_THRESHOLD); case LactationStatus.HEAVY: return(Genitals.HEAVY_LACTATION_THRESHOLD); case LactationStatus.STRONG: return(Genitals.STRONG_LACTATION_THRESHOLD); case LactationStatus.MODERATE: return(Genitals.MODERATE_LACTATION_THRESHOLD); case LactationStatus.LIGHT: return(Genitals.LACTATION_THRESHOLD); case LactationStatus.NOT_LACTATING: default: return(0); } }
private string LactationSlowedDownDueToInactivity(bool becameOverFullThisPass, LactationStatus oldLevel) { int delta = oldLevel - lactationStatus; if (lactationStatus > LactationStatus.STRONG) { string hitLongDescing = becameOverFullThisPass ? ", though they're still very much in need of a milking" : ""; return("\n<b>Your breasts feel somewhat lighter, though not much. It seems you aren't producing milk at such an ungodly rate anymore" + hitLongDescing + ".</b>\n"); } else if (lactationStatus > LactationStatus.MODERATE) { string helperStr = delta > 1 ? "significantly " : ""; string hitLongDescing = becameOverFullThisPass ? "Despite this, they're still very tender and probably should be milked soon." : ""; return("\n<b>Your breasts feel " + helperStr + "lighter as your body's milk production starts to wind down." + hitLongDescing + "</b>\n"); } else if (lactationStatus > LactationStatus.LIGHT) { string helperStr = delta > 1 ? "significantly " : ""; string hitLongDescing = becameOverFullThisPass ? "Despite this, they're still very tender and probably should be milked soon." : ""; return("\n<b>Your breasts feel " + helperStr + "lighter as your body's milk production winds down." + hitLongDescing + "</b>\n"); } else if (lactationStatus > LactationStatus.NOT_LACTATING) { string helperStr = delta > 1 ? "significantly, " : ""; string hitLongDescing = becameOverFullThisPass ? "Despite this, they're still tender and probably should be milked soon." : ""; return("\n<b>Your body's milk output drops " + helperStr + "down to what would be considered 'normal' for a pregnant woman." + hitLongDescing + "</b>\n"); } else { return("\n<b>Your body no longer produces any milk.</b>\n"); } }