示例#1
0
        public async Task AddDiagnoseHistory(int diagnoseId, DiagnoseHistory history, Doctor doc)
        {
            var diagnose = await GetDiagnoseById(diagnoseId, true);

            history.Diagnose = diagnose;
            history.Doctor   = doc;
            await _dbContext.DiagnoseHistories.AddAsync(history);

            await _dbContext.SaveChangesAsync();
        }
示例#2
0
        public async Task AddDiagnose(string pacientId, Doctor doc,
                                      Diagnose diagnose, DiagnoseHistory history)
        {
            var card = await GetCardByIdAsync(pacientId);

            diagnose.Card = card;

            if (doc != null)
            {
                diagnose.DoctorEstablishe = doc;
                history.Doctor            = doc;
            }
            diagnose.Status = false;
            await _dbContext.Diagnoses.AddAsync(diagnose);

            history.Diagnose = diagnose;
            await _dbContext.DiagnoseHistories.AddAsync(history);

            diagnose.DiagnoseHistorie.Append(history);
            await _dbContext.SaveChangesAsync();
        }