public IActionResult AddEPrescription(EPrescriptionDto dto) { EPrescription eprescription = EPrescriptionMapper.EPrescriptionDtoToEPrescription(dto); App.Instance().EPrescriptionService.AddEntity(eprescription); return(Ok()); }
public static EPrescription EPrescriptionDtoToEPrescription(EPrescriptionDto dto) { EPrescription newEPrescriptions = new EPrescription(); newEPrescriptions.PatientName = dto.PatientName; newEPrescriptions.MedicamentName = dto.MedicamentName; newEPrescriptions.Comment = dto.Comment; newEPrescriptions.PublishingDate = dto.PublishingDate; return(newEPrescriptions); }
public static EPrescriptionDto EPrescriptionToEPresctriptionDto(EPrescription ePrescription) { EPrescriptionDto dto = new EPrescriptionDto(); dto.Id = ePrescription.Id; dto.PatientId = ePrescription.PatientId; dto.PatientName = ePrescription.PatientName; dto.Comment = ePrescription.Comment; dto.MedicamentName = ePrescription.MedicamentName; dto.PublishingDate = ePrescription.PublishingDate; return(dto); }
public EPrescription createIPrescription(EPrescriptionDto dto) { return(EPrescriptionAdapter.EPrescriptionDtoToEPresctiption(dto)); }
public EPrescription Create(EPrescriptionDto dto) { EPrescription prescription = EPrescriptionAdapter.EPrescriptionDtoToEPresctiption(dto); return(EPrescriptionRepository.Create(prescription)); }
public static EPrescription EPrescriptionDtoToEPresctiption(EPrescriptionDto dto) { return(new EPrescription(dto.Pharmacy, dto.Name, dto.Surname, dto.MedicalIDNumber, dto.Medicine, dto.Quantity, dto.Usage)); }