123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- <template>
- <div class="container" style="height: 80vh; width: 95vw">
- <el-row :gutter="10">
- <el-col :span="5">
- <!-- 左边的导航菜单 -->
- <div class="left-body">
- <el-menu default-active="1">
- <el-menu-item index="1" @click="activePatient(1)">
- <i class="el-icon-user"></i>
- <span>患者基本信息/亲属</span>
- </el-menu-item>
- <el-submenu index="2">
- <template slot="title">
- <i class="el-icon-document"></i>
- <span>就诊信息</span>
- </template>
- <el-submenu v-for="(mouths, year) in groupedDates" :key="year" :index="year.toString()">
- <template slot="title">
- <span>{{year}}年</span>
- </template>
- <el-submenu v-for="(days,month) in mouths" :key="month" :index="month.toString()">
- <template slot="title">
- <span>{{month}}月</span>
- </template>
- <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2)" :key="item.id" :index="item.id">
- {{year}}年{{month}}月{{item.day}}日
- </el-menu-item>
- </el-submenu>
- </el-submenu>
- </el-submenu>
- </el-menu>
- </div>
- </el-col>
- <el-col :span="19">
- <!-- 右边的信息显示 -->
- <div class="right-body">
- <!-- 患者基本信息/亲属 -->
- <div class="patient-info-nk" v-if="active === 1">
- <!-- 患者基本信息 -->
- <div class="patient-info">
- <el-descriptions style="width: 100%" title="患者信息" :column="3" border>
- <el-descriptions-item label="患者标识符">{{patientInfo.patientCode}}</el-descriptions-item>
- <el-descriptions-item label="就诊卡号">{{patientInfo.cardNumber}}</el-descriptions-item>
- <el-descriptions-item label="姓名">{{patientInfo.name}}</el-descriptions-item>
- <el-descriptions-item label="性别">
- <dict-tag :options="dict.type.patient_sex" :value="patientInfo.sex"/>
- </el-descriptions-item>
- <el-descriptions-item label="身份证号" prop="sfzh">{{patientInfo.sfzh}}</el-descriptions-item>
- <el-descriptions-item label="出生时间" prop="birthDate">{{patientInfo.birthDate}}</el-descriptions-item>
- <el-descriptions-item label="居住地址" prop="address">{{patientInfo.address}}</el-descriptions-item>
- <el-descriptions-item label="联系电话" prop="phone">{{patientInfo.phone}}</el-descriptions-item>
- <el-descriptions-item label="婚姻状况" prop="marital">
- <dict-tag :options="dict.type.patient_marital" :value="patientInfo.marital" />
- </el-descriptions-item>
- <el-descriptions-item label="民族" prop="nation">{{patientInfo.nation}}</el-descriptions-item>
- <el-descriptions-item label="职业" prop="career">{{patientInfo.career}}</el-descriptions-item>
- <el-descriptions-item label="国籍" prop="nationality">{{patientInfo.nationality}}</el-descriptions-item>
- <el-descriptions-item label="病历号" prop="blh">{{patientInfo.blh}}</el-descriptions-item>
- <el-descriptions-item label="病人卡号" prop="brkh">{{patientInfo.brkh}}</el-descriptions-item>
- <el-descriptions-item label="婴儿序号" prop="yexh">{{patientInfo.yexh}}</el-descriptions-item>
- </el-descriptions>
- </div>
- <!-- 患者亲属 -->
- <div class="patient-nk" style="margin-top: 10px">
- <el-table height="calc(75vh - 190px)" width="69vw" :data="nkList">
- <el-table-column label="姓名" align="center" prop="name"></el-table-column>
- <el-table-column label="所属关系" align="center" prop="kinship"></el-table-column>
- <el-table-column label="近亲地址" align="center" prop="address"></el-table-column>
- <el-table-column label="联系电话" align="center" prop="phone"></el-table-column>
- <el-table-column label="工作名称" align="center" prop="workName"></el-table-column>
- <el-table-column label="工作类别" align="center" prop="workCode"></el-table-column>
- </el-table>
- <pagination v-show="totalNk > 0" :total="totalNk" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getNkList" />
- </div>
- </div>
- <!-- 诊断信息 -->
- <div class="dg-info" v-if="active === 2">
- <!-- 单次就诊的详细信息 -->
- <div class="pv">
- <el-descriptions :column="3" border height="calc(90vh - 273px)" title="就诊信息">
- <el-descriptions-item label="患者类别">
- <dict-tag :options="dict.type.patient_category" :value="pvList.patientCategory"></dict-tag>
- </el-descriptions-item>
- <el-descriptions-item label="所在病区">{{pvList.wardName}}</el-descriptions-item>
- <el-descriptions-item label="主治医生">{{pvList.physician}}</el-descriptions-item>
- <el-descriptions-item label="主管护士">{{pvList.nurseCode}}</el-descriptions-item>
- <el-descriptions-item label="在院状态">
- <dict-tag :options="dict.type.hospital_status" :value="pvList.hospitalStatus"/>
- </el-descriptions-item>
- <el-descriptions-item label="入院次数">{{pvList.hospitalizedNumber}}</el-descriptions-item>
- <el-descriptions-item label="就诊号码">{{pvList.cardId}}</el-descriptions-item>
- <el-descriptions-item label="出院方式">
- <dict-tag :options="dict.type.discharge_method" :value="pvList.dischargeMothod"/>
- </el-descriptions-item>
- <el-descriptions-item label="入院时间">{{pvList.admissionTime}}</el-descriptions-item>
- <el-descriptions-item label="出院时间">{{pvList.dischargeTime}}</el-descriptions-item>
- <el-descriptions-item label="危重级别">{{pvList.level}}</el-descriptions-item>
- <el-descriptions-item label="入区时间">{{pvList.entryTime}}</el-descriptions-item>
- <el-descriptions-item label="出区时间">{{pvList.exitTime}}</el-descriptions-item>
- <el-descriptions-item label="出区原因">{{pvList.reasonArea}}</el-descriptions-item>
- </el-descriptions>
- </div>
- <!-- 诊断结果列表 -->
- <div class="dg" style="margin-top: 10px">
- <el-table width="69vw" height="calc(75vh - 190px)" :data="dgList">
- <el-table-column label="诊断名称" align="center" prop="diagnosticCode"></el-table-column>
- <el-table-column label="诊断时间" align="center" prop="diagnosisTime"></el-table-column>
- <el-table-column label="诊断类型" align="center" prop="diagnosticType">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.diagnostic_type" :value="scope.row.diagnosticType"/>
- </template>
- </el-table-column>
- <el-table-column label="诊断类别" align="center" prop="diagnosticCategoryCode">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.diagnostic_category_code" :value="scope.row.diagnosticCategoryCode"/>
- </template>
- </el-table-column>
- </el-table>
- <pagination v-show="totalDg > 0" :total="totalDg" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getDgList" />
- </div>
- </div>
- </div>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- export default {
- dicts: ['patient_category','diagnostic_type', 'diagnostic_category_code','hospital_status','discharge_method','patient_sex','patient_marital'],
- data(){
- return{
- isGrouped: false,
- active:1,
- timeList:null,
- groupedDates: {},
- //亲属表数据总条数
- totalNk:0,
- //诊断表数据总条数
- totalDg:0,
- //dg表数据
- dgList:null,
- //pv表数据
- pvList:null,
- //nk表数据
- nkList:null,
- //患者详细信息
- patientInfo:null,
- //就诊详细信息
- pvInfo:null,
- //查询参数
- queryParams:{
- pageNum:1,
- pageSize:10
- }
- }
- },
- watch:{
- },
- created() {
- this.activePatient(1);
- this.getTime();
- },
- methods:{
- async activePatient(sign) {
- if (sign === 1) {
- this.getPatient();
- this.getNkList();
- this.active = sign;
- }
- if (sign === 2) {
- this.getDgList();
- this.active = sign;
- }
- },
- /** 查询某一次的就诊信息 */
- getCard(id){
- this.get({
- url:'/work/pv1/list',
- data:{
- id:id
- }
- }).then((response)=>{
- this.pvList = response.rows[0];
- })
- },
- /** 查询某科室某个病人的就诊记录 */
- getTime(){
- this.ajax({
- url:'/work/pv1/list',
- data:{
- patientId:this.param.id,
- department:this.param.department
- }
- }).then((response)=>{
- this.timeList = response.rows;
- this.groupDates(this.timeList);
- })
- },
- groupDates(dates){
- if (this.isGrouped) {
- // 如果已经获取了就诊日期数据,直接返回
- return;
- }
- dates.forEach(date => {
- let year = date.admissionTime.substring(0, 4);
- let month = date.admissionTime.substring(4, 6);
- let day = date.admissionTime.substring(6, 8);
- let id = date.id;
- if (!this.groupedDates[year]) {
- this.groupedDates[year] = {};
- }
- if (!this.groupedDates[year][month]) {
- this.groupedDates[year][month] = [];
- }
- this.groupedDates[year][month].push({id: id, day: day});
- })
- this.isGrouped = true;
- },
- /** 查询患者信息 */
- getPatient(){
- this.get({
- url:'/work/patient/detail/'+this.param.id,
- }).then((response)=>{
- this.patientInfo = response.data;
- console.log(this.patientInfo)
- })
- },
- /** 查询某一次就诊信息 */
- getPvList(){
- this.get({
- url:'/work/pv1/list',
- data:{
- cardId:this.param.cardId
- }
- }).then((response)=>{
- this.pvList = response.rows[0];
- })
- },
- /** 查询亲属表 */
- getNkList() {
- this.get({
- url:'/work/nk/list',
- data:{
- patientId:this.param.id,
- ...this.queryParams
- }
- }).then((response)=>{
- this.nkList = response.rows;
- this.totalNk = response.total;
- })
- },
- /** 查询诊断记录表 */
- getDgList(){
- this.get({
- url:'/work/dg/list',
- data:{
- patientId:this.patientInfo.id,
- ...this.queryParams
- }
- }).then((response)=>{
- this.dgList = response.rows;
- this.totalDg = response.total;
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- </style>
|