| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420 |
- import type { List } from '@/model';
- import type { SupplierQuery, SupplierModel, SystemItemModel, SystemIteQuery, SystemCwModel, OpenConditioningSchemeModel, ConditioningSchemeModel } from '@/model/care.model';
- import request from '@/request/alova';
- // 供应商搜索列表
- export function supplierMethod(page: number, size: number, query?: SupplierQuery) {
- return request.Post<List<SupplierModel>>('/fdhb-pc/conditioningManage/supplier/pageCpSupplier', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 新增和编辑供应商
- export function supplierEditMethod(data: Partial<SupplierModel>) {
- return data?.id
- ? request.Post(`/fdhb-pc/conditioningManage/supplier/updateCpSupplier`, { ...data, id: data.id }, { name: 'edit-supplier' })
- : request.Post(`/fdhb-pc/conditioningManage/supplier/addCpSupplier`, { ...data }, { name: 'edit-supplier' });
- }
- // 删除供应商
- export function supplierDeleteMethod(data: Partial<SupplierModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/supplier/deleteCpSupplier/${data.id}`, {
- name: 'update-supplier',
- cacheFor: null,
- });
- }
- //系统项目列表
- export function pageSystemCpMethod(page: number, size: number, query?: SystemIteQuery) {
- return request.Post<List<SystemItemModel>>('/fdhb-pc/conditioningManage/program/pageSystemCp', query ?? {}, {
- // hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 获取所有的系统项目
- export function getAllSystemCpMethod() {
- return request.Post(
- '/fdhb-pc/conditioningManage/program/getAllSystemCp',
- {},
- {
- name: 'get-all-system-cp',
- cacheFor: null,
- }
- );
- }
- // 新增和编辑系统项目和新增编辑项目列表。 项目列表就是机构项目
- export function systemCpEditMethod(data: Partial<SystemItemModel>) {
- console.log(data, 'data==>', data.addType,data.id,data.isType);
- if(data.isType === 'itemsList'){
- delete data.id;
- }
- if (data.addType === 'system') {
- return data?.id
- ? request.Post(`/fdhb-pc/conditioningManage/program/updateSystemCp`, { ...data, id: data.id }, { name: 'edit-system-cp' })
- : request.Post(`/fdhb-pc/conditioningManage/program/addSystemCp`, { ...data }, { name: 'edit-system-cp' });
- } else if (data.addType === 'itemsList') {
- return data?.id
- ? request.Post(`/fdhb-pc/conditioningManage/program/updateInstitutionCp`, { ...data, id: data.id }, { name: 'edit-system-cp' })
- : request.Post(`/fdhb-pc/conditioningManage/program/addInstitutionCp`, { ...data }, { name: 'edit-system-cp' });
- }
- }
- // 删除系统项目
- export function deleteSystemCpMethod(data: Partial<SystemItemModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/program/deleteSystemCp/${data.id}`, {
- name: 'delete-system-cp',
- cacheFor: null,
- });
- }
- // 选择引入调理方案
- export function selectSystemCpMethod(data: Array<string>) {
- return request.Post(`/fdhb-pc/conditioningManage/program/copyCp`, [...data], {
- name: 'select-system-cp',
- cacheFor: null,
- });
- }
- // 机构待确认列表
- export function pageOrgConfirmMethod(page: number, size: number, query?: SystemIteQuery) {
- return request.Post<List<SystemItemModel>>('/fdhb-pc/conditioningManage/program/pageUnconfirmedCp', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 待确认列表删除
- export function deleteOrgConfirmMethod(data: Partial<SystemItemModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/program/deleteUnconfirmedCp/${data.id}`, {
- name: 'delete-org-confirm',
- cacheFor: null,
- });
- }
- // 机构待确认列表确认
- export function confirmOrgConfirmMethod(data: Partial<SystemItemModel>) {
- return request.Post(
- `/fdhb-pc/conditioningManage/program/confirmedCp`,
- { ...data },
- {
- name: 'confirm-org-confirm',
- cacheFor: null,
- }
- );
- }
- // 已确认项目列表
- export function pageConfirmedCpMethod(page: number, size: number, query?: SystemIteQuery) {
- return request.Post('/fdhb-pc/conditioningManage/program/pageInstitutionCp', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 获取服务包内容里的列表
- export function getCpContentListMethod() {
- return request.Post(`/fdhb-pc/conditioningManage/program/getAllInstitutionCp`, {});
- }
- // 已确认项目列表删除
- export function deleteConfirmedCpMethod(data: Partial<SystemItemModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/program/deleteInstitutionCp/${data.id}`, {
- name: 'delete-confirmed-cp',
- cacheFor: null,
- });
- }
- // 获取所有的供应商
- export function getAllSupplierMethod(data: Record<string, any>) {
- return request.Post(
- '/fdhb-pc/conditioningManage/supplier/getAllCpSupplier',
- { ...data },
- {
- name: 'get-all-supplier',
- cacheFor: null,
- }
- );
- }
- // 获取系统调理包列表
- export function getSystemCpListMethod(page: number, size: number, query?: SystemIteQuery) {
- return request.Post<List<SystemCwModel>>('/fdhb-pc/conditioningManage/wrap/pageSystemCw', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- name: 'get-system-cp-list',
- cacheFor: null,
- });
- }
- // 删除系统调理包
- export function deleteSystemCwMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/wrap/deleteSystemCw/${data.id}`, {
- name: 'delete-system-cw',
- cacheFor: null,
- });
- }
- // 新增和编辑系统调理包
- export function addSystemCwMethod(data: Partial<SystemCwModel>) {
- return data?.id
- ? request.Post(`/fdhb-pc/conditioningManage/wrap/updateSystemCw`, { ...data, id: data.id }, { name: 'edit-system-cw' })
- : request.Post(`/fdhb-pc/conditioningManage/wrap/addSystemCw`, { ...data }, { name: 'add-system-cw' });
- }
- // 获取系统调理包详情
- export function getSystemCwDetailMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/wrap/getCwDetailById/${data.id}`, {
- name: 'get-system-cw-detail',
- cacheFor: null,
- });
- }
- // 根据调理方案id获取调理方案详情
- export function getConditioningSchemeDetailMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/program/getCpDetailById/${data.id || data.sourceId}`, {
- name: 'get-system-cw-detail',
- cacheFor: null,
- });
- }
- // 疾病分页查查询
- export function pageMedicineMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pageDiagnoseDisease`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 证型分页查询
- export function pageDiagnoseTypeMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pageDiagnoseSyndrome`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 症状分页查询
- export function pageDiagnoseSymptomMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pageDiagnoseSymptom`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 穴位分页查询
- export function pageAcupointMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pageAcuPoint`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 经络分页查询
- export function pageMeridianMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pageAcuMeridian`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 体质分页查询
- export function pagePhysicalTypeMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post(
- `/fdhb-pc/common/pagePhysicalType`,
- { page, limit: size, keyWord: query?.keyword, ...query },
- {
- transform(data: any, headers) {
- return {
- data: data.records,
- total: data.total,
- };
- },
- }
- );
- }
- // 机构调理包分页列表
- export function pageOrgCwMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post<List<SupplierModel>>('/fdhb-pc/conditioningManage/wrap/pageInstitutionCw', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // export function pageOrgCwMethod(page: number, size: number, query?: Record<string, any>) {
- // return request.Post<List<SupplierModel>>('/fdhb-pc/conditioningManage/wrap/pageInstitutionCw', query ?? {}, {
- // hitSource: /plan$/, // 匹配失效源
- // params: { pageNum: page, pageSize: size },
- // });
- // }
- // 新增机构调理包
- export function addOrgCwMethod(data: Partial<SystemCwModel>) {
- return data?.id
- ? request.Post(`/fdhb-pc/conditioningManage/wrap/updateInstitutionCw`, { ...data, id: data.id }, { name: 'edit-org-cw' })
- : request.Post(`/fdhb-pc/conditioningManage/wrap/addInstitutionCw`, { ...data }, { name: 'add-org-cw' });
- }
- // 删除机构调理包
- export function deleteOrgCwMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/wrap/deleteInstitutionCw/${data.id}`, {
- name: 'delete-org-cw',
- cacheFor: null,
- });
- }
- // 为患者开具调理方案
- export function addConditioningSchemeMethod(data: Partial<OpenConditioningSchemeModel>) {
- return request.Post(`/fdhb-pc/patientCrManage/addPcr`, { ...data }, { name: 'add-conditioning-record' });
- }
- // 根据调理包id获取调理包详情
- export function getConditioningRecordDetailMethod(data: Partial<SystemCwModel>) {
- if (data.types === 'institution' || data.types === 'system') {
- // 机构调理包详情
- return request.Post(`/fdhb-pc/conditioningManage/wrap/getCwDetailById/${data.id}`, {
- name: 'get-conditioning-record-detail',
- cacheFor: null,
- });
- } else if (data.types === 'record') {
- return request.Post(`/fdhb-pc/patientCrManage/getPcrDetailById/${data.id}`, {
- name: 'get-conditioning-record-detail',
- cacheFor: null,
- });
- }
- }
- // 获取的返回的机构服务包内容
- export function getCopyCwMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/wrap/copyCw/${data.id}/${data.institutionId}`, {
- name: 'get-copy-cw',
- cacheFor: null,
- });
- }
- // 获取患者列表
- export function getPatientListMethod(query?: Record<string, any>) {
- return request.Post<List<SystemCwModel>>('/fdhb-pc/patientCrManage/todayPcrs', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- });
- }
- // 调理记录分页列表
- export function getConditioningRecordMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post<List<SystemCwModel>>('/fdhb-pc/patientCrManage/pagePcrs', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 根据调理方案id获取调理记录详情
- export function getCpDetailMethod(data: Partial<SystemCwModel>) {
- return request.Post(`/fdhb-pc/patientCrManage/getPcrDetailById/${data.id}`, {
- name: 'get-conditioning-record-detail',
- cacheFor: null,
- });
- }
- // 获取所有的机构服务包
- export function getAllOrgCwMethod(query?: Record<string, any>) {
- return request.Post('/fdhb-pc/conditioningManage/wrap/getAllInstitutionCw', query ?? {}, {
- name: 'get-all-org-cw',
- cacheFor: null,
- });
- }
- // 患者(已开具调理方案)调理记录列表
- export function getPatientConditioningRecordMethod(id: number) {
- return request.Post(`/fdhb-pc/patientCrManage/getPcrs/${id}`, {
- name: 'get-conditioning-record-detail',
- cacheFor: null,
- });
- }
- // 作废患者调理方案
- export function voidConditioningSchemeMethod(id: number) {
- return request.Post(`/fdhb-pc/patientCrManage/repealPcr/${id}`, {
- name: 'void-conditioning-scheme',
- cacheFor: null,
- });
- }
- // 获取省市区
- export function getProvinceMethod() {
- return request.Get('/fdhb-pc/region/regionCascadeProvince', {
- name: 'get-province',
- cacheFor: null,
- });
- }
- // 获取市
- export function getCityMethod(name: string, provincecode: string) {
- return request.Get('/fdhb-pc/region/regionCascadeCity', {
- name: 'get-city',
- cacheFor: null,
- params: { name, provincecode },
- });
- }
- // 获取区
- export function getAreaMethod(name: string, citycode: string) {
- return request.Get('/fdhb-pc/region/regionCascadeArea', {
- name: 'get-area',
- cacheFor: null,
- params: { name, citycode },
- });
- }
- // 根据调理记录ID获取调理过程
- export function getConditioningProcessMethod(id: number) {
- return request.Post(`/fdhb-pc/patientCrManage/getPcrProcessById/${id}`, {
- name: 'get-conditioning-process',
- cacheFor: null,
- });
- }
- // 获取可用的服务包
- export function getAvailableCwMethod(patientId: string, patientConditioningRecordId: string) {
- return request.Post(
- '/fdhb-pc/patientCrManage/getPatUsableCw',
- { patientId, patientConditioningRecordId },
- {
- name: 'get-available-cw',
- cacheFor: null,
- }
- );
- }
- // 调理方案配置分页列表
- export function getConditioningSchemeMethod(page: number, size: number, query?: Record<string, any>) {
- return request.Post<List<ConditioningSchemeModel>>('/fdhb-pc/conditioningManage/config/pageCpConfig', query ?? {}, {
- hitSource: /plan$/, // 匹配失效源
- params: { pageNum: page, pageSize: size },
- });
- }
- // 更新调理方案配置
- export function updateConditioningSchemeMethod(orgId: string | number, data: any) {
- return request.Post(`/fdhb-pc/conditioningManage/config/updateCpConfig/${orgId}`, data, {
- name: 'update-conditioning-scheme',
- cacheFor: null,
- });
- }
- // 根据调理方案id获取调理方案配置详情
- export function getConditioningDeviceDetailMethod(data: Partial<ConditioningSchemeModel>) {
- return request.Post(`/fdhb-pc/conditioningManage/config/getCpConfigDetailById/${data.id || 0}/${data.orgId}`, {
- name: 'get-conditioning-scheme-detail',
- cacheFor: null,
- });
- }
|