Browse Source

住院和门诊登记需要填病种

lighter 2 years ago
parent
commit
09c09c4f53

+ 220 - 224
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -3,7 +3,7 @@
     <el-header height="35px">
       <el-button icon="Location" type="primary" @click="beforeFetchAssigninfo">定点信息</el-button>
       <el-button icon="Check" type="primary" @click="submitPatientInfo"> 保存</el-button>
-      <ReadCard :pat-no="patient.inpatientNo" biztype="01103" @success="afterReadCard" />
+      <ReadCard :pat-no="patient.inpatientNo" biztype="01103" @success="afterReadCard"/>
       <el-button icon="Top" type="success" @click="checkRegisterDatetime">医保入院登记</el-button>
       <el-button icon="Bottom" type="danger" @click="beforeCancelRegister">撤销入院登记</el-button>
       <el-button icon="Coin" type="success" @click="xiangMuLuRuRouter">项目录入</el-button>
@@ -14,65 +14,70 @@
       <div style="height: 4px"></div>
       <el-descriptions :column="3" border>
         <el-descriptions-item>
-          <template #label> 住院号 </template>
+          <template #label> 住院号</template>
           {{ patient.inpatientNo }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 住院次数 </template>
+          <template #label> 住院次数</template>
           {{ patient.admissTimes }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 出生日期 </template>
+          <template #label> 出生日期</template>
           {{ patient.birthDate }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label>入院日期 </template>
+          <template #label>入院日期</template>
           {{ patient.admissDate }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 病区 </template>
+          <template #label> 病区</template>
           {{ patient.admissWardName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 入院诊断 </template>
-          <div style="width: 180px" class="ellipsis-text" :title="patient.admissDiagStr">{{ patient.admissDiagStr }}</div>
+          <template #label> 入院诊断</template>
+          <div style="width: 180px" class="ellipsis-text" :title="patient.admissDiagStr">{{
+              patient.admissDiagStr
+            }}
+          </div>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 小科室 </template>
+          <template #label> 小科室</template>
           {{ patient.smallDeptName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 入院医生 </template>
+          <template #label> 入院医生</template>
           {{ patient.admissPhysicianName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label>身份证号 </template>
+          <template #label>身份证号</template>
           <el-input v-model="patient.socialNo" style="width: 180px" clearable></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 姓名 </template>
+          <template #label> 姓名</template>
           <el-input v-model="patient.name" style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 性别 </template>
+          <template #label> 性别</template>
           <el-select v-model="patient.sex" placeholder=" " style="width: 180px">
             <el-option v-for="item in sexes" :key="item.code" :label="item.name" :value="item.code"></el-option>
           </el-select>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 联系电话 </template>
+          <template #label> 联系电话</template>
           <el-input v-model="patient.homeTel" style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 管床医生 </template>
-          <el-input v-model="patient.referPhysicianName" readonly @click="searchPhysician(1)" style="width: 180px"></el-input>
+          <template #label> 管床医生</template>
+          <el-input v-model="patient.referPhysicianName" readonly @click="searchPhysician(1)"
+                    style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 责任护士 </template>
-          <el-input v-model="patient.dutyNurseName" readonly @click="searchPhysician(2)" style="width: 180px"></el-input>
+          <template #label> 责任护士</template>
+          <el-input v-model="patient.dutyNurseName" readonly @click="searchPhysician(2)"
+                    style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 国籍 </template>
+          <template #label> 国籍</template>
           <el-select v-model="patient.country" style="width: 180px" filterable>
             <el-option v-for="item in countries" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -82,7 +87,7 @@
           </el-select>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 民族 </template>
+          <template #label> 民族</template>
           <el-select v-model="patient.nation" style="width: 180px" filterable>
             <el-option v-for="item in nations" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -92,11 +97,11 @@
           </el-select>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 联系人姓名 </template>
+          <template #label> 联系人姓名</template>
           <el-input v-model="patient.contactName" style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 联系人关系 </template>
+          <template #label> 联系人关系</template>
           <el-select v-model="patient.contactRelation" style="width: 180px" filterable>
             <el-option v-for="item in relations" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -106,19 +111,20 @@
           </el-select>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 联系人地址 </template>
+          <template #label> 联系人地址</template>
           <el-input v-model="patient.contactAddrName" style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 联系人电话 </template>
+          <template #label> 联系人电话</template>
           <el-input v-model="patient.contactPhone" style="width: 180px"></el-input>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 登记日期 </template>
-          <el-date-picker v-model="patient.ybRegisterDate" placeholder="选择日期时间" style="width: 180px" type="datetime" @change="formatYbRegisterDate"></el-date-picker>
+          <template #label> 登记日期</template>
+          <el-date-picker v-model="patient.ybRegisterDate" placeholder="选择日期时间" style="width: 180px" type="datetime"
+                          @change="formatYbRegisterDate"></el-date-picker>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 参保地区 </template>
+          <template #label> 参保地区</template>
           <el-select v-if="injuryMode" v-model="patient.injuryArea" placeholder="工伤参保地" size="small">
             <el-option v-for="item in injuryAreas" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -135,21 +141,50 @@
           </el-select>
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 医疗类别 </template>
-          <el-select v-model="patient.medType" clearable placeholder="请选择" @change="handleSelectMedType" style="width: 180px">
-            <el-option v-for="item in medTypes" :key="item.code" :disabled="item.disabled" :label="item.name" :value="item.code">
+          <template #label> 医疗类别</template>
+          <el-select v-model="patient.medType" clearable placeholder="请选择" @change="handleSelectMedType"
+                     style="width: 180px">
+            <el-option v-for="item in medTypes" :key="item.code" :disabled="item.disabled" :label="item.name"
+                       :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
               <el-divider direction="vertical"></el-divider>
               <span>{{ item.name }}</span>
             </el-option>
           </el-select>
         </el-descriptions-item>
+        <span v-if="patient.medType === '52'">
+          <el-descriptions-item>
+            <template #label>生育类别</template>
+              <el-select v-model="patient.matnType" placeholder="请选择" style="width: 180px">
+              <el-option v-for="item in matnTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
+            </el-select>
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template #label>是否晚育</template>
+            <el-select v-model="patient.latechbFlag" placeholder="请选择" style="width: 180px">
+              <el-option label="否" value="0"></el-option>
+              <el-option label="是" value="1"></el-option>
+            </el-select>
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template #label>是否早产</template>
+            <el-select v-model="patient.pretFlag" placeholder="请选择" style="width: 180px">
+              <el-option label="否" value="0"></el-option>
+              <el-option label="是" value="1"></el-option>
+            </el-select>
+          </el-descriptions-item>
+        </span>
+        <el-descriptions-item v-if="patient.medType === '2102' || patient.medType === '52'">
+          <template #label>患者病种</template>
+          <el-input v-model="patient.diseName" readonly style="width: 180px" @click="openDiseInput"></el-input>
+        </el-descriptions-item>
       </el-descriptions>
 
       <div style="margin-top: 16px">
         <el-tag type="info"> 医保入院诊断(*自费患者无需填写*)</el-tag>
         <el-button circle icon="Plus" title="添加入院诊断" type="primary" @click="openDiagDialog"></el-button>
-        <el-button :disabled="zyInYbDiags.length === 0" circle icon="Check" title="保存入院诊断" type="success" @click="saveYbDiags"></el-button>
+        <el-button :disabled="zyInYbDiags.length === 0" circle icon="Check" title="保存入院诊断" type="success"
+                   @click="saveYbDiags"></el-button>
       </div>
       <div style="margin-top: 8px">
         <el-table :data="zyInYbDiags" height="160" stripe>
@@ -170,72 +205,48 @@
           </el-table-column>
         </el-table>
       </div>
-      <Assignmentinfo v-if="showAssigninfo" :admdvs="patient.admdvs" :social-no="patient.socialNo" @close="showAssigninfo = false" />
+      <Assignmentinfo v-if="showAssigninfo" :admdvs="patient.admdvs" :social-no="patient.socialNo"
+                      @close="showAssigninfo = false"/>
     </el-main>
     <el-dialog v-model="openXmlr" :fullscreen="true" destroy-on-close title="项目录入" @close="openXmlr = false">
-      <Xmlr @closeXmlr="openXmlr = false" />
+      <Xmlr @closeXmlr="openXmlr = false"/>
     </el-dialog>
     <el-dialog v-model="openYiZhuTuiFei" :fullscreen="true" title="医嘱退费">
-      <YiZhuTuiFei :initYiZhu="initYiZhu" @closeYiZhuTuiFei="openYiZhuTuiFei = false" />
+      <YiZhuTuiFei :initYiZhu="initYiZhu" @closeYiZhuTuiFei="openYiZhuTuiFei = false"/>
     </el-dialog>
-    <el-dialog v-model="showSearchSpecialDiag" :close-on-click-modal="false" title="医保入院诊断录入" width="80%">
-      <el-row :gutter="5">
-        <el-col :span="18">
-          <el-tag>可选诊断</el-tag>&nbsp;&nbsp;
-          <el-input v-model="specialDiagName" clearable placeholder="请输入诊断名称" style="width: 260px"></el-input>
-          <span v-if="patient.medType === '52'">
-            <el-select v-model="patient.matnType" placeholder="请选择生育类别" style="width: 120px">
-              <el-option v-for="item in matnTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
-            </el-select>
-            &nbsp;&nbsp; 是否晚育:
-            <el-radio-group v-model="patient.latechbFlag">
-              <el-radio label="0">否</el-radio>
-              <el-radio label="1">是</el-radio>
-            </el-radio-group>
-            &nbsp;&nbsp; 是否早产:
-            <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 :data="cptSpecialDiags.slice((currentPage - 1) * 10, currentPage * 10)" height="400" highlight-current-row stripe>
-            <el-table-column label="老系统编码" prop="oldCode"></el-table-column>
-            <el-table-column label="老系统名称" prop="oldName"></el-table-column>
-            <el-table-column label="新系统编码" prop="newCode"></el-table-column>
-            <el-table-column label="新系统名称" prop="newName"></el-table-column>
-            <el-table-column label="限额方式" prop="limitWay"></el-table-column>
-            <el-table-column label="限额额度计算方式" prop="limitAmountCalculateWay"></el-table-column>
-            <el-table-column label="疾病限额" prop="limitAmount"></el-table-column>
-            <el-table-column>
-              <template #default="scope">
-                <el-button type="primary" @click="addSpecialDiag(scope.row)">{{ addDiagButtonText }}</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-pagination
-            :current-page="currentPage"
-            :page-size="10"
-            :total="cptSpecialDiags.length"
-            layout="total, prev, pager, next, jumper"
-            style="margin-top: 5px"
-            @current-change="handleCurrentChange"
-          ></el-pagination>
-        </el-col>
-        <el-col :span="6">
-          <el-tag>已选诊断</el-tag>&nbsp;&nbsp;
-          <el-button :disabled="zyInYbDiags.length === 0" icon="Check" type="success" @click="saveYbDiags"> 保存入院诊断 </el-button>
-          <el-table :data="zyInYbDiags" height="400" stripe>
-            <el-table-column label="诊断编码" prop="icdCode"></el-table-column>
-            <el-table-column label="诊断名称" prop="icdText"></el-table-column>
-            <el-table-column>
-              <template #default="scope">
-                <el-button icon="Delete" type="danger" @click="deleteYbDiag(scope.$index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-col>
-      </el-row>
+
+    <el-dialog v-model="showSearchSpecialDiag" :close-on-click-modal="false" title="医保患者病种录入" width="60%">
+      <div style="margin: -16px 0 4px 2px; height: 22px; line-height: 22px">
+        患者当前病种:
+        <span style="padding: 2px 6px; background: #005279; border-radius: 4px; color: white">
+          {{ patient.diseCode ? (patient.diseCode + ' | ' + patient.diseName) : '无' }}
+        </span>
+      </div>
+      <el-tag>可选病种</el-tag>&nbsp;&nbsp;
+      <el-input v-model="specialDiagName" clearable placeholder="请输入病种名称" style="width: 260px"></el-input>
+      <el-table :data="cptSpecialDiags.slice((currentPage - 1) * 10, currentPage * 10)" height="400"
+                highlight-current-row stripe>
+        <el-table-column label="病种编码" prop="newCode"></el-table-column>
+        <el-table-column label="病种名称" prop="newName"></el-table-column>
+        <el-table-column label="限额方式" prop="limitWay"></el-table-column>
+        <el-table-column label="限额额度计算方式" prop="limitAmountCalculateWay"></el-table-column>
+        <el-table-column label="疾病限额" prop="limitAmount"></el-table-column>
+        <el-table-column>
+          <template #default="scope">
+            <el-button type="primary" @click="addDiseInfo(scope.row)">选择此病种</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+          :current-page="currentPage"
+          :page-size="10"
+          :total="cptSpecialDiags.length"
+          layout="total, prev, pager, next, jumper"
+          style="margin-top: 5px"
+          @current-change="handleCurrentChange"
+      ></el-pagination>
     </el-dialog>
+
     <el-dialog v-model="showAdmissApplyForm" title="医保入院登记申请" width="500px">
       <div style="margin-bottom: 20px">
         登记时间:
@@ -286,35 +297,39 @@
       </div>
     </el-dialog>
     <Search
-      v-if="searchParams.showSearch"
-      :med-type="patient.medType"
-      :target="searchParams.target"
-      :title="searchParams.title"
-      @close="searchParams.showSearch = false"
-      @click-item="handleClickSearchItem"
+        v-if="searchParams.showSearch"
+        :med-type="patient.medType"
+        :target="searchParams.target"
+        :title="searchParams.title"
+        @close="searchParams.showSearch = false"
+        @click-item="handleClickSearchItem"
     />
   </el-container>
 </template>
 
 <script>
 import store from '@/store'
-import { computed, onActivated, onDeactivated, onMounted, reactive, ref, watchEffect } from 'vue'
-import { getZyInYbDiags, saveZyInYbDiags, submitSiPatientInfo } from '@/api/inpatient/patient'
-import { getAllSpecialDiags } from '@/api/inpatient/dictionary'
-import { fetchCountryDictionary, fetchNationDictionary, fetchRelationDictionary } from '@/api/dictionary/fetch-dictionaries'
-import { cptSex } from '@/utils/computed'
-import { admdvses, diagTypes, sexes } from '@/data'
-import { nullPatient } from '@/utils/validate'
-import { ElMessage, ElMessageBox } from 'element-plus'
-import { admissRegister, revokeAdmission } from '@/api/medical-insurance/si-inpatient'
-import { formatDatetime, getDatetime } from '@/utils/date'
-import { getGreatestRole } from '@/utils/permission'
-import { clone } from '@/utils/clone'
-import { getMatnTypes, getMedTypesByFlag } from '@/api/medical-insurance/si-dict'
-import { checkRegisterDate, obtainBasicPersonInfo } from '@/api/medical-insurance/si-query'
-import { admissRegistration, cancelInjuryRegister, getPersonBaseinfo } from '@/api/medical-insurance/si-injury'
-import { selectAdmissApply, submitAdmissApply } from '@/api/medical-insurance/si-admiss-apply'
-import { baseinfo } from '@/data/inpatient'
+import {computed, onActivated, onDeactivated, onMounted, reactive, ref, watchEffect} from 'vue'
+import {getZyInYbDiags, saveZyInYbDiags, submitSiPatientInfo} from '@/api/inpatient/patient'
+import {getAllSpecialDiags} from '@/api/inpatient/dictionary'
+import {
+  fetchCountryDictionary,
+  fetchNationDictionary,
+  fetchRelationDictionary
+} from '@/api/dictionary/fetch-dictionaries'
+import {cptSex} from '@/utils/computed'
+import {admdvses, diagTypes, sexes} from '@/data'
+import {nullPatient} from '@/utils/validate'
+import {ElMessage, ElMessageBox} from 'element-plus'
+import {admissRegister, revokeAdmission} from '@/api/medical-insurance/si-inpatient'
+import {formatDatetime, getDatetime} from '@/utils/date'
+import {getGreatestRole} from '@/utils/permission'
+import {clone} from '@/utils/clone'
+import {getMatnTypes, getMedTypesByFlag} from '@/api/medical-insurance/si-dict'
+import {checkRegisterDate, obtainBasicPersonInfo} from '@/api/medical-insurance/si-query'
+import {admissRegistration, cancelInjuryRegister, getPersonBaseinfo} from '@/api/medical-insurance/si-injury'
+import {selectAdmissApply, submitAdmissApply} from '@/api/medical-insurance/si-admiss-apply'
+import {baseinfo} from '@/data/inpatient'
 import Xmlr from '@/components/inpatient/XiangMuLuRu.vue'
 import YiZhuTuiFei from '@/components/inpatient/YiZhuTuiFei.vue'
 import Assignmentinfo from '@/components/medical-insurance/assigninfo/Index.vue'
@@ -373,9 +388,6 @@ export default {
     const showSearchSpecialDiag = ref(false)
     const insuinfo = ref([])
     const zyInYbDiags = ref([])
-    const addDiagButtonText = computed(() => {
-      return zyInYbDiags.value.length === 0 ? '添加为主诊断' : '添加为副诊断'
-    })
     const specialDiags = ref([])
     const specialDiagName = ref('')
     const cptSpecialDiags = computed(() => {
@@ -386,10 +398,10 @@ export default {
     const matnTypes = ref([])
 
     const injuryAreas = [
-      { code: 1, name: '长沙市' },
-      { code: 4, name: '长沙县' },
-      { code: 2, name: '望城县' },
-      { code: 3, name: '省直' },
+      {code: 1, name: '长沙市'},
+      {code: 4, name: '长沙县'},
+      {code: 2, name: '望城县'},
+      {code: 3, name: '省直'},
     ]
 
     const singleDiseaseTypeChanged = (val) => {
@@ -413,45 +425,22 @@ export default {
         })
         return
       }
-      if (patient.value.medType === '52' || patient.value.medType === '2102') {
-        diagItem.value.icdCode = null
-        diagItem.value.icdText = null
-        if (patient.value.medType === '52') {
-          getMatnTypes().then((res) => {
-            matnTypes.value = res
-          })
-        }
+      searchParams.title = '医保入院诊断'
+      searchParams.target = injuryMode.value ? 'injurydiag' : 'diag'
+      searchParams.showSearch = true
+    }
+
+    const openDiseInput = () => {
         getAllSpecialDiags(patient.value.medType).then((res) => {
           specialDiags.value = res
           showSearchSpecialDiag.value = true
         })
-      } else {
-        searchParams.title = '医保入院诊断'
-        searchParams.target = injuryMode.value ? 'injurydiag' : 'diag'
-        searchParams.showSearch = true
-      }
-    }
+    };
 
-    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 addDiseInfo = (row) => {
+      patient.value.diseCode = row.newCode
+      patient.value.diseName = row.newName
+      showSearchSpecialDiag.value = false
     }
 
     const getDiagTypeName = (val) => {
@@ -512,7 +501,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning',
       }).then(() => {
-        submitSiPatientInfo({ patient: patient.value, diags: zyInYbDiags.value }).then(() => {
+        submitSiPatientInfo({patient: patient.value, diags: zyInYbDiags.value}).then(() => {
           ElMessage({
             message: '保存患者信息成功。',
             type: 'success',
@@ -580,7 +569,7 @@ export default {
       if (nullPatient()) {
         return
       }
-      submitSiPatientInfo({ patient: patient.value, diags: zyInYbDiags.value }).then(() => {
+      submitSiPatientInfo({patient: patient.value, diags: zyInYbDiags.value}).then(() => {
         checkRegisterDate(patient.value.inpatientNo, patient.value.admissTimes).then(() => {
           selectAdmissApply(patient.value).then((res) => {
             if (null === res.status) {
@@ -654,18 +643,19 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          submitAdmissApply(admissApply.value).then((res) => {
-            ElMessage({
-              message: res,
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            submitAdmissApply(admissApply.value).then((res) => {
+              ElMessage({
+                message: res,
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showAdmissApplyForm.value = false
             })
-            showAdmissApplyForm.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const psnBaseinfo = ref({})
@@ -713,22 +703,23 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          const param = {
-            baseinfo: patient.value,
-            injuryinfo: row,
-          }
-          admissRegistration(param).then((res) => {
-            ElMessage({
-              message: '审核已通过,医保入院登记成功。',
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            const param = {
+              baseinfo: patient.value,
+              injuryinfo: row,
+            }
+            admissRegistration(param).then((res) => {
+              ElMessage({
+                message: '审核已通过,医保入院登记成功。',
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showPsnInsuinfo.value = false
             })
-            showPsnInsuinfo.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const handleClickInsuinfo = (row) => {
@@ -737,23 +728,24 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          patient.value.balc = row.balc
-          patient.value.insutype = row.insutype
-          patient.value.psnType = row.psnType
-          patient.value.insuplcAdmdvs = row.insuplcAdmdvs
-          patient.value.empName = row.empName
-          admissRegister(patient.value).then(() => {
-            ElMessage({
-              message: '医保入院登记成功。',
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            patient.value.balc = row.balc
+            patient.value.insutype = row.insutype
+            patient.value.psnType = row.psnType
+            patient.value.insuplcAdmdvs = row.insuplcAdmdvs
+            patient.value.empName = row.empName
+            admissRegister(patient.value).then(() => {
+              ElMessage({
+                message: '医保入院登记成功。',
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showPsnInsuinfo.value = false
             })
-            showPsnInsuinfo.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const beforeCancelRegister = () => {
@@ -762,36 +754,37 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(({ value }) => {
-          if (!value) {
-            ElMessage({
-              message: '撤销入院登记的原因不能为空!',
+          .then(({value}) => {
+            if (!value) {
+              ElMessage({
+                message: '撤销入院登记的原因不能为空!',
+                type: 'warning',
+                duration: 2500,
+                showClose: true,
+              })
+              return
+            }
+            ElMessageBox.confirm('撤销医保入院登记的原因为【' + value + '】确定撤销?', '提示', {
               type: 'warning',
-              duration: 2500,
-              showClose: true,
-            })
-            return
-          }
-          ElMessageBox.confirm('撤销医保入院登记的原因为【' + value + '】确定撤销?', '提示', {
-            type: 'warning',
-          }).then(() => {
-            patient.value.revokeRemark = value
-            if (injuryMode.value) {
-              cancelInjuryRegister(patient.value).then(() => {
-                ElMessageBox.alert('撤销入院登记成功。', '提示', {
-                  type: 'success',
+            }).then(() => {
+              patient.value.revokeRemark = value
+              if (injuryMode.value) {
+                cancelInjuryRegister(patient.value).then(() => {
+                  ElMessageBox.alert('撤销入院登记成功。', '提示', {
+                    type: 'success',
+                  })
                 })
-              })
-            } else {
-              revokeAdmission(patient.value).then(() => {
-                ElMessageBox.alert('撤销入院登记成功。', '提示', {
-                  type: 'success',
+              } else {
+                revokeAdmission(patient.value).then(() => {
+                  ElMessageBox.alert('撤销入院登记成功。', '提示', {
+                    type: 'success',
+                  })
                 })
-              })
-            }
+              }
+            })
+          })
+          .catch(() => {
           })
-        })
-        .catch(() => {})
     }
 
     const showAssigninfo = ref(false)
@@ -853,6 +846,9 @@ export default {
       fetchRelationDictionary().then((res) => {
         relations.value = res
       })
+      getMatnTypes().then((res) => {
+        matnTypes.value = res
+      })
     })
 
     return {
@@ -901,8 +897,8 @@ export default {
       initYiZhu,
       specialDiags,
       singleDiseaseTypeChanged,
-      addDiagButtonText,
-      addSpecialDiag,
+      openDiseInput,
+      addDiseInfo,
       specialDiagName,
       cptSpecialDiags,
       matnTypes,

+ 1 - 1
src/views/medical-insurance/outpatient/MzRegister.vue

@@ -185,7 +185,7 @@
         <el-table-column property="enddate" label="失效日期"></el-table-column>
       </el-table>
     </el-dialog>
-    <el-dialog title="请选择生育诊断" v-model="showMatnDises" width="60%">
+    <el-dialog title="请选择生育病种" v-model="showMatnDises" width="60%">
       <el-table :data="matnDises" @row-click="uploadFees" stripe height="360">
         <el-table-column property="code" label="病种编码"></el-table-column>
         <el-table-column property="name" label="病种名称"></el-table-column>