|  | @@ -182,7 +182,6 @@
 | 
	
		
			
				|  |  |              <el-button type="primary" icon="el-icon-check" size="mini" @click="pushSiZyInDiag">确定</el-button>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </el-dialog>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          <el-dialog title="个人参保信息" v-model="showInsuinfo" width="65%">
 | 
	
		
			
				|  |  |            <el-table :data="insuinfo" @row-click="doYbRegisterOrModify">
 | 
	
		
			
				|  |  |              <el-table-column label="余额" prop="balc"></el-table-column>
 | 
	
	
		
			
				|  | @@ -205,6 +204,63 @@
 | 
	
		
			
				|  |  |      <el-dialog v-model="openYiZhuTuiFei" title="医嘱退费" :fullscreen="true">
 | 
	
		
			
				|  |  |        <YiZhuTuiFei :initYiZhu="initYiZhu" @closeYiZhuTuiFei="openYiZhuTuiFei = false" />
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  | +    <el-dialog v-model="showSearchSpecialDiag" title="医保入院诊断录入" width="80%" :close-on-click-modal="false">
 | 
	
		
			
				|  |  | +      <div v-if="patient.medType === '2102'" style="margin-top: -30px; margin-bottom: 12px">
 | 
	
		
			
				|  |  | +        <el-radio-group v-model="singleDiseaseType" @change="singleDiseaseTypeChanged">
 | 
	
		
			
				|  |  | +          <el-radio label="2102">职工单病种</el-radio>
 | 
	
		
			
				|  |  | +          <el-radio label="2102-residents">居民单病种</el-radio>
 | 
	
		
			
				|  |  | +        </el-radio-group>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <el-row :gutter="5">
 | 
	
		
			
				|  |  | +        <el-col :span="18">
 | 
	
		
			
				|  |  | +          <el-tag size="mini">可选诊断</el-tag>  
 | 
	
		
			
				|  |  | +          <el-input size="mini" placeholder="请输入诊断名称" v-model="specialDiagName" style="width: 260px" clearable></el-input>
 | 
	
		
			
				|  |  | +          <span v-if="patient.medType === '52'">
 | 
	
		
			
				|  |  | +            <el-select size="mini" v-model="patient.matnType" placeholder="请选择生育类别" style="width: 120px">
 | 
	
		
			
				|  |  | +              <el-option v-for="item in matnTypes" :value="item.code" :label="item.name" :key="item.code"></el-option>
 | 
	
		
			
				|  |  | +            </el-select>
 | 
	
		
			
				|  |  | +               是否晚育:
 | 
	
		
			
				|  |  | +            <el-radio-group v-model="patient.latechbFlag">
 | 
	
		
			
				|  |  | +              <el-radio label="0">否</el-radio>
 | 
	
		
			
				|  |  | +              <el-radio label="1">是</el-radio>
 | 
	
		
			
				|  |  | +            </el-radio-group>
 | 
	
		
			
				|  |  | +               是否早产:
 | 
	
		
			
				|  |  | +            <el-radio-group v-model="patient.pretFlag">
 | 
	
		
			
				|  |  | +              <el-radio label="0">否</el-radio>
 | 
	
		
			
				|  |  | +              <el-radio label="1">是</el-radio>
 | 
	
		
			
				|  |  | +            </el-radio-group>
 | 
	
		
			
				|  |  | +          </span>
 | 
	
		
			
				|  |  | +          <el-table size="mini" :data="cptSpecialDiags" stripe highlight-current-row height="400">
 | 
	
		
			
				|  |  | +            <el-table-column prop="oldCode" label="老系统编码"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="oldName" label="老系统名称"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="newCode" label="新系统编码"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="newName" label="新系统名称"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="limitWay" label="限额方式"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="limitAmountCalculateWay" label="限额额度计算方式"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="limitAmount" label="疾病限额"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="reimbursementRate" label="报销比例"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column>
 | 
	
		
			
				|  |  | +              <template #default="scope">
 | 
	
		
			
				|  |  | +                <el-button size="mini" type="primary" @click="addSpecialDiag(scope.row)">{{ addDiagButtonText }}</el-button>
 | 
	
		
			
				|  |  | +              </template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +          </el-table>
 | 
	
		
			
				|  |  | +        </el-col>
 | 
	
		
			
				|  |  | +        <el-col :span="6">
 | 
	
		
			
				|  |  | +          <el-tag size="mini">已选诊断</el-tag>  
 | 
	
		
			
				|  |  | +          <el-button size="mini" type="success" icon="el-icon-check" :disabled="zyInYbDiags.length === 0" @click="saveYbDiags">保存入院诊断</el-button>
 | 
	
		
			
				|  |  | +          <el-table size="mini" stripe :data="zyInYbDiags" height="400">
 | 
	
		
			
				|  |  | +            <el-table-column prop="icdCode" label="诊断编码"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column prop="icdText" label="诊断名称"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column>
 | 
	
		
			
				|  |  | +              <template #default="scope">
 | 
	
		
			
				|  |  | +                <el-button size="mini" type="danger" icon="el-icon-delete" @click="deleteYbDiag(scope.$index)">删除</el-button>
 | 
	
		
			
				|  |  | +              </template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +          </el-table>
 | 
	
		
			
				|  |  | +        </el-col>
 | 
	
		
			
				|  |  | +      </el-row>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  |    </el-container>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -212,7 +268,7 @@
 | 
	
		
			
				|  |  |  import { computed, onMounted, ref, watchEffect } from 'vue'
 | 
	
		
			
				|  |  |  import Cookies from 'js-cookie'
 | 
	
		
			
				|  |  |  import { getCancelRegisterRequests, submitCancelRegisterRequest, revokeYbsf, submitPatientYbInfo, getZyInYbDiags, saveZyInYbDiags } from '@/api/yibao/patient'
 | 
	
		
			
				|  |  | -import { searchData } from '@/api/yibao/dictionary'
 | 
	
		
			
				|  |  | +import { searchData, getAllSpecialDiags } from '@/api/yibao/dictionary'
 | 
	
		
			
				|  |  |  import store from '@/store'
 | 
	
		
			
				|  |  |  import { cptSex } from '@/utils/computed'
 | 
	
		
			
				|  |  |  import { sexes } from '@/data/index'
 | 
	
	
		
			
				|  | @@ -224,7 +280,7 @@ import { prepareReadCard } from '@/utils/readcard'
 | 
	
		
			
				|  |  |  import { formatDatetime, getDatetime } from '@/utils/date'
 | 
	
		
			
				|  |  |  import { getGreatestRole } from '@/utils/permission'
 | 
	
		
			
				|  |  |  import { clone } from '@/utils/clone'
 | 
	
		
			
				|  |  | -import { getDiagTypes, getMedTypesByFlag } from '@/api/medical-insurance/si-dict'
 | 
	
		
			
				|  |  | +import { getDiagTypes, getMedTypesByFlag, getMatnTypes } from '@/api/medical-insurance/si-dict'
 | 
	
		
			
				|  |  |  import { baseinfo } from '@/data/inpatient'
 | 
	
		
			
				|  |  |  import Xmlr from '@/components/inpatient/XiangMuLuRu.vue'
 | 
	
		
			
				|  |  |  import YiZhuTuiFei from '@/components/inpatient/YiZhuTuiFei.vue'
 | 
	
	
		
			
				|  | @@ -258,18 +314,60 @@ export default {
 | 
	
		
			
				|  |  |      const medTypes = ref([])
 | 
	
		
			
				|  |  |      const diagItem = ref({})
 | 
	
		
			
				|  |  |      const showSearchDiag = ref(false)
 | 
	
		
			
				|  |  | +    const showSearchSpecialDiag = ref(false)
 | 
	
		
			
				|  |  |      const insuinfo = ref([])
 | 
	
		
			
				|  |  |      const showInsuinfo = ref(false)
 | 
	
		
			
				|  |  |      const zyInYbDiags = ref([])
 | 
	
		
			
				|  |  |      const diagTypes = ref([])
 | 
	
		
			
				|  |  | +    const singleDiseaseType = ref('2102')
 | 
	
		
			
				|  |  | +    const addDiagButtonText = computed(() => {
 | 
	
		
			
				|  |  | +      return zyInYbDiags.value.length === 0 ? '添加为主诊断' : '添加为副诊断'
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    const specialDiags = ref([])
 | 
	
		
			
				|  |  | +    const specialDiagName = ref('')
 | 
	
		
			
				|  |  | +    const cptSpecialDiags = computed(() => {
 | 
	
		
			
				|  |  | +      return specialDiags.value.filter((item) => {
 | 
	
		
			
				|  |  | +        return (item.oldName + '' + item.newName).indexOf(specialDiagName.value) !== -1
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    const matnTypes = ref([])
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    const singleDiseaseTypeChanged = (val) => {
 | 
	
		
			
				|  |  | +      zyInYbDiags.value = []
 | 
	
		
			
				|  |  | +      diagItem.value = {}
 | 
	
		
			
				|  |  | +      getAllSpecialDiags(val).then((res) => {
 | 
	
		
			
				|  |  | +        specialDiags.value = res
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const openDiagDialog = () => {
 | 
	
		
			
				|  |  |        if (nullPatient()) {
 | 
	
		
			
				|  |  |          return
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      if (!patient.value.medType) {
 | 
	
		
			
				|  |  | +        ElMessage({
 | 
	
		
			
				|  |  | +          message: '请先选择医疗类别!',
 | 
	
		
			
				|  |  | +          type: 'warning',
 | 
	
		
			
				|  |  | +          duration: 2500,
 | 
	
		
			
				|  |  | +          showClose: true,
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        return
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        diagItem.value.icdCode = null
 | 
	
		
			
				|  |  |        diagItem.value.icdText = null
 | 
	
		
			
				|  |  | -      showSearchDiag.value = true
 | 
	
		
			
				|  |  | +      if (patient.value.medType === '52' || patient.value.medType === '2102') {
 | 
	
		
			
				|  |  | +        if (patient.value.medType === '52') {
 | 
	
		
			
				|  |  | +          getMatnTypes().then((res) => {
 | 
	
		
			
				|  |  | +            matnTypes.value = res
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        getAllSpecialDiags(patient.value.medType).then((res) => {
 | 
	
		
			
				|  |  | +          specialDiags.value = res
 | 
	
		
			
				|  |  | +          showSearchSpecialDiag.value = true
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        showSearchDiag.value = true
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const pushSiZyInDiag = () => {
 | 
	
	
		
			
				|  | @@ -298,6 +396,28 @@ export default {
 | 
	
		
			
				|  |  |        showSearchDiag.value = false
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    const addSpecialDiag = (row) => {
 | 
	
		
			
				|  |  | +      for (let i = 0; i < zyInYbDiags.value.length; i++) {
 | 
	
		
			
				|  |  | +        if (zyInYbDiags.value[i].id === row.id) {
 | 
	
		
			
				|  |  | +          ElMessage({
 | 
	
		
			
				|  |  | +            message: '请勿添加重复诊断!',
 | 
	
		
			
				|  |  | +            type: 'warning',
 | 
	
		
			
				|  |  | +            duration: 2000,
 | 
	
		
			
				|  |  | +            showClose: true,
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          return
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      diagItem.value.id = row.id
 | 
	
		
			
				|  |  | +      diagItem.value.diagType = '1'
 | 
	
		
			
				|  |  | +      diagItem.value.icdCode = row.newCode ? row.newCode : row.oldCode
 | 
	
		
			
				|  |  | +      diagItem.value.icdText = row.newName ? row.newName : row.oldName
 | 
	
		
			
				|  |  | +      diagItem.value.property = zyInYbDiags.value.length === 0 ? '主要诊断' : '次要诊断'
 | 
	
		
			
				|  |  | +      diagItem.value.diagNo = zyInYbDiags.value.length + 1
 | 
	
		
			
				|  |  | +      diagItem.value.opDate = getDatetime()
 | 
	
		
			
				|  |  | +      zyInYbDiags.value.push(clone(diagItem.value))
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      const getDiagTypeName = (val) => {
 | 
	
		
			
				|  |  |        for (let i = 0; i < diagTypes.value.length; i++) {
 | 
	
		
			
				|  |  |          if (diagTypes.value[i].code === val) {
 | 
	
	
		
			
				|  | @@ -318,6 +438,15 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const saveYbDiags = () => {
 | 
	
		
			
				|  |  | +      if (patient.value.medType === '52' && !patient.value.matnType) {
 | 
	
		
			
				|  |  | +        ElMessage({
 | 
	
		
			
				|  |  | +          message: '请选择生育类别!',
 | 
	
		
			
				|  |  | +          type: 'warning',
 | 
	
		
			
				|  |  | +          duration: 2500,
 | 
	
		
			
				|  |  | +          showClose: true,
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        return
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        const param = {
 | 
	
		
			
				|  |  |          inpatientNo: patient.value.inpatientNo,
 | 
	
		
			
				|  |  |          admissTimes: patient.value.admissTimes,
 | 
	
	
		
			
				|  | @@ -330,6 +459,7 @@ export default {
 | 
	
		
			
				|  |  |            duration: 2500,
 | 
	
		
			
				|  |  |            showClose: true,
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | +        showSearchSpecialDiag.value = false
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -340,6 +470,8 @@ export default {
 | 
	
		
			
				|  |  |          message = '请输入科室备注信息!'
 | 
	
		
			
				|  |  |        } else if (zyInYbDiags.value.length === 0) {
 | 
	
		
			
				|  |  |          message = '医保入院诊断不能为空!'
 | 
	
		
			
				|  |  | +      } else if (!patient.value.medType) {
 | 
	
		
			
				|  |  | +        message = '请选择医疗类别!'
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if (message) {
 | 
	
		
			
				|  |  |          ElMessage({
 | 
	
	
		
			
				|  | @@ -475,6 +607,7 @@ export default {
 | 
	
		
			
				|  |  |        patient.value.psnType = row.psnType
 | 
	
		
			
				|  |  |        patient.value.insuplcAdmdvs = row.insuplcAdmdvs
 | 
	
		
			
				|  |  |        patient.value.empName = row.empName
 | 
	
		
			
				|  |  | +      showInsuinfo.value = false
 | 
	
		
			
				|  |  |        if (admOrModfy.value === 1) {
 | 
	
		
			
				|  |  |          admissRegister(patient.value).then(() => {
 | 
	
		
			
				|  |  |            showInsuinfo.value = false
 | 
	
	
		
			
				|  | @@ -590,6 +723,7 @@ export default {
 | 
	
		
			
				|  |  |        showInsuinfo,
 | 
	
		
			
				|  |  |        zyInYbDiags,
 | 
	
		
			
				|  |  |        showSearchDiag,
 | 
	
		
			
				|  |  | +      showSearchSpecialDiag,
 | 
	
		
			
				|  |  |        diagItem,
 | 
	
		
			
				|  |  |        cptSex,
 | 
	
		
			
				|  |  |        openXmlr,
 | 
	
	
		
			
				|  | @@ -616,6 +750,14 @@ export default {
 | 
	
		
			
				|  |  |        yiZhuTuiFeiClick,
 | 
	
		
			
				|  |  |        openYiZhuTuiFei,
 | 
	
		
			
				|  |  |        initYiZhu,
 | 
	
		
			
				|  |  | +      specialDiags,
 | 
	
		
			
				|  |  | +      singleDiseaseType,
 | 
	
		
			
				|  |  | +      singleDiseaseTypeChanged,
 | 
	
		
			
				|  |  | +      addDiagButtonText,
 | 
	
		
			
				|  |  | +      addSpecialDiag,
 | 
	
		
			
				|  |  | +      specialDiagName,
 | 
	
		
			
				|  |  | +      cptSpecialDiags,
 | 
	
		
			
				|  |  | +      matnTypes,
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  }
 |