Browse Source

患者陪检闭环列表

seimin 1 month ago
parent
commit
603a8a95dd

+ 2 - 3
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html

@@ -7,14 +7,13 @@
7 7
             <div nz-col nzXl='17' class="list-template__searchBox">
8 8
               <div class="list-template__searchItem">
9 9
                 <span class="label">检查类型</span>:
10
-                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查类型" [(ngModel)]="queryData.extra5" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
10
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查类型" [(ngModel)]="queryData.extra5" nzAllowClear nzServerSearch>
11 11
                   <nz-option *ngFor="let option of typeList" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
12 12
                 </nz-select>
13 13
               </div>
14 14
               <div class="list-template__searchItem">
15 15
                 <span class="label">检查科室</span>:
16
-                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
17
-                  (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择检查科室" [(ngModel)]="queryData.extra4">
16
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查科室" [(ngModel)]="queryData.extra4" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
18 17
                   <ng-container *ngFor="let option of deptList">
19 18
                     <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
20 19
                   </ng-container>

+ 1 - 1
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts

@@ -230,7 +230,7 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
230 230
       sum: 20,
231 231
       department: {
232 232
         searchType: 1,// 简单查询
233
-        hospital: { id: this.hosId },
233
+        cascadeHosId: this.hosId,
234 234
         dept: e,
235 235
       }
236 236
     };

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

@@ -622,6 +622,11 @@ const routes: Routes = [
622 622
 			{
623 623
 			  path: "shareSpecimen",
624 624
 			  loadChildren: () => import("../share-specimen/share-specimen.module").then((m) => m.ShareSpecimenModule),
625
+			},
626
+			// 患者陪检闭环
627
+			{
628
+			  path: "patientInspectLog",
629
+			  loadChildren: () => import("../patient-inspect-log/patient-inspect-log.module").then((m) => m.PatientInspectLogModule),
625 630
 			}
626 631
     ],
627 632
   },

+ 25 - 0
src/app/views/patient-inspect-log/patient-inspect-log-routing.module.ts

@@ -0,0 +1,25 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectionExecuteDetailComponent } from 'src/app/share/inspection-execute-detail/inspection-execute-detail.component';
4
+import { PatientInspectLogComponent } from './patient-inspect-log.component';
5
+
6
+
7
+const routes: Routes = [
8
+  {
9
+    path: '',
10
+    component: PatientInspectLogComponent,
11
+    children: [
12
+      {
13
+        // 查看详情
14
+        path: 'inspectionExecuteDetail/:id',
15
+        component: InspectionExecuteDetailComponent,
16
+      }
17
+    ]
18
+  }
19
+];
20
+
21
+@NgModule({
22
+  imports: [RouterModule.forChild(routes)],
23
+  exports: [RouterModule]
24
+})
25
+export class PatientInspectLogRoutingModule { }

+ 109 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.html

@@ -0,0 +1,109 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='16' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">科室</span>:
7
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择科室" [(ngModel)]="searchDto.deptId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('department', $event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
8
+            <ng-container *ngFor="let option of deptList">
9
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
10
+            </ng-container>
11
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
12
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
13
+            </nz-option>
14
+          </nz-select>
15
+        </div>
16
+        <div class="list-template__searchItem">
17
+          <span class="label">患者</span>:
18
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择患者" [(ngModel)]="searchDto.patientId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('patient', $event)" (nzOpenChange)="openChangePatient($event)" (ngModelChange)="setIsSelecting(true)">
19
+            <ng-container *ngFor="let option of patientList">
20
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.patientName" [nzValue]="option.id"></nz-option>
21
+            </ng-container>
22
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
+            </nz-option>
25
+          </nz-select>
26
+        </div>
27
+        <div class="list-template__searchItem">
28
+          <span class="label">状态</span>:
29
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchDto.stateId">
30
+            <ng-container *ngFor="let option of stateList">
31
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
32
+            </ng-container>
33
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
34
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
35
+            </nz-option>
36
+          </nz-select>
37
+        </div>
38
+      </div>
39
+      <div nz-col nzLg="8" class="list-template__btns">
40
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
41
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
42
+      </div>
43
+    </div>
44
+    <div class="list-template__bottom">
45
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
46
+        [nzLoading]="loading1">
47
+        <thead>
48
+          <tr class="thead">
49
+            <th nzWidth="12%">科室信息</th>
50
+            <th nzWidth="11%">患者信息</th>
51
+            <th nzWidth="11%">护理级别</th>
52
+            <th nzWidth="11%">出科信息</th>
53
+            <th nzWidth="11%">回科信息</th>
54
+            <th nzWidth="11%">备注信息</th>
55
+            <th nzWidth="11%">预约时间</th>
56
+            <th nzWidth="11%">状态</th>
57
+            <th nzWidth="11%">操作</th>
58
+          </tr>
59
+        </thead>
60
+        <tbody>
61
+          <tr *ngFor="let data of listOfData;let i = index">
62
+            <td>{{data.inspectionDTO?.name}}<br>{{data.batchNo}}</td>
63
+            <td>{{data.inspectionDTO?.name}}<br>{{data.batchNo}}</td>
64
+            <td>{{data.inspectionNodeDTO?.name}}<br>{{data.inspectionDTO?.inspectionFormDTO?.name}}</td>
65
+            <td>{{data.overtime | date:'yyyy-MM-dd HH:mm'}}</td>
66
+            <td>{{data.signType?.name}}</td>
67
+            <td>{{data.userDTO?.name || data.groupDTO?.groupName}}</td>
68
+            <td>{{data.status?.name}}</td>
69
+            <td>{{data.incidentDTO?.incidentsign}}<br>{{data.incidentDTO?.state?.name}}</td>
70
+            <td>
71
+              <div class="coop">
72
+                <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
73
+              </div>
74
+            </td>
75
+          </tr>
76
+        </tbody>
77
+      </nz-table>
78
+      <div class="list-template__pagination">
79
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" nzShowSizeChanger
80
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
81
+        </nz-pagination>
82
+      </div>
83
+    </div>
84
+  </div>
85
+</div>
86
+<!-- 模态框 -->
87
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
88
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
89
+<!-- 操作成功/失败提示框 -->
90
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
91
+  [info]="promptInfo">
92
+</app-prompt-modal>
93
+
94
+<!-- 指派 -->
95
+<app-inspection-execute-assign-prompt-modal
96
+  [deptFlag]="inspectionExecuteAssignPromptModalShow"
97
+  (submitFormHand)="confirmModelInspectionExecuteAssign($event)"
98
+  (deptFlagHand)="closeModelInspectionExecuteAssign($event)"
99
+  *ngIf="inspectionExecuteAssignPromptModalShow"
100
+></app-inspection-execute-assign-prompt-modal>
101
+
102
+<!-- 遮罩 -->
103
+<app-mask *ngIf="maskFlag"></app-mask>
104
+
105
+<!-- 查看详情 -->
106
+<router-outlet></router-outlet>
107
+
108
+<!-- 详情 -->
109
+<app-incident-detail [id]="coopData.incidentId" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>

+ 179 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.less

@@ -0,0 +1,179 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  ::ng-deep .ant-calendar-picker {
5
+    width: 100% !important;
6
+  }
7
+  .list-template__top{
8
+    overflow: visible!important;
9
+    .label{
10
+      width: auto!important;
11
+    }
12
+  }
13
+}
14
+.save {
15
+  position: fixed;
16
+  left: 0;
17
+  top: 0;
18
+  width: 100%;
19
+  height: 100%;
20
+  background: rgba(0, 0, 0, 0.4);
21
+  z-index: 99;
22
+
23
+  .modalBody {
24
+    width: 350px;
25
+    background: #fff;
26
+    border-radius: 5px;
27
+    padding: 10px 20px;
28
+    color: #333;
29
+
30
+    .title {
31
+      width: 100%;
32
+      text-align: center;
33
+      font-size: 18px;
34
+      position: relative;
35
+
36
+      i {
37
+        position: absolute;
38
+        right: 0;
39
+        top: 0;
40
+        font-size: 20px;
41
+        color: #666;
42
+        cursor: pointer;
43
+        padding: 0 5px;
44
+      }
45
+    }
46
+
47
+    .content {
48
+      width: 310px;
49
+      background: #f9fafb;
50
+      border: 1px solid #e5e9ed;
51
+      border-radius: 5px;
52
+      overflow: hidden;
53
+      margin-top: 12px;
54
+      padding: 16px 0;
55
+
56
+      .busyList{
57
+        display: flex;
58
+        margin-bottom: 8px;
59
+        .busyContent{
60
+          margin-right: 8px;
61
+          flex: 1;
62
+        }
63
+      }
64
+
65
+      & > div {
66
+        text-align: center;
67
+        margin: 0;
68
+
69
+        &.icon {
70
+          // margin-top: 17px;
71
+
72
+          i {
73
+            color: #34b349;
74
+            font-size: 30px !important;
75
+
76
+            &.transport-wenhao {
77
+              color: #f5a523;
78
+            }
79
+
80
+            &.transport-shibai {
81
+              color: #ff3a52;
82
+            }
83
+          }
84
+        }
85
+
86
+        &.defeat {
87
+          color: #333;
88
+          font-size: 14px;
89
+        }
90
+
91
+        &:nth-child(3) {
92
+          font-size: 14px;
93
+          color: #666;
94
+        }
95
+      }
96
+      .workAssignmentTips {
97
+        font-size: 12px;
98
+      }
99
+    }
100
+
101
+    button {
102
+      margin-top: 10px;
103
+
104
+      &.btn {
105
+        margin-left: 8px;
106
+      }
107
+    }
108
+  }
109
+
110
+  // 新增
111
+  &.add {
112
+    .modalBody {
113
+      width: 480px;
114
+      height: auto;
115
+
116
+      .content {
117
+        width: 100%;
118
+        height: auto;
119
+        padding: 16px;
120
+        max-height: 497px;
121
+        overflow-y: auto;
122
+
123
+        .addForm {
124
+          .ant-form-item {
125
+            margin-bottom: 0;
126
+
127
+            .ant-form-item-label {
128
+              text-align: left;
129
+            }
130
+
131
+            .desc {
132
+              margin-top: 5px;
133
+            }
134
+          }
135
+
136
+          .datesControl {
137
+            margin-top: -16px;
138
+
139
+            .ant-form-item-label {
140
+              line-height: 40px;
141
+            }
142
+          }
143
+
144
+          .timer {
145
+            .ant-form-item-label {
146
+              width: 100%;
147
+              text-align: left;
148
+            }
149
+
150
+            .numInp {
151
+              margin-right: 5px;
152
+            }
153
+
154
+            .line {
155
+              margin-right: 5px;
156
+            }
157
+          }
158
+
159
+          .timer2 {
160
+            .ant-form-item-label {
161
+              line-height: 20px;
162
+            }
163
+          }
164
+        }
165
+
166
+        .editForm {
167
+          .ant-form-item {
168
+            margin-bottom: 15px;
169
+
170
+            .ant-form-item-label {
171
+              line-height: 14px;
172
+              text-align: left;
173
+            }
174
+          }
175
+        }
176
+      }
177
+    }
178
+  }
179
+}

+ 207 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.ts

@@ -0,0 +1,207 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { ToolService } from "../../services/tool.service";
7
+import { NzMessageService } from 'ng-zorro-antd';
8
+import { Subject } from 'rxjs';
9
+import { debounceTime } from 'rxjs/operators';
10
+@Component({
11
+  selector: "app-patient-inspect-log",
12
+  templateUrl: "./patient-inspect-log.component.html",
13
+  styleUrls: ["./patient-inspect-log.component.less"],
14
+})
15
+export class PatientInspectLogComponent implements OnInit {
16
+  constructor(
17
+    private fb: FormBuilder,
18
+    private mainService: MainService,
19
+    private route: ActivatedRoute,
20
+    private router: Router,
21
+    private tool: ToolService,
22
+    private message: NzMessageService,
23
+  ) {}
24
+
25
+  listOfData: any[] = []; //表格数据
26
+  pageIndex: number = 1; //表格当前页码
27
+  pageSize: number = 10; //表格每页展示条数
28
+  listLength: number = 10; //表格总数据量
29
+  modal: boolean = false; //新增/编辑模态框
30
+  add: boolean; //true:新增;false:编辑
31
+  validateForm: FormGroup; //新增/编辑表单
32
+  coopData: any; //当前操作列
33
+  currentHospital; //当前院区
34
+
35
+  btnLoading: boolean = false; //提交按钮loading状态
36
+
37
+  promptContent: string; //操作提示框提示信息
38
+  ifSuccess: boolean; //操作成功/失败
39
+  promptInfo: string; //操作结果提示信息
40
+  promptModalShow: boolean; //操作提示框是否展示
41
+  nextSchemeName = ""; //下一个开启的方案名称
42
+  modelName = ""; //模态框名称
43
+
44
+  searchTimerSubject = new Subject(); //防抖
45
+  showDropdown:boolean = false;
46
+
47
+  ngOnInit() {
48
+    //防抖
49
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
50
+      let fun = v[0];
51
+      fun.call(this, v[1]);
52
+    });
53
+    this.currentHospital = this.tool.getCurrentHospital();
54
+    this.coopBtns = this.tool.initCoopBtns(this.route);
55
+    this.getList(1);
56
+    this.getStatus();
57
+  }
58
+
59
+  // 初始化增删改按钮
60
+  coopBtns: any = {};
61
+
62
+  // 查看
63
+  detail(e, id) {
64
+    e.stopPropagation();
65
+    this.router.navigateByUrl("/main/inspectionExecute/inspectionExecuteDetail/" + id);
66
+  }
67
+
68
+  // 搜索
69
+  search() {
70
+    this.getList(1);
71
+  }
72
+  // 重置
73
+  reset() {
74
+    this.searchDto = {};
75
+    this.getList(1);
76
+  }
77
+
78
+  // 表格数据
79
+  searchDto: any = {};
80
+  loading1 = false;
81
+  getList(type) {
82
+    if (type == 1) {
83
+      this.pageIndex = 1;
84
+    }
85
+    let data = {
86
+      idx: this.pageIndex - 1,
87
+      sum: this.pageSize,
88
+      patientInspectLog: {
89
+        hosId: this.currentHospital.id,
90
+        deptId: this.searchDto.deptId || undefined,
91
+        batchId: this.searchDto.patientId || undefined,
92
+        state: this.searchDto.stateId ? { id: this.searchDto.stateId } : undefined,
93
+      },
94
+    };
95
+    this.loading1 = true;
96
+    this.mainService
97
+      .getFetchDataList("simple/data", "patientInspectLog", data)
98
+      .subscribe((data) => {
99
+        this.loading1 = false;
100
+        if (data.status == 200) {
101
+          this.listOfData = data.list;
102
+          this.listLength = data.totalNum;
103
+        }else{
104
+          this.message.error(data.msg || "请求数据失败");
105
+        }
106
+      });
107
+  }
108
+
109
+  // 防抖
110
+  isLoading = false;
111
+  isSelecting:boolean = false; // 是否在选中状态
112
+  searchTimer(fun, e) {
113
+    if (this.isSelecting) {
114
+      this.isSelecting = false; // 重置标志
115
+      return; // 跳过处理
116
+    }
117
+    this.isLoading = true;
118
+    this.searchTimerSubject.next([fun, e]);
119
+  }
120
+
121
+  // 搜索
122
+  changeInp(type, e) {
123
+    if(type === 'department'){
124
+      this.searchTimer(this.getDeptList, e);
125
+    }else if(type === 'patient'){
126
+      this.searchTimer(this.getPatientList, e);
127
+    }
128
+  }
129
+
130
+  // 设置标志
131
+  setIsSelecting(flag){
132
+    this.isSelecting = flag; // 设置标志
133
+  }
134
+
135
+  openChangeDept(flag){
136
+    flag && this.setIsSelecting(false);
137
+    flag && this.getDeptList();
138
+  }
139
+
140
+  // 获取科室
141
+  deptList: any = [];
142
+  getDeptList(e = undefined) {
143
+    let postData = {
144
+      idx: 0,
145
+      sum: 20,
146
+      department: {
147
+        searchType: 1,// 简单查询
148
+        cascadeHosId: this.currentHospital.id,
149
+        dept: e,
150
+      }
151
+    };
152
+    this.isLoading = true;
153
+    this.mainService
154
+      .getFetchDataList("simple/data", "department", postData)
155
+      .subscribe((data) => {
156
+        this.isLoading = false;
157
+        this.deptList = data.list || [];
158
+      });
159
+  }
160
+
161
+  openChangePatient(flag){
162
+    flag && this.setIsSelecting(false);
163
+    flag && this.getPatientList();
164
+  }
165
+
166
+  // 获取科室
167
+  patientList: any = [];
168
+  getPatientList(e = undefined) {
169
+    let postData = {
170
+      idx: 0,
171
+      sum: 20,
172
+      patient: {
173
+        hosId: this.currentHospital.id,
174
+        keyWord: e,
175
+      }
176
+    };
177
+    this.isLoading = true;
178
+    this.mainService
179
+      .getFetchDataList("simple/data", "patient", postData)
180
+      .subscribe((data) => {
181
+        this.isLoading = false;
182
+        this.patientList = data.list || [];
183
+      });
184
+  }
185
+
186
+  //获取状态
187
+  stateList:any[] = [];
188
+  getStatus() {
189
+    this.mainService
190
+    .getDictionary('list', 'patient_inspect_state')
191
+    .subscribe((data) => {
192
+      this.stateList = data || [];
193
+    });
194
+  }
195
+
196
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
197
+  showPromptModal(con, success, promptInfo?) {
198
+    this.promptModalShow = false;
199
+    this.promptContent = con;
200
+    this.ifSuccess = success;
201
+    this.promptInfo = promptInfo;
202
+    setTimeout(() => {
203
+      this.promptModalShow = true;
204
+    }, 100);
205
+    this.getList(0);
206
+  }
207
+}

+ 21 - 0
src/app/views/patient-inspect-log/patient-inspect-log.module.ts

@@ -0,0 +1,21 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { PatientInspectLogRoutingModule } from './patient-inspect-log-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
7
+import { PatientInspectLogComponent } from './patient-inspect-log.component';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+    PatientInspectLogComponent
13
+  ],
14
+  imports: [
15
+    CommonModule,
16
+    PatientInspectLogRoutingModule,
17
+    ShareModule,
18
+    IncidentDetailModule,
19
+  ]
20
+})
21
+export class PatientInspectLogModule { }