Compare commits
18 Commits
fdfe5334a1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce76b2f98d | ||
| 8fbca1a898 | |||
| d548215123 | |||
| 953d17dc8c | |||
|
|
b71a21ea5c | ||
|
|
0a20b5e34e | ||
| 388425084e | |||
| 51ee8d1b43 | |||
|
|
d29d56e712 | ||
|
|
9084ddaa98 | ||
|
|
be6d5c1ccc | ||
| 1bba9e598a | |||
| d58a5e8ab3 | |||
| e6ffb7101f | |||
|
|
48b2188cf9 | ||
|
|
8bc5d45976 | ||
| 04f6e7e960 | |||
| 8fb58bdab8 |
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
天天开源致⼒于打造中国应⽤管理软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
天天开源致⼒于打造中国应⽤管理 软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
||||||
|
|
||||||
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
// 初复诊
|
// 初复诊
|
||||||
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
||||||
: EncounterType.INITIAL.getInfo());
|
: EncounterType.INITIAL.getInfo());
|
||||||
|
// 患者标识
|
||||||
|
PatientIdentifier patientIdentifier = patientIdentifierService
|
||||||
|
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
|
||||||
|
if (patientIdentifier != null) {
|
||||||
|
e.setIdentifierNo(patientIdentifier.getIdentifierNo());
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return patientMetadataPage;
|
return patientMetadataPage;
|
||||||
|
|||||||
@@ -56,4 +56,8 @@ public class PatientMetadata {
|
|||||||
*/
|
*/
|
||||||
private String firstEnum_enumText;
|
private String firstEnum_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊卡号
|
||||||
|
*/
|
||||||
|
private String identifierNo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ public class PatientInfoDto {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long orgId;
|
private Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室名称
|
||||||
|
*/
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者姓名
|
* 患者姓名
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,4 +53,13 @@ public interface IPatientInformationService {
|
|||||||
*/
|
*/
|
||||||
R<?> addPatient(PatientInformationDto patientInformationDto);
|
R<?> addPatient(PatientInformationDto patientInformationDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查患者是否存在
|
||||||
|
*
|
||||||
|
* @param name 患者姓名
|
||||||
|
* @param idCardNo 身份证号
|
||||||
|
* @return 是否存在
|
||||||
|
*/
|
||||||
|
boolean checkPatientExists(String name, String idCardNo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,4 +257,14 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
|||||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"}));
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkPatientExists(String name, String idCardNo) {
|
||||||
|
QueryWrapper<Patient> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("name", name)
|
||||||
|
.eq("id_card", idCardNo)
|
||||||
|
.eq("delete_flag", "0");
|
||||||
|
return patientService.count(queryWrapper) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,4 +78,16 @@ public class PatientInformationController {
|
|||||||
.ok(patientInformationService.getPatientInfo(patientInfoSearchParam, searchKey, pageNo, pageSize, request));
|
.ok(patientInformationService.getPatientInfo(patientInfoSearchParam, searchKey, pageNo, pageSize, request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查患者是否存在
|
||||||
|
*
|
||||||
|
* @param name 患者姓名
|
||||||
|
* @param idCardNo 身份证号
|
||||||
|
* @return 是否存在
|
||||||
|
*/
|
||||||
|
@GetMapping("/check-exists")
|
||||||
|
public R<?> checkPatientExists(@RequestParam String name, @RequestParam String idCardNo) {
|
||||||
|
return R.ok(patientInformationService.checkPatientExists(name, idCardNo));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class PatientInformationDto {
|
|||||||
/**
|
/**
|
||||||
* 死亡时间
|
* 死亡时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date deceasedDate;
|
private Date deceasedDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
|||||||
|
|
||||||
ChargeItemDefinition chargeItemDefinition = iChargeItemDefinitionService.getById(definitionId);
|
ChargeItemDefinition chargeItemDefinition = iChargeItemDefinitionService.getById(definitionId);
|
||||||
|
|
||||||
|
|
||||||
YbMedChrgItmType medChrgItmType =
|
YbMedChrgItmType medChrgItmType =
|
||||||
YbMedChrgItmType.getByCode(Integer.parseInt(chargeItemDefinition.getYbType()));
|
YbMedChrgItmType.getByCode(Integer.parseInt(chargeItemDefinition.getYbType()));
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
T10.type_code,
|
T10.type_code,
|
||||||
T10.contract_name,
|
T10.contract_name,
|
||||||
T10.org_id,
|
T10.org_id,
|
||||||
|
T10.organization_name,
|
||||||
T10.register_time,
|
T10.register_time,
|
||||||
T10.reception_time,
|
T10.reception_time,
|
||||||
T10.practitioner_user_id,
|
T10.practitioner_user_id,
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ import TreeSelect from '@/components/TreeSelect'
|
|||||||
// 字典标签组件
|
// 字典标签组件
|
||||||
import DictTag from '@/components/DictTag'
|
import DictTag from '@/components/DictTag'
|
||||||
|
|
||||||
|
// 导入请求工具
|
||||||
|
import request from './utils/request'
|
||||||
|
|
||||||
import { ElDialog, ElMessage } from 'element-plus';
|
import { ElDialog, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
import {registerComponents} from './template';
|
import {registerComponents} from './template';
|
||||||
@@ -64,6 +67,9 @@ app.config.globalProperties.handleTree = handleTree
|
|||||||
app.config.globalProperties.addDateRange = addDateRange
|
app.config.globalProperties.addDateRange = addDateRange
|
||||||
app.config.globalProperties.selectDictLabel = selectDictLabel
|
app.config.globalProperties.selectDictLabel = selectDictLabel
|
||||||
app.config.globalProperties.selectDictLabels = selectDictLabels
|
app.config.globalProperties.selectDictLabels = selectDictLabels
|
||||||
|
|
||||||
|
// 全局挂载请求实例
|
||||||
|
app.config.globalProperties.$http = request
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
app.component('DictTag', DictTag)
|
app.component('DictTag', DictTag)
|
||||||
app.component('Pagination', Pagination)
|
app.component('Pagination', Pagination)
|
||||||
|
|||||||
@@ -48,6 +48,11 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="项目编码" prop="busNo">
|
||||||
|
<el-input v-model="form.busNo" placeholder="请输入项目编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -356,7 +361,7 @@ const diagnosisTreatmentList = ref([]);
|
|||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||||
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
||||||
@@ -450,6 +455,7 @@ function setValue(row) {
|
|||||||
form.value = {
|
form.value = {
|
||||||
name: formatValue(row.medicalServiceName), //医疗服务项目名称
|
name: formatValue(row.medicalServiceName), //医疗服务项目名称
|
||||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||||
|
busNo: formatValue(row.medicalCatalogCode), // 项目编码使用医保编码
|
||||||
categoryCode: props.currentCategoryEnum,
|
categoryCode: props.currentCategoryEnum,
|
||||||
// chrgitmLv: formatValue(
|
// chrgitmLv: formatValue(
|
||||||
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||||
|
|||||||
@@ -124,7 +124,9 @@
|
|||||||
:disabled="isViewMode"
|
:disabled="isViewMode"
|
||||||
@input="handleAgeInput"
|
@input="handleAgeInput"
|
||||||
placeholder="请输入年龄"
|
placeholder="请输入年龄"
|
||||||
/>
|
>
|
||||||
|
<template #suffix>岁</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -300,6 +302,36 @@ const title = ref('新增患者');
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||||
|
|
||||||
|
const validateUniquePatient = (rule, value, callback) => {
|
||||||
|
const { name, idCard } = form.value;
|
||||||
|
// 确保姓名和身份证都已填写且身份证为18位
|
||||||
|
if (!name || !idCard || idCard.length !== 18) {
|
||||||
|
return callback(); // 不满足条件,不校验
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用 axios 直接请求,避免依赖 proxy.$http
|
||||||
|
import('@/utils/request').then(({ default: request }) => {
|
||||||
|
request({
|
||||||
|
url: '/patient-manage/information/check-exists',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
name: name,
|
||||||
|
idCardNo: idCard
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 200 && res.data === true) {
|
||||||
|
callback(new Error('该患者档案已存在!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('校验患者是否存在失败:', error);
|
||||||
|
callback(); // 出错时不阻塞表单
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 身份证号码校验函数
|
// 身份证号码校验函数
|
||||||
const validateIdCard = (rule, value, callback) => {
|
const validateIdCard = (rule, value, callback) => {
|
||||||
@@ -338,13 +370,17 @@ const data = reactive({
|
|||||||
age: undefined,
|
age: undefined,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
|
name: [{ required: true, message: '姓名不能为空', trigger: 'change' },
|
||||||
|
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||||
|
],
|
||||||
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||||
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
||||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
||||||
|
identifierNo: [{ required: true, message: '就诊卡号不能为空', trigger: 'change' }],
|
||||||
idCard: [
|
idCard: [
|
||||||
{ required: true, message: '证件号码不能为空', trigger: 'change' },
|
{ required: true, message: '证件号码不能为空', trigger: 'change' },
|
||||||
{ validator: validateIdCard, trigger: 'blur' }
|
{ validator: validateIdCard, trigger: 'blur' },
|
||||||
|
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
|
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
@@ -378,7 +414,7 @@ function handleBirthDateChange() {
|
|||||||
age--;
|
age--;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.value.age = age + '岁';
|
form.value.age = age;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,7 +425,7 @@ function handleAgeInput() {
|
|||||||
if (ageMatch) {
|
if (ageMatch) {
|
||||||
const age = parseInt(ageMatch[0]);
|
const age = parseInt(ageMatch[0]);
|
||||||
// 移除非数字字符,保留数字和可能的单位
|
// 移除非数字字符,保留数字和可能的单位
|
||||||
form.value.age = age + '岁';
|
form.value.age = age ;
|
||||||
|
|
||||||
// 计算出生日期
|
// 计算出生日期
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
@@ -428,7 +464,7 @@ watch(
|
|||||||
age--;
|
age--;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.value.age = age + '岁';
|
form.value.age = age ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -49,9 +49,12 @@
|
|||||||
label="年龄"
|
label="年龄"
|
||||||
align="center"
|
align="center"
|
||||||
key="age"
|
key="age"
|
||||||
prop="age"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
|
|||||||
@@ -7,10 +7,15 @@
|
|||||||
@cell-click="clickRow"
|
@cell-click="clickRow"
|
||||||
>
|
>
|
||||||
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column label="姓名" align="center" prop="name" />
|
||||||
|
<el-table-column label="就诊卡号" align="center" prop="identifierNo" />
|
||||||
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
|
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
|
||||||
<el-table-column label="证件号" align="center" prop="idCard" />
|
<el-table-column label="证件号" align="center" prop="idCard" />
|
||||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||||
<el-table-column label="年龄" align="center" prop="age" />
|
<el-table-column label="年龄" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
|
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="病历号/姓名:" prop="searchKey">
|
<el-form-item label="患者身份信息:" prop="searchKey">
|
||||||
<el-popover
|
<el-popover
|
||||||
:popper-style="{ padding: '0' }"
|
:popper-style="{ padding: '0' }"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
@input="handleSearchPatient"
|
@input="handleSearchPatient"
|
||||||
v-model="form.searchKey"
|
v-model="form.searchKey"
|
||||||
placeholder="请输入姓名/拼音/身份证"
|
placeholder="请输入姓名/身份证/就诊卡号"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="卡号:" prop="card">
|
<el-form-item label="就诊卡号:" prop="card">
|
||||||
<el-input v-model="form.card" placeholder="" :disabled="true" />
|
<el-input v-model="form.identifierNo" placeholder="" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -439,7 +439,11 @@
|
|||||||
prop="patientName"
|
prop="patientName"
|
||||||
width="120"
|
width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="年龄" align="center" key="age" prop="age" width="120" />
|
<el-table-column label="年龄" align="center" key="age" prop="age" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="患者性别"
|
label="患者性别"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -1235,6 +1239,7 @@ function selsectPatient(row) {
|
|||||||
form.value.phone = row.phone;
|
form.value.phone = row.phone;
|
||||||
form.value.firstEnum_enumText = row.firstEnum_enumText;
|
form.value.firstEnum_enumText = row.firstEnum_enumText;
|
||||||
form.value.age = row.age;
|
form.value.age = row.age;
|
||||||
|
form.value.identifierNo = row.identifierNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置新增参数
|
// 设置新增参数
|
||||||
|
|||||||
@@ -162,10 +162,17 @@ function removeDiagnosis(row, index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
|
// 为每个诊断项添加诊断医生和诊断时间
|
||||||
|
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||||
|
...item,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
|
}));
|
||||||
|
|
||||||
saveTcmDiagnosis({
|
saveTcmDiagnosis({
|
||||||
patientId: props.patientInfo.patientId,
|
patientId: props.patientInfo.patientId,
|
||||||
encounterId: props.patientInfo.encounterId,
|
encounterId: props.patientInfo.encounterId,
|
||||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
diagnosisChildList: diagnosisChildList,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
emit('close');
|
emit('close');
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<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="180">
|
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||||
@@ -135,9 +135,13 @@
|
|||||||
</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">
|
<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">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
label="主诊断"
|
label="主诊断"
|
||||||
:trueLabel="1"
|
:trueLabel="1"
|
||||||
@@ -150,7 +154,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.verificationStatusEnum"
|
v-model="scope.row.verificationStatusEnum"
|
||||||
placeholder=" "
|
placeholder=" "
|
||||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px"
|
style="width: 100%; padding-bottom: 5px; padding-left: 10px"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -160,6 +164,7 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="130">
|
<el-table-column label="操作" align="center" width="130">
|
||||||
@@ -192,6 +197,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getCurrentInstance } from 'vue';
|
import { getCurrentInstance } from 'vue';
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
import {
|
import {
|
||||||
getConditionDefinitionInfo,
|
getConditionDefinitionInfo,
|
||||||
saveDiagnosis,
|
saveDiagnosis,
|
||||||
@@ -228,6 +234,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const emits = defineEmits(['diagnosisSave']);
|
const emits = defineEmits(['diagnosisSave']);
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
const userStore = useUserStore();
|
||||||
const { med_type } = proxy.useDict('med_type');
|
const { med_type } = proxy.useDict('med_type');
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||||
@@ -244,27 +251,45 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function getDetail(encounterId) {
|
function getDetail(encounterId) {
|
||||||
|
if (!encounterId) {
|
||||||
|
console.warn('未提供有效的就诊ID,无法获取病历详情');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getEmrDetail(encounterId).then((res) => {
|
getEmrDetail(encounterId).then((res) => {
|
||||||
allowAdd.value = res.data ? true : false;
|
allowAdd.value = res.data ? true : false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
|
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||||
|
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
form.value.diagnosisList = res.data;
|
// 为每个诊断项添加默认的诊断医生和时间(如果不存在)
|
||||||
|
form.value.diagnosisList = res.data.map(item => ({
|
||||||
|
...item,
|
||||||
|
diagnosisDoctor: item.diagnosisDoctor || props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: item.diagnosisTime || new Date().toLocaleString('zh-CN')
|
||||||
|
}));
|
||||||
emits('diagnosisSave', false);
|
emits('diagnosisSave', false);
|
||||||
console.log(form.value.diagnosisList);
|
console.log(form.value.diagnosisList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.illness.length > 0) {
|
if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
|
||||||
res.data.illness.forEach((item, index) => {
|
res.data.illness.forEach((item, index) => {
|
||||||
form.value.diagnosisList.push({
|
form.value.diagnosisList.push({
|
||||||
name: item.name + '-' + res.data.symptom[index].name,
|
name: item.name + '-' + (res.data.symptom[index]?.name || ''),
|
||||||
ybNo: item.ybNo,
|
ybNo: item.ybNo,
|
||||||
medTypeCode: item.medTypeCode,
|
medTypeCode: item.medTypeCode,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -272,6 +297,7 @@ function getList() {
|
|||||||
console.log(form.value.diagnosisList);
|
console.log(form.value.diagnosisList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getTree();
|
getTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,21 +311,28 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleImport() {
|
function handleImport() {
|
||||||
|
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||||
|
console.warn('患者就诊信息不完整,无法导入慢性病信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (props.patientInfo.contractName != '自费') {
|
if (props.patientInfo.contractName != '自费') {
|
||||||
// 获取患者慢性病信息
|
// 获取患者慢性病信息
|
||||||
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||||
if (res.data.length > 0) {
|
if (res.data && res.data.length > 0) {
|
||||||
res.data.forEach((item, index) => {
|
res.data.forEach((item, index) => {
|
||||||
form.value.diagnosisList.push({
|
form.value.diagnosisList.push({
|
||||||
...item,
|
...item,
|
||||||
...{
|
...{
|
||||||
medTypeCode: '140104',
|
medTypeCode: '140104',
|
||||||
verificationStatusEnum: 4,
|
verificationStatusEnum: 4,
|
||||||
definitionId: item.id,
|
definitionId: item.id,
|
||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
},
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -342,7 +375,8 @@ const filterNode = (value, data) => {
|
|||||||
* 获取诊断树列表
|
* 获取诊断树列表
|
||||||
*/
|
*/
|
||||||
function getTree() {
|
function getTree() {
|
||||||
getConditionDefinitionInfo(props.patientInfo ? props.patientInfo.patientId : '').then((res) => {
|
const patientId = props.patientInfo?.patientId || '';
|
||||||
|
getConditionDefinitionInfo(patientId).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
list = res.data.patientHistoryList;
|
list = res.data.patientHistoryList;
|
||||||
@@ -391,6 +425,8 @@ function handleAddDiagnosis() {
|
|||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
if (form.value.diagnosisList.length == 1) {
|
if (form.value.diagnosisList.length == 1) {
|
||||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||||
@@ -537,6 +573,8 @@ function handleNodeClick(data) {
|
|||||||
medTypeCode: '11',
|
medTypeCode: '11',
|
||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
definitionId: data.definitionId,
|
definitionId: data.definitionId,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
if (form.value.diagnosisList.length == 1) {
|
if (form.value.diagnosisList.length == 1) {
|
||||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||||
|
|||||||
@@ -15,7 +15,42 @@
|
|||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div style="max-height: 650px; overflow-y: auto; overflow-x: hidden">
|
<div style="max-height: 650px; overflow-y: auto; overflow-x: hidden">
|
||||||
|
<div style="text-align: center; font-size: 18px; font-weight: bold; margin-bottom: 10px;">
|
||||||
|
{{ visitType === 'FIRST' ? '门诊初诊病历' : '门诊复诊病历' }}
|
||||||
|
</div>
|
||||||
<el-form ref="emrRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="emrRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row :gutter="4">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="就诊卡号" prop="patientId" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="patientInfo.patientId" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="姓名" prop="patientName" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="patientInfo.patientName" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="性别" prop="genderEnum_enumText" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="patientInfo.genderEnum_enumText" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="年龄" prop="age" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="patientInfo.age" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="就诊日期" prop="currentVisitDate" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="currentVisitDate" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="就诊科室" prop="organizationName" style="width: 100%">
|
||||||
|
<el-input placeholder="" v-model="patientInfo.organizationName" class="input-with-bottom-border"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="身高" prop="height" style="width: 100%">
|
<el-form-item label="身高" prop="height" style="width: 100%">
|
||||||
@@ -168,6 +203,20 @@ import { saveEmr, getEmrDetail, saveEmrTemplate } from '../api';
|
|||||||
import emrTemplate from '../emr/emrtemplate.vue';
|
import emrTemplate from '../emr/emrtemplate.vue';
|
||||||
import emrhistory from '../emr/emrhistory.vue';
|
import emrhistory from '../emr/emrhistory.vue';
|
||||||
|
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
|
||||||
|
// 2. 当前就诊日期(默认为当前时间)
|
||||||
|
const currentVisitDate = computed(() => {
|
||||||
|
return new Date().toLocaleString('zh-CN', {
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
second: '2-digit',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
const form = ref({});
|
const form = ref({});
|
||||||
const emrTitle = ref('');
|
const emrTitle = ref('');
|
||||||
const radio = ref(1);
|
const radio = ref(1);
|
||||||
@@ -184,6 +233,10 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
visitType: { // ✅ 接收父组件传来的值
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@@ -200,6 +200,11 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
patientInfo: {
|
patientInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
encounterId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
@@ -284,14 +289,22 @@ function submit() {
|
|||||||
...submitForm,
|
...submitForm,
|
||||||
diagnosisYbNo: diagnosisYbNo,
|
diagnosisYbNo: diagnosisYbNo,
|
||||||
diagnosisDefinitionId: diagnosisDefinitionId,
|
diagnosisDefinitionId: diagnosisDefinitionId,
|
||||||
ambEncounterId: props.patientInfo.encounterId,
|
// 优先使用props.encounterId,确保就诊ID正确传递
|
||||||
|
ambEncounterId: props.encounterId || props.patientInfo.encounterId,
|
||||||
patientId: props.patientInfo.patientId,
|
patientId: props.patientInfo.patientId,
|
||||||
};
|
};
|
||||||
|
console.log('提交住院数据:', saveData);
|
||||||
handleHospitalization(saveData).then((res) => {
|
handleHospitalization(saveData).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess('办理成功');
|
proxy.$modal.msgSuccess('办理成功');
|
||||||
close();
|
close();
|
||||||
|
} else {
|
||||||
|
console.error('办理失败:', res.msg);
|
||||||
|
proxy.$modal.msgError(res.msg || '办理失败,请检查数据后重试');
|
||||||
}
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('提交出错:', error);
|
||||||
|
proxy.$modal.msgError('提交请求失败');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,35 +98,36 @@
|
|||||||
<el-descriptions-item label="医生:" width="150">{{
|
<el-descriptions-item label="医生:" width="150">{{
|
||||||
userStore.name
|
userStore.name
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="" width="300">
|
<el-descriptions-item label="" width="350">
|
||||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
<!-- 初诊 / 复诊 按钮 -->
|
||||||
完诊
|
<el-radio v-model="visitType" label="FIRST">初诊</el-radio>
|
||||||
</el-button>
|
<el-radio v-model="visitType" label="FOLLOW_UP">复诊</el-radio>
|
||||||
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
|
|
||||||
暂离
|
<!-- 原有按钮 -->
|
||||||
</el-button>
|
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||||
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
|
完诊
|
||||||
退费
|
</el-button>
|
||||||
</el-button>
|
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
|
||||||
<el-button
|
暂离
|
||||||
type="primary"
|
</el-button>
|
||||||
plain
|
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
|
||||||
@click.stop="getEnPrescription(patientInfo.encounterId)"
|
退费
|
||||||
>
|
</el-button>
|
||||||
处方单
|
<el-button
|
||||||
</el-button>
|
type="primary"
|
||||||
<el-button
|
plain
|
||||||
type="primary"
|
@click.stop="getEnPrescription(patientInfo.encounterId)"
|
||||||
plain
|
>
|
||||||
@click.stop="
|
处方单
|
||||||
() => {
|
</el-button>
|
||||||
openDialog = true;
|
<el-button
|
||||||
}
|
type="primary"
|
||||||
"
|
plain
|
||||||
>
|
@click.stop="openDialog = true"
|
||||||
办理住院
|
>
|
||||||
</el-button>
|
办理住院
|
||||||
</el-descriptions-item>
|
</el-button>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px">
|
<div style="padding: 10px">
|
||||||
@@ -146,6 +147,7 @@
|
|||||||
saveStatus = value;
|
saveStatus = value;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
:visitType="visitType"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="诊断" name="diagnosis">
|
<el-tab-pane label="诊断" name="diagnosis">
|
||||||
@@ -204,6 +206,7 @@ import {
|
|||||||
leaveEncounter,
|
leaveEncounter,
|
||||||
completeEncounter,
|
completeEncounter,
|
||||||
getEnPrescriptionInfo,
|
getEnPrescriptionInfo,
|
||||||
|
getEmrHistoryList
|
||||||
} from './components/api.js';
|
} from './components/api.js';
|
||||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||||
@@ -260,6 +263,7 @@ const diagnosisRef = ref();
|
|||||||
const waitCount = ref(0);
|
const waitCount = ref(0);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
const visitType = ref('');
|
||||||
const disabled = computed(() => {
|
const disabled = computed(() => {
|
||||||
return Object.keys(patientInfo.value).length === 0;
|
return Object.keys(patientInfo.value).length === 0;
|
||||||
});
|
});
|
||||||
@@ -282,7 +286,41 @@ function getPatientList() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function setVisitType(type) {
|
||||||
|
visitType.value = type;
|
||||||
|
}
|
||||||
|
function checkPatientHistory(patient) {
|
||||||
|
// 如果患者没有身份证号,无法判断是否为初诊
|
||||||
|
if (!patient.idCard) {
|
||||||
|
// 默认设置为初诊
|
||||||
|
visitType.value = 'FIRST';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询患者历史就诊记录
|
||||||
|
const params = {
|
||||||
|
patientId: patient.patientId,
|
||||||
|
idCard: patient.idCard
|
||||||
|
};
|
||||||
|
|
||||||
|
getEmrHistoryList(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 如果有历史记录,则为复诊
|
||||||
|
if (res.data && res.data.total > 0) {
|
||||||
|
visitType.value = 'FOLLOW_UP';
|
||||||
|
} else {
|
||||||
|
// 如果没有历史记录,则为初诊
|
||||||
|
visitType.value = 'FIRST';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 请求失败,默认设置为初诊
|
||||||
|
visitType.value = 'FIRST';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// 异常情况,默认设置为初诊
|
||||||
|
visitType.value = 'FIRST';
|
||||||
|
});
|
||||||
|
}
|
||||||
function getWaitPatient() {
|
function getWaitPatient() {
|
||||||
queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00';
|
queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00';
|
||||||
queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59';
|
queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59';
|
||||||
@@ -341,7 +379,7 @@ function handleOpen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCardClick(item, index) {
|
function handleCardClick(item, index) {
|
||||||
currentEncounterId.value = '';
|
currentEncounterId.value = '';
|
||||||
// if (item.active) {
|
// if (item.active) {
|
||||||
// patientList.value[index].active = false;
|
// patientList.value[index].active = false;
|
||||||
// return;
|
// return;
|
||||||
@@ -351,6 +389,10 @@ function handleCardClick(item, index) {
|
|||||||
patient.active = patient.encounterId === item.encounterId;
|
patient.active = patient.encounterId === item.encounterId;
|
||||||
});
|
});
|
||||||
patientInfo.value = item;
|
patientInfo.value = item;
|
||||||
|
|
||||||
|
// 检查患者历史记录以确定初诊/复诊
|
||||||
|
checkPatientHistory(item);
|
||||||
|
|
||||||
activeTab.value = 'emr';
|
activeTab.value = 'emr';
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
prescriptionRef.value.getListInfo();
|
prescriptionRef.value.getListInfo();
|
||||||
|
|||||||
@@ -27,7 +27,11 @@
|
|||||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||||
<el-table-column prop="patientName" align="center" label="申请患者" />
|
<el-table-column prop="patientName" align="center" label="申请患者" />
|
||||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||||
<el-table-column prop="age" label="年龄" align="center" />
|
<el-table-column label="年龄" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="sourceName" align="center" label="申请来源">
|
<el-table-column prop="sourceName" align="center" label="申请来源">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.sourceName || '-' }}
|
{{ scope.row.sourceName || '-' }}
|
||||||
|
|||||||
@@ -28,7 +28,11 @@
|
|||||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||||
<el-table-column prop="patientName" align="center" label="患者姓名" />
|
<el-table-column prop="patientName" align="center" label="患者姓名" />
|
||||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||||
<el-table-column prop="age" label="年龄" align="center" />
|
<el-table-column label="年龄" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="requestTime" align="center" label="申请时间" />
|
<el-table-column prop="requestTime" align="center" label="申请时间" />
|
||||||
<el-table-column prop="sourceName" align="center" label="申请来源" />
|
<el-table-column prop="sourceName" align="center" label="申请来源" />
|
||||||
<el-table-column prop="wardName" align="center" label="入院病区" />
|
<el-table-column prop="wardName" align="center" label="入院病区" />
|
||||||
|
|||||||
@@ -35,12 +35,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="年龄" prop="age">
|
<el-form-item label="年龄" prop="age">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.age"
|
v-model="form.age"
|
||||||
:disabled="isViewMode"
|
:disabled="isViewMode"
|
||||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||||
/>
|
>
|
||||||
</el-form-item>
|
<template #suffix>岁</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="卡类别" prop="typeCode">
|
<el-form-item label="卡类别" prop="typeCode">
|
||||||
@@ -79,7 +81,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-col :span="6">
|
<!-- <el-col :span="6">
|
||||||
<el-form-item label="年龄" prop="age">
|
<el-form-item label="年龄" prop="age">
|
||||||
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
|
<el-input v-model="form.age" clearable :disabled="isViewMode">
|
||||||
|
<template #suffix>岁</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|||||||
@@ -183,7 +183,9 @@
|
|||||||
v-model="form.age"
|
v-model="form.age"
|
||||||
:disabled="isViewMode"
|
:disabled="isViewMode"
|
||||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||||
/>
|
>
|
||||||
|
<template #suffix>岁</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
|||||||
Reference in New Issue
Block a user