diff --git a/app/Http/Controllers/Staff/StudyAssignmentController.php b/app/Http/Controllers/Staff/StudyAssignmentController.php index 5acaaeb..813e12f 100644 --- a/app/Http/Controllers/Staff/StudyAssignmentController.php +++ b/app/Http/Controllers/Staff/StudyAssignmentController.php @@ -5,6 +5,7 @@ use App\DAL\Radiologists; use App\Http\Controllers\HashidControllerBase; use App\Http\Requests\AssignPhysicianRequest; +use App\Models\Enums\ReportStatus; use App\Models\Enums\UserRole; use App\Models\Study; use App\Models\User; @@ -18,12 +19,12 @@ public function show() $this->decodeKeys(); $study = Study::with('assignedPhysician')->findOrFail($this->key); $rads = User::active()->role(UserRole::Radiologist)->get(['id', 'display_name', 'profile_photo_path', 'first_name', 'last_name', 'created_at']); - $stats = Radiologists::worklist_stats(); + $stats = Radiologists::worklist_stats(3, ReportStatus::Finalized->value); foreach ($stats as $rad) { $found = $rads->where('id', $rad->id)->first(); if ($found) { $found->info['workload'] = $rad->workload; - $found->info['last_seen'] = 'Seen: ' . ($rad->last_seen ?? Carbon::now()->addHours(-10))->diffForHumans(); + $found->info['last_seen'] = ($rad->last_seen ?? Carbon::now()->addHours(-10))->diffForHumans(); } } diff --git a/resources/assets/vendor/scss/_bootstrap-extended/mixins/_badge.scss b/resources/assets/vendor/scss/_bootstrap-extended/mixins/_badge.scss index dd75715..6890a85 100644 --- a/resources/assets/vendor/scss/_bootstrap-extended/mixins/_badge.scss +++ b/resources/assets/vendor/scss/_bootstrap-extended/mixins/_badge.scss @@ -7,3 +7,13 @@ width: $badge-width; @include font-size($badge-font-size); } + + +.badge-tiny { + min-width: 1.8em; + padding: .25em !important; + margin-left: .1em; + margin-right: .1em; + color: white !important; + cursor: pointer; +} diff --git a/resources/assets/vendor/scss/_bootstrap-extended/mixins/_buttons.scss b/resources/assets/vendor/scss/_bootstrap-extended/mixins/_buttons.scss index b7569b9..bf6348c 100644 --- a/resources/assets/vendor/scss/_bootstrap-extended/mixins/_buttons.scss +++ b/resources/assets/vendor/scss/_bootstrap-extended/mixins/_buttons.scss @@ -11,6 +11,7 @@ $active-border: null ) { } + @mixin template-button-variant( $parent, $background, @@ -21,26 +22,26 @@ $border: $background; $color: if($color, $color, color-contrast($background)); $hover-background: if( - $color == $color-contrast-light, - shade-color($background, $btn-hover-bg-shade-amount), - tint-color($background, $btn-hover-bg-tint-amount) + $color == $color-contrast-light, + shade-color($background, $btn-hover-bg-shade-amount), + tint-color($background, $btn-hover-bg-tint-amount) ); $hover-border: if( - $color == $color-contrast-light, - shade-color($border, $btn-hover-border-shade-amount), - tint-color($border, $btn-hover-border-tint-amount) + $color == $color-contrast-light, + shade-color($border, $btn-hover-border-shade-amount), + tint-color($border, $btn-hover-border-tint-amount) ); $hover-color: color-contrast($hover-background); $active-background: if( - $color == $color-contrast-light, - shade-color($background, $btn-active-bg-shade-amount), - tint-color($background, $btn-active-bg-tint-amount) + $color == $color-contrast-light, + shade-color($background, $btn-active-bg-shade-amount), + tint-color($background, $btn-active-bg-tint-amount) ); $active-border: if( - $color == $color-contrast-light, - shade-color($border, $btn-active-border-shade-amount), - tint-color($border, $btn-active-border-tint-amount) + $color == $color-contrast-light, + shade-color($border, $btn-active-border-shade-amount), + tint-color($border, $btn-active-border-tint-amount) ); $active-color: color-contrast($active-background); @@ -49,6 +50,7 @@ @include gradient-bg($background); border-color: $border; @include box-shadow($btn-box-shadow); + &:hover { color: $hover-color !important; @include gradient-bg($hover-background !important); @@ -110,34 +112,35 @@ $hover-color: $background; $hover-background: $background; $hover-background: if( - $hover-color == $color-contrast-light, - shade-color($background, $btn-text-hover-shade-amount, $card-bg), - tint-color($background, $btn-text-hover-tint-amount, $card-bg) + $hover-color == $color-contrast-light, + shade-color($background, $btn-text-hover-shade-amount, $card-bg), + tint-color($background, $btn-text-hover-tint-amount, $card-bg) ); $focus-background: if( - $hover-color == $color-contrast-light, - shade-color($background, $btn-text-focus-shade-amount, $card-bg), - tint-color($background, $btn-text-focus-tint-amount, $card-bg) + $hover-color == $color-contrast-light, + shade-color($background, $btn-text-focus-shade-amount, $card-bg), + tint-color($background, $btn-text-focus-tint-amount, $card-bg) ); $active-color: $hover-color; $active-background: if( - $active-color == $color-contrast-light, - shade-color($background, $btn-text-active-shade-amount, $card-bg), - tint-color($background, $btn-text-active-tint-amount, $card-bg) + $active-color == $color-contrast-light, + shade-color($background, $btn-text-active-shade-amount, $card-bg), + tint-color($background, $btn-text-active-tint-amount, $card-bg) ); #{$parent} { color: $label-color !important; + &.waves-effect { .waves-ripple { background: radial-gradient( - rgba($background, 0.2) 0, - rgba($background, 0.3) 40%, - rgba($background, 0.4) 50%, - rgba($background, 0.5) 60%, - rgba($white, 0) 70% + rgba($background, 0.2) 0, + rgba($background, 0.3) 40%, + rgba($background, 0.4) 50%, + rgba($background, 0.5) 60%, + rgba($white, 0) 70% ); } } @@ -196,50 +199,51 @@ $hover-color: if($color, $color, color-contrast($background)); $label-background: if( - $hover-color == $color-contrast-light, - shade-color($background, $btn-label-bg-shade-amount, $card-bg), - tint-color($background, $btn-label-bg-tint-amount, $card-bg) + $hover-color == $color-contrast-light, + shade-color($background, $btn-label-bg-shade-amount, $card-bg), + tint-color($background, $btn-label-bg-tint-amount, $card-bg) ); $hover-color: $background; $hover-background: $background; $hover-background: if( - $hover-color == $color-contrast-light, - shade-color($background, $btn-label-hover-shade-amount, $card-bg), - tint-color($background, $btn-label-hover-tint-amount, $card-bg) + $hover-color == $color-contrast-light, + shade-color($background, $btn-label-hover-shade-amount, $card-bg), + tint-color($background, $btn-label-hover-tint-amount, $card-bg) ); $focus-background: if( - $hover-color == $color-contrast-light, - shade-color($background, $btn-label-focus-shade-amount, $card-bg), - tint-color($background, $btn-label-focus-tint-amount, $card-bg) + $hover-color == $color-contrast-light, + shade-color($background, $btn-label-focus-shade-amount, $card-bg), + tint-color($background, $btn-label-focus-tint-amount, $card-bg) ); $active-color: $hover-color; $active-background: if( - $active-color == $color-contrast-light, - shade-color($background, $btn-label-active-shade-amount, $card-bg), - tint-color($background, $btn-label-active-tint-amount, $card-bg) + $active-color == $color-contrast-light, + shade-color($background, $btn-label-active-shade-amount, $card-bg), + tint-color($background, $btn-label-active-tint-amount, $card-bg) ); $btn-group-border-color: if( - $dark-style, - shade-color($background, $btn-group-border-shade-amount, $card-bg), - tint-color($background, $btn-group-border-tint-amount, $card-bg) + $dark-style, + shade-color($background, $btn-group-border-shade-amount, $card-bg), + tint-color($background, $btn-group-border-tint-amount, $card-bg) ); #{$parent} { color: $label-color; border-color: $label-background; background: $label-background; + &.waves-effect { .waves-ripple { background: radial-gradient( - rgba($background, 0.2) 0, - rgba($background, 0.3) 40%, - rgba($background, 0.4) 50%, - rgba($background, 0.5) 60%, - rgba($white, 0) 70% + rgba($background, 0.2) 0, + rgba($background, 0.3) 40%, + rgba($background, 0.4) 50%, + rgba($background, 0.5) 60%, + rgba($white, 0) 70% ); } } @@ -267,6 +271,7 @@ background-image: if($enable-gradients, none !important, null); border-color: $active-background !important; } + &.disabled, &:disabled { color: $label-color !important; @@ -302,20 +307,20 @@ $border-color: $color; $hover-background: if( - $color-hover == $color-contrast-light, - shade-color($color, $btn-outline-hover-bg-shade-amount, $card-bg), - tint-color($color, $btn-outline-hover-bg-tint-amount, $card-bg) + $color-hover == $color-contrast-light, + shade-color($color, $btn-outline-hover-bg-shade-amount, $card-bg), + tint-color($color, $btn-outline-hover-bg-tint-amount, $card-bg) ); $focus-background: if( - $color == $color-contrast-light, - shade-color($color, $btn-outline-focus-bg-shade-amount, $card-bg), - tint-color($color, $btn-outline-focus-bg-tint-amount, $card-bg) + $color == $color-contrast-light, + shade-color($color, $btn-outline-focus-bg-shade-amount, $card-bg), + tint-color($color, $btn-outline-focus-bg-tint-amount, $card-bg) ); $active-background: if( - $color == $color-contrast-light, - shade-color($color, $btn-outline-active-bg-shade-amount, $card-bg), - tint-color($color, $btn-outline-active-bg-tint-amount, $card-bg) + $color == $color-contrast-light, + shade-color($color, $btn-outline-active-bg-shade-amount, $card-bg), + tint-color($color, $btn-outline-active-bg-tint-amount, $card-bg) ); $active-border: $border-color; $active-color: $color; @@ -324,14 +329,15 @@ color: $color; border-color: $border-color; background: transparent; + &.waves-effect { .waves-ripple { background: radial-gradient( - rgba($color, 0.2) 0, - rgba($color, 0.3) 40%, - rgba($color, 0.4) 50%, - rgba($color, 0.5) 60%, - rgba($white, 0) 70% + rgba($color, 0.2) 0, + rgba($color, 0.3) 40%, + rgba($color, 0.4) 50%, + rgba($color, 0.5) 60%, + rgba($white, 0) 70% ); } } @@ -381,3 +387,10 @@ color: color-contrast($color-hover); } } + +.btn-group-xs > .btn, .btn-xs { + padding: 1px 5px; + font-size: 12px; + line-height: 1.4; + border-radius: 3px; +} diff --git a/resources/views/staff/studies/assign-form.blade.php b/resources/views/staff/studies/assign-form.blade.php index 6b62c3f..ecacd8b 100644 --- a/resources/views/staff/studies/assign-form.blade.php +++ b/resources/views/staff/studies/assign-form.blade.php @@ -1,27 +1,46 @@ -
-
- Currently assigned: {{ $study->assignedPhysician?->display_name }} -
+@php + $label = isset($study->assignedPhysician) ? 'Re-assign': 'Assign'; + $color = isset($study->assignedPhysician) ? 'btn-instagram': 'btn-primary'; +@endphp +
+ + + + + + + + + + + + + +
Patient ID{{ $study->patient_id }}
Patient Name{{ $study->patient_name }}
Currently assigned + @isset($study->assignedPhysician) +
+ {{ $study->assignedPhysician?->display_name }} +
+ @csrf + @method('DELETE') + +
+
+ @endisset +
- @isset($study->assignedPhysician) -
- @csrf - @method('DELETE') - -
- @endisset
- - - - - + + + + - - @foreach ($rads as $doc) @@ -36,10 +55,13 @@ {{ $doc->display_name }} @if ($study->isAssigned($doc->id)) - + @endif - {{ $doc->info['last_seen'] }} + + + {{ $doc->info['last_seen'] }} + @@ -52,7 +74,10 @@ @csrf - + @endif
PhysicianWorkload 
PhysicianWorkload