Exemple #1
0
 private IPatient GetPatient(string cpf)
 {
     var service = new GetPatientByHospitalService();
     return service.GetPatientBy(cpf);
 }
Exemple #2
0
        public override IList<Summary> GetLastSumariesRealizedby(int accountId)
        {
            #region Precondition

            Assertion.GreaterThan(accountId, 0, "Usuário inválido.").Validate();

            #endregion

            var account = _accounts.Get<Account>(accountId);

            var summaryList = Summaries.GetLastSumariesrealizedby(account);

            var service = new GetPatientByHospitalService();

            foreach (var summary in summaryList)
            {
                summary.Patient = service.GetPatientBy(summary.Cpf);

                summary.Treatment =
                    summary.Patient.Treatments.Find(
                        t => t.Id == summary.TreatmentId && t.Hospital.Key == summary.Hospital.Key);
            }

            #region Poscondition

            Assertion.NotNull(summaryList, "A lista retornada está nula.").Validate();

            #endregion

            return summaryList;
        }