血透系统PC前端

patient.js 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. import request from '@/utils/request'
  2. export function fetchList(params) {
  3. return request({
  4. url: '/api/patients',
  5. method: 'get',
  6. params: params
  7. })
  8. }
  9. export function fetchAllList() {
  10. return request({
  11. url: '/api/patients/all',
  12. method: 'get'
  13. })
  14. }
  15. export function GetPatientTotal() {
  16. return request({
  17. url: '/api/patients/total',
  18. method: 'get'
  19. })
  20. }
  21. export function generateDialysisNo() {
  22. return request({
  23. url: '/api/patients/generatedialysisno',
  24. method: 'get'
  25. })
  26. }
  27. export function createPatient(patient) {
  28. return request({
  29. url: '/api/patients/create',
  30. method: 'post',
  31. data: patient
  32. })
  33. }
  34. export function editPatient(id, patient) {
  35. return request({
  36. url: '/api/patients/edit?id=' + id,
  37. method: 'put',
  38. data: patient
  39. })
  40. }
  41. export function fetchPatient(id) {
  42. return request({
  43. url: '/api/patients/get?id=' + id,
  44. method: 'get'
  45. })
  46. }
  47. export function fetchPatientDialysisSolutions(params) {
  48. return request({
  49. url: '/api/patients/dialysissolutions',
  50. method: 'Get',
  51. params: params
  52. })
  53. }
  54. export function createPatientDialysisSolution(id, solution) {
  55. return request({
  56. url: '/api/patients/dialysissolution/create?patient=' + id,
  57. method: 'post',
  58. data: solution
  59. })
  60. }
  61. export function editPatientDialysisSolution(patient, id, solution) {
  62. return request({
  63. url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id,
  64. method: 'put',
  65. data: solution
  66. })
  67. }
  68. export function createChildPatientDialysisSolution(id, solution) {
  69. return request({
  70. url: '/api/patients/dialysissolution/child/create?patient=' + id,
  71. method: 'post',
  72. data: solution
  73. })
  74. }
  75. export function editChildPatientDialysisSolution(patient, id, solution) {
  76. return request({
  77. url: '/api/patients/dialysissolution/child/edit?patient=' + patient + '&id=' + id,
  78. method: 'put',
  79. data: solution
  80. })
  81. }
  82. export function editDialysisSolutionDetail(patient, id, solution) {
  83. return request({
  84. url: '/api/patients/dialysissolution/detail/edit?patient=' + patient + '&id=' + id,
  85. method: 'put',
  86. data: solution
  87. })
  88. }
  89. export function deleteDialysisSolution(id) {
  90. return request({
  91. url: '/api/patients/dialysissolution/delete?id=' + id,
  92. method: 'delete'
  93. })
  94. }
  95. export function createDryWeight(patient, weight) {
  96. return request({
  97. url: '/api/patients/dryweight/create?id=' + patient,
  98. method: 'post',
  99. data: weight
  100. })
  101. }
  102. export function getDryWeights(params) {
  103. return request({
  104. url: '/api/patients/dryweight/get',
  105. method: 'get',
  106. params: params
  107. })
  108. }
  109. export function getPatientDialysisRecords(params) {
  110. return request({
  111. url: '/api/patients/dialysisrecords',
  112. method: 'get',
  113. params: params
  114. })
  115. }
  116. export function getPatientProEducation(params) {
  117. return request({
  118. url: '/api/patients/proeducation',
  119. method: 'get',
  120. params: params
  121. })
  122. }
  123. export function getCourseOfDiseaseRecords(patient_id, start_time_ymd, end_time_ymd) {
  124. var params = {
  125. patient_id: patient_id,
  126. start_time: start_time_ymd,
  127. end_time: end_time_ymd
  128. }
  129. return request({
  130. url: '/api/patient/courses',
  131. method: 'get',
  132. params: params
  133. })
  134. }
  135. export function createCourseOfDiseaseRecord(patient_id, content) {
  136. var params = {
  137. patient_id: patient_id,
  138. content: content
  139. }
  140. return request({
  141. url: '/api/patient/course/create',
  142. method: 'post',
  143. params: params
  144. })
  145. }
  146. export function getRescueRecords(patient_id, start_time_ymd, end_time_ymd) {
  147. var params = {
  148. patient_id: patient_id,
  149. start_time: start_time_ymd,
  150. end_time: end_time_ymd
  151. }
  152. return request({
  153. url: '/api/patient/rescues',
  154. method: 'get',
  155. params: params
  156. })
  157. }
  158. export function createRescueRecord(patient_id, content) {
  159. var params = {
  160. patient_id: patient_id,
  161. content: content
  162. }
  163. return request({
  164. url: '/api/patient/rescue/create',
  165. method: 'post',
  166. params: params
  167. })
  168. }
  169. export function deleteCourseOfDiseaseRecords(patient_id, ids_str) {
  170. var params = {
  171. patient_id: patient_id,
  172. ids: ids_str
  173. }
  174. return request({
  175. url: '/api/patient/course/delete',
  176. method: 'post',
  177. params: params
  178. })
  179. }
  180. export function deleteRescueRecords(patient_id, ids_str) {
  181. var params = {
  182. patient_id: patient_id,
  183. ids: ids_str
  184. }
  185. return request({
  186. url: '/api/patient/rescue/delete',
  187. method: 'post',
  188. params: params
  189. })
  190. }
  191. export function EditLapseto(patient_id, data) {
  192. return request({
  193. url: '/api/patients/lapseto/edit?id=' + patient_id,
  194. method: 'post',
  195. data: data
  196. })
  197. }
  198. export function PostSearch(keyword) {
  199. return request({
  200. url: '/api/patients/search?keyword=' + keyword,
  201. method: 'post'
  202. })
  203. }
  204. export function OpenView(id) {
  205. return request({
  206. url: '/api/patients/querypatientbyId',
  207. method: 'Get',
  208. params: {
  209. id: id
  210. }
  211. })
  212. }
  213. export function code(id) {
  214. return request({
  215. url: '/api/patients/codebyId',
  216. method: 'Get',
  217. params: {
  218. id: id
  219. }
  220. })
  221. }