|
|
@@ -12,20 +12,12 @@ import {
|
|
|
transform,
|
|
|
} from '#/request/schema';
|
|
|
|
|
|
-import {
|
|
|
- mockDeleteTreatmentPlanMethod,
|
|
|
- mockEditTreatmentPlanMethod,
|
|
|
- mockGetTreatmentPlanMethod,
|
|
|
- mockListTreatmentPlanMethod,
|
|
|
- USE_TREATMENT_PLAN_MOCK,
|
|
|
-} from './treatment-plan.mock';
|
|
|
import {
|
|
|
decodeTreatmentPlan,
|
|
|
encodeTreatmentPlan,
|
|
|
encodeTreatmentPlanQuery,
|
|
|
} from './treatment-plan.schema';
|
|
|
|
|
|
-export { USE_TREATMENT_PLAN_MOCK } from './treatment-plan.mock';
|
|
|
export type {
|
|
|
TreatmentPlanSubmitVO,
|
|
|
TreatmentPlanVO,
|
|
|
@@ -34,16 +26,12 @@ export { TreatmentPlanVOSchema } from './treatment-plan.schema';
|
|
|
|
|
|
/** 诊疗方案分页列表 */
|
|
|
export function listTreatmentPlanMethod(...args: PageQueryMethodArgs) {
|
|
|
- if (USE_TREATMENT_PLAN_MOCK) {
|
|
|
- return mockListTreatmentPlanMethod(...args) as any;
|
|
|
- }
|
|
|
-
|
|
|
const { params, data } = pageQueryArgsTransform(
|
|
|
args,
|
|
|
encodeTreatmentPlanQuery,
|
|
|
);
|
|
|
return httpClient.Post(
|
|
|
- `/wis-pc/outcome/tpManage/page`,
|
|
|
+ `/wis-pc/outcome/therapyPlanManage/page`,
|
|
|
{ ...params, ...data },
|
|
|
{
|
|
|
params,
|
|
|
@@ -55,12 +43,8 @@ export function listTreatmentPlanMethod(...args: PageQueryMethodArgs) {
|
|
|
|
|
|
/** 新增诊疗方案 */
|
|
|
export function createTreatmentPlanMethod(vo: TreatmentPlanSubmitVO) {
|
|
|
- if (USE_TREATMENT_PLAN_MOCK) {
|
|
|
- return mockEditTreatmentPlanMethod(vo) as any;
|
|
|
- }
|
|
|
-
|
|
|
return httpClient.Post(
|
|
|
- `/wis-pc/outcome/tpManage/add`,
|
|
|
+ `/wis-pc/outcome/therapyPlanManage/add`,
|
|
|
encodeTreatmentPlan(vo),
|
|
|
{
|
|
|
name: 'outcome-tp:edit',
|
|
|
@@ -71,12 +55,8 @@ export function createTreatmentPlanMethod(vo: TreatmentPlanSubmitVO) {
|
|
|
|
|
|
/** 修改诊疗方案 */
|
|
|
export function updateTreatmentPlanMethod(vo: TreatmentPlanSubmitVO) {
|
|
|
- if (USE_TREATMENT_PLAN_MOCK) {
|
|
|
- return mockEditTreatmentPlanMethod(vo) as any;
|
|
|
- }
|
|
|
-
|
|
|
return httpClient.Post(
|
|
|
- `/wis-pc/outcome/tpManage/update`,
|
|
|
+ `/wis-pc/outcome/therapyPlanManage/update`,
|
|
|
encodeTreatmentPlan(vo),
|
|
|
{
|
|
|
name: 'outcome-tp:edit',
|
|
|
@@ -92,12 +72,8 @@ export function editTreatmentPlanMethod(vo: TreatmentPlanSubmitVO) {
|
|
|
|
|
|
/** 诊疗方案详情 */
|
|
|
export function getTreatmentPlanMethod(vo: Partial<TreatmentPlanVO>) {
|
|
|
- if (USE_TREATMENT_PLAN_MOCK) {
|
|
|
- return mockGetTreatmentPlanMethod(vo) as any;
|
|
|
- }
|
|
|
-
|
|
|
return httpClient.Post(
|
|
|
- `/wis-pc/outcome/tpManage/detail/${vo.id}`,
|
|
|
+ `/wis-pc/outcome/therapyPlanManage/detail/${vo.id}`,
|
|
|
{},
|
|
|
{
|
|
|
hitSource: /^outcome-tp:edit/,
|
|
|
@@ -108,12 +84,8 @@ export function getTreatmentPlanMethod(vo: Partial<TreatmentPlanVO>) {
|
|
|
|
|
|
/** 删除诊疗方案 */
|
|
|
export function deleteTreatmentPlanMethod(vo: Pick<TreatmentPlanVO, 'id'>) {
|
|
|
- if (USE_TREATMENT_PLAN_MOCK) {
|
|
|
- return mockDeleteTreatmentPlanMethod(vo) as any;
|
|
|
- }
|
|
|
-
|
|
|
return httpClient.Post(
|
|
|
- `/wis-pc/outcome/tpManage/delete/${vo.id}`,
|
|
|
+ `/wis-pc/outcome/therapyPlanManage/delete/${vo.id}`,
|
|
|
{},
|
|
|
{
|
|
|
name: 'outcome-tp:delete',
|