修复门诊医生站->【处方单】按钮,点击【处方单】按钮无响应问题
This commit is contained in:
@@ -3212,7 +3212,54 @@ function getPrescriptionTotalAmount(prescriptionId) {
|
||||
}
|
||||
|
||||
|
||||
defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
/**
|
||||
* 获取已签发的处方单信息(用于处方单预览)
|
||||
* 返回已签发的药品处方单数据(statusEnum == 2 且 adviceType == 1 或 2)
|
||||
*/
|
||||
function getSignedPrescriptionInfo() {
|
||||
const signedPrescriptions = [];
|
||||
|
||||
// 遍历所有处方
|
||||
Object.keys(allPrescriptionsData.value).forEach(prescriptionId => {
|
||||
const prescriptionData = allPrescriptionsData.value[prescriptionId] || [];
|
||||
const prescription = westernPrescriptions.value.find(p => p.id === prescriptionId);
|
||||
|
||||
if (!prescription) return;
|
||||
|
||||
// 筛选已签发的药品(西药和中成药)
|
||||
const signedMedicines = prescriptionData.filter(item =>
|
||||
item.statusEnum === 2 && (item.adviceType === 1 || item.adviceType === 2)
|
||||
);
|
||||
|
||||
if (signedMedicines.length > 0) {
|
||||
// 构建处方单信息
|
||||
const prescriptionInfo = {
|
||||
prescriptionNo: prescription.name || `处方${prescriptionId}`,
|
||||
patientName: props.patientInfo?.patientName || '',
|
||||
requestTime: new Date().toISOString(),
|
||||
conditionDefinitionName: diagnosisName.value || '',
|
||||
prescriptionInfoDetail: signedMedicines.map(item => ({
|
||||
requestId: item.requestId,
|
||||
adviceName: item.adviceName || '',
|
||||
volume: item.volume || '',
|
||||
quantity: item.quantity || '',
|
||||
unitCode_dictText: item.unitCode_dictText || '',
|
||||
lotNumber: item.lotNumber || '',
|
||||
methodCode_dictText: item.methodCode_dictText || '',
|
||||
dose: item.dose || '',
|
||||
doseUnitCode_dictText: item.doseUnitCode_dictText || '',
|
||||
rateCode_dictText: item.rateCode_dictText || ''
|
||||
}))
|
||||
};
|
||||
|
||||
signedPrescriptions.push(prescriptionInfo);
|
||||
}
|
||||
});
|
||||
|
||||
return signedPrescriptions;
|
||||
}
|
||||
|
||||
defineExpose({ getListInfo, getDiagnosisInfo, getSignedPrescriptionInfo });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user