diagnosis.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. import request from '@/utils/request.js'
  2. import {fromAnalysisModel} from "@/model/tongue-analysis.model";
  3. // 获取就诊病人信息
  4. export function getPatiiensMsg(data) {
  5. return request({
  6. url: `/outpatient/recordsMgr/${data}`,
  7. method: 'get',
  8. })
  9. };
  10. // 获取中医电子病历回显信息
  11. export function getEmrShowMsg(data) {
  12. return request({
  13. url: `/outpatient/electronicmedicalrecordMgr/infoByRecordsId?recordsId=${data.recordsId}`,
  14. method: 'post',
  15. data
  16. })
  17. };
  18. // 提交诊断页面数据
  19. export function addDiagnosisData(data) {
  20. return request({
  21. url: '/outpatient/diagnosisMgr/Add',
  22. method: 'post',
  23. data
  24. })
  25. };
  26. // 修改诊断页面数据
  27. export function editDiagnosisData(data) {
  28. return request({
  29. url: '/outpatient/diagnosisMgr/update',
  30. method: 'post',
  31. data
  32. })
  33. };
  34. // 开方获取患者基本信息
  35. export function getPatiensBasisM(data) {
  36. return request({
  37. url: '/test/outpatient/patientBaseInfo?patientId=' + data.patientId,
  38. method: 'post',
  39. // data
  40. })
  41. };
  42. // 获取表格 药品列表
  43. export function getTableDrug(data) {
  44. return request({
  45. url: '/test/outpatient/selectDrug?page=' + data.page + '&limit=' + data.limit,
  46. method: 'post',
  47. data
  48. })
  49. };
  50. //添加处方
  51. export function addRecipe(data) {
  52. return request({
  53. url: '/test/outpatient/addOutPatient',
  54. method: 'post',
  55. data
  56. })
  57. };
  58. //获取诊断页 回显数据
  59. export function getDiagnosisShowData(data) {
  60. return request({
  61. url: '/outpatient/diagnosisMgr/infoByRecordsId?recordsId=' + data.recordsId,
  62. method: 'post',
  63. })
  64. };
  65. // 获取处方回显数据
  66. export function getRecipeShowData(data) {
  67. return request({
  68. url: '/test/outpatient/getPrescription/' + data,
  69. method: 'get'
  70. })
  71. };
  72. // 通过 处方id 获取处方回显数据
  73. export function getRecipeDataByid(data) {
  74. return request({
  75. url: `/outpatient/patientprescriptionMgr/${data.pid}`,
  76. method: 'get'
  77. })
  78. };
  79. // 添加中医电子病历
  80. export function addEMR(data) {
  81. return request({
  82. url: '/outpatient/electronicmedicalrecordMgr/Add',
  83. method: 'post',
  84. data
  85. })
  86. };
  87. // 修改中医电子病历信息
  88. export function editEMR(data) {
  89. return request({
  90. url: '/outpatient/electronicmedicalrecordMgr/update',
  91. method: 'post',
  92. data
  93. })
  94. };
  95. // 回传his
  96. export function backToHis(data) {
  97. return request({
  98. url: '/outpatient/electronicmedicalrecordMgr/electronicmedicalRecordsReturnHis',
  99. method: 'post',
  100. data
  101. })
  102. }
  103. // 寄到本院 获取地址
  104. export function getAddressForHospital(data) {
  105. return request({
  106. url: '/test/outpatient/getAddress',
  107. method: 'post',
  108. data
  109. })
  110. }
  111. // 获取体质辨识列表接口
  112. export function getPhysicalList(data) {
  113. return request({
  114. url: '/outpatient/identificationMgr/listPain?page=' + data.page + '&limit=' + data.limit + '&name=' + data.name,
  115. method: 'post',
  116. data
  117. })
  118. };
  119. // 获取某i个用户的体质辨识记录
  120. export function getUserPhysicList(data) {
  121. return request({
  122. url: '/outpatient/identificationMgr/listPainInfo?patientId=' + data.patientId + '&limit=' + data.limit + '&page=' + data.page,
  123. method: 'post',
  124. data
  125. })
  126. };
  127. //体质辨识 添加
  128. export function addPhysicalList(data) {
  129. return request({
  130. url: '/outpatient/identificationMgr/Add',
  131. method: 'post',
  132. data
  133. })
  134. };
  135. // 获取体质辨识 详情
  136. export function getPhysicalDetail(data) {
  137. return request({
  138. url: `/outpatient/identificationresultMgr/${data.identid}`,
  139. method: 'get'
  140. })
  141. };
  142. // 获取体质辨识 详情
  143. export function getPhysicalDetailGy(data) {
  144. return request({
  145. url: `/outpatient/identificationMgr/selecthealthInterventionBydentificationId?dentificationId=${data.dentificationId}`,
  146. method: 'post',
  147. data
  148. })
  149. };
  150. // 提交体质辨识 医生建议
  151. export function submitDoctorjy(data) {
  152. return request({
  153. url: '/outpatient/identificationresultMgr/update',
  154. method: 'post',
  155. data
  156. })
  157. };
  158. // 提交健康干预
  159. export function submitDoctorGy(data) {
  160. return request({
  161. url: '/outpatient/identificationMgr/SavehealthIntervention',
  162. method: 'post',
  163. data
  164. })
  165. }
  166. // 删除体质辨识记录
  167. export function deletePhysicRecord(data) {
  168. return request({
  169. url: '/outpatient/identificationMgr/BatchDelete?ids=' + data.ids,
  170. method: 'post',
  171. data
  172. })
  173. };
  174. //根据选择的中药类型查询所属药房id
  175. export function getPharmacyID(data) {
  176. return request({
  177. url: '/basis/pharmacyMgr/getPidBytype?type=' + data.type,
  178. method: 'post',
  179. data
  180. })
  181. };
  182. // 切换药房 id
  183. export function changePharmacy(data) {
  184. if (data && Array.isArray(data.drugIds) && data.drugIds.length === 0) return Promise.resolve({
  185. "Data": [],
  186. "ResultInfo": "操作成功",
  187. "ResultCode": 0
  188. });
  189. return request({
  190. url: '/test/outpatient/changeDrug',
  191. method: 'post',
  192. data
  193. })
  194. };
  195. // 获取开方界面协定方数据
  196. export function getAgreeRecipe(data) {
  197. return request({
  198. url: '/test/outpatient/getPres?page=' + data.pageId + '&limit=' + data.pageSize,
  199. method: 'post',
  200. data
  201. })
  202. };
  203. // 根绝就诊记录id 获取就诊信息
  204. export function getSeeDByID(data) {
  205. return request({
  206. url: '/test/outpatient/byRecId',
  207. method: 'get',
  208. params: data
  209. })
  210. };
  211. // 获取病历详情数据
  212. export function getRecordDetail(data) {
  213. return request({
  214. url: '/outpatient/CaseManagement/' + data.id,
  215. method: 'get',
  216. params: data
  217. })
  218. }
  219. // 获取药品详细信息
  220. export function getDrugDetail(data) {
  221. return request({
  222. url: '/basis/stitutionsdrugMgr/stiDrugInfo?stiDrugId=' + data.stiDrugId,
  223. method: 'post',
  224. data
  225. })
  226. };
  227. //开方界面获取协定方详细信息
  228. export function getAccordDetail(data) {
  229. return request({
  230. url: '/test/outpatient/preInfo',
  231. method: 'get',
  232. params: data
  233. })
  234. };
  235. // 获取我最常用
  236. export function getMyOfenUse(data) {
  237. return request({
  238. url: '/test/outpatient/myused',
  239. method: 'get',
  240. params: data
  241. })
  242. };
  243. //协定方 转方 判断
  244. export function changeBasisPre(data) {
  245. return request({
  246. url: '/test/outpatient/changeBasisPre',
  247. method: 'post',
  248. data
  249. })
  250. };
  251. //专家经验转方判断
  252. export function changeExpre(data) {
  253. return request({
  254. url: '/test/outpatient/changeExpPre',
  255. method: 'post',
  256. data
  257. })
  258. }
  259. // 处方修改
  260. export function updateRecipe(data) {
  261. return request({
  262. url: '/test/outpatient/update',
  263. method: 'post',
  264. data
  265. })
  266. };
  267. // 开方页面选择药房
  268. export function customerQuery(data) {
  269. return request({
  270. url: "/basis/pharmacyMgr/customerQuery?type=" + data.type,
  271. method: 'post',
  272. data
  273. })
  274. }
  275. //智能辩证 问卷临时存储
  276. export function znQuestionSave(data) {
  277. return request({
  278. url: '/smartDialecticalQuestionnaireTempSave/tempSave',
  279. method: 'post',
  280. data
  281. })
  282. }
  283. // 只能辩证 问卷回显
  284. export function znQusetionShow(data) {
  285. return request({
  286. url: `/smartDialecticalQuestionnaireTempSave/echoData/${data.recordId}`,
  287. method: 'get',
  288. params: data
  289. })
  290. };
  291. // 处方是否支付
  292. export function recipeIsPay(params) {
  293. return request({
  294. url: `/outpatient/pay/checkPrescriptionPaymentStatus`, //params.preId // ${JSON.stringify(params)}
  295. method: 'post',
  296. // params
  297. data: params
  298. })
  299. }
  300. // 根据就诊记录id 查询 是否有处方
  301. export function getPreNumber(params) {
  302. return request({
  303. url: `/outpatient/recordsMgr/getPrescriptionNumberByRecordId/${params.pid}`,
  304. method: 'get',
  305. params
  306. })
  307. }
  308. // 获取药房 共享药房和 本地药房id
  309. export function getPharmacyIDS(params) {
  310. return request({
  311. url: `/basis/pharmacyMgr/getPharmacyIds`,
  312. method: 'get',
  313. params
  314. })
  315. }
  316. // 提交处方预览
  317. export function getRecipePriview(data) {
  318. return request({
  319. url: `/test/outpatient/addOutPatientPreview`,
  320. method: 'post',
  321. data
  322. })
  323. }
  324. // 获取中药制剂 包装单位
  325. export function getBzdw(params) {
  326. return request({
  327. url: '/test/outpatient/getBZDW',
  328. method: 'get',
  329. params
  330. })
  331. }
  332. // 获取健康跟踪记录 详情
  333. export function getHealthTrack(data) {
  334. return request({
  335. url: '/outpatient/identificationMgr/getHealthTrackingRecordBydentificationId?page=' + data.page + '&limit=' + data.limit + '&dentificationId=' + data.dentificationId,
  336. method: 'post',
  337. data
  338. })
  339. }
  340. // 新增健康跟踪记录
  341. export function addHealthTrack(data) {
  342. return request({
  343. url: '/outpatient/identificationMgr/addHealthTrackingRecord',
  344. method: 'post',
  345. data
  346. })
  347. }
  348. // 获取主要体质
  349. export function getMainPhysical(data) {
  350. return request({
  351. url: '/outpatient/identificationMgr/getAnalysisGroupItemName',
  352. method: 'get'
  353. })
  354. }
  355. // 中医体质统计分析
  356. export function getPhysicalTotalList(data) {
  357. return request({
  358. url: '/outpatient/identificationMgr/statisticalList?page=' + data.page + '&limit=' + data.limit,
  359. method: 'post',
  360. data
  361. })
  362. }
  363. // 中医体质统计分析导出
  364. export function exportPhysicalTotal(data) {
  365. return request({
  366. url: '/outpatient/identificationMgr/statisticalListExport?page=' + data.page + '&limit=' + data.limit,
  367. method: 'post',
  368. data
  369. })
  370. }
  371. // 中医体质分析详情 生成PDF
  372. export function createPdf(data) {
  373. return request({
  374. url: '/PDF/PDF',
  375. method: 'post',
  376. data
  377. })
  378. }
  379. // 查询是否健康干预锅
  380. export function findIsHealthGY(data) {
  381. return request({
  382. url: `/outpatient/identificationresultMgr/healthInterventionOrNot/${data.identid}`,
  383. method: 'get',
  384. params: data
  385. })
  386. }
  387. // 获取医保规则最大(最小)药味数
  388. export function getMaxMinDoaseNumber(data) {
  389. return request({
  390. url: '/basis/medicalInsuranceRegulationMgr/minimumAndMaximumDosageNumber',
  391. method: 'post',
  392. data
  393. })
  394. }
  395. export function getTongueAndFaceAnalysis(data) {
  396. return request({
  397. url: '/outpatient/electronicmedicalrecordMgr/getTongueFaceAnalysisResult',
  398. method: 'post',
  399. data,
  400. params: {recordsId: data.recordsId},
  401. }).then(res => {
  402. if (res.ResultCode == 0) {
  403. const tongue = fromAnalysisModel('tongue', res.Data);
  404. const face = fromAnalysisModel('face', res.Data);
  405. return res.Data = {
  406. id: res.Data.recordsid,
  407. time: res.Data.recordstime,
  408. tongue,
  409. face,
  410. cover: [tongue ? tongue.cover : null, face ? face.cover : null].filter(Boolean).flatMap(item => item),
  411. }, res;
  412. } else {
  413. throw res
  414. }
  415. })
  416. }
  417. export function getTongueAndFaceAnalysisRecords(patientId, page = 1, limit = 6) {
  418. // patientId = '8d12c55e-7a29-45f3-804d-ed12b0e27660'
  419. return request({
  420. url: '/outpatient/electronicmedicalrecordMgr/getRecordTfs',
  421. method: 'post',
  422. params: {patientId, page, limit},
  423. }).then(res => {
  424. if (res.ResultCode == 0) {
  425. return {
  426. total: res.Data.TotalRecordCount,
  427. data: res.Data.Items.map(item => {
  428. const tongue = fromAnalysisModel('tongue', item);
  429. const face = fromAnalysisModel('face', item);
  430. return {
  431. id: item.recordsid,
  432. time: item.recordstime,
  433. tongue,
  434. face,
  435. cover: [tongue ? tongue.cover : null, face ? face.cover : null].filter(Boolean).flatMap(item => item),
  436. }
  437. }),
  438. }
  439. } else {
  440. throw res
  441. }
  442. })
  443. }