Beispiel #1
0
        public IActionResult GetjcHeader(string idcard)
        {
            //JObject res = Methods.JhDbManager.dynamicToJObject(dy);
            Console.WriteLine("请求日期:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n检查报告的入参idcard" + idcard);
            string patientno            = string.Empty;//DJLSH
            SqlServiceSoapClient client = new SqlServiceSoapClient(SqlServiceSoapClient.EndpointConfiguration.SqlServiceSoap);
            string         res          = client.GetResultAsync(idcard).Result.Body.GetResultResult;
            List <JObject> jobj         = Methods.JhDbManager.GetTbyString <List <JObject> >(res);

            if (jobj == null)
            {
                goto Continue;
            }
            if (jobj.Count == 0)
            {
                goto Continue;
            }
            for (int i = 0; i < jobj.Count; i++)
            {
                var item = jobj.ElementAtOrDefault(i);
                if (item.ContainsKey("DJLSH"))
                {
                    if (i == jobj.Count - 1)
                    {
                        patientno += "'" + item.GetValue("DJLSH", StringComparison.OrdinalIgnoreCase).ToString() + "'";
                    }
                    else
                    {
                        patientno += "'" + item.GetValue("DJLSH", StringComparison.OrdinalIgnoreCase).ToString() + "'" + ",";
                    }
                }
            }
Continue:
            if (string.IsNullOrEmpty(patientno))
            {
                string Sql = $"select p.card_no from com_patientinfo p where p.idenno='{idcard}' and p.is_valid='1'";
                patientno = "'" + Methods.JhDbManager.getSqlReturnOne(Sql, hisSql) + "'";
            }

            string    sql = $"select  r.lab_apply_no \"id\", r.paritemname \"title\",r.micro_flag \"iswsw\",r.patient_id \"patientId\",\'' \"patientName\",r.report_date_time \"sendTime\",\'枝江市人民医院' \"hospitalName\" from v_lis_report_zhyy r where   (r.patient_id in({patientno}) and r.file_visit_type in ('1','3')) or (r.patient_id in ({patientno})  and r.file_visit_type in ('1','3')) and r.is_valid = '1'";
            var       dt  = Methods.JhDbManager.QuerySql(sql, this.Configuration.GetConnectionString("Lis").ToString());
            ArrayList arr = Methods.JhDbManager.getJObject(dt);

            if (arr == null)
            {
                return(new JsonResult(new { msg = "没有找到如何检测报告的信息!", data = new { }, code = 404 }));
            }
            if (arr.Count == 0)
            {
                return(new JsonResult(new { msg = "没有找到如何检测报告的信息!", data = new { }, code = 404 }));
            }
            return(new JsonResult(new { msg = "查询成功!", data = arr, code = 200 }));
        }
Beispiel #2
0
        public IActionResult bindCard([FromBody] dynamic dynamic)//直接点参数
        {
            JObject res = Methods.JhDbManager.dynamicToJObject(dynamic);

            Console.WriteLine("请求日期:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n查询患者基本信息的入参" + res.ToString());
            string idcard = string.Empty;

            try
            {
                idcard = res.GetValue("idcard").ToString();
            }
            catch
            {
                return(new JsonResult(new { msg = "你输入的参数有误!", data = "参数错误", code = 403 }));
            }
            string sql = $" select o.is_valid \"status\",  o.card_no \"patientId\",  o.name \"patientName\", o.card_no \"cardNo\",  o.idenno \"idCardNo\", decode(o.linkman_tel, '', o.home_tel, o.linkman_tel) \"phone\", o.home \"address\"  from zjhis.com_patientinfo o   where o.idenno ='{idcard}'     and o.CARD_NO not like 'T%'";
            var    dt  = new DataTable();

            try
            {
                dt = Methods.JhDbManager.QuerySql(sql, this.Configuration.GetConnectionString("Default").ToString());

                if (dt == null || dt.Rows.Count == 0)
                {
                    SqlServiceSoapClient client = new SqlServiceSoapClient(SqlServiceSoapClient.EndpointConfiguration.SqlServiceSoap);
                    string         result       = client.GetResultAsync(idcard).Result.Body.GetResultResult;
                    List <JObject> jobj         = Methods.JhDbManager.GetTbyString <List <JObject> >(result);
                    return(new JsonResult(new { msg = "查询成功!", data = jobj, code = 200 }));
                }
            }
            catch (Exception ex)
            {
                return(new JsonResult(new { msg = "没有找到如何检测报告的信息!", data = ex.Message, code = 404 }));
            }
            ArrayList arr = Methods.JhDbManager.getJObject(dt);

            if (arr.Count == 0 || arr == null)
            {
                return(new JsonResult(new { msg = "没有找到如何检测报告的信息!", data = "查询结果为空", code = 404 }));
            }
            return(new JsonResult(new { msg = "查询成功!", data = arr, code = 200 }));
        }
Beispiel #3
0
 public SqlServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(SqlServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Beispiel #4
0
 public SqlServiceSoapClient(EndpointConfiguration endpointConfiguration) :
     base(SqlServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), SqlServiceSoapClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }