123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- import request from '@/utils/request'
-
- export function getAdviceConfig(type) {
- return request({
- url: '/api/getadviceconfigs?type=' + type,
- method: 'get'
- })
- }
-
- export function getAllAdviceConfig() {
- return request({
- url: '/api/getalladviceconfig',
- method: 'get'
- })
- }
-
- export function CreateDoctorAdvice(id, advice) {
- return request({
- url: '/api/patients/advice/create?id=' + id,
- method: 'post',
- data: advice
- })
- }
-
- export function EditDoctorAdvice(patient, id, advice) {
- return request({
- url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient,
- method: 'Put',
- data: advice
- })
- }
-
- export function ExecDoctorAdvice(patient, id, time,mode) {
- var params = {
- id: id,
- patient: patient,
- execution_time: time,
- mode:mode
- }
- return request({
- url: '/api/patients/advice/exec',
- method: 'Post',
- params: params
- })
- }
- export function CheckDoctorAdvice(patient, id,mode) {
- var params = {
- id: id,
- patient: patient,
- mode:mode
- // execution_time: time,
- }
- return request({
- url: '/api/patients/advice/check',
- method: 'Post',
- params: params
- })
- }
- export function CheckGroupAdvice(groupno) {
- var params = {
- groupno: groupno
- }
- return request({
- url: '/api/patients/advice/checkgroup',
- method: 'Post',
- params: params
- })
- }
-
- export function getDoctorAdviceList(params) {
- return request({
- url: '/api/patients/advices',
- method: 'Get',
- params: params
- })
- }
-
- export function StopDoctorAdvice(id, reason) {
- return request({
- url: '/api/patients/advice/stop?id=' + id,
- method: 'Post',
- data: reason
- })
- }
-
- export function StopGroupAdvice(groupno, reason) {
- return request({
- url: '/api/patients/advice/stopgroup?groupno=' + groupno,
- method: 'Post',
- data: reason
- })
- }
-
- export function ExecGroupAdvice(groupno, time) {
- return request({
- url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time,
- method: 'Post'
- })
- }
-
- export function DeleteDoctorAdvice(id) {
- return request({
- url: '/api/patients/advice/delete?id=' + id,
- method: 'Delete'
- })
- }
-
- export function CreateDrugDic(data) {
- return request({
- url: '/api/drugdic/create',
- method: 'post',
- data: data
- })
- }
- export function UpdateDrugDic(id, data) {
- return request({
- url: '/api/drugdic/update?id=' + id,
- method: 'put',
- data: data
- })
- }
- export function DeleteDrugDic(id) {
- return request({
- url: '/api/drugdic/delete?id=' + id,
- method: 'delete'
- })
- }
-
- export function CreateDrugWay(data) {
- return request({
- url: '/api/drugway/create',
- method: 'post',
- data: data
- })
- }
-
- export function UpdateDrugWay(id, data) {
- return request({
- url: '/api/drugway/update?id=' + id,
- method: 'put',
- data: data
- })
- }
- export function DeleteDrugWay(id) {
- return request({
- url: '/api/drugway/delete?id=' + id,
- method: 'delete'
- })
- }
-
- export function CreateExecutionFrequency(data) {
- return request({
- url: '/api/executionfrequency/create',
- method: 'post',
- data: data
- })
- }
-
- export function UpdateExecutionFrequency(id, data) {
- return request({
- url: '/api/executionfrequency/update?id=' + id,
- method: 'put',
- data: data
- })
- }
- export function DeleteExecutionFrequency(id) {
- return request({
- url: '/api/executionfrequency/delete?id=' + id,
- method: 'delete'
- })
- }
- export function CreateAdviceTemplate(data) {
- return request({
- url: '/api/advicetemplate/create',
- method: 'post',
- data: data
- })
- }
-
- export function UpdateAdviceTemplate(id, data) {
- return request({
- url: '/api/advicetemplate/update?id=' + id,
- method: 'put',
- data: data
- })
- }
- export function DeleteAdviceTemplate(id, template_id, parent_id) {
- return request({
- url: '/api/advicetemplate/delete?id=' + id + '&template_id=' + template_id + '&parent_id=' + parent_id,
- method: 'delete'
- })
- }
-
- export function postAdviceTemplate(params, name, advice_type) {
- return request({
- url: '/api/advicetemplate/create?template_name=' + name + '&advice_type=' + advice_type,
- method: 'post',
- data: params
- })
- }
-
- export function CreateGroupAdvice(id, groupno, advices) {
- if (advices.remind > 0) {
- return request({
- url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
- method: 'post',
- data: advices
- })
- } else {
- return request({
- url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
- method: 'post',
- data: advices
- })
- }
- }
- export function DeleteGroupAdvice(groupno) {
- return request({
- url: '/api/patients/advice/deletegroup?groupno=' + groupno,
- method: 'delete'
- })
- }
-
- export function getAllAdviceTemplate() {
- return request({
- url: '/api/advicetemplate/list',
- method: 'get'
- })
- }
-
- export function CreateSingleAdviceTemplate(advices) {
- return request({
- url: '/api/advicetemplate/add',
- method: 'post',
- params: advices
-
- })
- }
- export function DeleteParentAdviceTemplate(id) {
- return request({
- url: '/api/adviceparenttemplate/delete?template_id=' + id,
- method: 'delete'
-
- })
- }
-
- export function CreateSubAdvice(params) {
- return request({
- url: '/api/subadvice/create',
- method: 'post',
- params: params
- })
- }
-
- export function updateTemplateName(params) {
- return request({
- url: '/api/template/modify',
- method: 'post',
- params: params
- })
- }
-
- export function getDoctorAdviceConfig() {
- return request({
- url: '/api/adviceconfig/get',
- method: 'get'
- })
- }
-
- export function postDoctorAdviceConfig(params) {
- return request({
- url: '/api/adviceconfig/isopen',
- method: 'post',
- params: params
- })
- }
-
- export function getDoctorInitConfig() {
- return request({
- url: '/api/advicetemplate/init/get',
- method: 'get'
- })
- }
-
- export function PostInitAdviceTemplate(params) {
- return request({
- url: '/api/advicetemplate/init/commit',
- method: 'post',
- params: params
-
- })
- }
-
- export function getPrintInfo(data) {
- return request({
- url: '/api/advicetemplate/getprintinfo',
- method: 'post',
- data: data
- })
- }
|