示例#1
0
        /// <summary>
        /// 获取记录详情
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static RecordDetailResponse _GetRecordDetail(RecordDetailRequest request)
        {
#if DEBUG
            request = new RecordDetailRequest()
            {
                user_id = "1",
                r_id    = "48"
            };
#endif
            return(Get <RecordDetailResponse>("recorddetail", request));
        }
示例#2
0
        /// <summary>
        /// 根据历史记录ID取得详细信息
        /// </summary>
        /// <returns></returns>
        public Hashtable GetHistoryByID(int SID)
        {
            Hashtable hInfo = new Hashtable();

            try
            {
                var request = new RecordDetailRequest()
                {
                    user_id = UserInfoStatic.UserInfo.id,
                    r_id    = Convert.ToString(SID)
                };
                var resp = HeartWavesSDK.API.APIClient._GetRecordDetail(request);

                if (null == resp || null == resp.data)
                {
                    PmtsMessageBox.CustomControl1.Show("网络异常,请稍后重试");
                }
                else if (resp.data.success != "1")
                {
                    PmtsMessageBox.CustomControl1.Show(resp.data.message);
                }
                else
                {
                    if (resp.data.datas != null)
                    {
                        hInfo["fMean"]     = resp.data.datas.fmean;
                        hInfo["HRVScore"]  = resp.data.datas.hrvscore;
                        hInfo["score"]     = resp.data.datas.synthesisscore;
                        hInfo["Pressure"]  = resp.data.datas.pressureindex;
                        hInfo["adjust"]    = resp.data.datas.deflatingindex;
                        hInfo["stable"]    = resp.data.datas.stabilityindex;
                        hInfo["report"]    = resp.data.datas.report;
                        hInfo["NB"]        = resp.data.datas.nb;
                        hInfo["StartTime"] = resp.data.datas.s_time;
                        var hrvdata = CommonUtils.getArrayListFromJson(resp.data.datas.hrvdata);
                        hInfo["Time"]    = hrvdata.Count / 2.0;
                        hInfo["hrvData"] = resp.data.datas.hrvdata;
                    }
                }
            }
            catch (Exception ex)
            {
                PmtsMessageBox.CustomControl1.Show(ex.Message);
            }

            return(hInfo);
        }
示例#3
0
        /// <summary>
        /// 按照SID取得事件标记
        /// </summary>
        /// <param name="SID"></param>
        /// <returns></returns>
        public ArrayList GetMarkByID(int SID)
        {
            ArrayList markList = new ArrayList();

            try
            {
                var request = new RecordDetailRequest()
                {
                    user_id = UserInfoStatic.UserInfo.id,
                    r_id    = Convert.ToString(SID)
                };
                var resp = HeartWavesSDK.API.APIClient._GetRecordDetail(request);

                if (null == resp || null == resp.data)
                {
                    PmtsMessageBox.CustomControl1.Show("网络异常,请稍后重试");
                }
                else if (resp.data.success != "1")
                {
                    PmtsMessageBox.CustomControl1.Show(resp.data.message);
                }
                else
                {
                    if (resp.data.datas != null)
                    {
                        foreach (var entity in resp.data.datas.hrvdata)
                        {
                            Hashtable markInfo = new Hashtable();
                            markInfo["Time"]     = resp.data.datas.s_time;
                            markInfo["Content"]  = entity;
                            markInfo["DateTime"] = resp.data.datas.s_time;
                            markList.Add(markInfo);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                PmtsMessageBox.CustomControl1.Show(ex.Message);
            }

            return(markList);
        }