knowledge.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. import request from '@/utils/request1.js'
  2. import request1 from '@/utils/request.js'
  3. /**
  4. * 获取中医 病名
  5. * @deprecated
  6. */
  7. export function getCDiseaseName(data) {
  8. return request({
  9. url: '/basis/knowlib/diseaseQuery',
  10. method: 'post',
  11. data
  12. })
  13. };
  14. // 获取 西医病名
  15. export function getXDiseaseName(data) {
  16. return request({
  17. url: '/basis/knowlib/westQuery',
  18. method: 'post',
  19. data
  20. })
  21. };
  22. /**
  23. * 获取中医证型
  24. * @deprecated
  25. */
  26. export function getCCardType(data) {
  27. return request({
  28. url: '/basis/knowlib/symptomQuery',
  29. method: 'post',
  30. data
  31. })
  32. };
  33. /**
  34. * 获取中医治法
  35. * @deprecated
  36. */
  37. export function getCTherapy(data) {
  38. return request({
  39. url: '/basis/knowlib/getTherapyAll',
  40. method: 'post',
  41. data
  42. })
  43. };
  44. // 获取穴位信息
  45. export function getXueweiList(data) {
  46. return request({
  47. url: '/basis/knowlib/acupointQuery',
  48. method: 'post',
  49. data
  50. })
  51. };
  52. // 获取脉象接口
  53. export function getPulseSelect(data) {
  54. return request({
  55. url: '/basis/knowlib/pulseQuery',
  56. method: 'post',
  57. data
  58. })
  59. };
  60. // 获取舌象接口
  61. export function getTongueSelect(data) {
  62. return request({
  63. url: '/basis/knowlib/tongueQuery',
  64. method: 'post',
  65. data
  66. })
  67. };
  68. // 获取只能辩证 分类接口
  69. export function getDialecticalC(data) {
  70. return request({
  71. url: '/basis/knowlib/getSyndromeClassify',
  72. method: 'post',
  73. data
  74. })
  75. };
  76. // 获取只能辩证 症状
  77. export function getSymptoms(data) {
  78. return request1({
  79. url: '/basis/knowlib/getSyndromeGroup',
  80. method: 'post',
  81. data
  82. })
  83. };
  84. // 获取只能辩证 症状
  85. export function getSymptomsPain(data) {
  86. // ?page=' + data.page + '&limit=' + data.limit
  87. return request1({
  88. url: '/basis/knowlib/getSyndromeGroupPain',
  89. method: 'post',
  90. data
  91. })
  92. };
  93. // 获取疾病 查询列表
  94. export function getDiseaseList(data) {
  95. return request({
  96. url: '/basis/knowlib/diseaseQuery',
  97. method: 'post',
  98. data
  99. })
  100. };
  101. // 获取疾病详情
  102. export function getDiseasetDetail(data) {
  103. return request({
  104. url: '/basis/knowlib/diseaseInfoQuery?disid=' + data.disid,
  105. method: 'post',
  106. data
  107. })
  108. };
  109. // 获取只能辩证问卷接口
  110. export function getDialecticalq(data) {
  111. return request1({
  112. url: '/basis/knowlib/getSyndromeAsk',
  113. method: 'post',
  114. data
  115. })
  116. }
  117. // 提交智能辩证问卷
  118. export function submitDialetQ(data) {
  119. return request1({
  120. url: '/basis/knowlib/getSyndromeSymptom',
  121. method: 'post',
  122. data
  123. })
  124. };
  125. // 查询穴位
  126. export function getAcupoint(data) {
  127. return request({
  128. url: '/basis/knowlib/acupointQuery',
  129. method: 'post',
  130. data
  131. })
  132. };
  133. // 获取经络
  134. export function collateralChannels(data) {
  135. return request({
  136. url: '/basis/knowlib/meridianQuery',
  137. method: 'post',
  138. data
  139. })
  140. };
  141. // 获取穴位详情
  142. export function getAcupointD(data) {
  143. return request({
  144. url: '/basis/knowlib/acupointInfoQuery?acuid=' + data.acuid,
  145. method: 'post',
  146. data
  147. })
  148. };
  149. //获取名医验案列表
  150. export function getDoctorCaseL(data) {
  151. return request({
  152. url: '/basis/knowlib/verifyQuery',
  153. method: 'post',
  154. data
  155. })
  156. }
  157. // 获取名医验案前置页面数据
  158. export function getDoctorCaseIndexL(data) {
  159. return request({
  160. url: '/basis/knowlib/verifyIndexQuery',
  161. method: 'post',
  162. data
  163. })
  164. }
  165. // 获取名医验案详情接口
  166. export function getDCaseDetail(data) {
  167. return request({
  168. url: '/basis/knowlib/verifyInfoQuery?verId=' + data.verId,
  169. method: 'post',
  170. data
  171. })
  172. };
  173. //获取标准功效查询接口
  174. export function getEffectQuery(data) {
  175. return request({
  176. url: '/basis/knowlib/effectQuery?effictId=' + data.effictId + '&effecttype=' + data.effecttype,
  177. method: 'post',
  178. data
  179. })
  180. }
  181. // 获取中药
  182. export function getMedList(data) {
  183. return request({
  184. url: '/basis/knowlib/medicineQuery',
  185. method: 'post',
  186. data
  187. })
  188. }
  189. // 获取方剂列表
  190. export function getPrescriptionsList(data) {
  191. return request({
  192. url: '/basis/knowlib/prescriptionQuery?effected=' + data.effected,
  193. method: 'post',
  194. data
  195. })
  196. };
  197. // 获取方剂详情接口
  198. export function getPreDetal(data) {
  199. return request({
  200. url: '/basis/knowlib/prescriptionInfoQuery?preid=' + data.preid,
  201. method: 'post',
  202. data
  203. })
  204. };
  205. // 获取中药详情
  206. export function getMedDetail(data) {
  207. return request({
  208. url: '/basis/knowlib/medicineInfoQuery?matid=' + data.matid,
  209. method: 'post',
  210. data
  211. })
  212. };
  213. // 获取疾病分类
  214. export function getDiseaseClass(data) {
  215. return request({
  216. url: '/basis/knowlib/departmentQuery',
  217. method: 'post',
  218. data
  219. })
  220. };
  221. // 获取体质辨识问卷
  222. export function getPhysicalTest(data) {
  223. return request({
  224. url: `/basis/knowlib/questionnaireSelection/${data.basisPatientId}`,
  225. method: 'get',
  226. params: data
  227. })
  228. }
  229. // 获取基公卫 问卷内容
  230. export function getBasicQuestion(data) {
  231. return request({
  232. url: '/basis/knowlib/getPhysical2',
  233. method: 'post',
  234. data
  235. })
  236. }
  237. // 获取 体质辨识问卷 内容
  238. export function getPhysicalQ(data) {
  239. return request({
  240. url: '/basis/knowlib/getPhysical?groups=' + data.groups,
  241. method: 'post',
  242. data
  243. })
  244. };
  245. // 获取体质辨识结果
  246. export function getPhysicaRes(data) {
  247. return request({
  248. url: '/basis/knowlib/analysisgroup',
  249. method: 'post',
  250. data
  251. })
  252. };
  253. // 获取公卫问卷辨识结果
  254. export function getBasicRes(data) {
  255. return request({
  256. url: '/basis/knowlib/analysisgroup2',
  257. method: 'post',
  258. data
  259. })
  260. }
  261. // 获取合理用药信息 (机构药品)
  262. export function getRationalMed(data) {
  263. return request({
  264. // url: '/basis/knowlib/getMatInfo?matID=' + data.matID,
  265. url: '/basis/knowlib/getMatInfo1',
  266. method: 'post',
  267. data
  268. }).then(res => {
  269. try {
  270. if (res.data.matsjj) res.data.matsjj = (res.data.mattaboo || res.data.matsjj || '').replace(/\s/g, ' ');
  271. const patient = JSON.parse(sessionStorage.getItem('patiensInfo'));
  272. if (patient.sex === '男') res.data.matyfsjj = ''
  273. } catch (e) {}
  274. return res;
  275. });
  276. };
  277. // 获取合理用药信息 (平台药品)
  278. export function getRationalMedForPlat(data) {
  279. return request({
  280. // url: '/basis/knowlib/getMatInfoByPlat?matID=' + data.matID,
  281. url: '/basis/knowlib/getMatInfoByPlat1',
  282. method: 'post',
  283. data
  284. }).then(res => {
  285. try {
  286. if (res.data.matsjj) res.data.matsjj = (res.data.mattaboo || res.data.matsjj || '').replace(/\s/g, ' ');
  287. const patient = JSON.parse(sessionStorage.getItem('patiensInfo'));
  288. if (patient.sex === '男') res.data.matyfsjj = ''
  289. } catch (e) {}
  290. return res;
  291. });
  292. };
  293. // 推导处方接口
  294. export function inferRecipe(data) {
  295. return request({
  296. url: '/basis/knowlib/treatmentScheme',
  297. method: 'post',
  298. data
  299. })
  300. };
  301. // 名家验案 和方剂 转方/合方
  302. export function changeAndJoin(data) {
  303. return request1({
  304. url: "/test/outpatient/changePre",
  305. method: 'post',
  306. data
  307. })
  308. };
  309. // 获取经络详情
  310. export function getMerD(data) {
  311. return request({
  312. url: '/basis/knowlib/meridianInfoQuery?merid=' + data.merid,
  313. method: 'post',
  314. data
  315. })
  316. };
  317. export function getBookCategories() {
  318. return request1({
  319. url: '/book/bookClassify/list',
  320. method: 'post',
  321. }).then(res => res.Data.map(item => ({label: item['classifyName'], value: item['classifyId']})));
  322. }
  323. export function getBookList(query) {
  324. const data = {page: 1, limit: 40};
  325. for (const [key, value] of Object.entries(query)) {
  326. if (value) { data[key] = value; }
  327. }
  328. return request1({
  329. url: '/book/book/list',
  330. method: 'post',
  331. data,
  332. }).then(res => {
  333. if (res.Data == null) res.Data = {current: 1, total: 0, records: []};
  334. return {
  335. page: res.Data.current,
  336. total: res.Data.total,
  337. data: res.Data.records,
  338. };
  339. });
  340. }
  341. export function getBookListOfMy() {
  342. return request1({
  343. url: '/book/book/myBookshelf',
  344. method: 'post',
  345. }).then(res => {
  346. return {
  347. page: 1,
  348. total: res.Data.length,
  349. data: res.Data.map(item => Object.assign(item, {id: item.bookId})),
  350. };
  351. });
  352. }
  353. export function getBookListOfRecommend(id) {
  354. return request1({
  355. url: '/book/book/recommend',
  356. method: 'post',
  357. data: {id},
  358. }).then(res => res.Data.filter(item => item.id !== id));
  359. }
  360. export function getBook(id) {
  361. return request1({
  362. url: `/book/book/detail`,
  363. method: 'post',
  364. data: {id},
  365. }).then(res => res.Data);
  366. }
  367. export function getBookContent(data) {
  368. return request1({
  369. url: `/book/bookContent/detail`,
  370. method: 'post',
  371. data,
  372. }).then(res => res.Data.content || '(空)');
  373. }
  374. export function setBookStatus(id, status) {
  375. return request1({
  376. url: `/book/book/addBookshelf`,
  377. method: 'post',
  378. data: {
  379. ...status,
  380. bookId: id,
  381. },
  382. });
  383. }