|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/54f3ceba/6be944cd/ |
?#pragma checksum "D:\wwwroot\klbttc\wwwroot\supplier.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A7F396409C392CC19CF390695957F3DD5AFF4AF8"
#line 1 "D:\wwwroot\klbttc\wwwroot\supplier.aspx.cs"
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class supplier : System.Web.UI.Page
{
public string layer = string.Empty;
string attfileurl, file = string.Empty;
private NewEmailInfo email = new NewEmailInfo();
protected void Page_Load(object sender, EventArgs e)
{
var reqParam = Request.QueryString;
foreach (var item in reqParam.AllKeys)
{
if (item == "action" && Request.QueryString["action"].ToString() == "Insert")
{
// 查问验证码是否正确
if (Session["checkcodeUser"] == null)
{
layer = "<script>layer.confirm('驗證碼無效,請沉新輸入!', { btn:['確定']}, function() { window.history.back()});</script>";
}
else
{
if (!Request.Form["yzCode"].ToString().ToLower().Equals(Session["checkcodeUser"].ToString()))
{
layer = "<script>layer.confirm('驗證碼無效,請沉新輸入!', { btn:['確定']}, function() {window.history.back() });</script>";
}
else
{
SendMsg();
}
}
}
}
}
private void SendMsg()
{
// 获取表单信息
if (Request.Form.Count > 0)
{
// 基础信息
email.CompanyOrPerson = SqlKey.ReplaceUrlBadChar(Request.Form["userType"]);
email.UserNo = SqlKey.ReplaceUrlBadChar(Request.Form["userNo"]);
email.CoName = SqlKey.ReplaceUrlBadChar(Request.Form["coName"]);
email.FirstName = SqlKey.ReplaceUrlBadChar(Request.Form["firstName"]);
email.LastName = SqlKey.ReplaceUrlBadChar(Request.Form["lastName"]);
email.UserTelPhone = SqlKey.ReplaceUrlBadChar(Request.Form["userTelPhone"]);
email.UserEmaul = SqlKey.ReplaceUrlBadChar(Request.Form["userEmaul"]);
email.userGetDate = SqlKey.ReplaceUrlBadChar(Request.Form["userGetDate"]);
// 汇报者信息
email.BgFirstName = SqlKey.ReplaceUrlBadChar(Request.Form["bgFirstName"]);
email.BgLastName = SqlKey.ReplaceUrlBadChar(Request.Form["bgLastName"]);
email.BgJobType_Ccareer = SqlKey.ReplaceUrlBadChar(Request.Form["career"]);
email.BgJobTypeName = SqlKey.ReplaceUrlBadChar(Request.Form["bgJobType"]);
email.BgOtherJob = SqlKey.ReplaceUrlBadChar(Request.Form["bgotherJob"]);
email.FollowUp = SqlKey.ReplaceUrlBadChar(Request.Form["follow-up"]);
email.BgUserCompany = SqlKey.ReplaceUrlBadChar(Request.Form["bguserCoName"]);
email.BgTelPhone = SqlKey.ReplaceUrlBadChar(Request.Form["bguserTelPhone"]);
email.BgEmail = SqlKey.ReplaceUrlBadChar(Request.Form["bguserAddress"]);
// 患者信息
email.HzXing = SqlKey.ReplaceUrlBadChar(Request.Form["hzXing"]);
email.HzMing = SqlKey.ReplaceUrlBadChar(Request.Form["hzMing"]);
email.HzSex = SqlKey.ReplaceUrlBadChar(Request.Form["hzSex"]);
email.HzAge = SqlKey.ReplaceUrlBadChar(Request.Form["hzAge"]);
email.HzYear = SqlKey.ReplaceUrlBadChar(Request.Form["hzYear"]); // 年月日
//email.HzMonth = SqlKey.ReplaceUrlBadChar(Request.Form["hzMonth"]);
//email.HzDay = SqlKey.ReplaceUrlBadChar(Request.Form["hzDay"]);
email.HzMinZu = SqlKey.ReplaceUrlBadChar(Request.Form["mingzu"]); // 患者民族
email.HzKg = SqlKey.ReplaceUrlBadChar(Request.Form["hzKg"]);
email.HzCm = SqlKey.ReplaceUrlBadChar(Request.Form["hzCm"]);
email.HzHistory = SqlKey.ReplaceUrlBadChar(Request.Form["hzHistory"]);
email.HzSmoking = SqlKey.ReplaceUrlBadChar(Request.Form["smoking"]);
email.HzTipple = SqlKey.ReplaceUrlBadChar(Request.Form["tipple"]);
email.HzPregnancy = SqlKey.ReplaceUrlBadChar(Request.Form["pregnancy"]);
// 药品信息
email.YpName = SqlKey.ReplaceUrlBadChar(Request.Form["ypName"]).Split(',');
email.IsBotai = SqlKey.ReplaceUrlBadChar(Request.Form["isBotai"]).Split(',');
email.YpCyUser_select = SqlKey.ReplaceUrlBadChar(Request.Form["ypCyUser_select"]).Split(',');
email.YpCyUser = SqlKey.ReplaceUrlBadChar(Request.Form["ypCyUser"]).Split(',');
email.YpPNumber = SqlKey.ReplaceUrlBadChar(Request.Form["ypPNumber"]).Split(',');
email.YpCNumber = SqlKey.ReplaceUrlBadChar(Request.Form["ypCNumber"]).Split(',');
email.YpDCFYL = SqlKey.ReplaceUrlBadChar(Request.Form["ypDCFYL"]).Split(',');
email.YpPC = SqlKey.ReplaceUrlBadChar(Request.Form["ypPC"]).Split(',');
email.YpForm = SqlKey.ReplaceUrlBadChar(Request.Form["ypForm"]).Split(',');
email.YpZLJB = SqlKey.ReplaceUrlBadChar(Request.Form["ypZLJB"]).Split(',');
email.YpQYDataYear1 = SqlKey.ReplaceUrlBadChar(Request.Form["ypQYDataYear1"]).Split(',');
email.YpQYDataYear2 = SqlKey.ReplaceUrlBadChar(Request.Form["ypQYDataYear2"]).Split(',');
email.Ypcuoshi = SqlKey.ReplaceUrlBadChar(Request.Form["ypcuoshi"]).Split(',');
email.YphbYongyao = SqlKey.ReplaceUrlBadChar(Request.Form["hbYongyao"]).Split(',');
// 不良事务反映
email.AdverseEvent = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEvent"]).Split(',');
email.AdverseEventOfDateYear1 = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEventOfDateYear1"]).Split(',');
email.AdverseEventOfDateYear2 = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEventOfDateYear2"]).Split(',');
email.Adverse_Result = SqlKey.ReplaceUrlBadChar(Request.Form["adverse_Result"]).Split(',');
email.Sequela = SqlKey.ReplaceUrlBadChar(Request.Form["sequela"]).Split(',');
email.Serious = SqlKey.ReplaceUrlBadChar(Request.Form["isSerious_hidden_list"]).Split(','); // 是否严沉
email.Xiangguan = SqlKey.ReplaceUrlBadChar(Request.Form["isSerious_hidden_list2"]).Split(','); // 是否严沉的了局
email.Xiangguanxing = SqlKey.ReplaceUrlBadChar(Request.Form["xiangguanxing"]).Split(',');
email.Adverse_Content = Request.Form["adverse_Content"].Replace(",",",").Split(',');
// 其他
email.Other_txt1 = SqlKey.ReplaceUrlBadChar(Request.Form["other_txt1"]);
email.Other_txt2 = SqlKey.ReplaceUrlBadChar(Request.Form["other_txt2"]);
var files = Request.Files;
if (files != null || files.Count > 0)
{
string path = "/UserReport/" + DateTime.Now.ToString("yyyy-MM-dd");
HttpPostedFile hfile = files[0];
var fileExt = Path.GetExtension(hfile.FileName);
if (!string.IsNullOrWhiteSpace(fileExt))
{
string localPath = Server.MapPath(path);
if (!Directory.Exists(localPath))
{
Directory.CreateDirectory(localPath);
}
string fileName = DateTime.Now.ToString("yyyyMMddHHssmm");
string newFileName = fileName + fileExt;
string localUrl = Server.MapPath(Path.Combine(path, newFileName));
hfile.SaveAs(localUrl);
file = path + "/" + newFileName; //Path.Combine(path, newFileName);
attfileurl = localUrl;
email.YpFile= attfileurl;
}
}
}
if (true)
{
// 本地写文件
string sb = CreateHtml(email).ToString(); // 文件内容
string[] fujian = new string[2]; // 附件列表
fujian[0] = WriteFile(Server.MapPath("~/Log/") + "药品不良反映、事务汇报表_" + DateTime.Now.ToString("yyyyMMddHHssmm") + ".doc", sb);// 存入本地
//发送邮件
// fujian = null;
fujian[1] = "";
if (email.YpFile != null)
{
if (email.YpFile.Length > 0)
{
fujian[1] = email.YpFile;
}
}
System.Threading.Tasks.Task.Factory.StartNew(() =>
{
MyFunction.SendEmail(CreateHtml(email), fujian);
});
layer = "<script>layer.confirm('提交成功,請期待迴應!', { btn:['確定']}, function() { window.location.href = '/contact.aspx?mid=160'; });</script>";
}
else
{
layer = "<script>layer.confirm('信息提交失。', { btn:['確定']}, function() { window.location.href = '/contact.aspx?mid=160'; });</script>";
}
}
///<summary>
/// 写文件
/// </summary>
///<param name="Path">文件蹊径</param>///<param name="Strings">文件内容</param>
public string WriteFile(string Path, string Strings)
{
if (!System.IO.File.Exists(Path))
{
System.IO.FileStream f = System.IO.File.Create(Path);
f.Close();
}
System.IO.StreamWriter f2 = new System.IO.StreamWriter(Path, true, System.Text.Encoding.GetEncoding("UTF-8"));
f2.WriteLine(Strings);
f2.Close();
f2.Dispose();
return Path;
}
public void SaveStreamToFile(Stream inputStream, string filePath)
{
using (FileStream outputStream = new FileStream(filePath, FileMode.Create))
{
inputStream.CopyTo(outputStream);
}
}
private StringBuilder CreateHtml(NewEmailInfo ninfo)
{
StringBuilder builder = new StringBuilder();
#region 形状信息
builder.AppendLine("<style type=\"text/css\">");
builder.AppendLine("body{font-family: 微软雅黑;}");
builder.AppendLine(@"table {
width: 100%;
border-collapse: collapse;
margin: 0 auto;
}
th,
td {
border: 1px solid #000000;
padding: 8px;
font-size: 12px;
text-align: center;font-family: 微软雅黑;
}
th { background-color: #f2f2f2;}
.hidden-input { display: none;}
.data-head { margin-top: 50px; }
p { margin: 0px;}
.data-head p {
font-weight: 600;
margin: 0px;
font-size: 18px;
}
.table-type,
.table-from {
width: 80%;
margin: 20px auto;
display: flex;
font-size: 18px;
}
.table-type label,
.table-from label {margin-right: 20px;cursor: pointer;white-space: nowrap; }
.table-from .value {flex-grow: 1;}
.table-from .label { white-space: nowrap; }
.data-head .title {background-color: rgb(242, 242, 242); }
.data-info {}
.data-info:nth-child(1) .header { /* border-top: 1px solid #000000 ; */ }
.data-info .header {
text-align: center;
font-size: 14px;
background-color: rgb(189, 214, 238);
}
.data-info td {min-height: 40px;}
.data-info th { text-align: center;}
.data-info .header-title th { font-weight: 500; background-color: #FFFFFF;}
.data-info tr td { min-height: 40px; height: 40px; }
.data-info tr td table td {}
.data-info table td { height: 100px; }
.layui-table-view {
width: 80%;
margin: 0 auto;
border-color: #000000;
}
.layui-table-box { width: 100%; }
.layui-table th {
background-color: #FFFFFF;
border-color: #000000;
text-align: center;
font-size: 12px;
font-weight: 500;
}
.layui-table-cell {
border-color: #000000;
text-align: center;
font-weight: 500;
font-size: 12px;
height: auto;
overflow: visible;
text-overflow: inherit;
white-space: normal;
}
.layui-table-body { border-color: #000000;}
.layui-table {margin: 0 auto; width: 100%;}
.layui-table td { border-color: #000000;font-size: 12px;font-family: 微软雅黑;}
.layui-table-box { border-color: #000000; }
.layui-table-body { border-top: 1px solid #000000; }");
builder.AppendLine("</style>");
#endregion
#region 表头信息
builder.AppendLine("<table class=\"data-head\">");
builder.AppendLine("<tr>");
//builder.AppendLine("<td rowspan = \"2\" width=\"100px\" style=\"text-align: center;\">");
//builder.AppendLine("<img src= \"https://kelun-biotech.com/image/table-logo.png\" alt=\"\">");
//builder.AppendLine("</td>");
builder.AppendLine("<td colspan=\"4\" style=\"text-align: center;\">");
builder.AppendLine("<h3 style='font-size:20px'>个例药品不良反映汇报表</h3>");
builder.AppendLine("</td></tr>");
//builder.AppendLine("<tr>");
//builder.AppendLine("<td class=\"title\" style=\"text-align: left;\"><p>文件编码:</p><p>Document No.:</p></td>");
//builder.AppendLine("<td><div class=\"no\" style=\"text-align: left;\">SOP-60-0001-R01</div></td>");
//builder.AppendLine("<td class=\"title\" style=\"text-align: left;\"><p>版本号:</p><p>Version:</p></td>");
//builder.AppendLine("<td><div class=\"no\" style=\"text-align: left;\"> 1.0.0</div></td></tr>");
builder.AppendLine("</table>");
//// 汇报类型
//builder.AppendLine("<div class=\"table-type\">");
//builder.AppendLine("<label><input type=\"radio\" name=\"reportSource3\" value=\"严沉汇报\">严沉汇报</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"境表汇报\">境表汇报</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"初次汇报\">初次汇报</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"跟踪汇报\">跟踪汇报(最近一次获知功夫:" +
// "<input type=\"text\" placeholder=\"请输入\" style=\"border: none;border-bottom: 1px solid;font-size: 18px;outline: none;\" >)</label></div>");
//// 汇报起源
//builder.AppendLine("<div class=\"table-from\"><div class=\"label\">汇报起源:</div>");
//builder.AppendLine("<div class=\"value\">" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"医疗机构\">医疗机构</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"经营企业\">经营企业</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"幼我\">幼我</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"文件\">文件</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"钻研\">钻研</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"项目\">项目</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"文件\">文件</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"其他\">其他<input type=\"text\" placeholder=\"请输入\" style=\"border: none;border-bottom: 1px solid;font-size: 18px;outline: none;\"></label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"监管机构\">监管机构</label></div></div>");
#endregion
#region 汇报起源信息
builder.AppendLine("<table class=\"data-info\">");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan =\"6\" class=\"header\">汇报起源信息</th></tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th>第一接管人</th>");
builder.AppendLine("<th>联系电话</th>");
builder.AppendLine("<th>Email地址</th>");
builder.AppendLine("<th colspan=\"2\">第一接管人获知功夫</th>");
builder.AppendLine("<th>片区/工号</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style =\"color:red;font-size:14px;\">");
builder.AppendLine("<td>" + email.FirstName + email.LastName + "</td>");
builder.AppendLine("<td>" + email.UserTelPhone + "</td>");
builder.AppendLine("<td>" + email.UserEmaul + "</td>");
builder.AppendLine("<td colspan=\"2\">" + email.userGetDate + "</td>");
builder.AppendLine("<td>" + email.UserNo + "</td>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th>汇报者姓名</th>");
builder.AppendLine("<th>汇报者电话</th>");
builder.AppendLine("<th>汇报者Email</th>");
builder.AppendLine("<th>职业</th>");
builder.AppendLine("<th>单元</th>");
builder.AppendLine("<th>汇报者是否接受随访</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style=\"color: red;font-size:14px;\" >");
builder.AppendLine("<td>" + email.BgFirstName + email.BgLastName + "</td>");
builder.AppendLine("<td>" + email.BgTelPhone + "</td>");
builder.AppendLine("<td>" + email.BgEmail + "</td>");
if (email.BgJobType_Ccareer.Equals("yiliaobaojian"))
{
email.BgJobType_Ccareer = "医疗保健专业人员(" + email.BgJobTypeName + ")";
}
if (email.BgJobType_Ccareer.Equals("其他"))
{
email.BgJobType_Ccareer = email.BgJobType_Ccareer + "(" + email.BgOtherJob + ")";
}
builder.AppendLine("<td>" + email.BgJobType_Ccareer + "</td>");
builder.AppendLine("<td>" + email.BgUserCompany + "</td>");
builder.AppendLine("<td>" + email.FollowUp + "</td>");
builder.AppendLine("</tr></tbody></table>");
#endregion
#region 患者信息
builder.AppendLine("<table class=\"data-info\" >");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan=\"8\" class=\"header\" style=\"border-top: none;\">患者信息</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th width=\"80\">姓名</th>");
builder.AppendLine("<th width=\"80\">性别</th>");
builder.AppendLine("<th width=\"80\">春秋</th>");
builder.AppendLine("<th width=\"80\">诞生日期</th>");
builder.AppendLine("<th width=\"80\">民族</th>");
builder.AppendLine("<th width=\"80\">体沉(kg)</th>");
builder.AppendLine("<th width=\"80\">身高(cm)</th>");
builder.AppendLine("<th>原患疾病</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style=\"color:red;font-size:14px;\" >");
builder.AppendLine("<td>" + email.HzXing + email.HzMing + "</td>");
builder.AppendLine("<td>" + email.HzSex + "</td>");
builder.AppendLine("<td>" + email.HzAge + "</td>");
builder.AppendLine("<td>" + email.HzYear + "</td>");
builder.AppendLine("<td>" + email.HzMinZu + "</td>");
builder.AppendLine("<td>" + email.HzKg + "</td>");
builder.AppendLine("<td>" + email.HzCm + "</td>");
builder.AppendLine("<td>" + email.HzHistory + "</td>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\" style=\"color:red;font-size:14px;font-weight:600;\">");
builder.AppendLine("<th style=\"color: #000000;\" >吸烟史</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzSmoking + "");
builder.AppendLine("</th>");
builder.AppendLine("<th style=\"color: #000000;\" >饮酒史</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzTipple + "");
builder.AppendLine("</th>");
builder.AppendLine("<th style=\"color: #000000;\" >是否怀胎</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzPregnancy + "");
builder.AppendLine("</th>");
builder.AppendLine("</tr></tbody></table>");
#endregion
#region 药品信息
/*药品信息头部*/
builder.AppendLine("<table class=\"data-info\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-collapse: collapse;\" >");
builder.AppendLine("<tbody>");
builder.AppendLine("<th colspan=\"9\" class=\"header\" style=\"border-top: none;\">药品信息</th></tr>");
builder.AppendLine("</tbody>");
builder.AppendLine("</table>");
/*药品信息头部*/
/*药品信息正文*/
builder.AppendLine("<table class=\"layui-table\" id=\"ID-table-demo-theads-1\">");
builder.AppendLine("<thead><tr>");
builder.AppendLine("<th lay-data=\"{field:'username',width: 80}\" rowspan=\"2\">疑惑/并用药品</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">核准文号</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">通用名称</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">产品批号</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">上市许可持有人</th>");
builder.AppendLine("<th lay-data=\"{align:'center'}\" colspan=\"3\">用法用量</th>");
builder.AppendLine("<th lay-data=\"{align:'center'}\" colspan=\"2\">用药日期</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">医治疾病</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">对药品采取的措施</th>");
builder.AppendLine("</tr><tr>");
builder.AppendLine("<th lay-data=\"{field:'province', width: 100}\">单次剂量</th>");
builder.AppendLine("<th lay-data=\"{field:'city', width: 100}\">给药频次</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">给药蹊径</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">起</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">止</th>");
builder.AppendLine("</tr></thead>");
builder.AppendLine("<tbody style='color:#ff0000'>");
// 疑惑用药
// 循环多行
for (int i = 0; i < email.YpPNumber.Length; i++)
{
if (i == 0)
{
builder.AppendLine("<tr>");
builder.AppendLine("<td style='color:#000' rowspan=\"" + email.YpPNumber.Length + "\">疑惑药品</td>");
}
else
{
builder.AppendLine("<tr>");
}
builder.AppendLine("<td>" + email.YpPNumber[i] + "</td>");
builder.AppendLine("<td>" + email.YpName[i] + "</td>");
builder.AppendLine("<td>" + email.YpCNumber[i] + "</td>");
if (email.IsBotai[i].Equals("否")) // 其他公司
{
builder.AppendLine("<td>" + email.YpCyUser[i] + "</td>");
}
else
{
builder.AppendLine("<td>" + email.YpCyUser_select[i] + "</td>");
}
builder.AppendLine("<td>" + email.YpDCFYL[i] + "</td>");
builder.AppendLine("<td>" + email.YpPC[i] + "</td>");
builder.AppendLine("<td>" + email.YpForm[i] + "</td>");
builder.AppendLine("<td>" + email.YpQYDataYear1[i] + "</td>");
builder.AppendLine("<td>" + email.YpQYDataYear2[i] + "</td>");
builder.AppendLine("<td>" + email.YpZLJB[i] + "</td>");
try
{
builder.AppendLine("<td>" + email.Ypcuoshi[i] + "</td>");
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
builder.AppendLine("</tr>");
}
/*并用药品*/
var hbStr = "";
for (int i = 0; i < email.YphbYongyao.Length; i++)
{
if (i == 0)
{
builder.AppendLine("<tr>");
builder.AppendLine("<td style='color:#000' rowspan='" + email.YphbYongyao.Length + "'>并用药品</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td>" + email.YphbYongyao[i] + "</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("</tr>");
}
else
{
builder.AppendLine("<tr>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td>" + email.YphbYongyao[i] + "</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("</tr>");
}
}
//builder.AppendLine("<td colspan=\"11\">"+ hbStr + "</td>"); hbStr += email.YphbYongyao[i] + ",";
builder.AppendLine("</tbody></table>");
/*药品信息正文*/
#endregion
#region 不良反映
builder.AppendLine("<table class=\"data-info\">");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan=\"7\" class=\"header\" style=\"border-top:none;\">不良反映</th></tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th width=\"120\">不良反映术语</th>");
builder.AppendLine("<th>产生功夫</th>");
builder.AppendLine("<th>实现功夫</th>");
builder.AppendLine("<th>不良反映了局</th>");
builder.AppendLine("<th>是否严沉</th>");
builder.AppendLine("<th>严沉性尺度</th>");
builder.AppendLine("<th>汇报者评价</th></tr>");
// 循环多行
//this.Response.Write(email.AdverseEvent.Length+"<br/>");
//this.Response.Write(email.Adverse_Result.Length);
//this.Response.End();
for (int i = 0; i < email.AdverseEvent.Length; i++)
{
builder.AppendLine("<tr style=\"color: red;\">");
builder.AppendLine("<td>" + email.AdverseEvent[i] + "</td>");
builder.AppendLine("<td>" + email.AdverseEventOfDateYear1[i] + "</td>");
builder.AppendLine("<td>" + email.AdverseEventOfDateYear2[i] + "</td>");
// 没选值无法获取下标 报错获取处置
try
{
if (email.Adverse_Result[i] != null)
{
if (email.Adverse_Result[i].Equals("有后遗症"))
{
builder.AppendLine("<td>" + email.Adverse_Result[i] + "(" + email.Sequela[i] + ")</td>");
}
else
{
builder.AppendLine("<td>" + email.Adverse_Result[i] + "</td>");
}
}
}
catch (Exception)
{
// 没选择就是空
builder.AppendLine("<td></td>");
}
try
{
if (email.Serious[i] == null)
{
builder.AppendLine("<td></td>");
}
else
{
builder.AppendLine("<td>" + email.Serious[i] + "</td>");
}
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
try
{
//是否严沉的了局,选择是 必要纪录 对应了局
if (email.Serious[i].Equals("是"))
{
builder.AppendLine("<td>" + email.Xiangguan[i] + "</td>");
}
else
{ // 选择不然无内容
builder.AppendLine("<td></td>");
}
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
try
{
builder.AppendLine("<td>" + email.Xiangguanxing[i] + "</td></tr>");
}
catch (Exception)
{
builder.AppendLine("<td></td></tr>");
}
}
builder.AppendLine("<tr><td colspan=\"7\" style=\"text-align:left;\">不良反映过程描述(蕴含产生场所、症状、体征、临床检验等)及处置情况(可附页):<span style='word-wrap:break-word;word-break:break-all;color:#ff0000'>" + email.Adverse_Content[0] + "</span></td></tr>");
builder.AppendLine("<tr>");
builder.AppendLine("<td colspan=\"7\" style=\"text-align:left;\">初次获知功夫: 企业病例编码: <br/>受理人: 受理日期: 是否必要随访/调查/采取应急处置措施:</td></tr>");
builder.AppendLine("<tr><td style=\"text-align:center;letter-spacing:5px;background-color: rgb(189, 214, 238);font-size: 12px;\">备注:</td>");
builder.AppendLine("<td colspan=\"6\" style=\"text-align: left;\">");
builder.AppendLine("<p style=\"font-size:12px;line-height:30px;\">其他需注明的情况:</p>");
builder.AppendLine("<p style=\"font-size:12px;line-height: 30px;\">患者是否对任何药物、食品或其他产品过敏:</p>");
builder.AppendLine("<p style='color:#ff0000'>" + email.Other_txt1 + "</p><p style=\"font-size:12px;line-height: 30px;\">其他诊断疾病/病史/慢性健全情况:</p><p style='color:#ff0000'>" + email.Other_txt2 + "</p></td></tr></tbody></table>");
#endregion
#region 宣告部门
//builder.AppendLine("<table class=\"data-info\" style=\"margin-top:60px;\" style=\"border-top: none;\">");
//builder.AppendLine("<tbody>");
//builder.AppendLine("<tr class=\"header-title\">");
//builder.AppendLine("<th width=\"200\" style=\"background-color: rgb(242, 242, 242);\">");
//builder.AppendLine("<p>宣告部门</p><p>Distribute Department</p></th>");
//builder.AppendLine("<th colspan=\"3\" style=\"text-align: left;\">QA分部2024.05.13</th>");
//builder.AppendLine("<th width=\"150\" style=\"background-color: rgb(242, 242, 242);text-align: center;\">");
//builder.AppendLine("<p>页码</p>");
//builder.AppendLine("<p>Page</p>");
//builder.AppendLine("</th><th>1 / 1</th></tr>");
//builder.AppendLine("<tr>");
//builder.AppendLine("<td style=\"background-color:rgb(242, 242, 242); text-align:center;\">");
//builder.AppendLine("<p>打印接管人</p><p>Received by</p></td>");
//builder.AppendLine("<td style=\"text-align: center;\"> N / A </td >");
//builder.AppendLine("<td width=\"150\" style=\"background-color: rgb(242, 242, 242); text-align: center;\" >");
//builder.AppendLine("<p>打印功夫</p>");
//builder.AppendLine("<p>Print date</p></td>");
//builder.AppendLine("<td style=\"text-align:center; \"> N / A </td>");
//builder.AppendLine("<td style=\"background-color: rgb(242, 242, 242); text-align:center; \">");
//builder.AppendLine("<p>打印分发号</p><p>Distribution No.</p></td>");
//builder.AppendLine("<td style=\"text-align:center;\"> N / A </td></tr></tbody></table>");
#endregion
return builder;
}
}
#line default
#line hidden