/// <summary> /// 7、 删除用户 /// </summary> /// <param name="token"></param> /// <param name="id">要删除的用户id</param> /// <returns></returns> public string DropUser(string token, string id) { string strResponse = string.Empty; APIResponseBase apiResponse = new APIResponseBase(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("userid", id); strResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/drop?token=" + token); } catch (Exception) { } return(strResponse); }
/// <summary> /// 5、 修改密码 /// </summary> /// <param name="pass_old">原始密码(明文)</param> /// <param name="pass_new1">新密码(明文)</param> /// <param name="pass_new2">新密码(明文)</param> /// <returns></returns> /// Jack Ding public string ModifyUserPassword(string pass_old, string pass_new1, string pass_new2, string token) { try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("pass_old", pass_old); sPara.Add("pass_new1", pass_new1); sPara.Add("pass_new2", pass_new2); return(F8YLSubmit.BuildRequest(sPara, "ucenter/user/passwd?token=" + token)); } catch { throw; } }
/// <summary> /// 49、 获取病人加入的项目 /// </summary> /// <param name="page"></param> /// <returns></returns> /// Gerry Ge /// 请求方式:GET public string Joined(string token, int page = 1) { string strResponse = string.Empty; UserJoinedResponse apiResponse = new UserJoinedResponse(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("page", page.ToString()); strResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/joined?token=" + token); } catch (Exception) { } return(strResponse); }
/// <summary> /// 53、 上传接口 /// </summary> /// <param name="filedata"></param> /// <param name="token"></param> /// <returns></returns> /// Jack Ding public UploadWebResponse UploadWeb(string filedata, string token) { string strResponse = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("Filedata", filedata); strResponse = F8YLSubmit.BuildRequest(sPara, "upload/web?token=" + token); return(JsonHelper.DeserializeJsonToObject <UploadWebResponse>(strResponse)); } catch { throw; } }
public string ImportUser(string token, string filexls) { string strResponse = string.Empty; APIResponseBase apiResponse = new APIResponseBase(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("filexls", filexls); strResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/import?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("ImportUser", AppLog.LogMessageType.Error, ex); } return(strResponse); }
/// <summary> /// 56、 56、 获取当前用户所参与的项目 /// </summary> /// <param name="token">token</param> /// <returns></returns> public ProjectJoined Joined(string token, string status) { string apiResponse = string.Empty; ProjectJoined projectJoined = new ProjectJoined(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("status", status); apiResponse = F8YLSubmit.BuildGetRequest(sPara, "project/joined?token=" + token); projectJoined = JsonHelper.DeserializeJsonToObject <ProjectJoined>(apiResponse); } catch (Exception ex) { AppLog.Instance.Write("Joined", AppLog.LogMessageType.Error, ex); } return(projectJoined); }
/// <summary> /// 57、 移动病人到其它医生下 /// </summary> /// <param name="projectid">项目id</param> /// <param name="patientid">病人userid</param> /// <param name="doctorid_new">新医生userid</param> /// <param name="doctorid_old">原医生userid</param> /// <returns></returns> public string PatientMove(string token, string projectid, string patientid, string doctorid_new, string doctorid_old) { string apiResponse = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("projectid", projectid); sPara.Add("patientid", patientid); sPara.Add("doctorid_new", doctorid_new); sPara.Add("doctorid_old", doctorid_old); apiResponse = F8YLSubmit.BuildRequest(sPara, "project/patient/move?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("PatientMove", AppLog.LogMessageType.Error, ex); } return(apiResponse); }
/// <summary> /// 3、 用户-PI/医生/病人/列表 之 获取医院病人列表 /// </summary> /// <param name="token"></param> /// <param name="hospitalid"></param> /// <param name="page"></param> /// <param name="q"></param> public string getSearchHospitalPatient(string token, string hospitalid, string q) { try { string ApiResponse = string.Empty; HospitalUserProfileResponse hospitalUserProfileResponse = new HospitalUserProfileResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("hospitalid", hospitalid); sPara.Add("q", q); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/search/patient?token=" + token); return(ApiResponse); } catch (Exception) { throw; } }
/// <summary> /// 34、 移除病人 /// </summary> /// <param name="token">token</param> /// <param name="projectid">项目id</param> /// <param name="patentid">病人id</param> /// <returns></returns> /// Jerry Shi public string removePatent(string token, string projectid, string patentid) { string apiRespone = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("projectid", projectid); sPara.Add("patientid", patentid); apiRespone = F8YLSubmit.BuildRequest(sPara, "project/patient/remove?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("removePatent", AppLog.LogMessageType.Error, ex); } return(apiRespone); }
/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="token"></param> /// <param name="username"></param> /// <param name="truename"></param> /// <param name="deptid"></param> /// <param name="avatar"></param> /// <param name="age"></param> /// <returns></returns> /// Jack Ding public string getProfile(string token, string userid) { try { string ApiResponse = string.Empty; UserProfileResponse userProfileResponse = new UserProfileResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("userid", userid); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/profile?token=" + token); return(ApiResponse); } catch (Exception) { throw; } }
/// <summary> /// 23、 模板分类列表 /// </summary> /// <param name="token">token</param> /// <param name="page">分页id(未启用)</param> /// <returns></returns> /// Jerry Shi public TplKindListResponse TplKindList(string token, string page) { try { string ApiResponse = string.Empty; TplKindListResponse tplKindListResponse = new TplKindListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("page", page); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/kind/list?token=" + token); tplKindListResponse = JsonHelper.DeserializeJsonToObject <TplKindListResponse>(ApiResponse); return(tplKindListResponse); } catch { throw; } }
/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="token"></param> /// <param name="username"></param> /// <param name="truename"></param> /// <param name="deptid"></param> /// <param name="avatar"></param> /// <param name="age"></param> /// <returns></returns> /// Jack Ding public string getProfile(string token, string username, string email, string deptid, string avatar, string sex, string ethnic, string height, string weight, string address, string doctorid) { try { string ApiResponse = string.Empty; UserProfileResponse userProfileResponse = new UserProfileResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("username", username); sPara.Add("mobile", username); sPara.Add("email", email); //sPara.Add("deptid", deptid); if (avatar != string.Empty) { sPara.Add("avatar", avatar); } if (sex != string.Empty) { sPara.Add("sex", sex); } if (ethnic != string.Empty) { sPara.Add("ethnic", sex); } sPara.Add("height", height); sPara.Add("weight", weight); sPara.Add("address", address); sPara.Add("doctorid", doctorid); ApiResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/profile?token=" + token); return(ApiResponse); } catch (Exception) { throw; } }
/// <summary> /// 5、 修改密码 /// </summary> /// <param name="pass_old">原始密码(明文)</param> /// <param name="pass_new1">新密码(明文)</param> /// <param name="pass_new2">新密码(明文)</param> /// <returns></returns> /// Jack Ding public string getUCenterUserPasswd(string pass_old, string pass_new1, string pass_new2, string token) { string strResponse = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("pass_old", pass_old); sPara.Add("pass_new1", pass_new1); sPara.Add("pass_new2", pass_new2); strResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/passwd?token=" + token); return(strResponse); } catch { throw; } }
public TplReportDetailResponse TplReportDetailByIdObject(string token, string id) { try { string ApiResponse = string.Empty; TplReportDetailResponse response = new TplReportDetailResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("id", id); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/report/detail?token=" + token); response = JsonHelper.DeserializeJsonToObject <TplReportDetailResponse>(ApiResponse); return(response); } catch { throw; } }
/// <summary> /// 29、 项目列表 /// </summary> /// <param name="token"></param> /// <param name="hospitalid">医院id</param> /// <param name="status">状态(0:进行中,1:已归档)</param> /// <param name="userid">创建项目的用户id</param> /// <returns></returns> /// Jerry Shi public string getProjectList(string token, string hospitalid, int status, string userid) { string ApiResponse = string.Empty; try { ProjectListResponse projectListResponse = new ProjectListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("hospitalid", hospitalid.ToString()); sPara.Add("status", status.ToString()); sPara.Add("userid", userid); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "project/list?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("getProjectList", AppLog.LogMessageType.Error, ex); } return(ApiResponse); }
/// <summary> /// 2、 登出(下线) /// </summary> /// <param name="token">token</param> /// <returns></returns> /// Jerry Shi public string Logout(string token) { string strResponse = string.Empty; try { //if (!string.IsNullOrEmpty(F8YLConfig.Token)) //{ Dictionary <string, string> sPara = new Dictionary <string, string>(); //sPara.Add("token", token); //strResponse = F8YLSubmit.BuildRequest(sPara, "get", "auth/logout", "", new Byte[] { }, "", 0); strResponse = F8YLSubmit.BuildGetRequest(sPara, "auth/logout?token=" + token); //} } catch (Exception) { throw; } return(strResponse); }
/// <summary> /// 26、 模板的指标的分片列表 /// </summary> /// <param name="token"></param> /// <param name="tplid">模板id</param> /// <returns></returns> public TplSharpListResponse TplSharpList(string token, int tplid) { try { string ApiResponse = string.Empty; TplSharpListResponse response = new TplSharpListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("tplid", tplid.ToString()); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/sharp/list?token=" + token); response = JsonHelper.DeserializeJsonToObject <TplSharpListResponse>(ApiResponse); return(response); } catch { throw; } }
/// <summary> /// 31、 创建项目(立项) /// </summary> /// <param name="token"></param> /// <param name="name">项目名称</param> /// <param name="opendate">立项日期</param> /// <param name="closedate">结束日期</param> /// <param name="num_goal">项目目标病人数</param> /// <param name="remark">简要说明</param> /// <returns></returns> /// Jerry Shi public string create(string token, string name, string opendate, string closedate, string num_goal, string remark) { string response = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("name", name); sPara.Add("opendate", opendate); sPara.Add("closedate", closedate); sPara.Add("num_goal", num_goal); sPara.Add("remark", remark); response = F8YLSubmit.BuildRequest(sPara, "project/create?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("create", AppLog.LogMessageType.Error, ex); } return(response); }
public string TplReportListString(string token, string tplid, string patientid) { try { string ApiResponse = string.Empty; TplReportListResponse response = new TplReportListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("tplid", tplid); sPara.Add("patientid", patientid); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/report/list?token=" + token); return(ApiResponse); } catch { throw; } }
/// <summary> /// 10、 医院详情 /// </summary> /// <param name="token">token</param> /// <param name="id">指标id</param> /// <returns></returns> /// Jack Ding public HospitalDetailResponse Detail(string token, int id) { string strResponse = string.Empty; HospitalDetailResponse response = new HospitalDetailResponse(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("id", id.ToString()); strResponse = F8YLSubmit.BuildGetRequest(sPara, "hospital/detail?token=" + token); response = JsonHelper.DeserializeJsonToObject <HospitalDetailResponse>(strResponse); return(response); } catch { throw; } }
/// <summary> /// 41、 获取项目的医生列表 /// </summary> /// <param name="token">token</param> /// <param name="hospitalid">医院id[通常不用]</param> /// <param name="projectid">项目id</param> /// <param name="piid">对应的PI id</param> /// <param name="username">医生名字(模糊)</param> /// <param name="page">分页id</param> /// <returns></returns> public string getDoctorList(string token, string hospitalid, string projectid, string piid, string username, string page) { string ApiResponse = string.Empty; try { ProjectDoctorListResponse projectDoctorListResponse = new ProjectDoctorListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("hospitalid", hospitalid); sPara.Add("projectid", projectid); sPara.Add("piid", piid); sPara.Add("username", username); sPara.Add("page", page.ToString()); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "project/doctor/list?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("getDoctorList", AppLog.LogMessageType.Error, ex); } return(ApiResponse); }
/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="userid">如果为空返回当前用户</param> /// <returns></returns> /// Jerry Shi public UserProfileResponse profile(string token, string userid) { UserProfileResponse userProfileResponse = new UserProfileResponse(); try { string ApiResponse = string.Empty; Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("userid", userid.ToString()); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/profile?token=" + token); userProfileResponse = JsonHelper.DeserializeJsonToObject <UserProfileResponse>(ApiResponse); } catch (Exception ex) { //AppLog.Instance.Write("UserProfileResponse", AppLog.LogMessageType.Error, ex); } return(userProfileResponse); }
/// <summary> /// 34、 为项目添加病人 /// </summary> /// <param name="token">token</param> /// <param name="projectid">项目id</param> /// <param name="doctorid">不需要传,就是当前登录的用户</param> /// <param name="patientid">patientid序列;实为病人的userid,它们所对应的医生为当前登录用户。如果不传此值,那下面的mobile,idcard必填</param> /// <param name="username">病人姓名</param> /// <param name="mobile">病人手机</param> /// <param name="idcard">病人身份证 18位</param> /// <param name="overwrite">是否覆盖之前的病人</param> /// <param name="height">身高</param> /// <param name="weight">体重</param> /// <param name="address">地址</param> /// <param name="tel">电话</param> /// <returns></returns> /// Jerry Shi public string PatientAppend(string token, string projectid, string doctorid, string patientid, string username, string mobile, string idcard, bool overwrite, string height, string weight, string address, string tel, string num_il, string ethnic, string sex) { string apiRespone = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("projectid", projectid); //sPara.Add("doctorid", doctorid); //此参数不需要传递,就是当前用户 if (patientid != "") { List <string> patientidList = JsonHelper.DeserializeJsonToObject <List <string> >(patientid); foreach (string item in patientidList) { sPara.Add("patientid[]", item); } } sPara.Add("username", username); sPara.Add("mobile", mobile); sPara.Add("idcard", idcard); sPara.Add("overwrite", overwrite == true ? "true" : "false"); sPara.Add("height", height); sPara.Add("weight", weight); sPara.Add("address", address); sPara.Add("tel", tel); sPara.Add("num_ill", num_il); sPara.Add("ethnic", ethnic); sPara.Add("sex", sex); sPara.Add("doctorid", doctorid); apiRespone = F8YLSubmit.BuildRequest(sPara, "project/patient/append?token=" + token); } catch (Exception ex) { AppLog.Instance.Write("PatientAppend", AppLog.LogMessageType.Error, ex); } return(apiRespone); }
/// <summary> /// 禁用医院 /// </summary> /// <param name="token"></param> /// <param name="id">医院id</param> /// <returns></returns> public string Disable(string token, string id) { string strResponse = string.Empty; try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("hospitalid", id); strResponse = F8YLSubmit.BuildRequest(sPara, "hospital/status/disable?token=" + token); //response = JsonHelper.DeserializeJsonToObject<HospitalDetailResponse>(strResponse); return(strResponse); } catch (Exception ex) { AppLog.Instance.Write("Drop Hospital Error.", AppLog.LogMessageType.Error, ex); } return(strResponse); }
/// <summary> /// 21、 模板报告-详情 /// </summary> /// <param name="token"></param> /// <param name="id">报告id</param> /// <returns></returns> /// Jack Ding public string TplReportDetail(string token, string tplId, string periodId) { try { string ApiResponse = string.Empty; //TplReportDetailResponse response = new TplReportDetailResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("tplid", tplId); sPara.Add("periodid", periodId); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/report/detail?token=" + token); //response = JsonHelper.DeserializeJsonToObject<TplReportDetailResponse>(ApiResponse); return(ApiResponse); } catch { throw; } }
/// <summary> /// 17、 删除模板 /// </summary> /// <param name="id">要删除的模板id</param> /// <returns></returns> /// Jack Ding public TplDropResponse TplDrop(int id, string token) { string strResponse = string.Empty; TplDropResponse response = new TplDropResponse(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("id", id.ToString()); strResponse = F8YLSubmit.BuildRequest(sPara, "tpl/drop?token=" + token); response = JsonHelper.DeserializeJsonToObject <TplDropResponse>(strResponse); return(response); } catch { throw; } }
/// <summary> /// 24、 添加一个模板分类 /// </summary> /// <param name="name">分类的名称</param> /// <returns></returns> /// Jack Ding public TplKindAddResponse TplKindAdd(string name, string token) { string strResponse = string.Empty; TplKindAddResponse response = new TplKindAddResponse(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("name", name); strResponse = F8YLSubmit.BuildRequest(sPara, "tpl/kind/add?token=" + token); response = JsonHelper.DeserializeJsonToObject <TplKindAddResponse>(strResponse); return(response); } catch { throw; } }
/// <summary> /// 20、 模板报告-列表 /// </summary> /// <param name="token"></param> /// <param name="tplid">模板id</param> /// <param name="page">分页id</param> /// <returns></returns> /// Jack Ding public TplReportListResponse TplReportList(string token, string tplid, string patientid) { try { string ApiResponse = string.Empty; TplReportListResponse response = new TplReportListResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("tplid", tplid); sPara.Add("patientid", patientid); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/report/list?token=" + token); response = JsonHelper.DeserializeJsonToObject <TplReportListResponse>(ApiResponse); return(response); } catch { throw; } }
/// <summary> /// 18、 获取模板详情 /// </summary> /// <param name="token">token</param> /// <param name="id">要查询的模板id</param> /// <returns></returns> public TplDetailResponse TplDetail(string token, string id) { try { string ApiResponse = string.Empty; TplDetailResponse tplDetailResponse = new TplDetailResponse(); Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("id", id); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "tpl/detail?token=" + token); tplDetailResponse = JsonHelper.DeserializeJsonToObject <TplDetailResponse>(ApiResponse); //tplDetailResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<TplDetailResponse>(ApiResponse); return(tplDetailResponse); } catch (Exception ex) { throw; } }
public string UpdateUser(string token, string userid, string username, string deptname, string duty, string tel, string email) { string strResponse = string.Empty; APIResponseBase apiResponse = new APIResponseBase(); try { Dictionary <string, string> sPara = new Dictionary <string, string>(); sPara.Add("userid", userid); sPara.Add("username", username); sPara.Add("deptname", deptname); sPara.Add("duty", duty); sPara.Add("tel", tel); sPara.Add("email", email); strResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/profile?token=" + token); } catch (Exception) { } return(strResponse); }