public static patientcase UpdatePatientCase(patientcase obj)
        {
            using (var db = new RescueEntities())
            {
                var temp = db.patientcase.Find(obj.id);
                temp.title                   = obj.title;
                temp.description             = obj.description;
                temp.gender                  = obj.gender;
                temp.birthday                = obj.birthday;
                temp.weight                  = obj.weight;
                temp.height                  = obj.height;
                temp.occupation              = obj.occupation;
                temp.chief_complaint         = obj.chief_complaint;
                temp.present_illness_history = obj.present_illness_history;
                temp.primary_diagnosis       = obj.primary_diagnosis;
                temp.treatment_plan          = obj.treatment_plan;
                temp.past_history            = obj.past_history;
                temp.personal_history        = obj.personal_history;
                temp.family_history          = obj.family_history;
                temp.allergy_history         = obj.allergy_history;
                temp.status                  = obj.status;
                temp.admission_dt            = obj.admission_dt;
                temp.rejected_reason         = obj.rejected_reason;
                temp.modified_dt             = obj.modified_dt;
                temp.owner_id                = obj.owner_id;
                temp.owner_name              = obj.owner_name;

                db.SaveChanges();
                return(temp);
            }
        }
 public static patientcase InsertPatientCase(patientcase obj)
 {
     using (var db = new RescueEntities())
     {
         db.patientcase.Add(obj);
         db.SaveChanges();
         return(obj);
     }
 }