advice.js 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. import request from '@/utils/request'
  2. export function getAdviceConfig(type) {
  3. return request({
  4. url: '/api/getadviceconfigs?type=' + type,
  5. method: 'get'
  6. })
  7. }
  8. export function getAllAdviceConfig() {
  9. return request({
  10. url: '/api/getalladviceconfig',
  11. method: 'get'
  12. })
  13. }
  14. export function CreateDoctorAdvice(id, advice) {
  15. return request({
  16. url: '/api/patients/advice/create?id=' + id,
  17. method: 'post',
  18. data: advice
  19. })
  20. }
  21. export function EditDoctorAdvice(patient, id, advice) {
  22. return request({
  23. url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient,
  24. method: 'Put',
  25. data: advice
  26. })
  27. }
  28. export function ExecDoctorAdvice(patient, id, time,mode) {
  29. var params = {
  30. id: id,
  31. patient: patient,
  32. execution_time: time,
  33. mode:mode
  34. }
  35. return request({
  36. url: '/api/patients/advice/exec',
  37. method: 'Post',
  38. params: params
  39. })
  40. }
  41. export function CheckDoctorAdvice(patient, id,mode) {
  42. var params = {
  43. id: id,
  44. patient: patient,
  45. mode:mode
  46. // execution_time: time,
  47. }
  48. return request({
  49. url: '/api/patients/advice/check',
  50. method: 'Post',
  51. params: params
  52. })
  53. }
  54. export function CheckGroupAdvice(groupno) {
  55. var params = {
  56. groupno: groupno
  57. }
  58. return request({
  59. url: '/api/patients/advice/checkgroup',
  60. method: 'Post',
  61. params: params
  62. })
  63. }
  64. export function getDoctorAdviceList(params) {
  65. return request({
  66. url: '/api/patients/advices',
  67. method: 'Get',
  68. params: params
  69. })
  70. }
  71. export function StopDoctorAdvice(id, reason) {
  72. return request({
  73. url: '/api/patients/advice/stop?id=' + id,
  74. method: 'Post',
  75. data: reason
  76. })
  77. }
  78. export function StopGroupAdvice(groupno, reason) {
  79. return request({
  80. url: '/api/patients/advice/stopgroup?groupno=' + groupno,
  81. method: 'Post',
  82. data: reason
  83. })
  84. }
  85. export function ExecGroupAdvice(groupno, time) {
  86. return request({
  87. url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time,
  88. method: 'Post'
  89. })
  90. }
  91. export function DeleteDoctorAdvice(id) {
  92. return request({
  93. url: '/api/patients/advice/delete?id=' + id,
  94. method: 'Delete'
  95. })
  96. }
  97. export function CreateDrugDic(data) {
  98. return request({
  99. url: '/api/drugdic/create',
  100. method: 'post',
  101. data: data
  102. })
  103. }
  104. export function UpdateDrugDic(id, data) {
  105. return request({
  106. url: '/api/drugdic/update?id=' + id,
  107. method: 'put',
  108. data: data
  109. })
  110. }
  111. export function DeleteDrugDic(id) {
  112. return request({
  113. url: '/api/drugdic/delete?id=' + id,
  114. method: 'delete'
  115. })
  116. }
  117. export function CreateDrugWay(data) {
  118. return request({
  119. url: '/api/drugway/create',
  120. method: 'post',
  121. data: data
  122. })
  123. }
  124. export function UpdateDrugWay(id, data) {
  125. return request({
  126. url: '/api/drugway/update?id=' + id,
  127. method: 'put',
  128. data: data
  129. })
  130. }
  131. export function DeleteDrugWay(id) {
  132. return request({
  133. url: '/api/drugway/delete?id=' + id,
  134. method: 'delete'
  135. })
  136. }
  137. export function CreateExecutionFrequency(data) {
  138. return request({
  139. url: '/api/executionfrequency/create',
  140. method: 'post',
  141. data: data
  142. })
  143. }
  144. export function UpdateExecutionFrequency(id, data) {
  145. return request({
  146. url: '/api/executionfrequency/update?id=' + id,
  147. method: 'put',
  148. data: data
  149. })
  150. }
  151. export function DeleteExecutionFrequency(id) {
  152. return request({
  153. url: '/api/executionfrequency/delete?id=' + id,
  154. method: 'delete'
  155. })
  156. }
  157. export function CreateAdviceTemplate(data) {
  158. return request({
  159. url: '/api/advicetemplate/create',
  160. method: 'post',
  161. data: data
  162. })
  163. }
  164. export function UpdateAdviceTemplate(id, data) {
  165. return request({
  166. url: '/api/advicetemplate/update?id=' + id,
  167. method: 'put',
  168. data: data
  169. })
  170. }
  171. export function DeleteAdviceTemplate(id, template_id, parent_id) {
  172. return request({
  173. url: '/api/advicetemplate/delete?id=' + id + '&template_id=' + template_id + '&parent_id=' + parent_id,
  174. method: 'delete'
  175. })
  176. }
  177. export function postAdviceTemplate(params, name, advice_type) {
  178. return request({
  179. url: '/api/advicetemplate/create?template_name=' + name + '&advice_type=' + advice_type,
  180. method: 'post',
  181. data: params
  182. })
  183. }
  184. export function CreateGroupAdvice(id, groupno, advices) {
  185. if (advices.remind > 0) {
  186. return request({
  187. url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
  188. method: 'post',
  189. data: advices
  190. })
  191. } else {
  192. return request({
  193. url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
  194. method: 'post',
  195. data: advices
  196. })
  197. }
  198. }
  199. export function DeleteGroupAdvice(groupno) {
  200. return request({
  201. url: '/api/patients/advice/deletegroup?groupno=' + groupno,
  202. method: 'delete'
  203. })
  204. }
  205. export function getAllAdviceTemplate() {
  206. return request({
  207. url: '/api/advicetemplate/list',
  208. method: 'get'
  209. })
  210. }
  211. export function CreateSingleAdviceTemplate(advices) {
  212. return request({
  213. url: '/api/advicetemplate/add',
  214. method: 'post',
  215. params: advices
  216. })
  217. }
  218. export function DeleteParentAdviceTemplate(id) {
  219. return request({
  220. url: '/api/adviceparenttemplate/delete?template_id=' + id,
  221. method: 'delete'
  222. })
  223. }
  224. export function CreateSubAdvice(params) {
  225. return request({
  226. url: '/api/subadvice/create',
  227. method: 'post',
  228. params: params
  229. })
  230. }
  231. export function updateTemplateName(params) {
  232. return request({
  233. url: '/api/template/modify',
  234. method: 'post',
  235. params: params
  236. })
  237. }
  238. export function getDoctorAdviceConfig() {
  239. return request({
  240. url: '/api/adviceconfig/get',
  241. method: 'get'
  242. })
  243. }
  244. export function postDoctorAdviceConfig(params) {
  245. return request({
  246. url: '/api/adviceconfig/isopen',
  247. method: 'post',
  248. params: params
  249. })
  250. }
  251. export function getDoctorInitConfig() {
  252. return request({
  253. url: '/api/advicetemplate/init/get',
  254. method: 'get'
  255. })
  256. }
  257. export function PostInitAdviceTemplate(params) {
  258. return request({
  259. url: '/api/advicetemplate/init/commit',
  260. method: 'post',
  261. params: params
  262. })
  263. }
  264. export function getPrintInfo(data) {
  265. return request({
  266. url: '/api/advicetemplate/getprintinfo',
  267. method: 'post',
  268. data: data
  269. })
  270. }