From df4541b11cc73c271feb64045099812839a5beb9 Mon Sep 17 00:00:00 2001 From: zeeshan Date: Mon, 15 Jun 2026 17:44:00 +0530 Subject: [PATCH 1/2] Catch up changes --- ...b702-e048-4499-9b87-95f9ae2d94d5.blade.php | 69 ++++++++++--------- ...eb14-e144-4667-84a8-32d939cf281a.blade.php | 11 ++- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/resources/views/form/rapport-arise/1777029250-544db702-e048-4499-9b87-95f9ae2d94d5.blade.php b/resources/views/form/rapport-arise/1777029250-544db702-e048-4499-9b87-95f9ae2d94d5.blade.php index 4722a140..1d2bf11d 100644 --- a/resources/views/form/rapport-arise/1777029250-544db702-e048-4499-9b87-95f9ae2d94d5.blade.php +++ b/resources/views/form/rapport-arise/1777029250-544db702-e048-4499-9b87-95f9ae2d94d5.blade.php @@ -73,14 +73,16 @@ Reason For Not-Executing Patient Screened Patient Diagnosed - {{-- Foracort Rx --}} + Seroflo Rx - {{-- Duolin Rx --}} - Aerocort Rx - {{-- Glycohale FB Rx --}} - E-Voltido Rx - {{-- E- Foracort G Rx --}} - E-Synchrobreathe range Rx + Maxiflo Rx + Voltido Rx + Voltido Trio Rx + Indaflo Rx + Budecort Rx + Levolin Rx + + @@ -124,14 +126,15 @@ {{ isset($sub->formdata->reason) ? $sub->formdata->reason : '' }} {{ isset($sub->formdata->patient_screened) ? $sub->formdata->patient_screened : '' }} {{ isset($sub->formdata->patients_diagnosed) ? $sub->formdata->patients_diagnosed : '' }} - {{-- {{ isset($sub->formdata->foracort_rx) ? $sub->formdata->foracort_rx : '' }} --}} + {{ isset($sub->formdata->seroflo_rx) ? $sub->formdata->seroflo_rx : '' }} - {{-- {{ isset($sub->formdata->duolin_rx) ? $sub->formdata->duolin_rx : '' }} --}} - {{ isset($sub->formdata->aerocort_rx) ? $sub->formdata->aerocort_rx : '' }} - {{-- {{ isset($sub->formdata->glycohale_fb_rx) ? $sub->formdata->glycohale_fb_rx : '' }} --}} - {{ isset($sub->formdata->e_voltido_rx) ? $sub->formdata->e_voltido_rx : '' }} - {{-- {{ isset($sub->formdata->e_foracort_g_rx) ? $sub->formdata->e_foracort_g_rx : '' }} --}} - {{ isset($sub->formdata->e_synchrobreathe_range_rx) ? $sub->formdata->e_synchrobreathe_range_rx : '' }} + {{ isset($sub->formdata->maxiflo_rx) ? $sub->formdata->maxiflo_rx : '' }} + {{ isset($sub->formdata->voltido_rx) ? $sub->formdata->voltido_rx : '' }} + {{ isset($sub->formdata->voltido_trio_rx) ? $sub->formdata->voltido_trio_rx : '' }} + {{ isset($sub->formdata->indaflo_rx) ? $sub->formdata->indaflo_rx : '' }} + {{ isset($sub->formdata->budecort_rx) ? $sub->formdata->budecort_rx : '' }} + {{ isset($sub->formdata->levolin_rx) ? $sub->formdata->levolin_rx : '' }} + @@ -158,14 +161,13 @@ 'reason', 'patient_screened', 'patients_diagnosed', - 'foracort_rx', 'seroflo_rx', - 'duolin_rx', - 'aerocort_rx', - 'glycohale_fb_rx', - 'e_voltido_rx', - 'e_foracort_g_rx', - 'e_synchrobreathe_range_rx' + 'maxiflo_rx', + 'voltido_rx', + 'voltido_trio_rx', + 'indaflo_rx', + 'budecort_rx', + 'levolin_rx' ])) @continue @endif @@ -486,28 +488,33 @@ } }) */ - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').parent().hide(); - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').attr('required',false); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').parent().hide(); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').attr('required',false); $('#execution-execution').on('change',function(){ let value=$('#execution-execution').val(); if(value==='Yes'){ - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').parent().show(); - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').attr('required',true); - $('#execution-reason').parent().hide(); - $('#execution-reason').prop('required',false); + + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').parent().show(); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').attr('required',true); + $('#execution-form input.dynamic-hidden').remove(); $('#execution-form').append(''); } - else{ - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').parent().hide(); - $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx').attr('required',false); + else if(value==='No'){ + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').parent().hide(); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').attr('required',false); $('#execution-reason').parent().show(); - $('#execution-reason').prop('required',true); + $('#execution-reason').attr('required',true); $('#execution-form input.dynamic-hidden').remove(); $('#execution-form').append(''); + } + else{ + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').parent().hide(); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-reason,#execution-seroflo_rx,#execution-maxiflo_rx,#execution-voltido_rx,#execution-voltido_trio_rx,#execution-indaflo_rx,#execution-budecort_rx,#execution-levolin_rx').attr('required',false); + } }) diff --git a/resources/views/form/rapport-arise/1780568628-677ceb14-e144-4667-84a8-32d939cf281a.blade.php b/resources/views/form/rapport-arise/1780568628-677ceb14-e144-4667-84a8-32d939cf281a.blade.php index eb96f8b8..c923b625 100644 --- a/resources/views/form/rapport-arise/1780568628-677ceb14-e144-4667-84a8-32d939cf281a.blade.php +++ b/resources/views/form/rapport-arise/1780568628-677ceb14-e144-4667-84a8-32d939cf281a.blade.php @@ -28,7 +28,7 @@
@endif
-

(RA-1)Catch Up Camp

+

(RA-1) Catch Up Camp

@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes'))
@@ -491,13 +491,20 @@ } - else{ + else if(value==='No'){ $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx,#execution-foracort_g_rx').parent().hide(); $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx,#execution-foracort_g_rx').attr('required',false); $('#execution-reason').parent().show(); $('#execution-reason').prop('required',true); $('#execution-form input.dynamic-hidden').remove(); $('#execution-form').append(''); + } + + + else{ + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx,#execution-foracort_g_rx').parent().hide(); + $('#execution-execution_date,#execution-patient_screened,#execution-patients_diagnosed,#execution-foracort_rx,#execution-seroflo_rx,#execution-duolin_rx,#execution-aerocort_rx,#execution-glycohale_fb_rx,#execution-e_voltido_rx,#execution-e_foracort_g_rx,#execution-e_synchrobreathe_range_rx,#execution-foracort_g_rx').attr('required',false); + } }) From f376096d1cbaa553854c0092dc00182fa7347715 Mon Sep 17 00:00:00 2001 From: Ravi Gulhane <> Date: Tue, 16 Jun 2026 09:08:32 +0530 Subject: [PATCH 2/2] Team4 Molecule Identification Form --- ...f382-9fbb-45ac-896b-94de9104a11b.blade.php | 2280 ++++++----------- 1 file changed, 749 insertions(+), 1531 deletions(-) diff --git a/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php b/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php index 97325b73..5c286e11 100644 --- a/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php +++ b/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php @@ -1,1532 +1,750 @@ - - - - - - - @include('layouts.shared/title-meta', ['title' => "Form"]) - @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) - - - - -
- processing... -
- - - - - -@include('layouts.shared/footer-script') - - - - - + + + + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + + + +
+ processing... +
+ +@php + // KEEP ORIGINAL DOCTOR LOGIC + $doctors = []; + foreach($questions as $question){ + if($question->code == 'contact_id'){ + $doctors = is_iterable($question->options ?? null) ? $question->options : []; + } + } + // RX HISTORY DATA ONLY + $history = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id ); + $categorySubmissions = []; + $categoryDoctorSubmissions = []; + + $categoryAttributes = [ + 'erdosteine' => 'erdosteine', + 'erdosteine + acebrophylline' => 'erdosteine_acebrophylline', + 'nac + acebrophylline' => 'nac_acebrophylline', + ]; + + $moleculeUseToCategory = [ + 'erdosteine prescriber' => 'erdosteine', + 'erdosteine' => 'erdosteine', + 'erdosteine + acebrophylline' => 'erdosteine + acebrophylline', + 'nac + acebrophylline' => 'nac + acebrophylline', + ]; + + foreach (array_values($categoryAttributes) as $categoryIndex) { + $categorySubmissions[$categoryIndex] = []; + $categoryDoctorSubmissions[$categoryIndex] = []; + } + + $doctorNameById = []; + $doctorIdByName = []; + foreach ($doctors as $doc) { + $doctorNameById[$doc->value] = $doc->display; + $doctorIdByName[trim($doc->display)] = $doc->value; + } + + if (isset($history->data->submissions) && is_iterable($history->data->submissions)) { + foreach ($history->data->submissions as $sub) { + $formdata = $sub->formdata ?? null; + if (!$formdata) { + continue; + } + + $normalizedMolecule = strtolower(trim($formdata->molecule_use ?? '')); + $category = $moleculeUseToCategory[$normalizedMolecule] ?? $normalizedMolecule; + if (!isset($categoryAttributes[$category])) { + continue; + } + + $rawDoctorId = ''; + if (!empty($formdata->contact_id)) { + $contactId = $formdata->contact_id; + if (is_array($contactId) || $contactId instanceof \Traversable) { + $contactValues = array_values((array) $contactId); + $rawDoctorId = trim((string) ($contactValues[0] ?? '')); + } else { + $rawDoctorId = trim((string) $contactId); + } + } + + $doctorId = $rawDoctorId; + if ( + $doctorId !== '' && + !isset($doctorNameById[$doctorId]) && + isset($doctorIdByName[$doctorId]) + ) { + $doctorId = $doctorIdByName[$doctorId]; + } + + $rxSupport = $formdata->rx_support ?? ''; + if (is_array($rxSupport) || $rxSupport instanceof \Traversable) { + $rxSupport = trim((string) (array_values((array) $rxSupport)[0] ?? '')); + } else { + $rxSupport = trim((string) $rxSupport); + } + + $otherMolecule = $formdata->other_molecule_use ?? ''; + if (is_array($otherMolecule) || $otherMolecule instanceof \Traversable) { + $otherMolecule = trim((string) (array_values((array) $otherMolecule)[0] ?? '')); + } else { + $otherMolecule = trim((string) $otherMolecule); + } + + $recordDate = $formdata->record_date ?? ''; + if (is_array($recordDate) || $recordDate instanceof \Traversable) { + $recordDate = trim((string) (array_values((array) $recordDate)[0] ?? '')); + } else { + $recordDate = trim((string) $recordDate); + } + + $categoryPrefix = $categoryAttributes[$category]; + + $submissionRow = [ + 'submission_id' => $sub->id, + 'category' => $category, + 'category_field' => $categoryPrefix, + 'molecule_use' => $formdata->molecule_use ?? '', + 'doctor_id' => $doctorId, + 'doctor_name' => $doctorNameById[$doctorId] ?? $rawDoctorId, + 'rx_support' => $rxSupport, + 'other_molecule_use' => $otherMolecule, + 'record_date' => $recordDate, + ]; + + $categorySubmissions[$categoryPrefix][] = $submissionRow; + + if ($doctorId !== '') { + $categoryDoctorSubmissions[$categoryPrefix][$doctorId] = $submissionRow; + } + } + } +@endphp + + + + + + + + + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file