public IHttpActionResult EditPatientCase([FromBody] PatientCaseEditInfoDto patientCaseDto) { var user = base.CurrentUser(); var result = _consultationPatientCaseService.EditPatientCase(patientCaseDto, user.UniqueID); return(Ok(result)); }
public void EditPatientCaseTest() { string identityCard = RandomHelper.GenerateString(); string patientNo1 = RandomHelper.GenerateString(); string patientNo2 = RandomHelper.GenerateString(); PatientCaseInfoDto patientCaseInfoDto = new PatientCaseInfoDto { IdentityCard = identityCard, PatientName = RandomHelper.GenerateString(), InsuranceNumber = RandomHelper.GenerateString(), PatientNo = patientNo1, Age = RandomHelper.GenerateString(), Gender = "0", Birthday = DateTime.Now, CreateTime = DateTime.Now, LastEditTime = DateTime.Now }; PatientCaseInfoDto patientCaseInfoDtoNew = ConsultationPatientCaseService.CreatePatientCase(patientCaseInfoDto, null, "", ""); PatientCaseEditInfoDto editPatientCase = new PatientCaseEditInfoDto { UniqueID = patientCaseInfoDtoNew.UniqueID, IdentityCard = patientCaseInfoDtoNew.IdentityCard, PatientName = patientCaseInfoDtoNew.PatientName, InsuranceNumber = patientCaseInfoDtoNew.InsuranceNumber, PatientNo = patientCaseInfoDtoNew.PatientNo, Age = patientCaseInfoDtoNew.Age, Gender = patientCaseInfoDtoNew.Gender, Birthday = patientCaseInfoDtoNew.Birthday, CreateTime = patientCaseInfoDtoNew.CreateTime }; bool result = ConsultationPatientCaseService.EditPatientCase(editPatientCase, ""); Assert.AreEqual(true, result); }