[Improvement] input Daily Monitoring
This commit is contained in:
@@ -39,6 +39,13 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
'diagnosis' => $filesFinalLogDiagnosis,
|
'diagnosis' => $filesFinalLogDiagnosis,
|
||||||
'kondisi' => $filesFinalLogKondisi,
|
'kondisi' => $filesFinalLogKondisi,
|
||||||
|
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$files = [
|
||||||
|
'result' => [],
|
||||||
|
'diagnosis' => [],
|
||||||
|
'kondisi' => [],
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ class DailyMonitoringController extends Controller
|
|||||||
$validator = Validator::make($request->all(),[
|
$validator = Validator::make($request->all(),[
|
||||||
'request_code' => 'required|exists:request_logs,code',
|
'request_code' => 'required|exists:request_logs,code',
|
||||||
'subject' => 'required',
|
'subject' => 'required',
|
||||||
|
'submission_date' => 'required',
|
||||||
'body_temperature' => 'required|numeric',
|
'body_temperature' => 'required|numeric',
|
||||||
'sistole' => 'required|numeric',
|
'sistole' => 'required|numeric',
|
||||||
'diastole' => 'required|numeric',
|
'diastole' => 'required|numeric',
|
||||||
@@ -251,6 +252,7 @@ class DailyMonitoringController extends Controller
|
|||||||
// insert claim daily monitoring
|
// insert claim daily monitoring
|
||||||
$db_response = RequestDailyMonitoring::create([
|
$db_response = RequestDailyMonitoring::create([
|
||||||
'request_log_id' => $request_log->id,
|
'request_log_id' => $request_log->id,
|
||||||
|
'submission_date' => $request->submission_date,
|
||||||
'subject' => $request->subject,
|
'subject' => $request->subject,
|
||||||
'sistole' => $request->sistole,
|
'sistole' => $request->sistole,
|
||||||
'diastole' => $request->diastole,
|
'diastole' => $request->diastole,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class RequestDailyMonitoring extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'request_log_id',
|
'request_log_id',
|
||||||
'subject',
|
'subject',
|
||||||
|
'submission_date',
|
||||||
'body_temperature',
|
'body_temperature',
|
||||||
'respiration_rate',
|
'respiration_rate',
|
||||||
'sistole',
|
'sistole',
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ class RequestLogDailyMonitoring extends Model
|
|||||||
return $this->hasMany(RequestLogMedicalPlan::class);
|
return $this->hasMany(RequestLogMedicalPlan::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function files()
|
||||||
|
{
|
||||||
|
return $this->morphMany(File::class, 'fileable');
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
protected function code(): Attribute
|
protected function code(): Attribute
|
||||||
@@ -28,4 +33,6 @@ class RequestLogDailyMonitoring extends Model
|
|||||||
get: fn ($value, $attributes) => 'RE-' . str_pad($attributes['id'], 3, '0', STR_PAD_LEFT),
|
get: fn ($value, $attributes) => 'RE-' . str_pad($attributes['id'], 3, '0', STR_PAD_LEFT),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->dateTime('submission_date')->after('request_log_id')->nullable()->default(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('submission_date');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1029,23 +1029,56 @@ export default function ServiceMonitoring() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
<Stack spacing={1}>
|
<Stack spacing={1}>
|
||||||
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
Perencanaan
|
Medical Plan :
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction={'row'} spacing={2}>
|
<Stack direction={'row'} spacing={2}>
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
<Stack marginLeft={5}>
|
<Stack marginLeft={5}>
|
||||||
{data.dailyMonitorings ? (
|
{data.dailyMonitorings ? (
|
||||||
<ul style={{ listStyleType: 'disc' }}>
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
{dailyMonitoring.plans.length > 0 &&
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
dailyMonitoring.plans.map((plan, planIndex) => (
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
|
plan.type === 1 ? (
|
||||||
<li key={planIndex}>{plan.plan}</li>
|
<li key={planIndex}>{plan.plan}</li>
|
||||||
))}
|
) : null
|
||||||
</ul>
|
)
|
||||||
) : (
|
) : (
|
||||||
'-'
|
<li>No plans available</li>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</ul>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack spacing={1}>
|
||||||
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
|
Non Medikamentosa Plan :
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} spacing={2}>
|
||||||
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
|
<Stack marginLeft={5}>
|
||||||
|
{data.dailyMonitorings ? (
|
||||||
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
|
plan.type === 2 ? (
|
||||||
|
<li key={planIndex}>{plan.plan}</li>
|
||||||
|
) : null
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<li>No plans available</li>
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const navConfig = [
|
|||||||
title: 'CASE MANAGEMENT',
|
title: 'CASE MANAGEMENT',
|
||||||
children: [
|
children: [
|
||||||
{ title: 'Daily Monitoring', path: '/case_management/daily_monitoring' },
|
{ title: 'Daily Monitoring', path: '/case_management/daily_monitoring' },
|
||||||
{ title: 'Laboratorium Result', path: '/case_management/laboratorium_result' },
|
// { title: 'Laboratorium Result', path: '/case_management/laboratorium_result' },
|
||||||
{ title: 'Inpatient Monitoring', path: '/case_management/inpatient_monitoring' },
|
{ title: 'Inpatient Monitoring', path: '/case_management/inpatient_monitoring' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -123,6 +123,10 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
<Visibility />
|
<Visibility />
|
||||||
View
|
View
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem onClick={() => navigate(`/case_management/daily_monitoring/${props.row.member_id}/claims/${props.row.code}/add_monitoring`)}>
|
||||||
|
<AddIcon />
|
||||||
|
Daily Monitoring
|
||||||
|
</MenuItem>
|
||||||
</>
|
</>
|
||||||
} />
|
} />
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export default function DetailMonitoringList() {
|
|||||||
claim_code : '',
|
claim_code : '',
|
||||||
claim_id : '',
|
claim_id : '',
|
||||||
subject : '',
|
subject : '',
|
||||||
|
submission_date : '',
|
||||||
body_temperature: '',
|
body_temperature: '',
|
||||||
sistole : '',
|
sistole : '',
|
||||||
diastole : '',
|
diastole : '',
|
||||||
@@ -183,6 +184,24 @@ export default function DetailMonitoringList() {
|
|||||||
<FormProvider methods={methods} onSubmit={handleSubmit(submitHandler)}>
|
<FormProvider methods={methods} onSubmit={handleSubmit(submitHandler)}>
|
||||||
<Card sx={{ padding: '24px' }}>
|
<Card sx={{ padding: '24px' }}>
|
||||||
<Grid container spacing={6}>
|
<Grid container spacing={6}>
|
||||||
|
{/* Date */}
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Grid container spacing={3}>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography variant="body1" component="div">
|
||||||
|
Date* :
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
||||||
|
<RHFDatePickerV2
|
||||||
|
label='Date'
|
||||||
|
name="submission_date"
|
||||||
|
dateFormat='dd MMM yyyy'
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
{/* Subject */}
|
{/* Subject */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
@@ -421,7 +440,7 @@ export default function DetailMonitoringList() {
|
|||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body1" component="div">
|
<Typography variant="body1" component="div">
|
||||||
Confirmation Medical Letter*
|
Confirmation Medical Letter
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
@@ -477,7 +496,7 @@ export default function DetailMonitoringList() {
|
|||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body1" component="div">
|
<Typography variant="body1" component="div">
|
||||||
Medical Action Letter*
|
Medical Action Letter
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
@@ -534,7 +553,7 @@ export default function DetailMonitoringList() {
|
|||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body1" component="div">
|
<Typography variant="body1" component="div">
|
||||||
Laboratorium Result*
|
Laboratorium Result
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={6}>
|
<Grid item xs={6}>
|
||||||
@@ -579,7 +598,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body1" component="div">
|
<Typography variant="body1" component="div">
|
||||||
Laboratorium Result*
|
Laboratorium Result
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default function DetailMonitoringList() {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="default"
|
color="default"
|
||||||
>
|
>
|
||||||
{row.created_at ? fDate(row.created_at) : '-'}
|
{row.submission_date ? fDate(row.submission_date) : '-'}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
{row.discharge_date.discharge_date ?
|
{row.discharge_date.discharge_date ?
|
||||||
@@ -264,7 +264,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={6}>
|
<Grid item xs={6}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{row.provider}
|
{row.provider != null ? row.provider : '-' }
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -276,7 +276,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={6}>
|
<Grid item xs={6}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{row.examination}
|
{row.examination != null ? row.examination : '-' }
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export const getClaimList = async ( member_id: string ): Promise<ResponseListing
|
|||||||
*/
|
*/
|
||||||
export const AddMonitoringDetail = async ( claim_code: string,data: DetailMonitoringListType ): Promise<boolean> => {
|
export const AddMonitoringDetail = async ( claim_code: string,data: DetailMonitoringListType ): Promise<boolean> => {
|
||||||
data.lab_date = data.lab_date != '' && data.lab_date != null ? fDateOnly(data.lab_date) : '';
|
data.lab_date = data.lab_date != '' && data.lab_date != null ? fDateOnly(data.lab_date) : '';
|
||||||
|
data.submission_date = data.submission_date != '' && data.submission_date != null ? fDateOnly(data.submission_date) : '';
|
||||||
|
|
||||||
const formData = makeFormData({...data});
|
const formData = makeFormData({...data});
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export type DetailMonitoringListType = {
|
|||||||
diastole : string
|
diastole : string
|
||||||
analysis : string,
|
analysis : string,
|
||||||
complaints : string,
|
complaints : string,
|
||||||
|
submission_date : string,
|
||||||
lab_date : string,
|
lab_date : string,
|
||||||
provider : string,
|
provider : string,
|
||||||
examination : string,
|
examination : string,
|
||||||
|
|||||||
Reference in New Issue
Block a user