private AdmissionHistory CreateAdmissionHistory()
        {
            AdmissionHistory history = new AdmissionHistory();

            history.Illness       = "cold";
            history.Diagnosis     = "... diagnosis";
            history.AdmissionDate = new DateTime(2019, 1, 1, 4, 0, 15).ToString();
            return(history);
        }
        private List <AdmissionHistory> ParsePreviousAdmissions(SqlDataReader reader)
        {
            List <AdmissionHistory> history = new List <AdmissionHistory>();

            while (reader.Read())
            {
                AdmissionHistory admission = new AdmissionHistory();
                admission.AdmissionDate = reader["AdmissionDate"].ToString();
                admission.Diagnosis     = reader["Diagnosis"].ToString();
                admission.Illness       = reader["Illness"].ToString();
                history.Add(admission);
            }
            return(history);
        }
示例#3
0
        public bool AddAdmissionHistory(string patientId, AdmissionHistory history)
        {
            var query = string.Format("Insert into AdmissionHistory values('{0}','{1}','{2}','{3}')", patientId, history.Illness, history.Diagnosis, history.AdmissionDate);

            return(SqlCommands.ExecuteCommand(query, conString));
        }