CrbMzBlRecord.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div class="layout_container">
  3. <header>
  4. <el-input v-model.trim="patNo" class="w-50 m-2" style="width: 280px" placeholder="请输入门诊号/住院号" clearable>
  5. <template #prepend>门诊号/住院号</template>
  6. </el-input>
  7. <el-input v-model.trim="xm" class="w-50 m-2" style="width: 280px; margin-left: 3px" placeholder="请输入姓名" clearable>
  8. <template #prepend>姓名</template>
  9. </el-input>
  10. <el-input v-model.trim="idCard" class="w-50 m-2" style="width: 280px; margin-left: 3px" placeholder="请输入身份证号码" clearable>
  11. <template #prepend>身份证号码</template>
  12. </el-input>
  13. <el-select v-model="tjType" placeholder="请选择类型" style="width: 120px; margin-left: 3px">
  14. <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
  15. </el-option>
  16. </el-select>
  17. <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" :clearable="false"
  18. end-placeholder="结束日期" :shortcuts="shortcuts" style="width: 300px; margin-left: 3px">
  19. </el-date-picker>
  20. <el-divider direction="vertical" />
  21. <el-button type="primary" icon="Search" @click="queryEmrBaseInfo" style="margin-left: 5px">查询</el-button>
  22. </header>
  23. <div class="layout_main">
  24. <el-tabs class="el-tabs__fill" v-model="editableTabsValue" type="border-card" @tab-click="handleClick">
  25. <el-tab-pane key="mzBlRecord" label="门(急)诊病历记录上传" name="mzBlRecord">
  26. <div class="layout_display_flex_y">
  27. <div class="layout_flex_1-y">
  28. <el-table :data="mzBlRecordData.slice(pageSize * (currentPage - 1), pageSize * currentPage)" border
  29. stripe highlight-current-row height="100%">
  30. <el-table-column type="index" label="序号" width="50" fixed/>
  31. <el-table-column prop="uploadFlag" label="上传状态" width="100" fixed>
  32. <template #default="scope">
  33. <el-button v-if="scope.row.uploadFlag === 0 " type="danger" size="small" class="cancel-btn">上传失败</el-button>
  34. <el-button v-else-if="scope.row.uploadFlag === 1 " type="primary" size="small" class="cancel-btn">上传成功</el-button>
  35. <el-button v-else type="warning" size="small" class="cancel-btn">未上传</el-button>
  36. </template>
  37. </el-table-column>
  38. <el-table-column prop="uploadMsg" label="上传结果信息" width="180" show-overflow-tooltip fixed/>
  39. <el-table-column prop="id" label="ID" width="145" fixed/>
  40. <el-table-column prop="patientId" label="患者ID" width="80" fixed/>
  41. <el-table-column prop="serialNumber" label="就诊流水号" width="80" />
  42. <el-table-column prop="patientName" label="患者姓名" width="100"/>
  43. <el-table-column prop="idCardTypeCode" label="身份证件类别代码" width="120" />
  44. <el-table-column prop="idCardTypeName" label="身份证件类别名称" width="140" />
  45. <el-table-column prop="idCard" label="身份证件号码" width="140" >
  46. <template #default="scope">
  47. {{!scope.row.idCard ? '' : scope.row.idCard.replace(reg, '\$1******\$2')}}
  48. </template>
  49. </el-table-column>
  50. <el-table-column prop="allergyHisFlag" label="过敏史标志" width="180" show-overflow-tooltip/>
  51. <el-table-column prop="allergyHis" label="过敏史" width="180" show-overflow-tooltip/>
  52. <el-table-column prop="outpatientDate" label="就诊日期时间" width="130"/>
  53. <el-table-column prop="initalDiagnosisCode" label="初诊标志代码" width="140"/>
  54. <el-table-column prop="chiefComplaint" label="主诉" width="180" show-overflow-tooltip/>
  55. <el-table-column prop="presentIllnessHis" label="现病史" width="160" show-overflow-tooltip/>
  56. <el-table-column prop="pastIllnessHis" label="既往史" width="160" show-overflow-tooltip/>
  57. <el-table-column prop="infectionHis" label="传染病史" width="160" show-overflow-tooltip/>
  58. <el-table-column prop="vaccinationHis" label="预防接种史" width="160" show-overflow-tooltip/>
  59. <el-table-column prop="operationHis" label="手术史" width="160" show-overflow-tooltip/>
  60. <el-table-column prop="bloodTransfusion" label="输血史" width="160" show-overflow-tooltip/>
  61. <el-table-column prop="personalHis" label="个人史" width="160" show-overflow-tooltip/>
  62. <el-table-column prop="maritalHis" label="婚育史" width="160" show-overflow-tooltip/>
  63. <el-table-column prop="menstrualHis" label="月经史" width="160" show-overflow-tooltip/>
  64. <el-table-column prop="familyHis" label="家族史" width="160" show-overflow-tooltip/>
  65. <el-table-column prop="physicalExamination" label="体格检查" width="160" show-overflow-tooltip/>
  66. <el-table-column prop="observationResult" label='中医“四诊”观察结果' width="160" show-overflow-tooltip/>
  67. <el-table-column prop="studiesSummaryResult" label="辅助检查" width="160" show-overflow-tooltip/>
  68. <el-table-column prop="wmDiagnosisCode" label="西医疾病诊断编码" width="140" show-overflow-tooltip/>
  69. <el-table-column prop="wmDiagnosisName" label="西医疾病诊断名称" width="120" show-overflow-tooltip/>
  70. <el-table-column prop="tcmInitalDiagnosisCode" label="中医病名代码" width="140"/>
  71. <el-table-column prop="tcmInitalDiagnosisName" label="中医病名名称" width="120" show-overflow-tooltip/>
  72. <el-table-column prop="tcmInitalSyndromeCode" label="中医证候编码" width="140"/>
  73. <el-table-column prop="tcmInitalSyndromeName" label="中医证候名称" width="120" show-overflow-tooltip/>
  74. <el-table-column prop="differentiationBasis" label="辨证依据" width="120" show-overflow-tooltip/>
  75. <el-table-column prop="treatment" label="治则治法" width="120" show-overflow-tooltip/>
  76. <el-table-column prop="course" label="急诊留观病程记录" v-if="tjType === '2'" width="140" show-overflow-tooltip/>
  77. <el-table-column prop="observationDate" label="收入观察室日期时间" v-if="tjType === '2'" width="130"/>
  78. <el-table-column prop="notes" label="注意事项" width="140" v-if="tjType === '2'" show-overflow-tooltip/>
  79. <el-table-column prop="deptCode" label="科室代码" width="180" show-overflow-tooltip/>
  80. <el-table-column prop="deptName" label="科室名称" width="180"/>
  81. <el-table-column prop="orgCode" label="医疗机构代码" width="120"/>
  82. <el-table-column prop="orgName" label="医疗机构名称" width="120"/>
  83. <el-table-column prop="operatorId" label="操作人ID" width="80"/>
  84. <el-table-column prop="operationTime" label="操作时间" width="140"/>
  85. <el-table-column fixed="right" label="操作" min-width="80" width="80" center>
  86. <template #default="scope">
  87. <el-button type="primary" size="small" @click="uploadMzBlRecord(scope.row)">上传</el-button>
  88. </template>
  89. </el-table-column>
  90. </el-table>
  91. </div>
  92. <div>
  93. <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[10, 15, 20, 25]"
  94. :total="mzBlRecordData.length" layout="total, sizes, prev, pager, next, jumper"
  95. style="margin-top: 5px" @size-change="handleSizeChange"
  96. @current-change="handleCurrentChange">
  97. </el-pagination>
  98. </div>
  99. </div>
  100. </el-tab-pane>
  101. </el-tabs>
  102. </div>
  103. </div>
  104. </template>
  105. <script setup name="CrbMzBlRecord">
  106. import {nextTick, onMounted, ref} from "vue";
  107. import {
  108. selectOutpatientObs, selectOutpatientRecord,
  109. uploadEmrOutpatientObs, uploadEmrOutpatientRecord
  110. } from "@/api/crb-manage/crb-mz-bl-record.js";
  111. import {ElMessage, ElMessageBox} from "element-plus";
  112. import {shortcuts} from "@/data/shortcuts.js";
  113. import {formatDatetime, getDateRangeFormatDate} from "@/utils/date.js";
  114. const patNo = ref('')
  115. const xm = ref('')
  116. const idCard = ref('')
  117. const tjType = ref('1')
  118. const typeList = [{ value: "1", label: "普通记录" }, { value: "2", label: "留观记录" }]
  119. const editableTabsValue = ref("mzBlRecord")
  120. const mzBlRecordData = ref([])
  121. const dateRange = ref([])
  122. const start = formatDatetime(shortcuts[0].value[0])
  123. const end = formatDatetime(shortcuts[0].value[0])
  124. const pageSize = ref(20)
  125. const currentPage = ref(1)
  126. const handleSizeChange = (val) => {
  127. pageSize.value = val
  128. }
  129. const handleCurrentChange = (val) => {
  130. currentPage.value = val
  131. }
  132. const paramInfo = ref({
  133. startTime: '',
  134. endTime: '',
  135. patNo: '', // 门诊号
  136. patName: '', // 姓名
  137. idCard: '', // 身份证号码
  138. tjType: '', // 1:普通记录; 2:留观记录
  139. })
  140. const reg = /^(.{6})\d+(.{4})$/
  141. onMounted(() => {
  142. nextTick(() => {
  143. paramInfo.value.startTime = start;
  144. paramInfo.value.endTime = end + " 23:59:59";
  145. dateRange.value = [start, end];
  146. queryMzBlRecord()
  147. })
  148. })
  149. const handleClick = (tab, event) => {
  150. // 查询哪个tab页面
  151. editableTabsValue.value = tab.props.name;
  152. if (editableTabsValue.value === "mzBlRecord") {
  153. queryMzBlRecord()
  154. }
  155. }
  156. const queryEmrBaseInfo = () => {
  157. if (editableTabsValue.value === "mzBlRecord") {
  158. queryMzBlRecord()
  159. }
  160. }
  161. // 查询门(急)诊病历记录
  162. const queryMzBlRecord = () => {
  163. if (dateRange.value) {
  164. let dateS = getDateRangeFormatDate(dateRange.value)
  165. paramInfo.value.startTime = dateS.startTime
  166. paramInfo.value.endTime = dateS.endTime
  167. }
  168. paramInfo.value.patNo = patNo.value
  169. paramInfo.value.patName = xm.value
  170. paramInfo.value.idCard = idCard.value
  171. paramInfo.value.tjType = tjType.value
  172. if("1" === tjType.value){
  173. selectOutpatientRecord(paramInfo.value).then((res) => {
  174. mzBlRecordData.value = res
  175. })
  176. } else {
  177. selectOutpatientObs(paramInfo.value).then((res) => {
  178. mzBlRecordData.value = res
  179. })
  180. }
  181. }
  182. const uploadMzBlRecord = (row) => {
  183. // 上传门(急)诊病历
  184. if("1" === tjType.value){
  185. ElMessageBox.confirm('确定上传门(急)诊病历?', {
  186. cancelButtonText: '取消',
  187. confirmButtonText: '确定',
  188. type: 'warning',
  189. distinguishCancelAndClose: true,
  190. dangerouslyUseHTMLString: true
  191. }).then(() => {
  192. uploadEmrOutpatientRecord(row).then((res) => {
  193. if(res.result){
  194. ElMessage({
  195. type: "success",
  196. message: res.desc,
  197. duration: 2500,
  198. showClose: true,
  199. });
  200. } else {
  201. ElMessage({
  202. type: "error",
  203. message: res.desc,
  204. duration: 2500,
  205. showClose: true,
  206. });
  207. }
  208. queryMzBlRecord()
  209. })
  210. }).catch((action) => {
  211. if (action === 'cancel') {
  212. console.log("已取消。。。")
  213. }
  214. })
  215. } else {
  216. // 上传门(急)诊留观记录
  217. ElMessageBox.confirm('确定上传门(急)诊留观记录?', {
  218. cancelButtonText: '取消',
  219. confirmButtonText: '确定',
  220. type: 'warning',
  221. distinguishCancelAndClose: true,
  222. dangerouslyUseHTMLString: true
  223. }).then(() => {
  224. uploadEmrOutpatientObs(row).then((res) => {
  225. if(res.result){
  226. ElMessage({
  227. type: "success",
  228. message: res.desc,
  229. duration: 2500,
  230. showClose: true,
  231. });
  232. } else {
  233. ElMessage({
  234. type: "error",
  235. message: res.desc,
  236. duration: 2500,
  237. showClose: true,
  238. });
  239. }
  240. queryMzBlRecord()
  241. })
  242. }).catch((action) => {
  243. if (action === 'cancel') {
  244. console.log("已取消。。。")
  245. }
  246. })
  247. }
  248. }
  249. </script>
  250. <style scoped>
  251. .cancel-btn:hover {
  252. cursor: default !important;
  253. }
  254. </style>