diff --git a/app/Http/Controllers/Staff/StudiesController.php b/app/Http/Controllers/Staff/StudiesController.php index 0fbfc7c..4e70997 100644 --- a/app/Http/Controllers/Staff/StudiesController.php +++ b/app/Http/Controllers/Staff/StudiesController.php @@ -25,7 +25,32 @@ public function show() { $this->decodeKeys(); $study = Study::with(['details'])->findOrFail($this->key); + $fmtD = 'M d, Y'; + $fmtDT = 'M d, Y h:i A'; + $data = [ + 'Patient Name' => $study->patient_name, + 'Patient Id' => $study->patient_id, + 'Patient Sex' => $study->patient_sex, + 'Patient Birthdate' => $study->patient_birthdate?->format($fmtD)??'', + 'Accession #' => $study->accession_number, + 'Modality' => $study->modality, + 'Study Date' => $study->study_date->format($fmtDT), + 'Receive Date' => $study->received_at->format($fmtDT), + 'Description' => $study->study_description, + 'Body Part' => $study->body_part_examined, + 'Priority' => $study->priority->name, + 'Institution' => $study->institution_name, + 'Images #' => $study->image_count, + 'Series #' => $study->series_count, + 'D/L Size' => human_filesize($study->disk_size,1), + ]; + $properties = collect($study->details->properties); + $data['Manufacturer']=$properties->get('manufacturer'); + $data['Model']=$properties->get('manufacturer_model_name'); + $data['S/W Version']=$properties->get('software_versions'); + $data['Station']=$properties->get('station_name'); + $data['Operator']=$properties->get('operators_name'); - return view('staff.studies.show-details', compact('study')); + return view('staff.studies.show-details', compact('data')); } } diff --git a/app/Models/Study.php b/app/Models/Study.php index 31cf1a1..af42566 100644 --- a/app/Models/Study.php +++ b/app/Models/Study.php @@ -272,6 +272,7 @@ protected function casts(): array 'reported_at' => 'immutable_datetime', 'assigned_at' => 'immutable_datetime', 'study_date' => 'immutable_datetime', + 'patient_birthdate' => 'immutable_date', ]; } } diff --git a/package-lock.json b/package-lock.json index 7387e2a..be70e24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "Materialize", - "version": "2.0.1", + "name": "radsparc", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "Materialize", - "version": "2.0.1", + "name": "radsparc", + "version": "0.0.1", "license": "Commercial", "dependencies": { "@form-validation/bundle": "2.4.0", diff --git a/resources/views/staff/studies/show-details.blade.php b/resources/views/staff/studies/show-details.blade.php index 3452428..b21f2ab 100644 --- a/resources/views/staff/studies/show-details.blade.php +++ b/resources/views/staff/studies/show-details.blade.php @@ -1,7 +1,18 @@ -
-

Study ID: {{ $study->id }}

-

Patient Name: {{ $study->patient_name }}

-

Study Description: {{ $study->study_description }}

-

Study Date: {{ $study->study_date }}

- +@php + $chunks = array_chunk($data, 2, true); +@endphp + +
+ + + @foreach ($chunks as $chunk) + + @foreach ($chunk as $key => $value) + + + @endforeach + + @endforeach + +
{{ $key }}{{ $value }}
diff --git a/resources/views/staff/worklist/table.blade.php b/resources/views/staff/worklist/table.blade.php index 5304faf..7aeba1f 100644 --- a/resources/views/staff/worklist/table.blade.php +++ b/resources/views/staff/worklist/table.blade.php @@ -61,11 +61,10 @@