SettlementChecklist.cs 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using PTMedicalInsurance.Helper;
  11. using PTMedicalInsurance.Common;
  12. using Newtonsoft.Json.Linq;
  13. using PTMedicalInsurance.FormSetter;
  14. using PTMedicalInsurance.Variables;
  15. using FastReport;
  16. using Newtonsoft.Json;
  17. using System.Threading;
  18. using FastReportFrom;
  19. using PTMedicalInsurance.Business;
  20. using FastReportFunction = FastReport.FastReportFunction;
  21. using System.IO;
  22. using FastReport.Export.Dbf;
  23. using Sunny.UI;
  24. using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
  25. using System.Drawing.Drawing2D;
  26. using FastReport.Editor;
  27. using PTMedicalInsurance.Entity;
  28. namespace PTMedicalInsurance.Forms
  29. {
  30. public partial class SettlementChecklist : Form
  31. {
  32. private int hospitalDr;
  33. private int interfaceDr;
  34. private string hospitalNO;
  35. private string interfaceNO;
  36. private string hospitalName;
  37. private string hospitalAreaCode;
  38. private bool disposed = false;
  39. private HisIrisServices hIS = new HisIrisServices();
  40. private MIIrisServices mIS = new MIIrisServices();
  41. Thread thread_test;
  42. private InvokeHelper invoker = new InvokeHelper();
  43. public SettlementChecklist()
  44. {
  45. InitializeComponent();
  46. hospitalDr = Global.inf.hospitalDr;
  47. hospitalNO = Global.inf.hospitalNO;
  48. hospitalName = Global.inf.hospitalName;
  49. hospitalAreaCode = Global.inf.areaCode;
  50. interfaceDr = Global.inf.interfaceDr;
  51. }
  52. public SettlementChecklist(JObject joParam)
  53. {
  54. InitializeComponent();
  55. hospitalDr = Global.inf.hospitalDr;
  56. hospitalNO = Global.inf.hospitalNO;
  57. hospitalName = Global.inf.hospitalName;
  58. hospitalAreaCode = Global.inf.areaCode;
  59. if (joParam == null) return;
  60. string setl_id = JsonHelper.getDestValue(joParam, "setl_id");
  61. if (setl_id == "")
  62. {
  63. MessageBox.Show("根据传入的结算编号为查询到相关信息,请手动输入查询!");
  64. return;
  65. }
  66. string sqlStr = "SELECT * FROM BS_MedInsuSettlement WHERE Hospital_Dr=" + Global.inf.hospitalDr;
  67. sqlStr = sqlStr + " and SettlementID='" + setl_id + "'";
  68. JObject joSqlstr = new JObject();
  69. joSqlstr.Add("sqlStr", sqlStr);
  70. JArray jaParam = new JArray();
  71. jaParam.Add(joSqlstr);
  72. JObject joSettlQuery = new JObject();
  73. joSettlQuery.Add("params", jaParam);
  74. joSettlQuery.Add("code", "09010059");
  75. InvokeHelper invoker = new InvokeHelper();
  76. JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询结算信息");
  77. DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
  78. dgvSettlRecord.DataSource = dt;
  79. }
  80. public void Dispose()
  81. {
  82. Dispose1(true);
  83. GC.SuppressFinalize(this);
  84. }
  85. protected virtual void Dispose1(bool disposing)
  86. {
  87. if (thread_test == null) return;
  88. if (disposed == false)
  89. {
  90. if (disposing == true)
  91. {
  92. Thread.Sleep(100);
  93. Global.writeLog("Main - aborting my thread.");
  94. thread_test.Abort();//终止线程myThread
  95. thread_test.Join();//等待线程myThread结束
  96. Global.writeLog("Main - ending.");
  97. }
  98. //释放托管资源的代码
  99. }
  100. disposed = true;
  101. }
  102. private void rbgDirecType_ValueChanged(object sender, int index, string text)
  103. {
  104. }
  105. private void btnQuery_Click(object sender, EventArgs e)
  106. {
  107. }
  108. private void btnQuery_Click_1(object sender, EventArgs e)
  109. {
  110. string sqlStr = " SELECT * FROM BS_MedInsuSettlement WHERE Hospital_Dr=" + hospitalDr;
  111. sqlStr = sqlStr + " and OccurTime>'" + dpST.Text + "'";
  112. sqlStr = sqlStr + " and OccurTime<'" + dpED.Text + "'";
  113. if (tbName.Text != "")
  114. {
  115. sqlStr = sqlStr + " and PatientName='" + tbName.Text + "'";
  116. }
  117. if (tbPatSettlID.Text != "")
  118. {
  119. sqlStr = sqlStr + " and SettlementID='" + tbPatSettlID.Text + "'";
  120. }
  121. if (tbHisNO.Text != "")
  122. {
  123. sqlStr = sqlStr + " and Adm_Dr='" + tbHisNO.Text + "'";
  124. }
  125. if (cbxInterface.Text != "")
  126. {
  127. sqlStr = sqlStr + " and Interface_Dr=" + Global.inf.interfaceDr + "";
  128. }
  129. if (rbgAdmType.SelectedIndex == 1)
  130. {
  131. sqlStr = sqlStr + " and AdmType=2";
  132. }
  133. if (rbgAdmType.SelectedIndex == 2)
  134. {
  135. sqlStr = sqlStr + " and AdmType=1";
  136. }
  137. if (rbgBillType.SelectedIndex == 1)
  138. {
  139. sqlStr = sqlStr + " and BillType=1 and ValidFlag=1 ";
  140. }
  141. if (rbgBillType.SelectedIndex == 2)
  142. {
  143. sqlStr = sqlStr + " and BillType=-1 and ValidFlag=0 ";
  144. }
  145. JObject joSqlstr = new JObject();
  146. joSqlstr.Add("sqlStr", sqlStr);
  147. JArray jaParam = new JArray();
  148. jaParam.Add(joSqlstr);
  149. JObject joSettlQuery = new JObject();
  150. joSettlQuery.Add("params", jaParam);
  151. joSettlQuery.Add("code", "09010059");
  152. JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询结算信息");
  153. DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
  154. dgvSettlRecord.DataSource = dt;
  155. }
  156. private void SettlementChecklist_Load(object sender, EventArgs e)
  157. {
  158. dpST.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
  159. dpED.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
  160. ComboxSetter cbxSetter = new ComboxSetter();
  161. cbxSetter.setCbxInterfaceDataSource(cbxInterface);
  162. GridViewSetter grdSetter = new GridViewSetter();
  163. grdSetter.SetHeaderTextOfSettlList(dgvSettlRecord);
  164. rbgAdmType.SelectedIndex = 0;
  165. rbgBillType.SelectedIndex = 1;
  166. btnDesign.Visible = true;
  167. cbxInterface.SelectedValueChanged += new EventHandler(cbxInterface_SelectedValueChanged);
  168. }
  169. private void cbxInterface_SelectedValueChanged(object sender, EventArgs e)
  170. {
  171. DataTable dt = (DataTable)cbxInterface.DataSource;
  172. int i = cbxInterface.SelectedIndex;
  173. //赋值
  174. hospitalNO = dt.Rows[i]["HospitalNO"].ToString();
  175. //MessageBox.Show(dt.Rows[i]["HospitalDr"].ToString());
  176. //MessageBox.Show(dt.Rows[i]["HospitalDr"].ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
  177. hospitalDr = int.Parse(dt.Rows[i]["HospitalDr"].ToString());
  178. interfaceNO = dt.Rows[i]["InterfaceNO"].ToString();
  179. interfaceDr = int.Parse(dt.Rows[i]["ID"].ToString());
  180. hospitalAreaCode = dt.Rows[i]["AreaCode"].ToString();
  181. //Global.inf.centerURL = dt.Rows[i]["CenterURL"].ToString();
  182. //Global.inf.businessDllName = dt.Rows[i]["DLLName"].ToString();
  183. //Global.inf.patientAreaCode = dt.Rows[i]["AreaCode"].ToString();
  184. }
  185. private JObject getPatCheckList()
  186. {
  187. try
  188. {
  189. int i = dgvSettlRecord.CurrentRow.Index;
  190. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  191. JObject joSettel = new JObject();
  192. joSettel.Add("HospitalDr", Global.inf.hospitalDr);
  193. joSettel.Add("interfaceDr", Global.inf.interfaceDr);
  194. joSettel.Add("admID", dt.Rows[i]["AdmID"].ToString());
  195. joSettel.Add("SettlementID", dt.Rows[i]["SettlementID"].ToString());
  196. joSettel.Add("ValidFlag", dt.Rows[i]["ValidFlag"].ToString());
  197. JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010066", joSettel).ToString(), "获取结算单信息");
  198. return joRtn;
  199. }
  200. catch (Exception ex)
  201. {
  202. JObject joRtn = new JObject();
  203. joRtn.Add("errorCode", -1);
  204. joRtn.Add("errorMessage", ex.Message);
  205. return joRtn;
  206. }
  207. }
  208. private void uiPanel1_Click(object sender, EventArgs e)
  209. {
  210. }
  211. [STAThread]
  212. public void design()
  213. {
  214. //try
  215. //{
  216. // string chineseSimpleFrl = Global.curEvt.path + @"\Chinese (Simplified).frl";
  217. // FastReport.Utils.Res.LoadLocale(chineseSimpleFrl);
  218. // JObject joSettleCheckList = getPatCheckList();
  219. // string errMsg;
  220. // if (JsonHelper.parseIrisRtnValue(joSettleCheckList, out errMsg) != 0)
  221. // {
  222. // MessageBox.Show("查询结算信息异常:" + errMsg);
  223. // return;
  224. // }
  225. // Report report = new Report();
  226. // try
  227. // {
  228. // var json = JsonConvert.DeserializeObject<Root>(getPatCheckList().ToString());
  229. // report.RegisterData(json.result.data.classification, "classification");
  230. // report.RegisterData(json.result.data.settlement, "settlement");
  231. // report.RegisterData(json.result.data.reginfo, "reginfo");
  232. // report.RegisterData(json.result.data.patinsuinfo, "patinsuinfo");
  233. // }
  234. // catch (Exception ex)
  235. // {
  236. // MessageBox.Show(ex.Message);
  237. // return;
  238. // }
  239. // report.Load(Global.curEvt.path + "\\frx\\河南郑州结算单.frx");
  240. // PrintDesign pf = new PrintDesign();
  241. // pf.designerControl1.Report = report;
  242. // report.Design();
  243. // pf.WindowState = FormWindowState.Maximized;
  244. // pf.ShowDialog();
  245. //}
  246. //catch (Exception ex)
  247. //{
  248. // MessageBox.Show(ex.Message);
  249. //}
  250. }
  251. [STAThread]
  252. private void print()
  253. {
  254. //string chineseSimpleFrl = Global.curEvt.path + @"\Chinese (Simplified).frl";
  255. //FastReport.Utils.Res.LoadLocale(chineseSimpleFrl);
  256. //JObject joSettleCheckList = getPatCheckList();
  257. //string errMsg;
  258. //if (JsonHelper.parseIrisRtnValue(joSettleCheckList, out errMsg) != 0)
  259. //{
  260. // MessageBox.Show("查询结算信息异常:" + errMsg);
  261. // return;
  262. //}
  263. //Report report = new Report();
  264. //try
  265. //{
  266. // var json = JsonConvert.DeserializeObject<Root>(getPatCheckList().ToString());
  267. // report.RegisterData(json.result.data.classification, "classification");
  268. // report.RegisterData(json.result.data.settlement, "settlement");
  269. // report.RegisterData(json.result.data.reginfo, "reginfo");
  270. // report.RegisterData(json.result.data.patinsuinfo, "patinsuinfo");
  271. //}
  272. //catch (Exception ex)
  273. //{
  274. // MessageBox.Show(ex.Message);
  275. // return;
  276. //}
  277. ////report.Design();
  278. //report.Load(Global.curEvt.path + "\\frx\\河南郑州结算单.frx");
  279. //this.ShowInTaskbar = true;
  280. //PrintPreview pf = new PrintPreview();
  281. //report.Preview = pf.previewControl1;
  282. //report.Show();
  283. //pf.WindowState = FormWindowState.Maximized;
  284. //pf.ShowDialog();
  285. try
  286. {
  287. int i = dgvSettlRecord.CurrentRow.Index;
  288. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  289. string AdmID = dt.Rows[i]["AdmID"].ToString();
  290. string SettlementID = dt.Rows[i]["SettlementID"].ToString();
  291. string ValidFlag = dt.Rows[i]["ValidFlag"].ToString();
  292. string MdtrtID = dt.Rows[i]["MdtrtID"].ToString();
  293. string BillType = dt.Rows[i]["BillType"].ToString();
  294. JObject joRtn = GetFastReportParams("", AdmID, MdtrtID, SettlementID, ValidFlag, BillType);
  295. if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
  296. {
  297. MessageBox.Show("获取FastReport入参失败:" + errMsg);
  298. return;
  299. }
  300. string sFastReportParam = JsonHelper.getDestValue(joRtn, "result");
  301. if (FastReportPrint(sFastReportParam, out errMsg) != 0)
  302. {
  303. MessageBox.Show("调用FastReport打印失败!" + errMsg);
  304. return;
  305. }
  306. }
  307. catch (Exception ex)
  308. {
  309. MessageBox.Show(ex.Message);
  310. return;
  311. }
  312. }
  313. public int FastReportPrint(string InParams, out string OutMsg)
  314. {
  315. Global.writeLog("调用FastReport入参:" + InParams);
  316. try
  317. {
  318. #region【调用正版FastReport打印】
  319. FastReportFrom.FastReportDll FrDll = new FastReportFrom.FastReportDll();
  320. string sRtnFr = FrDll.FastReport(InParams);
  321. JObject joRetObj = JObject.Parse(sRtnFr);
  322. if (JsonHelper.parseIrisRtnValue(joRetObj, out string errMsg) != 0)
  323. {
  324. OutMsg = "调用FastReport打印失败!" + errMsg;
  325. return -1;
  326. }
  327. else
  328. {
  329. OutMsg = "";
  330. return 0;
  331. }
  332. #endregion
  333. }
  334. catch (Exception ex)
  335. {
  336. OutMsg = "调用FastReport打印失败!" + ex.Message;
  337. return -1;
  338. }
  339. }
  340. public JObject GetFastReportParams(string designFlag, string admID, string MdtrtID, string settlementID, string validFlag, string BillType)
  341. {
  342. try
  343. {
  344. if (designFlag == "") { designFlag = "N"; }
  345. #region【获取HIS医保结算信息】
  346. JObject joSettel = new JObject();
  347. joSettel.Add("HospitalDr", Global.inf.hospitalDr);
  348. joSettel.Add("interfaceDr", Global.inf.interfaceDr);
  349. joSettel.Add("admID", admID);
  350. joSettel.Add("SettlementID", settlementID);
  351. joSettel.Add("ValidFlag", validFlag);
  352. joSettel.Add("BillType", BillType);
  353. joSettel.Add("MdtrtID", MdtrtID);
  354. JObject joRtnSettle = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010066", joSettel).ToString(), "获取结算单信息");
  355. if (JsonHelper.parseIrisRtnValue(joRtnSettle, out string errMsg) != 0)
  356. {
  357. JObject joRtnSet = new JObject();
  358. joRtnSet.Add("errorCode", -1);
  359. joRtnSet.Add("errorMessage", errMsg);
  360. joRtnSet.Add("result", "");
  361. return joRtnSet;
  362. }
  363. #endregion
  364. #region【获取住院号】
  365. JObject joTmp = new JObject();
  366. joTmp.Add("admID", joRtnSettle["result"]["data"]["settlement"][0]["AdmID"]);
  367. joTmp.Add("psn_no", joRtnSettle["result"]["data"]["settlement"][0]["PersonnelNO"]);
  368. //JObject joRtn = invoker.invokeHISService(JsonHelper.setIrisInpar("05110001", joTmp).ToString(), "获取诊断信息");
  369. JObject joRtnDiag = invoker.invokeHISService(JsonHelper.setIrisInpar("05110014", joTmp).ToString(), "获取诊断信息");
  370. string medrcdno = "";
  371. if (JsonHelper.parseIrisRtnValue(joRtnSettle, out errMsg) == 0)
  372. {
  373. medrcdno = joRtnDiag["mdtrtinfo"]["medrcdno"].ToString();
  374. }
  375. #endregion
  376. #region【数据转换】
  377. if (joRtnSettle["result"]["data"]["settlement"][0]["Gender"].ToString() == "1")
  378. {
  379. joRtnSettle["result"]["data"]["settlement"][0]["Gender"] = "男";
  380. }
  381. else
  382. {
  383. joRtnSettle["result"]["data"]["settlement"][0]["Gender"] = "女";
  384. }
  385. DateTime startDate = (DateTime)joRtnSettle["result"]["data"]["reginfo"][0]["RegDate"];
  386. DateTime endDate = (DateTime)joRtnSettle["result"]["data"]["settlement"][0]["SettlementTime"];
  387. int diffInDays = (int)(endDate - startDate).TotalDays;
  388. if (diffInDays == 0)
  389. {
  390. diffInDays = 1;
  391. }
  392. joRtnSettle["result"]["data"]["settlement"][0]["HospitalizationsDays"] = diffInDays;
  393. string str = joRtnSettle["result"]["data"]["patinsuinfo"][0]["Age"].ToString();
  394. if (str.Contains("."))
  395. {
  396. joRtnSettle["result"]["data"]["patinsuinfo"][0]["Age"] = str.Split('.')[0] + "岁";
  397. }
  398. else
  399. {
  400. joRtnSettle["result"]["data"]["patinsuinfo"][0]["Age"] = str + "岁";
  401. }
  402. #endregion
  403. #region【组织FastReport调用入参】
  404. JArray jachargeItemLvFee = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.chargeItemLvFee"));
  405. JArray jaClassification = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.classification"));
  406. JArray jaSettlement = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement"));
  407. JArray jaReginfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo"));
  408. JArray japatinsuinfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.patinsuinfo"));
  409. //转换金额大写
  410. string Sumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].Sumamt").ToString());
  411. string HealthInsurancePay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HealthInsurancePay").ToString());
  412. string ActualPayDeductible = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].ActualPayDeductible").ToString());
  413. string PersonCashPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PersonCashPay").ToString());
  414. string AccountPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountPaySumamt").ToString());
  415. string FundPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].FundPaySumamt").ToString());
  416. string LargeExpensesSupplementPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].LargeExpensesSupplementPay").ToString());
  417. string SeriousIllnessPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].SeriousIllnessPay").ToString());
  418. string CivilserviceAllowancePay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].CivilserviceAllowancePay").ToString());
  419. string MedicalAssistPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].MedicalAssistPay").ToString());
  420. string OtherPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].OtherPay").ToString());
  421. string HospitalPartAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HospitalPartAmount").ToString());
  422. string AccountMutualAidAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountMutualAidAmount").ToString());
  423. string InPolicyRangeAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].InPolicyRangeAmount").ToString());
  424. //退费前卡余额
  425. decimal BalanceBefore = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].Balance")) - Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountPaySumamt")) + Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountMutualAidAmount"));
  426. //退费撤销结算单负数显示
  427. decimal LSumamt = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].Sumamt")) * -1;
  428. decimal LHealthInsurancePay = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HealthInsurancePay")) * -1;
  429. decimal LAccountPaySumamt = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountPaySumamt")) * -1;
  430. decimal LFundPaySumamt = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].FundPaySumamt")) * -1;
  431. decimal LCivilserviceAllowancePay = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].CivilserviceAllowancePay")) * -1;
  432. decimal LMedicalAssistPay = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].MedicalAssistPay")) * -1;
  433. decimal LPersonCashPay = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PersonCashPay")) * -1;
  434. decimal LAccountMutualAidAmount = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountMutualAidAmount")) * -1;
  435. decimal LBlZf = Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PersonPaySumamt")) - Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].OwnPayAmount")) - Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PreSelfPayAmount")) - Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].OverLimitAmount")) - Convert.ToDecimal(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].ActualPayDeductible"));
  436. //string BeginDate = JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo[0].RegDate").ToString();
  437. //string EndDate = JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HISDischargeTime").ToString();
  438. //string InHosDays = FastReportFunction.DateDiff(Convert.ToDateTime(BeginDate), Convert.ToDateTime(EndDate));
  439. JObject jaAmountChiness = new JObject();
  440. jaAmountChiness.Add("Sumamt", Sumamt);
  441. jaAmountChiness.Add("HealthInsurancePay", HealthInsurancePay);
  442. jaAmountChiness.Add("ActualPayDeductible", ActualPayDeductible);
  443. jaAmountChiness.Add("PersonCashPay", PersonCashPay);
  444. jaAmountChiness.Add("AccountPaySumamt", AccountPaySumamt);
  445. jaAmountChiness.Add("FundPaySumamt", FundPaySumamt);
  446. jaAmountChiness.Add("LargeExpensesSupplementPay", LargeExpensesSupplementPay);
  447. jaAmountChiness.Add("SeriousIllnessPay", SeriousIllnessPay);
  448. jaAmountChiness.Add("CivilserviceAllowancePay", CivilserviceAllowancePay);
  449. jaAmountChiness.Add("MedicalAssistPay", MedicalAssistPay);
  450. jaAmountChiness.Add("OtherPay", OtherPay);
  451. jaAmountChiness.Add("HospitalPartAmount", HospitalPartAmount);
  452. jaAmountChiness.Add("AccountMutualAidAmount", AccountMutualAidAmount);
  453. jaAmountChiness.Add("InPolicyRangeAmount", InPolicyRangeAmount); //合规费用
  454. jaAmountChiness.Add("SettlOpter", Global.user.name);
  455. jaAmountChiness.Add("medrcdno", medrcdno);
  456. //其他自定义处理字段
  457. jaAmountChiness.Add("BalanceBefore", BalanceBefore);//结算前卡余额
  458. jaAmountChiness.Add("LSumamt", LSumamt);
  459. jaAmountChiness.Add("LHealthInsurancePay", LHealthInsurancePay);
  460. jaAmountChiness.Add("LAccountPaySumamt", LAccountPaySumamt);
  461. jaAmountChiness.Add("LFundPaySumamt", LFundPaySumamt);
  462. jaAmountChiness.Add("LCivilserviceAllowancePay", LCivilserviceAllowancePay);
  463. jaAmountChiness.Add("LMedicalAssistPay", LMedicalAssistPay);
  464. jaAmountChiness.Add("LPersonCashPay", LPersonCashPay);
  465. jaAmountChiness.Add("LAccountMutualAidAmount", LAccountMutualAidAmount);
  466. jaAmountChiness.Add("LBlZf", LBlZf);
  467. JArray jachinessParams = new JArray();
  468. jachinessParams.Add(jaAmountChiness);
  469. JObject joDataResult = new JObject();
  470. joDataResult.Add("SettlementInfo", jaSettlement);
  471. joDataResult.Add("ChargeItemLvFee", jachargeItemLvFee);
  472. joDataResult.Add("ClassificationInfo", jaClassification);
  473. joDataResult.Add("RegInfo", jaReginfo);
  474. joDataResult.Add("Patinsuinfo", japatinsuinfo);
  475. joDataResult.Add("ChinessSummat", jachinessParams);
  476. #region【门诊撤销结算单打印需要体现费用信息】
  477. String outParam;
  478. JObject joRtnRis = new JObject();
  479. JObject joHisFee = new JObject();
  480. if (Global.pat.admType == 1)
  481. {
  482. Global.pat.adm_Dr = int.Parse(joRtnSettle["result"]["data"]["settlement"][0]["AdmID"].ToString());
  483. Global.pat.billID = "";
  484. Global.pat.recordID = joRtnSettle["result"]["data"]["settlement"][0]["RecordID"].ToString();
  485. if (hIS.getHisFee(Global.pat, out outParam) != 0)
  486. {
  487. JObject joRtnSet = new JObject();
  488. joRtnSet.Add("errorCode", -1);
  489. joRtnSet.Add("errorMessage", "获取HIS费用失败");
  490. joRtnSet.Add("result", "");
  491. return joRtnSet;
  492. }
  493. else
  494. {
  495. joRtnRis = JObject.Parse(outParam);
  496. }
  497. joHisFee = JObject.Parse(outParam);
  498. if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
  499. {
  500. JObject joRtnSet = new JObject();
  501. joRtnSet.Add("errorCode", -1);
  502. joRtnSet.Add("errorMessage", "医保平台转换费用失败");
  503. joRtnSet.Add("result", "");
  504. return joRtnSet;
  505. }
  506. joDataResult.Add("Feeinfo", JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data")));
  507. }
  508. #endregion【门诊撤销结算单打印需要体现费用信息】
  509. JObject joParams = new JObject();
  510. if (Global.pat.admType == 1)
  511. {
  512. joParams.Add("fastReportCode", "SP14"); //这个要从表取值
  513. }
  514. else
  515. {
  516. joParams.Add("fastReportCode", "SP11"); //湖北普瑞门诊结算单撤销结算单从SP14打印
  517. }
  518. joParams.Add("hospID", Global.inf.hisHospitalDr.ToString());
  519. joParams.Add("printCode", Global.inf.interfaceDr.ToString());
  520. joParams.Add("templateID", "");
  521. JArray jaParams = new JArray();
  522. jaParams.Add(joParams);
  523. JObject joReportParams = new JObject();
  524. joReportParams.Add("params", jaParams);
  525. joReportParams.Add("code", "01040306");
  526. JObject joParam = new JObject();
  527. joParam.Add("designFlag", designFlag);
  528. joParam.Add("logFlag", "N");
  529. joParam.Add("dataParams", "");
  530. joParam.Add("pdfName", "");
  531. joParam.Add("reportparams", joReportParams);
  532. joParam.Add("dataResult", joDataResult);
  533. JObject joDataURL = new JObject();
  534. joDataURL.Add("dataIP", Global.hisConfig.ip);
  535. joDataURL.Add("urlAddress", Global.hisConfig.url);
  536. joDataURL.Add("authorization", Global.hisConfig.authorization);
  537. joParam.Add("dataURL", joDataURL);
  538. JArray jaParam = new JArray();
  539. jaParam.Add(joParam);
  540. JObject joInparam = new JObject();
  541. joInparam.Add("params", JArray.FromObject(jaParam));
  542. joInparam.Add("session", Global.curEvt.jaSession);
  543. #endregion
  544. JObject joRtn = new JObject();
  545. joRtn.Add("errorCode", 0);
  546. joRtn.Add("errorMessage", "");
  547. joRtn.Add("result", joInparam.ToString());
  548. return joRtn;
  549. }
  550. catch (Exception ex)
  551. {
  552. JObject joRtnEx = new JObject();
  553. joRtnEx.Add("errorCode", -1);
  554. joRtnEx.Add("errorMessage", ex.Message);
  555. joRtnEx.Add("result", "");
  556. return joRtnEx;
  557. }
  558. }
  559. [STAThread]
  560. private void preview()
  561. {
  562. //Report report = new Report();
  563. //try
  564. //{
  565. // var json = JsonConvert.DeserializeObject<Root>(getPatCheckList().ToString());
  566. // report.RegisterData(json.result.data.classification, "classification");
  567. // report.RegisterData(json.result.data.settlement, "settlement");
  568. // report.RegisterData(json.result.data.reginfo, "reginfo");
  569. // report.RegisterData(json.result.data.patinsuinfo, "patinsuinfo");
  570. //}
  571. //catch (Exception ex)
  572. //{
  573. // MessageBox.Show(ex.Message);
  574. // return;
  575. //}
  576. ////report.Design();
  577. //report.Load(Global.curEvt.path + "\\frx\\湖北武汉结算单.frx");
  578. ////report.Show();
  579. //PrintPreview preview1 = new PrintPreview();
  580. //preview1.Show();
  581. //report.Preview = preview1.previewControl1;
  582. //report.Prepare(); //准备
  583. //report.ShowPrepared(); //显示
  584. //preview1.Show();
  585. }
  586. private void uiButton2_Click(object sender, EventArgs e)
  587. {
  588. Close();
  589. }
  590. public void btnPrint_Click(object sender, EventArgs e)
  591. {
  592. string errorMsg;
  593. int iHis = dgvSettlRecord.CurrentRow.Index;
  594. String BType = dgvSettlRecord.Rows[iHis].Cells["BillType"].Value.ToString();
  595. Global.pat.admType = int.Parse(dgvSettlRecord.Rows[iHis].Cells["admType"].Value.ToString());
  596. JObject joData = new JObject();
  597. joData.Add("mdtrt_id", dgvSettlRecord.Rows[iHis].Cells["MdtrtID"].Value.ToString());
  598. joData.Add("setl_id", dgvSettlRecord.Rows[iHis].Cells["SettlementID"].Value.ToString());
  599. joData.Add("psn_no", dgvSettlRecord.Rows[iHis].Cells["PersonnelNO"].Value.ToString());
  600. joData.Add("med_type", dgvSettlRecord.Rows[iHis].Cells["MedicalType"].Value.ToString());
  601. JObject joInput = new JObject();
  602. joInput.Add("data", joData);
  603. Global.pat.insuplc_admdvs = dgvSettlRecord.Rows[iHis].Cells["insuplc_admdvs"].Value.ToString();//更新参保地
  604. if (BType == "1")
  605. {
  606. #region【调用医保交易YH03打印】
  607. InvokeHelper invoker = new InvokeHelper();
  608. JObject joRtn = invoker.invokeCenterService("YH03", JsonHelper.setCenterInpar("YH03", joInput));
  609. if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
  610. {
  611. MessageBox.Show("打印失败:" + errorMsg);
  612. return;
  613. }
  614. #endregion
  615. }
  616. else if (BType == "-1")
  617. {
  618. #region【调用FastRepor打印】
  619. try
  620. {
  621. //Thread thread = new Thread(new ThreadStart(print));
  622. //thread.SetApartmentState(ApartmentState.STA); //重点
  623. //thread.Start();
  624. //thread.Join();
  625. print();
  626. }
  627. catch (Exception ex)
  628. {
  629. Global.writeLog("结算单打印异常:" + ex.Message);
  630. MessageBox.Show("打印异常:" + ex.Message);
  631. }
  632. #endregion
  633. }
  634. }
  635. public void btnDesign_Click(object sender, EventArgs e)
  636. {
  637. //try
  638. //{
  639. // Thread thread = new Thread(new ThreadStart(design));
  640. // thread.SetApartmentState(ApartmentState.STA); //重点
  641. // thread.Start();
  642. // thread.Join();
  643. //}
  644. //catch (Exception ex)
  645. //{
  646. // Global.writeLog("结算单设计预览异常:" + ex.Message);
  647. // MessageBox.Show("设计预览异常:" + ex.Message);
  648. //}
  649. if (dgvSettlRecord.RowCount <= 0)
  650. {
  651. MessageBox.Show("请先查询结算数据!");
  652. return;
  653. }
  654. try
  655. {
  656. int i = dgvSettlRecord.CurrentRow.Index;
  657. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  658. Global.pat.admType = int.Parse(dgvSettlRecord.Rows[i].Cells["admType"].Value.ToString());
  659. string AdmID = dt.Rows[i]["AdmID"].ToString();
  660. string SettlementID = dt.Rows[i]["SettlementID"].ToString();
  661. string ValidFlag = dt.Rows[i]["ValidFlag"].ToString();
  662. string MdtrtID = dt.Rows[i]["MdtrtID"].ToString();
  663. string BillType = dt.Rows[i]["BillType"].ToString();
  664. JObject joRtn = GetFastReportParams("Y", AdmID, MdtrtID, SettlementID, ValidFlag, BillType);
  665. if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
  666. {
  667. MessageBox.Show("获取FastReport入参失败:" + errMsg);
  668. return;
  669. }
  670. string sFastReportParam = JsonHelper.getDestValue(joRtn, "result");
  671. if (FastReportPrint(sFastReportParam, out errMsg) != 0)
  672. {
  673. MessageBox.Show("调用FastReport设计失败!" + errMsg);
  674. return;
  675. }
  676. }
  677. catch (Exception ex)
  678. {
  679. MessageBox.Show(ex.Message);
  680. return;
  681. }
  682. }
  683. private void SettlementChecklist_FormClosed(object sender, FormClosedEventArgs e)
  684. {
  685. Dispose();
  686. }
  687. //市医保进销存992001结算信息上传
  688. private void JXCJSToolStripMenuItem_Click(object sender, EventArgs e)
  689. {
  690. if (dgvSettlRecord.RowCount <= 0)
  691. {
  692. MessageBox.Show("请先查询结算数据!");
  693. return;
  694. }
  695. string sqlStr;
  696. try
  697. {
  698. int m = dgvSettlRecord.CurrentRow.Index;
  699. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  700. string msgid = dt.Rows[m]["msgid"].ToString();
  701. string SettlementID = dt.Rows[m]["SettlementID"].ToString();
  702. string ValidFlag = dt.Rows[m]["ValidFlag"].ToString();
  703. string MdtrtID = dt.Rows[m]["MdtrtID"].ToString();
  704. string BillType = dt.Rows[m]["BillType"].ToString();
  705. string AdmID = dt.Rows[m]["AdmID"].ToString();
  706. string billID = dt.Rows[m]["billID"].ToString();
  707. string recordID = dt.Rows[m]["recordID"].ToString();
  708. Global.pat.adm_Dr = int.Parse(AdmID);
  709. Global.pat.billID = billID;
  710. Global.pat.recordID = recordID;
  711. if (BillType == "-1")
  712. {
  713. MessageBox.Show("请选择结算正记录!该记录为退费记录");
  714. return;
  715. }
  716. sqlStr = "SELECT * FROM BS_MedInsuTransactionLog WHERE MSGID='" + msgid + "'";
  717. JObject joSqlstr = new JObject();
  718. joSqlstr.Add("sqlStr", sqlStr);
  719. JObject joRtn = mIS.QueryTransactionLog(joSqlstr);
  720. if (joRtn["result"]["data"].ToString() == "[]")
  721. {
  722. MessageBox.Show("查询结果为空!");
  723. return;
  724. }
  725. //DataTable dtlog = (DataTable)joRtn["result"]["data"][0].ToObject(typeof(DataTable));
  726. JObject Outlog = JObject.Parse(joRtn["result"]["data"][0]["OutparamPlain"].ToString());
  727. dynamic setlinfo = new JObject();//结算信息节点
  728. setlinfo.setl_id = Outlog["output"]["setlinfo"]["setl_id"];//结算ID
  729. setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
  730. setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
  731. setlinfo.psn_name = Outlog["output"]["setlinfo"]["psn_name"];//人员姓名
  732. setlinfo.psn_cert_type = Outlog["output"]["setlinfo"]["psn_cert_type"];//凭证类型
  733. setlinfo.certno = Outlog["output"]["setlinfo"]["certno"];//证件号码
  734. setlinfo.gend = Outlog["output"]["setlinfo"]["gend"];//性别
  735. setlinfo.naty = Outlog["output"]["setlinfo"]["naty"];//民族
  736. setlinfo.brdy = Outlog["output"]["setlinfo"]["brdy"];//出生日期
  737. setlinfo.age = Outlog["output"]["setlinfo"]["age"];//年龄
  738. setlinfo.insutype = Outlog["output"]["setlinfo"]["insutype"];//险种类型
  739. setlinfo.psn_type = Outlog["output"]["setlinfo"]["psn_type"];//人员类别
  740. setlinfo.cvlserv_flag = Outlog["output"]["setlinfo"]["cvlserv_flag"];//公务员标志
  741. setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算时间
  742. setlinfo.mdtrt_cert_type = Outlog["output"]["setlinfo"]["mdtrt_cert_type"];//就诊凭证类型
  743. setlinfo.med_type = Outlog["output"]["setlinfo"]["med_type"];//医疗类别
  744. setlinfo.medfee_sumamt = Outlog["output"]["setlinfo"]["medfee_sumamt"];//医疗费总额
  745. setlinfo.fulamt_ownpay_amt = Outlog["output"]["setlinfo"]["fulamt_ownpay_amt"];//全自费金额
  746. setlinfo.overlmt_selfpay = Outlog["output"]["setlinfo"]["overlmt_selfpay"];//超限价自费费用
  747. setlinfo.preselfpay_amt = Outlog["output"]["setlinfo"]["preselfpay_amt"];//先行自付金额
  748. setlinfo.inscp_scp_amt = Outlog["output"]["setlinfo"]["inscp_scp_amt"];//符合政策范围金额
  749. setlinfo.act_pay_dedc = Outlog["output"]["setlinfo"]["act_pay_dedc"];//实际支付起付线
  750. setlinfo.hifp_pay = Outlog["output"]["setlinfo"]["hifp_pay"];//基本医疗保险统筹基金支出
  751. setlinfo.pool_prop_selfpay = Outlog["output"]["setlinfo"]["pool_prop_selfpay"];//基本医疗保险统筹基金支付比例
  752. setlinfo.cvlserv_pay = Outlog["output"]["setlinfo"]["cvlserv_pay"];//公务员医疗补助资金支出
  753. setlinfo.hifes_pay = Outlog["output"]["setlinfo"]["hifes_pay"];//企业补充医疗保险基金支出
  754. setlinfo.hifmi_pay = Outlog["output"]["setlinfo"]["hifmi_pay"];//居民大病保险资金支出
  755. setlinfo.hifob_pay = Outlog["output"]["setlinfo"]["hifob_pay"];//职工大额医疗费用补助基金支出
  756. setlinfo.maf_pay = Outlog["output"]["setlinfo"]["maf_pay"];//医疗救助基金支出
  757. setlinfo.oth_pay = Outlog["output"]["setlinfo"]["oth_pay"];//结算ID
  758. setlinfo.fund_pay_sumamt = Outlog["output"]["setlinfo"]["fund_pay_sumamt"];//基金支付总额
  759. setlinfo.psn_part_amt = Outlog["output"]["setlinfo"]["psn_part_amt"];//个人负担总金额
  760. setlinfo.acct_pay = Outlog["output"]["setlinfo"]["acct_pay"];//个人账户支出
  761. setlinfo.psn_cash_pay = Outlog["output"]["setlinfo"]["psn_cash_pay"];//个人现金支出
  762. setlinfo.balc = Outlog["output"]["setlinfo"]["balc"];//余额
  763. setlinfo.acct_mulaid_pay = Outlog["output"]["setlinfo"]["acct_mulaid_pay"];//个人账户共济支付金额
  764. setlinfo.medins_setl_id = Outlog["output"]["setlinfo"]["medins_setl_id"];//医药机构结算结算ID
  765. setlinfo.clr_optins = Outlog["output"]["setlinfo"]["clr_optins"];//clr_optins
  766. setlinfo.clr_way = Outlog["output"]["setlinfo"]["clr_way"];//clr_way
  767. setlinfo.clr_type = Outlog["output"]["setlinfo"]["clr_type"];//clr_type
  768. // setlinfo.exp_content = Outlog["output"]["setlinfo"]["exp_content"];//exp_content
  769. setlinfo.exp_content = "";//exp_content
  770. setlinfo.hosp_part_amt = Outlog["output"]["setlinfo"]["hosp_part_amt"];//医院负担金额
  771. setlinfo.hifdm_pay = 0;//伤残人员医疗保障基金支出
  772. //string outParam = "";
  773. ////获取IS费用
  774. //if (hIS.getHisFee(Global.pat, out outParam) != 0)
  775. //{
  776. // MessageBox.Show("获取HIS费用失败");
  777. //}
  778. ////调用医保平台转换HIS费用(转换医保编码等)
  779. //JObject joHisFee = JObject.Parse(outParam);
  780. //if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
  781. //{
  782. // MessageBox.Show("获取HIS费用医保对照关系失败");
  783. //}
  784. //JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
  785. // JObject jaFeeOne=new JObject();
  786. //for (int i = 0; i < jaFeeDetail.Count; i++)
  787. //{
  788. // jaFeeOne.Add("feedetl_sn", jaFeeDetail[i]["feedetl_sn"]);//费用明细流水号
  789. // jaFeeOne.Add("rxno", "");//处方号
  790. // if (string.IsNullOrEmpty(jaFeeDetail[i]["rx_circ_flag"].ToString()))
  791. // {
  792. // jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
  793. // }
  794. // else
  795. // {
  796. // jaFeeOne.Add("rx_circ_flag", jaFeeDetail[i]["rx_circ_flag"]);//外购处方标志
  797. // }
  798. // jaFeeOne.Add("fee_ocur_time", jaFeeDetail[i]["fee_ocur_time"]);
  799. // jaFeeOne.Add("med_list_codg", jaFeeDetail[i]["med_list_codg"]);
  800. // jaFeeOne.Add("medins_list_codg", jaFeeDetail[i]["medins_list_codg"]);
  801. // jaFeeOne.Add("medins_list_name", jaFeeDetail[i]["medins_list_desc"]);
  802. // jaFeeOne.Add("prodname", jaFeeDetail[i]["medins_list_desc"]);
  803. // if (string.IsNullOrEmpty(jaFeeDetail[i]["spec"].ToString()))
  804. // {
  805. // jaFeeOne.Add("spec", "");
  806. // }
  807. // else
  808. // {
  809. // jaFeeOne.Add("spec", jaFeeDetail[i]["spec"]);
  810. // }
  811. // if (string.IsNullOrEmpty(jaFeeDetail[i]["doseForm"].ToString()))
  812. // {
  813. // jaFeeOne.Add("dosform_name", "");
  814. // }
  815. // else
  816. // {
  817. // jaFeeOne.Add("dosform_name", jaFeeDetail[i]["doseForm"]);
  818. // }
  819. // jaFeeOne.Add(" det_item_fee_sumamt", jaFeeDetail[i]["det_item_fee_sumamt"]);
  820. // jaFeeOne.Add("cnt", jaFeeDetail[i]["cnt"]);
  821. // jaFeeOne.Add("pric", jaFeeDetail[i]["pric"]);
  822. // if (string.IsNullOrEmpty(jaFeeDetail[i]["sin_dos_dscr"].ToString()))
  823. // {
  824. // jaFeeOne.Add("sin_dos_dscr", "");
  825. // }
  826. // else
  827. // {
  828. // jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[i]["sin_dos_dscr"]);
  829. // }
  830. // if (string.IsNullOrEmpty(jaFeeDetail[i]["used_frqu_dscr"].ToString()))
  831. // {
  832. // jaFeeOne.Add("used_frqu_dscr", "");
  833. // }
  834. // else
  835. // {
  836. // jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[i]["used_frqu_dscr"]);
  837. // }
  838. // if (string.IsNullOrEmpty(jaFeeDetail[i]["prd_days"].ToString()))
  839. // {
  840. // jaFeeOne.Add("prd_days", "");
  841. // }
  842. // else
  843. // {
  844. // jaFeeOne.Add("prd_days", jaFeeDetail[i]["prd_days"]);
  845. // }
  846. // MessageBox.Show("555");
  847. // if (string.IsNullOrEmpty(jaFeeDetail[i]["medc_way_dscr"].ToString()))
  848. // {
  849. // jaFeeOne.Add("medc_way_dscr", "");
  850. // }
  851. // else
  852. // {
  853. // jaFeeOne.Add("medc_way_dscr", jaFeeDetail[i]["medc_way_dscr"]);
  854. // }
  855. // if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_codg"].ToString()))
  856. // {
  857. // jaFeeOne.Add("bilg_dr_codg", "");
  858. // }
  859. // else
  860. // {
  861. // jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[i]["bilg_dr_codg"]);
  862. // }
  863. // if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_name"].ToString()))
  864. // {
  865. // jaFeeOne.Add("bilg_dr_name", "");
  866. // }
  867. // else
  868. // {
  869. // jaFeeOne.Add("bilg_dr_name", jaFeeDetail[i]["bilg_dr_name"]);
  870. // }
  871. // MessageBox.Show("666");
  872. // jaFeeOne.Add("phar_name", "");
  873. // jaFeeOne.Add("phar_prac_cert_no", "");
  874. // jaFeeOne.Add("tcmdrug_used_way", ""); //中药使用方式 1复方 2单方 必填
  875. // jaFeeOne.Add("trdn_flag", "1");//拆零标志 必填 0否 1是
  876. // jaFeeDetail.Add(jaFeeOne);
  877. // jaFeeOne = new JObject();
  878. // MessageBox.Show("777");
  879. //}
  880. JObject Jo992001 = new JObject();
  881. MessageBox.Show("Outlog:" + Outlog.ToString());
  882. MessageBox.Show("aaa:"+ setlinfo.ToString());
  883. //Jo992001.Add("setlinfo",JObject.Parse(setlinfo));//结算信息节点
  884. Jo992001.Add("setlinfo", setlinfo);//结算信息节点
  885. MessageBox.Show("bbb");
  886. //Jo992001.Add("drugdetail", jaFeeDetail);//购药明细节点
  887. MessageBox.Show("上传开始:" + Jo992001.ToString());
  888. JObject OutJo = invoker.invokeCenterServiceJXC("992001", JObject.Parse(JsonHelper.setCenterInpar("992001", Jo992001)));
  889. MessageBox.Show("上传返回:" + OutJo.ToString());
  890. }
  891. catch (Exception ex)
  892. {
  893. MessageBox.Show(ex.Message);
  894. return;
  895. }
  896. }
  897. private void SYBJXCTFToolStripMenuItem_Click(object sender, EventArgs e)
  898. {
  899. if (dgvSettlRecord.RowCount <= 0)
  900. {
  901. MessageBox.Show("请先查询结算数据!");
  902. return;
  903. }
  904. string sqlStr;
  905. try
  906. {
  907. int m = dgvSettlRecord.CurrentRow.Index;
  908. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  909. string msgid = dt.Rows[m]["msgid"].ToString();
  910. string SettlementID = dt.Rows[m]["SettlementID"].ToString();
  911. string ValidFlag = dt.Rows[m]["ValidFlag"].ToString();
  912. string MdtrtID = dt.Rows[m]["MdtrtID"].ToString();
  913. string BillType = dt.Rows[m]["BillType"].ToString();
  914. string AdmID = dt.Rows[m]["AdmID"].ToString();
  915. string billID = dt.Rows[m]["billID"].ToString();
  916. string recordID = dt.Rows[m]["recordID"].ToString();
  917. Global.pat.adm_Dr = int.Parse(AdmID);
  918. Global.pat.billID = billID;
  919. Global.pat.recordID = recordID;
  920. if (BillType == "1")
  921. {
  922. MessageBox.Show("请选择退费负记录!该记录为正交易记录");
  923. }
  924. sqlStr = "SELECT * FROM BS_MedInsuTransactionLog WHERE MSGID='" + msgid + "'";
  925. JObject joSqlstr = new JObject();
  926. joSqlstr.Add("sqlStr", sqlStr);
  927. JObject joRtn = mIS.QueryTransactionLog(joSqlstr);
  928. if (joRtn["result"]["data"].ToString() == "[]")
  929. {
  930. MessageBox.Show("查询结果为空!");
  931. return;
  932. }
  933. //DataTable dtlog = (DataTable)joRtn["result"]["data"][0].ToObject(typeof(DataTable));
  934. JObject Outlog = JObject.Parse(joRtn["result"]["data"][0]["OutparamPlain"].ToString());
  935. dynamic setlinfo = new JObject();//结算信息节点
  936. setlinfo.setl_id = Outlog["output"]["setlinfo"]["setl_id"];//结算ID
  937. setlinfo.init_setl_id = "";//原结算ID
  938. setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算退费时间
  939. setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
  940. setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
  941. setlinfo.exp_content = "";
  942. string mdtrt_id = Outlog["mdtrt_id"].ToString();
  943. sqlStr = "SELECT * FROM BS_MedInsuSettlement WHERE billType = 1 ";
  944. sqlStr = sqlStr + " AND Hospital_Dr=" + Global.inf.hospitalDr + " AND Interface_Dr=" + Global.inf.interfaceDr;
  945. sqlStr = sqlStr + " AND MdtrtID ='" + mdtrt_id + "'";
  946. JObject joSql = new JObject();
  947. joSql.Add("sqlStr", sqlStr);
  948. JObject joSettlInfo = mIS.QuerySettlementInfo(joSql);
  949. //查询结算信息
  950. JObject Outpam = JObject.Parse(joSettlInfo["result"]["data"][0].ToString());
  951. setlinfo.init_setl_id = Outpam["SettlementID"];//ADMID
  952. JObject joParam992002 = new JObject();
  953. joParam992002.Add("data", setlinfo);//结算信息节点
  954. JObject OutJo = invoker.invokeCenterServiceJXC("992002", JObject.Parse(JsonHelper.setCenterInpar("992002", joParam992002)));
  955. }
  956. catch (Exception ex)
  957. {
  958. MessageBox.Show(ex.Message);
  959. return;
  960. }
  961. }
  962. private void FYMXToolStripMenuItem_Click(object sender, EventArgs e)
  963. {
  964. if (dgvSettlRecord.RowCount <= 0)
  965. {
  966. MessageBox.Show("请先查询结算数据!");
  967. return;
  968. }
  969. string sqlStr;
  970. try
  971. {
  972. int m = dgvSettlRecord.CurrentRow.Index;
  973. DataTable dt = (DataTable)dgvSettlRecord.DataSource;
  974. string msgid = dt.Rows[m]["msgid"].ToString();
  975. string SettlementID = dt.Rows[m]["SettlementID"].ToString();
  976. string ValidFlag = dt.Rows[m]["ValidFlag"].ToString();
  977. string MdtrtID = dt.Rows[m]["MdtrtID"].ToString();
  978. string BillType = dt.Rows[m]["BillType"].ToString();
  979. string AdmID = dt.Rows[m]["AdmID"].ToString();
  980. string billID = dt.Rows[m]["billID"].ToString();
  981. string recordID = dt.Rows[m]["recordID"].ToString();
  982. Global.pat.adm_Dr = int.Parse(AdmID);
  983. Global.pat.billID = billID;
  984. Global.pat.recordID = recordID;
  985. if (BillType == "-1")
  986. {
  987. MessageBox.Show("请选择结算正记录!该记录为退费记录");
  988. }
  989. sqlStr = "SELECT * FROM BS_MedInsuTransactionLog WHERE MSGID='" + msgid + "'";
  990. JObject joSqlstr = new JObject();
  991. joSqlstr.Add("sqlStr", sqlStr);
  992. JObject joRtn = mIS.QueryTransactionLog(joSqlstr);
  993. if (joRtn["result"]["data"].ToString() == "[]")
  994. {
  995. MessageBox.Show("查询结果为空!");
  996. return;
  997. }
  998. //DataTable dtlog = (DataTable)joRtn["result"]["data"][0].ToObject(typeof(DataTable));
  999. JObject Outlog = JObject.Parse(joRtn["result"]["data"][0]["OutparamPlain"].ToString());
  1000. dynamic setlinfo = new JObject();//结算信息节点
  1001. setlinfo.setl_id = Outlog["output"]["setlinfo"]["setl_id"];//结算ID
  1002. //setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
  1003. //setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
  1004. //setlinfo.psn_name = Outlog["output"]["setlinfo"]["psn_name"];//人员姓名
  1005. //setlinfo.psn_cert_type = Outlog["output"]["setlinfo"]["psn_cert_type"];//凭证类型
  1006. //setlinfo.certno = Outlog["output"]["setlinfo"]["certno"];//证件号码
  1007. //setlinfo.gend = Outlog["output"]["setlinfo"]["gend"];//性别
  1008. //setlinfo.naty = Outlog["output"]["setlinfo"]["naty"];//民族
  1009. //setlinfo.brdy = Outlog["output"]["setlinfo"]["brdy"];//出生日期
  1010. //setlinfo.age = Outlog["output"]["setlinfo"]["age"];//年龄
  1011. //setlinfo.insutype = Outlog["output"]["setlinfo"]["insutype"];//险种类型
  1012. //setlinfo.psn_type = Outlog["output"]["setlinfo"]["psn_type"];//人员类别
  1013. //setlinfo.cvlserv_flag = Outlog["output"]["setlinfo"]["cvlserv_flag"];//公务员标志
  1014. //setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算时间
  1015. //setlinfo.mdtrt_cert_type = Outlog["output"]["setlinfo"]["mdtrt_cert_type"];//就诊凭证类型
  1016. //setlinfo.med_type = Outlog["output"]["setlinfo"]["med_type"];//医疗类别
  1017. //setlinfo.medfee_sumamt = Outlog["output"]["setlinfo"]["medfee_sumamt"];//医疗费总额
  1018. //setlinfo.fulamt_ownpay_amt = Outlog["output"]["setlinfo"]["fulamt_ownpay_amt"];//全自费金额
  1019. //setlinfo.overlmt_selfpay = Outlog["output"]["setlinfo"]["overlmt_selfpay"];//超限价自费费用
  1020. //setlinfo.preselfpay_amt = Outlog["output"]["setlinfo"]["preselfpay_amt"];//先行自付金额
  1021. //setlinfo.inscp_scp_amt = Outlog["output"]["setlinfo"]["inscp_scp_amt"];//符合政策范围金额
  1022. //setlinfo.act_pay_dedc = Outlog["output"]["setlinfo"]["act_pay_dedc"];//实际支付起付线
  1023. //setlinfo.hifp_pay = Outlog["output"]["setlinfo"]["hifp_pay"];//基本医疗保险统筹基金支出
  1024. //setlinfo.pool_prop_selfpay = Outlog["output"]["setlinfo"]["pool_prop_selfpay"];//基本医疗保险统筹基金支付比例
  1025. //setlinfo.cvlserv_pay = Outlog["output"]["setlinfo"]["cvlserv_pay"];//公务员医疗补助资金支出
  1026. //setlinfo.hifes_pay = Outlog["output"]["setlinfo"]["hifes_pay"];//企业补充医疗保险基金支出
  1027. //setlinfo.hifmi_pay = Outlog["output"]["setlinfo"]["hifmi_pay"];//居民大病保险资金支出
  1028. //setlinfo.hifob_pay = Outlog["output"]["setlinfo"]["hifob_pay"];//职工大额医疗费用补助基金支出
  1029. //setlinfo.maf_pay = Outlog["output"]["setlinfo"]["maf_pay"];//医疗救助基金支出
  1030. //setlinfo.oth_pay = Outlog["output"]["setlinfo"]["oth_pay"];//结算ID
  1031. //setlinfo.fund_pay_sumamt = Outlog["output"]["setlinfo"]["fund_pay_sumamt"];//基金支付总额
  1032. //setlinfo.psn_part_amt = Outlog["output"]["setlinfo"]["psn_part_amt"];//个人负担总金额
  1033. //setlinfo.acct_pay = Outlog["output"]["setlinfo"]["acct_pay"];//个人账户支出
  1034. //setlinfo.psn_cash_pay = Outlog["output"]["setlinfo"]["psn_cash_pay"];//个人现金支出
  1035. //setlinfo.balc = Outlog["output"]["setlinfo"]["balc"];//余额
  1036. //setlinfo.acct_mulaid_pay = Outlog["output"]["setlinfo"]["acct_mulaid_pay"];//个人账户共济支付金额
  1037. //setlinfo.medins_setl_id = Outlog["output"]["setlinfo"]["medins_setl_id"];//医药机构结算结算ID
  1038. //setlinfo.clr_optins = Outlog["output"]["setlinfo"]["clr_optins"];//clr_optins
  1039. //setlinfo.clr_way = Outlog["output"]["setlinfo"]["clr_way"];//clr_way
  1040. //setlinfo.clr_type = Outlog["output"]["setlinfo"]["clr_type"];//clr_type
  1041. //// setlinfo.exp_content = Outlog["output"]["setlinfo"]["exp_content"];//exp_content
  1042. //setlinfo.exp_content = "";//exp_content
  1043. //setlinfo.hosp_part_amt = Outlog["output"]["setlinfo"]["hosp_part_amt"];//医院负担金额
  1044. //setlinfo.hifdm_pay = 0;//伤残人员医疗保障基金支出
  1045. string outParam = "";
  1046. //获取IS费用
  1047. if (hIS.getHisFee(Global.pat, out outParam) != 0)
  1048. {
  1049. MessageBox.Show("获取HIS费用失败");
  1050. }
  1051. //调用医保平台转换HIS费用(转换医保编码等)
  1052. JObject joHisFee = JObject.Parse(outParam);
  1053. if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
  1054. {
  1055. MessageBox.Show("获取HIS费用医保对照关系失败");
  1056. }
  1057. JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
  1058. JArray jaFeeDetail1 = new JArray();
  1059. ; JObject jaFeeOne = new JObject();
  1060. MessageBox.Show(jaFeeDetail.Count.ToString());
  1061. for (int k = 0; k < jaFeeDetail.Count; k++)
  1062. {
  1063. jaFeeOne.Add("feedetl_sn", jaFeeDetail[k]["feedetl_sn"]);//费用明细流水号
  1064. jaFeeOne.Add("rxno", "");//处方号
  1065. if (string.IsNullOrEmpty(jaFeeDetail[k]["rx_circ_flag"].ToString()))
  1066. {
  1067. jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
  1068. }
  1069. else
  1070. {
  1071. jaFeeOne.Add("rx_circ_flag", jaFeeDetail[k]["rx_circ_flag"]);//外购处方标志
  1072. }
  1073. jaFeeOne.Add("fee_ocur_time", jaFeeDetail[k]["fee_ocur_time"]);
  1074. jaFeeOne.Add("med_list_codg", jaFeeDetail[k]["med_list_codg"]);
  1075. jaFeeOne.Add("medins_list_codg", jaFeeDetail[k]["medins_list_codg"]);
  1076. jaFeeOne.Add("medins_list_name", jaFeeDetail[k]["medins_list_desc"]);
  1077. jaFeeOne.Add("prodname", jaFeeDetail[k]["medins_list_desc"]);
  1078. if (string.IsNullOrEmpty(jaFeeDetail[k]["spec"].ToString()))
  1079. {
  1080. jaFeeOne.Add("spec", "");
  1081. }
  1082. else
  1083. {
  1084. jaFeeOne.Add("spec", jaFeeDetail[k]["spec"]);
  1085. }
  1086. if (string.IsNullOrEmpty(jaFeeDetail[k]["doseForm"].ToString()))
  1087. {
  1088. jaFeeOne.Add("dosform_name", "");
  1089. }
  1090. else
  1091. {
  1092. jaFeeOne.Add("dosform_name", jaFeeDetail[k]["doseForm"]);
  1093. }
  1094. jaFeeOne.Add("det_item_fee_sumamt", jaFeeDetail[k]["det_item_fee_sumamt"]);
  1095. jaFeeOne.Add("cnt", jaFeeDetail[k]["cnt"]);
  1096. jaFeeOne.Add("pric", jaFeeDetail[k]["pric"]);
  1097. if (string.IsNullOrEmpty(jaFeeDetail[k]["sin_dos_dscr"].ToString()))
  1098. {
  1099. jaFeeOne.Add("sin_dos_dscr", "");
  1100. }
  1101. else
  1102. {
  1103. jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[k]["sin_dos_dscr"]);
  1104. }
  1105. if (string.IsNullOrEmpty(jaFeeDetail[k]["used_frqu_dscr"].ToString()))
  1106. {
  1107. jaFeeOne.Add("used_frqu_dscr", "");
  1108. }
  1109. else
  1110. {
  1111. jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[k]["used_frqu_dscr"]);
  1112. }
  1113. if (string.IsNullOrEmpty(jaFeeDetail[k]["prd_days"].ToString()))
  1114. {
  1115. jaFeeOne.Add("prd_days", "");
  1116. }
  1117. else
  1118. {
  1119. jaFeeOne.Add("prd_days", jaFeeDetail[k]["prd_days"]);
  1120. }
  1121. if (string.IsNullOrEmpty(jaFeeDetail[k]["medc_way_dscr"].ToString()))
  1122. {
  1123. jaFeeOne.Add("medc_way_dscr", "");
  1124. }
  1125. else
  1126. {
  1127. jaFeeOne.Add("medc_way_dscr", jaFeeDetail[k]["medc_way_dscr"]);
  1128. }
  1129. if (string.IsNullOrEmpty(jaFeeDetail[k]["bilg_dr_codg"].ToString()))
  1130. {
  1131. jaFeeOne.Add("bilg_dr_codg", "");
  1132. }
  1133. else
  1134. {
  1135. jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[k]["bilg_dr_codg"]);
  1136. }
  1137. if (string.IsNullOrEmpty(jaFeeDetail[k]["bilg_dr_name"].ToString()))
  1138. {
  1139. jaFeeOne.Add("bilg_dr_name", "");
  1140. }
  1141. else
  1142. {
  1143. jaFeeOne.Add("bilg_dr_name", jaFeeDetail[k]["bilg_dr_name"]);
  1144. }
  1145. jaFeeOne.Add("phar_name", "");
  1146. jaFeeOne.Add("phar_prac_cert_no", "");
  1147. jaFeeOne.Add("tcmdrug_used_way", ""); //中药使用方式 1复方 2单方 必填
  1148. jaFeeOne.Add("trdn_flag", "1");//拆零标志 必填 0否 1是
  1149. jaFeeDetail1.Add(jaFeeOne);
  1150. jaFeeOne = new JObject();
  1151. }
  1152. MessageBox.Show(jaFeeDetail1.ToString());
  1153. JObject Jo992004 = new JObject();
  1154. // JObject Jo992001 = new JObject();
  1155. MessageBox.Show("Outlog:" + Outlog.ToString());
  1156. MessageBox.Show("aaa:" + setlinfo.ToString());
  1157. //Jo992001.Add("setlinfo",JObject.Parse(setlinfo));//结算信息节点
  1158. Jo992004.Add("setlinfo", setlinfo);
  1159. Jo992004.Add("drugdetail", jaFeeDetail1);//结算信息节点
  1160. MessageBox.Show("bbb");
  1161. //Jo992001.Add("drugdetail", jaFeeDetail);//购药明细节点
  1162. MessageBox.Show("上传开始:" + Jo992004.ToString());
  1163. JObject OutJo = invoker.invokeCenterServiceJXC("9920004", JObject.Parse(JsonHelper.setCenterInpar("992004", Jo992004)));
  1164. MessageBox.Show("上传返回:" + OutJo.ToString());
  1165. }
  1166. catch (Exception ex)
  1167. {
  1168. MessageBox.Show(ex.Message);
  1169. return;
  1170. }
  1171. }
  1172. }
  1173. // Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
  1174. public class Classification
  1175. {
  1176. public string cwfSummat { get; set; }
  1177. public string cwfInScope { get; set; }
  1178. public string cwfPreSelfPay { get; set; }
  1179. public string cwfOverLimit { get; set; }
  1180. public string cwfFullOwnPay { get; set; }
  1181. public string zcfSummat { get; set; }
  1182. public string zcfInScope { get; set; }
  1183. public string zcfPreSelfPay { get; set; }
  1184. public string zcfOverLimit { get; set; }
  1185. public string zcfFullOwnPay { get; set; }
  1186. public string jcfSummat { get; set; }
  1187. public string jcfInScope { get; set; }
  1188. public string jcfPreSelfPay { get; set; }
  1189. public string jcfOverLimit { get; set; }
  1190. public string jcfFullOwnPay { get; set; }
  1191. public string hyfSummat { get; set; }
  1192. public string hyfInScope { get; set; }
  1193. public string hyfPreSelfPay { get; set; }
  1194. public string hyfOverLimit { get; set; }
  1195. public string hyfFullOwnPay { get; set; }
  1196. public string zlfSummat { get; set; }
  1197. public string zlfInScope { get; set; }
  1198. public string zlfPreSelfPay { get; set; }
  1199. public string zlfOverLimit { get; set; }
  1200. public string zlfFullOwnPay { get; set; }
  1201. public string ssfSummat { get; set; }
  1202. public string ssfInScope { get; set; }
  1203. public string ssfPreSelfPay { get; set; }
  1204. public string ssfOverLimit { get; set; }
  1205. public string ssfFullOwnPay { get; set; }
  1206. public string hlfSummat { get; set; }
  1207. public string hlfInScope { get; set; }
  1208. public string hlfPreSelfPay { get; set; }
  1209. public string hlfOverLimit { get; set; }
  1210. public string hlfFullOwnPay { get; set; }
  1211. public string wsclfSummat { get; set; }
  1212. public string wsclfInScope { get; set; }
  1213. public string wsclfPreSelfPay { get; set; }
  1214. public string wsclfOverLimit { get; set; }
  1215. public string wsclfFullOwnPay { get; set; }
  1216. public string xyfSummat { get; set; }
  1217. public string xyfInScope { get; set; }
  1218. public string xyfPreSelfPay { get; set; }
  1219. public string xyfOverLimit { get; set; }
  1220. public string xyfFullOwnPay { get; set; }
  1221. public string zyypfSummat { get; set; }
  1222. public string zyypfInScope { get; set; }
  1223. public string zyypfPreSelfPay { get; set; }
  1224. public string zyypfOverLimit { get; set; }
  1225. public string zyypfFullOwnPay { get; set; }
  1226. public string zcyfSummat { get; set; }
  1227. public string zcyfInScope { get; set; }
  1228. public string zcyfPreSelfPay { get; set; }
  1229. public string zcyfOverLimit { get; set; }
  1230. public string zcyfFullOwnPay { get; set; }
  1231. public string ybzlfSummat { get; set; }
  1232. public string ybzlfInScope { get; set; }
  1233. public string ybzlfPreSelfPay { get; set; }
  1234. public string ybzlfOverLimit { get; set; }
  1235. public string ybzlfFullOwnPay { get; set; }
  1236. public string ghfSummat { get; set; }
  1237. public string ghfInScope { get; set; }
  1238. public string ghfPreSelfPay { get; set; }
  1239. public string ghfOverLimit { get; set; }
  1240. public string ghfFullOwnPay { get; set; }
  1241. public string qtSummat { get; set; }
  1242. public string qtInScope { get; set; }
  1243. public string qtPreSelfPay { get; set; }
  1244. public string qtOverLimit { get; set; }
  1245. public string qtFullOwnPay { get; set; }
  1246. public string totalSummat { get; set; }
  1247. public string totalInScope { get; set; }
  1248. public string totalPreSelfPay { get; set; }
  1249. public string totalOverLimit { get; set; }
  1250. public string totalFullOwnPay { get; set; }
  1251. }
  1252. public class Data
  1253. {
  1254. public List<Classification> classification { get; set; }
  1255. public List<Settlement> settlement { get; set; }
  1256. public List<Reginfo> reginfo { get; set; }
  1257. public List<Patinsuinfo> patinsuinfo { get; set; }
  1258. }
  1259. public class Patinsuinfo
  1260. {
  1261. public string PsnCertType { get; set; }
  1262. public string PsnCertNO { get; set; }
  1263. public string Gend { get; set; }
  1264. public string Naty { get; set; }
  1265. public string Brdy { get; set; }
  1266. public string Age { get; set; }
  1267. public string Balc { get; set; }
  1268. public string PsnType { get; set; }
  1269. public string Cvlservflag { get; set; }
  1270. public string insuplcAdmdvs { get; set; }
  1271. public string EmpName { get; set; }
  1272. public string PsnIdettype { get; set; }
  1273. public string PsnTypeLv { get; set; }
  1274. }
  1275. public class Reginfo
  1276. {
  1277. public string AttendDoctorNO { get; set; }
  1278. public string ChiefPhyDocName { get; set; }
  1279. public string AdmitDepartmentCode { get; set; }
  1280. public string AdmitDepartmentName { get; set; }
  1281. public string AdmBed { get; set; }
  1282. public string MainDiagCode { get; set; }
  1283. public string MainDiagName { get; set; }
  1284. public string RegDate { get; set; }
  1285. public string ConerName { get; set; }
  1286. public string Tel { get; set; }
  1287. }
  1288. public class Result
  1289. {
  1290. public Data data { get; set; }
  1291. }
  1292. public class Root
  1293. {
  1294. public Result result { get; set; }
  1295. public int errorCode { get; set; }
  1296. public string errorMessage { get; set; }
  1297. }
  1298. public class Settlement
  1299. {
  1300. public string AdmID { get; set; }
  1301. public string MdtrtID { get; set; }
  1302. public string SettlementID { get; set; }
  1303. public string PersonnelNO { get; set; }
  1304. public string PatientName { get; set; }
  1305. public string birth { get; set; }
  1306. public string CertificateNO { get; set; }
  1307. public string Gender { get; set; }
  1308. public string InsuranceType { get; set; }
  1309. public string PersonType { get; set; }
  1310. public string CivilserviceFlag { get; set; }
  1311. public string SettlementTime { get; set; }
  1312. public string MedicalType { get; set; }
  1313. public string Sumamt { get; set; }
  1314. public string OwnPayAmount { get; set; }
  1315. public string OverLimitAmount { get; set; }
  1316. public string PreSelfPayAmount { get; set; }
  1317. public string InPolicyRangeAmount { get; set; }
  1318. public double ActualPayDeductible { get; set; }
  1319. public string HealthInsurancePay { get; set; }
  1320. public string HealthInsuranceRatio { get; set; }
  1321. public double CivilserviceAllowancePay { get; set; }
  1322. public string EnterpriseSupplementPay { get; set; }
  1323. public string SeriousIllnessPay { get; set; }
  1324. public string LargeExpensesSupplementPay { get; set; }
  1325. public string MedicalAssistPay { get; set; }
  1326. public string HospitalPartAmount { get; set; }
  1327. public string OtherPay { get; set; }
  1328. public string FundPaySumamt { get; set; }
  1329. public string PersonPaySumamt { get; set; }
  1330. public string AccountPaySumamt { get; set; }
  1331. public string PersonCashPay { get; set; }
  1332. public string Balance { get; set; }
  1333. public string AccountMutualAidAmount { get; set; }
  1334. public string OrganSettlementID { get; set; }
  1335. public string ClearingOrgan { get; set; }
  1336. public string ClearingWay { get; set; }
  1337. public string ClearingType { get; set; }
  1338. public string ValidFlag { get; set; }
  1339. public string msgid { get; set; }
  1340. public string HospitalizationsTimes { get; set; }
  1341. public string HospitalizationsDays { get; set; }
  1342. public string HISAdmTime { get; set; }
  1343. public string HISDischargeTime { get; set; }
  1344. public int BillType { get; set; }
  1345. public string BillID { get; set; }
  1346. public string admType { get; set; }
  1347. public string RecordID { get; set; }
  1348. public string insuplc_admdvs { get; set; }
  1349. }
  1350. }