<?php

//=================================================================
//SERVICE Tool allowed responses===================================
//=================================================================

$allowedResponseRadio = array(
    array("responseID" => "1", "Response" => $service_allowed_label1),
    array("responseID" => "2", "Response" => $service_allowed_label2)   
);

$allowedResponseDropdownDamage = array(
    array("responseID" => "5", "Response" => $service_allowed_label5),
    array("responseID" => "4", "Response" => $service_allowed_label4),  
    array("responseID" => "3", "Response" => $service_allowed_label3),
    array("responseID" => "9", "Response" => $service_allowed_label9)
);

$allowedResponseDropdownCorrosion = array(
    array("responseID" => "6", "Response" => $service_allowed_label1),
    array("responseID" => "7", "Response" => $service_allowed_label2) 
);

// Negative answers
$negative_results = array("2","3","6");
//=================================================================
//SERVICE Tool Visual Inspection===================================
//=================================================================


$arrayQuestions_visual = array(
    array("Group" => $group_header_1,
                "Group_sequence" => '1',
                "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "service_visual_1","Question" => $service_visual_1, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_2","Question" => $service_visual_2, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '3',"QuestionID" => "service_visual_3","Question" => $service_visual_3, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '4',"QuestionID" => "service_visual_4","Question" => $service_visual_4, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
            )
        ),
        array("Group" => $group_header_2,
            "Group_sequence" => '2',
            "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "service_visual_5", "Question" => $service_visual_5, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_6", "Question" => $service_visual_6, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '3',"QuestionID" => "service_visual_7", "Question" => $service_visual_7, "Type" => 'Radiobutton', "Response" => $allowedResponseDropdownCorrosion),
                array("Question_sequence" => '4',"QuestionID" => "service_visual_8", "Question" => $service_visual_8, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage)
            )
        ),
        array("Group" => $group_header_3,
            "Group_sequence" => '3',
            "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "service_visual_9", "Question" => $service_visual_9, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_10", "Question" => $service_visual_10, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '3',"QuestionID" => "service_visual_11", "Question" => $service_visual_11, "Type" => 'Radiobutton', "Response" => $allowedResponseDropdownCorrosion),
                array("Question_sequence" => '4',"QuestionID" => "service_visual_12", "Question" => $service_visual_12, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage)   
            )
        ),
        array("Group" => $group_header_4,
            "Group_sequence" => '4',
            "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "service_visual_13", "Question" => $service_visual_13, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_14", "Question" => $service_visual_14, "Type" => 'Radiobutton', "Response" => $allowedResponseDropdownCorrosion),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_15", "Question" => $service_visual_15, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_16", "Question" => $service_visual_16, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_17", "Question" => $service_visual_17, "Type" => 'Radiobutton', "Response" => $allowedResponseDropdownCorrosion),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_18", "Question" => $service_visual_18, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
                )
        ),
        array("Group" => $group_header_5,
            "Group_sequence" => '5',
            "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "service_visual_19", "Question" => $service_visual_19, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "service_visual_20", "Question" => $service_visual_20, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                array("Question_sequence" => '3',"QuestionID" => "service_visual_21", "Question" => $service_visual_21, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                array("Question_sequence" => '4',"QuestionID" => "service_visual_22", "Question" => $service_visual_22, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage)  
                )
            )
        );

//=================================================================
//SERVICE Tool Finalize         ===================================
//=================================================================
$arrayQuestions_finalize = array(
    array("Group" => $group_header_6,
        "Group_sequence" => '1',
        "Questions_in_group" => array(
            array("Question_sequence" => '1',"QuestionID" => "service_action_clean", "Question" => $service_action_clean, "Type" => 'Checkbox', "Response" => ""),
            array("Question_sequence" => '2',"QuestionID" => "service_action_battery", "Question" => $service_action_battery, "Type" => 'Checkbox', "Response" => "")
            )
        ),
    array("Group" => $group_header_7,
    "Group_sequence" => '1',
    "Questions_in_group" => array(
        array("Question_sequence" => '1',"QuestionID" => "service_notes", "Question" => $service_notes, "Type" => 'Textarea', "Response" => "")
        )
    ),
    array("Group" => $group_header_8,
    "Group_sequence" => '3',
    "Questions_in_group" => array(
        array("Question_sequence" => '1',"QuestionID" => "service_action_serial", "Question" => $service_action_serial, "Type" => 'Checkbox', "Response" => ""),
        array("Question_sequence" => '2',"QuestionID" => "service_action_cover", "Question" => $service_action_cover, "Type" => 'Checkbox', "Response" => ""),
        array("Question_sequence" => '3',"QuestionID" => "service_action_spudger", "Question" => $service_action_spudger, "Type" => 'Checkbox', "Response" => ""),     
        array("Question_sequence" => '4',"QuestionID" => "service_action_case", "Question" => $service_action_case, "Type" => 'Checkbox', "Response" => ""),
        array("Question_sequence" => '5',"QuestionID" => "service_action_instructions", "Question" => $service_action_instructions, "Type" => 'Checkbox', "Response" => "")
     )
    ),
    array("Group" => $group_header_9,
    "Group_sequence" => '4',
    "Questions_in_group" => array(
        array("Question_sequence" => '1',"QuestionID" => "service_mandatory_question", "Question" => $service_mandatory_question, "Type" => 'Checkbox', "Response" => "")
         )
    )
    );

$arrayQuestions_legacy = array(
    array("Group" => $group_header_legacy_1,
                "Group_sequence" => '1',
                "Questions_in_group" => array(
                array("Question_sequence" => '1',"QuestionID" => "question1","Question" => $question1, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '2',"QuestionID" => "question2","Question" => $question2, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '3',"QuestionID" => "question3","Question" => $question3, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                array("Question_sequence" => '4',"QuestionID" => "question4","Question" => $question4, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
            )
        ),
        array("Group" => $group_header_legacy_2,
                    "Group_sequence" => '2',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question5", "Question" => $question5, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
                )
            ),
        array("Group" => $group_header_legacy_3,
                    "Group_sequence" => '3',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question6", "Question" => $question6, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '2',"QuestionID" => "question7", "Question" => $question7, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '3',"QuestionID" => "question8", "Question" => $question8, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '4',"QuestionID" => "question9", "Question" => $question9, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
                )
            ),
        array("Group" => $group_header_legacy_4,
                    "Group_sequence" => '4',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question11a", "Question" => $question11, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownCorrosion),
                    array("Question_sequence" => '2',"QuestionID" => "question12a", "Question" => $question12, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownCorrosion),
                    array("Question_sequence" => '3',"QuestionID" => "question13a", "Question" => $question13, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownCorrosion),
                    array("Question_sequence" => '4',"QuestionID" => "question14a", "Question" => $question14, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownCorrosion),
                    array("Question_sequence" => '5',"QuestionID" => "question18a", "Question" => $question18, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownCorrosion)
                )
            ),
        array("Group" => $group_header_legacy_5,
                    "Group_sequence" => '5',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question10", "Question" => $question10, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '2',"QuestionID" => "question11", "Question" => $question11, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '3',"QuestionID" => "question12", "Question" => $question12, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '4',"QuestionID" => "question13", "Question" => $question13, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '5',"QuestionID" => "question14", "Question" => $question14, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '6',"QuestionID" => "question15", "Question" => $question15, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '7',"QuestionID" => "question16", "Question" => $question16, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '8',"QuestionID" => "question17", "Question" => $question17, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage),
                    array("Question_sequence" => '9',"QuestionID" => "question18", "Question" => $question18, "Type" => 'Dropdown', "Response" => $allowedResponseDropdownDamage)
                )
            ),
        array("Group" => $group_header_legacy_6,
                    "Group_sequence" => '6',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question20", "Question" => $question20, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '2',"QuestionID" => "question22", "Question" => $question22, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
                )
            ),
        array("Group" => $group_header_legacy_7,
                    "Group_sequence" => '7',
                    "Questions_in_group" => array(
                    array("Question_sequence" => '1',"QuestionID" => "question21", "Question" => $question21, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '2',"QuestionID" => "question23", "Question" => $question23, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio),
                    array("Question_sequence" => '3',"QuestionID" => "question24", "Question" => $question24, "Type" => 'Radiobutton', "Response" => $allowedResponseRadio)
                )
            ),
        );
?>