using ASHermed.SinoInterface.Api.ContractModel.App;
using ASHermed.SinoInterface.Api.ContractModel.App.Model;
using ASHermed.SinoInterface.Api.ContractModel.Coupon.Model;
using ASHermed.SinoInterface.Api.ContractModel.Framework.Login;
using ASHermed.SinoInterface.Api.ContractModel.Tencent;
using ASHermed.SinoInterface.ContractModel;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using ASHermed.SinoInterface.Api.ContractModel.App.RequestForm;
using ASHermed.SinoInterface.Api.ContractModel.TCTrans;

namespace ASHermed.SinoInterface.Api.IService
{
    /// <summary>
	///用户信息
	/// </summary>
	public interface IUserService
    {
        BaseResponse<UserToken> Login(string account, string code, string identifier, string openId, string access_token, int language, int source);
        BaseResponse<UserToken> SourceLogin(string account, string code, int language, int source = 0);
        BaseResponse UpdateUserInfo(UserInfoQuery que);
        BaseResponse AddPat(int userId, Pub_Pat_Info patInfo, int patType, int language, string code);
        BaseResponse<dynamic> AddPatNew(int? id, string lastName, string firstName, string birthday, int gender, string phoneNo, int patType, string code, int language,
             int CardType, string Card_Id, string Guardian, string LastGuardian, string FirstGuardian, int DocumentType, string CertificateNumber, int IsDefault, string email, string patSource = "sino");

        /// <summary>
        /// 企业疫苗预约添加就诊人
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        BaseResponse<dynamic> AddEnterpriseVaccinatedPeople(AddEnterpriseVaccinatedPeopleParam param);

        BaseResponse<bool> IsTCPat(string birthday, string phoneNo);
        BaseResponse DeletePat(int patId);
        UserToken GetUser();
        Pub_User_Info GetUserInfo();

        List<UserAddress> GetUserAddress();
        UserAddress GetCurAddress(int addId);
        List<Pub_User_Info> GetAllUserInfo();
        int GetIMIDForIsRegUser();
        int AddUserAddress(UserAddress address);
        int UpdateUserAddress(UserAddress address);
        int DeleteUserAddress(int addId);

        List<ArticleCollect> GetUserCollerct(string keyWords);
        int CancelUserCollerct(int artId);

        BaseResponse<VideoUserSignResp> GetUserIMKey();
        bool TestJpush();
        Pub_User_Info SaveKey(int keyType, string key);
        string GetUrl(string orderNo, int language);
        string GetEvaluateUrl(string orderNo);
        string BindUserPat(int patId);
        PatWithRelationShip SelectPatById(int patId);
        LinKingAccessToken AccessToken(string appid, string secret, string code);
        LinKingUserDetail UserInfo(LinKingUserRequest request);
        VideoUserSignResp GetUserIMID();
        VideoUserSignResp GetKey();

        bool IsTreatment();
        BaseResponse UpdateTreatment(string password, string code);
        BaseResponse<string> CheckTreatment(string password);
        string GetLoginToken(string keyWords, string uid);
        BaseResponse<List<GetReportList>> GetReportList(int patId);
        BaseResponse<GetFileContent> GetFileContent(GetReportList request);
        BaseResponse<List<Pub_Sign_Report>> GetSignReportList(int patId, int userid);

        /// <summary>
        /// 发送体检报告邮件
        /// </summary>
        /// <param name="patId">患者id</param>
        /// <param name="emailAddress">邮件地址</param>
        /// <param name="filePath">文件网络路径</param>
        /// <param name="type">1-体检、检查报告；2-健康评估报告</param>
        /// <param name="language"></param>
        /// <returns></returns>
        Task<BaseResponse> SendSignReportEmailAsync(int patId, string emailAddress, string filePath, int type, int language);

        BaseResponse<List<CouponUserView>> GetUserConpon(int patId, int language, int apttype, int docId);

        string GeneralPatAdd(PatAddModel model);

        string UpdatePatInfo(PatUpdateModel model);
        int CignaPerfectUserInfo(CignaUserInfo model);
        BaseResponse<LoginInfo> WXLoginInfo(string encryptedData, string iv, string sessionkey, int language);
        BaseResponse<LoginInfo> WXLoginInfoForToken();
        PatUserInfoResp SelectByimId();

        Task<BaseResponse<dynamic>> GetRelationship();
        Task<BaseResponse<dynamic>> GetContactway();
        Task<BaseResponse<dynamic>> GetHowknow();

        string AddNewPat(NewPatModel model);
        string UpdateNewPat(NewPatModel model);

        List<TcPat> GetTcPatByPhone(string phone);

        NewPatModel GetNewPat(string mrn);
        BaseResponse<ReceptionInfo> WXReceptionLogin(string account, string password, string phone, string code);
        string GetReceptionCode(string type);
        Pub_ReceptionCode GetPubReceptionCode(string code);
        int InvalidReceptionCode(string code);
        bool CheckPatPhone(string account, string patMrn);
        int UserComplaint(ComplaintModel model);

        Task<string> YouZanMatchUserOpenId(string openId);


        /// <summary>
        /// 获取家庭成员列表
        /// </summary>
        /// <returns></returns>
        Task<BaseResponse<List<PatientModel>>> GetFamilyListAsync();

        /// <summary>
        /// 获取家庭成员详细信息
        /// </summary>
        /// <param name="patientId"></param>
        /// <returns></returns>
        Task<BaseResponse<PatientModel>> GetPatientInfoByIdAsync(int patientId);

        /// <summary>
        /// 家庭成员是否绑定了本人
        /// </summary> 
        /// <returns></returns>
        Task<BaseResponse<bool>> IsBandMyselfAsync();

        /// <summary>
        /// 删除家庭成员
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<BaseResponse> DeletePatientAsync(DeletePatientParam param);

        Task<BaseResponse> UnbindPatientAsync(DeletePatientParam param);

        /// <summary>
        /// 添加新患者
        /// </summary>
        /// <param name="param"></param>
        /// <param name="language"></param>
        /// <returns></returns>
        Task<BaseResponse<AddNewPatientModel>> AddNewPatientAsync(AddNewPatientParam param, int language);

        /// <summary>
        /// 绑定老患者
        /// </summary>
        /// <param name="param"></param>
        /// <param name="language"></param>
        /// <returns></returns>
        Task<BaseResponse<BindOldPatientModel>> BindOldPatientAsync(BindOldPatientParam param, int language);

        /// <summary>
        /// 添加监护人信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns> 
        Task<BaseResponse<AddGuardianModel>> AddGuardianAsync(AddGuardianParam param);

        /// <summary>
        /// 完善信息
        /// </summary>
        /// <param name="param"></param>
        /// <param name="language"></param>
        /// <returns></returns>
        Task<BaseResponse> PerfectInfoAsync(PerfectInfoParam param, int language);

        /// <summary>
        /// 查询tc患者
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<BaseResponse<GetTcPatientModel>> QueryMedicalRecordNoAsync(QueryMedicalRecordNoParam param);

        /// <summary>
        /// 校验用户补全tc那边的手机号中间四位
        /// </summary>
        /// <param name="param"></param>
        /// <param name="language"></param>
        /// <returns></returns>
        Task<BaseResponse> CheckTcPhoneAsync(CheckTcPhoneParam param, int language);

        /// <summary>
        /// 根据MRN或者PID搜索TC患者
        /// </summary>
        /// <param name="mrnOrPId"></param>
        /// <param name="language"></param>
        /// <returns></returns> 
        Task<BaseResponse<List<TcPatientModel>>> GetTcPatientByMrnOrPIdAsync(string mrnOrPId, int language);
        BaseResponse<List<DicVaccine>> Vaccinelist();
    }
}
