Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -260,7 +260,8 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
.eq(EncounterDiagnosis::getEncounterId, encounterId)
|
.eq(EncounterDiagnosis::getEncounterId, encounterId)
|
||||||
.set(EncounterDiagnosis::getMaindiseFlag, 0));
|
.set(EncounterDiagnosis::getMaindiseFlag, 0));
|
||||||
}
|
}
|
||||||
|
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||||
|
String username = SecurityUtils.getUsername();
|
||||||
// 保存诊断管理
|
// 保存诊断管理
|
||||||
Condition condition;
|
Condition condition;
|
||||||
for (SaveDiagnosisChildParam saveDiagnosisChildParam : diagnosisChildList) {
|
for (SaveDiagnosisChildParam saveDiagnosisChildParam : diagnosisChildList) {
|
||||||
@@ -277,13 +278,24 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
||||||
condition.setRecordedDatetime(new Date());
|
condition.setRecordedDatetime(new Date());
|
||||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||||
|
|
||||||
|
if(condition.getCreateBy() == null){
|
||||||
|
condition.setCreateBy(username);
|
||||||
|
}
|
||||||
|
condition.setUpdateBy(username);
|
||||||
|
|
||||||
|
condition.setTenantId(tenantId);
|
||||||
|
if(condition.getCreateTime() == null){
|
||||||
|
condition.setCreateTime(new Date());
|
||||||
|
}
|
||||||
|
condition.setUpdateTime(new Date());
|
||||||
iConditionService.saveOrUpdate(condition);
|
iConditionService.saveOrUpdate(condition);
|
||||||
saveDiagnosisChildParam.setConditionId(condition.getId());
|
saveDiagnosisChildParam.setConditionId(condition.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 保存就诊诊断
|
// 保存就诊诊断
|
||||||
EncounterDiagnosis encounterDiagnosis;
|
EncounterDiagnosis encounterDiagnosis = null;
|
||||||
for (SaveDiagnosisChildParam saveDiagnosisChildParam : diagnosisChildList) {
|
for (SaveDiagnosisChildParam saveDiagnosisChildParam : diagnosisChildList) {
|
||||||
if (saveDiagnosisChildParam.getUpdateId() != null) {
|
if (saveDiagnosisChildParam.getUpdateId() != null) {
|
||||||
String updateId = saveDiagnosisChildParam.getUpdateId();
|
String updateId = saveDiagnosisChildParam.getUpdateId();
|
||||||
@@ -306,6 +318,19 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
encounterDiagnosis.setDiagnosisDesc(saveDiagnosisChildParam.getDiagnosisDesc()); // 诊断描述
|
encounterDiagnosis.setDiagnosisDesc(saveDiagnosisChildParam.getDiagnosisDesc()); // 诊断描述
|
||||||
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
||||||
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
|
encounterDiagnosis.setDoctor(saveDiagnosisChildParam.getDiagnosisDoctor());
|
||||||
|
encounterDiagnosis.setClassification(saveDiagnosisChildParam.getClassification());
|
||||||
|
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
||||||
|
encounterDiagnosis.setTenantId(tenantId);
|
||||||
|
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
||||||
|
if(encounterDiagnosis.getCreateBy() == null){
|
||||||
|
encounterDiagnosis.setCreateBy(username);
|
||||||
|
}
|
||||||
|
encounterDiagnosis.setUpdateBy(username);
|
||||||
|
if(encounterDiagnosis.getCreateTime() == null){
|
||||||
|
encounterDiagnosis.setCreateTime(new Date());
|
||||||
|
}
|
||||||
|
encounterDiagnosis.setUpdateTime(new Date());
|
||||||
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@@ -319,11 +344,24 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
encounterDiagnosis.setMedTypeCode(saveDiagnosisChildParam.getMedTypeCode());// 医疗类型
|
encounterDiagnosis.setMedTypeCode(saveDiagnosisChildParam.getMedTypeCode());// 医疗类型
|
||||||
encounterDiagnosis.setDiagnosisDesc(saveDiagnosisChildParam.getDiagnosisDesc()); // 诊断描述
|
encounterDiagnosis.setDiagnosisDesc(saveDiagnosisChildParam.getDiagnosisDesc()); // 诊断描述
|
||||||
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
||||||
|
encounterDiagnosis.setDoctor(saveDiagnosisChildParam.getDiagnosisDoctor());
|
||||||
|
encounterDiagnosis.setClassification(saveDiagnosisChildParam.getClassification());
|
||||||
|
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
||||||
|
encounterDiagnosis.setTenantId(tenantId);
|
||||||
|
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
||||||
|
if(encounterDiagnosis.getCreateBy() == null){
|
||||||
|
encounterDiagnosis.setCreateBy(username);
|
||||||
|
}
|
||||||
|
encounterDiagnosis.setUpdateBy(username);
|
||||||
|
if(encounterDiagnosis.getCreateTime() == null){
|
||||||
|
encounterDiagnosis.setCreateTime(new Date());
|
||||||
|
}
|
||||||
|
encounterDiagnosis.setUpdateTime(new Date());
|
||||||
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊断"}));
|
return R.ok(encounterDiagnosis, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊断"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存诊断 子参数类
|
* 保存诊断 子参数类
|
||||||
*
|
*
|
||||||
@@ -33,6 +35,9 @@ public class SaveDiagnosisChildParam {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long definitionId;
|
private Long definitionId;
|
||||||
|
|
||||||
|
private String classification;
|
||||||
|
|
||||||
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 医保编码
|
* 医保编码
|
||||||
*/
|
*/
|
||||||
@@ -64,6 +69,18 @@ public class SaveDiagnosisChildParam {
|
|||||||
*/
|
*/
|
||||||
private String diagnosisDesc;
|
private String diagnosisDesc;
|
||||||
|
|
||||||
|
private String diagnosisDoctor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断时间
|
||||||
|
*/
|
||||||
|
private Date diagnosisTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发病时间
|
||||||
|
*/
|
||||||
|
private Date onsetDate;
|
||||||
|
|
||||||
/** 患者疾病诊断类型代码 */
|
/** 患者疾病诊断类型代码 */
|
||||||
private Integer iptDiseTypeCode;
|
private Integer iptDiseTypeCode;
|
||||||
|
|
||||||
@@ -77,4 +94,6 @@ public class SaveDiagnosisChildParam {
|
|||||||
*/
|
*/
|
||||||
private String updateConditionId;
|
private String updateConditionId;
|
||||||
|
|
||||||
|
private Integer longTermFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,4 +66,25 @@ public class EncounterDiagnosis extends HisBaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String diagnosisDesc;
|
private String diagnosisDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医生
|
||||||
|
*/
|
||||||
|
private String doctor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*病名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*分类
|
||||||
|
*/
|
||||||
|
private String classification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 长诊断标识
|
||||||
|
*/
|
||||||
|
private Integer longTermFlag;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -386,12 +386,6 @@ function parseClassEnumValues(value) {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNo = 1;
|
queryParams.value.pageNo = 1;
|
||||||
if (Array.isArray(queryParams.value.classEnum)) {
|
|
||||||
queryParams.value.classEnum =
|
|
||||||
queryParams.value.classEnum.length > 0
|
|
||||||
? queryParams.value.classEnum.join(',')
|
|
||||||
: undefined;
|
|
||||||
}
|
|
||||||
getPageList();
|
getPageList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +400,15 @@ function resetQuery() {
|
|||||||
|
|
||||||
function getPageList() {
|
function getPageList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getList(queryParams.value).then((res) => {
|
// 创建API调用的查询参数副本,处理classEnum的转换
|
||||||
|
const apiParams = { ...queryParams.value };
|
||||||
|
if (Array.isArray(apiParams.classEnum)) {
|
||||||
|
apiParams.classEnum =
|
||||||
|
apiParams.classEnum.length > 0
|
||||||
|
? apiParams.classEnum.join(',')
|
||||||
|
: undefined;
|
||||||
|
}
|
||||||
|
getList(apiParams).then((res) => {
|
||||||
// 处理返回的科室数据,确保科室分类显示与系统标准字典一致
|
// 处理返回的科室数据,确保科室分类显示与系统标准字典一致
|
||||||
const processedData = res.data.records.map(item => {
|
const processedData = res.data.records.map(item => {
|
||||||
// 保留原有显示文本作为基础
|
// 保留原有显示文本作为基础
|
||||||
|
|||||||
@@ -75,15 +75,27 @@
|
|||||||
<el-form :model="form" :rules="rules" ref="formRef">
|
<el-form :model="form" :rules="rules" ref="formRef">
|
||||||
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
|
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
<el-table-column label="分类" align="center" prop="classification" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
|
<el-form-item :prop="`diagnosisList.${scope.$index}.classification`">
|
||||||
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
|
<!-- <el-select v-model="scope.row.classification" placeholder=" " style="width: 100px">
|
||||||
style="width: 80px" />
|
<el-option label="西医" value="西医" />
|
||||||
|
<el-option label="中医" value="中医" />
|
||||||
|
<el-option label="证型" value="证型" />
|
||||||
|
<el-option label="其他" value="其他" />
|
||||||
|
</el-select>-->
|
||||||
|
<el-select v-model="scope.row.classification" placeholder=" " style="width: 100px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in diagnosis_classification"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
|
<el-table-column label="诊断类型" align="center" prop="medTypeCode" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
||||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||||
@@ -97,7 +109,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="诊断名称" align="center" prop="name">
|
<el-table-column label="诊断" align="center" prop="name" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||||
<el-popover
|
<el-popover
|
||||||
@@ -121,34 +133,86 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
<el-table-column label="主诊断" align="center" prop="maindiseFlag" width="100">
|
||||||
<el-table-column label="类别" align="center" prop="typeName" width="100" />
|
|
||||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
<el-form-item style="display: flex;justify-content: center;margin-bottom: 0;">
|
||||||
<el-checkbox
|
<el-select
|
||||||
label="主诊断"
|
v-model="scope.row.maindiseFlag"
|
||||||
:true-value="1"
|
placeholder=" "
|
||||||
:false-value="0"
|
style="width: 80px"
|
||||||
v-model="scope.row.maindiseFlag"
|
@change="(value) => handleMaindise(value, scope.$index)"
|
||||||
border
|
>
|
||||||
size="small"
|
<el-option label="是" :value="1" />
|
||||||
@change="(value) => handleMaindise(value, scope.$index)"
|
<el-option label="否" :value="0" />
|
||||||
/>
|
</el-select>
|
||||||
<el-select
|
</el-form-item>
|
||||||
v-model="scope.row.verificationStatusEnum"
|
</template>
|
||||||
placeholder=" "
|
</el-table-column>
|
||||||
style="width: 100%; padding-bottom: 5px; padding-left: 10px"
|
<el-table-column label="诊断备注" align="center" prop="diagnosisDesc" width="180">
|
||||||
size="small"
|
<template #default="scope">
|
||||||
>
|
<el-form-item :prop="`diagnosisList.${scope.$index}.diagnosisDesc`">
|
||||||
<el-option
|
<el-input v-model="scope.row.diagnosisDesc" placeholder="请输入备注" />
|
||||||
v-for="item in diagnosisOptions"
|
</el-form-item>
|
||||||
:key="item.value"
|
</template>
|
||||||
:label="item.label"
|
</el-table-column>
|
||||||
:value="item.value"
|
<el-table-column label="ICD代码" align="center" prop="ybNo" width="180" />
|
||||||
|
<el-table-column label="诊断状态" align="center" prop="verificationStatusEnum" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-form-item :prop="`diagnosisList.${scope.$index}.verificationStatusEnum`" style="margin-bottom: 0;">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.verificationStatusEnum"
|
||||||
|
placeholder=" "
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in diagnosisOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发病日期" align="center" prop="onsetDate" width="160">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-form-item :prop="`diagnosisList.${scope.$index}.onsetDate`">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="scope.row.onsetDate"
|
||||||
|
type="date"
|
||||||
|
placeholder=" "
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</div>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="诊断日期" align="center" prop="diagnosisTime" width="160">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-form-item :prop="`diagnosisList.${scope.$index}.diagnosisTime`">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="scope.row.diagnosisTime"
|
||||||
|
type="date"
|
||||||
|
placeholder=" "
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="医生" align="center" prop="diagnosisDoctor" width="120" />
|
||||||
|
<el-table-column label="长效诊断标识" align="center" prop="longTermFlag" width="140">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-form-item :prop="`diagnosisList.${scope.$index}.longTermFlag`">
|
||||||
|
<el-select v-model="scope.row.longTermFlag" placeholder=" " style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in long_term_flag"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="130">
|
<el-table-column label="操作" align="center" width="130">
|
||||||
@@ -220,6 +284,9 @@ const emits = defineEmits(['diagnosisSave']);
|
|||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { diag_type } = proxy.useDict('diag_type');
|
const { diag_type } = proxy.useDict('diag_type');
|
||||||
|
const { diagnosis_classification } = proxy.useDict('diagnosis_classification');
|
||||||
|
const { long_term_flag } = proxy.useDict('long_term_flag');
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||||
@@ -255,6 +322,12 @@ function getList() {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// 过滤掉中医诊断,只保留西医诊断
|
// 过滤掉中医诊断,只保留西医诊断
|
||||||
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
|
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
|
||||||
|
// 为旧数据添加默认分类
|
||||||
|
form.value.diagnosisList.forEach(item => {
|
||||||
|
if (!item.classification) {
|
||||||
|
item.classification = '西医';
|
||||||
|
}
|
||||||
|
});
|
||||||
emits('diagnosisSave', false);
|
emits('diagnosisSave', false);
|
||||||
}
|
}
|
||||||
maxNo = form.value.diagnosisList.length;
|
maxNo = form.value.diagnosisList.length;
|
||||||
@@ -274,6 +347,8 @@ function getList() {
|
|||||||
medTypeCode: item.medTypeCode,
|
medTypeCode: item.medTypeCode,
|
||||||
syndromeGroupNo: item.syndromeGroupNo,
|
syndromeGroupNo: item.syndromeGroupNo,
|
||||||
typeName: '中医诊断',
|
typeName: '中医诊断',
|
||||||
|
classification: '中医', // 中医诊断默认分类
|
||||||
|
onsetDate: item.onsetDate,
|
||||||
updateId:item.encounterDiagnosisId+'-'+res.data.symptom[index].encounterDiagnosisId,
|
updateId:item.encounterDiagnosisId+'-'+res.data.symptom[index].encounterDiagnosisId,
|
||||||
illnessDefinitionId : item.definitionId,
|
illnessDefinitionId : item.definitionId,
|
||||||
symptomDefinitionId : res.data.symptom[index].definitionId,
|
symptomDefinitionId : res.data.symptom[index].definitionId,
|
||||||
@@ -323,8 +398,10 @@ function handleImport() {
|
|||||||
diagSrtNo: maxSortNo + index + 1,
|
diagSrtNo: maxSortNo + index + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
|
classification: '西医', // 导入的慢性病默认为西医
|
||||||
|
onsetDate: getCurrentDate(),
|
||||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
diagnosisTime: getCurrentDate()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -425,8 +502,10 @@ function handleAddDiagnosis() {
|
|||||||
diagSrtNo: maxSortNo + 1,
|
diagSrtNo: maxSortNo + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
|
classification: '西医', // 默认为西医
|
||||||
|
onsetDate: getCurrentDate(),
|
||||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
diagnosisTime: getCurrentDate()
|
||||||
});
|
});
|
||||||
|
|
||||||
// 添加后按排序号排序
|
// 添加后按排序号排序
|
||||||
@@ -613,8 +692,10 @@ function handleNodeClick(data) {
|
|||||||
medTypeCode: '11',
|
medTypeCode: '11',
|
||||||
diagSrtNo: maxSortNo + 1,
|
diagSrtNo: maxSortNo + 1,
|
||||||
definitionId: data.definitionId,
|
definitionId: data.definitionId,
|
||||||
|
classification: '西医', // 默认为西医
|
||||||
|
onsetDate: getCurrentDate(),
|
||||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
diagnosisTime: getCurrentDate()
|
||||||
});
|
});
|
||||||
|
|
||||||
// 添加后按排序号排序
|
// 添加后按排序号排序
|
||||||
@@ -625,6 +706,16 @@ function handleNodeClick(data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCurrentDate() {
|
||||||
|
const date = new Date();
|
||||||
|
const year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
let day = date.getDate();
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
day = day < 10 ? "0" + day : day;
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
max-height="400"
|
max-height="400"
|
||||||
>
|
>
|
||||||
<el-table-column label="诊断名称" align="center" prop="name" />
|
<el-table-column label="诊断名称" align="center" prop="name" />
|
||||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
<el-table-column label="ICD代码" align="center" prop="ybNo" />
|
||||||
<el-table-column label="诊断类型" align="center" prop="typeName" width="180"/>
|
<el-table-column label="诊断类型" align="center" prop="typeName" width="180"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -356,265 +356,39 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 剂量单位 -->
|
</div>
|
||||||
<el-select
|
</div>
|
||||||
v-model="scope.row.unitCode"
|
<div
|
||||||
style="width: 70px; margin-right: 20px"
|
style="
|
||||||
placeholder=" "
|
display: flex;
|
||||||
>
|
align-items: center;
|
||||||
<template
|
gap: 12px;
|
||||||
v-for="item in scope.row.unitCodeList"
|
flex-wrap: wrap;
|
||||||
:key="item.value"
|
margin-top: 10px;
|
||||||
>
|
"
|
||||||
<el-option
|
>
|
||||||
v-if="item.type == unitMap['minUnit']"
|
<div class="form-group">
|
||||||
:value="item.value"
|
<el-form-item
|
||||||
:label="item.label"
|
label="备注:"
|
||||||
/>
|
prop="remarks"
|
||||||
</template>
|
style="margin: 0; margin-right: 20px"
|
||||||
</el-select>
|
|
||||||
<span>=</span>
|
|
||||||
<!-- 单次剂量 -->
|
|
||||||
<el-form-item prop="dose" class="required-field" data-prop="dose">
|
|
||||||
<el-input-number
|
|
||||||
v-model="scope.row.dose"
|
|
||||||
controls-position="right"
|
|
||||||
:controls="false"
|
|
||||||
style="width: 70px; margin: 0 20px"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].dose = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@input="convertDoseValues(scope.row, scope.$index)"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter(
|
|
||||||
'dose',
|
|
||||||
scope.row,
|
|
||||||
scope.$index,
|
|
||||||
prescription.id
|
|
||||||
)
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 全部单位 -->
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.doseUnitCode"
|
|
||||||
style="width: 70px"
|
|
||||||
placeholder=" "
|
|
||||||
@change="convertValues(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in scope.row.unitCodeList"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:key="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<el-form-item
|
|
||||||
label="给药途径:"
|
|
||||||
prop="methodCode"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="methodCode"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.methodCode"
|
|
||||||
placeholder="给药途径"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].methodCode = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
() => {
|
|
||||||
inputRefs[scope.$index]?.methodCode?.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@visible-change="
|
|
||||||
(value) => {
|
|
||||||
if (!value) {
|
|
||||||
handleEnter('methodCode', scope.row, scope.$index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in method_code"
|
|
||||||
@click="() => (scope.row.methodCode_dictText = dict.label)"
|
|
||||||
@keyup="handleEnter('methodCode', scope.row, scope.$index)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
label="用药频次:"
|
|
||||||
prop="rateCode"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="rateCode"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.rateCode"
|
|
||||||
placeholder="频次"
|
|
||||||
style="width: 120px"
|
|
||||||
filterable
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
() => {
|
|
||||||
inputRefs[scope.$index]?.rateCode?.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
@visible-change="
|
|
||||||
(value) => {
|
|
||||||
if (!value) {
|
|
||||||
handleEnter('rateCode', scope.row, scope.$index);
|
|
||||||
}
|
|
||||||
// inputRefs.rateCode.blur();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].rateCode = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in rate_code"
|
|
||||||
@click="() => (scope.row.rateCode_dictText = dict.label)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
label="备注:"
|
|
||||||
prop="remarks"
|
|
||||||
style="margin: 0; margin-right: 20px"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="scope.row.remarks"
|
|
||||||
placeholder="请输入备注"
|
|
||||||
maxlength="100"
|
|
||||||
show-word-limit
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: 10px;
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div class="form-group">
|
<el-input
|
||||||
<el-form-item
|
v-model="scope.row.remarks"
|
||||||
label="用药天数:"
|
placeholder="请输入备注"
|
||||||
prop="dispensePerDuration"
|
maxlength="100"
|
||||||
class="required-field"
|
show-word-limit
|
||||||
data-prop="dispensePerDuration"
|
style="width: 500px"
|
||||||
>
|
/>
|
||||||
<el-input-number
|
</el-form-item>
|
||||||
v-model="scope.row.dispensePerDuration"
|
</div>
|
||||||
style="width: 80px"
|
<el-button
|
||||||
:min="1"
|
type="primary"
|
||||||
controls-position="right"
|
@click="handleSaveSign(scope.row, scope.$index)"
|
||||||
:controls="false"
|
>
|
||||||
:ref="
|
确定
|
||||||
(el) => {
|
</el-button>
|
||||||
if (!inputRefs[scope.$index])
|
</div>
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].dispensePerDuration = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter('dispensePerDuration', scope.row, scope.$index)
|
|
||||||
"
|
|
||||||
@input="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<template #suffix>天</template>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item
|
|
||||||
label="总量:"
|
|
||||||
prop="quantity"
|
|
||||||
class="required-field"
|
|
||||||
data-prop="quantity"
|
|
||||||
>
|
|
||||||
<el-input-number
|
|
||||||
v-model="scope.row.quantity"
|
|
||||||
style="width: 70px"
|
|
||||||
controls-position="right"
|
|
||||||
:controls="false"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (!inputRefs[scope.$index])
|
|
||||||
inputRefs[scope.$index] = {};
|
|
||||||
inputRefs[scope.$index].quantity = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
@keyup.enter.prevent="
|
|
||||||
handleEnter(
|
|
||||||
'quantity',
|
|
||||||
scope.row,
|
|
||||||
scope.$index,
|
|
||||||
prescription.id
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@input="calculateTotalPrice(scope.row, scope.$index)"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.unitCode"
|
|
||||||
style="width: 70px; margin-right: 20px"
|
|
||||||
placeholder=" "
|
|
||||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-for="item in scope.row.unitCodeList"
|
|
||||||
:key="item.value"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-if="checkUnit(item, scope.row)"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
if (item.type == unitMap['minUnit']) {
|
|
||||||
scope.row.unitPrice = scope.row.minUnitPrice;
|
|
||||||
} else {
|
|
||||||
scope.row.unitPrice = scope.row.unitTempPrice;
|
|
||||||
}
|
|
||||||
scope.row.unitCode_dictText = item.label;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="handleSaveSign(scope.row, scope.$index, prescription.id)"
|
|
||||||
>
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row.adviceType == 2">
|
<template v-else-if="scope.row.adviceType == 2">
|
||||||
<div
|
<div
|
||||||
@@ -693,7 +467,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index, prescription.id)">
|
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -1152,6 +926,12 @@ const adviceTypeList = ref([
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// 根据类型值获取显示标签,避免非编辑态出现空标签
|
||||||
|
const mapAdviceTypeLabel = (type) => {
|
||||||
|
const found = adviceTypeList.value.find((item) => item.value === type);
|
||||||
|
return found ? found.label : '';
|
||||||
|
};
|
||||||
|
|
||||||
// 西药处方管理相关变量
|
// 西药处方管理相关变量
|
||||||
const westernPrescriptions = ref([]); // 西药处方列表
|
const westernPrescriptions = ref([]); // 西药处方列表
|
||||||
const currentPrescriptionId = ref(null); // 当前活跃的处方ID
|
const currentPrescriptionId = ref(null); // 当前活跃的处方ID
|
||||||
@@ -2321,6 +2101,8 @@ function handleSaveSign(row, index, prescriptionId) {
|
|||||||
row.patientId = props.patientInfo.patientId;
|
row.patientId = props.patientInfo.patientId;
|
||||||
row.encounterId = props.patientInfo.encounterId;
|
row.encounterId = props.patientInfo.encounterId;
|
||||||
row.accountId = accountId.value;
|
row.accountId = accountId.value;
|
||||||
|
// 确保非编辑态显示正确的医嘱类型标签
|
||||||
|
row.adviceType_dictText = mapAdviceTypeLabel(row.adviceType);
|
||||||
if (row.adviceType == 1 || row.adviceType == 2) {
|
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||||
row.minUnitQuantity =
|
row.minUnitQuantity =
|
||||||
row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent;
|
row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent;
|
||||||
|
|||||||
Reference in New Issue
Block a user