public bool Post([FromBody] Patient value) { if (ModelState.IsValid) { return(_patient.SavePatient(value)); } return(false); }
public async Task <ResultEntity> SavePatient(Patient request) { try { var result = await _patientRepository.SavePatient(request); return(result); } catch (Exception ex) { throw ex; } }
public ActionResult EditPatient(lmsPatientRegistration objPatientMaster) { var addmissionDate = Request["REGISTEREDATE"] == null ? DateTime.Now : Request["REGISTEREDATE"].ToLmsSystemDate(); var qrCodeText = $"{ objPatientMaster.PATIENTNAME}-{ objPatientMaster.CONTACT}"; objPatientMaster.GENDER = objPatientMaster.Sex == 1 ? "Male" : objPatientMaster.Sex == 2 ? "Female" : null; objPatientMaster.DOB = Request["DOB"] == null ? DateTime.Now : Request["DOB"].ToLmsSystemDate(); objPatientMaster.CREATEDDATE = addmissionDate; objPatientMaster.QrCodeContent = qrCodeText; objPatientMaster.QrCodeBase64 = qrCodeText.GenerateQrCode(); var savePatientDetails = _objIPatient.SavePatient(objPatientMaster); return(RedirectToAction("ViewPatient", new { PatientId = savePatientDetails, viewMessage = "Patient Details Saved Successfully" })); }
public bool SavePatient(Patient _paitent) { return(_patientdto.SavePatient(_paitent)); }