Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging

This commit is contained in:
2024-01-25 14:57:21 +07:00
4 changed files with 66 additions and 1 deletions

View File

@@ -732,6 +732,23 @@ class RequestLogController extends Controller
$data['signatureAd'] = $signatureAd;
$dataDiagnosis = [];
if($dataRequestLog->diagnosis)
{
$dataDiagnosiCodes = explode(',', $dataRequestLog->diagnosis);
foreach ($dataDiagnosiCodes as $diagnosisCode)
{
$diagnoisis = DB::table('icd')
->where('icd.code', '=', $diagnosisCode)
->select('icd.name', 'icd.code')
->first();
array_push($dataDiagnosis, $diagnoisis);
}
}
$data['dataDiagnosis'] = $dataDiagnosis;
$pdf = new Dompdf();
$options = new Options();

View File

@@ -340,6 +340,8 @@ export default function TableListFinalLog() {
setData(
response.data.data.map((obj: any) => ({
...obj,
provider:formatTitleCase(obj.provider),
full_name:formatTitleCase(obj.full_name),
status:
obj.status === 'requested' ? (
<Label color='primary'>
@@ -426,6 +428,14 @@ export default function TableListFinalLog() {
const [currentMember, setCurrentMember] = useState(null);
const [nameMember, setNameMember] = useState('');
const formatTitleCase = (str:any) => {
if (str) {
return str.replace(/\w\S*/g, (txt:any) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
}
return ''; // Mengembalikan string kosong jika input adalah null atau undefined
};
return (
<>
<TableComponent

View File

@@ -332,6 +332,8 @@ export default function TableList() {
setData(
response.data.data.map((obj: any) => ({
...obj,
provider:formatTitleCase(obj.provider),
full_name:formatTitleCase(obj.full_name),
status:
obj.status === 'requested' ? (
<Label color='primary'>
@@ -422,6 +424,12 @@ export default function TableList() {
const [setIsRequestFinalLog, isRequestFinalLog] = useState(false);
const [dataViewFinalDialog, setDataViewFinalDialog] = useState<any>(null);
const formatTitleCase = (str:any) => {
if (str) {
return str.replace(/\w\S*/g, (txt:any) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
}
return ''; // Mengembalikan string kosong jika input adalah null atau undefined
};
return (
<>
<TableComponent

View File

@@ -424,6 +424,36 @@
</tfoot>
</table>
<table class="claim-info-<?php echo now()->timestamp; ?>">
<thead>
<tr style="background-color: #F4F6F8;">
<td colspan="5" style="width: 5%; text-align: left;"><b>Diagnosis</b></td>
</tr>
</thead>
<tbody>
@php
if(count($dataDiagnosis))
{
foreach ($dataDiagnosis as $valDiagnosis)
{
@endphp
<tr>
<td colspan="5" style="width: 5%; text-align: left;">{{ !empty($valDiagnosis->name) ? ' - '.$valDiagnosis->code.'-'.$valDiagnosis->name : '-'}}</td>
</tr>
@php
}
}
else
{
@endphp
<tr>
<td colspan="5" style="width: 5%; text-align: left;">-</td>
</tr>
@php
}
@endphp
</tbody>
</table>
<table class="claim-info-<?php echo now()->timestamp; ?>">
<thead>
<tr style="background-color: #F4F6F8;">
@@ -432,7 +462,7 @@
</thead>
<tbody>
<tr>
<td colspan="5" style="width: 5%; text-align: left;">{{ !empty($dataRequestLog->catatan) ? $dataRequestLog->catatan : ''}}</td>
<td colspan="5" style="width: 5%; text-align: left;">{{ !empty($dataRequestLog->catatan) ? $dataRequestLog->catatan : '-'}}</td>
</tr>
</tbody>
</table>