shou-shu-shen-qing.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // @ts-ignore
  2. import request from "@/utils/request";
  3. import requestV2 from "../../utils/request-v2";
  4. import {OpRecord} from "../../ts-type/op-record";
  5. let url = '/shouShuShenQing/'
  6. export function getOpRecord(patNo, times) {
  7. return requestV2({
  8. url: url + 'getOpRecord',
  9. method: 'get',
  10. params: {patNo, times}
  11. })
  12. }
  13. export function huoQuShouShu(data) {
  14. return request({
  15. url: url + 'huoQuShouShu',
  16. method: 'post',
  17. data
  18. })
  19. }
  20. export function huoQuShouShuMingCheng(patNo, times, name) {
  21. return request({
  22. url: url + 'huoQuShouShuMingCheng',
  23. method: 'get',
  24. params: {patNo, times, name}
  25. })
  26. }
  27. export function huoQuShouShuShenQingDaYing(patNo, times, recordId) {
  28. return request({
  29. url: url + 'huoQuShouShuShenQingDaYing',
  30. method: 'get',
  31. params: {patNo, times, recordId}
  32. })
  33. }
  34. export function fenLeiXiangQing(code, name, total, currentPage, pageSize) {
  35. return request({
  36. url: url + 'fenLeiXiangQing',
  37. method: 'get',
  38. params: {code, name, total, currentPage, pageSize}
  39. })
  40. }
  41. /**
  42. * 获取手术内容
  43. * @param name 名称
  44. * @param type 类型
  45. * @returns {*}
  46. */
  47. export function obtainSurgicalItems(name, type) {
  48. return request({
  49. url: url + 'obtainSurgicalItems',
  50. method: 'get',
  51. params: {name, type}
  52. })
  53. }
  54. export function getDoctorByOpCode(opCode: string) {
  55. return requestV2<{ code: string }[]>({
  56. url: url + 'getDoctorByOpCode',
  57. method: 'get',
  58. params: {opCode}
  59. })
  60. }
  61. export function huoQuShouShuBuWei(name) {
  62. return request({
  63. url: url + 'huoQuShouShuBuWei',
  64. method: 'get',
  65. params: {name}
  66. })
  67. }
  68. export function preoperativeDiscussion(patNo, times, count) {
  69. return request({
  70. url: url + 'preoperativeDiscussion',
  71. method: 'get',
  72. params: {patNo, times, count}
  73. })
  74. }
  75. export function shanChuShouShu(recordId) {
  76. return request({
  77. url: url + 'shanChuShouShu',
  78. method: 'get',
  79. params: {recordId}
  80. })
  81. }
  82. export function addASurgicalSite(name) {
  83. return request({
  84. url: url + 'addASurgicalSite',
  85. method: 'get',
  86. params: {name}
  87. })
  88. }
  89. export function removeSurgicalSite(code) {
  90. return request({
  91. url: url + 'removeSurgicalSite',
  92. method: 'get',
  93. params: {code}
  94. })
  95. }
  96. export function applicationOpRecord(data) {
  97. return requestV2({
  98. url: url + 'applicationOpRecord',
  99. method: 'post',
  100. data
  101. })
  102. }
  103. export async function getSurgeryDetail(patNo, times, recordId) {
  104. const res = await requestV2<{
  105. opRecord: OpRecord,
  106. list: {
  107. reqNo: number;
  108. code: string;
  109. name: string;
  110. type: number;
  111. sort: number
  112. }[]
  113. }>({
  114. url: url + "getSurgeryDetail",
  115. method: 'get',
  116. params: {patNo, times, recordId}
  117. })
  118. const diagList = []
  119. const opCodeList = []
  120. res.list.forEach(item => {
  121. if (item.type === 1) {
  122. opCodeList.push(item)
  123. } else {
  124. diagList.push(item)
  125. }
  126. })
  127. res.opRecord.diagList = diagList
  128. res.opRecord.opCodeList = opCodeList
  129. return res.opRecord
  130. }