sample.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  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: 300px;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="60%">其他</th>
  254. </tr>
  255. </thead>
  256. <tbody id="pacs_extract_id">
  257. </tbody>
  258. </table>
  259. </div>
  260. <!-- /.table-responsive -->
  261. </div>
  262. </div>
  263. <!-- /.box -->
  264. <!-- TABLE: LATEST ORDERS -->
  265. <div class="box box-info">
  266. <div class="box-header with-border">
  267. <h3 class="box-title">治疗信息</h3>
  268. <div class="box-tools pull-right">
  269. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  270. </button>
  271. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  272. </div>
  273. </div>
  274. <!-- /.box-header -->
  275. <div class="box-body">
  276. <div class="table-responsive">
  277. <table class="table no-margin">
  278. <thead>
  279. <tr>
  280. <th width="20%">用药</th>
  281. <th width="20%">结果</th>
  282. <th width="60%">其他</th>
  283. </tr>
  284. </thead>
  285. <tbody id="treat_extract_id">
  286. </tbody>
  287. </table>
  288. </div>
  289. <!-- /.table-responsive -->
  290. </div>
  291. </div>
  292. <!-- /.box -->
  293. </div>
  294. <!-- ./col -->
  295. </div>
  296. <script>
  297. function _ajax(url) {
  298. $.support.cors = true;
  299. $.ajax({
  300. url: nlp_web_url + '/participle/split_and_highlight',
  301. data: $("#participle_form").serialize(),
  302. dataType: "json",
  303. type: "post",
  304. success: function (data) {
  305. $("#participle_result").html(data.data);
  306. }
  307. });
  308. $.ajax({
  309. url: nlp_web_url + url,
  310. data: $("#participle_form").serialize(),
  311. dataType: "json",
  312. type: "post",
  313. success: function (data) {
  314. var outputInfos = data.data;
  315. var h = "";
  316. var vital_h = "";
  317. var lis_h = "";
  318. var pacs_h = "";
  319. var treat_h = "";
  320. $.each(outputInfos, function (index, outputInfo) {
  321. var symptoms = outputInfo.symptoms;
  322. if (symptoms != null) {
  323. $.each(symptoms, function (symptom_index, symptom) {
  324. h += "<tr><td><strong>";
  325. if (symptom.negative != null) {
  326. h += symptom.negative.negaName;
  327. }
  328. h += symptom.symptomName + "</strong></td>"
  329. h += "<td>";
  330. if (symptom.pd != null) {
  331. h += symptom.pd.value + symptom.pd.unit;
  332. }
  333. h += "</td>";
  334. h += "<td>";
  335. if (symptom.property != null) {
  336. h += symptom.property.propertyName;
  337. }
  338. h += "</td>";
  339. h += "<td>";
  340. if (symptom.cause != null) {
  341. h += symptom.cause.causeName;
  342. }
  343. h += "</td>";
  344. h += "<td><span class=\"label label-success\">";
  345. if (symptom.degree != null) {
  346. if (symptom.degree.pd != null) {
  347. h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + symptom.degree.pd.unit + ")";
  348. } else {
  349. h += symptom.degree.degreeName;
  350. }
  351. }
  352. h += "</span></td>";
  353. h += "<td>";
  354. if (symptom.bodyPart != null) {
  355. if (symptom.bodyPart.position != null) {
  356. h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
  357. } else {
  358. h += symptom.bodyPart.partBodyName;
  359. }
  360. }
  361. h += "</td></tr>";
  362. });
  363. }
  364. var vitals = outputInfo.vitals;
  365. if (vitals != null) {
  366. $.each(vitals, function (vital_index, vital) {
  367. vital_h += "<tr><td>";
  368. if (vital.vitalName != null) {
  369. vital_h += vital.vitalName;
  370. }
  371. vital_h += "</td>";
  372. vital_h += "<td>";
  373. if (vital.bodyPart != null) {
  374. if (vital.bodyPart.position != null) {
  375. vital_h += vital.bodyPart.position.positionName + vital.bodyPart.partBodyName;
  376. } else {
  377. vital_h += vital.bodyPart.partBodyName;
  378. }
  379. }
  380. vital_h += "</td>";
  381. vital_h += "<td>";
  382. if (vital.value != null) {
  383. vital_h += vital.value;
  384. }
  385. if (vital.pd != null) {
  386. vital_h += vital.pd.value + vital.pd.unit;
  387. }
  388. vital_h += "</td>";
  389. vital_h += "<td>";
  390. if (vital.degree != null) {
  391. vital_h += vital.degree.degreeName;
  392. }
  393. vital_h += "</td>";
  394. vital_h += "<td>";
  395. if (vital.negative != null) {
  396. vital_h += vital.negative.negaName;
  397. }
  398. vital_h += "</td></tr>";
  399. });
  400. }
  401. var lises = outputInfo.lises;
  402. if (lises != null) {
  403. $.each(lises, function (lis_index, lis) {
  404. lis_h += "<tr><td>";
  405. if (lis.lisName != null) {
  406. lis_h += lis.lisName;
  407. }
  408. lis_h += "</td>";
  409. lis_h += "<td>";
  410. if (lis.pd != null) {
  411. lis_h += lis.pd.value + lis.pd.unit;
  412. }
  413. lis_h += "</td>";
  414. lis_h += "<td>";
  415. if (lis.value != null) {
  416. lis_h += lis.value;
  417. }
  418. lis_h += "</td><td></td></tr>";
  419. });
  420. }
  421. var pacses = outputInfo.pacses;
  422. if (pacses != null) {
  423. $.each(pacses, function (lis_index, pacs) {
  424. pacs_h += "<tr><td>";
  425. if (pacs.pacsName != null) {
  426. pacs_h += pacs.pacsName;
  427. }
  428. pacs_h += "</td>";
  429. pacs_h += "<td>";
  430. if (pacs.value != null) {
  431. pacs_h += pacs.value;
  432. }
  433. pacs_h += "</td><td></td></tr>";
  434. });
  435. }
  436. var treats = outputInfo.treats;
  437. if (treats != null) {
  438. $.each(treats, function (treat_index, treat) {
  439. treat_h += "<tr><td>";
  440. if (treat.treatName != null) {
  441. treat_h += treat.treatName;
  442. }
  443. treat_h += "</td>";
  444. treat_h += "<td>";
  445. if (treat.value != null) {
  446. treat_h += treat.value;
  447. }
  448. treat_h += "</td><td></td></tr>";
  449. });
  450. }
  451. });
  452. $("#symptom_extract_id").html(h);
  453. $("#vital_extract_id").html(vital_h);
  454. $("#lis_extract_id").html(lis_h);
  455. $("#pacs_extract_id").html(pacs_h);
  456. $("#treat_extract_id").html(treat_h);
  457. }
  458. });
  459. };
  460. </script>
  461. </section>
  462. <!-- /.content -->
  463. <div class="clearfix"></div>
  464. </div>
  465. <!-- /.control-sidebar -->
  466. <!-- Add the sidebar's background. This div must be placed
  467. immediately after the control sidebar -->
  468. <div class="control-sidebar-bg"></div>
  469. </div>
  470. <!-- ./wrapper -->
  471. <!-- jQuery 2.2.3 -->
  472. <script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
  473. <!-- Bootstrap 3.3.6 -->
  474. <script src="../bootstrap/js/bootstrap.min.js"></script>
  475. <!-- FastClick -->
  476. <script src="../plugins/fastclick/fastclick.js"></script>
  477. <!-- AdminLTE App -->
  478. <script src="../dist/js/app.min.js"></script>
  479. <!-- AdminLTE for demo purposes -->
  480. <script src="../dist/js/demo.js"></script>
  481. <script src="../dist/js/push.js"></script>
  482. </body>
  483. </html>