예제 #1
0
        // POST api/values
        public IEnumerable <PatientMessage> Post(PatientFilterMessage patientFilterMessage)
        {
            PatientFilterService patientFilterService = new PatientFilterService();

            patientFilterService.Names          = patientFilterMessage.Names.Trim();
            patientFilterService.Identification = patientFilterMessage.Identification.Trim();
            List <PatientMessage> listPatient = patientFilterService.GetList();

            return(listPatient);
        }
예제 #2
0
        public void SaveAppointmentTest()
        {
            PatientFilterService patientFilterService = new PatientFilterService();

            patientFilterService.Identification = "INT123";
            List <PatientMessage> listPatient = patientFilterService.GetList();

            if (listPatient?.Count > 0)
            {
                AppointmentMessage appointmentMessage = new AppointmentMessage
                {
                    Date = DateTime.Now,
                    Id   = Guid.Empty,
                    IdAppointmentType = (int)AppointmentType.General,
                    IdPatient         = listPatient[0].Id
                };

                AppointmentService appointmentService = new AppointmentService();
                appointmentService.Save(appointmentMessage);
            }
        }