123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761 |
- <template>
- <div class="layout_display_flex_y">
- <div>
- <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"
- />
- <el-button icon="CreditCard" type="primary" @click="injurySicard">
- 工伤读社保卡
- </el-button>
- <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>
- <generate-medicine-return-order />
- <el-button type="danger" @click="chronicDiseaseRegister"
- >慢病登记
- </el-button>
- </div>
- <div style="margin-bottom: 8px">
- <el-divider content-position="left" class="el-divider_shorter"
- >患者基本信息
- </el-divider>
- <el-descriptions :column="3" border>
- <el-descriptions-item>
- <template #label> 住院号</template>
- {{ patient.inpatientNo }}
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 住院次数</template>
- {{ patient.admissTimes }}
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 出生日期</template>
- {{ patient.birthDate }}
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label>入院日期</template>
- {{ patient.admissDate }}
- </el-descriptions-item>
- <el-descriptions-item>
- <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>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 小科室</template>
- {{ patient.smallDeptName }}
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 入院医生</template>
- {{ patient.admissPhysicianName }}
- </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>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 证件类型</template>
- <el-select
- v-model="patient.psnCertType"
- :clearable="true"
- placeholder="请选择"
- style="width: 180px"
- >
- <el-option
- v-for="item in psnCertTypes"
- :key="item.code"
- :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>
- <el-descriptions-item>
- <template #label>证件号码</template>
- <el-input
- v-model="patient.socialNo"
- style="width: 180px"
- clearable
- ></el-input>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 姓名</template>
- <el-input v-model="patient.name" style="width: 180px"></el-input>
- </el-descriptions-item>
- <el-descriptions-item>
- <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>
- <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>
- </el-descriptions-item>
- <el-descriptions-item>
- <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>
- <el-select
- v-model="patient.country"
- style="width: 180px"
- :filterable="true"
- >
- <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>
- <el-divider direction="vertical"></el-divider>
- <span>{{ item.name }}</span>
- </el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 民族</template>
- <el-select
- v-model="patient.nation"
- style="width: 180px"
- :filterable="true"
- >
- <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>
- <el-divider direction="vertical"></el-divider>
- <span>{{ item.name }}</span>
- </el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 联系人姓名</template>
- <el-input
- v-model="patient.contactName"
- style="width: 180px"
- ></el-input>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 联系人关系</template>
- <el-select
- v-model="patient.contactRelation"
- style="width: 180px"
- :filterable="true"
- >
- <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>
- <el-divider direction="vertical"></el-divider>
- <span>{{ item.name }}</span>
- </el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 联系人地址</template>
- <el-input
- v-model="patient.contactAddrName"
- style="width: 180px"
- ></el-input>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 联系人电话</template>
- <el-input
- v-model="patient.contactPhone"
- style="width: 180px"
- ></el-input>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 参保地区</template>
- <el-cascader
- v-model="patient.admdvsCascader"
- clearable
- filterable
- placeholder="请选择"
- :options="allAdmdvses"
- :disabled="injuryMode"
- @change="handleAdmdvsChange"
- ></el-cascader>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label> 医疗类别</template>
- <el-select
- v-model="patient.medType"
- :clearable="true"
- 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-item>
- <template #label>就诊人群类型</template>
- <el-select
- v-model="expContent.MDTRT_GRP_TYPE"
- placeholder="普通患者无需填写"
- clearable
- style="width: 180px"
- >
- <el-option
- v-for="item in mdtrtGrpTypes"
- :key="item.key"
- :label="item.name"
- :value="item.code"
- ></el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label>外伤标志</template>
- <el-select
- v-model="expContent.TRUM_FLAG"
- placeholder="请选择"
- style="width: 180px"
- >
- <el-option label="否" value="0" key="trumFlag-0"></el-option>
- <el-option label="是" value="1" key="trumFlag-1"></el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label>涉及第三方标志</template>
- <el-select
- v-model="expContent.REL_TTP_FLAG"
- placeholder="请选择"
- style="width: 180px"
- >
- <el-option label="否" value="0" key="relTtpFlag-0"></el-option>
- <el-option label="是" value="1" key="relTtpFlag-1"></el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label>住院类型</template>
- <el-select
- v-model="expContent.IPT_TYPE"
- placeholder="请选择"
- style="width: 180px"
- >
- <el-option label="普通住院" value="1" key="iptType-1"></el-option>
- <el-option
- label="急诊或者请求住院"
- value="2"
- key="iptType-2"
- ></el-option>
- <el-option label="转院住院" value="3" key="iptType-3"></el-option>
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item>
- <template #label>慢病类型</template>
- <div>{{ patient.crmName }}</div>
- </el-descriptions-item>
- </el-descriptions>
- </div>
- <div class="layout_flex_1-y layout_display_flex_y">
- <el-divider content-position="left" class="el-divider_shorter">
- 医保入院诊断(*自费患者无需填写*)
- <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-divider>
- <div class="layout_flex_1-y">
- <el-table :data="zyInYbDiags" height="100%" stripe>
- <el-table-column label="诊断序号" prop="diagNo"></el-table-column>
- <el-table-column label="诊断属性" prop="property"></el-table-column>
- <el-table-column label="诊断编码" prop="icdCode"></el-table-column>
- <el-table-column label="诊断名称" prop="icdText"></el-table-column>
- <el-table-column label="诊断类别">
- <template #default="scope">
- {{ getDiagTypeName(scope.row.diagType) }}
- </template>
- </el-table-column>
- <el-table-column label="诊断时间" prop="opDate"></el-table-column>
- <el-table-column label="操作">
- <template #default="scope">
- <el-button
- circle
- icon="Delete"
- type="danger"
- @click="deleteYbDiag(scope.$index)"
- ></el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </div>
- <Assignmentinfo
- v-if="showAssigninfo"
- :admdvs="patient.admdvs"
- :social-no="patient.socialNo"
- @close="showAssigninfo = false"
- />
- <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>
- <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: 6px"
- @current-change="handleCurrentChange"
- ></el-pagination>
- </el-dialog>
- <el-dialog
- v-model="showAdmissApplyForm"
- title="医保入院登记申请"
- width="500px"
- >
- <div style="margin-bottom: 20px">
- 登记时间:
- <el-date-picker
- v-model="admissApply.admissDatetime"
- placeholder="请选择医保登记开始时间"
- type="datetime"
- ></el-date-picker>
- </div>
- <el-input
- v-model="admissApply.inputComment"
- placeholder="请输入申请理由"
- type="textarea"
- ></el-input>
- <div style="width: 450px; text-align: right; margin-top: 30px">
- <el-button icon="Close" type="info" @click="cancelAdmissApply"
- >取消
- </el-button>
- <el-button icon="Check" type="success" @click="confirmAdmissApply"
- >提交
- </el-button>
- </div>
- </el-dialog>
- <el-dialog v-model="showPsnInsuinfo" title="人员信息" width="65%">
- <el-tag>{{ injuryMode ? "工伤信息" : "参保信息" }}</el-tag>
- <div v-if="injuryMode">
- <el-table
- :data="injuryinfo"
- height="180"
- stripe
- @row-click="handleClickInjuryinfo"
- >
- <el-table-column label="个人唯一识别码" prop="psn_no" width="100"></el-table-column>
- <el-table-column label="单位唯一识别码" prop="emp_no" width="100"></el-table-column>
- <el-table-column label="单位名称" prop="emp_name" width="100"></el-table-column>
- <el-table-column label="证件号码" prop="certno" width="150"></el-table-column>
- <el-table-column label="姓名" prop="psn_name" ></el-table-column>
- <el-table-column label="性别" prop="gend" :formatter="(row) => formatGender(row.gend)"></el-table-column>
- <el-table-column label="年龄" prop="age"></el-table-column>
- <el-table-column label="工伤人员类别" prop="psn_type" :formatter="(row) => formatInjuryPersonType(row.psn_type)"></el-table-column>
- <el-table-column label="统筹区号" prop="insu_admdvs"></el-table-column>
- <el-table-column label="在院状态" prop="inhosp_stas" :formatter="(row) => formatInHospStatus(row.inhosp_stas)"></el-table-column>
- <el-table-column label="待遇不享受原因" prop="trt_chk_rslt" width="100"></el-table-column>
- <el-table-column label="工伤诊断结论" prop="exam_ccls" width="150"></el-table-column>
- <el-table-column label="证件类型" prop="certificate_type" :formatter="(row) => formatCertType(row.certificate_type)"></el-table-column>
- <el-table-column label="出生日期" prop="birthday"></el-table-column>
- </el-table>
- </div>
- <div v-else>
- <el-table
- :data="psnBaseinfo.insuinfo"
- height="180"
- stripe
- @row-click="handleClickInsuinfo"
- >
- <el-table-column label="余额" prop="balc"></el-table-column>
- <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
- <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
- <el-table-column
- label="参保状态"
- prop="psnInsuStasName"
- ></el-table-column>
- <el-table-column
- label="个人参保日期"
- prop="psnInsuDate"
- ></el-table-column>
- <el-table-column
- label="暂停参保日期"
- prop="pausInsuDate"
- ></el-table-column>
- <el-table-column
- label="公务员标志"
- prop="cvlservFlagName"
- ></el-table-column>
- <el-table-column
- label="参保地医保区划"
- prop="insuplcAdmdvs"
- ></el-table-column>
- <el-table-column
- label="参保地名称"
- prop="insuplcAdmdvsName"
- ></el-table-column>
- <el-table-column label="单位名称" prop="empName"></el-table-column>
- </el-table>
- <div style="height: 16px"></div>
- <el-tag>身份信息</el-tag>
- <el-table :data="psnBaseinfo.idetinfo" height="180" stripe>
- <el-table-column
- label="人员身份类别"
- prop="psnIdetTypeName"
- ></el-table-column>
- <el-table-column
- label="人员类别等级"
- prop="psnTypeLv"
- ></el-table-column>
- <el-table-column label="备注" prop="memo"></el-table-column>
- <el-table-column label="开始时间" prop="begntime"></el-table-column>
- <el-table-column label="结束时间" prop="endtime"></el-table-column>
- </el-table>
- </div>
- </el-dialog>
- <Search
- v-if="searchParams.showSearch"
- :med-type="patient.medType"
- :target="searchParams.target"
- :title="searchParams.title"
- :show-emp-dept="searchParams.target === 'physician'"
- :show-yb-code="searchParams.target === 'physician'"
- @close="searchParams.showSearch = false"
- @click-item="handleClickSearchItem"
- />
- </template>
- <script setup>
- 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 { diagTypes, sexes } from "@/data";
- import { allAdmdvses } from "@/data/admdvs";
- 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 { clone } from "@/utils/clone";
- import {
- getMatnTypes,
- getMedTypesByFlag,
- getPsnCertTypes,
- } from "@/api/medical-insurance/si-dict";
- import {
- checkRegisterDate,
- obtainBasicPersonInfo,
- } from "@/api/medical-insurance/si-query";
- import {
- inpatientRegister,
- revokeInpatientRegister,
- employeeInfoInquiry,
- } from "@/api/medical-insurance/si-injury";
- import {
- selectAdmissApply,
- submitAdmissApply,
- } from "@/api/medical-insurance/si-admiss-apply";
- import { baseinfo } from "@/data/inpatient";
- import XmlrV2 from "@/components/xmlr/index.vue";
- import Assignmentinfo from "@/components/medical-insurance/assigninfo/Index.vue";
- import Search from "@/components/search/Index.vue";
- import ReadCard from "@/components/medical-insurance/readcard/Index.vue";
- import GenerateMedicineReturnOrder from "@/components/medical-insurance/medicine-return-order/GenerateMedicineReturnOrder.vue";
- import { CyMessageBox } from "@/utils/cy-message-box";
- import sleep from "@/utils/sleep";
- import XEUtils from "xe-utils";
- import router from "@/router";
- import { useMedinsStore } from "@/pinia/medins-store";
- import { useDialog } from "@/components/cy/CyDialog/index";
- const patient = computed(() => {
- const patientInfo = baseinfo();
- const pContent = patientInfo.expContent
- ? JSON.parse(patientInfo.expContent)
- : {};
- expContent.MDTRT_GRP_TYPE = pContent.MDTRT_GRP_TYPE;
- expContent.TRUM_FLAG = pContent.TRUM_FLAG;
- expContent.REL_TTP_FLAG = pContent.REL_TTP_FLAG;
- expContent.IPT_TYPE = pContent.IPT_TYPE;
- return patientInfo;
- });
- const fetchZyYbDiags = () => {
- if (nullPatient()) {
- return;
- }
- getZyInYbDiags(patient.value.inpatientNo, patient.value.admissTimes).then(
- res => {
- zyInYbDiags.value = res;
- }
- );
- };
- const medinsStore = useMedinsStore();
- const injuryMode = computed(() => {
- return medinsStore.isInjuryMode;
- });
- const handleSelectMedType = val => {
- medinsStore.setInjuryMode((val === "gs21") || (val === "gs22") || (val === "gs23"));
- };
- const actived = ref(false);
- onActivated(() => {
- actived.value = true;
- });
- onDeactivated(() => {
- actived.value = false;
- });
- const currentPatNo = ref(null);
- watchEffect(() => {
- if (actived.value) {
- if (
- patient.value.inpatientNo &&
- patient.value.inpatientNo !== currentPatNo.value
- ) {
- currentPatNo.value = patient.value.inpatientNo;
- fetchZyYbDiags();
- }
- }
- });
- const searchParams = reactive({
- showSearch: false,
- title: "",
- target: "",
- });
- const psnCertTypes = ref([]);
- const medTypes = ref([]);
- const countries = ref([]);
- const nations = ref([]);
- const relations = ref([]);
- const diagItem = ref({});
- const showSearchSpecialDiag = ref(false);
- const zyInYbDiags = ref([]);
- 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 expContent = reactive({
- MDTRT_GRP_TYPE: "",
- TRUM_FLAG: "",
- REL_TTP_FLAG: "",
- IPT_TYPE: "",
- });
- const mdtrtGrpTypes = [
- { code: "1", name: "新冠肺炎确诊患者", key: "mdtrtGrpTypes-1" },
- { code: "2", name: "其他国家突发公共事件", key: "mdtrtGrpTypes-2" },
- { code: "3", name: "新冠肺炎疑似患者", key: "mdtrtGrpTypes-3" },
- { code: "4", name: "无症状感染者", key: "mdtrtGrpTypes-4" },
- ];
- const handleAdmdvsChange = val => {
- patient.value.admdvs = val[1];
- };
- const openDiagDialog = () => {
- if (nullPatient()) {
- return;
- }
- if (!patient.value.medType) {
- ElMessage({
- message: "请先选择医疗类别!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- 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;
- });
- };
- const addDiseInfo = row => {
- patient.value.diseCode = row.newCode;
- patient.value.diseName = row.newName;
- showSearchSpecialDiag.value = false;
- };
- const getDiagTypeName = val => {
- for (let i = 0; i < diagTypes.length; i++) {
- if (diagTypes[i].code === val) {
- return diagTypes[i].name;
- }
- }
- };
- const deleteYbDiag = index => {
- zyInYbDiags.value.splice(index, 1);
- for (let i = 0; i < zyInYbDiags.value.length; i++) {
- const element = zyInYbDiags.value[i];
- element.diagNo = i + 1;
- if (i === 0) {
- element.property = "主要诊断";
- }
- }
- };
- const saveYbDiags = () => {
- const param = {
- inpatientNo: patient.value.inpatientNo,
- admissTimes: patient.value.admissTimes,
- diags: zyInYbDiags.value,
- };
- saveZyInYbDiags(param).then(() => {
- ElMessage({
- message: "医保入院诊断保存成功。",
- type: "success",
- duration: 2500,
- showClose: true,
- });
- showSearchSpecialDiag.value = false;
- });
- };
- const submitPatientInfo = () => {
- if (nullPatient()) {
- return;
- }
- ElMessageBox.confirm("确定保存患者信息?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- patient.value.expContent = JSON.stringify(expContent);
- submitSiPatientInfo({
- patient: patient.value,
- diags: zyInYbDiags.value,
- }).then(() => {
- ElMessage({
- message: "保存患者信息成功。",
- type: "success",
- duration: 2500,
- showClose: true,
- });
- });
- });
- };
- const searchPhysician = flag => {
- switch (flag) {
- case 1:
- searchParams.title = "管床医生";
- break;
- case 2:
- searchParams.title = "责任护士";
- break;
- }
- searchParams.target = "physician";
- searchParams.showSearch = true;
- };
- const handleClickSearchItem = item => {
- if (searchParams.target === "physician") {
- if (!item.ybCode) {
- ElMessage({
- message: "请选择有医保赋码的人员。",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- switch (searchParams.title) {
- case "管床医生":
- if (!item.ybCode.startsWith("D")) {
- ElMessage({
- message: "医师医保编码首字母为D,请重新选择。",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- patient.value.referPhysician = item.code;
- patient.value.referPhysicianName = item.name;
- break;
- case "责任护士":
- if (!item.ybCode.startsWith("N")) {
- ElMessage({
- message: "护士医保编码首字母为N,请重新选择。",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- patient.value.dutyNurse = item.code;
- patient.value.dutyNurseName = item.name;
- break;
- }
- } else if (
- searchParams.target === "diag" ||
- searchParams.target === "injurydiag"
- ) {
- diagItem.value.icdCode = item.icdCode;
- diagItem.value.icdText = item.icdText;
- diagItem.value.diagType = item.diagType;
- diagItem.value.property =
- zyInYbDiags.value.length === 0 ? "主要诊断" : "次要诊断";
- diagItem.value.diagNo = zyInYbDiags.value.length + 1;
- diagItem.value.opDate = getDatetime();
- zyInYbDiags.value.push(clone(diagItem.value));
- }
- searchParams.showSearch = false;
- };
- const afterReadCard = result => {
- patient.value.mdtrtCertType = result.mdtrtCertType;
- patient.value.readCardResult = result.readCardResult;
- patient.value.busCardInfo = result.busCardInfo;
- patient.value.readCardBizType = result.readCardBizType;
- };
- const formatYbRegisterDate = () => {
- patient.value.ybRegisterDate = formatDatetime(patient.value.ybRegisterDate);
- };
- const admissApply = ref({});
- const showAdmissApplyForm = ref(false);
- // 新增:用于存储工伤读卡接口返回结果
- const injurySicardResult = ref({});
- const injurySicard = async () => {
- if (nullPatient()) {
- return;
- }
- if (!patient.value.medType) {
- ElMessage({
- message: "请先选择医疗类别!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if (!(patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
- ElMessage({
- message: "请先选择工伤相关的医疗类别!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- const loading = ElMessage({
- message: '正在读取社保卡,请稍候...',
- type: 'info',
- duration: 0,
- showClose: true,
- grouping: true,
- });
- try {
- const response = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/workinjury', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- action: 'transaction',
- transactionName: 'ReadCard',
- }),
- });
- const result = await response.json();
- console.log("patient.value00000000000000000000",patient.value)
- console.log("resultccccccccccccccccccccccc",result)
- if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
- if(result.data && result.data.data && result.data.data.output && result.data.data.output.certno && (result.data.data.output.certno !== patient.value.socialNo)) {
- ElMessage({
- message: '人证不符,请检查身份证号码!',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- return
- }
- if(result.data && result.data.data && result.data.data.output && result.data.data.output.psn_name && (result.data.data.output.psn_name !== patient.value.name)) {
- ElMessage({
- message: '人证不符,请检查姓名!',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- return
- }
- // 新增:调用 addWorkInjuryPatientRelation
- try {
- // 解析 exam_ccls 字段
- let QualificationId = '';
- let injury_part_desc = '';
- let visit_type = '';
- if (result.data.data.output.exam_ccls) {
- // 格式:^工伤医疗费资格审核信息ID|受伤部位信息描述|就诊类型^
- const match = result.data.data.output.exam_ccls.match(/^\^?(.*?)\|(.*?)\|(.*?)\^?$/);
- if (match) {
- QualificationId = match[1];
- injury_part_desc = match[2];
- visit_type = match[3];
- }
- }
- const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryPatientRelation', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- inpatient_no:patient.value.inpatientNo,
- admiss_times:patient.value.admissTimes,
- psn_no:result.data.data.output.psn_no,
- emp_no:result.data.data.output.emp_no,
- emp_name:result.data.data.output.emp_name,
- certno:result.data.data.output.certno,
- psn_name:result.data.data.output.psn_name,
- gend:result.data.data.output.gend,
- age:result.data.data.output.age,
- psn_type:result.data.data.output.psn_type,
- insu_admdvs:result.data.data.output.insu_admdvs,
- inhosp_stas:result.data.data.output.inhosp_stas,
- trt_chk_rslt:result.data.data.output.trt_chk_rslt,
- exam_ccls:result.data.data.output.exam_ccls,
- certificate_type:result.data.data.output.certificate_type,
- birthday:result.data.data.output.birthday,
- QualificationId,
- injury_part_desc,
- visit_type
- }),
- });
- const resultTwo = await responseTwo.json();
- if(!(resultTwo && resultTwo.code === 1)) {
- ElMessage({
- message: '本地录入工伤社保卡信息失败',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- return
- }
- } catch (e) {
- ElMessage({
- message: '本地录入工伤社保卡信息失败',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- return
- }
- injurySicardResult.value = result.data;
- patient.value.mdtrtCertType = 'injurySicard';
- patient.value.readCardResult = injurySicardResult.value;
- patient.value.readCardBizType = '01103';
- console.log("patient.value22222222222222222222222222222222222222222",patient.value)
- ElMessage({
- message: '工伤读社保卡成功',
- type: 'success',
- duration: 2500,
- showClose: true,
- });
- } else {
- ElMessage({
- message: result.message || '工伤读社保卡失败',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- }
- } catch (error) {
- ElMessage({
- message: '工伤读社保卡接口异常',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- } finally {
- loading.close && loading.close();
- }
- };
- const checkRegisterDatetime = () => {
- if (nullPatient()) {
- return;
- }
- if(!(patient.value && patient.value.mdtrtCertType && patient.value.readCardResult)) {
- ElMessage({
- message: "请进行读卡操作!",
- type: "warning",
- duration: 2600,
- showClose: true,
- });
- return;
- }
- if(patient.value.mdtrtCertType === "sicard"){
- if ((patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
- ElMessage({
- message: "工伤相关的医疗类别,不能用此读卡功能!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if(!(patient.value.name && patient.value.readCardResult && patient.value.readCardResult.includes(patient.value.name))) {
- // 社保卡读卡成功,但姓名不匹配!
- ElMessage({
- message: "社保卡读卡成功,但姓名不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if(!(patient.value.socialNo && patient.value.readCardResult && patient.value.readCardResult.includes(patient.value.socialNo))) {
- // 社保卡读卡成功,但身份证不匹配!
- ElMessage({
- message: "社保卡读卡成功,但身份证不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- }else if(patient.value.mdtrtCertType === "qrcode"){
- if ((patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
- ElMessage({
- message: "工伤相关的医疗类别,不能用此读卡功能!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- // 电子凭证读卡逻辑 - JSON格式数据
- try {
- const cardData = JSON.parse(patient.value.readCardResult);
- if (!(patient.value.name && cardData.userName === patient.value.name)) {
- ElMessage({
- message: "电子凭证读卡成功,但姓名不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if (!(patient.value.socialNo && cardData.idNo === patient.value.socialNo)) {
- ElMessage({
- message: "电子凭证读卡成功,但身份证不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- } catch (error) {
- ElMessage({
- message: "电子凭证读卡数据格式错误!",
- type: "error",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- }else if(patient.value.mdtrtCertType === "face"){
- if ((patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
- ElMessage({
- message: "工伤相关的医疗类别,不能用此读卡功能!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- // 刷脸读卡逻辑 - JSON格式数据
- try {
- const cardData = JSON.parse(patient.value.readCardResult);
- if (!(patient.value.name && cardData.userName === patient.value.name)) {
- ElMessage({
- message: "刷脸读卡成功,但姓名不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if (!(patient.value.socialNo && cardData.idNo === patient.value.socialNo)) {
- ElMessage({
- message: "刷脸读卡成功,但身份证不匹配!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- } catch (error) {
- ElMessage({
- message: "刷脸读卡数据格式错误!",
- type: "error",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- }
- if ((patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
- if(!(zyInYbDiags.value && zyInYbDiags.value.length && zyInYbDiags.value.length > 0)) {
- ElMessage({
- message: "医保入院诊断,不能为空!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- }
- patient.value.expContent = JSON.stringify(expContent);
- 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) {
- admissApply.value.patNo = patient.value.inpatientNo;
- admissApply.value.times = patient.value.admissTimes;
- admissApply.value.ledgerSn = patient.value.ledgerSn;
- admissApply.value.admissDatetime = patient.value.ybRegisterDate;
- admissApply.value.inputComment = "人证相符。";
- showAdmissApplyForm.value = true;
- } else {
- switch (res.status) {
- case 0:
- ElMessageBox.alert(
- "医保科尚未处理此患者的医保入院申请,请耐心等候或者致电医保科(内线电话:2102)。",
- "提示",
- {
- type: "warning",
- }
- );
- break;
- case 1:
- getPsnInsuinfo();
- break;
- case 2:
- ElMessageBox.confirm(
- "医保科驳回了此患者的医保入院申请,驳回意见为【" +
- res.handleComment +
- "】",
- "提示",
- {
- type: "error",
- distinguishCancelAndClose: true,
- confirmButtonText: "我知道了",
- cancelButtonText: "重新提交",
- showCancelButton: true,
- }
- ).catch(action => {
- if (action === "cancel") {
- admissApply.value.patNo = patient.value.inpatientNo;
- admissApply.value.times = patient.value.admissTimes;
- admissApply.value.ledgerSn = patient.value.ledgerSn;
- admissApply.value.admissDatetime =
- patient.value.ybRegisterDate;
- showAdmissApplyForm.value = true;
- }
- });
- break;
- }
- }
- });
- });
- });
- };
- const cancelAdmissApply = () => {
- admissApply.value = {};
- showAdmissApplyForm.value = false;
- };
- const confirmAdmissApply = () => {
- if (!admissApply.value.admissDatetime) {
- ElMessage({
- message: "医保入院登记时间不能为空!",
- type: "error",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if (!admissApply.value.inputComment) {
- ElMessage({
- message: "申请理由不能为空!",
- type: "error",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- admissApply.value.admissDatetime = formatDatetime(
- admissApply.value.admissDatetime
- );
- ElMessageBox.confirm("是否确认提交入院登记申请?", "提示", {
- type: "warning",
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- })
- .then(() => {
- submitAdmissApply(admissApply.value).then(res => {
- ElMessage({
- message: res,
- type: "success",
- duration: 2500,
- showClose: true,
- });
- showAdmissApplyForm.value = false;
- });
- })
- .catch(() => {});
- };
- const psnBaseinfo = ref({});
- const showPsnInsuinfo = ref(false);
- const injuryinfo = ref([]);
- const getPsnInsuinfo = () => {
- if (nullPatient()) {
- return;
- }
- if (!patient.value.medType) {
- ElMessage({
- message: "请选择患者的医疗类别!",
- type: "warning",
- showClose: true,
- });
- return;
- }
- if (injuryMode.value) {
- //employeeInfoInquiry(patient.value).then(res => {
- //injuryinfo.value = res;
- injuryinfo.value = [patient.value.readCardResult.data.output];
- showPsnInsuinfo.value = true;
- //});
- } else {
- const param = {
- medType: patient.value.medType,
- patNo: patient.value.inpatientNo,
- times: patient.value.admissTimes,
- ledgerSn: patient.value.ledgerSn,
- socialNo: patient.value.socialNo,
- name: patient.value.name,
- admdvs: patient.value.admdvs,
- psnCertType: patient.value.psnCertType,
- needSaving: 1,
- };
- obtainBasicPersonInfo(param).then(res => {
- patient.value.psnNo = res.psnNo;
- psnBaseinfo.value = res;
- showPsnInsuinfo.value = true;
- if (XEUtils.toNumber(res.gend) !== patient.value.sex) {
- sleep(800).then(() => {
- CyMessageBox.alert({
- message: `患者医保性别<span style="color:red">${res.gendName}</span>,与HIS信息不一致,请核实。`,
- type: "warning",
- dangerouslyUseHTMLString: true,
- });
- });
- }
- });
- }
- };
- const handleClickInjuryinfo = row => {
- ElMessageBox.confirm("确定进行工伤入院登记?", "提示", {
- type: "warning",
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- })
- .then(async () => {
- // 解析 exam_ccls 字段
- let QualificationId = '';
- let injury_part_desc = '';
- let visit_type = '';
- if (patient.value.readCardResult.data.output.exam_ccls) {
- // 格式:^工伤医疗费资格审核信息ID|受伤部位信息描述|就诊类型^
- const match = patient.value.readCardResult.data.output.exam_ccls.match(/^\^?(.*?)\|(.*?)\|(.*?)\^?$/);
- if (match) {
- QualificationId = match[1];
- injury_part_desc = match[2];
- visit_type = match[3];
- }
- }
- const businessParams = {
- ipt_otp_no: patient.value.inpatientNo + '_' + patient.value.admissTimes,
- med_type: patient.value.medType,
- adm_time: getCurrentDateTimeStr(),
- adm_diag_dscr: zyInYbDiags.value && zyInYbDiags.value.length && (zyInYbDiags.value.length > 0) && zyInYbDiags.value[0] && zyInYbDiags.value[0].icdCode ? zyInYbDiags.value[0].icdCode : '',
- wardarea_name: patient.value.admissWardName,
- adm_dept_codg: patient.value.admissWard,
- adm_bed: patient.value.bedNo,
- atddr_no: patient.value.admissPhysician,
- tel: patient.value.contactPhone,
- psn_no: patient.value.readCardResult.data.output.psn_no,
- ipt_no: patient.value.inpatientNo,
- qualification_id: QualificationId
- }
- const params = {
- "action": "transaction",
- "transactionName": "RegisterPatient",
- "businessParams": businessParams
- }
- console.log("params22222222222222222222222222222222222222222222222222",params)
- try {
- const response = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/workinjury', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(params),
- });
- const result = await response.json();
- // 你可以根据 result 做后续处理
- if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
- //调用addWorkInjuryInterfaceLog接口
- try {
- const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryInterfaceLog', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- inpatient_no:patient.value.inpatientNo,
- admiss_times:patient.value.admissTimes,
- ledger_sn:patient.value.ledger_sn,
- infno:result.data.transformed_parameters.infno,
- msgid:result.data.transformed_parameters.msgid,
- recer_sys_code:result.data.transformed_parameters.recer_sys_code,
- infver:result.data.transformed_parameters.infver,
- opter_type:result.data.transformed_parameters.opter_type,
- opter:result.data.transformed_parameters.opter,
- opter_name:result.data.transformed_parameters.opter_name,
- inf_time:result.data.transformed_parameters.inf_time,
- fixmedins_code:result.data.transformed_parameters.fixmedins_code,
- sign_no:result.data.transformed_parameters.sign_no,
- idfi_mode:result.data.transformed_parameters.idfi_mode,
- input:result.data.transformed_parameters.input,
- qrcode_info:result.data.transformed_parameters.qrcode_info,
- infcode:result.data.data.infcode,
- inf_refmsgid:result.data.data.inf_refmsgid,
- refmsg_time:result.data.data.refmsg_time,
- respond_time:result.data.data.respond_time,
- err_msg:result.data.data.err_msg,
- warn_msg:result.data.data.warn_msg,
- output:result.data.data.output
- }),
- });
- const resultTwo = await responseTwo.json();
- if(resultTwo && resultTwo.code === 1) {
- ElMessage({
- message: '工伤入院登记成功',
- type: 'success',
- duration: 2500,
- showClose: true,
- });
- }else {
- ElMessage({
- message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
- type: 'error',
- duration: 10000,
- showClose: true,
- });
- return
- }
- } catch (e) {
- ElMessage({
- message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
- type: 'error',
- duration: 10000,
- showClose: true,
- });
- return
- }
- } else {
- ElMessage({
- message: result.message || '工伤入院登记失败',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- }
- } catch (e) {
- ElMessage({
- message: '工伤入院登记接口异常',
- type: 'error',
- duration: 2500,
- showClose: true,
- });
- }
-
- //row.patNo = patient.value.inpatientNo;
- //row.times = patient.value.admissTimes;
- //row.ledgerSn = patient.value.ledgerSn;
- //row.aka130 = "42";
- //row.bka003 = "420";
- //inpatientRegister(row).then(res => {
- // ElMessage({
- // message: "审核已通过,医保入院登记成功。",
- // type: "success",
- // duration: 2500,
- //// showClose: true,
- // });
- showPsnInsuinfo.value = false;
- //});
- })
- .catch(() => {});
- };
- const handleClickInsuinfo = row => {
- ElMessageBox.confirm("确定进行医保入院登记?", "提示", {
- type: "warning",
- 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.insuplcAdmdvsName = row.insuplcAdmdvsName;
- patient.value.empName = row.empName;
- admissRegister(patient.value).then(() => {
- ElMessage({
- message: "医保入院登记成功。",
- type: "success",
- duration: 2500,
- showClose: true,
- });
- showPsnInsuinfo.value = false;
- });
- })
- .catch(() => {});
- };
- const beforeCancelRegister = () => {
- if (nullPatient()) return;
- ElMessageBox.prompt("请输入撤销入院登记的原因:", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- })
- .then(({ value }) => {
- if (!value) {
- ElMessage({
- message: "撤销入院登记的原因不能为空!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- ElMessageBox.confirm(
- "撤销医保入院登记的原因为【" + value + "】确定撤销?",
- "提示",
- {
- type: "warning",
- }
- ).then(() => {
- patient.value.revokeRemark = value;
- if (injuryMode.value) {
- revokeInpatientRegister(patient.value).then(() => {
- ElMessageBox.alert("撤销入院登记成功。", "提示", {
- type: "success",
- });
- });
- } else {
- revokeAdmission(patient.value).then(() => {
- ElMessageBox.alert("撤销入院登记成功。", "提示", {
- type: "success",
- });
- });
- }
- });
- })
- .catch(() => {});
- };
- const showAssigninfo = ref(false);
- const beforeFetchAssigninfo = () => {
- if (nullPatient()) {
- return;
- }
- if (!patient.value.socialNo) {
- ElMessage({
- message: "患者身份证不能为空!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- if (!patient.value.admdvs) {
- ElMessage({
- message: "患者参保地不能为空!",
- type: "warning",
- duration: 2500,
- showClose: true,
- });
- return;
- }
- showAssigninfo.value = true;
- };
- function chronicDiseaseRegister() {
- if (nullPatient()) {
- return;
- }
- router.push(
- "/outpatient/chronicDisease/chronicDiseaseRegister/" +
- patient.value.inpatientNo
- );
- }
- const xiangMuLuRuRouter = () => {
- if (nullPatient()) {
- return;
- }
- useDialog(XmlrV2, {
- dialogProps: {
- fullscreen: true,
- showClose: false,
- },
- showFooter: false,
- hideHeader: true,
- params: { patNo: patient.value.inpatientNo },
- });
- };
- const currentPage = ref(1);
- const handleCurrentChange = val => {
- currentPage.value = val;
- };
- // 性别转化
- function formatGender(val) {
- switch (val) {
- case '1': return '男';
- case '2': return '女';
- case '9': return '未说明性别';
- default: return val || '';
- }
- }
- // 工伤人员类别转化
- function formatInjuryPersonType(val) {
- const map = {
- '01': '新工伤', '02': '老工伤', '03': '建筑业', '04': '退休职业病',
- '05': '机关事业老工伤纳入', '06': '机关事业老工伤确认', '07': '伤残军人',
- '08': '非全日制和多单位就业', '09': '8023人员', '10': '包干老工伤',
- '11': '超龄就业人员', '12': '实习生', '13': '离职职业病', '14': '见习生',
- '15': '新业态人员'
- };
- return map[val] || val || '';
- }
- // 在院状态转化
- function formatInHospStatus(val) {
- switch (val) {
- case '0': return '未在院';
- case '1': return '工伤在院';
- case '2': return '医疗在院';
- default: return val || '';
- }
- }
- // 证件类型转化
- function formatCertType(val) {
- const map = {
- '01': '居民身份证', '04': '港澳居民来往内地通行证', '05': '台湾居民来往大陆通行证',
- '07': '外国人永久居留身份证', '08': '外国人护照', '16': '港澳台居民居住证',
- '90': '社会保障卡', '99': '其他'
- };
- return map[val] || val || '';
- }
- // 获取当前时间,格式为YYYYMMDDHH24MISS
- function getCurrentDateTimeStr() {
- const now = new Date();
- const pad = (n) => n < 10 ? '0' + n : n;
- return (
- now.getFullYear().toString() +
- pad(now.getMonth() + 1) +
- pad(now.getDate()) +
- pad(now.getHours()) +
- pad(now.getMinutes()) +
- pad(now.getSeconds())
- );
- }
- onMounted(() => {
- getPsnCertTypes().then(res => {
- psnCertTypes.value = res;
- });
- getMedTypesByFlag("hospitalization").then(res => {
- medTypes.value = res;
- });
- fetchCountryDictionary().then(res => {
- countries.value = res;
- });
- fetchNationDictionary().then(res => {
- nations.value = res;
- });
- fetchRelationDictionary().then(res => {
- relations.value = res;
- });
- getMatnTypes().then(res => {
- matnTypes.value = res;
- });
- });
- </script>
- <style scoped>
- .el-date-editor.el-input,
- .el-date-editor.el-input__inner {
- width: 100%;
- }
- .el-collapse-item__content {
- padding-bottom: 0;
- }
- .el-collapse-item__header {
- height: 30px;
- line-height: 30px;
- }
- .el-collapse-item__header,
- .el-collapse-item__wrap {
- background-color: inherit;
- }
- .el-autocomplete-suggestion li {
- line-height: normal !important;
- }
- </style>
|