public async Task <IActionResult> Create([Bind("id,profile_id,medication,dosage,physician,last_dose,taking_as_prescribed,created_at,created_by")] mp_medication mp_medication)
        {
            if (ModelState.IsValid)
            {
                _context.Add(mp_medication);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["profile_id"] = new SelectList(_context.mp_profile, "id", "first_name", mp_medication.profile_id);
            return(View(mp_medication));
        }
Esempio n. 2
0
        public async Task <int> RemovePsychosocial(int id)
        {
            var mp_psychosocial = await _context.mp_psychosocial.FindAsync(id);

            _context.mp_psychosocial.Remove(mp_psychosocial);
            return(await _context.SaveChangesAsync());
        }
        public async Task <int> Remove(long id)
        {
            //TODO add delete flags instead of removing the object entirely
            var mp_clinician_availability = await _context.mp_clinician_availability.FindAsync(id);

            _context.mp_clinician_availability.Remove(mp_clinician_availability);
            return(await _context.SaveChangesAsync());
        }
Esempio n. 4
0
 public async Task <int> AddProgressNote(mp_progress_note note)
 {
     _context.Add(note);
     return(await _context.SaveChangesAsync());
 }
Esempio n. 5
0
 public async Task <int> Add(mp_psychiatric_progress_note progess_note)
 {
     _context.Add(progess_note);
     return(await _context.SaveChangesAsync());
 }
 public async Task <int> AddSocialRelationship(mp_social_relationship relationship)
 {
     _context.Add(relationship);
     return(await _context.SaveChangesAsync());
 }
Esempio n. 7
0
 public async Task<int> AddLookUp(mp_lookup lookup)
 {
     _context.Add(lookup);
     return await _context.SaveChangesAsync();
 }
Esempio n. 8
0
 //adds mp_substance_use to the db
 public async Task <int> AddSubstanceUse(mp_substance_use substance_use)
 {
     _context.Add(substance_use);
     return(await _context.SaveChangesAsync());
 }