This commit is contained in:
abing
2025-06-13 11:39:43 +08:00
parent b79b9f8b50
commit 437bf23f09
1468 changed files with 14808 additions and 132509 deletions

View File

@@ -1,144 +0,0 @@
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/openhis";
// 查询初期所需数据
export function getInit() {
return request({
url: '/charge-manage/register/init',
method: 'get'
})
}
// 查询患者信息
export function getOutpatientRegistrationList(query) {
return request({
url: '/charge-manage/register/patient-metadata',
method: 'get',
params: query
})
}
// 查询费用性质
export function getContractList() {
return request({
url: '/charge-manage/register/contract-list',
method: 'get'
})
}
// 查询诊断信息
export function getConditionDefinitionMetadata(query) {
return request({
url: '/charge-manage/register/condition-definition-metadata',
method: 'get',
params: query
})
}
// 查询就诊位置
export function getLocationTree(query) {
return request({
url: '/charge-manage/register/location-tree',
method: 'get',
params: query
})
}
// 根据位置id筛选医生
export function getPractitionerMetadata(query) {
return request({
url: '/charge-manage/register/practitioner-metadata',
method: 'get',
params: query
})
}
// 根据机构id筛选服务项目
export function getHealthcareMetadata(query) {
return request({
url: '/charge-manage/register/healthcare-metadata',
method: 'get',
params: query
})
}
// 门诊挂号查询
export function getOutpatientRegistrationCurrent(query) {
return request({
url: '/charge-manage/register/current-day-encounter',
method: 'get',
params: query
})
}
// 新增门诊挂号信息
export function addOutpatientRegistration(data) {
return request({
url: '/charge-manage/register/save',
method: 'post',
data: data
})
}
// 新增病人信息
export function addPatient(data) {
return request({
url: '/patientmanage/information/patient-information',
method: 'post',
data: data
})
}
export function listmaritalstatus() {
return request({
url: '/patientmanage/information/list-maritalstatus',
method: 'get',
})
}
export function listoccupationtype() {
return request({
url: '/patientmanage/information/list-occupationtype',
method: 'get',
})
}
export function lisadministrativegender() {
return request({
url: '/patientmanage/information/list-administrativegender',
method: 'get',
})
}
export function listbloodtypeabo() {
return request({
url: '/patientmanage/information/list-bloodtypeabo',
method: 'get',
})
}
export function listbloodtypearh() {
return request({
url: '/patientmanage/information/list-bloodtypearh',
method: 'get',
})
}
export function listfamilyrelationshiptype() {
return request({
url: '/patientmanage/information/list-familyrelationshiptype',
method: 'get',
})
}
// 查询患者相关
export function patientlLists() {
return request({
url: '/patient-manage/information/init',
method: 'get'
})
}

View File

@@ -1,493 +0,0 @@
<template>
<div class="app-container">
<!-- 添加或修改对话框 -->
<el-dialog :title="title" v-model="visible" width="980px" append-to-body>
<el-form
ref="patientRef"
:model="form"
:rules="rules"
label-width="100px"
>
<el-row>
<el-col :span="6">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="其他姓名" prop="nameJson">
<el-input
v-model="form.nameJson"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="民族" prop="nationalityCode">
<el-input
v-model="form.nationalityCode"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="6">
<el-form-item label="年龄" prop="age">
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="性别" prop="genderEnum">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
<el-radio
v-for="item in administrativegenderList"
:key="item.value"
:label="item.value"
>
{{ item.info }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="活动标识" prop="tempFlag">
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
<el-radio
v-for="dict in patient_temp_flag"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="证件类别" prop="idType">
<el-select
v-model="form.idType"
placeholder="证件类别"
clearable
:disabled="isViewMode"
>
<el-option
v-for="dict in sys_idtype"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件号码" prop="idCard">
<el-input
v-model="form.idCard"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国家编码" prop="countryCode">
<el-input
v-model="form.countryCode"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职业" prop="prfsEnum">
<el-select
v-model="form.prfsEnum"
placeholder="职业"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in occupationtypeList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工作单位" prop="workCompany">
<el-input
v-model="form.workCompany"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="联系人" prop="linkName">
<el-input
v-model="form.linkName"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系人关系" prop="linkRelationCode">
<el-select
v-model="form.linkRelationCode"
placeholder="联系人关系"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in familyrelationshiptypeList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系人电话" prop="linkRelationCode">
<el-input
v-model="form.linkTelcom"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="地址选择" prop="addressSelect">
<el-cascader
:options="options"
:props="{ checkStrictly: true, value: 'code', label: 'name' }"
v-model="selectedOptions"
@change="handleChange"
:disabled="isViewMode"
>
<template #default="{ node, data }">
<span>{{ data.name }}</span>
<span v-if="!node.isLeaf">
({{ data.children.length }})
</span>
</template>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="详细地址" prop="address">
<el-input
v-model="form.address"
clearable
:disabled="isViewMode"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="血型ABO" prop="bloodAbo">
<el-select
v-model="form.bloodAbo"
placeholder="血型ABO"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in bloodtypeaboList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="血型RH" prop="bloodRh">
<el-select
v-model="form.bloodRh"
placeholder="血型RH"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in bloodtypearhList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="婚姻状态" prop="maritalStatusEnum">
<el-select
v-model="form.maritalStatusEnum"
placeholder="婚姻状态"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in maritalstatusList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="死亡时间" prop="deceasedDate">
<el-date-picker
v-model="form.deceasedDate"
type="datetime"
placeholder="请选择时间"
format="YYYY/MM/DD HH:mm:ss"
:disabled="isViewMode"
value-format="YYYY/MM/DD HH:mm:ss"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="PatientAddDialog">
import pcas from "china-division/dist/pcas-code.json";
import {
addPatient,
patientlLists,
getOutpatientRegistrationList,
} from "./outpatientregistration";
const router = useRouter();
const { proxy } = getCurrentInstance();
const {
patient_gender_enum,
sys_idtype,
prfs_enum,
blood_rh,
blood_abo,
marital_status_enum,
patient_temp_flag,
link_relation_code,
} = proxy.useDict(
"patient_gender_enum",
"sys_idtype",
"prfs_enum",
"blood_rh",
"blood_abo",
"marital_status_enum",
"patient_temp_flag",
"link_relation_code"
);
const selectedOptions = ref([]); // v-model 绑定的选中值
const maritalstatusList = ref([]); //婚姻
const occupationtypeList = ref([]); //职业
const administrativegenderList = ref([]); //性别
const bloodtypeaboList = ref([]); //血型abo
const bloodtypearhList = ref([]); //血型RH
const familyrelationshiptypeList = ref([]); //家庭关系
// 使用 ref 定义查询所得用户信息数据
const patientInfo = ref(undefined);
const addressCom = ref(""); //地址
const options = ref(pcas); // 地区数据
const title = ref("添加病人");
const visible = ref(false);
const emits = defineEmits(["submit"]); // 声明自定义事件
const data = reactive({
isViewMode: false,
form: {},
rules: {
name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
idCard: [
{ required: true, message: "证件号码不能为空", trigger: "blur" },
{ min: 18, message: "证件号码不能少于18位", trigger: "blur" },
],
phone: [{ required: true, message: "联系方式不能为空", trigger: "blur" }],
},
});
const { queryParams, form, rules, isViewMode } = toRefs(data);
const props = defineProps({
item: {
type: Object,
required: false,
},
});
/** 查询菜单列表 */
function getList() {
patientlLists().then((response) => {
console.log(response);
occupationtypeList.value = response.data.occupationType;
administrativegenderList.value = response.data.administrativeGender;
bloodtypeaboList.value = response.data.bloodTypeABO;
bloodtypearhList.value = response.data.bloodTypeRH;
familyrelationshiptypeList.value = response.data.familyRelationshipType;
maritalstatusList.value = response.data.maritalStatus;
});
}
/** 打开用户信息弹窗 */
function getPatientInfo() {
const param = {
searchKey: form.value.idCard,
};
getOutpatientRegistrationList(param).then((res) => {
console.log(param, "param");
if (res.data.records.length > 0) {
patientInfo.value = res.data.records[0];
console.log(patientInfo.value, "patientInfo.value");
// 将表单数据发送给父组件
emits("submit", patientInfo.value);
}
});
}
//地址选择
const handleChange = () => {
const checkedNodes = selectedOptions.value.map((code) => {
const node = findNodeByCode(options.value, code);
return node ? node.name : null;
});
form.value.addressProvince = checkedNodes[0] || "";
form.value.addressCity = checkedNodes[1] || "";
form.value.addressDistrict = checkedNodes[2] || "";
form.value.addressStreet = checkedNodes[3] || "";
form.value.address = "";
};
// 递归查找节点
const findNodeByCode = (data, code) => {
for (const item of data) {
if (item.code === code) return item;
if (item.children) {
const result = findNodeByCode(item.children, code);
if (result) return result;
}
}
return null;
};
// 显示弹框
function show() {
// queryParams.roleId = props.roleId;
getList();
visible.value = true;
}
/** 表单重置 */
function reset() {
form.value = {
name: undefined,
nameJson: undefined,
menuName: undefined,
age: undefined,
genderEnum: undefined,
idType: undefined,
idCard: undefined,
phone: undefined,
prfsEnum: undefined,
address: undefined,
tempFlag: undefined,
countryCode: undefined,
bloodRh: undefined,
bloodAbo: undefined,
nationalityCode: undefined,
deceasedDate: undefined,
linkName: undefined,
linkRelationCode: undefined,
linkTelcom: undefined,
workCompany: undefined,
addressCity: undefined,
addressDistrict: undefined,
addressStreet: undefined,
addressProvince: undefined,
maritalStatusEnum: undefined,
busNo: undefined,
organizationId: undefined,
};
proxy.resetForm("patientRef");
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["patientRef"].validate((valid) => {
if (valid) {
// 使用
form.value.address = getAddress(form);
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess("新增成功");
visible.value = false;
getPatientInfo();
});
}
});
}
// 获取完整地址字符串
function getAddress(form) {
const addressParts = [
form.value.addressProvince,
form.value.addressCity,
form.value.addressDistrict,
form.value.addressStreet,
form.value.address,
];
// 使用 reduce 方法拼接地址
return addressParts.reduce((acc, part) => {
return part ? acc + part : acc;
}, "");
}
/** 取消按钮 */
function cancel() {
visible.value = false;
reset();
}
defineExpose({
show,
});
</script>
<style scoped>
.el-form--inline .el-form-item {
display: inline-flex;
vertical-align: middle;
margin-right: 10px !important;
}
/* 使用深度选择器 */
.custom-label-spacing :deep(.el-form-item__label) {
line-height: 1.2; /* 调整行间距 */
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
}
</style>

View File

@@ -1,182 +0,0 @@
<template>
<div class="app-container">
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
<el-table
:data="patientInfoList"
@selection-change="handleSelectionChange"
width="90%"
@cell-dblclick="handleCellDblClick"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column
label="患者姓名"
align="center"
key="name"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column
label="性别"
align="center"
key="genderEnum_enumText"
prop="genderEnum_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="身份证号"
align="center"
key="idCard"
prop="idCard"
:show-overflow-tooltip="true"
/>
<el-table-column
label="电话"
align="center"
key="phone"
prop="phone"
:show-overflow-tooltip="true"
width="100"
/>
<el-table-column
label="生日"
align="center"
key="birthDate"
prop="birthDate"
:show-overflow-tooltip="true"
width="50"
/>
<el-table-column
label="年龄"
align="center"
key="age"
prop="age"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="PatientInfoDialog">
import {
getOutpatientRegistrationList,
} from "./outpatientregistration";
const { proxy } = getCurrentInstance();
const patientInfoList = ref([]);
const selectedData = ref([]); // 存储选择的行数据
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("病人信息");
const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
const props = defineProps({
patientInfoData: {
type: Object,
required: false,
default: () => ({}), // 提供默认值
},
searchInfo: {
type: String,
required: true,
default: "",
},
});
// 显示弹框
function show() {
patientInfoList.value = props.patientInfoData.records;
total.value = props.patientInfoData.total;
console.log(props.patientInfoData, "props.patientInfoData");
visible.value = true;
}
/** 查询病种目录列表 */
function getList() {
const query = {
searchKey: props.searchInfo,
pageNo: queryParams.value.pageNo,
pageSize: queryParams.value.pageSize,
};
getOutpatientRegistrationList(query).then((res) => {
if (res.data.records.length > 0) {
patientInfoList.value = res.data.records;
total.value = res.data.total;
console.log(patientInfoList.value, "patientInfoList.value");
}
});
}
/** 选择条数 */
function handleSelectionChange(selection) {
console.log(selection, "selection");
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 取消按钮 */
function cancel() {
visible.value = false;
patientInfoList.value = [];
}
/** 提交按钮 */
function submitForm() {
if (selectedData.value.length > 1) {
proxy.$modal.msgSuccess("只能选中一条数据操作!");
} else if (selectedData.value.length === 1) {
console.log(selectedData.value[0], "selectedData.value");
const data = selectedData.value[0];
// 将表单数据发送给父组件
emits("submit", data);
}
visible.value = false;
}
// 双击数据时触发的方法
function handleCellDblClick(row, column, cell, event) {
emits("submit", row);
visible.value = false;
// 获取整条数据
console.log('双击的行数据:', row);
// 根据需求进行进一步操作
}
defineExpose({
show,
});
</script>
<style scoped>
.el-form--inline .el-form-item {
display: inline-flex;
vertical-align: middle;
margin-right: 10px !important;
}
</style>

View File

@@ -1,60 +0,0 @@
<template>
<div>
<el-table
height="400"
:data="patientList"
row-key="id"
@cell-click="clickRow"
>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
<el-table-column label="证件号" align="center" prop="idCard" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="年龄" align="center" prop="age" />
</el-table>
</div>
</template>
<script setup>
import { getOutpatientRegistrationList } from "./outpatientregistration";
const props = defineProps({
searchkey: {
type: String,
default: "",
},
});
const emit = defineEmits(["selsectPatient"]);
const total = ref(0);
const queryParams = ref({
pageNum: 1,
pageSize: 50,
});
const patientList = ref([]);
watch(
() => props.searchkey,
(newValue) => {
queryParams.value.searchKey = newValue;
getList();
},
{ immdiate: true }
);
getList();
function getList() {
getOutpatientRegistrationList(queryParams.value).then((res) => {
patientList.value = res.data.records;
total.value = res.data.total;
});
}
function clickRow(row) {
emit("selsectPatient", row);
}
</script>
<style scoped>
::v-deep .el-table__row:hover > td {
background-color: #cde5ff !important; /* 设置为透明或其他你想要的颜色 */
}
</style>