sample.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>AdminLTE 2 | Invoice</title>
  7. <!-- Tell the browser to be responsive to screen width -->
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <!-- Bootstrap 3.3.6 -->
  10. <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
  11. <!-- Font Awesome -->
  12. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  13. <!-- Ionicons -->
  14. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  15. <!-- Theme style -->
  16. <link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
  17. <!-- AdminLTE Skins. Choose a skin from the css/skins
  18. folder instead of downloading all of them to reduce the load. -->
  19. <link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css">
  20. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  21. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  22. <!--[if lt IE 9]>
  23. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  24. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  25. <![endif]-->
  26. <style>
  27. .interval {
  28. padding: 1px 8px !important;
  29. }
  30. #my_file {
  31. visibility: hidden; /* 隐藏 */
  32. }
  33. </style>
  34. </head>
  35. <body class="hold-transition skin-blue sidebar-mini">
  36. <div class="wrapper">
  37. <header class="main-header">
  38. <!-- Logo -->
  39. <a href="#" class="logo">
  40. <!-- logo for regular state and mobile devices -->
  41. <span class="logo-lg"><b>D</b>iagbot</span>
  42. </a>
  43. </header>
  44. <!-- Left side column. contains the logo and sidebar -->
  45. <aside class="main-sidebar">
  46. <!-- sidebar: style can be found in sidebar.less -->
  47. <section class="sidebar">
  48. <!-- /.search form -->
  49. <!-- sidebar menu: : style can be found in sidebar.less -->
  50. <ul class="sidebar-menu">
  51. <li class="header">MAIN NAVIGATION</li>
  52. <li class="treeview active">
  53. <a href="#">
  54. <i class="fa fa-folder"></i> <span>diagbot</span>
  55. <span class="pull-right-container">
  56. <i class="fa fa-angle-left pull-right"></i>
  57. </span>
  58. </a>
  59. <ul class="treeview-menu">
  60. <li class="active"><a href="/push-web/participle/index"><i class="fa fa-circle-o"></i>分词示例</a>
  61. </li>
  62. <li class="active"><a href="/push-web/extract/index"><i class="fa fa-circle-o"></i>提取特征</a></li>
  63. <li class="active"><a href="/push-web/relation/index"><i class="fa fa-circle-o"></i>关系抽取</a>
  64. </li>
  65. <li class="active"><a href="/push-web/algorithm/index"><i class="fa fa-circle-o"></i>算法分析</a>
  66. </li>
  67. </ul>
  68. </li>
  69. </ul>
  70. </section>
  71. <!-- /.sidebar -->
  72. </aside>
  73. <!-- Content Wrapper. Contains page content -->
  74. <div class="content-wrapper">
  75. <!-- Content Header (Page header) -->
  76. <section class="content-header">
  77. <h1>
  78. <small></small>
  79. </h1>
  80. <ol class="breadcrumb">
  81. <li><a href="#"><i class="fa fa-dashboard"></i>Diagbot</a></li>
  82. <li><a href="#">nlp</a></li>
  83. <li class="active">分词示例</li>
  84. </ol>
  85. </section>
  86. <!-- Main content -->
  87. <section class="invoice">
  88. <!-- title row -->
  89. <div class="row">
  90. <div class="col-xs-12">
  91. <h2 class="page-header">
  92. <form role="form" id="up_file_form" enctype='multipart/form-data' style="position: relative;">
  93. <i class="fa"></i>病 例
  94. </form>
  95. </h2>
  96. </div>
  97. <!-- /.col -->
  98. </div>
  99. <!-- /.box-header -->
  100. <div class="box-body">
  101. <div class="row">
  102. <div class="col-xs-12">
  103. <form role="form" id="participle_form">
  104. <!-- textarea -->
  105. <div class="form-group">
  106. <textarea class="form-control" rows="5" placeholder="Enter ..." name="content" id="content">
  107. 患者入院前40余年受凉后出现咳嗽、咳痰,咳嗽不剧,少量咳痰,约2-5毫升/日,伴气急,气急常于夜间发作,活动后明显,休息后缓解,无双下肢水肿,无咯粉红色泡沫痰,无胸痛、心悸,无胸闷,无咯血、盗汗,曾于浙二医院就诊,诊断为“哮喘”,予“信必可” 2吸/日治疗,症状控制良好。1周前患者受凉后再发咳嗽、咳痰,咳嗽 较剧,阵发性,咳少量黄痰,伴发热,体温最高38.5度,气急,夜间发作,患者此次发作伴恶心,无呕吐,腹胀,食欲差,曾于当地卫生院就诊,查血常规示白细胞升高,超敏C反应蛋白329毫克/升,B超提示胆囊壁毛糙,当地医院予“头孢曲松+左氧氟沙星针”抗感染、泮立苏护胃治疗,患者感黄痰转位白痰,但咳嗽、发热等症状无改善,今为进一步诊疗来我院就诊,遂门诊拟”哮喘’收治入院。
  108. 病来患者神清,精神软,食欲、睡眠差,小便如常,大便1/日,水样便,近半年体重无明显增减。
  109. </textarea>
  110. </div>
  111. </form>
  112. </div>
  113. </div>
  114. <div class="row">
  115. <div class="col-xs-12">
  116. <button type="button" class="btn btn-success pull-right"
  117. onclick="_ajax('/relation/extraction')"><i
  118. class="fa fa-credit-card"></i> 开&nbsp;始&nbsp;分&nbsp;析
  119. </button>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="row">
  124. <div class="col-md-12">
  125. <div class="box box-solid">
  126. <div class="box-header with-border">
  127. <i class="fa fa-text-width"></i>
  128. <h3 class="box-title">结 构 化</h3>
  129. </div>
  130. <!-- /.box-header -->
  131. <div class="box-body">
  132. <dl class="dl-horizontal" id="participle_result">
  133. </dl>
  134. </div>
  135. <!-- /.box-body -->
  136. </div>
  137. <!-- /.box -->
  138. </div>
  139. <!-- ./col -->
  140. </div>
  141. <!-- TABLE: LATEST ORDERS -->
  142. <div class="box box-info">
  143. <div class="box-header with-border">
  144. <h3 class="box-title">症状信息</h3>
  145. <div class="box-tools pull-right">
  146. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  147. </button>
  148. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  149. </div>
  150. </div>
  151. <!-- /.box-header -->
  152. <div class="box-body">
  153. <div class="table-responsive">
  154. <table class="table no-margin">
  155. <thead>
  156. <tr>
  157. <th width="14%">症状</th>
  158. <th width="14%">时间</th>
  159. <th width="14%">性质</th>
  160. <th width="14%">诱因</th>
  161. <th width="14%">程度</th>
  162. <th width="14%">部位</th>
  163. <th width="16%">其他</th>
  164. </tr>
  165. </thead>
  166. <tbody id="symptom_extract_id">
  167. </tbody>
  168. </table>
  169. </div>
  170. <!-- /.table-responsive -->
  171. </div>
  172. </div>
  173. <!-- /.box -->
  174. <!-- TABLE: LATEST ORDERS -->
  175. <div class="box box-info">
  176. <div class="box-header with-border">
  177. <h3 class="box-title">体征信息</h3>
  178. <div class="box-tools pull-right">
  179. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  180. </button>
  181. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  182. </div>
  183. </div>
  184. <!-- /.box-header -->
  185. <div class="box-body">
  186. <div class="table-responsive">
  187. <table class="table no-margin">
  188. <thead>
  189. <tr>
  190. <th width="20%">项目名称</th>
  191. <th width="20%">部位</th>
  192. <th width="20%">结果信息</th>
  193. <th width="20%">程度</th>
  194. <th width="20%">阴性标识</th>
  195. </tr>
  196. </thead>
  197. <tbody id="vital_extract_id">
  198. </tbody>
  199. </table>
  200. </div>
  201. <!-- /.table-responsive -->
  202. </div>
  203. </div>
  204. <!-- /.box -->
  205. <!-- TABLE: LATEST ORDERS -->
  206. <div class="box box-info">
  207. <div class="box-header with-border">
  208. <h3 class="box-title">化验信息</h3>
  209. <div class="box-tools pull-right">
  210. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  211. </button>
  212. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  213. </div>
  214. </div>
  215. <!-- /.box-header -->
  216. <div class="box-body">
  217. <div class="table-responsive">
  218. <table class="table no-margin">
  219. <thead>
  220. <tr>
  221. <th width="20%">项目名称</th>
  222. <th width="20%">结果信息</th>
  223. <th width="60%">其他</th>
  224. </tr>
  225. </thead>
  226. <tbody id="lis_extract_id">
  227. </tbody>
  228. </table>
  229. </div>
  230. <!-- /.table-responsive -->
  231. </div>
  232. </div>
  233. <!-- /.box -->
  234. <!-- TABLE: LATEST ORDERS -->
  235. <div class="box box-info">
  236. <div class="box-header with-border">
  237. <h3 class="box-title">检查信息</h3>
  238. <div class="box-tools pull-right">
  239. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  240. </button>
  241. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  242. </div>
  243. </div>
  244. <!-- /.box-header -->
  245. <div class="box-body">
  246. <div class="table-responsive">
  247. <table class="table no-margin">
  248. <thead>
  249. <tr>
  250. <th width="20%">项目名称</th>
  251. <th width="20%">结果信息</th>
  252. <th width="60%">其他</th>
  253. </tr>
  254. </thead>
  255. <tbody id="pacs_extract_id">
  256. </tbody>
  257. </table>
  258. </div>
  259. <!-- /.table-responsive -->
  260. </div>
  261. </div>
  262. <!-- /.box -->
  263. <script>
  264. function _ajax(url) {
  265. $.support.cors = true;
  266. $.ajax({
  267. url: nlp_web_url + '/participle/split_and_highlight',
  268. data: $("#participle_form").serialize(),
  269. dataType: "json",
  270. type: "post",
  271. success: function (data) {
  272. $("#participle_result").html(data.data);
  273. }
  274. });
  275. $.ajax({
  276. url: nlp_web_url + url,
  277. data: $("#participle_form").serialize(),
  278. dataType: "json",
  279. type: "post",
  280. success: function (data) {
  281. var outputInfos = data.data;
  282. var h = "";
  283. var vital_h = "";
  284. var lis_h = "";
  285. var pacs_h = "";
  286. $.each(outputInfos, function (index, outputInfo) {
  287. var symptoms = outputInfo.symptoms;
  288. if (symptoms != null) {
  289. $.each(symptoms, function (symptom_index, symptom) {
  290. h += "<tr><td><strong>";
  291. if (symptom.negative != null) {
  292. h += symptom.negative.negaName;
  293. }
  294. h += symptom.symptomName + "</strong></td>"
  295. h += "<td>";
  296. if (symptom.pd != null) {
  297. h += symptom.pd.value;
  298. }
  299. h += "</td>";
  300. h += "<td>";
  301. if (symptom.property != null) {
  302. h += symptom.property.propertyName;
  303. }
  304. h += "</td>";
  305. h += "<td>";
  306. if (symptom.cause != null) {
  307. h += symptom.cause.causeName;
  308. }
  309. h += "</td>";
  310. h += "<td><span class=\"label label-success\">";
  311. if (symptom.degree != null) {
  312. if (symptom.degree.pd != null) {
  313. h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + ")";
  314. } else {
  315. h += symptom.degree.degreeName;
  316. }
  317. }
  318. h += "</span></td>";
  319. h += "<td>";
  320. if (symptom.bodyPart != null) {
  321. if (symptom.bodyPart.position != null) {
  322. h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
  323. } else {
  324. h += symptom.bodyPart.partBodyName;
  325. }
  326. }
  327. h += "</td></tr>";
  328. });
  329. }
  330. var vitals = outputInfo.vitals;
  331. if (vitals != null) {
  332. $.each(vitals, function (vital_index, vital) {
  333. vital_h += "<tr><td>";
  334. if (vital.vitalName != null) {
  335. vital_h += vital.vitalName;
  336. }
  337. vital_h += "</td>";
  338. vital_h += "<td>";
  339. if (vital.bodyPart != null) {
  340. if (vital.bodyPart.position != null) {
  341. vital_h += vital.bodyPart.position.positionName + vital.bodyPart.partBodyName;
  342. } else {
  343. vital_h += vital.bodyPart.partBodyName;
  344. }
  345. }
  346. vital_h += "</td>";
  347. vital_h += "<td>";
  348. if (vital.value != null) {
  349. vital_h += vital.value;
  350. }
  351. if (vital.pd != null) {
  352. vital_h += vital.pd.value;
  353. }
  354. vital_h += "</td>";
  355. vital_h += "<td>";
  356. if (vital.degree != null) {
  357. vital_h += vital.degree.degreeName;
  358. }
  359. vital_h += "</td>";
  360. vital_h += "<td>";
  361. if (vital.negative != null) {
  362. vital_h += vital.negative.negaName;
  363. }
  364. vital_h += "</td></tr>";
  365. });
  366. }
  367. var lises = outputInfo.lises;
  368. if (lises != null) {
  369. $.each(lises, function (lis_index, lis) {
  370. lis_h += "<tr><td>";
  371. if (lis.lisName != null) {
  372. lis_h += lis.lisName;
  373. }
  374. lis_h += "</td>";
  375. lis_h += "<td>";
  376. if (lis.pd != null) {
  377. lis_h += lis.pd.value;
  378. }
  379. lis_h += "</td>";
  380. lis_h += "<td>";
  381. if (lis.value != null) {
  382. lis_h += lis.value;
  383. }
  384. lis_h += "</td><td></td></tr>";
  385. });
  386. }
  387. var pacses = outputInfo.pacses;
  388. if (pacses != null) {
  389. $.each(pacses, function (lis_index, pacs) {
  390. pacs_h += "<tr><td>";
  391. if (pacs.pacsName != null) {
  392. pacs_h += pacs.pacsName;
  393. }
  394. pacs_h += "</td>";
  395. pacs_h += "<td>";
  396. if (pacs.value != null) {
  397. pacs_h += pacs.value;
  398. }
  399. pacs_h += "</td><td></td></tr>";
  400. });
  401. }
  402. });
  403. $("#symptom_extract_id").html(h);
  404. $("#vital_extract_id").html(vital_h);
  405. $("#lis_extract_id").html(lis_h);
  406. $("#pacs_extract_id").html(pacs_h);
  407. }
  408. });
  409. };
  410. </script>
  411. </section>
  412. <!-- /.content -->
  413. <div class="clearfix"></div>
  414. </div>
  415. <!-- /.control-sidebar -->
  416. <!-- Add the sidebar's background. This div must be placed
  417. immediately after the control sidebar -->
  418. <div class="control-sidebar-bg"></div>
  419. </div>
  420. <!-- ./wrapper -->
  421. <!-- jQuery 2.2.3 -->
  422. <script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
  423. <!-- Bootstrap 3.3.6 -->
  424. <script src="../bootstrap/js/bootstrap.min.js"></script>
  425. <!-- FastClick -->
  426. <script src="../plugins/fastclick/fastclick.js"></script>
  427. <!-- AdminLTE App -->
  428. <script src="../dist/js/app.min.js"></script>
  429. <!-- AdminLTE for demo purposes -->
  430. <script src="../dist/js/demo.js"></script>
  431. <script src="../dist/js/push.js"></script>
  432. </body>
  433. </html>