{{-- NPHIES launch control for the patient header. The SSO Conformance Test requires the nphies logo to sit in the patient header as a clearly visible button or direct link, not inside a dropdown, so this renders inline and is not collapsed into a menu. Opens in a new tab: the target page immediately POSTs the signed assertion to NPHIES, and the practitioner needs the resulting session in their own browser. Usage: @include('operations.nphies.patient-launch-button', ['endUserId' => $id]) @include('operations.nphies.patient-launch-button', ['endUserId' => $id, 'buttonClass' => 'table-header-btn']) Renders nothing unless the profile has NPHIES SSO switched on and the user holds reservations_nphies_sso. The permission is separate from the rest of the reservation screen on purpose: this opens the patient's national health record, not just this lab's data, so it is granted deliberately rather than inherited by everyone who can view a reservation. The profile lookup is cached per request: a patient header can repeat this include once per row, and the setting cannot change mid-request. --}} @php $nphiesEnabled = once(function () { $profile = \App\Models\PROFILE::find(session('profile_id')); return $profile && $profile->NPHIES_SSO_ENABLED; }); @endphp @if ($nphiesEnabled && !empty($endUserId) && in_array('reservations_nphies_sso', session('permissions', []))) {{-- The asset is a square mark with generous padding, so it is sized as an icon and paired with the wordmark in text. The conformance test asks for a screenshot of the logo in place, so this should be swapped for the official brand asset once Lean supplies it. --}} nphies nphies @endif