Just in case "poonamb" reads this… I’d love to reply to your question, but Live won’t let me. I tried but got the error "You can’t send or reply to this person because of their communication settings."
To answer your question, however. I would guess that the problem with saving your ruleset to the database is right around this area here:
RuleSetDialog ruleDialog = new RuleSetDialog(typeof(Patient), null, ruleSet);
DialogResult result = ruleDialog.ShowDialog();
if (result == DialogResult.OK)
You’re making a call to SerializeRuleSet, but not doing anything with the answer. You need to take the result of SerializeRuleSet, which will be a string, and save it off to the database in the same table you load it from elsewhere in your code.