Example #1
0
        public VisitInfoForCancelVM Cancel_Get(int visitId)
        {
            var visit = _mapper.Map <VisitInfoForCancelVM>(_visitRepository.GetById(visitId));

            visit.Patient = _mapper.Map <PatientBasicInfoVM>(_patientRepository.GetById(visit.PatientId));
            return(visit);
        }
Example #2
0
        public void Handle(CompleteVisit message)
        {
            DomainEvents.Register <VisitCompletedDomainEvent>(VisitCompletedDomainEventHandler);
            var visit = _visitRepository.GetById(message.Id);

            visit.Complete();
            _visitRepository.Flush();
            _bus.Return(ReturnCode.OK);
        }
Example #3
0
        public VisitGetByIdDto GetById(int id)
        {
            var result = _visitRepository.GetById(id);
            var visit  = new VisitGetByIdDto();

            visit.Id           = result.Id;
            visit.PatientName  = result.Patient.Name;
            visit.PatientAge   = result.Patient.Age;
            visit.PatientPhone = result.Patient.Phone;
            visit.VisitDate    = result.VisitDate;

            return(visit);
        }