sample.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  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="20%">结果</th>
  225. <th width="40%">其他</th>
  226. </tr>
  227. </thead>
  228. <tbody id="past_extract_id">
  229. </tbody>
  230. </table>
  231. </div>
  232. <!-- /.table-responsive -->
  233. </div>
  234. </div>
  235. <!-- /.box -->
  236. <!-- TABLE: LATEST ORDERS -->
  237. <div class="box box-info">
  238. <div class="box-header with-border">
  239. <h3 class="box-title">化验信息</h3>
  240. <div class="box-tools pull-right">
  241. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  242. </button>
  243. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  244. </div>
  245. </div>
  246. <!-- /.box-header -->
  247. <div class="box-body">
  248. <div class="table-responsive">
  249. <table class="table no-margin">
  250. <thead>
  251. <tr>
  252. <th width="20%">项目名称</th>
  253. <th width="20%">结果信息</th>
  254. <th width="60%">其他</th>
  255. </tr>
  256. </thead>
  257. <tbody id="lis_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="pacs_extract_id">
  288. </tbody>
  289. </table>
  290. </div>
  291. <!-- /.table-responsive -->
  292. </div>
  293. </div>
  294. <!-- /.box -->
  295. <!-- TABLE: LATEST ORDERS -->
  296. <div class="box box-info">
  297. <div class="box-header with-border">
  298. <h3 class="box-title">治疗信息</h3>
  299. <div class="box-tools pull-right">
  300. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  301. </button>
  302. <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  303. </div>
  304. </div>
  305. <!-- /.box-header -->
  306. <div class="box-body">
  307. <div class="table-responsive">
  308. <table class="table no-margin">
  309. <thead>
  310. <tr>
  311. <th width="20%">诊断</th>
  312. <th width="20%">用药</th>
  313. <th width="20%">结果</th>
  314. <th width="40%">其他</th>
  315. </tr>
  316. </thead>
  317. <tbody id="treat_extract_id">
  318. </tbody>
  319. </table>
  320. </div>
  321. <!-- /.table-responsive -->
  322. </div>
  323. </div>
  324. <!-- /.box -->
  325. </div>
  326. <!-- ./col -->
  327. </div>
  328. <script>
  329. function _ajax(url) {
  330. $.support.cors = true;
  331. $.ajax({
  332. url: push_web_url + '/participle/split_and_highlight',
  333. data: $("#participle_form").serialize(),
  334. dataType: "json",
  335. type: "post",
  336. success: function (data) {
  337. $("#participle_result").html(data.data);
  338. }
  339. });
  340. $.ajax({
  341. url: push_web_url + url,
  342. data: $("#participle_form").serialize(),
  343. dataType: "json",
  344. type: "post",
  345. success: function (data) {
  346. var outputInfos = data.data;
  347. var h = "";
  348. var vital_h = "";
  349. var past_h = "";
  350. var lis_h = "";
  351. var pacs_h = "";
  352. var treat_h = "";
  353. $.each(outputInfos, function (index, outputInfo) {
  354. var symptoms = outputInfo.symptoms;
  355. if (symptoms != null) {
  356. $.each(symptoms, function (symptom_index, symptom) {
  357. if (symptom.symptomName.length > 0) {
  358. h += "<tr><td><strong>";
  359. if (symptom.negative != null) {
  360. h += symptom.negative.negaName;
  361. }
  362. h += symptom.symptomName + "</strong></td>"
  363. h += "<td>";
  364. if (symptom.timestamp != null) {
  365. $.each(symptom.timestamp, function (ts_index, ts) {
  366. h += ts.value + ts.unit + ", ";
  367. });
  368. }
  369. h += "</td>";
  370. h += "<td>";
  371. if (symptom.property != null) {
  372. h += symptom.property.propertyName;
  373. }
  374. h += "</td>";
  375. h += "<td>";
  376. if (symptom.cause != null) {
  377. h += symptom.cause.causeName;
  378. }
  379. h += "</td>";
  380. h += "<td><span class=\"label label-success\">";
  381. if (symptom.degree != null) {
  382. if (symptom.degree.pd != null) {
  383. h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + symptom.degree.pd.unit + ")";
  384. } else {
  385. h += symptom.degree.degreeName;
  386. }
  387. }
  388. h += "</span></td>";
  389. h += "<td>";
  390. if (symptom.bodyPart != null) {
  391. if (symptom.bodyPart.position != null) {
  392. h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
  393. } else {
  394. h += symptom.bodyPart.partBodyName;
  395. }
  396. }
  397. h += "</td>";
  398. h += "<td>";
  399. if (symptom.pds != null) {
  400. $.each(symptom.pds, function (pd_index, pd) {
  401. h += pd.value + pd.unit + " ";
  402. });
  403. }
  404. h += "</td>";
  405. }
  406. });
  407. }
  408. var vitals = outputInfo.vitals;
  409. if (vitals != null) {
  410. $.each(vitals, function (vital_index, vital) {
  411. vital_h += "<tr><td>";
  412. if (vital.vitalName != null) {
  413. vital_h += vital.vitalName;
  414. }
  415. vital_h += "</td>";
  416. vital_h += "<td>";
  417. if (vital.bodyPart != null) {
  418. if (vital.bodyPart.position != null) {
  419. vital_h += vital.bodyPart.position.positionName + vital.bodyPart.partBodyName;
  420. } else {
  421. vital_h += vital.bodyPart.partBodyName;
  422. }
  423. }
  424. vital_h += "</td>";
  425. vital_h += "<td>";
  426. if (vital.value != null) {
  427. vital_h += vital.value;
  428. }
  429. if (vital.pd != null) {
  430. vital_h += vital.pd.value + vital.pd.unit;
  431. }
  432. vital_h += "</td>";
  433. vital_h += "<td>";
  434. if (vital.degree != null) {
  435. vital_h += vital.degree.degreeName;
  436. }
  437. vital_h += "</td>";
  438. vital_h += "<td>";
  439. if (vital.negative != null) {
  440. vital_h += vital.negative.negaName;
  441. }
  442. vital_h += "</td></tr>";
  443. });
  444. }
  445. var pasts = outputInfo.pasts;
  446. if (pasts != null) {
  447. $.each(pasts, function (past_index, past) {
  448. past_h += "<tr><td>";
  449. if (past.diagnose != null) {
  450. past_h += past.diagnose;
  451. }
  452. past_h += "</td>";
  453. past_h += "<td>";
  454. if (past.treatName != null) {
  455. past_h += past.treatName;
  456. }
  457. past_h += "</td>";
  458. past_h += "<td>";
  459. if (past.value != null) {
  460. past_h += past.value;
  461. }
  462. past_h += "</td>";
  463. past_h += "<td>";
  464. if (past.pds != null) {
  465. $.each(past.pds, function (pd_index, pd) {
  466. past_h += pd.value + pd.unit + ", ";
  467. });
  468. }
  469. past_h += "</td></tr>";
  470. });
  471. }
  472. var lises = outputInfo.lises;
  473. if (lises != null) {
  474. $.each(lises, function (lis_index, lis) {
  475. lis_h += "<tr><td>";
  476. if (lis.lisName != null) {
  477. lis_h += lis.lisName;
  478. }
  479. lis_h += "</td>";
  480. lis_h += "<td>";
  481. if (lis.pd != null) {
  482. lis_h += lis.pd.value + lis.pd.unit;
  483. }
  484. lis_h += "</td>";
  485. lis_h += "<td>";
  486. if (lis.value != null) {
  487. lis_h += lis.value;
  488. }
  489. lis_h += "</td><td></td></tr>";
  490. });
  491. }
  492. var pacses = outputInfo.pacses;
  493. if (pacses != null) {
  494. $.each(pacses, function (lis_index, pacs) {
  495. pacs_h += "<tr><td>";
  496. if (pacs.pacsName != null) {
  497. pacs_h += pacs.pacsName;
  498. }
  499. pacs_h += "</td>";
  500. pacs_h += "<td>";
  501. if (pacs.value != null) {
  502. pacs_h += pacs.value;
  503. }
  504. pacs_h += "</td>";
  505. pacs_h += "<td>";
  506. if (pacs.bodypart != null) {
  507. pacs_h += pacs.bodypart;
  508. }
  509. pacs_h += "</td><td></td></tr>";
  510. });
  511. }
  512. var treats = outputInfo.treats;
  513. if (treats != null) {
  514. $.each(treats, function (treat_index, treat) {
  515. treat_h += "<tr><td>";
  516. if (treat.diagnose != null) {
  517. treat_h += treat.diagnose;
  518. }
  519. treat_h += "</td>";
  520. treat_h += "<td>";
  521. if (treat.treatName != null) {
  522. treat_h += treat.treatName;
  523. }
  524. treat_h += "</td>";
  525. treat_h += "<td>";
  526. if (treat.value != null) {
  527. treat_h += treat.value;
  528. }
  529. treat_h += "</td>";
  530. treat_h += "<td>";
  531. if (treat.pds != null) {
  532. $.each(treat.pds, function (pd_index, pd) {
  533. treat_h += pd.value + pd.unit + ", ";
  534. });
  535. }
  536. treat_h += "</td></tr>";
  537. });
  538. }
  539. });
  540. $("#symptom_extract_id").html(h);
  541. $("#vital_extract_id").html(vital_h);
  542. $("#past_extract_id").html(past_h);
  543. $("#lis_extract_id").html(lis_h);
  544. $("#pacs_extract_id").html(pacs_h);
  545. $("#treat_extract_id").html(treat_h);
  546. }
  547. });
  548. };
  549. </script>
  550. </section>
  551. <!-- /.content -->
  552. <div class="clearfix"></div>
  553. </div>
  554. <!-- /.control-sidebar -->
  555. <!-- Add the sidebar's background. This div must be placed
  556. immediately after the control sidebar -->
  557. <div class="control-sidebar-bg"></div>
  558. </div>
  559. <!-- ./wrapper -->
  560. <!-- jQuery 2.2.3 -->
  561. <script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
  562. <!-- Bootstrap 3.3.6 -->
  563. <script src="../bootstrap/js/bootstrap.min.js"></script>
  564. <!-- FastClick -->
  565. <script src="../plugins/fastclick/fastclick.js"></script>
  566. <!-- AdminLTE App -->
  567. <script src="../dist/js/app.min.js"></script>
  568. <!-- AdminLTE for demo purposes -->
  569. <script src="../dist/js/demo.js"></script>
  570. <script src="../dist/js/push.js"></script>
  571. </body>
  572. </html>