Skip to content

Commit

Permalink
Merge pull request #1035 from hpi-sam/release/v0.7.1
Browse files Browse the repository at this point in the history
Release v0.7.1
  • Loading branch information
benn02 authored Jul 10, 2023
2 parents 0e30049 + 9240412 commit b05b0dc
Show file tree
Hide file tree
Showing 41 changed files with 284 additions and 51 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project does **not** adhere to [Semantic Versioning](https://semver.org

## [Unreleased]

## [0.7.1] - 2023-07-10

## Added

- Patients can be identified with an unique ID
- The ID is assigned to every patient automatically
- The ID consists of a 4 digit number incremented for each patients
- Optionally, a prefix for the IDs can be set
- The ID is shown in the patient popup, the simulation overview, statistics log entries and for hospital patients
- There is a new image for NAW vehicles.

## [0.7.0] - 2023-05-30

### Added
Expand Down Expand Up @@ -262,7 +273,8 @@ and this project does **not** adhere to [Semantic Versioning](https://semver.org

### Initial unstable release of Digitale FüSim MANV

[Unreleased]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.7.0...HEAD
[Unreleased]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.7.1...HEAD
[0.7.1]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/hpi-sam/digital-fuesim-manv/compare/v0.5.0...v0.5.1
Expand Down
6 changes: 3 additions & 3 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digital-fuesim-manv-backend",
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"scripts": {
"start:once:linux-macos": "NODE_ENV=production node --experimental-specifier-resolution=node dist/src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digital-fuesim-manv-benchmark",
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"scripts": {
"lint": "eslint --max-warnings 0 --ignore-path .gitignore \"./**/*.{ts,js,yml,html}\"",
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Digital Fuesim MANV HTTP API
description: HTTP API of the digital-fuesim-manv project
version: 0.7.0
version: 0.7.1
paths:
/api/health:
get:
Expand Down
6 changes: 3 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digital-fuesim-manv-frontend",
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"scripts": {
"cy:open": "cypress open",
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/app/pages/exercises/exercise/exercise.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import {
NgbDropdownModule,
NgbTooltipModule,
} from '@ng-bootstrap/ng-bootstrap';
import { SharedModule } from 'src/app/shared/shared.module';
import { ExerciseComponent } from './exercise/exercise.component';
import { AlarmGroupOverviewModule } from './shared/alarm-group-overview/alarm-group-overview.module';
Expand Down Expand Up @@ -48,6 +51,7 @@ import { CoordinatePickerModule } from './shared/coordinate-picker/coordinate-pi
HospitalEditorModule,
EmergencyOperationsCenterModule,
CoordinatePickerModule,
NgbTooltipModule,
],
exports: [ExerciseComponent],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<ng-container>
<h5 class="popover-header">
<app-patient-name [patientId]="patientId" />
<app-patient-identifier [patientId]="patientId" />
<span>{{ ' ' }}</span>
<app-patient-health-point-display [patientId]="patientId" />
<button
(click)="closePopup()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,63 @@ <h4 class="modal-title">Einstellungen</h4>
<div *ngIf="configuration$ | async as configuration" class="card">
<div class="card-header">Übungsmodus</div>
<div class="card-body">
Mit Vorsichtung üben?
<div class="form-switch">
<input
[ngModel]="configuration.pretriageEnabled"
(ngModelChange)="setPretriageFlag($event)"
class="form-check-input"
type="checkbox"
data-cy="settingsPretriageCheckbox"
/>
<div class="form-group mb-3">
Mit Vorsichtung üben?
<div class="form-switch">
<input
[ngModel]="configuration.pretriageEnabled"
(ngModelChange)="setPretriageFlag($event)"
class="form-check-input"
type="checkbox"
data-cy="settingsPretriageCheckbox"
/>
</div>
</div>

<div class="form-group mb-3">
Mit SK IV Patienten üben?
<div class="form-switch">
<input
[ngModel]="configuration.bluePatientsEnabled"
(ngModelChange)="setBluePatientsFlag($event)"
class="form-check-input"
type="checkbox"
data-cy="settingsBluePatientsCheckbox"
/>
</div>
</div>
Mit SK IV Patienten üben?
<div class="form-switch">

<div class="form-group">
<label class="form-label mb-0">Präfix der Patienten-IDs:</label>
<span
class="text-warning"
ngbTooltip="Das Präfix bestehender IDs wird nicht geändert!"
>
{{ ' ' }}<i class="bi bi-exclamation-triangle"></i>
</span>
<span
*ngIf="configuration.patientIdentifierPrefix.length > 3"
class="text-warning d-block"
>
IDs mit langen Präfixen können ggfs nicht vollständig
angezeigt werden. Bitte ziehen Sie ein kürzeres Präfix in
Betracht.
</span>
<span class="text-muted d-block">
Mit den aktuellen Einstellungen haben Patienten-IDs die
folgende Form:
<code>{{ configuration.patientIdentifierPrefix }}1234</code>
</span>
<input
[ngModel]="configuration.bluePatientsEnabled"
(ngModelChange)="setBluePatientsFlag($event)"
class="form-check-input"
type="checkbox"
data-cy="settingsBluePatientsCheckbox"
#patientIdentifierPrefixInput="ngModel"
[ngModel]="configuration.patientIdentifierPrefix"
(appSaveOnTyping)="updatePatientIdentifierPrefix($event)"
class="form-control"
type="text"
placeholder="Präfix, z.B. B-"
/>
<app-display-validation
[ngModelInput]="patientIdentifierPrefixInput"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ export class ExerciseSettingsModalComponent {
});
}

public updatePatientIdentifierPrefix(patientIdentifierPrefix: string) {
this.exerciseService.proposeAction({
type: '[Configuration] Set patientIdentifierPrefix',
patientIdentifierPrefix,
});
}

public close() {
this.activeModal.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<thead>
<tr>
<!-- If you change a sort-header here, you must also update HospitalPatientsRow in the component! -->
<th mat-sort-header="patientIdentifier">ID</th>
<th mat-sort-header="patientStatus">Patientenkategorie</th>
<th mat-sort-header="vehicleType">Fahrzeugtyp</th>
<th mat-sort-header="departureTime">Abfahrtszeit</th>
Expand All @@ -16,6 +17,7 @@
</thead>
<tbody>
<tr *ngFor="let row of sortedRows$ | async">
<td>{{ row.patientIdentifier }}</td>
<td>{{ row.patientStatus }}</td>
<td>{{ row.vehicleType }}</td>
<td>{{ row.departureTime | formatDuration }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class HospitalPatientsTableComponent {
_hospital.patientIds[hospitalPatient.patientId]
);
const row: HospitalPatientsRow = {
patientIdentifier: hospitalPatient.identifier,
hospitalName: hospital!.name,
arrivalTime: hospitalPatient.arrivalTime,
departureTime: hospitalPatient.startTime,
Expand Down Expand Up @@ -73,6 +74,7 @@ export class HospitalPatientsTableComponent {

// If you update this interface you must also update the `mat-sort-header` in the template.
interface HospitalPatientsRow {
patientIdentifier: string;
hospitalName: string;
patientStatus: string;
arrivalTime: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">SK</th>
<th scope="col">Gesichtet</th>
<th scope="col">Verlauf</th>
Expand All @@ -19,6 +20,9 @@
[class.table-primary]="selectedPatientId === patient.id"
style="cursor: pointer"
>
<td>
<app-patient-identifier [patientId]="patient.id" />
</td>
<td>
<app-patient-status-badge [status]="patient.realStatus" />
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ <h4 class="ps-0 pe-0 text-nowrap">
>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">SK</th>
<th scope="col">Gesichtet</th>
<th scope="col">Verlauf</th>
Expand All @@ -284,6 +285,9 @@ <h4 class="ps-0 pe-0 text-nowrap">
[class.table-primary]="selectedPatients[patient.id]"
style="cursor: pointer"
>
<td>
<app-patient-identifier [patientId]="patient.id" />
</td>
<td>
<app-patient-status-badge [status]="patient.realStatus" />
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<div class="col-sm d-inline-flex justify-content-center">
<app-patient-identifier [patientId]="patientId" />
</div>
<div class="col-sm d-inline-flex justify-content-center">
<app-patient-status-badge
[status]="(visibleStatus$ | async)!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ <h5 class="mt-2">Derzeitige Zuordnung</h5>
#collapse="ngbCollapse"
[(ngbCollapse)]="informationCollapsed"
>
<div class="col-sm justify-content-center">
<h6 class="text-center">ID</h6>
</div>
<div class="col-sm justify-content-center">
<h6 class="text-center">Sichtungs<wbr />kategorie</h6>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="container d-flex flex-row h-100" style="min-height: 0; gap: 4px">
<div
class="col mh-100 overflow-auto border-end border-secondary pe-1"
style="max-width: 30%"
style="max-width: 35%"
>
<app-simulated-region-overview-patients-table
[patients]="(patients$ | async) ?? []"
[selectedPatientId]="selectedPatientId"
scope="simulatedRegion"
/>
</div>
<div class="col overflow-hidden d-flex flex-column" style="max-width: 70%">
<div class="col overflow-hidden d-flex flex-column" style="max-width: 65%">
<app-patients-details
class="overflow-auto w-100 d-inline-block flex-grow-1"
*ngIf="selectedPatientId; else noSelectedPatient"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span class="font-monospace">{{ (patient$ | async)?.identifier }}</span>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import type { Patient } from 'digital-fuesim-manv-shared';
import { UUID } from 'digital-fuesim-manv-shared';
import type { Observable } from 'rxjs';
import type { AppState } from 'src/app/state/app.state';
import { createSelectPatient } from 'src/app/state/application/selectors/exercise.selectors';

@Component({
selector: 'app-patient-identifier',
templateUrl: './patient-identifier.component.html',
styleUrls: ['./patient-identifier.component.scss'],
})
export class PatientIdentifierComponent implements OnInit {
@Input() patientId!: UUID;

patient$!: Observable<Patient>;

constructor(private readonly store: Store<AppState>) {}

ngOnInit(): void {
this.patient$ = this.store.select(createSelectPatient(this.patientId));
}
}
Loading

0 comments on commit b05b0dc

Please sign in to comment.