sample.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  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/list"><i class="fa fa-circle-o"></i>数据标注</a>
  64. </li>
  65. <li class="active"><a href="/push-web/relation/index"><i class="fa fa-circle-o"></i>关系抽取</a>
  66. </li>
  67. <li class="active"><a href="/push-web/algorithm/index"><i class="fa fa-circle-o"></i>算法分析</a>
  68. </li>
  69. </ul>
  70. </li>
  71. </ul>
  72. </section>
  73. <!-- /.sidebar -->
  74. </aside>
  75. <!-- Content Wrapper. Contains page content -->
  76. <div class="content-wrapper">
  77. <!-- Content Header (Page header) -->
  78. <section class="content-header">
  79. <h1>
  80. <small></small>
  81. </h1>
  82. <ol class="breadcrumb">
  83. <li><a href="#"><i class="fa fa-dashboard"></i>Diagbot</a></li>
  84. <li><a href="#">nlp</a></li>
  85. <li class="active">分词示例</li>
  86. </ol>
  87. </section>
  88. <!-- Main content -->
  89. <section class="invoice">
  90. <!-- title row -->
  91. <div class="row">
  92. <div class="col-xs-12">
  93. <h2 class="page-header">
  94. <form role="form" id="up_file_form" enctype='multipart/form-data' style="position: relative;">
  95. <i class="fa"></i>病 例
  96. </form>
  97. </h2>
  98. </div>
  99. <!-- /.col -->
  100. </div>
  101. <!-- /.box-header -->
  102. <div class="box-body">
  103. <div class="row">
  104. <div class="col-xs-12">
  105. <form role="form" id="participle_form">
  106. <!-- textarea -->
  107. <div class="form-group">
  108. <textarea class="form-control" rows="5" placeholder="Enter ..." name="content" id="content">
  109. 患者入院前40余年受凉后出现咳嗽、咳痰,咳嗽不剧,少量咳痰,约2-5毫升/日,伴气急,气急常于夜间发作,活动后明显,休息后缓解,无双下肢水肿,无咯粉红色泡沫痰,无胸痛、心悸,无胸闷,无咯血、盗汗,曾于浙二医院就诊,诊断为“哮喘”,予“信必可” 2吸/日治疗,症状控制良好。1周前患者受凉后再发咳嗽、咳痰,咳嗽 较剧,阵发性,咳少量黄痰,伴发热,体温最高38.5度,气急,夜间发作,患者此次发作伴恶心,无呕吐,腹胀,食欲差,曾于当地卫生院就诊,查血常规示白细胞升高,超敏C反应蛋白329毫克/升,B超提示胆囊壁毛糙,当地医院予“头孢曲松+左氧氟沙星针”抗感染、泮立苏护胃治疗,患者感黄痰转位白痰,但咳嗽、发热等症状无改善,今为进一步诊疗来我院就诊,遂门诊拟”哮喘’收治入院。
  110. 病来患者神清,精神软,食欲、睡眠差,小便如常,大便1/日,水样便,近半年体重无明显增减。
  111. </textarea>
  112. </div>
  113. </form>
  114. </div>
  115. </div>
  116. <div class="row">
  117. <div class="col-xs-12">
  118. <button type="button" class="btn btn-success pull-right"
  119. onclick="_ajax('/relation/extraction')"><i
  120. class="fa fa-credit-card"></i> 开&nbsp;始&nbsp;分&nbsp;析
  121. </button>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="row">
  126. <div class="col-md-12">
  127. <div class="box box-solid">
  128. <div class="box-header with-border">
  129. <i class="fa fa-text-width"></i>
  130. <h3 class="box-title">结 构 化</h3>
  131. </div>
  132. <!-- /.box-header -->
  133. <div class="box-body">
  134. <dl class="dl-horizontal" id="participle_result">
  135. </dl>
  136. </div>
  137. <!-- /.box-body -->
  138. </div>
  139. <!-- /.box -->
  140. </div>
  141. <div class="col-md-12" style="height: 400px;overflow: auto">
  142. <!-- TABLE: LATEST ORDERS -->
  143. <div class="box box-info">
  144. <div class="box-header with-border">
  145. <h3 class="box-title">症状信息</h3>
  146. <div class="box-tools pull-right">
  147. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  148. </button>
  149. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  150. </div>
  151. </div>
  152. <!-- /.box-header -->
  153. <div class="box-body">
  154. <div class="table-responsive">
  155. <table class="table no-margin">
  156. <thead>
  157. <tr>
  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="14%">部位</th>
  164. <th width="16%">其他</th>
  165. </tr>
  166. </thead>
  167. <tbody id="symptom_extract_id">
  168. </tbody>
  169. </table>
  170. </div>
  171. <!-- /.table-responsive -->
  172. </div>
  173. </div>
  174. <!-- /.box -->
  175. <!-- TABLE: LATEST ORDERS -->
  176. <div class="box box-info">
  177. <div class="box-header with-border">
  178. <h3 class="box-title">体征信息</h3>
  179. <div class="box-tools pull-right">
  180. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  181. </button>
  182. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  183. </div>
  184. </div>
  185. <!-- /.box-header -->
  186. <div class="box-body">
  187. <div class="table-responsive">
  188. <table class="table no-margin">
  189. <thead>
  190. <tr>
  191. <th width="20%">项目名称</th>
  192. <th width="20%">部位</th>
  193. <th width="20%">结果信息</th>
  194. <th width="20%">程度</th>
  195. <th width="20%">阴性标识</th>
  196. </tr>
  197. </thead>
  198. <tbody id="vital_extract_id">
  199. </tbody>
  200. </table>
  201. </div>
  202. <!-- /.table-responsive -->
  203. </div>
  204. </div>
  205. <!-- /.box -->
  206. <!-- TABLE: LATEST ORDERS -->
  207. <div class="box box-info">
  208. <div class="box-header with-border">
  209. <h3 class="box-title">化验信息</h3>
  210. <div class="box-tools pull-right">
  211. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  212. </button>
  213. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  214. </div>
  215. </div>
  216. <!-- /.box-header -->
  217. <div class="box-body">
  218. <div class="table-responsive">
  219. <table class="table no-margin">
  220. <thead>
  221. <tr>
  222. <th width="20%">项目名称</th>
  223. <th width="20%">结果信息</th>
  224. <th width="60%">其他</th>
  225. </tr>
  226. </thead>
  227. <tbody id="lis_extract_id">
  228. </tbody>
  229. </table>
  230. </div>
  231. <!-- /.table-responsive -->
  232. </div>
  233. </div>
  234. <!-- /.box -->
  235. <!-- TABLE: LATEST ORDERS -->
  236. <div class="box box-info">
  237. <div class="box-header with-border">
  238. <h3 class="box-title">检查信息</h3>
  239. <div class="box-tools pull-right">
  240. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  241. </button>
  242. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  243. </div>
  244. </div>
  245. <!-- /.box-header -->
  246. <div class="box-body">
  247. <div class="table-responsive">
  248. <table class="table no-margin">
  249. <thead>
  250. <tr>
  251. <th width="20%">项目名称</th>
  252. <th width="20%">结果信息</th>
  253. <th width="20%">部位</th>
  254. <th width="40%">其他</th>
  255. </tr>
  256. </thead>
  257. <tbody id="pacs_extract_id">
  258. </tbody>
  259. </table>
  260. </div>
  261. <!-- /.table-responsive -->
  262. </div>
  263. </div>
  264. <!-- /.box -->
  265. <!-- TABLE: LATEST ORDERS -->
  266. <div class="box box-info">
  267. <div class="box-header with-border">
  268. <h3 class="box-title">治疗信息</h3>
  269. <div class="box-tools pull-right">
  270. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  271. </button>
  272. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  273. </div>
  274. </div>
  275. <!-- /.box-header -->
  276. <div class="box-body">
  277. <div class="table-responsive">
  278. <table class="table no-margin">
  279. <thead>
  280. <tr>
  281. <th width="20%">诊断</th>
  282. <th width="20%">用药</th>
  283. <th width="20%">结果</th>
  284. <th width="40%">其他</th>
  285. </tr>
  286. </thead>
  287. <tbody id="treat_extract_id">
  288. </tbody>
  289. </table>
  290. </div>
  291. <!-- /.table-responsive -->
  292. </div>
  293. </div>
  294. <!-- /.box -->
  295. </div>
  296. <!-- ./col -->
  297. </div>
  298. <script>
  299. function _ajax(url) {
  300. $.support.cors = true;
  301. $.ajax({
  302. url: nlp_web_url + '/participle/split_and_highlight',
  303. data: $("#participle_form").serialize(),
  304. dataType: "json",
  305. type: "post",
  306. success: function (data) {
  307. $("#participle_result").html(data.data);
  308. }
  309. });
  310. $.ajax({
  311. url: nlp_web_url + url,
  312. data: $("#participle_form").serialize(),
  313. dataType: "json",
  314. type: "post",
  315. success: function (data) {
  316. var outputInfos = data.data;
  317. var h = "";
  318. var vital_h = "";
  319. var lis_h = "";
  320. var pacs_h = "";
  321. var treat_h = "";
  322. $.each(outputInfos, function (index, outputInfo) {
  323. var symptoms = outputInfo.symptoms;
  324. if (symptoms != null) {
  325. $.each(symptoms, function (symptom_index, symptom) {
  326. h += "<tr><td><strong>";
  327. if (symptom.negative != null) {
  328. h += symptom.negative.negaName;
  329. }
  330. h += symptom.symptomName + "</strong></td>"
  331. h += "<td>";
  332. if (symptom.timestamp != null) {
  333. $.each(symptom.timestamp, function (ts_index, ts) {
  334. h += ts.value + ts.unit + " ";
  335. });
  336. }
  337. h += "</td>";
  338. h += "<td>";
  339. if (symptom.property != null) {
  340. h += symptom.property.propertyName;
  341. }
  342. h += "</td>";
  343. h += "<td>";
  344. if (symptom.cause != null) {
  345. h += symptom.cause.causeName;
  346. }
  347. h += "</td>";
  348. h += "<td><span class=\"label label-success\">";
  349. if (symptom.degree != null) {
  350. if (symptom.degree.pd != null) {
  351. h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + symptom.degree.pd.unit + ")";
  352. } else {
  353. h += symptom.degree.degreeName;
  354. }
  355. }
  356. h += "</span></td>";
  357. h += "<td>";
  358. if (symptom.bodyPart != null) {
  359. if (symptom.bodyPart.position != null) {
  360. h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
  361. } else {
  362. h += symptom.bodyPart.partBodyName;
  363. }
  364. }
  365. h += "</td>";
  366. h += "<td>";
  367. if (symptom.pds != null) {
  368. $.each(symptom.pds, function (pd_index, pd) {
  369. h += pd.value + pd.unit + " ";
  370. });
  371. }
  372. h += "</td>";
  373. });
  374. }
  375. var vitals = outputInfo.vitals;
  376. if (vitals != null) {
  377. $.each(vitals, function (vital_index, vital) {
  378. vital_h += "<tr><td>";
  379. if (vital.vitalName != null) {
  380. vital_h += vital.vitalName;
  381. }
  382. vital_h += "</td>";
  383. vital_h += "<td>";
  384. if (vital.bodyPart != null) {
  385. if (vital.bodyPart.position != null) {
  386. vital_h += vital.bodyPart.position.positionName + vital.bodyPart.partBodyName;
  387. } else {
  388. vital_h += vital.bodyPart.partBodyName;
  389. }
  390. }
  391. vital_h += "</td>";
  392. vital_h += "<td>";
  393. if (vital.value != null) {
  394. vital_h += vital.value;
  395. }
  396. if (vital.pd != null) {
  397. vital_h += vital.pd.value + vital.pd.unit;
  398. }
  399. vital_h += "</td>";
  400. vital_h += "<td>";
  401. if (vital.degree != null) {
  402. vital_h += vital.degree.degreeName;
  403. }
  404. vital_h += "</td>";
  405. vital_h += "<td>";
  406. if (vital.negative != null) {
  407. vital_h += vital.negative.negaName;
  408. }
  409. vital_h += "</td></tr>";
  410. });
  411. }
  412. var lises = outputInfo.lises;
  413. if (lises != null) {
  414. $.each(lises, function (lis_index, lis) {
  415. lis_h += "<tr><td>";
  416. if (lis.lisName != null) {
  417. lis_h += lis.lisName;
  418. }
  419. lis_h += "</td>";
  420. lis_h += "<td>";
  421. if (lis.pd != null) {
  422. lis_h += lis.pd.value + lis.pd.unit;
  423. }
  424. lis_h += "</td>";
  425. lis_h += "<td>";
  426. if (lis.value != null) {
  427. lis_h += lis.value;
  428. }
  429. lis_h += "</td><td></td></tr>";
  430. });
  431. }
  432. var pacses = outputInfo.pacses;
  433. if (pacses != null) {
  434. $.each(pacses, function (lis_index, pacs) {
  435. pacs_h += "<tr><td>";
  436. if (pacs.pacsName != null) {
  437. pacs_h += pacs.pacsName;
  438. }
  439. pacs_h += "</td>";
  440. pacs_h += "<td>";
  441. if (pacs.value != null) {
  442. pacs_h += pacs.value;
  443. }
  444. pacs_h += "</td>";
  445. pacs_h += "<td>";
  446. if (pacs.bodypart != null) {
  447. pacs_h += pacs.bodypart;
  448. }
  449. pacs_h += "</td><td></td></tr>";
  450. });
  451. }
  452. var treats = outputInfo.treats;
  453. if (treats != null) {
  454. $.each(treats, function (treat_index, treat) {
  455. treat_h += "<tr><td>";
  456. if (treat.diagnose != null) {
  457. treat_h += treat.diagnose;
  458. }
  459. treat_h += "</td>";
  460. treat_h += "<td>";
  461. if (treat.treatName != null) {
  462. treat_h += treat.treatName;
  463. }
  464. treat_h += "</td>";
  465. treat_h += "<td>";
  466. if (treat.value != null) {
  467. treat_h += treat.value;
  468. }
  469. treat_h += "</td>";
  470. treat_h += "<td>";
  471. if (treat.pds != null) {
  472. $.each(treat.pds, function (pd_index, pd) {
  473. treat_h += pd.value + pd.unit + " ";
  474. });
  475. }
  476. treat_h += "</td></tr>";
  477. });
  478. }
  479. });
  480. $("#symptom_extract_id").html(h);
  481. $("#vital_extract_id").html(vital_h);
  482. $("#lis_extract_id").html(lis_h);
  483. $("#pacs_extract_id").html(pacs_h);
  484. $("#treat_extract_id").html(treat_h);
  485. }
  486. });
  487. };
  488. </script>
  489. </section>
  490. <!-- /.content -->
  491. <div class="clearfix"></div>
  492. </div>
  493. <!-- /.control-sidebar -->
  494. <!-- Add the sidebar's background. This div must be placed
  495. immediately after the control sidebar -->
  496. <div class="control-sidebar-bg"></div>
  497. </div>
  498. <!-- ./wrapper -->
  499. <!-- jQuery 2.2.3 -->
  500. <script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
  501. <!-- Bootstrap 3.3.6 -->
  502. <script src="../bootstrap/js/bootstrap.min.js"></script>
  503. <!-- FastClick -->
  504. <script src="../plugins/fastclick/fastclick.js"></script>
  505. <!-- AdminLTE App -->
  506. <script src="../dist/js/app.min.js"></script>
  507. <!-- AdminLTE for demo purposes -->
  508. <script src="../dist/js/demo.js"></script>
  509. <script src="../dist/js/push.js"></script>
  510. </body>
  511. </html>