|
@@ -0,0 +1,1352 @@
|
|
|
+<template>
|
|
|
+ <div class="layout_container">
|
|
|
+ <header>
|
|
|
+ <ReadCard pat-no="sfz" biztype="01101" @success="afterReadCard" />
|
|
|
+ <el-button type="success" icon="Upload" @click="uploadSfz">上传身份证</el-button>
|
|
|
+ <el-button type="success" icon="Upload" @click="openHkb">户口本上传</el-button>
|
|
|
+ <el-button type="primary" icon="View" @click="viewSfzOrHkb(1)">查看户口本</el-button>
|
|
|
+ <el-button type="primary" icon="View" @click="viewSfzOrHkb(2)">查看身份证</el-button>
|
|
|
+ <el-button type="danger" icon="Check" @click="updateAptient">修改患者信息</el-button>
|
|
|
+ <el-button type="danger" icon="Check" @click="modifyPatienId">修改门诊号</el-button>
|
|
|
+ <el-button type="primary" icon="Check" @click="createDoor">重试创建患者门禁</el-button>
|
|
|
+ <el-button type="success" icon="Printer" @click="printWristStrap">打印腕带</el-button>
|
|
|
+ <el-button type="danger" icon="Check" @click="deleteAdmissData">删除入院登记</el-button>
|
|
|
+ <el-button type="primary" icon="Refresh" @click="clearPatient">清空</el-button>
|
|
|
+ </header>
|
|
|
+ <div class="layout_main">
|
|
|
+ <div class="demo-collapse">
|
|
|
+ <el-form ref="ruleFormRef" label-width="127px" :model="admissFormData" :rules="rules" class="demo-ruleForm"
|
|
|
+ :size="formSize">
|
|
|
+ <el-collapse v-model="activeName">
|
|
|
+ <el-collapse-item title="基本信息" name="1" disabled>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
+ <el-input v-model="admissFormData.name" clearable show-word-limit placeholder="姓名"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="Search" @click="queryPatientInfo(admissFormData.name)"/>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="年龄" prop="age">
|
|
|
+ <el-input v-model="admissFormData.age" show-word-limit placeholder="年龄"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="性别" prop="sex">
|
|
|
+ <el-select v-model="admissFormData.sex" clearable placeholder="请选择">
|
|
|
+ <el-option value="1" label="男"></el-option>
|
|
|
+ <el-option value="2" label="女"></el-option>
|
|
|
+ <el-option value="0" label="未知"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="出生日期" prop="birthDate">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="admissFormData.birthDate"
|
|
|
+ type="date"
|
|
|
+ format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="门诊号" prop="patientId">
|
|
|
+ <el-input v-model="admissFormData.patientId" clearable show-word-limit placeholder="门诊号"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="Search" @click="queryPatientInfo(admissFormData.patientId)"/>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="手机号码" prop="homeTel">
|
|
|
+ <el-input v-model="admissFormData.homeTel" clearable show-word-limit placeholder="手机号码"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="Search" @click="queryPatientInfo(admissFormData.homeTel)" />
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="婚姻状态" prop="marryCode">
|
|
|
+ <el-select v-model="admissFormData.marryCode" filterable clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in marryList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="职业" prop="occupationCode">
|
|
|
+ <el-select v-model="admissFormData.occupationCode" filterable clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in occupationList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="国籍" prop="country">
|
|
|
+ <el-select v-model="admissFormData.country" filterable clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in countryList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="民族" prop="nationCode">
|
|
|
+ <el-select v-model="admissFormData.nationCode" filterable clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in nationList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="出生地址" prop="homeZipcode">
|
|
|
+ <el-select v-model="admissFormData.homeZipcode" filterable clearable @change="fetchCity(1)" placeholder="省" style="width: 30%">
|
|
|
+ <el-option v-for="item in provinceList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="admissFormData.homeDistrict" filterable clearable placeholder="市" @change="fetchStreet(1)" style="width: 30%">
|
|
|
+ <el-option v-for="item in csCityList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="admissFormData.birthPlace" filterable clearable placeholder="区/县" style="width: 30%">
|
|
|
+ <el-option v-for="item in csSheetList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="证件类型" prop="psnCertType">
|
|
|
+ <el-select v-model="admissFormData.psnCertType" filterable clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in psnCertTypeList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="证件号" prop="socialNo">
|
|
|
+ <el-input v-model="admissFormData.socialNo" clearable placeholder="证件号">
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="Search" @click="queryPatientInfo(admissFormData.socialNo)"/>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="户口地址" prop="accountStreet">
|
|
|
+ <el-input v-model="admissFormData.accountStreet" clearable placeholder="户口地址">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="家庭住址" prop="provinceCode">
|
|
|
+ <el-select v-model="admissFormData.provinceCode" filterable clearable @change="fetchCity(2)" placeholder="省" style="width: 30%">
|
|
|
+ <el-option v-for="item in provinceList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="admissFormData.cityCode" filterable clearable placeholder="市" @change="fetchStreet(2)" style="width: 30%">
|
|
|
+ <el-option v-for="item in homeCityList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="admissFormData.districtCode" filterable clearable placeholder="区/县" style="width: 30%">
|
|
|
+ <el-option v-for="item in homeSheetList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="住址详情" prop="homeStreet">
|
|
|
+ <el-input v-model="admissFormData.homeStreet" clearable placeholder="住址详情">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="住院号" prop="inpatientNo">
|
|
|
+ <el-input v-model="admissFormData.inpatientNo" clearable show-word-limit placeholder="住院号"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="Search" @click="queryPatientByZyh"/>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="" prop="inpatientNoType">
|
|
|
+ <el-radio-group v-model="admissFormData.inpatientNoType" >
|
|
|
+ <el-radio-button label="自动" value="0" />
|
|
|
+ <el-radio-button label="家床" value="1" />
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="单位地址" prop="employerStreet">
|
|
|
+ <el-input v-model="admissFormData.employerStreet" clearable show-word-limit placeholder="单位地址"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ <el-collapse-item title="联系人信息" name="2" disabled>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="姓名" prop="relationName">
|
|
|
+ <el-input v-model="admissFormData.relationName" clearable show-word-limit placeholder="联系人姓名"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="关系" prop="relationCode">
|
|
|
+ <el-select v-model="admissFormData.relationCode" filterable clearable placeholder="关系" >
|
|
|
+ <el-option v-for="item in relationList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="电话" prop="relationTel">
|
|
|
+ <el-input v-model="admissFormData.relationTel" clearable show-word-limit placeholder="电话"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="联系人地址" prop="relationStreet">
|
|
|
+ <el-input v-model="admissFormData.relationStreet" clearable placeholder="联系人地址"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ <el-collapse-item title="住院信息" name="3" disabled>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="入院日期" prop="admissionDay">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="admissFormData.admissionDay"
|
|
|
+ type="datetime"
|
|
|
+ value-format ="YYYY-MM-DD HH:mm:ss"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-select v-model="admissFormData.reqDoctor" filterable clearable placeholder="入院医生" >
|
|
|
+ <el-option v-for="item in reqDoctorList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="门诊诊断编码" prop="clinicDiagnosisCode">
|
|
|
+ <el-input v-model="admissFormData.clinicDiagnosisCode" placeholder="门诊诊断编码"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="门诊诊断" prop="clinicDiagnosis">
|
|
|
+ <el-input v-model="admissFormData.clinicDiagnosis" placeholder="门诊诊断"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="住院诊断编码" prop="hospitalDiagnosisCode">
|
|
|
+ <el-input v-model="admissFormData.hospitalDiagnosisCode" placeholder="住院诊断编码"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="住院诊断" prop="hospitalDiagnosis">
|
|
|
+ <el-input v-model="admissFormData.hospitalDiagnosis" placeholder="住院诊断"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="病区" prop="inpatientWard">
|
|
|
+ <el-select v-model="admissFormData.inpatientWard" filterable clearable placeholder="病区" @change="getSmallDept" >
|
|
|
+ <el-option v-for="item in inpatientWardList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="小科室" prop="smallWard">
|
|
|
+ <el-select v-model="admissFormData.smallWard" filterable clearable placeholder="小科室" >
|
|
|
+ <el-option v-for="item in smallWardList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="床号" prop="bedNum">
|
|
|
+ <el-select v-model="admissFormData.bedNum" filterable clearable placeholder="床号" >
|
|
|
+ <el-option v-for="item in bedList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="入院状态" prop="admissStatus">
|
|
|
+ <el-select v-model="admissFormData.admissStatus" filterable clearable placeholder="入院状态" >
|
|
|
+ <el-option v-for="item in admissStatusList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="病人身份" prop="responceType">
|
|
|
+ <el-select v-model="admissFormData.responceType" filterable clearable placeholder="病人身份" >
|
|
|
+ <el-option v-for="item in zyResponceTypeList" :key="item.code"
|
|
|
+ :label="item.name" :value="item.code">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">{{
|
|
|
+ item.code }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 20px"></el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-button type="primary" style="width: 100%" @click="saveAdmissData">入院登记</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog v-model="patientVisible" title="病人信息" width="500" draggable>
|
|
|
+ <el-table :data="patientTableData" style="width: 100%" height="250" stripe border @row-click="fetchPatient" >
|
|
|
+ <el-table-column align="center" prop="name" label="姓名" />
|
|
|
+ <el-table-column align="center" prop="inpatientNo" label="住院号" />
|
|
|
+ <el-table-column align="center" prop="mzNo" label="门诊号" />
|
|
|
+ </el-table>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="patientVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="updatePatientIdVisible" title="修改门诊号" width="400" draggable>
|
|
|
+ <el-form :model="updateFormData" label-width="auto" style="max-width: 400px">
|
|
|
+ <el-form-item label="住院号">
|
|
|
+ <el-input v-model="updateFormData.inpatientNo" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="门诊号">
|
|
|
+ <el-input v-model="updateFormData.patientId" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button icon="Check" type="success" @click="saveModifyPatienId">保存</el-button>
|
|
|
+ <el-button @click="updatePatientIdVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="hkbVisible" title="上传户口本" width="400" draggable>
|
|
|
+ <template #footer>
|
|
|
+ <el-upload
|
|
|
+ class="avatar-uploader"
|
|
|
+ ref="uploadRef"
|
|
|
+ :file-list="fileList"
|
|
|
+ :action="apiUrl + '/admissionRegistration/hkbUploadFile'"
|
|
|
+ :headers="header"
|
|
|
+ :limit="1"
|
|
|
+ :data="{patNo :admissFormData.inpatientNo}"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ accept="image/jpeg,image/jpg,image/png"
|
|
|
+ :auto-upload="false"
|
|
|
+ :on-success="onSubmitSuccess"
|
|
|
+ >
|
|
|
+ <template #trigger>
|
|
|
+ <el-button type="primary">请选择文件</el-button>
|
|
|
+ </template>
|
|
|
+ <el-button icon="Check" style="margin-left: 10px" type="success" @click="uploadHkb">保存</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="sfzVisible" title="" width="500" draggable>
|
|
|
+ <div>
|
|
|
+ <img alt="未找到图片" :src="sfzUrl" width="350px" style="clear: both;display: block;margin: auto;" />
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="sfzVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+</template>
|
|
|
+<script setup >
|
|
|
+import {ref,onMounted} from "vue";
|
|
|
+import {
|
|
|
+ queryCountry,
|
|
|
+ queryDoctor,
|
|
|
+ queryMarital,
|
|
|
+ queryNation,
|
|
|
+ queryOccupation,
|
|
|
+ queryProvince,
|
|
|
+ queryRelation,
|
|
|
+ queryAdmissStatus,
|
|
|
+ queryAllInpatientWard,
|
|
|
+ queryPsnCertType,
|
|
|
+ queryZyResponceType,
|
|
|
+ querySmallDeptByCode,
|
|
|
+ queryBedNumByCode,
|
|
|
+ queryPatientAllInfoByInpatientNo,
|
|
|
+ queryPatientInfoByKeyWard,
|
|
|
+ saveAptientMi,
|
|
|
+ saveZyPatient,
|
|
|
+ deleteAdmissInfo,
|
|
|
+ queryLastWindowsIpAddress,
|
|
|
+ querySfzOrHkb,
|
|
|
+ queryRegionByParentCode,
|
|
|
+ createDoorPatient,
|
|
|
+ queryFullRegionFromSfzAddress,
|
|
|
+ saveSfzPatient,
|
|
|
+ saveUpdatePatientId
|
|
|
+} from '@/api/zy-gl/admission-registration'
|
|
|
+import {getLodop,initLodop} from "@/utils/c-lodop.js";
|
|
|
+import {getFormatDatetime} from "@/utils/date.js";
|
|
|
+import {ElMessage, ElMessageBox, genFileId} from "element-plus";
|
|
|
+import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils.js";
|
|
|
+import env from "@/utils/setting.ts";
|
|
|
+import {useUserStore} from "@/pinia/user-store";
|
|
|
+import ReadCard from '@/components/medical-insurance/readcard/Index.vue'
|
|
|
+const updatePatientIdVisible = ref(false)
|
|
|
+const printIndex = ref(-1)
|
|
|
+const normalWristStrapPrintIndex = ref(-1)
|
|
|
+const childWristStrapPrintIndex = ref(-1)
|
|
|
+const activeName = ref(['1', '2', '3', '4', '5', '6', '7'])
|
|
|
+const formSize = ref('default')
|
|
|
+const patientVisible = ref(false)
|
|
|
+const sfzVisible = ref(false)
|
|
|
+const hkbVisible = ref(false)
|
|
|
+const sfzUrl = ref(null)
|
|
|
+const uploadRef = ref()
|
|
|
+const patientTableData = ref([])
|
|
|
+const fileList = ref([]);
|
|
|
+const apiUrl = env.VITE_BASE_URL;
|
|
|
+const header = {
|
|
|
+ token: useUserStore().getToken
|
|
|
+}
|
|
|
+const updateFormData = ref({
|
|
|
+ inpatientNo : "",
|
|
|
+ patientId : "",
|
|
|
+})
|
|
|
+const admissFormData = ref({
|
|
|
+ name :'',
|
|
|
+ age :null,
|
|
|
+ sex :'',
|
|
|
+ inpatientNo:'',
|
|
|
+ birthDate:'',
|
|
|
+ marryCode:'9',
|
|
|
+ country:'cn',
|
|
|
+ nationCode:'HA',
|
|
|
+ occupationCode:'90',
|
|
|
+ birthPlace:'',
|
|
|
+ accountStreet:'',
|
|
|
+ psnCertType:'1',
|
|
|
+ socialNo:'',
|
|
|
+ patientId:'',
|
|
|
+ homeTel:'',
|
|
|
+ homeZipcode:'',
|
|
|
+ homeDistrict:'',
|
|
|
+ employerStreet:'',
|
|
|
+ inpatientNoType:0,
|
|
|
+ relationName:'',
|
|
|
+ relationCode:'',
|
|
|
+ relationTel:'',
|
|
|
+ relationStreet:'',
|
|
|
+ provinceCode:'',
|
|
|
+ cityCode:'',
|
|
|
+ districtCode:'',
|
|
|
+ homeStreet:'',
|
|
|
+
|
|
|
+ admissionDay:getFormatDatetime(new Date()),
|
|
|
+ reqDoctor:'',
|
|
|
+ clinicDiagnosisCode:'',
|
|
|
+ clinicDiagnosis:'',
|
|
|
+ hospitalDiagnosisCode:'',
|
|
|
+ hospitalDiagnosis:'',
|
|
|
+ inpatientWard:'',
|
|
|
+ smallWard:'',
|
|
|
+ bedNum:'',
|
|
|
+ admissStatus:'',
|
|
|
+ responceType:'',
|
|
|
+})
|
|
|
+
|
|
|
+const ruleFormRef =ref(null)
|
|
|
+
|
|
|
+const rules = ref({
|
|
|
+ name : [{required: true, message: '姓名必填', trigger: 'blur' }],
|
|
|
+ sex : [{required: true, message: '性别必填', trigger: 'change' }],
|
|
|
+ birthDate : [{required: true, message: '出生日期必填', trigger: 'blur' }],
|
|
|
+ patientId : [{required: true, message: '卡号/ID必填', trigger: 'blur' }],
|
|
|
+ homeTel : [{required: true, message: '手机号码必填', trigger: 'blur' }],
|
|
|
+ marryCode : [{required: true, message: '婚姻状态必填', trigger: 'change' }],
|
|
|
+ occupationCode : [{required: true, message: '职业必填', trigger: 'change' }],
|
|
|
+ country : [{required: true, message: '国籍必填', trigger: 'change' }],
|
|
|
+ nationCode : [{required: true, message: '民族必填', trigger: 'change' }],
|
|
|
+ psnCertType : [{required: true, message: '证件类型必填', trigger: 'change' }],
|
|
|
+ accountStreet : [{required: true, message: '户口地址必填', trigger: 'blur' }],
|
|
|
+ admissionDay : [{required: true, message: '入院日期必填', trigger: 'blur' }],
|
|
|
+ reqDoctor : [{required: true, message: '入院医生必填', trigger: 'change' }],
|
|
|
+ clinicDiagnosisCode : [{required: true, message: '门诊诊断编码必填', trigger: 'blur' }],
|
|
|
+ clinicDiagnosis : [{required: true, message: '门诊诊断必填', trigger: 'blur' }],
|
|
|
+ hospitalDiagnosisCode : [{required: true, message: '住院诊断编码必填', trigger: 'blur' }],
|
|
|
+ hospitalDiagnosis : [{required: true, message: '住院诊断必填', trigger: 'blur' }],
|
|
|
+ inpatientWard : [{required: true, message: '病区必填', trigger: 'change' }],
|
|
|
+ smallWard : [{required: true, message: '小科室必填', trigger: 'change' }],
|
|
|
+ bedNum : [{required: true, message: '床号必填', trigger: 'change' }],
|
|
|
+ admissStatus : [{required: true, message: '入院状态必填', trigger: 'change' }],
|
|
|
+ responceType : [{required: true, message: '病人身份必填', trigger: 'change' }],
|
|
|
+ socialNo : [{required: true, message: '证件号必填', trigger: 'blur' }],
|
|
|
+
|
|
|
+})
|
|
|
+//查询病人信息 包含住院证信息
|
|
|
+const queryPatientInfo = (keyWard)=>{
|
|
|
+ queryPatientInfoByKeyWard(keyWard).then(res=>{
|
|
|
+ if(res == null || res.length === 0){
|
|
|
+ ElMessage({
|
|
|
+ message: '没有查询到病人信息',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else if(res.length === 1){
|
|
|
+ setAdmissFormData(res[0])
|
|
|
+ }else {
|
|
|
+ patientVisible.value = true
|
|
|
+ patientTableData.value = res
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function onSubmitSuccess(res) {
|
|
|
+ uploadRef.value.clearFiles();
|
|
|
+ hkbVisible.value = false
|
|
|
+ ElMessage.success('提交成功')
|
|
|
+}
|
|
|
+const handleExceed = files => {
|
|
|
+ uploadRef.value.clearFiles();
|
|
|
+ const file = files[0];
|
|
|
+ file.uid = genFileId();
|
|
|
+ uploadRef.value.handleStart(file);
|
|
|
+};
|
|
|
+
|
|
|
+const queryPatientByZyh=()=>{
|
|
|
+ queryPatientAllInfoByInpatientNo(admissFormData.value.inpatientNo).then(res=>{
|
|
|
+ if(res == null){
|
|
|
+ ElMessage.error('没有查询病人信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ setAdmissFormData(res)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const fetchPatient = (row)=>{
|
|
|
+ setAdmissFormData(row)
|
|
|
+ patientVisible.value = false
|
|
|
+}
|
|
|
+
|
|
|
+const setAdmissFormData = (patientInfo)=>{
|
|
|
+ if(patientInfo.zyFlag === 1){
|
|
|
+ ElMessage({
|
|
|
+ message: '病人已经住院,请不要重复办理住院住院登记',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ admissFormData.value.name = patientInfo.name
|
|
|
+ admissFormData.value.age = patientInfo.age
|
|
|
+ admissFormData.value.sex = patientInfo.sex
|
|
|
+ admissFormData.value.inpatientNo = patientInfo.inpatientNo
|
|
|
+ admissFormData.value.birthDate = patientInfo.birthDate
|
|
|
+ admissFormData.value.marryCode = patientInfo.marryCode
|
|
|
+ admissFormData.value.country = patientInfo.country
|
|
|
+ admissFormData.value.nationCode = patientInfo.nationCode
|
|
|
+ admissFormData.value.occupationCode = patientInfo.occupationCode
|
|
|
+ admissFormData.value.accountStreet = patientInfo.accountStreet
|
|
|
+ admissFormData.value.psnCertType = patientInfo.psnCertType
|
|
|
+ admissFormData.value.socialNo = patientInfo.socialNo
|
|
|
+ admissFormData.value.patientId = admissFormData.value.patientId ? admissFormData.value.patientId : patientInfo.mzNo
|
|
|
+ admissFormData.value.homeTel = patientInfo.homeTel
|
|
|
+ admissFormData.value.homeZipcode = patientInfo.homeZipcode
|
|
|
+ fetchCity(1)
|
|
|
+ admissFormData.value.homeDistrict = patientInfo.homeDistrict
|
|
|
+ fetchStreet(1)
|
|
|
+ admissFormData.value.birthPlace = patientInfo.birthPlace
|
|
|
+ admissFormData.value.employerStreet = patientInfo.employerStreet
|
|
|
+ // admissFormData.value.inpatientNoType = patientInfo.inpatientNoType
|
|
|
+ admissFormData.value.relationName = patientInfo.relationName
|
|
|
+ admissFormData.value.relationCode = patientInfo.relationCode
|
|
|
+ admissFormData.value.relationTel = patientInfo.relationTel
|
|
|
+ admissFormData.value.relationStreet = patientInfo.relationStreet
|
|
|
+ admissFormData.value.provinceCode = patientInfo.provinceCode
|
|
|
+ fetchCity(2)
|
|
|
+ admissFormData.value.cityCode = patientInfo.cityCode
|
|
|
+ fetchStreet(2)
|
|
|
+ admissFormData.value.districtCode = patientInfo.districtCode
|
|
|
+
|
|
|
+ admissFormData.value.homeStreet = patientInfo.homeStreet
|
|
|
+
|
|
|
+ if(patientInfo.mzZyReq != null){
|
|
|
+ admissFormData.value.reqDoctor = patientInfo.mzZyReq.doctorCode
|
|
|
+ admissFormData.value.clinicDiagnosisCode = patientInfo.mzZyReq.icdCode
|
|
|
+ admissFormData.value.clinicDiagnosis = patientInfo.mzZyReq.icdText
|
|
|
+ admissFormData.value.hospitalDiagnosisCode = patientInfo.mzZyReq.icdCode
|
|
|
+ admissFormData.value.hospitalDiagnosis = patientInfo.mzZyReq.icdText
|
|
|
+ admissFormData.value.inpatientWard = patientInfo.mzZyReq.reqDept
|
|
|
+ getSmallDept()
|
|
|
+ admissFormData.value.smallWard = patientInfo.mzZyReq.smallDept
|
|
|
+ // admissFormData.value.bedNum = patientInfo.mzZyReq.bedNo
|
|
|
+ admissFormData.value.admissStatus = patientInfo.mzZyReq.admissStatus
|
|
|
+ admissFormData.value.responceType = patientInfo.mzZyReq.responceType
|
|
|
+ }
|
|
|
+}
|
|
|
+// 读取的身份证信息
|
|
|
+const readSfzInfo = ref({
|
|
|
+ socialNo:'',
|
|
|
+ name:'',
|
|
|
+ sex:'',
|
|
|
+ nation:'',
|
|
|
+ birthDay:'',
|
|
|
+ address:'',
|
|
|
+ agency:'',
|
|
|
+ expirestart:'',
|
|
|
+ expireend:'',
|
|
|
+ inpatientNo:'',
|
|
|
+ txImageBase64:'',
|
|
|
+ patientId:'',
|
|
|
+})
|
|
|
+
|
|
|
+const clearReadSfzInfo = ()=>{
|
|
|
+ readSfzInfo.value = {socialNo:'',
|
|
|
+ name:'',
|
|
|
+ sex:'',
|
|
|
+ nation:'',
|
|
|
+ birthDay:'',
|
|
|
+ address:'',
|
|
|
+ agency:'',
|
|
|
+ expirestart:'',
|
|
|
+ expireend:'',
|
|
|
+ inpatientNo:'',
|
|
|
+ txImageBase64:'',
|
|
|
+ patientId:'',}
|
|
|
+}
|
|
|
+
|
|
|
+// 上传身份证
|
|
|
+const uploadSfz = ()=>{
|
|
|
+ if(stringIsBlank(readSfzInfo.value.name)){
|
|
|
+ ElMessage.error('请读取身份证')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ saveSfzPatient(readSfzInfo.value).then(res=>{
|
|
|
+ clearReadSfzInfo()
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+// 读卡结果
|
|
|
+const afterReadCard = async (result)=>{
|
|
|
+ clearReadSfzInfo()
|
|
|
+ if(result.mdtrtCertType ==='idcard'){
|
|
|
+ let arrStr = result.readCardResult.split("^")
|
|
|
+ let arrTempStr = arrStr.filter(item=> item !='')
|
|
|
+ readSfzInfo.value.socialNo = arrTempStr[0]
|
|
|
+ readSfzInfo.value.name = arrTempStr[1]
|
|
|
+ readSfzInfo.value.sex = arrTempStr[2]
|
|
|
+ readSfzInfo.value.nation = arrTempStr[3]
|
|
|
+ let tempBir = arrTempStr[4].substring(0,4)+"-"+arrTempStr[4].substring(4,6)+'-'+arrTempStr[4].substring(6)
|
|
|
+ readSfzInfo.value.birthDay = tempBir
|
|
|
+ readSfzInfo.value.address = arrTempStr[5]
|
|
|
+ readSfzInfo.value.agency = arrTempStr[6]
|
|
|
+ readSfzInfo.value.expirestart = arrTempStr[7].substring(0,8)
|
|
|
+ readSfzInfo.value.expireend = arrTempStr[7].substring(8)
|
|
|
+ // 头像
|
|
|
+ readSfzInfo.value.txImageBase64 = arrTempStr[8]
|
|
|
+ readSfzInfo.value.inpatientNo = admissFormData.value.inpatientNo
|
|
|
+ readSfzInfo.value.patientId = admissFormData.value.patientId
|
|
|
+ queryPatientInfo(readSfzInfo.value.socialNo)
|
|
|
+ setTimeout(setFormDataBySfzInfo,2*1000)
|
|
|
+ }else {
|
|
|
+ ElMessage.error('请读取身份证')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function setFormDataBySfzInfo(){
|
|
|
+ admissFormData.value.psnCertType = '1'
|
|
|
+ admissFormData.value.socialNo = readSfzInfo.value.socialNo
|
|
|
+ admissFormData.value.name = readSfzInfo.value.name
|
|
|
+ admissFormData.value.sex = readSfzInfo.value.sex ==='男' ? '1' : '2'
|
|
|
+ admissFormData.value.nationCode = setNation(readSfzInfo.value.nation)
|
|
|
+ admissFormData.value.birthDate = readSfzInfo.value.birthDay
|
|
|
+ admissFormData.value.age = getAgeByBirDate(readSfzInfo.value.birthDay)
|
|
|
+ queryFullRegionFromSfzAddress({addressDetail:readSfzInfo.value.address}).then(res=>{
|
|
|
+ admissFormData.value.homeZipcode = res.provinceCode
|
|
|
+ fetchCity(1)
|
|
|
+ admissFormData.value.homeDistrict = res.cityCode
|
|
|
+ fetchStreet(1)
|
|
|
+ admissFormData.value.birthPlace = res.districtCode
|
|
|
+ admissFormData.value.accountStreet = res.detail
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function getAgeByBirDate(strBirthday) {
|
|
|
+ let returnAge;
|
|
|
+ let strBirthdayArr = strBirthday.split("-");
|
|
|
+ let birthYear = strBirthdayArr[0];
|
|
|
+ let birthMonth = strBirthdayArr[1];
|
|
|
+ let birthDay = strBirthdayArr[2];
|
|
|
+ let d = new Date();
|
|
|
+ let nowYear = d.getFullYear();
|
|
|
+ let nowMonth = d.getMonth() + 1;
|
|
|
+ let nowDay = d.getDate();
|
|
|
+
|
|
|
+ if (nowYear == birthYear) {
|
|
|
+ returnAge = 0;//同年 则为0岁
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ let ageDiff = nowYear - birthYear; //年之差
|
|
|
+ if (ageDiff > 0) {
|
|
|
+ if (nowMonth == birthMonth) {
|
|
|
+ let dayDiff = nowDay - birthDay;//日之差
|
|
|
+ if (dayDiff < 0) {
|
|
|
+ returnAge = ageDiff - 1;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ returnAge = ageDiff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ let monthDiff = nowMonth - birthMonth;//月之差
|
|
|
+ if (monthDiff < 0) {
|
|
|
+ returnAge = ageDiff - 1;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ returnAge = ageDiff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return returnAge;//返回周岁年龄
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 设置民族
|
|
|
+ */
|
|
|
+function setNation(nation) {
|
|
|
+ let nationKey = "";
|
|
|
+ if (nation == "阿昌") {
|
|
|
+ nationKey = "AC";
|
|
|
+ } else if (nation == "白") {
|
|
|
+ nationKey = "BA";
|
|
|
+ } else if (nation == "崩龙") {
|
|
|
+ nationKey = "BE";
|
|
|
+ } else if (nation == "布朗") {
|
|
|
+ nationKey = "BL";
|
|
|
+ } else if (nation == "保安") {
|
|
|
+ nationKey = "BN";
|
|
|
+ } else if (nation == "布依") {
|
|
|
+ nationKey = "BY";
|
|
|
+ } else if (nation == "穿青人") {
|
|
|
+ nationKey = "CQ";
|
|
|
+ } else if (nation == "朝鲜") {
|
|
|
+ nationKey = "CX";
|
|
|
+ } else if (nation == "傣") {
|
|
|
+ nationKey = "DA";
|
|
|
+ } else if (nation == "侗") {
|
|
|
+ nationKey = "DO";
|
|
|
+ } else if (nation == "独龙") {
|
|
|
+ nationKey = "DR";
|
|
|
+ } else if (nation == "达斡尔") {
|
|
|
+ nationKey = "DU";
|
|
|
+ } else if (nation == "东乡") {
|
|
|
+ nationKey = "DX";
|
|
|
+ } else if (nation == "鄂温克") {
|
|
|
+ nationKey = "EW";
|
|
|
+ } else if (nation == "京") {
|
|
|
+ nationKey = "GI";
|
|
|
+ } else if (nation == "仡佬") {
|
|
|
+ nationKey = "GL";
|
|
|
+ } else if (nation == "高山") {
|
|
|
+ nationKey = "GS";
|
|
|
+ } else if (nation == "汉") {
|
|
|
+ nationKey = "HA";
|
|
|
+ }else if (nation == "汉族") {
|
|
|
+ nationKey = "HA";
|
|
|
+ } else if (nation == "哈尼") {
|
|
|
+ nationKey = "HN";
|
|
|
+ } else if (nation == "回") {
|
|
|
+ nationKey = "HU";
|
|
|
+ } else if (nation == "赫哲") {
|
|
|
+ nationKey = "HZ";
|
|
|
+ } else if (nation == "基诺") {
|
|
|
+ nationKey = "JN";
|
|
|
+ } else if (nation == "景颇") {
|
|
|
+ nationKey = "JP";
|
|
|
+ } else if (nation == "柯尔克孜") {
|
|
|
+ nationKey = "KG";
|
|
|
+ } else if (nation == "哈萨克") {
|
|
|
+ nationKey = "KZ";
|
|
|
+ } else if (nation == "珞巴") {
|
|
|
+ nationKey = "LB";
|
|
|
+ } else if (nation == "拉祜") {
|
|
|
+ nationKey = "LH";
|
|
|
+ } else if (nation == "黎") {
|
|
|
+ nationKey = "LI";
|
|
|
+ } else if (nation == "傈僳") {
|
|
|
+ nationKey = "LS";
|
|
|
+ } else if (nation == "满") {
|
|
|
+ nationKey = "MA";
|
|
|
+ } else if (nation == "门巴") {
|
|
|
+ nationKey = "MB";
|
|
|
+ } else if (nation == "蒙古") {
|
|
|
+ nationKey = "MG";
|
|
|
+ } else if (nation == "苗") {
|
|
|
+ nationKey = "MI";
|
|
|
+ } else if (nation == "仫佬") {
|
|
|
+ nationKey = "ML";
|
|
|
+ } else if (nation == "毛难") {
|
|
|
+ nationKey = "MN";
|
|
|
+ } else if (nation == "怒族") {
|
|
|
+ nationKey = "NU";
|
|
|
+ } else if (nation == "纳西") {
|
|
|
+ nationKey = "NX";
|
|
|
+ } else if (nation == "鄂伦春") {
|
|
|
+ nationKey = "OR";
|
|
|
+ } else if (nation == "普米族") {
|
|
|
+ nationKey = "PM";
|
|
|
+ } else if (nation == "羌") {
|
|
|
+ nationKey = "QI";
|
|
|
+ } else if (nation == "其他") {
|
|
|
+ nationKey = "QT";
|
|
|
+ } else if (nation == "俄罗斯") {
|
|
|
+ nationKey = "RS";
|
|
|
+ } else if (nation == "畲") {
|
|
|
+ nationKey = "SH";
|
|
|
+ } else if (nation == "撒拉") {
|
|
|
+ nationKey = "SL";
|
|
|
+ } else if (nation == "水") {
|
|
|
+ nationKey = "SU";
|
|
|
+ } else if (nation == "塔吉克") {
|
|
|
+ nationKey = "TA";
|
|
|
+ } else if (nation == "土家") {
|
|
|
+ nationKey = "TJ";
|
|
|
+ } else if (nation == "塔塔尔") {
|
|
|
+ nationKey = "TT";
|
|
|
+ } else if (nation == "土") {
|
|
|
+ nationKey = "TU";
|
|
|
+ } else if (nation == "维吾尔") {
|
|
|
+ nationKey = "UG";
|
|
|
+ } else if (nation == "乌孜别克") {
|
|
|
+ nationKey = "UZ";
|
|
|
+ } else if (nation == "佤") {
|
|
|
+ nationKey = "VA";
|
|
|
+ } else if (nation == "外国血统") {
|
|
|
+ nationKey = "WG";
|
|
|
+ } else if (nation == "锡伯") {
|
|
|
+ nationKey = "XB";
|
|
|
+ } else if (nation == "瑶") {
|
|
|
+ nationKey = "YA";
|
|
|
+ } else if (nation == "裕固") {
|
|
|
+ nationKey = "YG";
|
|
|
+ } else if (nation == "彝") {
|
|
|
+ nationKey = "YI";
|
|
|
+ } else if (nation == "藏") {
|
|
|
+ nationKey = "ZA";
|
|
|
+ } else if (nation == "壮") {
|
|
|
+ nationKey = "ZH";
|
|
|
+ }
|
|
|
+ return nationKey
|
|
|
+}
|
|
|
+
|
|
|
+const clearPatient = ()=>{
|
|
|
+ admissFormData.value = {
|
|
|
+ name :'',
|
|
|
+ age :null,
|
|
|
+ sex :'',
|
|
|
+ inpatientNo:'',
|
|
|
+ birthDate:'',
|
|
|
+ marryCode:'9',
|
|
|
+ country:'cn',
|
|
|
+ nationCode:'HA',
|
|
|
+ occupationCode:'90',
|
|
|
+ birthPlace:'',
|
|
|
+ accountStreet:'',
|
|
|
+ psnCertType:'1',
|
|
|
+ socialNo:'',
|
|
|
+ patientId:'',
|
|
|
+ homeTel:'',
|
|
|
+ homeZipcode:'',
|
|
|
+ homeDistrict:'',
|
|
|
+ employerStreet:'',
|
|
|
+ inpatientNoType:0,
|
|
|
+ relationName:'',
|
|
|
+ relationCode:'',
|
|
|
+ relationTel:'',
|
|
|
+ relationStreet:'',
|
|
|
+ provinceCode:'',
|
|
|
+ cityCode:'',
|
|
|
+ districtCode:'',
|
|
|
+ homeStreet:'',
|
|
|
+
|
|
|
+ admissionDay:getFormatDatetime(new Date()),
|
|
|
+ reqDoctor:'',
|
|
|
+ clinicDiagnosisCode:'',
|
|
|
+ clinicDiagnosis:'',
|
|
|
+ hospitalDiagnosisCode:'',
|
|
|
+ hospitalDiagnosis:'',
|
|
|
+ inpatientWard:'',
|
|
|
+ smallWard:'',
|
|
|
+ bedNum:'',
|
|
|
+ admissStatus:'',
|
|
|
+ responceType:'',
|
|
|
+ }
|
|
|
+ clearReadSfzInfo()
|
|
|
+}
|
|
|
+
|
|
|
+// 1 查看户口本 2 查看身份证
|
|
|
+const viewSfzOrHkb = (type)=>{
|
|
|
+ let patientId =''
|
|
|
+ if(type === 1){
|
|
|
+ patientId = admissFormData.value.inpatientNo
|
|
|
+ }else {
|
|
|
+ patientId = admissFormData.value.patientId
|
|
|
+ }
|
|
|
+ let param = {
|
|
|
+ type: type,
|
|
|
+ patientId: patientId
|
|
|
+ }
|
|
|
+ sfzUrl.value = ""
|
|
|
+ querySfzOrHkb(param).then(res=>{
|
|
|
+ sfzVisible.value = true
|
|
|
+ sfzUrl.value = 'data:image/jpeg;base64,'+res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const openHkb = ()=>{
|
|
|
+ fileList.value = []
|
|
|
+ hkbVisible.value = true
|
|
|
+}
|
|
|
+// 修改门诊号
|
|
|
+const modifyPatienId = ()=>{
|
|
|
+ updatePatientIdVisible.value = true
|
|
|
+ updateFormData.value.inpatientNo = admissFormData.value.inpatientNo
|
|
|
+ updateFormData.value.patientId = ''
|
|
|
+}
|
|
|
+
|
|
|
+// 创建门建
|
|
|
+const createDoor = ()=>{
|
|
|
+ createDoorPatient(admissFormData.value.inpatientNo).then(res=>{})
|
|
|
+}
|
|
|
+
|
|
|
+const saveModifyPatienId = ()=>{
|
|
|
+ saveUpdatePatientId(updateFormData.value).then(res=>{})
|
|
|
+}
|
|
|
+
|
|
|
+// 上传户口本
|
|
|
+const uploadHkb = ()=>{
|
|
|
+ uploadRef.value.submit()
|
|
|
+}
|
|
|
+
|
|
|
+const updateAptient = ()=>{
|
|
|
+ ElMessageBox.confirm('请确认是否修改患者信息', {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ saveAptientMi(admissFormData.value).then(res=>{
|
|
|
+ if(!stringNotBlank(admissFormData.value.inpatientNo)){
|
|
|
+ admissFormData.value.inpatientNo = res.inpatientNo
|
|
|
+ }
|
|
|
+ ElMessage({
|
|
|
+ message: '修改患者信息成功',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+// 保存入院登记信息
|
|
|
+const saveAdmissData =()=>{
|
|
|
+ ElMessageBox.confirm('请确认是保存入院登记', {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ saveAptientMi(admissFormData.value).then(res=>{
|
|
|
+ if(!stringNotBlank(admissFormData.value.inpatientNo)){
|
|
|
+ admissFormData.value.inpatientNo = res.inpatientNo
|
|
|
+ }
|
|
|
+ let zyPatient = {
|
|
|
+ admissDate : admissFormData.value.admissionDay,
|
|
|
+ admissPhysician : admissFormData.value.reqDoctor,
|
|
|
+ clinicDiag : admissFormData.value.clinicDiagnosisCode,
|
|
|
+ clinicDiagStr : admissFormData.value.clinicDiagnosis,
|
|
|
+ admissDiag : admissFormData.value.hospitalDiagnosisCode,
|
|
|
+ admissDiagStr : admissFormData.value.hospitalDiagnosis,
|
|
|
+ admissDept : admissFormData.value.inpatientWard,
|
|
|
+ admissWard : admissFormData.value.inpatientWard,
|
|
|
+ smallDept : admissFormData.value.smallWard,
|
|
|
+ bedNo : admissFormData.value.bedNum,
|
|
|
+ admissStatus : admissFormData.value.admissStatus,
|
|
|
+ responceType : admissFormData.value.responceType,
|
|
|
+ inpatientNo : admissFormData.value.inpatientNo,
|
|
|
+ }
|
|
|
+ saveZyPatient(zyPatient).then(res=>{
|
|
|
+ clearPatient()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+// 删除入院登记数据
|
|
|
+const deleteAdmissData = ()=>{
|
|
|
+ if(stringIsBlank(admissFormData.value.inpatientNo)){
|
|
|
+ ElMessage.error("住院号不能为空")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ElMessageBox.confirm('请确认是否删除入院登记信息', {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ deleteAdmissInfo(admissFormData.value.inpatientNo).then(res=>{})
|
|
|
+ })
|
|
|
+}
|
|
|
+// 打印腕带
|
|
|
+const printWristStrap=()=>{
|
|
|
+ if(stringIsBlank(admissFormData.value.inpatientNo)){
|
|
|
+ ElMessage.error("住院号不能为空")
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let phone = admissFormData.value.relationTel ? admissFormData.value.homeTel : admissFormData.value.relationTel
|
|
|
+ let patNo = admissFormData.value.inpatientNo
|
|
|
+
|
|
|
+ let LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INIT('inpatient_wrist_strap')
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(2, 0, 0, '')
|
|
|
+ LODOP.SET_PRINT_STYLE('Bold', 1)
|
|
|
+
|
|
|
+ if (admissFormData.value.age > 12) {
|
|
|
+ LODOP.SET_PRINT_STYLE('FontSize', 9)
|
|
|
+ LODOP.ADD_PRINT_BARCODE('7mm', '27mm', '18.5mm', '18.5mm', 'QRCode', patNo);
|
|
|
+ LODOP.SET_PRINT_STYLE('Angle', 90)
|
|
|
+ LODOP.ADD_PRINT_TEXT('22mm', '44.5mm', '20mm', '7mm', patNo)
|
|
|
+ LODOP.SET_PRINT_STYLE('Angle', 0)
|
|
|
+
|
|
|
+ LODOP.ADD_PRINT_TEXT('8mm', '49mm', '220mm', '7mm', '姓名:' + admissFormData.value.name + ' / 性别:' + filterGender() + ' / 年龄:' + admissFormData.value.age);
|
|
|
+ LODOP.ADD_PRINT_TEXT('14mm', '49mm', '220mm', '7mm', '入院科室:' + getSmallDeptName(admissFormData.value.smallWard));
|
|
|
+ LODOP.ADD_PRINT_TEXT('20mm', '49mm', '220mm', '7mm', '紧急联系人:' + phone);
|
|
|
+ if(LODOP.SET_PRINTER_INDEX(normalWristStrapPrintIndex.value)){
|
|
|
+ LODOP.PRINT();
|
|
|
+ }else {
|
|
|
+ LODOP.PREVIEW()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ LODOP.SET_PRINT_STYLE('FontSize', 6)
|
|
|
+ LODOP.ADD_PRINT_BARCODE('10mm', '32mm', '15mm', '15mm', 'QRCode', patNo)
|
|
|
+ LODOP.SET_PRINT_STYLE('Angle', 90)
|
|
|
+ LODOP.ADD_PRINT_TEXT('20mm', '43.7mm', '20mm', '7mm', patNo)
|
|
|
+ LODOP.SET_PRINT_STYLE('Angle', 0)
|
|
|
+
|
|
|
+ LODOP.ADD_PRINT_TEXT('11mm', '46.2mm', '50mm', '3mm', '姓名:' + admissFormData.value.name + ' / 性别:' + filterGender() + ' / 年龄:' + admissFormData.value.age)
|
|
|
+ LODOP.ADD_PRINT_TEXT('14.75mm', '46.2mm', '50mm', '3mm', '入院科室:' + getSmallDeptName(admissFormData.value.smallWard))
|
|
|
+ LODOP.ADD_PRINT_TEXT('18.5mm', '46.2mm', '50mm', '3mm', '紧急联系人:' + phone)
|
|
|
+ if(LODOP.SET_PRINTER_INDEX(childWristStrapPrintIndex.value)){
|
|
|
+ LODOP.PRINT();
|
|
|
+ }else {
|
|
|
+ LODOP.PREVIEW()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function filterGender() {
|
|
|
+ switch (admissFormData.value.sex) {
|
|
|
+ case '1':
|
|
|
+ return '男';
|
|
|
+ case '2':
|
|
|
+ return '女';
|
|
|
+ default:
|
|
|
+ return '未知';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function getSmallDeptName(code){
|
|
|
+ if(smallWardList.value.length > 0){
|
|
|
+ return smallWardList.value.filter(item=>code===item.code)[0].name
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+}
|
|
|
+
|
|
|
+// 职业
|
|
|
+const occupationList=ref([])
|
|
|
+
|
|
|
+//婚姻状态
|
|
|
+const marryList = ref([])
|
|
|
+//国籍
|
|
|
+const countryList = ref([])
|
|
|
+//民族
|
|
|
+const nationList = ref([])
|
|
|
+// 省份
|
|
|
+const provinceList = ref([])
|
|
|
+
|
|
|
+//出生地市
|
|
|
+const csCityList = ref([])
|
|
|
+//家庭是
|
|
|
+const homeCityList = ref([])
|
|
|
+//出生地街道
|
|
|
+const csSheetList = ref([])
|
|
|
+//家庭街道
|
|
|
+const homeSheetList = ref([])
|
|
|
+
|
|
|
+//证件类型
|
|
|
+const psnCertTypeList = ref([])
|
|
|
+//关系
|
|
|
+const relationList = ref([])
|
|
|
+//医生
|
|
|
+const reqDoctorList = ref([])
|
|
|
+//病区
|
|
|
+const inpatientWardList = ref([])
|
|
|
+//小科室
|
|
|
+const smallWardList = ref([])
|
|
|
+//入院状态
|
|
|
+const admissStatusList = ref([])
|
|
|
+//身份
|
|
|
+const zyResponceTypeList = ref([])
|
|
|
+//床号
|
|
|
+const bedList = ref([])
|
|
|
+// 获取市 1 出生地 2.
|
|
|
+const fetchCity = async (type)=>{
|
|
|
+ if(type === 1){
|
|
|
+ admissFormData.value.homeDistrict = ''
|
|
|
+ admissFormData.value.birthPlace = ''
|
|
|
+ if(stringNotBlank(admissFormData.value.homeZipcode)){
|
|
|
+ await queryRegionByParentCode(admissFormData.value.homeZipcode).then(res=>{
|
|
|
+ csCityList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(type === 2){
|
|
|
+ admissFormData.value.cityCode = ''
|
|
|
+ admissFormData.value.districtCode = ''
|
|
|
+ if(stringNotBlank(admissFormData.value.provinceCode)){
|
|
|
+ await queryRegionByParentCode(admissFormData.value.provinceCode).then(res=>{
|
|
|
+ homeCityList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const fetchStreet= async (type)=>{
|
|
|
+ if(type === 1){
|
|
|
+ admissFormData.value.birthPlace = ''
|
|
|
+ if(stringNotBlank(admissFormData.value.homeDistrict)){
|
|
|
+ await queryRegionByParentCode(admissFormData.value.homeDistrict).then(res=>{
|
|
|
+ csSheetList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(type === 2){
|
|
|
+ admissFormData.value.districtCode = ''
|
|
|
+ if(stringNotBlank(admissFormData.value.cityCode)){
|
|
|
+ await queryRegionByParentCode(admissFormData.value.cityCode).then(res=>{
|
|
|
+ homeSheetList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const getSmallDept =async () => {
|
|
|
+ await querySmallDeptByCode(admissFormData.value.inpatientWard).then(res=>{
|
|
|
+ smallWardList.value = res
|
|
|
+ })
|
|
|
+ getBedList()
|
|
|
+}
|
|
|
+
|
|
|
+const getBedList=()=>{
|
|
|
+ queryBedNumByCode(admissFormData.value.inpatientWard).then(res=>{
|
|
|
+ bedList.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(()=>{
|
|
|
+ initLodop()
|
|
|
+
|
|
|
+ queryOccupation().then((res)=>{
|
|
|
+ occupationList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryMarital().then(res=>{
|
|
|
+ marryList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryCountry().then(res=>{
|
|
|
+ countryList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryNation().then(res=>{
|
|
|
+ nationList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryProvince().then(res=>{
|
|
|
+ provinceList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryPsnCertType().then(res=>{
|
|
|
+ psnCertTypeList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryRelation().then(res=>{
|
|
|
+ relationList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryDoctor().then(res=>{
|
|
|
+ reqDoctorList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryAllInpatientWard().then(res=>{
|
|
|
+ inpatientWardList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryAdmissStatus().then(res=>{
|
|
|
+ admissStatusList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryZyResponceType().then(res=>{
|
|
|
+ zyResponceTypeList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ queryLastWindowsIpAddress().then(res=>{
|
|
|
+ printIndex.value = res.printIndex
|
|
|
+ normalWristStrapPrintIndex.value = res.normalWristStrapPrintIndex
|
|
|
+ childWristStrapPrintIndex.value = res.childWristStrapPrintIndex
|
|
|
+ })
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+
|
|
|
+</style>
|