diff --git a/Modules/Client/Http/Controllers/Api/CorporateMemberController.php b/Modules/Client/Http/Controllers/Api/CorporateMemberController.php
index c97bf934..14acd29a 100644
--- a/Modules/Client/Http/Controllers/Api/CorporateMemberController.php
+++ b/Modules/Client/Http/Controllers/Api/CorporateMemberController.php
@@ -222,7 +222,7 @@ class CorporateMemberController extends Controller
'requestLogBenefits:id,request_log_id,benefit_id,amount_incurred,amount_approved,amount_not_approved,excess_paid,keterangan' => [
'benefit'
],
- 'requestLogDailyMonitorings:id,request_log_id,created_at,subject,body_temperature,sistole,diastole,respiration_rate,analysis,lab_date,provider,examination' => [
+ 'requestLogDailyMonitorings:id,request_log_id,submission_date,subject,body_temperature,sistole,diastole,respiration_rate,analysis,lab_date,provider,examination' => [
'requestLogMedicalPlans:request_log_daily_monitoring_id,plan,type',
// 'document'
],
diff --git a/Modules/Client/Transformers/AlarmCenter/DataListClaimMemberResource.php b/Modules/Client/Transformers/AlarmCenter/DataListClaimMemberResource.php
index 9b815b95..0f3bee66 100644
--- a/Modules/Client/Transformers/AlarmCenter/DataListClaimMemberResource.php
+++ b/Modules/Client/Transformers/AlarmCenter/DataListClaimMemberResource.php
@@ -4,6 +4,7 @@ namespace Modules\Client\Transformers\AlarmCenter;
use Illuminate\Http\Resources\Json\JsonResource;
use App\Models\Service;
+use App\Models\Organization;
class DataListClaimMemberResource extends JsonResource
{
@@ -16,10 +17,15 @@ class DataListClaimMemberResource extends JsonResource
public function toArray($request)
{
$serviceData = Service::where('code', $this->service_code)->first();
+ $organization = Organization::where('id', $this->organization_id)->first();
+ $organizationName = '-';
+ if ($organization){
+ $organizationName = $organization->name;
+ }
if ($serviceData) {
$serviceName = $serviceData->name;
} else {
- $serviceName = $this->service_cod;
+ $serviceName = $this->service_code;
}
if ($this->status == 'approved' && $this->status_final_log ){
@@ -34,6 +40,7 @@ class DataListClaimMemberResource extends JsonResource
'admission_date' => $this->submission_date ?? null,
'discharge_date' => $this->discharge_date ?? null,
'code' => $this->code ?? null,
+ 'provider_name' => $organizationName ?? null,
'service_type' => $serviceName,
'status' => $status,
];
diff --git a/Modules/Client/Transformers/AlarmCenter/DataServiceMonitoring.php b/Modules/Client/Transformers/AlarmCenter/DataServiceMonitoring.php
index 175b48b7..22933443 100644
--- a/Modules/Client/Transformers/AlarmCenter/DataServiceMonitoring.php
+++ b/Modules/Client/Transformers/AlarmCenter/DataServiceMonitoring.php
@@ -111,7 +111,7 @@ class DataServiceMonitoring extends JsonResource
'dischargeDate' => $this->discharge_date ?? null,
'dailyMonitorings' => $this->when($this->service_code === 'IP', collect($this->requestLogDailyMonitorings)
->groupBy(function ($requestLogDailyMonitoring) {
- return $requestLogDailyMonitoring->created_at->format('d M Y');
+ return Carbon::parse($requestLogDailyMonitoring->submission_date)->format('d M Y');
})
->map(function ($groupedItems) {
return collect($groupedItems)
@@ -138,7 +138,7 @@ class DataServiceMonitoring extends JsonResource
return [
- 'time' => $requestLogDailyMonitoring->created_at->format('H:i') ?? null,
+ 'time' => Carbon::parse($requestLogDailyMonitoring->submission_date)->format('H:i') ?? null,
'status' => 'Done' ?? null,
'subject' => $requestLogDailyMonitoring->subject ?? null,
'bodyTemperature' => $requestLogDailyMonitoring->body_temperature ?? null,
@@ -168,18 +168,18 @@ class DataServiceMonitoring extends JsonResource
return Carbon::createFromFormat('d M Y', $date)->format('Y-m-d');
})
->all()) ?? null,
- 'laboratoriumResults' => $this->whenLoaded('requestLogDailyMonitorings', collect($this->requestLogDailyMonitorings)
+ 'laboratoriumResults' => $this->when($this->service_code === 'IP', collect($this->requestLogDailyMonitorings)
->groupBy(function ($requestLogDailyMonitoring) {
return Carbon::parse($requestLogDailyMonitoring->lab_date)->format('d M Y');
})
->map(function ($groupedItems) {
return collect($groupedItems)
- ->map(function ($requestLogDailyMonitoring) {
+ ->map(function ($test) {
$arr_document = [];
$document = DB::table('files')
->where([
'fileable_type' => 'App\Models\LaboratoriumResult',
- 'fileable_id' => $requestLogDailyMonitoring->id,
+ 'fileable_id' => $test->id,
'deleted_at' => null
])
->whereIn('type', ['laboratorium-result'])
@@ -195,10 +195,10 @@ class DataServiceMonitoring extends JsonResource
}
}
return [
- 'code' => $requestLogDailyMonitoring->code,
- 'date' => Carbon::parse($requestLogDailyMonitoring->lab_date)->format('d M Y') ?? null,
- 'examination' => $requestLogDailyMonitoring->examination ?? null,
- 'location' => $requestLogDailyMonitoring->provider ?? null,
+ 'code' => $test->code,
+ 'date' => Carbon::parse($test->lab_date)->format('d M Y') ?? null,
+ 'examination' => $test->examination ?? null,
+ 'location' => $test->provider ?? null,
'files' => $arr_document
];
})
diff --git a/frontend/client-portal/src/pages/AlarmCenter/ListMember.tsx b/frontend/client-portal/src/pages/AlarmCenter/ListMember.tsx
index 8324b208..128ded13 100644
--- a/frontend/client-portal/src/pages/AlarmCenter/ListMember.tsx
+++ b/frontend/client-portal/src/pages/AlarmCenter/ListMember.tsx
@@ -109,6 +109,12 @@ export default function List() {
label: 'Code',
isSort: true,
},
+ {
+ id: 'provider_name',
+ align: 'left',
+ label: 'Provider',
+ isSort: false,
+ },
{
id: 'service_type',
align: 'center',
diff --git a/frontend/dashboard/src/pages/CaseManagement/DailyMonitoring/Components/DetailMonitoringForm.tsx b/frontend/dashboard/src/pages/CaseManagement/DailyMonitoring/Components/DetailMonitoringForm.tsx
index 9a5e5c52..2643b9ec 100644
--- a/frontend/dashboard/src/pages/CaseManagement/DailyMonitoring/Components/DetailMonitoringForm.tsx
+++ b/frontend/dashboard/src/pages/CaseManagement/DailyMonitoring/Components/DetailMonitoringForm.tsx
@@ -364,7 +364,7 @@ export default function DetailMonitoringList() {
/>
{
- index == (fields1.length-1) ?
+ index === 0 ?
(
append1({medical_plan_str: ''})}>
@@ -374,11 +374,22 @@ export default function DetailMonitoringList() {
)
:
(
-
- remove1(index)}>
-
-
-
+ index === (fields1.length - 1) ?
+ (
+
+ remove1(index)}>
+
+
+
+ )
+ :
+ (
+
+ append1({medical_plan_str: ''})}>
+
+
+
+ )
)
}
@@ -410,21 +421,30 @@ export default function DetailMonitoringList() {
/>
{
- index == (fields2.length-1) ?
+ index === 0 ?
(
append2({non_medikamentosa_plan_str: ''})}>
-
- )
- :
- (
-
- remove2(index)}>
-
-
-
+
+ ) : (
+ index == (fields2.length-1) ?
+ (
+
+ remove2(index)}>
+
+
+
+ )
+ :
+ (
+
+ append2({non_medikamentosa_plan_str: ''})}>
+
+
+
+ )
)
}
@@ -558,12 +578,12 @@ export default function DetailMonitoringList() {
- Date*
+ Date
- Provider*
+ Provider
@@ -585,7 +605,7 @@ export default function DetailMonitoringList() {
- Examination*
+ Examination