浏览代码

科室检查率统计

seimin 1 年之前
父节点
当前提交
4053d707e8

+ 7 - 0
src/app/services/main.service.ts

@@ -733,4 +733,11 @@ export class MainService {
733 733
       }
734 734
     );
735 735
   }
736
+
737
+  // 科室检查率统计
738
+  postReportDept(type, data): any {
739
+    return this.http.post(host.host + "/report/dept/" + type, data, {
740
+      headers: this.headers,
741
+    });
742
+  }
736 743
 }

+ 32 - 7
src/app/share/businessData-detail-modal/businessData-detail-modal.component.html

@@ -2,6 +2,7 @@
2 2
   <div class="modalBody" style="width: 1200px;">
3 3
     <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4 4
     <div class="content">
5
+      <!-- 血制品 -->
5 6
       <nz-table *ngIf="type === 'blood'" class="hospitalTable" [nzData]="bloodList" nzSize="middle" [nzShowPagination]="false"
6 7
         [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
7 8
         <thead>
@@ -31,12 +32,8 @@
31 32
           </tr>
32 33
         </tbody>
33 34
       </nz-table>
34
-      <!-- <div class="tab display_flex" *ngIf="type === 'specimen'">
35
-        <div class="item flex_1" [ngClass]="{ checked: tabType == item.id }" *ngFor="let item of specimentTypeList" (click)="checkTab(item.id)">
36
-          {{ item.name }}
37
-        </div>
38
-      </div> -->
39
-      <div class="list-template w100">
35
+      <!-- 标本 -->
36
+      <div class="list-template w100" *ngIf="type === 'specimen'">
40 37
         <div class="list-template__content">
41 38
           <div class="list-template__top" nz-row *ngIf="type === 'specimen'">
42 39
             <div nz-col nzXl='24' class="list-template__searchBox">
@@ -51,7 +48,6 @@
51 48
           </div>
52 49
         </div>
53 50
       </div>
54
-
55 51
       <nz-table *ngIf="type === 'specimen'" class="hospitalTable" [nzData]="specimenList" nzSize="middle" [nzShowPagination]="false"
56 52
         [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
57 53
         <thead>
@@ -92,6 +88,35 @@
92 88
           </tr>
93 89
         </tbody>
94 90
       </nz-table>
91
+      <!-- 科室检查率统计 -->
92
+      <nz-table *ngIf="type === 'deptInspectionRateStatistics'" class="hospitalTable" [nzData]="inspectionRateStatisticsList" nzSize="middle" [nzShowPagination]="false"
93
+        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
94
+        <thead>
95
+          <tr class="thead">
96
+            <th nzWidth="4%">序号</th>
97
+            <th nzWidth="14%">患者姓名(床号)</th>
98
+            <th nzWidth="14%">检查项目</th>
99
+            <th nzWidth="14%">预约时间</th>
100
+            <th nzWidth="14%">叫号信息</th>
101
+            <th nzWidth="14%">检查科室</th>
102
+            <th nzWidth="13%">检查状态</th>
103
+            <th nzWidth="13%">陪检人</th>
104
+          </tr>
105
+        </thead>
106
+        <tbody>
107
+          <tr *ngFor="let data of inspectionRateStatisticsList;let i = index;">
108
+            <td>{{ (pageIndex - 1) * pageSize + i + 1 }}</td>
109
+            <td>{{ data.patientName }}<span *ngIf="data.patientBedNum">({{data.patientBedNum}})</span></td>
110
+            <td>{{ data.inspectName}}</td>
111
+            <td>{{ data.yyTime}}</td>
112
+            <td>{{ data.reservationNumber}}</td>
113
+            <td>{{ data.execDept ? data.execDept.dept : '' }}</td>
114
+            <td>{{ data.inspectState?data.inspectState.name:''}}</td>
115
+            <td>{{ data.workerName}}</td>
116
+          </tr>
117
+        </tbody>
118
+      </nz-table>
119
+
95 120
       <div class="pagination" *ngIf="type !== 'blood'">
96 121
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
97 122
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"

+ 1 - 1
src/app/share/businessData-detail-modal/businessData-detail-modal.component.less

@@ -140,7 +140,7 @@
140 140
           }
141 141
         }
142 142
 
143
-        &:nth-child(3) {
143
+        &.pagination {
144 144
           font-size: 14px;
145 145
           color: #666;
146 146
           padding-top: 16px;

+ 86 - 0
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -13,6 +13,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
13 13
   hsLoading = false;
14 14
   bloodList: any = [];// 血制品列表
15 15
   specimenList: any = [];// 标本列表
16
+  inspectionRateStatisticsList: any = [];// 科室检查率统计列表
16 17
   pageIndex: number = 1;//表格当前页码
17 18
   pageSize: number = 5;//表格每页展示条数
18 19
   total: number = 0;//表格总数据量
@@ -22,6 +23,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
22 23
   @Input() show: Boolean;
23 24
   @Input() orderId: String;
24 25
   @Input() type: String = '';
26
+  @Input() dataInfo: any;
25 27
 
26 28
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
27 29
 
@@ -38,6 +40,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
38 40
           this.getSpecimen(1);
39 41
           this.getSpecimenType();
40 42
           break;
43
+      case 'deptInspectionRateStatistics':
44
+          this.getDeptInspectionRateStatistics(1);
45
+          break;
41 46
     }
42 47
   }
43 48
   // 关闭弹窗
@@ -66,6 +71,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
66 71
       case 'specimen':
67 72
           this.getSpecimen();
68 73
           break;
74
+      case 'deptInspectionRateStatistics':
75
+        this.getDeptInspectionRateStatistics(1);
76
+        break;
69 77
     }
70 78
   }
71 79
 
@@ -117,6 +125,84 @@ export class BusinessDataDetailModalComponent implements OnInit {
117 125
       this.total = data.totalNum || 0;
118 126
     })
119 127
   }
128
+
129
+  // 获取科室检查率统计-详情列表
130
+  getDeptInspectionRateStatistics(idx?) {
131
+    if (idx) {
132
+      this.pageIndex = 1;
133
+    }
134
+    let postData:any = {
135
+      idx: this.pageIndex - 1,
136
+      sum: this.pageSize,
137
+    }
138
+    let type = '';
139
+    switch(this.dataInfo.type){
140
+      case 'total':
141
+        postData.deptId = this.dataInfo.data.deptId,
142
+        postData.hosId = this.hosId,
143
+        postData.startTime = this.dataInfo.searchDto.startTime,
144
+        postData.endTime = this.dataInfo.searchDto.endTime,
145
+        type = 'inspect';
146
+        break;
147
+      case 'noCheckCount':
148
+        postData.deptId = this.dataInfo.data.deptId,
149
+        postData.hosId = this.hosId,
150
+        postData.startTime = this.dataInfo.searchDto.startTime,
151
+        postData.endTime = this.dataInfo.searchDto.endTime,
152
+        postData.reportInsState = 'noCheck',
153
+        type = 'inspect';
154
+        break;
155
+      case 'checkCount':
156
+        postData.deptId = this.dataInfo.data.deptId,
157
+        postData.hosId = this.hosId,
158
+        postData.startTime = this.dataInfo.searchDto.startTime,
159
+        postData.endTime = this.dataInfo.searchDto.endTime,
160
+        postData.reportInsState = 'check',
161
+        type = 'inspect';
162
+        break;
163
+      case 'insCount':
164
+        postData.deptId = this.dataInfo.data.deptId,
165
+        postData.hosId = this.hosId,
166
+        postData.startTime = this.dataInfo.searchDto.startTime,
167
+        postData.endTime = this.dataInfo.searchDto.endTime,
168
+        postData.reportInsState = 'inspect',
169
+        type = 'inspect';
170
+        break;
171
+      case 'workOrderCount':
172
+        postData.workOrder =  {
173
+          "model": "report",
174
+          "createDept": this.dataInfo.data.deptId,
175
+          "hosId": this.hosId,
176
+          "timeOut": 0,
177
+          "taskType": {
178
+              "associationType": {
179
+                  "key": 'association_types',
180
+                  "value": 'inspect',
181
+              }
182
+          },
183
+          startTime1: this.dataInfo.searchDto.startTime,
184
+          endTime1: this.dataInfo.searchDto.endTime,
185
+        }
186
+        type = 'workOrder';
187
+        break;
188
+    }
189
+
190
+    this.hsLoading = true;
191
+    if(type == 'inspect'){
192
+      this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
193
+        this.hsLoading = false;
194
+        this.inspectionRateStatisticsList = data.list || [];
195
+        this.total = data.totalNum || 0;
196
+      })
197
+    }else{
198
+      this.mainService.getFetchDataList('data', type, postData).subscribe((data: any) => {
199
+        this.hsLoading = false;
200
+        this.inspectionRateStatisticsList = data.list || [];
201
+        this.total = data.totalNum || 0;
202
+      })
203
+    }
204
+
205
+  }
120 206
 }
121 207
 
122 208
 

+ 15 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { DeptInspectionRateStatisticsComponent } from './dept-inspection-rate-statistics.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: DeptInspectionRateStatisticsComponent,
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class DeptInspectionRateStatisticsRoutingModule { }

+ 59 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.html

@@ -0,0 +1,59 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='17' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">操作时间</span>:
7
+          <nz-range-picker [(ngModel)]="searchDto.dateRange"></nz-range-picker>
8
+        </div>
9
+      </div>
10
+      <div nz-col nzXl='7' class="list-template__btns">
11
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
12
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
13
+      </div>
14
+    </div>
15
+    <div class="list-template__bottom">
16
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
17
+        [nzLoading]="loading1">
18
+        <thead>
19
+          <tr class="thead">
20
+            <th nzWidth="5%">序号</th>
21
+            <th nzWidth="14%">科室名称</th>
22
+            <th nzWidth="14%">总检查数</th>
23
+            <th nzWidth="14%">无需检查数</th>
24
+            <th nzWidth="14%">需检查数</th>
25
+            <th nzWidth="13%">陪检数</th>
26
+            <th nzWidth="13%">检查率</th>
27
+            <th nzWidth="13%">工单数</th>
28
+          </tr>
29
+        </thead>
30
+        <tbody>
31
+          <tr *ngFor="let data of listOfData;let index=index;">
32
+            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
33
+            <td>{{ data.deptName }}</td>
34
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'total' }, 'deptInspectionRateStatistics')">{{ data.total }}</td>
35
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'noCheckCount' }, 'deptInspectionRateStatistics')">{{ data.noCheckCount }}</td>
36
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'checkCount' }, 'deptInspectionRateStatistics')">{{ data.checkCount }}</td>
37
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'insCount' }, 'deptInspectionRateStatistics')">{{ data.insCount }}</td>
38
+            <td>{{ data.inspectRate }}%</td>
39
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'workOrderCount' }, 'deptInspectionRateStatistics')">{{ data.workOrderCount }}</td>
40
+          </tr>
41
+        </tbody>
42
+      </nz-table>
43
+      <div class="list-template__pagination">
44
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
45
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
46
+        </nz-pagination>
47
+      </div>
48
+    </div>
49
+  </div>
50
+</div>
51
+
52
+<!-- 业务数据查看 -->
53
+<app-businessData-detail-modal
54
+  *ngIf="businessDataModalShow"
55
+  [show]="businessDataModalShow"
56
+  [type]="businessDataModalType"
57
+  [dataInfo]="dataInfo"
58
+  (closeModelHs)="closeModelBlood($event)"
59
+></app-businessData-detail-modal>

+ 126 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.less

@@ -0,0 +1,126 @@
1
+@import "../../../../src/theme.less";
2
+.save {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 99;
10
+
11
+  .modalBody {
12
+    width: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 18px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 8px;
102
+
103
+            .ant-form-item-label {
104
+              line-height: 14px;
105
+              text-align: left;
106
+            }
107
+          }
108
+        }
109
+
110
+        .editForm {
111
+          .ant-form-item {
112
+            margin-bottom: 14px;
113
+
114
+            .ant-form-item-label {
115
+              line-height: 0;
116
+            }
117
+          }
118
+        }
119
+      }
120
+
121
+      button:nth-child(1) {
122
+        margin-right: 20px;
123
+      }
124
+    }
125
+  }
126
+}

+ 92 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.ts

@@ -0,0 +1,92 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { ToolService } from "../../services/tool.service";
6
+import { format, startOfDay, endOfDay } from 'date-fns';
7
+import { DeptInspectionRateStatisticsService } from './dept-inspection-rate-statistics.service';
8
+
9
+@Component({
10
+  selector: "app-dept-inspection-rate-statistics",
11
+  templateUrl: "./dept-inspection-rate-statistics.component.html",
12
+  styleUrls: ["./dept-inspection-rate-statistics.component.less"],
13
+})
14
+export class DeptInspectionRateStatisticsComponent implements OnInit {
15
+  @ViewChild("osComponentRef1", {
16
+    read: OverlayScrollbarsComponent,
17
+    static: false,
18
+  })
19
+  osComponentRef1: OverlayScrollbarsComponent;
20
+  constructor(
21
+    private route: ActivatedRoute,
22
+    private tool: ToolService,
23
+    private deptInspectionRateStatisticsService: DeptInspectionRateStatisticsService,
24
+  ) {}
25
+
26
+  listOfData: any[] = []; //表格数据
27
+  searchDto: any = {
28
+    dateRange: [],
29
+  }
30
+
31
+  hosId: any; //院区(搜索)
32
+  pageIndex: number = 1; //页码
33
+  listLength: number = 10; //总条数
34
+  pageSize: number = 10; //每页条数
35
+
36
+  // 初始化增删改按钮
37
+  coopBtns: any = {};
38
+
39
+  ngOnInit() {
40
+    this.coopBtns = this.tool.initCoopBtns(this.route);
41
+    this.hosId = this.tool.getCurrentHospital().id;
42
+    this.getList(true);
43
+  }
44
+
45
+  // 搜索
46
+  search() {
47
+    this.getList(true);
48
+  }
49
+  // 重置
50
+  reset() {
51
+    this.searchDto = {
52
+      dateRange: [],
53
+    }
54
+    this.search();
55
+  }
56
+  // 表格数据
57
+  loading1 = false;
58
+  getList(isResetPageIndex = false) {
59
+    isResetPageIndex && (this.pageIndex = 1);
60
+    let postData:any = {
61
+      idx: this.pageIndex - 1,
62
+      sum: this.pageSize,
63
+      hosId: this.hosId,
64
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
65
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
66
+    };
67
+    this.loading1 = true;
68
+    this.deptInspectionRateStatisticsService
69
+      .query(postData)
70
+      .subscribe((result) => {
71
+        this.loading1 = false;
72
+        result.list = result.list || [];
73
+        this.listOfData = result.list;
74
+        this.listLength = result.totalNum;
75
+      });
76
+  }
77
+
78
+  // 查看业务数据
79
+  businessDataModalShow = false; //业务数据弹窗开关
80
+  businessDataModalType = ''; //业务数据类型
81
+  dataInfo = null; //查看业务数据携带
82
+  viewDetail(data, type) {
83
+    this.dataInfo = data;
84
+    this.businessDataModalType = type;
85
+    this.businessDataModalShow = true;
86
+  }
87
+  // 关闭业务数据弹窗
88
+  closeModelBlood(e) {
89
+    this.businessDataModalShow = JSON.parse(e).show;
90
+  }
91
+}
92
+

+ 19 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { DeptInspectionRateStatisticsRoutingModule } from './dept-inspection-rate-statistics-routing.module';
5
+import { DeptInspectionRateStatisticsComponent } from './dept-inspection-rate-statistics.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    DeptInspectionRateStatisticsComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    DeptInspectionRateStatisticsRoutingModule,
16
+    ShareModule,
17
+  ]
18
+})
19
+export class DeptInspectionRateStatisticsModule { }

+ 24 - 0
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.service.ts

@@ -0,0 +1,24 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class DeptInspectionRateStatisticsService {
8
+  constructor(
9
+    private mainService: MainService,
10
+  ) { }
11
+
12
+  // 列表-查
13
+  query(postData) {
14
+    return this.mainService.postReportDept("inspect", postData);
15
+  }
16
+
17
+  // 字典
18
+  getDictionary(type) {
19
+    return this.mainService.getDictionary("list", type);
20
+  }
21
+}
22
+
23
+
24
+

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -193,6 +193,11 @@ const routes: Routes = [
193 193
         path: "workerStatistics",
194 194
         loadChildren: () => import("../worker-statistics/worker-statistics.module").then((m) => m.WorkerStatisticsModule),
195 195
       },
196
+      // 统计分析-科室检查率统计
197
+      {
198
+        path: "deptInspectionRateStatistics",
199
+        loadChildren: () => import("../dept-inspection-rate-statistics/dept-inspection-rate-statistics.module").then((m) => m.DeptInspectionRateStatisticsModule),
200
+      },
196 201
       // 轮巡计划列表
197 202
       {
198 203
         path: "roundRobin",

+ 5 - 0
src/common.less

@@ -289,6 +289,11 @@
289 289
             td {
290 290
               border: none;
291 291
 
292
+              &.tab_hover:hover{
293
+                text-decoration: underline;
294
+                cursor: pointer;
295
+              }
296
+
292 297
               .coop {
293 298
                 button{
294 299
                   color: #333;