if ($("#patientdecleration").val() == 1)
{
    var hosturl = $('#hosturl').val();
    var patientId = $('#patientId').val();
    var controllName = $("#controllName").val();

    $(".showPrintDec").live('click', function () {
        var id = $(this).attr('data-detailid');

        var decleration = $("#decleration").val();
        $.post(hosturl + '/controllers/' + controllName + '.php?ac=showprint', {decleration: decleration, patientId: patientId}, function (data)
        {
            $("#vvv").html(data);
            $.print("#vvv");
            $("#vvv").html('');
        });

    });

    $('body').on('click', '.showInstDec', function () {
        var patientId = $('#patientId').val();
        var decleration = $(this).attr('data-intId');

        $.post(hosturl + '/controllers/' + controllName + '.php?ac=showprint', {
            decleration: decleration,
            patientId: patientId
        }, function (res) {
            $('#vvv').html(res);
            $.print("#vvv");
            $("#vvv").html('');

        });

    });
}