study info

This commit is contained in:
Masroor Ehsan 2025-01-05 21:03:41 +06:00
parent e83cc80dbe
commit 7513e8ce65
5 changed files with 49 additions and 13 deletions

View File

@ -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'));
}
}

View File

@ -272,6 +272,7 @@ protected function casts(): array
'reported_at' => 'immutable_datetime',
'assigned_at' => 'immutable_datetime',
'study_date' => 'immutable_datetime',
'patient_birthdate' => 'immutable_date',
];
}
}

8
package-lock.json generated
View File

@ -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",

View File

@ -1,7 +1,18 @@
<div>
<h4>Study ID: {{ $study->id }}</h4>
<p>Patient Name: {{ $study->patient_name }}</p>
<p>Study Description: {{ $study->study_description }}</p>
<p>Study Date: {{ $study->study_date }}</p>
<!-- Add more study details as needed -->
@php
$chunks = array_chunk($data, 2, true);
@endphp
<div class="fs-6 text-nowrap table-responsive">
<table class="table table-sm table-bordered">
<tbody>
@foreach ($chunks as $chunk)
<tr>
@foreach ($chunk as $key => $value)
<td class="table-active fw-bold">{{ $key }}</td>
<td class="fw-medium">{{ $value }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>

View File

@ -61,11 +61,10 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="studyModalLabel">Study Details</h5>
<h5 class="modal-title" id="studyModalLabel">Study Information</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Study details will be loaded here -->
<div id="studyDetails"></div>
</div>
</div>