FillCaseFrontSheet.vue 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732
  1. <template>
  2. <page-layer>
  3. <template #header>
  4. <el-select v-model="currentWard" @change="handleWardChange" style="width: 120px" filterable>
  5. <el-option v-for="item in userWards" :key="item.code" :value="item.code" :label="item.name"></el-option>
  6. </el-select>
  7. <el-select v-model="inOutStatus" style="width: 80px" @change="changeInOutStatus">
  8. <el-option v-for="item in inOutOptions" :key="item.code" :value="item.code" :label="item.name"></el-option>
  9. </el-select>
  10. <el-button type="primary" icon="Date" v-show="inOutStatus === 2" @click="showSelectDateRange = true"> 日期范围 </el-button>
  11. <el-divider direction="vertical"></el-divider>
  12. <el-input v-model="inpatientNo" style="width: 110px" placeholder="住院号" clearable></el-input>
  13. <el-button type="primary" icon="Search" @click="searchPatient">搜索患者</el-button>
  14. <el-divider direction="vertical"></el-divider>
  15. <el-button type="primary" icon="Edit" @click="openYbDiag" v-if="inOutStatus === 1">医保诊断</el-button>
  16. <el-button type="primary" icon="Upload" @click="saveVerify(1)">保存首页</el-button>
  17. <el-button type="success" icon="Printer" @click="beforePrint(1)">打印正面</el-button>
  18. <el-button type="success" icon="Printer" @click="beforePrint(2)">打印反面</el-button>
  19. <el-button type="primary" icon="PieChart" @click="setlUplaodClick" v-if="inOutStatus === 2">结算清单质控</el-button>
  20. </template>
  21. <template #aside>
  22. <el-table ref="asideTable" :data="overview" :height="tableHeight" stripe highlight-current-row @row-click="fetchSheetInfo">
  23. <el-table-column prop="bedNo" label="床" width="30"></el-table-column>
  24. <el-table-column label="姓名" width="70">
  25. <template #default="scope">
  26. <img class="sex-icon" :src="scope.row.sex === 1 ? maleIcon : femaleIcon" />
  27. {{ scope.row.name }}
  28. </template>
  29. </el-table-column>
  30. <el-table-column label="住院号-次数" width="80">
  31. <template #default="scope">
  32. <span style="font-weight: bold; color: black">{{ scope.row.bah }}</span
  33. >-{{ scope.row.times }}
  34. </template>
  35. </el-table-column>
  36. <el-table-column prop="doctorName" label="医生" width="45"></el-table-column>
  37. </el-table>
  38. </template>
  39. <template #main>
  40. <div style="display: flex">
  41. <div :style="mainInfo" id="scrollWrapper">
  42. <div id="page0">
  43. <h3 style="width: 100%; font-size: 17px; text-align: center">住 院 病 案 首 页</h3>
  44. <div style="width: 100%; height: 32px; line-height: 32px; font-size: 15px; text-align: center">
  45. 医疗机构: <span style="font-weight: 700">长沙泰和医院</span> (组织机构代码: <span style="font-weight: 700">43010150145</span>)
  46. </div>
  47. <div style="height: 25px; line-height: 25px; display: flex">
  48. <div>
  49. 医疗付费方式:
  50. <select v-model="patient.payMethod" style="width: 180px">
  51. <option v-for="(item, index) in dics.getPayMethod" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  52. </select>
  53. </div>
  54. <div style="width: 120px; margin-left: 12px">健康卡号: {{ patient.healthCardNo }}</div>
  55. <div style="width: 100px">第&nbsp;{{ patient.admissTimes }}&nbsp;次住院</div>
  56. <div style="width: 130px">病案号: {{ patient.bah }}</div>
  57. </div>
  58. </div>
  59. <div id="page1" style="border: 1px solid black; padding: 5px">
  60. <div>
  61. 姓名: <input id="name" v-model="patient.name" style="width: 70px" />
  62. 性别:
  63. <select id="sex" v-model="patient.sex">
  64. <option v-for="(item, index) in dics.getSexCode" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  65. </select>
  66. 出生日期: <input id="birthDate" v-model="patient.birthDate" style="width: 130px" /> 年龄:
  67. <input id="age" v-model="patient.age" type="number" style="width: 30px" />
  68. 国籍:
  69. <select id="country" v-model="patient.country">
  70. <option v-for="(item, index) in dics.getCountry" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  71. </select>
  72. </div>
  73. <div>
  74. (年龄不足 1 周岁的)年龄:
  75. <input id="ageDays" type="number" v-model="patient.ageDays" style="width: 50px" />天 新生儿出生体重:
  76. <input id="newBornWeight" type="number" v-model="patient.newBornWeight" style="width: 70px" />克 新生儿入院体重:
  77. <input id="newBornAdmissWeight" type="number" v-model="patient.newBornAdmissWeight" style="width: 70px" />克
  78. </div>
  79. <div>
  80. 出生地:
  81. <input id="birthPlaceName" v-model="patient.birthPlaceName" style="width: 230px" @click="showSearchData('birth')" />
  82. 籍贯:
  83. <input id="nativePlaceName" v-model="patient.nativePlaceName" style="width: 170px" @click="showSearchData('native')" />
  84. 民族:
  85. <select id="nation" v-model="patient.nation">
  86. <option v-for="(item, index) in dics.getNation" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  87. </select>
  88. </div>
  89. <div>
  90. 身份证号:
  91. <input id="socialNo" v-model="patient.socialNo" style="width: 160px" maxlength="18" />
  92. 职业:
  93. <select id="occupation" v-model="patient.occupation">
  94. <option v-for="(item, index) in dics.getOccupation" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  95. </select>
  96. 婚姻:
  97. <select id="marriage" v-model="patient.marriage">
  98. <option v-for="(item, index) in dics.getMarriageCode" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  99. </select>
  100. </div>
  101. <div id="livePlace">
  102. 现住址:
  103. <span id="livePlace1">
  104. <el-cascader v-model="patient.standardAddress" :options="regions" placeholder="省/市/区" style="width:230px"></el-cascader>
  105. </span>
  106. <input id="livePlace2" v-model="patient.livePlace" style="width: 300px" placeholder="街道/小区/乡镇" />
  107. </div>
  108. <div>
  109. 电话:
  110. <input id="phone" v-model="patient.phone" style="width: 90px" />
  111. 邮编:
  112. <input id="addrZipCode" v-model="patient.addrZipCode" style="width: 70px" maxlength="6" />
  113. </div>
  114. <div>
  115. 户口地址:
  116. <input id="hkPlaceName" v-model="patient.hkPlaceName" style="width: 300px" @click="showGoSearchBtn1 = true" @blur="dismissShowSearch(1)" />
  117. <el-button icon="Search" type="primary" v-show="showGoSearchBtn1" @click="showSearchData('hk')"> 前往搜索 </el-button>
  118. 邮编:
  119. <input id="hkZipCode" v-model="patient.hkZipCode" style="width: 70px" maxlength="6" />
  120. </div>
  121. <div>
  122. 工作单位及地址:
  123. <input id="unitName" v-model="patient.unitName" style="margin-right: 0; width: 145px" />
  124. /<input id="unitPlace" v-model="patient.unitPlace" style="width: 145px" /> 单位电话: <input id="unitPhone" v-model="patient.unitPhone" style="width: 80px" />
  125. 邮编:
  126. <input id="unitZipCode" v-model="patient.unitZipCode" style="width: 50px" maxlength="6" />
  127. </div>
  128. <div>
  129. 联系人姓名: <input id="contactName" v-model="patient.contactName" style="width: 90px" />
  130. 联系人关系:
  131. <select id="contactRelation" v-model="patient.contactRelation">
  132. <option v-for="(item, index) in dics.getRelations" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  133. </select>
  134. </div>
  135. <div>
  136. 联系人地址:
  137. <input id="contactAddrName" v-model="patient.contactAddrName" style="width: 300px" @click="showGoSearchBtn2 = true" @blur="dismissShowSearch(2)" />
  138. <el-button icon="Search" type="primary" v-show="showGoSearchBtn2" @click="showSearchData('contact')">前往搜索 </el-button>
  139. 联系人电话: <input id="contactPhone" v-model="patient.contactPhone" style="width: 90px" />
  140. </div>
  141. <div>
  142. 入院途径:
  143. <select id="zyAdmissWay" v-model="patient.zyAdmissWay">
  144. <option v-for="(item, index) in dics.getAdmissWay" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  145. </select>
  146. 是否手术:
  147. <select id="hasSurgery" v-model="patient.hasSurgery" @change="hasSurgeryChanged(patient.hasSurgery)">
  148. <option v-for="itm in operations" :key="itm.code" :value="itm.code">{{ itm.name }}</option>
  149. </select>
  150. </div>
  151. <div>
  152. 入院时间:<input id="admissDate" v-model="patient.admissDate" readonly style="width: 135px" /> 入院科别:<input
  153. v-model="patient.admissDept"
  154. readonly
  155. style="width: 120px"
  156. />
  157. 病房:<input v-model="patient.admissWard" readonly style="width: 80px" /> 转科科别:<input v-model="patient.transDept" readonly style="width: 120px" />
  158. </div>
  159. <div>
  160. 出院时间:<input id="dismissDate" v-model="patient.dismissDate" readonly style="width: 135px" /> 出院科别:<input
  161. v-model="patient.dismissDept"
  162. readonly
  163. style="width: 120px"
  164. />
  165. 病房:<input v-model="patient.dismissWard" readonly style="width: 80px" /> 住院天数:<input id="admissDays" v-model="patient.admissDays" style="width: 70px" />
  166. </div>
  167. <div id="clinicDiag">
  168. 门(急)诊诊断:
  169. <input v-model="patient.clinicDiagStr" readonly style="width: 350px" @click="showSearchData('clinicdiag')" />
  170. 疾病编码:
  171. <input v-model="patient.clinicDiagCode" readonly style="width: 110px" @click="showSearchData('clinicdiag')" />
  172. </div>
  173. <div id="diagTable" style="height: max-content; display: flex; width: 720px">
  174. <div style="width: 360px">
  175. <table style="width: 100%; border: 1px solid black; border-collapse: collapse">
  176. <tr>
  177. <th>主要诊断</th>
  178. <th>疾病编码</th>
  179. <th>入院病情</th>
  180. <th>出院病情</th>
  181. </tr>
  182. <tr>
  183. <td>
  184. <input id="disdiagMain" style="border: none !important; width: 170px" v-model="patient.disdiagList[0].name" @click="onSearchDiagFocus(0)" readonly />
  185. <div v-show="showDel[0]" class="not-print" style="width: 100%; text-align: center">
  186. <el-button type="primary" icon="Edit" @click="showSearch = true">修改</el-button>
  187. </div>
  188. </td>
  189. <td style="text-align: center">
  190. <input style="border: none !important; width: 100px" v-model="patient.disdiagList[0].code" readonly />
  191. </td>
  192. <td>
  193. <select id="disdiagMainAdmStatus" style="border: none !important; width: 30px" v-model="patient.disdiagList[0].admissStatus">
  194. <option v-for="(item, index) in dics.getDisAdmissStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  195. </select>
  196. </td>
  197. <td>
  198. <select style="border: none !important; width: 30px" v-model="patient.disdiagList[0].dismissStatus" @change="handleSelectCybq">
  199. <option v-for="(item, index) in dics.getDisdiagStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  200. </select>
  201. </td>
  202. </tr>
  203. <tr>
  204. <th colspan="4">其他诊断</th>
  205. </tr>
  206. <tr v-for="n in 11" :key="n">
  207. <td>
  208. <input style="border: none !important; text-align: left; padding-left: 5px" v-model="patient.disdiagList[n].name" @click="onSearchDiagFocus(n)" readonly />
  209. <div v-show="showDel[n]" class="not-print" style="width: 100%; text-align: center">
  210. <el-button type="primary" circle icon="Edit" @click="showSearch = true"></el-button>
  211. <el-button type="danger" circle icon="Delete" @click="deleteDisdiag(n)"></el-button>
  212. <el-button type="success" circle icon="Plus" @click="insertDisdiag(n)"></el-button>
  213. </div>
  214. </td>
  215. <td>
  216. <input style="border: none !important; width: 90px" v-model="patient.disdiagList[n].code" readonly />
  217. </td>
  218. <td>
  219. <select style="border: none !important; width: 30px" v-model="patient.disdiagList[n].admissStatus">
  220. <option v-for="(item, index) in dics.getDisAdmissStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  221. </select>
  222. </td>
  223. <td>
  224. <select style="border: none !important; width: 30px" v-model="patient.disdiagList[n].dismissStatus" @change="handleSelectCybq">
  225. <option v-for="(item, index) in dics.getDisdiagStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  226. </select>
  227. </td>
  228. </tr>
  229. </table>
  230. </div>
  231. <div style="width: 360px">
  232. <table style="border: 1px solid black; border-collapse: collapse">
  233. <tr v-for="n in 14" :key="n">
  234. <td>
  235. <input style="border: none !important; width: 170px" v-model="patient.disdiagList[n + 11].name" @click="onSearchDiagFocus(n + 11)" readonly />
  236. <div v-show="showDel[n + 11]" class="not-print" style="width: 100%; text-align: center">
  237. <button circle @click="showSearch = true">
  238. <i class="el-icon-edit"></i>
  239. </button>
  240. <button circle @click="deleteDisdiag(n + 11)">
  241. <i class="el-icon-delete"></i>
  242. </button>
  243. <button circle @click="insertDisdiag(n + 11)">
  244. <i class="el-icon-upload"></i>
  245. </button>
  246. </div>
  247. </td>
  248. <td>
  249. <input style="border: none !important; width: 100px" v-model="patient.disdiagList[n + 11].code" readonly />
  250. </td>
  251. <td>
  252. <select style="border: none !important; width: 30px" v-model="patient.disdiagList[n + 11].admissStatus">
  253. <option v-for="(item, index) in dics.getDisAdmissStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  254. </select>
  255. </td>
  256. <td>
  257. <select style="border: none !important; width: 30px" v-model="patient.disdiagList[n + 11].dismissStatus" @change="handleSelectCybq">
  258. <option v-for="(item, index) in dics.getDisdiagStatus" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}&nbsp;&nbsp;</option>
  259. </select>
  260. </td>
  261. </tr>
  262. </table>
  263. </div>
  264. </div>
  265. <div style="border-bottom: 1px solid black; font-size: 12px">
  266. 备注:
  267. <span>入院病情:</span>1.有,2.临床未确定,3.情况不明,4.无 <span style="margin-left: 10px">出院病情:</span>1.治愈,2.好转,3.未愈,4.死亡,9.其他
  268. </div>
  269. <div>
  270. 损伤、中毒的外部原因:
  271. <input id="hurtReasonName" v-model="patient.hurtReasonName" style="width: 300px" @click="showSearchData('hurt')" />
  272. 疾病编码:
  273. <input id="hurtReasonCode" v-model="patient.hurtReasonCode" style="width: 110px" readonly />
  274. &nbsp;&nbsp;<el-button type="danger" circle icon="Delete" @click="clearLine('hurtReason')"></el-button>
  275. </div>
  276. <div>
  277. 病理诊断:
  278. <input id="pathologicDiagStr" v-model="patient.pathologicDiagStr" style="width: 300px" @click="showSearchData('pathologic')" />
  279. 病理编码:
  280. <input id="pathologicDiagCode" v-model="patient.pathologicDiagCode" style="width: 90px" readonly />
  281. 病理号: <input id="blh" v-model="patient.blh" style="width: 70px" />
  282. &nbsp;&nbsp;<el-button type="danger" circle icon="Delete" @click="clearLine('pathologicDiag')"></el-button>
  283. </div>
  284. <div>
  285. 药物过敏:
  286. <select id="allergy" v-model="patient.allergy" @change="onAllergyChanged">
  287. <option v-for="(item, index) in haveOrNot" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  288. </select>
  289. ,过敏药物:
  290. <input id="allergicMedicine" v-model="patient.allergicMedicine" style="width: 110px" />
  291. 死亡患者尸检:
  292. <select id="autopsy" v-model="patient.autopsy">
  293. <option v-for="(item, index) in autopsies" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  294. </select>
  295. </div>
  296. <div>
  297. 输血前四项: HbsAg
  298. <select id="hbsAg" v-model="patient.hbsAg">
  299. <option v-for="(item, index) in dics.getHbsag" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  300. </select>
  301. HCV-Ab
  302. <select id="hcvAb" v-model="patient.hcvAb" style="margin-left: 8px">
  303. <option v-for="(item, index) in dics.getHbsag" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  304. </select>
  305. HIV-Ab
  306. <select id="hivAb" v-model="patient.hivAb" style="margin-left: 8px">
  307. <option v-for="(item, index) in dics.getHbsag" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  308. </select>
  309. TP-Ab
  310. <select id="tpAb" v-model="patient.tpAb" style="margin-left: 8px">
  311. <option v-for="(item, index) in dics.getHbsag" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  312. </select>
  313. </div>
  314. <div>
  315. 血型:
  316. <select id="bloodType" v-model="patient.bloodType" @change="handleSelectBloodType">
  317. <option v-for="(item, index) in dics.getBloodType" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  318. </select>
  319. Rh:
  320. <select id="rh" v-model="patient.rh">
  321. <option v-for="(item, index) in dics.getHbsag" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  322. </select>
  323. </div>
  324. <div>
  325. 科室主任:
  326. <input id="deptLeaderName" style="width: 70px" v-model="patient.deptLeaderName" @click="showSearchData('deptleader')" />
  327. 主任(副主任)医师:
  328. <input id="leaderDoctorName" style="width: 70px" v-model="patient.leaderDoctorName" @click="showSearchData('leaderdoctor')" />
  329. 主治医师:
  330. <input id="mainDoctorName" style="width: 70px" v-model="patient.mainDoctorName" @click="showSearchData('maindoctor')" />
  331. 住院医师:
  332. <input id="admissDoctorName" style="width: 70px" v-model="patient.admissDoctorName" @click="showSearchData('admissdoctor')" />
  333. </div>
  334. <div>
  335. 责任护士:
  336. <input id="dutyNurseName" style="width: 70px" v-model="patient.dutyNurseName" @click="showSearchData('dutynurse')" />
  337. 进修医师:
  338. <input id="studyDoctorName" style="width: 70px" v-model="patient.studyDoctorName" @click="showSearchData('studydoctor')" />
  339. 实习医师:
  340. <input id="internshipDoctorName" style="width: 70px" v-model="patient.internshipDoctorName" @click="showSearchData('internshipdoctor')" />
  341. 编码员:
  342. <input style="width: 70px" v-model="patient.coderName" @click="showSearchData('coder')" />
  343. </div>
  344. <div>
  345. 病案质量:
  346. <select id="qualityControlLevel" v-model="patient.qualityControlLevel">
  347. <option v-for="(item, index) in dics.getQualityLevel" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  348. </select>
  349. 质控医师:
  350. <input id="qualityControlDoctorName" style="width: 70px" v-model="patient.qualityControlDoctorName" @click="showSearchData('qualitycontroldoctor')" />
  351. 质控护士:
  352. <input style="width: 70px" v-model="patient.qualityControlNurseName" @click="showSearchData('qualitycontrolnurse')" />
  353. 质控日期:
  354. <input id="qualityControlDate" style="width: 170px" type="date" v-model="patient.qualityControlDate" />
  355. </div>
  356. </div>
  357. <div id="page2" style="border: 1px solid black; padding: 5px">
  358. <table id="surgeryTable" style="border: 1px solid black; border-collapse: collapse; width: 100%">
  359. <tr>
  360. <th rowspan="2">手术及操作名称</th>
  361. <th rowspan="2" style="width: 70px">手术及操作日期</th>
  362. <th rowspan="2" style="width: 10px">手术级别</th>
  363. <th rowspan="2">手术及操作编码</th>
  364. <th colspan="3">手术及操作医师</th>
  365. <th rowspan="2" style="width: 30px">切口愈合等级</th>
  366. <th rowspan="2">麻醉方式</th>
  367. <th rowspan="2">麻醉医师</th>
  368. </tr>
  369. <tr>
  370. <th>术者</th>
  371. <th>I助</th>
  372. <th>II助</th>
  373. </tr>
  374. <tr v-for="n in 5" :key="n">
  375. <td style="padding: 3px">
  376. <textarea
  377. id="surgeryMain"
  378. style="border: none !important; width: 90px"
  379. rows="3"
  380. v-model="patient.surgeryList[n - 1].name"
  381. @click="onSearchSurgeryFocus(n - 1)"
  382. readonly
  383. ></textarea>
  384. <div v-show="showDel[n - 1]" class="not-print" style="width: 100%; text-align: center">
  385. <el-button type="primary" circle icon="Edit" @click="onEditSurgeryClick(n - 1)"></el-button>
  386. <el-button type="danger" circle icon="Delete" @click="deleteSurgery(n - 1)"></el-button>
  387. </div>
  388. </td>
  389. <td style="padding: 3px">
  390. <textarea
  391. style="border: none !important; width: 70px"
  392. v-model="patient.surgeryList[n - 1].date"
  393. rows="3"
  394. @click="showPickSurgeryDatetime(n - 1)"
  395. readonly
  396. ></textarea>
  397. </td>
  398. <td style="text-align-last: center">
  399. <select style="border: none !important; width: 30px" v-model="patient.surgeryList[n - 1].level">
  400. <option v-for="(item, index) in dics.getOperateScale" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.code }}</option>
  401. </select>
  402. </td>
  403. <td>
  404. <input v-model="patient.surgeryList[n - 1].code" style="border: none !important; width: 70px" readonly />
  405. </td>
  406. <td>
  407. <input style="border: none !important; width: 40px" v-model="patient.surgeryList[n - 1].operatorName" @click="showSearchSurgerior('operator', n)" />
  408. </td>
  409. <td style="width: 50px">
  410. <input style="border: none !important; width: 40px" v-model="patient.surgeryList[n - 1].assistantOneName" @click="showSearchSurgerior('assistantone', n)" />
  411. </td>
  412. <td style="width: 50px">
  413. <input style="border: none !important; width: 40px" v-model="patient.surgeryList[n - 1].assistantTwoName" @click="showSearchSurgerior('assistanttwo', n)" />
  414. </td>
  415. <td style="text-align-last: center">
  416. <select v-model="patient.surgeryList[n - 1].cutHeal" style="border: none !important">
  417. <option v-for="(item, index) in dics.getCutHealGrade" :key="index" :value="item.code">
  418. {{ item.code }}
  419. </option>
  420. </select>
  421. </td>
  422. <td>
  423. <select v-model="patient.surgeryList[n - 1].anaesthesia" style="border: none !important">
  424. <option v-for="(item, index) in dics.getAnaesthesia" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  425. </select>
  426. </td>
  427. <td>
  428. <input style="border: none !important; width: 40px" v-model="patient.surgeryList[n - 1].anaesthesiaorName" @click="showSearchSurgerior('anaesthesiaor', n)" />
  429. </td>
  430. </tr>
  431. </table>
  432. <div>
  433. 离院方式:
  434. <select id="zyDismissWay" v-model="patient.zyDismissWay" @change="onDismissWayChanged">
  435. <option v-for="(item, index) in dics.getZyDismissWay" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  436. </select>
  437. ,拟接收医疗机构名称:
  438. <input id="dismissDestination" v-model="patient.dismissDestination" style="width: 210px" />
  439. </div>
  440. <div>
  441. 是否有出院31天内再住院计划:
  442. <select id="admissAgainInOneMonth" v-model="patient.admissAgainInOneMonth" @change="onAdmissAgainChanged">
  443. <option v-for="(item, index) in haveOrNot" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  444. </select>
  445. ,目的:
  446. <input id="admissAgainPurpose" v-model="patient.admissAgainPurpose" style="width: 300px" />
  447. </div>
  448. <div>
  449. 颅脑损伤患者昏迷时间: 入院前<input id="comaDaysBeforeAdmiss" v-model="patient.comaDaysBeforeAdmiss" style="width: 30px" />天
  450. <input id="comaHoursBeforeAdmiss" v-model="patient.comaHoursBeforeAdmiss" style="width: 30px" />小时
  451. <input id="comaMinutesBeforeAdmiss" v-model="patient.comaMinutesBeforeAdmiss" style="width: 30px" />分钟 入院后<input
  452. v-model="patient.comaDaysAfterAdmiss"
  453. style="width: 30px"
  454. />天 <input id="comaHoursAfterAdmiss" v-model="patient.comaHoursAfterAdmiss" style="width: 30px" />小时
  455. <input id="comaMinutesAfterAdmiss" v-model="patient.comaMinutesAfterAdmiss" style="width: 30px" />分钟
  456. </div>
  457. <div>
  458. 住院费用(元): 总费用
  459. <input v-model="patient.totalCost" style="width: 110px" readonly />
  460. (自付金额:
  461. <input v-model="patient.selfPay" style="width: 110px" readonly />)
  462. </div>
  463. <div>
  464. 1.综合医疗服务类: (1)一般医疗服务费:
  465. <input v-model="patient.generalMedicalServiceFee" style="width: 70px" readonly />
  466. (2)一般治疗操作费:
  467. <input v-model="patient.generalTreatmentOperatingFee" style="width: 70px" readonly />
  468. (3)护理费:
  469. <input v-model="patient.careFee" style="width: 50px" readonly />
  470. </div>
  471. <div>
  472. (4)其他费:
  473. <input v-model="patient.elseFee" style="width: 70px" readonly />
  474. </div>
  475. <div>
  476. 2.诊断类: (5)病理诊断费:
  477. <input v-model="patient.pathologicDiagFee" style="width: 70px" readonly />
  478. (6)实验室诊断费:
  479. <input v-model="patient.experimentDiagFee" style="width: 70px" readonly />
  480. (7)影像学诊断费:
  481. <input v-model="patient.ctDiagFee" style="width: 70px" readonly />
  482. </div>
  483. <div>
  484. (8)临床诊断项目费:
  485. <input v-model="patient.clinicalDiagFee" style="width: 70px" readonly />
  486. </div>
  487. <div>
  488. 3.治疗类: (9)非手术治疗项目费:
  489. <input v-model="patient.notSurgicalFee" style="width: 70px" readonly />
  490. (临床物理治疗费:
  491. <input v-model="patient.clinicalPhysicalFee" style="width: 70px" readonly />)
  492. </div>
  493. <div>
  494. (10)手术治疗费:
  495. <input v-model="patient.surgicalFee" style="width: 70px" readonly />
  496. (麻醉费:
  497. <input v-model="patient.anesthetizeFee" style="width: 70px" readonly />
  498. &nbsp;&nbsp;手术费:
  499. <input v-model="patient.surgeryFee" style="width: 70px" readonly />)
  500. </div>
  501. <div>
  502. 4.康复类: (11)康复费:
  503. <input v-model="patient.recoverFee" style="width: 70px" readonly />
  504. </div>
  505. <div>
  506. 5.中医类: (12)中医治疗费:
  507. <input v-model="patient.tcmTreatmentFee" style="width: 70px" readonly />
  508. </div>
  509. <div>
  510. 6.西药类: (13)西药费:
  511. <input v-model="patient.westMedicineFee" style="width: 70px" readonly />
  512. </div>
  513. <div>
  514. 7.中药类: (14)中成药费:
  515. <input v-model="patient.chinesePatentMedicineFee" style="width: 70px" readonly />
  516. (15)中草药费:
  517. <input v-model="patient.chineseHerbalMedicineFee" style="width: 70px" readonly />
  518. </div>
  519. <div>
  520. 8.血液和血液制品类: (16)血费:
  521. <input v-model="patient.bloodFee" style="width: 50px" readonly />
  522. (17)白蛋白类制品费:
  523. <input v-model="patient.albuminProductsFee" style="width: 50px" readonly />
  524. (18)球蛋白类制品费:
  525. <input v-model="patient.globulinProductsFee" style="width: 50px" readonly />
  526. </div>
  527. <div>
  528. (19)凝血因子类制品费:
  529. <input v-model="patient.coagulationFactorProductsFee" style="width: 70px" readonly />
  530. (20)细胞因子类制品费:
  531. <input v-model="patient.cytokineProductsFee" style="width: 70px" readonly />
  532. </div>
  533. <div>
  534. 9.耗材类: (21)检查用一次性医用材料费:
  535. <input v-model="patient.costOfDisposableMedicalMaterialsForExamination" style="width: 70px" readonly />
  536. (22)治疗用一次性医用材料费:
  537. <input v-model="patient.costOfDisposableMedicalMaterialsForTreatment" style="width: 70px" readonly />
  538. </div>
  539. <div>
  540. (23)手术用一次性医用材料费:
  541. <input v-model="patient.costOfDisposableMedicalMaterialsForOperation" style="width: 70px" readonly />
  542. </div>
  543. <div>
  544. 10.其他类: (24)其他费:
  545. <input v-model="patient.otherFees" style="width: 70px" readonly />
  546. </div>
  547. <div>
  548. 主要诊断治愈好转情况:
  549. <span style="border-bottom: 1px solid black; padding: 0 5px">
  550. {{ filterDismissStatus(patient.disdiagList[0].dismissStatus) }}
  551. </span>
  552. </div>
  553. <div>
  554. 诊断符合情况: 门诊与出院
  555. <select id="diagConform1" v-model="patient.diagConform1" style="margin-right: 12px">
  556. <option v-for="(item, index) in dics.getDiagConform" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  557. </select>
  558. 入院与出院
  559. <select id="diagConform2" v-model="patient.diagConform2">
  560. <option v-for="(item, index) in dics.getDiagConform" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  561. </select>
  562. </div>
  563. <div>
  564. 术前与术后
  565. <select id="diagConform3" v-model="patient.diagConform3" style="margin-right: 12px">
  566. <option v-for="(item, index) in dics.getDiagConform" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  567. </select>
  568. 临床与病理
  569. <select id="diagConform4" v-model="patient.diagConform4" style="margin-right: 12px">
  570. <option v-for="(item, index) in dics.getDiagConform" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  571. </select>
  572. 放射与病理
  573. <select id="diagConform5" v-model="patient.diagConform5">
  574. <option v-for="(item, index) in dics.getDiagConform" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  575. </select>
  576. </div>
  577. <div>
  578. 抢救情况: 抢救
  579. <input id="rescueTimes" v-model="patient.rescueTimes" type="number" style="width: 90px" />次, 成功
  580. <input id="rescueSuccessTimes" v-model="patient.rescueSuccessTimes" type="number" style="width: 90px" />次
  581. </div>
  582. <div>
  583. 病例分型:
  584. <select id="caseClassification" v-model="patient.caseClassification" style="margin-right: 12px">
  585. <option v-for="(item, index) in dics.getCaseClassification" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  586. </select>
  587. 实施重症监护:
  588. <select id="hasIcu" v-model="patient.hasIcu" @change="handleSelectIcu">
  589. <option v-for="(item, index) in haveOrNot" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  590. </select>
  591. ,监护总时间:
  592. <input id="icuDays" v-model="patient.icuDays" style="width: 30px" />天 <input id="icuHours" v-model="patient.icuHours" style="width: 30px" />小时
  593. </div>
  594. <div>
  595. 单病种管理:
  596. <select id="monopathyManagement" v-model="patient.monopathyManagement" style="margin-right: 12px">
  597. <option v-for="(item, index) in yesOrNo" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  598. </select>
  599. 实施临床路径管理:
  600. <select id="clinicalPathwayManagement" v-model="patient.clinicalPathwayManagement" style="margin-right: 12px">
  601. <option v-for="(item, index) in dics.getClinicalPathwayManagement" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  602. </select>
  603. 实施DRGs管理:
  604. <select id="drgsManagement" v-model="patient.drgsManagement">
  605. <option v-for="(item, index) in dics.getDrgsManagement" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  606. </select>
  607. </div>
  608. <div>
  609. 抗生素使用:
  610. <select id="useAntibiotic" v-model="patient.useAntibiotic" style="margin-right: 12px">
  611. <option v-for="(item, index) in yesOrNo" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  612. </select>
  613. 细菌培养标本送检:
  614. <select id="bacilliculture" v-model="patient.bacilliculture" style="margin-right: 12px">
  615. <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
  616. <option value="2">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
  617. </select>
  618. 法定传染病:
  619. <select id="statutoryEpidemic" v-model="patient.statutoryEpidemic">
  620. <option v-for="(item, index) in dics.getStatutoryEpidemic" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  621. </select>
  622. </div>
  623. <div>
  624. 肿瘤分期: T
  625. <select id="tumorLevelT" v-model="patient.tumorLevelT" style="margin-right: 12px">
  626. <option v-for="(item, index) in dics.getTumorLevelT" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  627. </select>
  628. N
  629. <select id="tumorLevelN" v-model="patient.tumorLevelN" style="margin-right: 12px">
  630. <option v-for="(item, index) in dics.getTumorLevelN" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  631. </select>
  632. M
  633. <select id="tumorLevelM" v-model="patient.tumorLevelM" style="margin-right: 12px">
  634. <option v-for="(item, index) in dics.getTumorLevelM" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  635. </select>
  636. 分期
  637. <select id="tumorLevel" v-model="patient.tumorLevel" style="margin-right: 18px">
  638. <option v-for="(item, index) in dics.getTumorLevel" :key="index" :value="item.code">&nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;</option>
  639. </select>
  640. 新生儿Apgar评分: <input style="margin-right: 0; width: 50px" v-model="patient.xxeApgar" />分
  641. </div>
  642. </div>
  643. </div>
  644. <span class="m-drawer">
  645. <el-drawer v-model="showMessageDrawer" title="首页保存/打印校验结果" size="260px" modal-class="modal-class">
  646. <div class="page-inner">
  647. <div v-if="forceVerifies.length === 0 && adviceVerifies.length === 0" class="no-verify-message">暂无校验内容</div>
  648. <div v-show="forceVerifies.length > 0" style="padding: 8px 0 4px 0; font-weight: bold">以下条目为强制要求,请完善。</div>
  649. <div v-for="(item, index) in forceVerifies" :key="index" class="message-item" :style="messageColor(index)" @click="handleClickMessage(item.code, index)">
  650. {{ index + 1 }}、{{ item.name }}
  651. </div>
  652. <div v-show="adviceVerifies.length > 0" style="padding: 8px 0 4px 0; font-weight: bold">以下条目为建议执行,不做强制要求。</div>
  653. <div v-for="(item, index) in adviceVerifies" :key="index" style="padding: 6px; margin-bottom: 6px; border-radius: 4px; background: #eea7a752; color: #ff2b2b">
  654. {{ index + 1 }}、{{ item.name }}
  655. </div>
  656. </div>
  657. </el-drawer>
  658. </span>
  659. <div class="rightside-btn" @click="showMessageDrawer = !showMessageDrawer">首页保存 / 打印校验结果</div>
  660. </div>
  661. <div id="headpage" style="opacity: 0; position: fixed">
  662. <HeadPage :patient="patient" :dics="dics" />
  663. </div>
  664. <div id="tailpage" style="opacity: 0; position: fixed">
  665. <TailPage :patient="patient" :dics="dics" />
  666. </div>
  667. <el-dialog v-model="showSelectDateRange" title="出院日期" width="320px" draggable>
  668. <div style="height: 20px"></div>
  669. 请选择出院日期范围:
  670. <div style="height: 10px"></div>
  671. <el-date-picker
  672. v-model="dateRange"
  673. type="daterange"
  674. range-separator="至"
  675. start-placeholder="开始日期"
  676. end-placeholder="结束日期"
  677. :shortcuts="shortcuts"
  678. style="width: 260px"
  679. ></el-date-picker>
  680. <div style="margin: 20px 0 10px 0; width: 100%; text-align: right">
  681. <el-button type="primary" icon="Check" @click="confirmDateRange">确定</el-button>
  682. </div>
  683. </el-dialog>
  684. <el-dialog v-model="showYbDiag" title="医保出院诊断" width="70%" top="30px" draggable>
  685. <div style="width: 100%; height: 30px; line-height: 30px; background: rgb(252, 160, 23); margin-bottom: 8px; border-radius: 8px; padding-left: 8px; color: white">
  686. <strong>主要诊断病种分值:{{ diseFamilyGrade }}</strong>
  687. </div>
  688. <el-tag type="info">医保诊断录入</el-tag>
  689. <el-tag style="margin-left: 12px">患者:{{ patient.name }}</el-tag>
  690. <el-tag style="margin-left: 8px">医疗类别:{{ patient.medTypeName }}</el-tag>
  691. <el-tag style="margin-left: 8px">险种类型:{{ patient.insutype }}</el-tag>
  692. <div style="height: 5px"></div>
  693. <el-input placeholder="在此搜索诊断" style="width: 160px" v-model="ybDiag.name" @click="showSearchData('ybDiag')"></el-input>
  694. <el-input placeholder="诊断编码" disabled style="width: 100px" v-model="ybDiag.code"></el-input>
  695. <el-select v-model="ybDiag.siDiagType" style="width: 100px" placeholder="诊断类别">
  696. <el-option v-for="item in diagTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
  697. </el-select>
  698. <el-select v-model="ybDiag.admissCond" style="width: 100px" placeholder="入院病情">
  699. <el-option v-for="item in admissConds" :key="item.code" :value="item.code" :label="item.name"></el-option>
  700. </el-select>
  701. <el-select v-model="ybDiag.cyzg" style="width: 120px" placeholder="出院转归">
  702. <el-option v-for="item in cyzgs" :key="item.code" :value="item.code" :label="item.name"></el-option>
  703. </el-select>
  704. <el-divider direction="vertical"></el-divider>
  705. <el-button type="primary" icon="Plus" @click="addToYbDiags">添加</el-button>
  706. <el-button type="success" icon="Upload" @click="saveYbDiags">保存</el-button>
  707. <el-table :data="ybDiags" stripe :height="200">
  708. <el-table-column type="index" label="序号" width="45"></el-table-column>
  709. <el-table-column prop="code" label="诊断编码"></el-table-column>
  710. <el-table-column prop="name" label="诊断名称"></el-table-column>
  711. <el-table-column prop="siDiagType" label="诊断类别" width="80"></el-table-column>
  712. <el-table-column prop="admissCond" label="入院病情" width="80"></el-table-column>
  713. <el-table-column prop="cyzg" label="出院转归" width="80"></el-table-column>
  714. <el-table-column prop="operId" label="录入人" width="70"></el-table-column>
  715. <el-table-column prop="opDate" label="录入日期"></el-table-column>
  716. <el-table-column label="操作">
  717. <template #default="scope">
  718. <el-button type="danger" icon="Delete" @click="deleteYbDiag(scope.$index)">删除</el-button>
  719. </template>
  720. </el-table-column>
  721. </el-table>
  722. <div style="height: 12px"></div>
  723. <el-tag type="info">病案首页诊断信息</el-tag>
  724. <el-table :data="filterDisDiagList" stripe :height="200">
  725. <el-table-column type="index" label="序号" width="45"></el-table-column>
  726. <el-table-column prop="code" label="诊断编码"></el-table-column>
  727. <el-table-column prop="name" label="诊断名称"></el-table-column>
  728. <el-table-column label="出院病情">
  729. <template #default="scope">
  730. {{ filterDismissStatus(scope.row.dismissStatus) }}
  731. </template>
  732. </el-table-column>
  733. <el-table-column label="操作">
  734. <template #default="scope">
  735. <el-button icon="Link" title="添加到医保诊断" circle @click="syncronizeWithSiDiagnose(scope.row.code)"></el-button>
  736. </template>
  737. </el-table-column>
  738. </el-table>
  739. </el-dialog>
  740. <el-dialog v-model="showSearch" title="数据搜索" width="730px" draggable>
  741. 检索依据:
  742. <el-select v-model="searchMethod" style="width: 100px">
  743. <el-option v-for="item in searchMethods" :key="item.code" :label="item.name" :value="item.code"></el-option>
  744. </el-select>
  745. &nbsp;&nbsp;&nbsp;&nbsp; 搜索内容:
  746. <el-input ref="searchInput" v-model="searchContent" prefix-icon="Search" placeholder="请输入搜索内容" style="width: 160px" clearable @input="executeSearch"></el-input>
  747. <div v-if="showSurgeryRecommand" style="padding: 12px 0 4px 4px; color: gray">
  748. 根据患者主诊断
  749. <el-tag
  750. >{{ patient.disdiagList[0].code }} <span style="color: blue">{{ patient.disdiagList[0].name }}</span>
  751. </el-tag>
  752. ,推荐以下手术操作:
  753. </div>
  754. <el-table :data="searchResults" height="400" stripe highlight-current-row @row-click="handleSelectSearch">
  755. <el-table-column prop="code" label="编码" width="130"></el-table-column>
  756. <el-table-column prop="name" label="名称"></el-table-column>
  757. <el-table-column v-if="searchUrl === 'employee'" prop="deptName" label="科室"></el-table-column>
  758. <el-table-column v-if="searchUrl === 'employee'" prop="ybCode" label="医保赋码"></el-table-column>
  759. <el-table-column v-if="showSurgeryRecommand" prop="ssfz" label="手术分值" width="60"></el-table-column>
  760. </el-table>
  761. <div style="margin-top: 15px; width: 100%; text-align: right">
  762. <el-button type="primary" icon="ArrowLeft" @click="lastPage" :disabled="showSurgeryRecommand || currentSRPage === 1">上一页 </el-button>
  763. <el-button type="primary" icon="ArrowRight" @click="nextPage" :disabled="showSurgeryRecommand || (currentSRPage > 1 && searchResults.length < 10)">下一页 </el-button>
  764. </div>
  765. </el-dialog>
  766. <el-dialog v-model="showSurgeryDatetime" title="请选择手术时间" width="330px" draggable>
  767. <div style="height: 12px"></div>
  768. <el-date-picker v-model="surgeryDatetime" type="datetime" placeholder="手术开始时间"></el-date-picker>
  769. <div style="height: 12px"></div>
  770. <el-date-picker v-model="opEndDate" type="datetime" placeholder="手术结束时间"></el-date-picker>
  771. <div style="margin: 12px 0 8px 0; font-size: 14px; color: red">
  772. 提示:有麻醉(局麻除外)的患者需要填写麻醉时间,否则最终校验无法通过!
  773. </div>
  774. <el-date-picker v-model="anstStartDate" type="datetime" placeholder="麻醉开始时间"></el-date-picker>
  775. <div style="height: 12px"></div>
  776. <el-date-picker v-model="anstEndDate" type="datetime" placeholder="麻醉结束时间"></el-date-picker>
  777. <template #footer>
  778. <div>
  779. <el-button type="primary" icon="Success" @click="confirmSurgeryDatetime">确定</el-button>
  780. </div>
  781. </template>
  782. </el-dialog>
  783. </template>
  784. </page-layer>
  785. </template>
  786. <script setup name="FillCaseFrontSheet">
  787. import { yesOrNo, haveOrNot, searchMethods, autopsies, initShowDel, filterDismissStatus, clone } from './common'
  788. import store from '@/store'
  789. import { operations } from '@/data'
  790. import { initLodop, getLodop } from '@/utils/c-lodop'
  791. import {
  792. doSaveYbDiags,
  793. executePrintVerify,
  794. executeSaveVerify,
  795. fetchOutPatients,
  796. fetchSsfz,
  797. getAllDictionary,
  798. getPatientOverview,
  799. getSheetInfo,
  800. getUserWards,
  801. getYbDiags,
  802. sheetSearch,
  803. getSsfzSurgeriesByIcd,
  804. increaseDiagWeight,
  805. selectSiDiagByBaDiag,
  806. frontsheetQualityCheck,
  807. isMedinsSetl,
  808. } from '@/api/case-front-sheet'
  809. import maleIcon from '@/assets/male-icon.png'
  810. import femaleIcon from '@/assets/female-icon.png'
  811. import { ElMessage, ElNotification } from 'element-plus'
  812. import { shortcuts } from '@/data/shortcuts'
  813. import { formatDate, formatDatetime, getDatetime, getOneMonthOffset } from '@/utils/date'
  814. import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPage.vue'
  815. import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue'
  816. import router from '@/router/index'
  817. import Sleep from '@/utils/sleep'
  818. import { smoothScrollTableColumn } from '@/utils/el-table-scroll'
  819. import { regions } from '@/data/region'
  820. import PageLayer from "@/layout/PageLayer";
  821. const userWards = ref([])
  822. const currentWard = ref('')
  823. const inOutStatus = ref(1)
  824. const inOutOptions = initInOutOptions()
  825. const inpatientNo = ref('')
  826. const windowSize = store.state.app.windowSize
  827. const tableHeight = windowSize.h - 45
  828. const overview = ref([])
  829. const patient = ref({
  830. disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
  831. surgeryList: [{}, {}, {}, {}, {}],
  832. })
  833. const mainInfo = {
  834. height: windowSize.h - 45 + 'px',
  835. width: '753px',
  836. overflowX: 'hidden',
  837. padding: '0 20px',
  838. overflowY: 'scroll',
  839. }
  840. const dics = ref({})
  841. const showGoSearchBtn1 = ref(false)
  842. const showGoSearchBtn2 = ref(false)
  843. const showDel = initShowDel()
  844. const asideTable = ref(null)
  845. const filterDisDiagList = computed(() => {
  846. return patient.value.disdiagList.filter(item => {
  847. return item.code && item.name
  848. })
  849. })
  850. const searchPatient = () => {
  851. if (!inpatientNo.value || inpatientNo.value.trim().length < 1) {
  852. ElMessage({
  853. message: '请输入要搜索的住院号',
  854. type: 'warning',
  855. duration: 2500,
  856. showClose: true,
  857. })
  858. return
  859. }
  860. const patientIndex = overview.value.findIndex((item) => {
  861. return item.bah === inpatientNo.value.trim()
  862. })
  863. if (patientIndex === -1) {
  864. ElMessage({
  865. message: '未找到住院号【' + inpatientNo.value.trim() + '】的患者信息',
  866. type: 'warning',
  867. duration: 2500,
  868. showClose: true,
  869. })
  870. } else {
  871. const currentPatient = overview.value[patientIndex]
  872. fetchSheetInfo(currentPatient)
  873. smoothScrollTableColumn(asideTable.value, patientIndex, currentPatient)
  874. }
  875. }
  876. const handleWardChange = () => {
  877. if (inOutStatus.value === 1) {
  878. fetchOverview()
  879. } else {
  880. confirmDateRange()
  881. }
  882. }
  883. const dateRange = ref([])
  884. const showSelectDateRange = ref(false)
  885. const changeInOutStatus = () => {
  886. if (inOutStatus.value === 1) {
  887. fetchOverview()
  888. } else {
  889. if (!dateRange.value || dateRange.value.length < 2) {
  890. const oneMonth = getOneMonthOffset()
  891. dateRange.value[0] = oneMonth.start
  892. dateRange.value[1] = oneMonth.end
  893. }
  894. showSelectDateRange.value = true
  895. }
  896. }
  897. const confirmDateRange = () => {
  898. if (!dateRange.value || dateRange.value.length < 2) {
  899. ElMessage({
  900. message: '请选择时间范围',
  901. type: 'warning',
  902. duration: 2500,
  903. showClose: true,
  904. })
  905. return
  906. }
  907. const param = {
  908. ward: currentWard.value,
  909. start: formatDate(dateRange.value[0]),
  910. end: formatDate(dateRange.value[1]),
  911. }
  912. fetchOutPatients(param).then((res) => {
  913. overview.value = res
  914. showSelectDateRange.value = false
  915. })
  916. }
  917. const fetchOverview = () => {
  918. getPatientOverview(currentWard.value).then((res) => {
  919. overview.value = res
  920. })
  921. }
  922. const fetchSheetInfo = (row) => {
  923. if (row.bah !== patient.value.bah || row.times !== patient.value.admissTimes) {
  924. forceVerifies.value = []
  925. adviceVerifies.value = []
  926. }
  927. row.inOutFlag = inOutStatus.value
  928. getSheetInfo(row).then((res) => {
  929. patient.value = res
  930. patient.value.bedNo = row.bedNo
  931. patient.value.sex = row.sex
  932. beforePrintSet.value = false
  933. })
  934. }
  935. const currentSRPage = ref(1)
  936. const showSearch = ref(false)
  937. const insertDiag = ref(false)
  938. watchEffect(() => {
  939. if (showSearch.value) {
  940. searchResults.value = []
  941. setTimeout(() => {
  942. showDel.value = initShowDel()
  943. searchInput.value.focus()
  944. }, 300)
  945. } else {
  946. insertDiag.value = false
  947. }
  948. })
  949. const searchInput = ref(null)
  950. const searchUrl = ref('')
  951. const searchTargetCode = ref('')
  952. const searchTargetName = ref('')
  953. const searchContent = ref('')
  954. const lastPage = () => {
  955. currentSRPage.value--
  956. fetchSearchData()
  957. }
  958. const nextPage = () => {
  959. currentSRPage.value++
  960. fetchSearchData()
  961. }
  962. const fetchSearchData = () => {
  963. const param = {
  964. patNo: patient.value.bah,
  965. times: patient.value.admissTimes,
  966. method: searchMethod.value,
  967. target: searchUrl.value,
  968. content: searchContent.value,
  969. medType: patient.value.medType,
  970. page: currentSRPage.value,
  971. }
  972. sheetSearch(param).then((res) => {
  973. searchResults.value = res
  974. })
  975. }
  976. const executeSearch = () => {
  977. showSurgeryRecommand = false
  978. if (mainSurgeryFocused && searchContent.value === '' && patient.value.disdiagList[0].code) {
  979. getSsfzSurgeriesByIcd(patient.value.bah, patient.value.admissTimes, patient.value.disdiagList[0].code).then((res) => {
  980. searchResults.value = res
  981. showSurgeryRecommand = true
  982. })
  983. return
  984. }
  985. if (searchContent.value.length < 2) return
  986. currentSRPage.value = 1
  987. fetchSearchData()
  988. }
  989. const showYbDiag = ref(false)
  990. const openYbDiag = () => {
  991. if (nullPatient()) {
  992. return
  993. }
  994. if (!patient.value.medType) {
  995. ElMessage({
  996. message: '自费病人无需填写医保诊断',
  997. type: 'warning',
  998. duration: 2500,
  999. showClose: true,
  1000. })
  1001. return
  1002. }
  1003. getYbDiags(patient.value.bah, patient.value.admissTimes).then((res) => {
  1004. ybDiags.value = res
  1005. showYbDiag.value = true
  1006. })
  1007. }
  1008. const searchMethod = ref('alpha')
  1009. const searchResults = ref([])
  1010. const showSearchData = (flag) => {
  1011. mainSurgeryFocused = false
  1012. showSurgeryRecommand = false
  1013. searchUrl.value = 'place'
  1014. if (flag === 'birth') {
  1015. searchTargetCode.value = 'birthPlace'
  1016. searchTargetName.value = 'birthPlaceName'
  1017. } else if (flag === 'native') {
  1018. searchTargetCode.value = 'nativePlace'
  1019. searchTargetName.value = 'nativePlaceName'
  1020. } else if (flag === 'hk') {
  1021. searchTargetCode.value = 'hkPlace'
  1022. searchTargetName.value = 'hkPlaceName'
  1023. } else if (flag === 'contact') {
  1024. searchTargetCode.value = 'contactAddr'
  1025. searchTargetName.value = 'contactAddrName'
  1026. } else if (flag === 'hurt') {
  1027. searchUrl.value = 'hurtReason'
  1028. searchTargetCode.value = 'hurtReasonCode'
  1029. searchTargetName.value = 'hurtReasonName'
  1030. } else if (flag === 'pathologic') {
  1031. searchUrl.value = 'pathologicDiag'
  1032. searchTargetCode.value = 'pathologicDiagCode'
  1033. searchTargetName.value = 'pathologicDiagStr'
  1034. } else if (flag === 'deptleader') {
  1035. searchUrl.value = 'employee'
  1036. searchTargetCode.value = 'deptLeader'
  1037. searchTargetName.value = 'deptLeaderName'
  1038. } else if (flag === 'leaderdoctor') {
  1039. searchUrl.value = 'employee'
  1040. searchTargetCode.value = 'leaderDoctor'
  1041. searchTargetName.value = 'leaderDoctorName'
  1042. } else if (flag === 'maindoctor') {
  1043. searchUrl.value = 'employee'
  1044. searchTargetCode.value = 'mainDoctor'
  1045. searchTargetName.value = 'mainDoctorName'
  1046. } else if (flag === 'admissdoctor') {
  1047. searchUrl.value = 'employee'
  1048. searchTargetCode.value = 'admissDoctor'
  1049. searchTargetName.value = 'admissDoctorName'
  1050. } else if (flag === 'dutynurse') {
  1051. searchUrl.value = 'employee'
  1052. searchTargetCode.value = 'dutyNurse'
  1053. searchTargetName.value = 'dutyNurseName'
  1054. } else if (flag === 'studydoctor') {
  1055. searchUrl.value = 'employee'
  1056. searchTargetCode.value = 'studyDoctor'
  1057. searchTargetName.value = 'studyDoctorName'
  1058. } else if (flag === 'internshipdoctor') {
  1059. searchUrl.value = 'employee'
  1060. searchTargetCode.value = 'internshipDoctor'
  1061. searchTargetName.value = 'internshipDoctorName'
  1062. } else if (flag === 'coder') {
  1063. searchUrl.value = 'employee'
  1064. searchTargetCode.value = 'coder'
  1065. searchTargetName.value = 'coderName'
  1066. } else if (flag === 'qualitycontroldoctor') {
  1067. searchUrl.value = 'employee'
  1068. searchTargetCode.value = 'qualityControlDoctor'
  1069. searchTargetName.value = 'qualityControlDoctorName'
  1070. } else if (flag === 'qualitycontrolnurse') {
  1071. searchUrl.value = 'employee'
  1072. searchTargetCode.value = 'qualityControlNurse'
  1073. searchTargetName.value = 'qualityControlNurseName'
  1074. } else if (flag === 'ybDiag') {
  1075. searchUrl.value = 'diag'
  1076. searchTargetCode.value = 'ybDiagCode'
  1077. } else if (flag === 'clinicdiag') {
  1078. searchUrl.value = 'clinicdiag'
  1079. searchTargetCode.value = 'clinicDiagCode'
  1080. searchTargetName.value = 'clinicDiagStr'
  1081. }
  1082. showSearch.value = true
  1083. }
  1084. const showSurgeryDatetime = ref(false)
  1085. const surgeryDatetime = ref(null)
  1086. const opEndDate = ref(null)
  1087. const anstStartDate = ref(null)
  1088. const anstEndDate = ref(null)
  1089. const currentSurgeryDatetimeIndex = ref(null)
  1090. const showPickSurgeryDatetime = (index) => {
  1091. currentSurgeryDatetimeIndex.value = index
  1092. let surgery = patient.value.surgeryList[index]
  1093. surgeryDatetime.value = surgery.date
  1094. opEndDate.value = surgery.opEndDate
  1095. anstStartDate.value = surgery.anstStartDate
  1096. anstEndDate.value = surgery.anstEndDate
  1097. showSurgeryDatetime.value = true
  1098. }
  1099. const confirmSurgeryDatetime = () => {
  1100. if (!surgeryDatetime.value) {
  1101. ElMessage({
  1102. message: '手术开始时间不能为空!',
  1103. type: 'warning',
  1104. duration: 2500,
  1105. showClose: true,
  1106. })
  1107. return
  1108. }
  1109. if (!opEndDate.value) {
  1110. ElMessage({
  1111. message: '手术结束时间不能为空!',
  1112. type: 'warning',
  1113. duration: 2500,
  1114. showClose: true,
  1115. })
  1116. return
  1117. }
  1118. patient.value.surgeryList[currentSurgeryDatetimeIndex.value].date = formatDatetime(surgeryDatetime.value)
  1119. patient.value.surgeryList[currentSurgeryDatetimeIndex.value].opEndDate = formatDatetime(opEndDate.value)
  1120. patient.value.surgeryList[currentSurgeryDatetimeIndex.value].anstStartDate = formatDatetime(anstStartDate.value)
  1121. patient.value.surgeryList[currentSurgeryDatetimeIndex.value].anstEndDate = formatDatetime(anstEndDate.value)
  1122. showSurgeryDatetime.value = false
  1123. }
  1124. const showSearchSurgerior = (flag, index) => {
  1125. mainSurgeryFocused = false
  1126. showSurgeryRecommand = false
  1127. if (flag === 'operator') {
  1128. searchTargetCode.value = 'surgeryOperatorCode' + (index - 1)
  1129. searchTargetName.value = 'surgeryOperatorName' + (index - 1)
  1130. } else if (flag === 'assistantone') {
  1131. searchTargetCode.value = 'surgeryAssistantOneCode' + (index - 1)
  1132. searchTargetName.value = 'surgeryAssistantOneName' + (index - 1)
  1133. } else if (flag === 'assistanttwo') {
  1134. searchTargetCode.value = 'surgeryAssistantTwoCode' + (index - 1)
  1135. searchTargetName.value = 'surgeryAssistantTwoName' + (index - 1)
  1136. } else {
  1137. searchTargetCode.value = 'surgeryAnaesthesiaorCode' + (index - 1)
  1138. searchTargetName.value = 'surgeryAnaesthesiaorName' + (index - 1)
  1139. }
  1140. searchUrl.value = 'employee'
  1141. showSearch.value = true
  1142. }
  1143. const diseFamilyGrade = ref(null)
  1144. const ybDiag = reactive({})
  1145. const cyzgs = initCyzgs()
  1146. const admissConds = initAdmissConds()
  1147. const diagTypes = initDiagTypes()
  1148. const handleSelectSearch = (item) => {
  1149. if (searchTargetCode.value.startsWith('surgery')) {
  1150. let no = searchTargetCode.value.charAt(searchTargetCode.value.length - 1)
  1151. switch (searchTargetCode.value.substr(0, searchTargetCode.value.length - 1)) {
  1152. case 'surgeryCode':
  1153. if (no > 0 && no < 5) {
  1154. patient.value.surgeryList[no] = clone(patient.value.surgeryList[no - 1])
  1155. }
  1156. patient.value.surgeryList[no].name = item.name
  1157. patient.value.surgeryList[no].code = item.code
  1158. patient.value.surgeryList[no].no = no
  1159. break
  1160. case 'surgeryOperatorCode':
  1161. patient.value.surgeryList[no].operator = item.code
  1162. patient.value.surgeryList[no].operatorName = item.name
  1163. break
  1164. case 'surgeryAssistantOneCode':
  1165. patient.value.surgeryList[no].assistantOne = item.code
  1166. patient.value.surgeryList[no].assistantOneName = item.name
  1167. break
  1168. case 'surgeryAssistantTwoCode':
  1169. patient.value.surgeryList[no].assistantTwo = item.code
  1170. patient.value.surgeryList[no].assistantTwoName = item.name
  1171. break
  1172. case 'surgeryAnaesthesiaorCode':
  1173. patient.value.surgeryList[no].anaesthesiaor = item.code
  1174. patient.value.surgeryList[no].anaesthesiaorName = item.name
  1175. break
  1176. }
  1177. } else if (searchTargetCode.value.startsWith('disdiags')) {
  1178. let no = Number(searchTargetCode.value.replace('disdiagsCode', ''))
  1179. if (insertDiag.value) {
  1180. for (let i = 26; i > no; i--) {
  1181. patient.value.disdiagList[i] = clone(patient.value.disdiagList[i - 1])
  1182. }
  1183. patient.value.disdiagList.splice(27)
  1184. insertDiag.value = false
  1185. }
  1186. patient.value.disdiagList[no].code = item.code
  1187. patient.value.disdiagList[no].name = item.name
  1188. patient.value.disdiagList[no].no = no
  1189. patient.value.disdiagList[no].admissStatus = patient.value.disdiagList[no].dismissStatus = '1'
  1190. patient.value.disdiagList[no].opIdCode = store.state.user.info.code
  1191. increaseDiagWeight(item.code)
  1192. } else if (searchTargetCode.value === 'ybDiagCode') {
  1193. ybDiag.code = item.code
  1194. ybDiag.name = item.name
  1195. ybDiag.cyzg = 0
  1196. ybDiag.siDiagType = 1
  1197. if (!ybDiags.value || ybDiags.value.length === 0) {
  1198. fetchSsfz(item.code, patient.value.bah, patient.value.admissTimes).then((res) => {
  1199. diseFamilyGrade.value = res
  1200. })
  1201. }
  1202. } else if (searchTargetCode.value === 'clinicDiagCode') {
  1203. patient.value.clinicDiagCode = item.code
  1204. patient.value.clinicDiagStr = item.name
  1205. } else {
  1206. patient.value[searchTargetCode.value] = item.code
  1207. patient.value[searchTargetName.value] = item.name
  1208. if (searchTargetCode.value === 'birthPlace') {
  1209. patient.value.nativePlace = item.code
  1210. patient.value.nativePlaceName = item.name
  1211. }
  1212. }
  1213. searchContent.value = ''
  1214. showSearch.value = false
  1215. }
  1216. const syncronizeWithSiDiagnose = (code) => {
  1217. selectSiDiagByBaDiag(code).then(res => {
  1218. ybDiag.code = res.code
  1219. ybDiag.name = res.name
  1220. ybDiag.cyzg = 0
  1221. ybDiag.siDiagType = 1
  1222. if (!ybDiags.value || ybDiags.value.length === 0) {
  1223. fetchSsfz(res.code, patient.value.bah, patient.value.admissTimes).then((res2) => {
  1224. diseFamilyGrade.value = res2
  1225. })
  1226. }
  1227. })
  1228. }
  1229. const clearLine = (option) => {
  1230. switch (option) {
  1231. case 'hurtReason':
  1232. patient.value.hurtReasonName = null
  1233. patient.value.hurtReasonCode = null
  1234. break;
  1235. case 'pathologicDiag':
  1236. patient.value.pathologicDiagStr = null
  1237. patient.value.pathologicDiagCode = null
  1238. patient.value.blh = null
  1239. break;
  1240. }
  1241. }
  1242. const ybDiags = ref([])
  1243. const addToYbDiags = () => {
  1244. if (!ybDiag.siDiagType) {
  1245. ElMessage({
  1246. message: '请选择诊断类别!',
  1247. type: 'warning',
  1248. duration: 2500,
  1249. showClose: true,
  1250. })
  1251. return
  1252. }
  1253. if (!ybDiag.admissCond) {
  1254. ElMessage({
  1255. message: '请选择入院病情!',
  1256. type: 'warning',
  1257. duration: 2500,
  1258. showClose: true,
  1259. })
  1260. return
  1261. }
  1262. const temp = clone(ybDiag)
  1263. temp.diagType = 13
  1264. temp.operId = store.state.user.info.code
  1265. temp.opDate = getDatetime()
  1266. temp.bzfx = '普通'
  1267. ybDiags.value.push(temp)
  1268. ybDiag.code = ybDiag.name = ybDiag.cyzg = ''
  1269. }
  1270. const deleteYbDiag = (index) => {
  1271. ybDiags.value.splice(index, 1)
  1272. }
  1273. const saveYbDiags = () => {
  1274. const param = {
  1275. bah: patient.value.bah,
  1276. times: patient.value.admissTimes,
  1277. ybDiags: ybDiags.value,
  1278. }
  1279. doSaveYbDiags(param).then(() => {
  1280. ElMessage({
  1281. message: '保存成功',
  1282. type: 'success',
  1283. duration: 2500,
  1284. showClose: true,
  1285. })
  1286. })
  1287. }
  1288. const onSearchDiagFocus = (n) => {
  1289. mainSurgeryFocused = false
  1290. showSurgeryRecommand = false
  1291. if (n > 0 && !patient.value.disdiagList[n - 1].code) {
  1292. ElMessage({
  1293. message: '请按顺序填写',
  1294. type: 'warning',
  1295. duration: 2500,
  1296. showClose: true,
  1297. })
  1298. return
  1299. }
  1300. searchUrl.value = 'normalDiag'
  1301. searchTargetCode.value = 'disdiagsCode' + n
  1302. searchTargetName.value = 'disdiagsName' + n
  1303. if (!patient.value.disdiagList[n].code) {
  1304. showSearch.value = true
  1305. } else {
  1306. showDel.value[n] = true
  1307. }
  1308. }
  1309. let showSurgeryRecommand = $ref(false)
  1310. let mainSurgeryFocused = $ref(false)
  1311. const onSearchSurgeryFocus = (n) => {
  1312. if (n > 0 && !patient.value.surgeryList[n - 1].code) {
  1313. ElMessage({
  1314. message: '请按顺序填写',
  1315. type: 'warning',
  1316. duration: 2500,
  1317. showClose: true,
  1318. })
  1319. return
  1320. }
  1321. mainSurgeryFocused = false
  1322. showSurgeryRecommand = false
  1323. searchUrl.value = 'surgery'
  1324. searchTargetCode.value = 'surgeryCode' + n
  1325. searchTargetName.value = 'surgeryName' + n
  1326. if (!patient.value.surgeryList[n].code) {
  1327. if (n === 0 && patient.value.disdiagList[0].code) {
  1328. mainSurgeryFocused = true
  1329. getSsfzSurgeriesByIcd(patient.value.bah, patient.value.admissTimes, patient.value.disdiagList[0].code).then((res) => {
  1330. searchResults.value = res
  1331. showSurgeryRecommand = true
  1332. })
  1333. }
  1334. showSearch.value = true
  1335. } else {
  1336. showDel.value[n] = true
  1337. }
  1338. }
  1339. const onEditSurgeryClick = (n) => {
  1340. showSearch.value = true
  1341. if (n === 0 && patient.value.disdiagList[0].code) {
  1342. mainSurgeryFocused = true
  1343. getSsfzSurgeriesByIcd(patient.value.bah, patient.value.admissTimes, patient.value.disdiagList[0].code).then((res) => {
  1344. searchResults.value = res
  1345. showSurgeryRecommand = true
  1346. })
  1347. } else {
  1348. mainSurgeryFocused = false
  1349. showSurgeryRecommand = false
  1350. }
  1351. }
  1352. const hasSurgeryChanged = (val) => {
  1353. if (val === '0') {
  1354. patient.value.diagConform3 = 0
  1355. }
  1356. }
  1357. const deleteDisdiag = (index) => {
  1358. showDel.value[index] = false
  1359. while (index < 26) {
  1360. patient.value.disdiagList[index] = patient.value.disdiagList[index + 1]
  1361. index++
  1362. }
  1363. patient.value.disdiagList[26] = {}
  1364. patient.value.disdiagList.splice(27)
  1365. }
  1366. const insertDisdiag = (index) => {
  1367. mainSurgeryFocused = false
  1368. showSurgeryRecommand = false
  1369. insertDiag.value = true
  1370. searchUrl.value = 'normalDiag'
  1371. searchTargetCode.value = 'disdiagsCode' + index
  1372. searchTargetName.value = 'disdiagsName' + index
  1373. showSearch.value = true
  1374. }
  1375. const deleteSurgery = (index) => {
  1376. showDel.value[index] = false
  1377. while (index < 4) {
  1378. patient.value.surgeryList[index] = patient.value.surgeryList[index + 1]
  1379. index++
  1380. }
  1381. patient.value.surgeryList[4] = {}
  1382. patient.value.surgeryList.splice(5)
  1383. }
  1384. const beforePrintSet = ref(false)
  1385. const nullPatient = () => {
  1386. if (!patient.value.bah) {
  1387. ElMessage({
  1388. message: '请先选择患者!',
  1389. type: 'warning',
  1390. duration: 2500,
  1391. showClose: true,
  1392. })
  1393. return true
  1394. }
  1395. return false
  1396. }
  1397. const forceVerifies = ref([])
  1398. const adviceVerifies = ref([])
  1399. const currentMessageIndex = ref(null)
  1400. const messageColor = (id) => {
  1401. return currentMessageIndex.value === id
  1402. ? {
  1403. background: '#ff2b2b',
  1404. color: 'white',
  1405. }
  1406. : {
  1407. background: '#eea7a752',
  1408. color: '#ff2b2b',
  1409. }
  1410. }
  1411. let scrollWrapper = $ref(null)
  1412. const handleClickMessage = (id, index) => {
  1413. currentMessageIndex.value = index
  1414. let ele = document.getElementById(id)
  1415. scrollWrapper.scrollTop = ele.offsetTop - 260
  1416. let i = 0
  1417. let timer = setInterval(() => {
  1418. ele.style.background = i % 2 === 0 ? 'rgb(238, 98, 5)' : 'transparent'
  1419. i++
  1420. if (i > 7) {
  1421. clearInterval(timer)
  1422. }
  1423. }, 500)
  1424. }
  1425. let showMessageDrawer = $ref(false)
  1426. const setlUplaodClick = () => {
  1427. if (nullPatient()) return
  1428. isMedinsSetl(patient.value.bah, patient.value.admissTimes).then(() => {
  1429. router.push({
  1430. name: 'SetSheetUpload',
  1431. query: {
  1432. patNo: patient.value.bah,
  1433. times: patient.value.admissTimes,
  1434. }
  1435. })
  1436. })
  1437. }
  1438. const saveVerify = (opType) => {
  1439. if (nullPatient()) return
  1440. beforePrintSet.value = false
  1441. const param = {
  1442. opType,
  1443. sheet: patient.value,
  1444. }
  1445. executeSaveVerify(param)
  1446. .then(() => {
  1447. ElMessage({
  1448. message: '操作成功。',
  1449. type: 'success',
  1450. duration: 2500,
  1451. showClose: true,
  1452. })
  1453. })
  1454. .catch((e) => {
  1455. forceVerifies.value = e.data
  1456. showMessageDrawer = true
  1457. })
  1458. }
  1459. const dismissShowSearch = (flag) => {
  1460. setTimeout(() => {
  1461. if (flag === 1) {
  1462. showGoSearchBtn1.value = false
  1463. } else {
  1464. showGoSearchBtn2.value = false
  1465. }
  1466. }, 100)
  1467. }
  1468. const beforePrint = (page) => {
  1469. if (nullPatient()) return
  1470. const param = {
  1471. opType: 4,
  1472. sheet: patient.value,
  1473. page: page
  1474. }
  1475. executePrintVerify(param)
  1476. .then(() => {
  1477. execPrint(page)
  1478. })
  1479. .catch((e) => {
  1480. forceVerifies.value = e.data.force
  1481. adviceVerifies.value = e.data.advice
  1482. showMessageDrawer = true
  1483. if (e.data.force.length === 0) {
  1484. execPrint(page)
  1485. }
  1486. })
  1487. }
  1488. const execPrint = (page) => {
  1489. LODOP = getLodop()
  1490. const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`
  1491. const prntContent = page === 1 ? document.getElementById('headpage').innerHTML : document.getElementById('tailpage').innerHTML
  1492. let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
  1493. LODOP.PRINT_INIT('casefrontsheet')
  1494. LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
  1495. LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
  1496. LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', pagePrint)
  1497. LODOP.SET_PRINT_STYLE('ItemType', 3)
  1498. LODOP.PREVIEW()
  1499. }
  1500. onActivated(async () => {
  1501. const params = router.currentRoute.value.query
  1502. if (params && params.patNo && params.deptCode) {
  1503. await Sleep(300)
  1504. if (params.times && params.disdate) {
  1505. dateRange.value[0] = params.disdate
  1506. dateRange.value[1] = params.disdate
  1507. inOutStatus.value = 2
  1508. } else {
  1509. inOutStatus.value = 1
  1510. }
  1511. inpatientNo.value = params.patNo
  1512. currentWard.value = params.deptCode
  1513. handleWardChange()
  1514. await Sleep(500)
  1515. searchPatient()
  1516. }
  1517. })
  1518. onMounted(() => {
  1519. ElNotification({
  1520. title: '提示',
  1521. type: 'warning',
  1522. message: '据国家卫健委要求,数据中如有空项,应保留为空,不得以“—”、“-”、“/”等内容代表空项。',
  1523. duration: 5000,
  1524. })
  1525. scrollWrapper = document.getElementById('scrollWrapper')
  1526. initLodop()
  1527. getAllDictionary().then((res) => {
  1528. res.getOperations = operations
  1529. res.getYesOrNo = yesOrNo
  1530. res.getHaveOrNot = haveOrNot
  1531. res.getAutopsies = autopsies
  1532. dics.value = res
  1533. })
  1534. getUserWards().then((res) => {
  1535. userWards.value = res
  1536. if (res.length > 0) {
  1537. currentWard.value = res[0].code
  1538. fetchOverview()
  1539. }
  1540. })
  1541. })
  1542. function initInOutOptions() {
  1543. return [
  1544. { code: 1, name: '在院' },
  1545. { code: 2, name: '出院' },
  1546. ]
  1547. }
  1548. function initCyzgs() {
  1549. return [
  1550. { code: 0, name: '好转/治愈' },
  1551. { code: 1, name: '未愈' },
  1552. { code: 2, name: '转院(医院要求)' },
  1553. { code: 3, name: '转院(病人要求)' },
  1554. { code: 4, name: '转科' },
  1555. { code: 5, name: '无效' },
  1556. { code: 6, name: '死亡' },
  1557. { code: 7, name: '双向转诊' },
  1558. { code: 9, name: '其他' },
  1559. ]
  1560. }
  1561. function initAdmissConds() {
  1562. return [
  1563. { code: 1, name: '有' },
  1564. { code: 2, name: '临床未确定' },
  1565. { code: 3, name: '情况不明' },
  1566. { code: 4, name: '无' },
  1567. ]
  1568. }
  1569. function initDiagTypes() {
  1570. return [
  1571. { code: 1, name: '西医诊断' },
  1572. { code: 2, name: '中医主病诊断' },
  1573. { code: 3, name: '中医主症诊断' },
  1574. ]
  1575. }
  1576. </script>
  1577. <style scoped>
  1578. :deep(.el-dialog__body) {
  1579. padding-top: 8px;
  1580. }
  1581. :deep(.el-drawer) {
  1582. border: 1px solid orange;
  1583. }
  1584. :deep(.el-drawer .el-icon) {
  1585. font-size: 20px;
  1586. color: orangered;
  1587. }
  1588. :deep(.el-drawer__header) {
  1589. margin-bottom: 8px;
  1590. }
  1591. :deep(.el-dialog__header) {
  1592. padding-bottom: 4px;
  1593. }
  1594. select,
  1595. input {
  1596. outline: none;
  1597. border: none;
  1598. height: 20px;
  1599. line-height: 20px;
  1600. border-radius: 0;
  1601. background: transparent;
  1602. border-bottom: 1px solid #333333;
  1603. -webkit-appearance: none;
  1604. -moz-appearance: none;
  1605. appearance: none;
  1606. }
  1607. input[type='number'] {
  1608. -moz-appearance: textfield;
  1609. }
  1610. select ::-ms-expand {
  1611. display: none;
  1612. }
  1613. textarea {
  1614. outline: none;
  1615. border: none;
  1616. background-color: transparent;
  1617. }
  1618. table th {
  1619. border: 1px solid black;
  1620. text-align: center;
  1621. }
  1622. table td {
  1623. border: 1px solid black;
  1624. }
  1625. .page-inner {
  1626. padding: 0 20px 10px 26px;
  1627. border-radius: 12px;
  1628. text-align: justify;
  1629. }
  1630. .message-item {
  1631. padding: 6px;
  1632. margin-bottom: 6px;
  1633. border-radius: 4px;
  1634. }
  1635. .message-item:hover {
  1636. cursor: pointer;
  1637. }
  1638. .rightside-btn {
  1639. display: flex;
  1640. align-items: center;
  1641. text-align: center;
  1642. color: white;
  1643. border-radius: 4px;
  1644. width: 20px;
  1645. height: 185px;
  1646. position: fixed;
  1647. background: rgb(238, 98, 5);
  1648. top: 260px;
  1649. right: 10px;
  1650. cursor: pointer;
  1651. }
  1652. .no-verify-message {
  1653. width: 100%;
  1654. text-align: center;
  1655. margin-top: 50px;
  1656. font-size: 18px;
  1657. color: gray;
  1658. }
  1659. :deep(.m-drawer .el-overlay) {
  1660. right: 0;
  1661. left: calc(100vw - 260px);
  1662. background: transparent !important;
  1663. }
  1664. :deep(#livePlace .el-input__wrapper) {
  1665. background: transparent;
  1666. border: none;
  1667. box-shadow: none;
  1668. border-radius: 0;
  1669. border-bottom: 1px solid black;
  1670. color: black;
  1671. }
  1672. :deep(#livePlace .el-input__inner) {
  1673. color: black;
  1674. }
  1675. </style>