public function addFamilyHistory($relative_id, $side_id, $condition_id, $comments)
{
if (!($fh = FamilyHistory::model()->find('patient_id=? and relative_id=? and side_id=? and condition_id=?', array($this->id, $relative_id, $side_id, $condition_id)))) {
$fh = new FamilyHistory();
$fh->patient_id = $this->id;
$fh->relative_id = $relative_id;
$fh->side_id = $side_id;
$fh->condition_id = $condition_id;
}
$fh->comments = $comments;
if (!$fh->save()) {
throw new Exception("Unable to save family history: " . print_r($fh->getErrors(), true));
}
}