コード例 #1
0
        public static ApiResultInfo GetHisPatientInfo(string patid)
        {
            if (Service.DBClientService.GetModelByID <BsHospital>(UserProfiles.HospitalID).IsInterface)
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL);
                //参数
                IDictionary <string, string> parameters = new Dictionary <string, string>();
                string timestamp, token;
                SetBaseInterfcaeParameters(out timestamp, out token);
                parameters.Add("method", "YMZ_From_HIS_getPatientInfo");
                parameters.Add("patient", patid);

                System.Text.StringBuilder data_Json = new System.Text.StringBuilder();
                jsSerializer.Serialize(parameters, data_Json);

                string jsonString = HttpRequestHelper.PostPage(strURL, data_Json.ToString());
                if (jsonString.Contains("此病患ID号不存在"))
                {
                    return(new ApiResultInfo());
                }
                ApiResultInfo PharmacyInfoListlist = JsonHelper.JSONToObject <ApiResultInfo>(jsonString);
                return(PharmacyInfoListlist);
            }
            else
            {
                return(new ApiResultInfo());
            }
        }
コード例 #2
0
        public static ApiResultInfo GetLisReportUrl(string patid, string times)
        {
            if (Service.DBClientService.GetModelByID <BsHospital>(UserProfiles.HospitalID).IsInterface)
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL);
                //参数
                IDictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("method", "YMZ_From_HIS_getLisReportUrl");
                parameters.Add("patient", patid);
                parameters.Add("times", times);

                System.Text.StringBuilder data_Json = new System.Text.StringBuilder();
                jsSerializer.Serialize(parameters, data_Json);

                string        jsonString           = HttpRequestHelper.PostPage(strURL, data_Json.ToString());
                ApiResultInfo PharmacyInfoListlist = JsonHelper.JSONToObject <ApiResultInfo>(jsonString);
                return(PharmacyInfoListlist);
            }
            else
            {
                return(new ApiResultInfo());
            }
        }