/// <summary> /// 根据患者Id获取患者详细信息 /// </summary> /// <param name="patientId">患者Id</param> /// <returns>患者详细信息</returns> public async Task <WebAPIOutput <PatientDto> > GetPatientById(long patientId) { var patient = Mapper.Map <Patient, PatientDto>(await _repository.GetPatientById(patientId)); patient.HasWeightData = await _weightRepository.IsExistWeightData(patientId); return(WebAPIOutput <PatientDto> .Success(patient)); }
public WebAPIOutput <int> Add([FromBody] AddTreatDto treatDto) { var treat = new Treat() { UserId = treatDto.UserId, TreatDate = treatDto.TreatDate, TreatDoctor = treatDto.TreatDoctor, TreatPlace = treatDto.TreatPlace, TreateDetail = treatDto.TreateDetail }; var treatId = _treatService.Add(treat); return(WebAPIOutput <int> .Success(treatId)); }
public async Task <WebAPIOutput <List <TreatImage> > > GetList(int treatId) { var treatImageList = await _treatImageService.GetList(treatId); return(WebAPIOutput <List <TreatImage> > .Success(treatImageList)); }
/// <summary> /// 获取最新top数量血压列表 /// </summary> /// <param name="patientId"></param> /// <param name="topNumber"></param> /// <returns></returns> public async Task <WebAPIOutput <List <BloodPressureDto> > > GetTopList(long patientId, int topNumber) { var bloodPressureList = await _bloodPressureRepository.GetTopList(patientId, topNumber); return(WebAPIOutput <List <BloodPressureDto> > .Success(Mapper.Map <List <BloodPressure>, List <BloodPressureDto> >(bloodPressureList))); }
public async Task <WebAPIOutput <GetPatientByIdNoOutput> > GetByIdNo(string idNo) { var result = await _service.GetByIdNo(idNo); return(WebAPIOutput <GetPatientByIdNoOutput> .Success(result)); }
public async Task <OutputBase> BindWeixin(BindWeixinInput input) { var result = await _service.BindWeixin(input); return(WebAPIOutput <OutputBase> .Success(result)); }
public async Task <WebAPIOutput <DictDto> > GetByOpenId(string openId) { var result = await _service.GetByOpenId(openId); return(WebAPIOutput <DictDto> .Success(result)); }
public async Task <WebAPIOutput <Diagnose> > Get(int userId) { var diagnose = await _diagnoseService.Get(userId); return(WebAPIOutput <Diagnose> .Success(diagnose)); }
public async Task <WebAPIOutput <List <Treat> > > GetList(int userId) { var treatList = await _treatService.GetList(userId); return(WebAPIOutput <List <Treat> > .Success(treatList)); }
public async Task <WebAPIOutput <Treat> > Get(int id) { var treat = await _treatService.Get(id); return(WebAPIOutput <Treat> .Success(treat)); }
public async Task <WebAPIOutput <User> > GetUser(int userId) { var user = await _userService.Get(userId); return(WebAPIOutput <User> .Success(user)); }
public async Task <WebAPIOutput <User> > GetUserByWeixinOpenId(string weixinOpenId) { var user = await _userService.Get(weixinOpenId); return(WebAPIOutput <User> .Success(user)); }
/// <summary> /// 上传图片 /// </summary> /// <param name="input">上传图片请求</param> /// <returns></returns> public async Task <WebAPIOutput <string> > UploadImage(UploadImageInput input) { var avatar = await _ossRepository.UploadImage(input); return(string.IsNullOrEmpty(avatar) ? WebAPIOutput <string> .Fail("上传失败") : WebAPIOutput <string> .Success(CommConstant.OssUrl + avatar)); }