提交merge1.3
This commit is contained in:
@@ -211,6 +211,7 @@ watch(
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
<<<<<<< HEAD
|
||||
getList();
|
||||
// function getList() {
|
||||
// queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
@@ -231,6 +232,28 @@ getList();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
=======
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
if (res.data.records.length > 0) {
|
||||
adviceBaseList.value = res.data.records.filter((item) => {
|
||||
if (item.adviceType == 1 || item.adviceType == 2) {
|
||||
return handleQuantity(item) != 0;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
total.value = res.data.total;
|
||||
nextTick(() => {
|
||||
currentIndex.value = 0;
|
||||
// adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 病历相关接口
|
||||
/**
|
||||
* 获取患者列表
|
||||
@@ -7,8 +7,8 @@ export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/main/patient-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@ export function getEmrHistoryList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,8 +29,8 @@ export function getEmrTemplateList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ export function receiveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/receive-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ export function leaveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/leave-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ export function completeEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/complete-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,39 +81,39 @@ export function saveEmr(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病历模板
|
||||
*/
|
||||
export function deleteEmrTemplate(id){
|
||||
export function deleteEmrTemplate(id) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病历详情
|
||||
*/
|
||||
export function getEmrDetail(encounterId){
|
||||
export function getEmrDetail(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-detail?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历模板
|
||||
*/
|
||||
export function saveEmrTemplate(data){
|
||||
export function saveEmrTemplate(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
@@ -122,10 +122,10 @@ export function saveEmrTemplate(data){
|
||||
*/
|
||||
export function saveDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosisnew',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,8 +135,8 @@ export function saveDiagnosisBind(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除诊断绑定
|
||||
@@ -145,7 +145,7 @@ export function deleteDiagnosisBind(id) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,8 +155,8 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +166,7 @@ export function getConditionDefinitionInfo(patientId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,40 +176,51 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断回显数据
|
||||
*/
|
||||
export function getEncounterDiagnosis(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisListEle(searchKey,encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis-ele?searchKey=' + searchKey+'&encounterId='+encounterId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisList(searchKey) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 删除就诊诊断
|
||||
*/
|
||||
export function delEncounterDiagnosis(conditionId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/encounter-diagnosis?conditionId=' + conditionId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 处方相关接口
|
||||
@@ -220,8 +231,8 @@ export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,8 +252,8 @@ export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/save-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 签发处方
|
||||
@@ -251,8 +262,8 @@ export function savePrescriptionSign(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 处方签退
|
||||
@@ -262,8 +273,12 @@ export function singOut(data) {
|
||||
url: '/doctor-station/advice/sign-off',
|
||||
method: 'post',
|
||||
data: data,
|
||||
<<<<<<< HEAD
|
||||
skipErrorMsg: true
|
||||
})
|
||||
=======
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
@@ -272,7 +287,7 @@ export function getPrescriptionList(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-base-info?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取科室列表
|
||||
@@ -281,7 +296,7 @@ export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取退费账单
|
||||
@@ -290,7 +305,7 @@ export function getEncounterPatientPayment(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/patient-payment?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 申请退费
|
||||
@@ -299,11 +314,10 @@ export function refundPayment(data) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/refund-payment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 电子处方相关接口
|
||||
/**
|
||||
* 电子处方查询
|
||||
@@ -312,8 +326,8 @@ export function getVeriPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 处方开立相关接口
|
||||
@@ -324,16 +338,16 @@ export function getAllMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 当返回的list为空时在调用get-allMedicationInfo
|
||||
export function getAllMedicationUsualInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationUsualInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 电子处方下拉框
|
||||
@@ -341,8 +355,8 @@ export function getAllMedicationUsualInfo(queryParams) {
|
||||
export function elepPrescriptionInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,8 +366,8 @@ export function getPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-prescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,8 +377,8 @@ export function getMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-medicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,8 +387,8 @@ export function getMedicationInfo(queryParams) {
|
||||
export function prescriptionNoInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/prescriptionNoInit',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -384,8 +398,8 @@ export function savePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/save-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -395,8 +409,8 @@ export function updatePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/update-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,8 +420,8 @@ export function deletePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/delete-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,8 +431,8 @@ export function issuancePrescription(prescriptionNoList) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/issuance-prescription',
|
||||
method: 'post',
|
||||
data: prescriptionNoList
|
||||
})
|
||||
data: prescriptionNoList,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -428,8 +442,8 @@ export function getAdviceHistoryInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-history-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -439,8 +453,8 @@ export function updateGroupId(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/update-groupid',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -450,8 +464,8 @@ export function getOrderGroupList(params) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,11 +475,10 @@ export function getContract(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/get-encounter-contract',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取得药品最新数据
|
||||
*/
|
||||
@@ -473,8 +486,8 @@ export function queryYbCatalogue(params) {
|
||||
return request({
|
||||
url: '/yb-request/query-yb-catalogue',
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -484,8 +497,8 @@ export function getChronicDisease(params) {
|
||||
return request({
|
||||
url: '/yb-request/getConditionDefinition',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,8 +508,8 @@ export function getTcmMedicine(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-advice-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -506,8 +519,8 @@ export function getTcmCondition(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/condition-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,8 +530,8 @@ export function getTcmSyndrome(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/syndrome-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -528,8 +541,8 @@ export function getTcmDiagnosis(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/get-tcm-encounter-diagnosis',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,8 +552,30 @@ export function saveTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存中医诊断
|
||||
*/
|
||||
export function updateTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/update-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除中医诊断
|
||||
*/
|
||||
export function deleteTcmDiagnosis(syndromeGroupNo) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-diagnosis?syndromeGroupNo=' + syndromeGroupNo,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -560,8 +595,8 @@ export function saveTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -571,8 +606,8 @@ export function signTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -582,8 +617,8 @@ export function signOutTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-off',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -593,11 +628,10 @@ export function getTcmAdviceList(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-request-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取预约记录
|
||||
*/
|
||||
@@ -605,8 +639,8 @@ export function getReservationInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/reservation-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -616,8 +650,8 @@ export function addReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/save-reservation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -627,8 +661,8 @@ export function editReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/edit-reservation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -638,17 +672,16 @@ export function delReservationInfo(id) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/del-reservation',
|
||||
method: 'delete',
|
||||
params: id
|
||||
})
|
||||
params: id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -658,8 +691,8 @@ export function queryParticipantList(params) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -669,7 +702,7 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -679,8 +712,8 @@ export function wardList(params) {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -690,8 +723,8 @@ export function handleHospitalization(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-doctor',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -701,8 +734,8 @@ export function getEnPrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,8 +745,8 @@ export function getOrderGroup(data) {
|
||||
return request({
|
||||
url: '/personalization/orders-group-package/group-package-for-order',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -723,8 +756,8 @@ export function getBindDevice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/order-bind-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -734,6 +767,46 @@ export function isFoodDiseasesNew(params) {
|
||||
return request({
|
||||
url: '/external-integration/foodborne-acquisition/is-food-diseases-new',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 是否入院登记
|
||||
export function isHospitalization(params) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/isRegister',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 校验三十天内是否开过相同检查检验项目
|
||||
export function checkServicesHistory(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-test-history',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验报告 url
|
||||
*/
|
||||
export function getProofResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查报告 url
|
||||
*/
|
||||
export function getTestResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/test-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,7 +91,9 @@ import {
|
||||
getTcmCondition,
|
||||
getTcmSyndrome,
|
||||
saveTcmDiagnosis,
|
||||
updateTcmDiagnosis,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import { update } from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
openAddDiagnosisDialog: {
|
||||
@@ -102,6 +104,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
updateZy: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const conditionList = ref([]);
|
||||
@@ -118,50 +124,152 @@ function handleOpen() {
|
||||
getTcmCondition().then((res) => {
|
||||
conditionList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value == 0) {
|
||||
selectedDisease.value = true;
|
||||
syndromeSelected.value = false;
|
||||
timestamp.value = Date.now();
|
||||
getTcmSyndrome().then((res) => {
|
||||
syndromeList.value = res.data.records;
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
tcmDiagonsisSaveList.value=[];
|
||||
tcmDiagonsisList.value=[];
|
||||
debugger;
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
let name=item.name.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
conditionId: updateIds[0],
|
||||
definitionId: item.illnessDefinitionId,
|
||||
ybNo: item.ybNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: name[0],
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
conditionId: updateIds[1],
|
||||
definitionId: item.symptomDefinitionId,
|
||||
ybNo: item.symptomYbNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = name[1];
|
||||
console.log("这是修改时带入的数据");
|
||||
console.log(tcmDiagonsisList.value);
|
||||
console.log(tcmDiagonsisSaveList.value);
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value.length == 0) {
|
||||
syndromeSelected.value = false;
|
||||
selectedDisease.value = true;
|
||||
timestamp.value = Date.now();
|
||||
getTcmSyndrome().then((res) => {
|
||||
syndromeList.value = res.data.records;
|
||||
});
|
||||
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[0],
|
||||
conditionId: updateIds[0],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
debugger;
|
||||
if(tcmDiagonsisList.value.length>0){
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName = row.name;
|
||||
}else{
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// tcmDiagonsisList.value.push({
|
||||
// conditionName: row.name,
|
||||
// syndromeGroupNo: timestamp.value,
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
function clickSyndromeRow(row) {
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
debugger;
|
||||
let flag=true;
|
||||
tcmDiagonsisList.value.forEach( item => {
|
||||
if(tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName==item.conditionName){
|
||||
if(item.syndromeName==row.name ){
|
||||
proxy.$modal.msgWarning('不能存在完全相同的诊断和证侯');
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
if(flag){
|
||||
if(props.updateZy.length>0){
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[1],
|
||||
conditionId: updateIds[1],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
}
|
||||
|
||||
|
||||
// tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
// syndromeSelected.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 删除诊断
|
||||
function removeDiagnosis(row, index) {
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.filter((item) => {
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function save() {
|
||||
<<<<<<< HEAD
|
||||
// 为每个诊断项添加诊断医生和诊断时间
|
||||
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||
...item,
|
||||
@@ -179,10 +287,40 @@ function save() {
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
=======
|
||||
if(props.updateZy.length>0){
|
||||
updateTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (tcmDiagonsisSaveList.value.length > 0 && syndromeSelected.value) {
|
||||
debugger;
|
||||
if (
|
||||
tcmDiagonsisSaveList.value.length > 0 &&
|
||||
(syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0)
|
||||
) {
|
||||
save();
|
||||
} else {
|
||||
proxy.$modal.msgWarning('请选择证候');
|
||||
|
||||
@@ -8,14 +8,38 @@
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
<<<<<<< HEAD
|
||||
<el-tree ref="treeRef" :data="tree" node-key="id" :props="{ label: 'name', children: 'children' }"
|
||||
highlight-current default-expand-all :filter-node-method="filterNode" @node-click="handleNodeClick">
|
||||
=======
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
node-key="id"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:filter-node-method="filterNode"
|
||||
class="tree-with-scrollbar"
|
||||
@node-click="handleNodeClick"
|
||||
max-height="650"
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
<template v-if="node.level === 1 && data.name != '常用' && data.name != '历史'">
|
||||
<<<<<<< HEAD
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
=======
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="addChild(data)"
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@@ -24,11 +48,25 @@
|
||||
<el-popconfirm width="200" :hide-after="10" title="确认删除此常用诊断吗" placement="top-start"
|
||||
@confirm="deleteChild(data)">
|
||||
<template #reference>
|
||||
<<<<<<< HEAD
|
||||
<el-button style="color: #000000" v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
" type="text" size="small" @click.stop="">
|
||||
=======
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop=""
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
@@ -46,6 +84,9 @@
|
||||
<el-button type="primary" plain @click="handleSaveDiagnosis()"> 保存诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleImport()"> 导入慢性病诊断 </el-button>
|
||||
<span style="font-size: 12px; margin-left: 10px"
|
||||
>注意 : 若使用电子处方,请不要导入慢性病诊断</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
@@ -76,9 +117,24 @@
|
||||
<el-table-column label="诊断名称" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||
<<<<<<< HEAD
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
trigger="manual" :width="800">
|
||||
<diagnosislist :diagnosisSearchkey="diagnosisSearchkey" @selectDiagnosis="handleSelsectDiagnosis" />
|
||||
=======
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="handleSelsectDiagnosis"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
<template #reference>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
@@ -87,11 +143,17 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
|
||||
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
|
||||
=======
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="类别" align="center" prop="typeName" width="100" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
>>>>>>> v1.3
|
||||
<template #default="scope">
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||
<el-checkbox
|
||||
@@ -130,9 +192,23 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
=======
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
:radio="orgOrUser"
|
||||
/>
|
||||
<AddDiagnosisDialog
|
||||
:openAddDiagnosisDialog="openAddDiagnosisDialog"
|
||||
:updateZy="updateZy"
|
||||
:patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -155,10 +231,12 @@ import {
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
|
||||
import diagnosislist from '../diagnosis/diagnosislist.vue';
|
||||
import { onMounted, onBeforeUnmount } from 'vue';
|
||||
// const diagnosisList = ref([]);
|
||||
const allowAdd = ref(false);
|
||||
const tree = ref([]);
|
||||
const openDiagnosis = ref(false);
|
||||
const updateZy = ref([]);
|
||||
const openAddDiagnosisDialog = ref(false);
|
||||
const diagnosisSearchkey = ref('');
|
||||
const diagnosisOptions = ref([]);
|
||||
@@ -167,6 +245,7 @@ const diagnosis = ref();
|
||||
const orgOrUser = ref();
|
||||
const form = ref({
|
||||
diagnosisList: [],
|
||||
isDataLoaded: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
@@ -203,7 +282,12 @@ function getDetail(encounterId) {
|
||||
});
|
||||
}
|
||||
|
||||
function refreshData() {
|
||||
getList();
|
||||
}
|
||||
let maxNo = 99;
|
||||
function getList() {
|
||||
<<<<<<< HEAD
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||
return;
|
||||
@@ -242,6 +326,43 @@ function getList() {
|
||||
}
|
||||
});
|
||||
|
||||
=======
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.diagnosisList = res.data;
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
maxNo = form.value.diagnosisList.length;
|
||||
})
|
||||
.then(() => {
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
if (item.diagSrtNo <= maxNo) {
|
||||
return;
|
||||
}
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
typeName: '中医诊断',
|
||||
updateId:item.encounterDiagnosisId+'-'+res.data.symptom[index].encounterDiagnosisId,
|
||||
illnessDefinitionId : item.definitionId,
|
||||
symptomDefinitionId : res.data.symptom[index].definitionId,
|
||||
symptomYbNo: res.data.symptom[index].ybNo,
|
||||
});
|
||||
maxNo = item.diagSrtNo;
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -366,6 +487,7 @@ function getTree() {
|
||||
function handleAddDiagnosis() {
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
<<<<<<< HEAD
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
@@ -375,6 +497,12 @@ function handleAddDiagnosis() {
|
||||
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
|
||||
: 0;
|
||||
|
||||
=======
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
form.value.diagnosisList.push({
|
||||
showPopover: false,
|
||||
name: undefined,
|
||||
@@ -399,6 +527,7 @@ function handleAddDiagnosis() {
|
||||
|
||||
// 添加中医诊断
|
||||
function handleAddTcmDiagonsis() {
|
||||
updateZy.value = [];
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -414,6 +543,11 @@ function handleDeleteDiagnosis(row, index) {
|
||||
getTree();
|
||||
}
|
||||
});
|
||||
} else if (row.syndromeGroupNo) {
|
||||
deleteTcmDiagnosis(row.syndromeGroupNo).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
} else {
|
||||
form.value.diagnosisList.splice(index, 1);
|
||||
// 删除后不重新计算排序号,保持用户设置的排序不变
|
||||
@@ -487,9 +621,9 @@ function closeDiagnosisDialog(str) {
|
||||
if (str === 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
|
||||
openAddDiagnosisDialog.value = false;
|
||||
openDiagnosis.value = false;
|
||||
getList();
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -509,8 +643,24 @@ function handleSelsectDiagnosis(row) {
|
||||
}
|
||||
/**获取焦点时 打开列表 */
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
if(row.typeName==='中医诊断'){
|
||||
updateZy.value = [];
|
||||
updateZy.value.push({
|
||||
illnessDefinitionId: row.illnessDefinitionId,
|
||||
symptomDefinitionId: row.symptomDefinitionId,
|
||||
syndromeGroupNo: row.syndromeGroupNo,
|
||||
symptomYbNo:row.symptomYbNo,
|
||||
ybNo:row.ybNo,
|
||||
updateId: row.updateId,
|
||||
diagSrtNo: row.diagSrtNo,
|
||||
name:row.name,
|
||||
});
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}else{
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
}
|
||||
|
||||
}
|
||||
/**失去焦点时 关闭列表 */
|
||||
function handleBlur(row) {
|
||||
@@ -524,10 +674,10 @@ function handleNodeClick(data) {
|
||||
// 如果是根节点,不执行任何操作
|
||||
return;
|
||||
}
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
const isDuplicate = form.value.diagnosisList.some(
|
||||
(diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name
|
||||
);
|
||||
@@ -567,7 +717,14 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
.tree-with-scrollbar {
|
||||
max-height: 650px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<<<<<<< HEAD
|
||||
<el-scrollbar height="200px">
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
@@ -18,11 +19,30 @@
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
|
||||
=======
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
max-height="400"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
>>>>>>> v1.3
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="prev, pager, next"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
@@ -31,9 +51,13 @@
|
||||
<script setup>
|
||||
import { getEmrTemplateList, deleteEmrTemplate } from '../api';
|
||||
|
||||
const queryParams = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
});
|
||||
const emrTemplate = ref([]);
|
||||
const emrTemplateRef = ref();
|
||||
const total = ref(0);
|
||||
const emits = defineEmits(['selectRow']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const selectRow = ref({});
|
||||
@@ -43,10 +67,15 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
getList();
|
||||
=======
|
||||
getList();
|
||||
>>>>>>> v1.3
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
total.value = res.data.total;
|
||||
emrTemplate.value = res.data.records;
|
||||
console.log(emrTemplate.value, 'emrTemplate.value');
|
||||
});
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisListOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.definitionId"
|
||||
:label="item.name + '--' + item.ybNo"
|
||||
:value="item.definitionId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -432,7 +432,7 @@ import { computed, onMounted, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
// import { useModal, useDict } from '@/hooks';
|
||||
import { parseTime, formatNumber } from '@/utils/his';
|
||||
import { queryYbCatalogue, getDiagnosisList } from './api';
|
||||
import { queryYbCatalogue, getDiagnosisListEle } from './api';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
import {
|
||||
@@ -565,7 +565,7 @@ const unitMap = ref({
|
||||
|
||||
function getInit(searchKey) {
|
||||
if(searchKey) {
|
||||
getDiagnosisList(searchKey).then(res => {
|
||||
getDiagnosisListEle(searchKey,infoForm.encounterId).then(res => {
|
||||
diagnosisListOption.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -276,7 +276,10 @@ function getRowDisabled(row) {
|
||||
* 新增处方按钮操作
|
||||
*/
|
||||
function handleAddPrescription() {
|
||||
<<<<<<< HEAD
|
||||
console.log('新增处方按钮操作 - 打开新增处方弹窗');
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
title.value = '新增处方';
|
||||
openPrescriptionDialog();
|
||||
}
|
||||
|
||||
@@ -150,12 +150,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
placeholder="诊断"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
remote
|
||||
:remote-method="getDiagnosisInfo"
|
||||
style="width: 400px"
|
||||
>
|
||||
@@ -166,7 +166,10 @@
|
||||
:value="item.id"
|
||||
@click="handleDiagnosisChange(item)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="props.mainDiagnosis.name" disabled style="width: 400px" />
|
||||
<!-- 隐藏存储ID的字段 -->
|
||||
<input type="hidden" v-model="submitForm.diagnosisDefinitionId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -179,7 +182,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getInit,
|
||||
@@ -206,6 +209,7 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
mainDiagnosis: { type: Object, default: null },
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
@@ -244,9 +248,17 @@ const rules = reactive({
|
||||
});
|
||||
|
||||
function openDialog() {
|
||||
console.log('orgId==========>', props.patientInfo.orgId);
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records;
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
console.log('organization==========>', organization.value);
|
||||
submitForm.inHospitalOrgId =
|
||||
organization.value.find((item) => item.id === props.patientInfo.orgId)?.id || '';
|
||||
});
|
||||
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
@@ -256,6 +268,14 @@ function openDialog() {
|
||||
});
|
||||
console.log(props.patientInfo, 'patientInfo');
|
||||
getDiagnosisInfo(undefined);
|
||||
console.log(props.mainDiagnosis, 'mainDiagnosis');
|
||||
if (props.mainDiagnosis) {
|
||||
submitForm.diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisYbNo = props.mainDiagnosis.ybNo || '';
|
||||
submitForm.medTypeCode = props.mainDiagnosis.medTypeCode;
|
||||
diagnosisDefinitionList.value = [props.mainDiagnosis];
|
||||
}
|
||||
}
|
||||
|
||||
function getDiagnosisInfo(value) {
|
||||
@@ -333,4 +353,4 @@ function close() {
|
||||
.patInfo-value {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,34 +1,99 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
<<<<<<< HEAD
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// ====== 文书记录
|
||||
=======
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// ====== 文书记录
|
||||
// 保存或更新记录
|
||||
export function saveOrUpdateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/saveOrUpdateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
}
|
||||
=======
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改记录
|
||||
export function updateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/updateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除历史记录
|
||||
export function deleteRecord(ids) {
|
||||
return request({
|
||||
url: '/document/record/deleteRecord',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 记录打印次数
|
||||
export function recordPrint(recordId) {
|
||||
return request({
|
||||
url: '/document/record/record-print',
|
||||
method: 'get',
|
||||
params: { recordId },
|
||||
});
|
||||
}
|
||||
//删除模板
|
||||
export function deleteTemplate(id) {
|
||||
return request({
|
||||
url: `/document/template/delete`,
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
params
|
||||
})
|
||||
=======
|
||||
params,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
})
|
||||
=======
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
@@ -37,24 +102,40 @@ export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
=======
|
||||
data,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
params: {definitionId}
|
||||
})
|
||||
=======
|
||||
params: { definitionId },
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
=======
|
||||
data,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -7,11 +7,37 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
|
||||
<el-tooltip effect="dark" :content="`${item.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
=======
|
||||
<el-scrollbar
|
||||
class="emr-history-scrollbar-container"
|
||||
style="width: 100%; height: calc(100vh - 300px)"
|
||||
>
|
||||
<div
|
||||
v-for="item in historyData"
|
||||
:key="item.id"
|
||||
class="scrollbar-item"
|
||||
:class="{ 'selected-history-item': item.id === props.selectedRecordId }"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
|
||||
<el-icon
|
||||
class="ml-2"
|
||||
style="margin-left: 26px; cursor: pointer"
|
||||
:disabled="item.printCount && item.printCount > 0"
|
||||
:class="{ 'disabled-icon': item.printCount && item.printCount > 0 }"
|
||||
@click.stop="handleDelete(item)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
>>>>>>> v1.3
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -20,8 +46,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
=======
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
>>>>>>> v1.3
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
@@ -31,6 +62,13 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
selectedRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
@@ -59,14 +97,38 @@ const queryList = async () => {
|
||||
historyData.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
<<<<<<< HEAD
|
||||
// ElMessage.error('获取模板树失败');
|
||||
=======
|
||||
// ElMessage.error(' 获取模板树失败 ');
|
||||
>>>>>>> v1.3
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
const currentSelectTemplate = ref({});
|
||||
=======
|
||||
// 删除历史记录
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 检查是否已打印
|
||||
if (item.printCount && item.printCount > 0) {
|
||||
ElMessage.warning('已打印的记录不允许删除');
|
||||
return;
|
||||
}
|
||||
|
||||
await deleteRecord([item.id]);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
@@ -90,6 +152,19 @@ defineExpose({ queryList });
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.selected-history-item {
|
||||
background-color: rgb(194, 231, 255);
|
||||
}
|
||||
|
||||
.disabled-icon {
|
||||
color: #d9d9d9;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
</div> -->
|
||||
<el-scrollbar class="emr-template-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in templateData" :key="item.id" class="scrollbar-item">
|
||||
<<<<<<< HEAD
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="`${item.name}`"
|
||||
@@ -20,6 +21,17 @@
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
</el-space></div>
|
||||
|
||||
=======
|
||||
<el-tooltip effect="dark" :content="`${item.name}`" placement="bottom">
|
||||
<el-text class="2" truncated @click="handleNodeClick(item)">
|
||||
<div class="template-item">
|
||||
{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
<el-icon><Delete @click="handleDelete(item)" /></el-icon>
|
||||
</el-space>
|
||||
</div>
|
||||
>>>>>>> v1.3
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -29,11 +41,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
<<<<<<< HEAD
|
||||
import { getListByDefinitionId } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick','edit']);
|
||||
=======
|
||||
import { getListByDefinitionId, deleteTemplate } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick', 'edit']);
|
||||
>>>>>>> v1.3
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
@@ -53,6 +73,7 @@ const queryParams = ref({
|
||||
isPage: 0,
|
||||
});
|
||||
const templateData = ref([]);
|
||||
<<<<<<< HEAD
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if ( unref(definitionId)&&unref(definitionId) !== '') {
|
||||
@@ -62,6 +83,26 @@ const queryList = async () => {
|
||||
templateData.value = [];
|
||||
}
|
||||
|
||||
=======
|
||||
// 删除模板
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
await deleteTemplate(item.id);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if (unref(definitionId) && unref(definitionId) !== '') {
|
||||
const res = await getListByDefinitionId(unref(definitionId));
|
||||
templateData.value = res.data || [];
|
||||
} else {
|
||||
templateData.value = [];
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板失败');
|
||||
templateData.value = [];
|
||||
@@ -79,6 +120,7 @@ defineExpose({ queryList });
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-template-container {
|
||||
<<<<<<< HEAD
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
@@ -109,4 +151,35 @@ defineExpose({ queryList });
|
||||
}
|
||||
|
||||
}
|
||||
=======
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container {
|
||||
padding: 8px;
|
||||
height: 100%;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text {
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<<<<<<< HEAD
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-18 15:41:10
|
||||
* @Description: 门诊病历组件
|
||||
-->
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div
|
||||
@@ -48,18 +51,35 @@
|
||||
<!-- <el-button type="primary" @click="newEmr">新建</el-button> -->
|
||||
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
|
||||
<el-button @click="refresh">刷新</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<!-- <el-button type="primary" @click="print">打印</el-button> -->
|
||||
=======
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button type="primary" @click="print">打印</el-button>
|
||||
>>>>>>> v1.3
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="operate-main">
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<<<<<<< HEAD
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
=======
|
||||
<div v-loading="loading" class="loading-container">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
</div>
|
||||
>>>>>>> v1.3
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,6 +92,10 @@
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
:selectedRecordId="selectedHistoryRecordId"
|
||||
>>>>>>> v1.3
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
@@ -95,6 +119,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
@@ -107,6 +132,21 @@ const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['emrSaved']);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
=======
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { saveOrUpdateRecord, addTemplate, getRecordByEncounterIdList, recordPrint } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { getEncounterDiagnosis } from '../api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
>>>>>>> v1.3
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
@@ -129,6 +169,10 @@ const queryParams = ref({
|
||||
useRanges: [1, 2], // 0 暂不使用 1 全院 2 科室 3 个人
|
||||
organizationId: userStore.orgId,
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const loading = ref(false); // 数据加载状态
|
||||
>>>>>>> v1.3
|
||||
|
||||
const currentSelectTemplate = ref({
|
||||
id: '',
|
||||
@@ -138,6 +182,10 @@ const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const templateTree = ref(null);
|
||||
>>>>>>> v1.3
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
@@ -150,6 +198,12 @@ const queryTemplateTree = async () => {
|
||||
try {
|
||||
const res = await getTreeList(queryParams.value);
|
||||
templateData.value = res.data || [];
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 组件挂载后,患者信息变化时会自动调用selectDefaultTemplate
|
||||
// 这里不再重复调用,避免重复操作
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
templateData.value = [];
|
||||
@@ -169,7 +223,24 @@ const handleNodeClick = (data, node) => {
|
||||
};
|
||||
// currentComponent.value = null;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
historyRef.value?.queryList();
|
||||
=======
|
||||
|
||||
// 确保组件状态更新后再查询历史记录
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
|
||||
// 选择任何病历模板后,都加载该病历类型的最新历史记录
|
||||
if (node.isLeaf && props.patientInfo && props.patientInfo.patientId) {
|
||||
loadLatestMedicalRecord();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
>>>>>>> v1.3
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
@@ -229,19 +300,38 @@ const handleSubmitOk = async (data) => {
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
<<<<<<< HEAD
|
||||
await addRecord(editForm.value);
|
||||
ElMessage.success('病历保存成功');
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
// 通知父组件病历保存成功
|
||||
emits('emrSaved', true);
|
||||
=======
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
ElMessage.success('保存成功');
|
||||
|
||||
// 刷新历史记录列表
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
|
||||
// 等待历史记录列表更新后,重新加载最新病历并更新选中状态
|
||||
setTimeout(() => {
|
||||
loadLatestMedicalRecord();
|
||||
}, 100);
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
ElMessage.error('提交失败');
|
||||
console.log(error);
|
||||
}
|
||||
} else if (currentOperate.value === 'addTemplate') {
|
||||
<<<<<<< HEAD
|
||||
// 新增或者编辑模板
|
||||
// editTemplateForm.value.id=
|
||||
=======
|
||||
// 新增或修改模板
|
||||
>>>>>>> v1.3
|
||||
editTemplateForm.value.name =
|
||||
currentSelectTemplate.value.name + dayjs().format('YYYY/MM/DD HH:mm');
|
||||
editTemplateForm.value.contextJson = JSON.stringify(data);
|
||||
@@ -256,6 +346,7 @@ const refresh = () => {
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
const deleteEmr = async () => {
|
||||
try {
|
||||
// 这里应该添加实际的删除逻辑
|
||||
@@ -267,6 +358,14 @@ const deleteEmr = async () => {
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
=======
|
||||
const save = async () => {
|
||||
try {
|
||||
if (editForm.value && editForm.value.printCount && editForm.value.printCount > 0) {
|
||||
ElMessage.warning('该病历已打印,不允许修改');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
@@ -274,6 +373,53 @@ const save = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 重置表单数据
|
||||
const resetForm = async () => {
|
||||
try {
|
||||
// 重置editForm为初始值
|
||||
editForm.value = {
|
||||
id: '',
|
||||
definitionId: '',
|
||||
definitionBusNo: '',
|
||||
contentJson: '',
|
||||
statusEnum: 1,
|
||||
organizationId: 0,
|
||||
encounterId: '',
|
||||
patientId: '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy: '',
|
||||
source: '',
|
||||
};
|
||||
|
||||
// 先将组件设置为空,强制卸载
|
||||
const currentComponentName = currentComponent.value;
|
||||
if (currentComponentName) {
|
||||
currentComponent.value = '';
|
||||
|
||||
// 等待DOM更新
|
||||
await nextTick();
|
||||
|
||||
// 重新加载组件
|
||||
currentComponent.value = currentComponentName;
|
||||
|
||||
// 再次等待DOM更新后设置空数据
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
// 重置动态组件表单数据
|
||||
if (emrComponentRef.value && emrComponentRef.value.setFormData) {
|
||||
emrComponentRef.value.setFormData({});
|
||||
}
|
||||
|
||||
ElMessage.success('表单已重置');
|
||||
} catch (error) {
|
||||
ElMessage.error('重置表单失败');
|
||||
}
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
const historyRef = ref(null);
|
||||
const handleHistoryClick = (data) => {
|
||||
newEmr();
|
||||
@@ -282,11 +428,121 @@ const handleHistoryClick = (data) => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
|
||||
});
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 默认选中门诊病历模板
|
||||
const selectOutpatientMedicalRecordTemplate = async () => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
await queryTemplateTree();
|
||||
}
|
||||
|
||||
// 查找门诊病历模板
|
||||
const findOutpatientTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findOutpatientTemplate(node.children);
|
||||
if (found) return found;
|
||||
}
|
||||
if (
|
||||
node.document &&
|
||||
node.document.name &&
|
||||
(node.document.name.includes('门诊病历') ||
|
||||
node.document.name === '门诊病历 (1.0.0)' ||
|
||||
node.document.name === '门诊病历(1.0.0)')
|
||||
) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const outpatientTemplateNode = findOutpatientTemplate(templateData.value);
|
||||
if (outpatientTemplateNode) {
|
||||
//选中节点
|
||||
nextTick(() => {
|
||||
if (templateTree.value && outpatientTemplateNode.id) {
|
||||
templateTree.value.setCurrentKey(outpatientTemplateNode.id);
|
||||
}
|
||||
|
||||
// 选中门诊病历模板
|
||||
handleNodeClick(outpatientTemplateNode, {
|
||||
isLeaf: true,
|
||||
data: outpatientTemplateNode,
|
||||
});
|
||||
|
||||
// 等待模板加载完成,然后获取并回显最新病历数据
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
loadLatestMedicalRecord();
|
||||
}, 500);
|
||||
});
|
||||
} else {
|
||||
ElMessage.info('未找到门诊病历模板');
|
||||
}
|
||||
};
|
||||
|
||||
// 当前选中的历史病历ID,用于在History组件中高亮显示
|
||||
const selectedHistoryRecordId = ref('');
|
||||
|
||||
// 加载最新的病历数据并回显
|
||||
const loadLatestMedicalRecord = async () => {
|
||||
if (!patientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
const historyRecords = res.data || [];
|
||||
if (historyRecords.length > 0) {
|
||||
// 按时间排序,获取最新的病历记录
|
||||
historyRecords.sort((a, b) => new Date(b.recordTime) - new Date(a.recordTime));
|
||||
const latestRecord = historyRecords[0];
|
||||
|
||||
// 保存最新病历ID,用于在History组件中高亮显示
|
||||
selectedHistoryRecordId.value = latestRecord.id;
|
||||
|
||||
// 自动回显最新病历数据到模板
|
||||
editForm.value = latestRecord;
|
||||
nextTick(() => {
|
||||
if (emrComponentRef.value && latestRecord.contentJson) {
|
||||
emrComponentRef.value.setFormData(JSON.parse(latestRecord.contentJson));
|
||||
}
|
||||
|
||||
// 通知History组件更新选中状态
|
||||
if (historyRef.value && typeof historyRef.value.updateSelectedRecord === 'function') {
|
||||
historyRef.value.updateSelectedRecord(latestRecord.id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('加载最新病历数据失败');
|
||||
// 出错时也清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
>>>>>>> v1.3
|
||||
const templateRef = ref(null);
|
||||
|
||||
const handleTemplateClick = (data) => {
|
||||
newEmr();
|
||||
editForm.value = data;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
editForm.value.id = '';
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
>>>>>>> v1.3
|
||||
nextTick(() => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contextJson));
|
||||
});
|
||||
@@ -299,18 +555,62 @@ const templateEdit = (data) => {
|
||||
const templateEditVisible = ref(false);
|
||||
// const templateEditSubmitOk = () => {};
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 打印方法实现
|
||||
const print = async () => {
|
||||
try {
|
||||
// 检查是否有选中的病历模板
|
||||
=======
|
||||
// 定义病历模板类型与打印模板的映射关系
|
||||
const templateToPrintTemplateMap = {
|
||||
// 手术记录相关模板
|
||||
手术记录: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
'手术记录(1.0.0)': PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
tySurgicalRecord: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
// 门诊病历相关模板
|
||||
门诊病历: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
'门诊病历(1.0.0)': PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
测试新增: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
};
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const getPrintTemplateByTemplateName = (templateName) => {
|
||||
// 默认使用门诊病历模板
|
||||
let printTemplate = PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD;
|
||||
|
||||
if (templateName) {
|
||||
for (const [key, value] of Object.entries(templateToPrintTemplateMap)) {
|
||||
if (templateName.includes(key)) {
|
||||
printTemplate = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return printTemplate;
|
||||
};
|
||||
|
||||
// 打印
|
||||
const print = async () => {
|
||||
try {
|
||||
>>>>>>> v1.3
|
||||
if (!currentSelectTemplate.value || !currentSelectTemplate.value.id) {
|
||||
ElMessage.warning('请先选择病历模板');
|
||||
return;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 检查是否已保存
|
||||
if (!editForm.value.id || editForm.value.id === '') {
|
||||
ElMessage.warning('请先保存病历后再进行打印');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
// 获取当前病历组件的表单数据
|
||||
const formData = emrComponentRef.value?.formData || {};
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 准备打印数据(不依赖子组件的getPrintData方法)
|
||||
// const printData = {
|
||||
// // 使用当前选中的模板信息
|
||||
@@ -332,6 +632,34 @@ const print = async () => {
|
||||
// doctorName: userStore.nickName,
|
||||
// };
|
||||
|
||||
=======
|
||||
// 获取诊断数据
|
||||
let diagnosisList = [];
|
||||
let diagnosisText = '';
|
||||
if (props.patientInfo && props.patientInfo.encounterId) {
|
||||
try {
|
||||
const diagnosisRes = await getEncounterDiagnosis(props.patientInfo.encounterId);
|
||||
diagnosisList = diagnosisRes.data || [];
|
||||
// 格式化诊断文本,区分主诊断和其他诊断
|
||||
diagnosisText = diagnosisList
|
||||
.map((item) => {
|
||||
const prefix = item.maindiseFlag === 1 ? '[主]' : '';
|
||||
return `${prefix}${item.name || ''}`;
|
||||
})
|
||||
.join(';');
|
||||
} catch (error) {
|
||||
ElMessage.error('获取诊断数据失败');
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前模板名称
|
||||
const templateName = currentSelectTemplate.value.name || '';
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const selectedPrintTemplate = getPrintTemplateByTemplateName(templateName);
|
||||
|
||||
// 打印数据
|
||||
>>>>>>> v1.3
|
||||
const printData = {
|
||||
// 模板信息
|
||||
templateName: currentSelectTemplate.value.name || '住院病历',
|
||||
@@ -355,12 +683,20 @@ const print = async () => {
|
||||
department: props.patientInfo.department || '',
|
||||
attendingDoctor: props.patientInfo.attendingDoctor || '',
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 诊断信息
|
||||
diagnosisList: JSON.stringify(diagnosisList),
|
||||
diagnosisText: diagnosisText,
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 病历信息
|
||||
documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
documentId: currentSelectTemplate.value.id || '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
@@ -370,6 +706,34 @@ const print = async () => {
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
=======
|
||||
//病历号
|
||||
busNo: props.patientInfo.busNo || '',
|
||||
//费用类型
|
||||
contractName: props.patientInfo.contractName || '',
|
||||
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
console.log('打印数据:', printData);
|
||||
|
||||
// 执行打印,使用根据模板类型选择的打印模板
|
||||
await simplePrint(selectedPrintTemplate, printData);
|
||||
|
||||
// 调用打印记录接口
|
||||
try {
|
||||
await recordPrint(editForm.value.id);
|
||||
|
||||
// 刷新历史记录列表,确保删除按钮状态根据最新的printCount值更新
|
||||
historyRef.value?.queryList();
|
||||
} catch (printLogError) {
|
||||
ElMessage.error('保存打印记录失败');
|
||||
// 打印记录失败不影响打印成功提示
|
||||
}
|
||||
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
>>>>>>> v1.3
|
||||
ElMessage.error('打印失败: ' + (error.message || '未知错误'));
|
||||
}
|
||||
};
|
||||
@@ -403,6 +767,7 @@ const templateEditSubmitOk = () => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
// onBeforeMount(() => {});
|
||||
// 刚进页面默认显示门诊病历
|
||||
const selectDefaultTemplate = () => {
|
||||
@@ -412,18 +777,51 @@ const selectDefaultTemplate = () => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findTemplate(node.children);
|
||||
=======
|
||||
|
||||
// 选择默认模板 - 获取门诊病历分类下的第一个模板
|
||||
const selectDefaultTemplate = () => {
|
||||
nextTick(() => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
console.log('模板数据为空,无法选择默认模板');
|
||||
return;
|
||||
}
|
||||
|
||||
// 查找门诊病历分类节点,然后获取其下的第一个模板
|
||||
const findOutpatientRecordCategoryAndFirstTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
// 检查是否是门诊病历分类节点
|
||||
if (!node.document && node.name && node.name.includes('门诊病历')) {
|
||||
// 这是一个分类节点,检查是否有子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
// 返回第一个有document属性的子节点(即第一个模板)
|
||||
for (const child of node.children) {
|
||||
if (child.document) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 递归查找子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findOutpatientRecordCategoryAndFirstTemplate(node.children);
|
||||
>>>>>>> v1.3
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// 根据ID查找门诊病历模板
|
||||
if (node.document && node.document.id === '1963474077201162242') {
|
||||
return node;
|
||||
}
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
const defaultTemplate = findTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
// 模拟点击节点
|
||||
@@ -441,6 +839,67 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
=======
|
||||
const defaultTemplate = findOutpatientRecordCategoryAndFirstTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
nextTick(() => {
|
||||
templateTree.value?.setCurrentKey(defaultTemplate.id);
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
|
||||
// 直接加载最新病历数据,不再使用额外的setTimeout延迟
|
||||
// 因为handleNodeClick中已经有nextTick和setTimeout处理组件渲染
|
||||
loadLatestMedicalRecord();
|
||||
});
|
||||
} else {
|
||||
console.log('未找到门诊病历模板');
|
||||
}
|
||||
});
|
||||
};
|
||||
// 监听患者信息变化,实现联动显示
|
||||
watch(
|
||||
() => props.patientInfo,
|
||||
(newPatientInfo) => {
|
||||
// 当患者信息变化时,默认选中门诊病历模板并加载最新病历数据
|
||||
if (newPatientInfo && newPatientInfo.patientId && Object.keys(newPatientInfo).length > 0) {
|
||||
// 确保模板树已经加载
|
||||
if (templateData.value && templateData.value.length > 0) {
|
||||
// 优先尝试使用更精确的selectDefaultTemplate函数
|
||||
selectDefaultTemplate();
|
||||
} else {
|
||||
// 重新加载模板树
|
||||
queryTemplateTree().then(() => {
|
||||
// 使用nextTick确保DOM更新,移除setTimeout避免多次渲染
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
await queryTemplateTree();
|
||||
// 组件挂载完成后,如果已有患者信息,默认选中门诊病历模板
|
||||
if (
|
||||
props.patientInfo &&
|
||||
props.patientInfo.patientId &&
|
||||
Object.keys(props.patientInfo).length > 0
|
||||
) {
|
||||
// 使用nextTick确保模板树数据已更新
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// defineExpose({ state }); // state未使用
|
||||
>>>>>>> v1.3
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
@@ -554,12 +1013,38 @@ const disNode_R = () => {
|
||||
}
|
||||
|
||||
.operate-main {
|
||||
<<<<<<< HEAD
|
||||
height: calc(100vh - 150px);
|
||||
flex: auto;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
=======
|
||||
flex: 1;
|
||||
min-height: 0; /* 允许flex子项高度收缩 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
/* 确保滚动条样式正常 */
|
||||
-ms-overflow-style: auto;
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
/* 确保动态加载的组件不会破坏布局 */
|
||||
.operate-main .template-tree-scrollbar > .loading-container {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 确保组件内部内容不会溢出 */
|
||||
.operate-main .template-tree-scrollbar > * {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,4 +1066,13 @@ const disNode_R = () => {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/* 加载状态样式 */
|
||||
.loading-container {
|
||||
min-height: 400px;
|
||||
position: relative;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
<span>{{ item.prescriptionNo }}</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<<<<<<< HEAD
|
||||
<h2>长春大学医院</h2>
|
||||
=======
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,6 +59,7 @@
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="收款金额" align="center" prop="totalPrice" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="发放状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.dispenseStatus != 0" type="danger">
|
||||
@@ -67,6 +68,8 @@
|
||||
<el-tag v-else type="default">{{ scope.row.serviceStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<el-table-column label="支付状态" align="center" prop="refundStatus_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<!-- consumableDialog.vue -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="皮试检查"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="consumable-dialog">
|
||||
<div class="dialog-header">
|
||||
<el-alert
|
||||
title="下列药品需要执行皮试项目,请确认,点击确定将自动添加皮试检查项目到医嘱列表"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
ref="consumableTableRef"
|
||||
:data="consumableList"
|
||||
row-key="orderDefinitionId"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="adviceName" align="center" label="项目名称" />
|
||||
<el-table-column prop="unitCodeName" label="单位" align="center" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCodeName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行次数" align="center" width="120">
|
||||
<template #default="scope">
|
||||
{{ '1' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link size="small" @click="handleDeleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 下次不再提示复选框 -->
|
||||
<div class="dont-show-again">
|
||||
<!-- <el-checkbox v-model="dontShowAgain" @change="handleDontShowAgainChange">
|
||||
下次不再提示
|
||||
</el-checkbox> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button ref="submitRef" type="primary" @click="handleSubmit">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, nextTick, onBeforeUnmount } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const consumableList = ref([]);
|
||||
const consumableTableRef = ref();
|
||||
const submitRef = ref();
|
||||
const dontShowAgain = ref(false); // 下次不再提示的状态
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(['submit']);
|
||||
|
||||
// 键盘事件处理函数
|
||||
const handleKeyDown = (event) => {
|
||||
// 检查是否按下了回车键
|
||||
if (event.key === 'Enter' && dialogVisible.value) {
|
||||
event.preventDefault();
|
||||
handleSubmit();
|
||||
}
|
||||
};
|
||||
|
||||
// 打开弹窗方法
|
||||
const open = (data) => {
|
||||
consumableList.value = data;
|
||||
dialogVisible.value = true;
|
||||
|
||||
// 默认全选
|
||||
nextTick(() => {
|
||||
if (consumableTableRef.value) {
|
||||
consumableList.value.forEach((row) => {
|
||||
consumableTableRef.value.toggleRowSelection(row, true);
|
||||
});
|
||||
}
|
||||
// 注册键盘事件监听器
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
};
|
||||
|
||||
// 关闭弹窗方法
|
||||
const handleClose = () => {
|
||||
// 移除键盘事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 页面卸载前清理事件监听器
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
|
||||
// 删除行处理
|
||||
const handleDeleteRow = (row) => {
|
||||
ElMessageBox.confirm(`确定要删除 "${row.orderDefinitionName}" 吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
const index = consumableList.value.findIndex(
|
||||
(item) => item.orderDefinitionId === row.orderDefinitionId
|
||||
);
|
||||
if (index > -1) {
|
||||
consumableList.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 提交处理
|
||||
const handleSubmit = () => {
|
||||
const selectedRows = consumableTableRef.value.getSelectionRows();
|
||||
// 保存到本地存储
|
||||
// localStorage.setItem('doctor' + userStore.id.toString(), dontShowAgain.value);
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请至少选择一项');
|
||||
return;
|
||||
}
|
||||
// 发送事件给父组件
|
||||
emit('submit', selectedRows);
|
||||
// 关闭弹窗并清理事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
open,
|
||||
close: handleClose,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.consumable-dialog {
|
||||
.dialog-header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dont-show-again {
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dialog-footer-summary {
|
||||
text-align: right;
|
||||
|
||||
.summary-text {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
|
||||
.total-amount {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #e64545;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检查报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingCheck }"
|
||||
@click="handleRefreshCheck"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingCheck"
|
||||
:data="checkReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检验报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingInspection }"
|
||||
@click="handleRefreshInspection"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingInspection"
|
||||
:data="inspectionReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { getProofResult, getTestResult } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const checkReportList = ref([]);
|
||||
const inspectionReportList = ref([]);
|
||||
const loadingCheck = ref(false);
|
||||
const loadingInspection = ref(false);
|
||||
|
||||
const fetchCheckReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getTestResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
checkReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchInspectionReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getProofResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
inspectionReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchAll = async () => {
|
||||
if (!props.patientInfo?.encounterId) {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
return;
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
if (loadingCheck.value || !props.patientInfo?.encounterId) return;
|
||||
loadingCheck.value = true;
|
||||
try {
|
||||
await fetchCheckReport();
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshInspection = async () => {
|
||||
if (loadingInspection.value || !props.patientInfo?.encounterId) return;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await fetchInspectionReport();
|
||||
} finally {
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.patientInfo?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchAll();
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
max-height: 55%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.report-link-disabled {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,259 @@
|
||||
const formData = reactive({
|
||||
//医院信息
|
||||
hospitalInfo: {
|
||||
//组织机构代码
|
||||
medins_orgcode: '',
|
||||
//医疗付款方式
|
||||
medfee_paymtd_code: '',
|
||||
},
|
||||
//患者信息
|
||||
patientInfo: {
|
||||
// 健康卡号
|
||||
healthCardNo: '',
|
||||
// 患者姓名
|
||||
patient_name: '',
|
||||
// 患者性别
|
||||
gend: '',
|
||||
// 出生日期
|
||||
brdy: '',
|
||||
// 年龄
|
||||
age: '',
|
||||
// 国籍
|
||||
ntly: '中国',
|
||||
// 籍贯
|
||||
napl: '',
|
||||
// 民族
|
||||
naty: '1',
|
||||
// 身份证号
|
||||
certno: '',
|
||||
// 户口住址
|
||||
resd_addr: '',
|
||||
// 工作单位地址
|
||||
empr_addr: '',
|
||||
// 联系人姓名
|
||||
coner_name: '',
|
||||
// 关系
|
||||
coner_rlts_code: '',
|
||||
// 联系人地址
|
||||
coner_addr: '',
|
||||
// 联系人电话
|
||||
coner_tel: '',
|
||||
},
|
||||
// 住院信息
|
||||
admission: {
|
||||
// 第几次住院
|
||||
patn_ipt_cnt: 1,
|
||||
// 住院号
|
||||
ipt_no: '',
|
||||
// 病案号
|
||||
medcasno: '',
|
||||
// 入院途径
|
||||
adm_way_code: '',
|
||||
// 入院时间
|
||||
adm_time: '',
|
||||
// 入院科室
|
||||
adm_dept_name: '',
|
||||
// 病房
|
||||
adm_ward: '',
|
||||
// 确诊日期
|
||||
adm_date: '',
|
||||
// 出院时间
|
||||
dscg_date: '',
|
||||
// 出院科室
|
||||
dscg_caty: '',
|
||||
// 病房
|
||||
dscg_ward: '',
|
||||
// 实际住院天数
|
||||
act_ipt_days: '',
|
||||
},
|
||||
// 诊断信息
|
||||
diagnosis: {
|
||||
// 主要诊断
|
||||
mainDiagnosis: '',
|
||||
// 其他诊断
|
||||
otherDiagnosis: '',
|
||||
},
|
||||
// 诊断信息
|
||||
diagnosisList: [],
|
||||
// 医疗信息
|
||||
medicalInfo: {
|
||||
// 是否输血
|
||||
bloodTransfusion: '',
|
||||
// 血型
|
||||
abo_code: '',
|
||||
// rh类型
|
||||
rh_code: '',
|
||||
// 药物过敏史
|
||||
die_autp_flag: '',
|
||||
},
|
||||
// 医师信息
|
||||
doctorInfo: {
|
||||
// 科主任
|
||||
deptdrt_name: '',
|
||||
// 副主任
|
||||
chfdr_name: '',
|
||||
// 主治医师
|
||||
chfpdr_name: '',
|
||||
// 住院医师
|
||||
ipt_dr_name: '',
|
||||
// 责任护士
|
||||
resp_nurs_name: '',
|
||||
// 住院总医师
|
||||
chiefResident: '',
|
||||
// 实习医师
|
||||
intn_dr_name: '',
|
||||
// 病案质量
|
||||
medcas_qlt_code: '',
|
||||
// 编码员
|
||||
codr_name: '',
|
||||
// 控制日期
|
||||
qltctrl_date: '',
|
||||
},
|
||||
// 病案首页2
|
||||
medicalSecond: {
|
||||
// 手术方式
|
||||
surgeryType: '',
|
||||
// 离院方式
|
||||
dscg_way: '',
|
||||
// 31天是否计划出院
|
||||
dscg_31days_rinp_flag: '',
|
||||
// 目的
|
||||
dscg_31days_rinp_pup: '',
|
||||
//昏迷时间---入院前
|
||||
brn_damg_bfadm_coma_dura: '',
|
||||
//昏迷时间---入院后
|
||||
brn_damg_afadm_coma_dura: '',
|
||||
// 肿瘤分期
|
||||
tumorStaging: '',
|
||||
// T
|
||||
tumor_T: '',
|
||||
// N
|
||||
tumor_N: '',
|
||||
// M
|
||||
tumor_M: '',
|
||||
// 判断依据
|
||||
judgmentBase: '',
|
||||
// 分化程度
|
||||
bkup_deg_code: '',
|
||||
// 临床路径
|
||||
enterPath: '',
|
||||
// 变异
|
||||
mutation: '',
|
||||
// 退出路径
|
||||
outPath: '',
|
||||
// 特级护理
|
||||
nursingLevel_spec: '',
|
||||
// 1级护理
|
||||
nursingLevel_1: '',
|
||||
// 2级护理
|
||||
nursingLevel_2: '',
|
||||
// 3级护理
|
||||
nursingLevel_3: '',
|
||||
// 呼吸机使用
|
||||
use_vent_flag: '',
|
||||
// 有创呼吸机使用小时
|
||||
vent_used_dura: '',
|
||||
// 手术表
|
||||
surgery_tableData: [],
|
||||
},
|
||||
// 病案首页3
|
||||
// 住院费用
|
||||
hospitalization: {
|
||||
// 总费用
|
||||
medfee_sumamt: '',
|
||||
// 自付金额
|
||||
selfpay_amt: '',
|
||||
},
|
||||
// 综合医疗服务类
|
||||
medicalServices: {
|
||||
// 一般医疗服务类
|
||||
ordn_med_servfee: '',
|
||||
// 一般治疗操作费
|
||||
ordn_trt_oprt_fee: '',
|
||||
// 护理费
|
||||
nurs_fee: '',
|
||||
// 其他费用
|
||||
com_med_serv_oth_fee: '',
|
||||
},
|
||||
// 诊断类
|
||||
diagnosisClass: {
|
||||
// 病理诊断
|
||||
palg_diag_fee: '',
|
||||
// 实验室诊断
|
||||
lab_diag_fee: '',
|
||||
// 影像学诊断
|
||||
rdhy_diag_fee: '',
|
||||
// 临床诊断
|
||||
clnc_dise_fee: '',
|
||||
},
|
||||
// 治疗类
|
||||
treatmentClass: {
|
||||
// 非手术治疗项目费
|
||||
nsrgtrt_item_fee: '',
|
||||
// 临床物理治疗
|
||||
clnc_phys_trt_fee: '',
|
||||
// 手术治疗费
|
||||
rgtrt_trt_fee: '',
|
||||
// 麻醉费
|
||||
anst_fee: '',
|
||||
// 手术费
|
||||
rgtrt_fee: '',
|
||||
},
|
||||
// 康复类
|
||||
recoveryClass: {
|
||||
// 康复费
|
||||
rhab_fee: '',
|
||||
},
|
||||
// 中医类
|
||||
TCMClass: {
|
||||
// 中医治疗费
|
||||
tcm_trt_fee: '',
|
||||
},
|
||||
// 西药类
|
||||
WesternClass: {
|
||||
// 西药费
|
||||
wm_fee: '',
|
||||
// 抗菌药物费
|
||||
abtl_medn_fee: '',
|
||||
},
|
||||
// 中药类
|
||||
chineseClass: {
|
||||
//中成药
|
||||
tcmpat_fee: '',
|
||||
// 中草药
|
||||
tcmherb_fee: '',
|
||||
},
|
||||
// 血液和血液制品类
|
||||
bloodClass: {
|
||||
// 血费
|
||||
blo_fee: '',
|
||||
// 蛋白类制品费
|
||||
albu_fee: '',
|
||||
// 球蛋白制品费
|
||||
glon_fee: '',
|
||||
// 凝血因子制品费
|
||||
clotfac_fee: '',
|
||||
// 细胞因子制品费
|
||||
cyki_fee: '',
|
||||
},
|
||||
// 耗材类
|
||||
consumablesClass: {
|
||||
// 检查用一次性医用材料费
|
||||
exam_dspo_matl_fee: '',
|
||||
// 治疗用一次性医用材料费
|
||||
trt_dspo_matl_fee: '',
|
||||
// 手术用一次性医用材料费
|
||||
oprn_dspo_matl_fee: '',
|
||||
},
|
||||
// 其他类
|
||||
otherClass: {
|
||||
// 其他费用
|
||||
oth_fee: '',
|
||||
},
|
||||
// 其他诊断及手术附加页
|
||||
other_tableData: [],
|
||||
// 手术操作数组
|
||||
surgery_tableData: [],
|
||||
});
|
||||
|
||||
export default formData;
|
||||
@@ -3,7 +3,11 @@
|
||||
<div
|
||||
class="prescription-section"
|
||||
v-for="(prescription, pIndex) in tcmPrescriptionList"
|
||||
<<<<<<< HEAD
|
||||
:key="pIndex"
|
||||
=======
|
||||
:key="prescription.id"
|
||||
>>>>>>> v1.3
|
||||
>
|
||||
<div class="section-header">
|
||||
<div class="title first-prescription">
|
||||
@@ -18,6 +22,7 @@
|
||||
<plus />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
<<<<<<< HEAD
|
||||
class="delete-icon"
|
||||
title="删除处方单"
|
||||
@click="handleDeletePrescriptionClick(pIndex)"
|
||||
@@ -30,6 +35,22 @@
|
||||
<div class="summary">
|
||||
<span class="summary-item">药品数: {{ getPrescriptionMedicineCount(pIndex) }}种</span>
|
||||
<span class="summary-item">总价: ¥ {{ getPrescriptionTotalPrice(pIndex) }}</span>
|
||||
=======
|
||||
class="add-icon"
|
||||
title="删除处方"
|
||||
@click="deletePrescription(prescription)"
|
||||
style="font-size: 26px !important; margin-left: 10px; color: red"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<span class="summary-item">
|
||||
药品数:
|
||||
{{ prescription.prescriptionList ? prescription.prescriptionList.length : '0' }}种
|
||||
</span>
|
||||
<span class="summary-item">总价: ¥ {{ calculatePrescriptionTotal(pIndex) }}</span>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -41,6 +62,9 @@
|
||||
<el-button type="danger" plain @click="handleDelete(pIndex)" :disabled="false">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handlePrint(pIndex)" :disabled="false">
|
||||
打印
|
||||
</el-button>
|
||||
</div>
|
||||
<div
|
||||
class="doctor-station"
|
||||
@@ -69,10 +93,15 @@
|
||||
:value="item.accountId"
|
||||
/>
|
||||
</el-select>
|
||||
<<<<<<< HEAD
|
||||
<span class="doctor-station"> 配方名称: </span>
|
||||
<el-input v-model="formulaName" placeholder=" " style="width: 100px" />
|
||||
<span class="doctor-station"> 用药途径: </span>
|
||||
<el-select v-model="methodCode" placeholder="费用性质" style="width: 120px">
|
||||
=======
|
||||
<span class="doctor-station"> 用法: </span>
|
||||
<el-select v-model="prescription.methodCode" placeholder="用法" style="width: 120px">
|
||||
>>>>>>> v1.3
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
:key="dict.value"
|
||||
@@ -134,7 +163,6 @@
|
||||
<span class="doctor-station" style="float: right"> </span>
|
||||
</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="prescriptionRef"
|
||||
:data="prescription.prescriptionList"
|
||||
row-key="uniqueKey"
|
||||
@@ -243,6 +271,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<<<<<<< HEAD
|
||||
<span class="doctor-station"> 脚注: </span>
|
||||
<el-select
|
||||
v-model="footNote"
|
||||
@@ -258,6 +287,25 @@
|
||||
:value="dict.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
=======
|
||||
<!-- 单次剂量 -->
|
||||
<el-form-item
|
||||
label="特殊煎法:"
|
||||
prop="dosageInstruction"
|
||||
class="required-field"
|
||||
data-prop="dosageInstruction"
|
||||
>
|
||||
<el-select
|
||||
v-model="scope.row.dosageInstruction"
|
||||
style="width: 90px; margin-right: 20px"
|
||||
placeholder=" "
|
||||
>
|
||||
<template v-for="item in dosage_instruction" :key="item.value">
|
||||
<el-option :value="item.value" :label="item.label" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
<span class="total-amount">
|
||||
总金额:{{
|
||||
@@ -360,7 +408,7 @@
|
||||
? formatNumber(scope.row.quantity) +
|
||||
' ' +
|
||||
scope.row.doseUnitCode_dictText +
|
||||
' (' +
|
||||
' (' +
|
||||
scope.row.chineseHerbsDoseQuantity +
|
||||
'付)'
|
||||
: ''
|
||||
@@ -404,7 +452,7 @@
|
||||
<tcmdiagnosisDialog ref="tcmDianosis" :patientInfo="props.patientInfo" @flush="getListInfo()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
@@ -426,7 +474,13 @@ import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import Decimal from 'decimal.js';
|
||||
import tcmdiagnosisDialog from './tcmdiagnosisDialog';
|
||||
import { Delete, Minus } from '@element-plus/icons-vue';
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
import { ElMessage } from 'element-plus';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import { advicePrint } from '@/api/public';
|
||||
>>>>>>> v1.3
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
@@ -440,8 +494,19 @@ const encounterId = ref('');
|
||||
const accountId = ref('');
|
||||
const encounterDiagnosisId = ref('');
|
||||
|
||||
<<<<<<< HEAD
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
=======
|
||||
let prescriptionIdCounter = 1;
|
||||
const generatePrescriptionId = () => {
|
||||
return `prescription_${Date.now()}_${prescriptionIdCounter++}`;
|
||||
};
|
||||
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
id: generatePrescriptionId(),
|
||||
>>>>>>> v1.3
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: '',
|
||||
@@ -461,6 +526,7 @@ const tcmPrescriptionList = ref([
|
||||
const unitCodeList = ref([]);
|
||||
const adviceTableRef = ref([]);
|
||||
const organization = ref([]);
|
||||
<<<<<<< HEAD
|
||||
const conditionDefinitionId = ref('');
|
||||
const diagnosisName = ref('');
|
||||
const diagnosisInfo = ref({});
|
||||
@@ -484,6 +550,11 @@ const rowRules = ref({
|
||||
rateCode: [{ required: true, message: '请选择频次', trigger: 'change' }],
|
||||
methodCode: [{ required: true, message: '请选择给药途径', trigger: 'change' }],
|
||||
orgId: [{ required: true, message: '请选择执行科室', trigger: 'change' }],
|
||||
=======
|
||||
const loading = ref(false);
|
||||
const rowRules = ref({
|
||||
minUnitQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
const unitMap = ref({
|
||||
dose: 'dose',
|
||||
@@ -513,6 +584,7 @@ const inputRefs = ref({}); // 存储输入框实例
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
const totalAmount = ref(0);
|
||||
const tcmDianosis = ref();
|
||||
<<<<<<< HEAD
|
||||
const { method_code, unit_code, rate_code, method_of_decocting_medicine,hjerbal_footnotes,distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
@@ -544,6 +616,17 @@ const adviceTypeList = ref([
|
||||
value: '',
|
||||
},
|
||||
]);
|
||||
=======
|
||||
const { method_code, unit_code, rate_code, distribution_category_code, dosage_instruction } =
|
||||
proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code',
|
||||
'dosage_instruction'
|
||||
);
|
||||
|
||||
>>>>>>> v1.3
|
||||
onMounted(() => {
|
||||
document.addEventListener('keydown', escKeyListener);
|
||||
});
|
||||
@@ -569,6 +652,7 @@ function getList() {
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
function getListInfo(addNewRow) {
|
||||
// 确保isAdding变量存在
|
||||
if (typeof isAdding !== 'undefined') {
|
||||
@@ -625,11 +709,89 @@ function getListInfo(addNewRow) {
|
||||
} else {
|
||||
console.error('获取医嘱列表失败或数据格式错误:', res);
|
||||
// 保持当前列表不变,不要清空
|
||||
=======
|
||||
async function getListInfo(addNewRow) {
|
||||
// 重置所有处方的添加状态
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
prescription.isAdding = false;
|
||||
});
|
||||
await getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then(async (res) => {
|
||||
// 按 groupId 分组数据
|
||||
const groupedData = {};
|
||||
res.data.forEach((item) => {
|
||||
const groupId = item.groupId || 'default';
|
||||
if (!groupedData[groupId]) {
|
||||
groupedData[groupId] = [];
|
||||
}
|
||||
groupedData[groupId].push({
|
||||
...item,
|
||||
doseQuantity: JSON.parse(item.contentJson)?.doseQuantity,
|
||||
doseUnitCode_dictText: JSON.parse(item.contentJson)?.doseUnitCode_dictText,
|
||||
});
|
||||
});
|
||||
|
||||
await getContract({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
contractList.value = res.data;
|
||||
});
|
||||
// 更新处方列表
|
||||
const groupIds = Object.keys(groupedData);
|
||||
tcmPrescriptionList.value = groupIds.map((groupId, index) => {
|
||||
const prescription = tcmPrescriptionList.value[index] || {
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
};
|
||||
|
||||
if (!prescription.id) {
|
||||
prescription.id = generatePrescriptionId();
|
||||
}
|
||||
|
||||
prescription.prescriptionList = groupedData[groupId];
|
||||
return prescription;
|
||||
});
|
||||
|
||||
// 如果没有处方数据,确保至少有一个空处方
|
||||
if (tcmPrescriptionList.value.length === 0) {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
});
|
||||
}
|
||||
tcmPrescriptionList.value.accountId = contractList.value[0].accountId;
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddMedicine(0);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取医嘱列表异常:', error);
|
||||
// 保持当前列表不变,不要清空
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
|
||||
@@ -640,6 +802,11 @@ function getListInfo(addNewRow) {
|
||||
});
|
||||
|
||||
accountId.value = props.patientInfo.accountId || '';
|
||||
=======
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
accountId.value = props.patientInfo.accountId;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function getDiagnosisInfo() {
|
||||
@@ -655,7 +822,11 @@ function getDiagnosisInfo() {
|
||||
});
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// 默认选择第一个诊断
|
||||
=======
|
||||
// 默认选择第一个诊断
|
||||
>>>>>>> v1.3
|
||||
if (diagnosisList.value.length > 0) {
|
||||
const firstDiagnosis = diagnosisList.value[0];
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
@@ -748,27 +919,36 @@ function handleChange(value) {
|
||||
adviceQueryParams.value.searchKey = value;
|
||||
}
|
||||
|
||||
function openDialog() {
|
||||
tcmDianosis.value.openDialog();
|
||||
function addNewPrescription() {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: accountId.value,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
});
|
||||
}
|
||||
|
||||
function deleteDiagnosisBind(id) {
|
||||
const data = localStorage.getItem(`tcmDiagnosisList_${props.patientInfo.encounterId}`);
|
||||
let list = [];
|
||||
list = JSON.parse(data);
|
||||
// 添加到列表
|
||||
const index = list.findIndex((item) => item.id === id);
|
||||
if (index === -1) return;
|
||||
function deletePrescription(prescription) {
|
||||
if (tcmPrescriptionList.value.length <= 1) {
|
||||
proxy.$modal.msgError('至少保留一张处方');
|
||||
return;
|
||||
}
|
||||
|
||||
list.splice(index, 1);
|
||||
localStorage.removeItem(`tcmDiagnosisList_${props.patientInfo.encounterId}`);
|
||||
// 保存到本地缓存
|
||||
localStorage.setItem(`tcmDiagnosisList_${props.patientInfo.encounterId}`, JSON.stringify(list));
|
||||
getListInfo();
|
||||
}
|
||||
|
||||
function addNewPrescription(){
|
||||
tcmPrescriptionList.value.push({})
|
||||
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
|
||||
if (index !== -1) {
|
||||
tcmPrescriptionList.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// 删除处方单
|
||||
@@ -976,6 +1156,7 @@ function handleDelete(pIndex) {
|
||||
prescription.expandOrder = [];
|
||||
prescription.isAdding = false;
|
||||
adviceQueryParams.value.adviceType = undefined;
|
||||
<<<<<<< HEAD
|
||||
// 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
const allPrescriptions = tcmPrescriptionList.value.flatMap(p => p.prescriptionList);
|
||||
groupMarkers.value = getGroupMarkers(allPrescriptions);
|
||||
@@ -983,6 +1164,10 @@ function handleDelete(pIndex) {
|
||||
|
||||
|
||||
|
||||
=======
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
function handleNumberClick(item, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
prescription.prescriptionList[index].unitPrice = item.price;
|
||||
@@ -1062,6 +1247,7 @@ function handleSave(pIndex) {
|
||||
}
|
||||
|
||||
// 单行处方保存
|
||||
<<<<<<< HEAD
|
||||
function handleSaveSign(row, index) {
|
||||
try {
|
||||
// 直接执行保存逻辑,不再进行表单验证
|
||||
@@ -1171,16 +1357,79 @@ function handleSaveBatch() {
|
||||
}
|
||||
|
||||
// 检查是否有可保存的项目
|
||||
=======
|
||||
function handleSaveSign(row, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const formRefName = 'formRef' + pIndex + '-' + index;
|
||||
proxy.$refs[formRefName][0].validate((valid) => {
|
||||
row.isEdit = false;
|
||||
prescription.isAdding = false;
|
||||
prescription.expandOrder = [];
|
||||
row.contentJson = undefined;
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
row.accountId = prescription.accountId;
|
||||
row.quantity = row.minUnitQuantity;
|
||||
row.conditionId = prescription.conditionId;
|
||||
row.unitPrice =
|
||||
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
||||
? row.unitPrice
|
||||
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
||||
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
||||
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
||||
row.diagnosisName = prescription.diagnosisName;
|
||||
row.contentJson = JSON.stringify(row);
|
||||
});
|
||||
}
|
||||
|
||||
function handleSaveBatch(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
|
||||
let timestamp = new Date().getTime();
|
||||
let saveList = prescription.prescriptionList
|
||||
.filter((item) => {
|
||||
return item.statusEnum == 1;
|
||||
})
|
||||
.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
accountId: accountId.value,
|
||||
conditionId: prescription.conditionId,
|
||||
encounterDiagnosisId: prescription.encounterDiagnosisId,
|
||||
conditionDefinitionId: prescription.conditionDefinitionId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
requestId: item.requestId,
|
||||
groupId: item.groupId ? item.groupId : timestamp.toString(),
|
||||
methodCode: prescription.methodCode,
|
||||
rateCode: prescription.rateCode,
|
||||
dispensePerDuration: prescription.dispensePerDuration,
|
||||
chineseHerbsDoseQuantity: prescription.chineseHerbsDoseQuantity,
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
if (saveList.length == 0) {
|
||||
proxy.$modal.msgWarning('当前没有可保存医嘱');
|
||||
return;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 保存处方
|
||||
=======
|
||||
if (
|
||||
prescription.chineseHerbsDoseQuantity == undefined ||
|
||||
prescription.chineseHerbsDoseQuantity == 0
|
||||
) {
|
||||
proxy.$modal.msgWarning('请输入付数');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
saveTcmAdvice({ adviceSaveList: saveList }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getListInfo(true);
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 重置所有处方的nextId
|
||||
tcmPrescriptionList.value.forEach(prescription => {
|
||||
@@ -1188,6 +1437,9 @@ function handleSaveBatch() {
|
||||
prescription.nextId = 1;
|
||||
}
|
||||
});
|
||||
=======
|
||||
prescription.nextId = 1;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1355,6 +1607,7 @@ function validateGroups(saveList) {
|
||||
return true;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
|
||||
@@ -1368,13 +1621,77 @@ function validateGroups(saveList) {
|
||||
|
||||
|
||||
|
||||
=======
|
||||
async function handlePrint(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const selectedRows = prescription.prescriptionList.filter((item) => item.check);
|
||||
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请先选择要打印的处方');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否有待签发或已退费的记录
|
||||
const invalidRows = selectedRows.filter(
|
||||
(item) => item.statusEnum === 1 || item.chargeStatus === 8
|
||||
);
|
||||
|
||||
if (invalidRows.length > 0) {
|
||||
ElMessage.warning('待签发和已退费的项目不能打印,请重新选择');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const performPrint = async (rows) => {
|
||||
const requestIds = rows.map((item) => item.requestId).join(',');
|
||||
console.log('中药处方打印开始', requestIds);
|
||||
|
||||
const apiParams = { requestIds, isPrescription: '1' };
|
||||
const res = await advicePrint(apiParams);
|
||||
|
||||
const groupedRows = {};
|
||||
res.data.adviceItemList.forEach((row) => {
|
||||
const prescriptionNo = row.prescriptionNo;
|
||||
if (!groupedRows[prescriptionNo]) {
|
||||
groupedRows[prescriptionNo] = [];
|
||||
}
|
||||
row.contractName = res.data.contractName;
|
||||
groupedRows[prescriptionNo].push(row);
|
||||
});
|
||||
|
||||
const groupedArray = Object.values(groupedRows);
|
||||
const result = groupedArray.map((group) => ({
|
||||
...res.data,
|
||||
|
||||
// 药费
|
||||
medTotalAmount:
|
||||
'¥' + group.reduce((sum, item) => sum + (item.totalPrice || 0), 0).toFixed(2) + '元',
|
||||
|
||||
prescriptionList: group,
|
||||
}));
|
||||
|
||||
// 使用中药医生处方打印模板
|
||||
return { result, template: PRINT_TEMPLATE.DOC_CHINESE_MEDICINE_PRESCRIPTION };
|
||||
};
|
||||
|
||||
// 执行打印
|
||||
const { result, template } = await performPrint(selectedRows);
|
||||
printUtils.print(template, result);
|
||||
ElMessage.success('中药处方打印成功');
|
||||
} catch (error) {
|
||||
console.error('中药处方打印过程出错:', error);
|
||||
ElMessage.error('中药处方打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -1416,9 +1733,11 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.doctor-station {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
@@ -1480,6 +1799,7 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.add-icon:hover {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.delete-icon {
|
||||
cursor: pointer;
|
||||
@@ -1501,4 +1821,7 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.delete-icon.disabled-icon:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
=======
|
||||
</style>
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -15,9 +15,22 @@
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<<<<<<< HEAD
|
||||
<el-date-picker v-model="registerTime" @change="handleTimeChange" type="daterange"
|
||||
style="width: 100%; margin-bottom: 10px" :clearable="false" placeholder="挂号时间" format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD" />
|
||||
=======
|
||||
<el-date-picker
|
||||
v-model="registerTime"
|
||||
@change="handleTimeChange"
|
||||
type="date"
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
:clearable="false"
|
||||
placeholder="挂号时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
<el-scrollbar height="700px">
|
||||
<div v-for="(item, index) in patientList" :class="item.active ? 'patient-card actived' : 'patient-card'"
|
||||
:key="item.id" @click="handleCardClick(item, index)">
|
||||
@@ -53,29 +66,53 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="personal-info-container">
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
<el-text tclass="name" width="auto">病历号:</el-text>
|
||||
<el-text tclass="name" width="auto">
|
||||
{{ item.busNo ? item.busNo : '-' }}
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disabled-wrapper" style="width: 85%; border: 1px solid #eee; position: relative">
|
||||
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-left: 0">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="患者信息:" width="150">
|
||||
<el-descriptions :column="5" class="patient-info-descriptions">
|
||||
<el-descriptions-item label="患者信息:" width="420">
|
||||
{{
|
||||
Object.keys(patientInfo).length !== 0
|
||||
? patientInfo.patientName +
|
||||
<<<<<<< HEAD
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
patientInfo.contractName
|
||||
=======
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
(patientInfo?.contractName ? patientInfo.contractName : '') +
|
||||
'/' +
|
||||
patientInfo.phone +
|
||||
'/' +
|
||||
patientInfo.busNo
|
||||
>>>>>>> v1.3
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号时间:" width="150">
|
||||
<el-descriptions-item label="挂号时间:" width="300">
|
||||
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<<<<<<< HEAD
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
@@ -85,6 +122,12 @@
|
||||
<el-radio v-model="visitType" label="FOLLOW_UP" :disabled="visitTypeDisabled">复诊</el-radio>
|
||||
|
||||
<!-- 原有按钮 -->
|
||||
=======
|
||||
<el-descriptions-item label="医生:" width="250">
|
||||
{{ userStore.nickName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
>>>>>>> v1.3
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
@@ -97,16 +140,21 @@
|
||||
<el-button type="primary" plain @click.stop="getEnPrescription(patientInfo.encounterId)">
|
||||
处方单
|
||||
</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" plain @click.stop="openDialog = true">
|
||||
办理住院
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleCancelEncounter">
|
||||
取消接诊
|
||||
</el-button>
|
||||
=======
|
||||
<el-button type="primary" plain @click.stop="onHospitalization"> 办理住院 </el-button>
|
||||
>>>>>>> v1.3
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
<<<<<<< HEAD
|
||||
<el-tabs type="card" style="width: 100%; height: 100%" v-loading="loading" v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)">
|
||||
<el-tab-pane label="病历" name="emr">
|
||||
@@ -116,6 +164,33 @@
|
||||
}
|
||||
" :visitType="visitType" :firstVisitDate="firstVisitDate" />
|
||||
</el-tab-pane>
|
||||
=======
|
||||
<el-tabs
|
||||
type="card"
|
||||
style="width: 100%; height: 100%"
|
||||
v-loading="loading"
|
||||
v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)"
|
||||
>
|
||||
<el-tab-pane label="门诊病历" name="hospitalizationEmr">
|
||||
<hospitalizationEmr
|
||||
:patientInfo="patientInfo"
|
||||
:activeTab="activeTab"
|
||||
@emrSaved="handleEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="病历" name="emr">
|
||||
<Emr
|
||||
:patientInfo="patientInfo"
|
||||
ref="emrRef"
|
||||
@save="
|
||||
(value) => {
|
||||
saveStatus = value;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-tab-pane> -->
|
||||
>>>>>>> v1.3
|
||||
<el-tab-pane label="诊断" name="diagnosis">
|
||||
<Diagnosis :patientInfo="patientInfo" ref="diagnosisRef" @diagnosisSave="
|
||||
(value) => {
|
||||
@@ -124,7 +199,16 @@
|
||||
" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="医嘱" name="prescription">
|
||||
<<<<<<< HEAD
|
||||
<prescriptionlist :patientInfo="patientInfo" ref="prescriptionRef" :activeTab="activeTab" />
|
||||
=======
|
||||
<prescriptionlist
|
||||
:patientInfo="patientInfo"
|
||||
ref="prescriptionRef"
|
||||
:activeTab="activeTab"
|
||||
:outpatientEmrSaved="outpatientEmrSaved"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
@@ -132,6 +216,9 @@
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报告查询" name="reportQuery">
|
||||
<ReportQuery :patientInfo="patientInfo" ref="reportQueryRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
@@ -139,26 +226,54 @@
|
||||
<el-drawer v-model="drawer" title="患者队列" direction="ltr" @open="handleOpen">
|
||||
<PatientList ref="patientDrawerRef" @toCurrent="handleReceive" />
|
||||
</el-drawer>
|
||||
<<<<<<< HEAD
|
||||
<RefundListDialog :open="openRefundListDialog" :encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false" />
|
||||
<HospitalizationDialog :open="openDialog" :patientInfo="patientInfo" :encounterId="currentEncounterId"
|
||||
@close="openDialog = false" />
|
||||
<PrescriptionInfo :open="openPrescriptionDialog" :precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false" />
|
||||
=======
|
||||
<RefundListDialog
|
||||
:open="openRefundListDialog"
|
||||
:encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false"
|
||||
@refresh="() => prescriptionRef.getListInfo()"
|
||||
/>
|
||||
<HospitalizationDialog
|
||||
:open="openDialog"
|
||||
:patientInfo="patientInfo"
|
||||
:encounterId="currentEncounterId"
|
||||
:mainDiagnosis="mainDiagnosis"
|
||||
@close="openDialog = false"
|
||||
/>
|
||||
<PrescriptionInfo
|
||||
:open="openPrescriptionDialog"
|
||||
:precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import Emr from './components/emr/emr.vue';
|
||||
import {
|
||||
getList,
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
<<<<<<< HEAD
|
||||
cancelEncounter,
|
||||
getEmrHistoryList
|
||||
=======
|
||||
isHospitalization,
|
||||
getEncounterDiagnosis,
|
||||
>>>>>>> v1.3
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
import ReportQuery from './components/reportQuery.vue';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import Diagnosis from './components/diagnosis/diagnosis.vue';
|
||||
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
@@ -169,6 +284,8 @@ import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -197,15 +314,18 @@ const openRefundListDialog = ref(false);
|
||||
const openDialog = ref(false);
|
||||
const openPrescriptionDialog = ref(false);
|
||||
const saveStatus = ref(false);
|
||||
const outpatientEmrSaved = ref(false); // 门诊病历保存状态
|
||||
const currentEncounterId = ref('');
|
||||
const emits = defineEmits(['click']);
|
||||
const activeTab = ref('emr');
|
||||
// const activeTab = ref('emr');
|
||||
const activeTab = ref('hospitalizationEmr');
|
||||
const mainDiagnosis = ref(null);
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const visitTypeDisabled = ref(false);
|
||||
|
||||
const prescriptionInfo = ref([]);
|
||||
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
||||
const registerTime = ref(formatDate(new Date()));
|
||||
const patientDrawerRef = ref();
|
||||
const prescriptionRef = ref();
|
||||
const tcmRef = ref();
|
||||
@@ -219,12 +339,41 @@ const firstVisitDate = ref('');
|
||||
const disabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '今天',
|
||||
value: new Date(),
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 1);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三天内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 3);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '一周内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 7);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const eprescriptionRef = ref();
|
||||
onMounted(() => {
|
||||
getWaitPatient();
|
||||
});
|
||||
|
||||
getPatientList();
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
@@ -333,6 +482,7 @@ function handleClick(tab) {
|
||||
|
||||
// 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息)
|
||||
function getEnPrescription(encounterId) {
|
||||
<<<<<<< HEAD
|
||||
// 检查是否有选中的患者
|
||||
if (!patientInfo.value || !patientInfo.value.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
@@ -392,6 +542,21 @@ function getEnPrescription(encounterId) {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}
|
||||
=======
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function handleRefund(encounterId) {
|
||||
@@ -410,6 +575,7 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 优先使用数据库中保存的初复诊值
|
||||
if (item.visitType) {
|
||||
@@ -437,6 +603,17 @@ function handleCardClick(item, index) {
|
||||
console.error('emr组件未正确初始化');
|
||||
proxy.$modal.msgError('病历组件加载失败,请刷新页面重试');
|
||||
}
|
||||
=======
|
||||
// 将患者信息保存到store中,供hospitalizationEmr组件使用
|
||||
updatePatientInfo(item);
|
||||
activeTab.value = 'hospitalizationEmr';
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
diagnosisRef.value.getList();
|
||||
eprescriptionRef.value.getList();
|
||||
// emrRef.value.getDetail(item.encounterId);
|
||||
>>>>>>> v1.3
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 200);
|
||||
@@ -466,8 +643,8 @@ function handleFinish(encounterId) {
|
||||
}
|
||||
|
||||
function handleTimeChange(value) {
|
||||
queryParams.value.registerTimeSTime = value[0] + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value[1] + ' 23:59:59';
|
||||
queryParams.value.registerTimeSTime = value + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value + ' 23:59:59';
|
||||
getPatientList();
|
||||
}
|
||||
|
||||
@@ -480,9 +657,15 @@ function handleReceive(row) {
|
||||
getWaitPatient();
|
||||
}
|
||||
|
||||
// 处理门诊病历保存成功事件
|
||||
function handleEmrSaved(isSaved) {
|
||||
outpatientEmrSaved.value = isSaved;
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
function handleCancelEncounter() {
|
||||
proxy.$modal.confirm('您确定要取消病人本次的就诊记录吗?', '提示信息', {
|
||||
@@ -507,9 +690,50 @@ function handleCancelEncounter() {
|
||||
// 用户取消操作
|
||||
});
|
||||
}
|
||||
=======
|
||||
// 判断是否已经入院登记
|
||||
const onHospitalization = async () => {
|
||||
const diagnosisRes = await getEncounterDiagnosis(patientInfo.value.encounterId);
|
||||
const hasDiagnosis = diagnosisRes.data?.length > 0;
|
||||
if (!hasDiagnosis) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者暂无诊断信息,无法办理住院!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
const mainDiag = diagnosisRes.data.find((item) => item.maindiseFlag === 1);
|
||||
if (!mainDiag) {
|
||||
ElMessage({ type: 'error', message: '该患者暂无主诊断信息,无法办理住院!' });
|
||||
return;
|
||||
}
|
||||
mainDiagnosis.value = mainDiag;
|
||||
const res = await isHospitalization({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
});
|
||||
if (!res.data) {
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者,已办理入院,不允许重复办理',
|
||||
});
|
||||
}
|
||||
};
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 患者信息
|
||||
.patient-info-descriptions {
|
||||
:deep(.el-descriptions__label) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
:deep(.el-descriptions__content) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.patient-card {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user