Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -217,7 +217,7 @@ class CorporateMemberController extends Controller
|
|||||||
'service:code,name',
|
'service:code,name',
|
||||||
'files',
|
'files',
|
||||||
])
|
])
|
||||||
->find($request_log_id, ['id', 'submission_date', 'discharge_date', 'member_id', 'service_code', 'organization_id']);
|
->find($request_log_id, ['id', 'submission_date', 'discharge_date', 'member_id', 'service_code', 'organization_id', 'diagnosis']);
|
||||||
|
|
||||||
$dataBenefit = [];
|
$dataBenefit = [];
|
||||||
if (count($data->requestLogBenefits) > 0) {
|
if (count($data->requestLogBenefits) > 0) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace Modules\Client\Transformers\AlarmCenter;
|
|||||||
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
use App\Models\Icd;
|
||||||
|
|
||||||
class DataServiceMonitoring extends JsonResource
|
class DataServiceMonitoring extends JsonResource
|
||||||
{
|
{
|
||||||
@@ -49,6 +50,34 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$diagnosis = '-';
|
||||||
|
$main_diagnosis = '-';
|
||||||
|
if ($this->diagnosis){
|
||||||
|
$diagnosis = explode(',', $this->diagnosis);
|
||||||
|
if (count($diagnosis)>0){
|
||||||
|
|
||||||
|
foreach($diagnosis as $key => $d){
|
||||||
|
$icd = Icd::where('code', $d)->first('name');
|
||||||
|
if($key == 0){
|
||||||
|
if ($icd){
|
||||||
|
$main_diagnosis = $icd->name;
|
||||||
|
} else {
|
||||||
|
$main_diagnosis = $d;
|
||||||
|
}
|
||||||
|
$diagnosis = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($key > 0){
|
||||||
|
if ($icd) {
|
||||||
|
$diagnosis .= $icd->name . ', ';
|
||||||
|
} else {
|
||||||
|
$diagnosis .= $d .', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'companyName' => $this->member->currentCorporate->name ?? null,
|
'companyName' => $this->member->currentCorporate->name ?? null,
|
||||||
'serviceCode' => $this->service_code ?? null,
|
'serviceCode' => $this->service_code ?? null,
|
||||||
@@ -59,6 +88,8 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
'email' => $this->member->email ?? ($this->member->person->email ?? null),
|
'email' => $this->member->email ?? ($this->member->person->email ?? null),
|
||||||
'serviceName' => $this->service->name ?? ($this->service_code ?? null),
|
'serviceName' => $this->service->name ?? ($this->service_code ?? null),
|
||||||
'files' => $files,
|
'files' => $files,
|
||||||
|
'mainDiagnose' => $main_diagnosis,
|
||||||
|
'comparativeDiagnosis' => $diagnosis,
|
||||||
'benefits' => collect($this->requestLogBenefits)->map(function ($requestLogBenefit) {
|
'benefits' => collect($this->requestLogBenefits)->map(function ($requestLogBenefit) {
|
||||||
return [
|
return [
|
||||||
'amountIncurred' => $requestLogBenefit->amount_incurred,
|
'amountIncurred' => $requestLogBenefit->amount_incurred,
|
||||||
|
|||||||
@@ -367,8 +367,15 @@ export default function ServiceMonitoring() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid item xs={12} paddingY={2}>
|
||||||
|
<Typography component={'h6'} fontWeight={700} fontSize={18}>
|
||||||
|
{loading ? <Skeleton animation="wave" width={175} /> : 'Detail Letter Of Guarante'}
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item container xs={12} spacing={5}>
|
<Grid item container xs={12} spacing={5}>
|
||||||
<Grid item container xs={12} md={6}>
|
<Grid item container xs={12} md={6}>
|
||||||
@@ -1103,7 +1110,7 @@ export default function ServiceMonitoring() {
|
|||||||
{data &&
|
{data &&
|
||||||
data.laboratoriumResults &&
|
data.laboratoriumResults &&
|
||||||
Object.keys(data.laboratoriumResults).length > 0 ? (
|
Object.keys(data.laboratoriumResults).length > 0 ? (
|
||||||
Object.keys(data.dailyMonitorings).map((date, dateIndex) => (
|
Object.keys(data.laboratoriumResults).map((date, dateIndex) => (
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
padding: 3,
|
padding: 3,
|
||||||
@@ -1114,60 +1121,37 @@ export default function ServiceMonitoring() {
|
|||||||
key={dateIndex}
|
key={dateIndex}
|
||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="subtitle1">{date ? date : '-'}</Typography>
|
<Typography variant="subtitle1">{date ? date : '-'}</Typography>
|
||||||
{data.laboratoriumResults[date].map(
|
{data.laboratoriumResults[date]?.map((laboratoriumResult, laboratoriumResultIndex) => (
|
||||||
(laboratoriumResult, laboratoriumResultIndex) => (
|
<Card key={laboratoriumResultIndex} sx={{ marginTop: 3, paddingX: 2.5, paddingY: 2 }}>
|
||||||
<Card
|
<Label>{laboratoriumResult.code || '-'}</Label>
|
||||||
key={laboratoriumResultIndex}
|
<Table sx={{ marginY: 2 }}>
|
||||||
sx={{ marginTop: 3, paddingX: 2.5, paddingY: 2 }}
|
<TableHead>
|
||||||
>
|
<TableRow>
|
||||||
<Label>
|
<TableCell>Date</TableCell>
|
||||||
{laboratoriumResult.code ? laboratoriumResult.code : '-'}
|
<TableCell>Examination</TableCell>
|
||||||
</Label>
|
<TableCell>Location</TableCell>
|
||||||
<Table sx={{ marginY: 2 }}>
|
</TableRow>
|
||||||
<TableHead>
|
</TableHead>
|
||||||
<TableRow>
|
<TableBody>
|
||||||
<TableCell>Date</TableCell>
|
<TableRow>
|
||||||
<TableCell>Examination</TableCell>
|
<TableCell><Label>{laboratoriumResult.date || '-'}</Label></TableCell>
|
||||||
<TableCell>Location</TableCell>
|
<TableCell>{laboratoriumResult.examination || '-'}</TableCell>
|
||||||
{/* <TableCell /> */}
|
<TableCell>{laboratoriumResult.location || '-'}</TableCell>
|
||||||
</TableRow>
|
{/* <TableMoreMenu
|
||||||
</TableHead>
|
actions={
|
||||||
<TableBody>
|
<>
|
||||||
<TableRow>
|
<MenuItem onClick={() => handleDownloadClick(laboratoriumResult.file)}>
|
||||||
<TableCell>
|
<DownloadIcon /> Download
|
||||||
<Label>
|
</MenuItem>
|
||||||
{laboratoriumResult.date ? laboratoriumResult.date : '-'}
|
</>
|
||||||
</Label>
|
}
|
||||||
</TableCell>
|
/> */}
|
||||||
<TableCell>
|
</TableRow>
|
||||||
{laboratoriumResult.examination
|
</TableBody>
|
||||||
? laboratoriumResult.examination
|
</Table>
|
||||||
: '-'}
|
</Card>
|
||||||
</TableCell>
|
))}
|
||||||
<TableCell>
|
|
||||||
{laboratoriumResult.location
|
|
||||||
? laboratoriumResult.location
|
|
||||||
: '-'}
|
|
||||||
</TableCell>
|
|
||||||
{/* <TableMoreMenu
|
|
||||||
actions={
|
|
||||||
<>
|
|
||||||
<MenuItem
|
|
||||||
onClick={() => handleDownloadClick(laboratoriumResult.file)}
|
|
||||||
>
|
|
||||||
<DownloadIcon />
|
|
||||||
Download
|
|
||||||
</MenuItem>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
</TableRow>
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</Card>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user