Point of detection?
@if ($nearmiss && $nearmiss->point_of_detection == 'Hidden')

Hidden

@endif

What was the error?
what_was_error != 'Prescription') style="display:none" @endif>
what_was_error != 'Labelling') style="display:none" @endif >
what_was_error != 'Picking') style="display:none" @endif>
what_was_error != 'Placing into Basket') style="display:none" @endif>
what_was_error != 'Bagging') style="display:none" @endif>
what_was_error != 'Preparing Dosette Tray') style="display:none" @endif>
what_was_error != 'Handing Out') style="display:none" @endif>
what_was_error != 'Prescription') style="display:none" @endif>
what_was_error == 'Prescription') checked @endif class="error_value_prescription error_value_checkboxes"> Prescription
prescription_missing_signature) style="display:none" @endif>
prescription_expired) style="display:none" @endif>
prescription_expired) checked @endif class="prescription_expired_clone">
prescription_expired_involve_drug != 1) style="display:none" @endif>
prescription_old_treatment) style="display:none" @endif>
prescription_tampered) style="display:none" @endif>
what_was_error != 'Labelling') style="display:none" @endif>
what_was_error == 'Labelling') checked @endif class="error_value_labelling error_value_checkboxes"> Labelling

labelling_wrong_brand) style="display:none" @endif>
labelling_wrong_direction) style="display:none" @endif>
labelling_wrong_item) style="display:none" @endif>
labelling_wrong_formulation) style="display:none" @endif>
labelling_wrong_patient) style="display:none" @endif>
labelling_wrong_quantity) style="display:none" @endif>
labelling_wrong_strength) style="display:none" @endif>
what_was_error != 'Picking') style="display:none" @endif>
what_was_error == 'Picking') checked @endif class="error_value_picking error_value_checkboxes"> Picking
picking_out_of_date_item) style="display:none" @endif>
picking_wrong_brand) style="display:none" @endif>
picking_wrong_item) style="display:none" @endif>
picking_wrong_quantity) style="display:none" @endif>
picking_wrong_strength) style="display:none" @endif>
picking_wrong_formulation) style="display:none" @endif>
what_was_error != 'Placing into Basket') style="display:none" @endif>
what_was_error == 'Placing into Basket') checked @endif class="error_value_placing_into_basket error_value_checkboxes"> Placing into Basket
placing_basket_another_patient_label_basket) style="display:none" @endif>
placing_basket_wrong_basket) style="display:none" @endif>
placing_basket_missing_item) style="display:none" @endif>
placing_basket_label_wrong_item) style="display:none" @endif>
what_was_error != 'Bagging') style="display:none" @endif>
what_was_error == 'Bagging') checked @endif class="error_value_bagging error_value_checkboxes"> Bagging
bagging_wrong_bag_label) style="display:none" @endif>
bagging_another_patient_med_in_bag) style="display:none" @endif>
bagging_missed_items) style="display:none" @endif>
what_was_error != 'Preparing Dosette Tray') style="display:none" @endif>
what_was_error == 'Preparing Dosette Tray') checked @endif class="error_value_preparing_dosette_tray error_value_checkboxes"> Preparing Dosette Tray
preparing_dosette_tray_wrong_day_time) style="display:none" @endif>
preparing_dosette_tray_error_patient_mar_chart) style="display:none" @endif>
preparing_dosette_tray_extra_quantity_on_tray) style="display:none" @endif>
preparing_dosette_tray_error_in_description) style="display:none" @endif>
preparing_dosette_tray_wrong_bag_label) style="display:none" @endif>
preparing_dosette_tray_external_item_missing) style="display:none" @endif>
preparing_dosette_tray_tray_item_missing) style="display:none" @endif>
preparing_dosette_tray_error_on_blister_pack) style="display:none" @endif>
what_was_error != 'Handing Out') style="display:none" @endif>
what_was_error == 'Handing Out') checked @endif class="error_value_handing_out error_value_checkboxes"> Handing Out
handing_out_to_wrong_patient) style="display:none" @endif>