Example #1
0
        public void AddSymptoms(List <mp_ped_symptomps> symptoms)
        {
            var eval_id = symptoms.FirstOrDefault().ped_evaluation_id;
            //check if symptons exists
            var symptns = _context.mp_ped_symptomps.Where(e => e.ped_evaluation_id == eval_id);

            if (symptoms.Any())
            {
                _context.mp_ped_symptomps.RemoveRange(symptns);
                _context.SaveChanges();
            }

            _context.AddRange(symptoms);
            _context.SaveChanges();
        }
Example #2
0
 public int AddMedication(List <mp_medication> medications)
 {
     _context.AddRange(medications);
     return(_context.SaveChanges());
 }
Example #3
0
 //adds a range of mp_substance_use to the db
 public async Task <int> AddSubstanceUses(List <mp_substance_use> substance_uses)
 {
     _context.AddRange(substance_uses);
     return(await _context.SaveChangesAsync());
 }