<?php



$tdatatb_historico = array();
$tdatatb_historico[".searchableFields"] = array();
$tdatatb_historico[".ShortName"] = "tb_historico";
$tdatatb_historico[".OwnerID"] = "";
$tdatatb_historico[".OriginalTable"] = "tb_historico";


$tdatatb_historico[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" );
$tdatatb_historico[".originalPagesByType"] = $tdatatb_historico[".pagesByType"];
$tdatatb_historico[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" ) );
$tdatatb_historico[".originalPages"] = $tdatatb_historico[".pages"];
$tdatatb_historico[".defaultPages"] = my_json_decode( "{\"add\":\"add\",\"edit\":\"edit\",\"export\":\"export\",\"import\":\"import\",\"list\":\"list\",\"print\":\"print\",\"search\":\"search\",\"view\":\"view\"}" );
$tdatatb_historico[".originalDefaultPages"] = $tdatatb_historico[".defaultPages"];

//	field labels
$fieldLabelstb_historico = array();
$fieldToolTipstb_historico = array();
$pageTitlestb_historico = array();
$placeHolderstb_historico = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelstb_historico["English"] = array();
	$fieldToolTipstb_historico["English"] = array();
	$placeHolderstb_historico["English"] = array();
	$pageTitlestb_historico["English"] = array();
	$fieldLabelstb_historico["English"]["hstID"] = "Hst ID";
	$fieldToolTipstb_historico["English"]["hstID"] = "";
	$placeHolderstb_historico["English"]["hstID"] = "";
	$fieldLabelstb_historico["English"]["pacID"] = "Pac ID";
	$fieldToolTipstb_historico["English"]["pacID"] = "";
	$placeHolderstb_historico["English"]["pacID"] = "";
	$fieldLabelstb_historico["English"]["Resp_Anterior"] = "Resp Anterior";
	$fieldToolTipstb_historico["English"]["Resp_Anterior"] = "";
	$placeHolderstb_historico["English"]["Resp_Anterior"] = "";
	$fieldLabelstb_historico["English"]["Novo_Responsavel"] = "Novo Responsavel";
	$fieldToolTipstb_historico["English"]["Novo_Responsavel"] = "";
	$placeHolderstb_historico["English"]["Novo_Responsavel"] = "";
	$fieldLabelstb_historico["English"]["Data_alteracao"] = "Data Alteracao";
	$fieldToolTipstb_historico["English"]["Data_alteracao"] = "";
	$placeHolderstb_historico["English"]["Data_alteracao"] = "";
	$fieldLabelstb_historico["English"]["vigente"] = "Vigente";
	$fieldToolTipstb_historico["English"]["vigente"] = "";
	$placeHolderstb_historico["English"]["vigente"] = "";
	$fieldLabelstb_historico["English"]["observacoes"] = "Observacoes";
	$fieldToolTipstb_historico["English"]["observacoes"] = "";
	$placeHolderstb_historico["English"]["observacoes"] = "";
	if (count($fieldToolTipstb_historico["English"]))
		$tdatatb_historico[".isUseToolTips"] = true;
}


	$tdatatb_historico[".NCSearch"] = true;



$tdatatb_historico[".shortTableName"] = "tb_historico";
$tdatatb_historico[".nSecOptions"] = 0;

$tdatatb_historico[".mainTableOwnerID"] = "";
$tdatatb_historico[".entityType"] = 0;

$tdatatb_historico[".strOriginalTableName"] = "tb_historico";

	



$tdatatb_historico[".showAddInPopup"] = false;

$tdatatb_historico[".showEditInPopup"] = false;

$tdatatb_historico[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdatatb_historico[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


$tdatatb_historico[".listAjax"] = false;
//	temporary
$tdatatb_historico[".listAjax"] = false;

	$tdatatb_historico[".audit"] = false;

	$tdatatb_historico[".locking"] = false;


$pages = $tdatatb_historico[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdatatb_historico[".edit"] = true;
	$tdatatb_historico[".afterEditAction"] = 0;
	$tdatatb_historico[".closePopupAfterEdit"] = 1;
	$tdatatb_historico[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdatatb_historico[".add"] = true;
$tdatatb_historico[".afterAddAction"] = 1;
$tdatatb_historico[".closePopupAfterAdd"] = 1;
$tdatatb_historico[".afterAddActionDetTable"] = "";
}

if( $pages[PAGE_LIST] ) {
	$tdatatb_historico[".list"] = true;
}



$tdatatb_historico[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdatatb_historico[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdatatb_historico[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdatatb_historico[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdatatb_historico[".printFriendly"] = true;
}



$tdatatb_historico[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdatatb_historico[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdatatb_historico[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdatatb_historico[".isUseAjaxSuggest"] = true;

$tdatatb_historico[".rowHighlite"] = true;





$tdatatb_historico[".ajaxCodeSnippetAdded"] = false;

$tdatatb_historico[".buttonsAdded"] = false;

$tdatatb_historico[".addPageEvents"] = false;

// use timepicker for search panel
$tdatatb_historico[".isUseTimeForSearch"] = false;


$tdatatb_historico[".badgeColor"] = "b22222";


$tdatatb_historico[".allSearchFields"] = array();
$tdatatb_historico[".filterFields"] = array();
$tdatatb_historico[".requiredSearchFields"] = array();

$tdatatb_historico[".googleLikeFields"] = array();
$tdatatb_historico[".googleLikeFields"][] = "hstID";
$tdatatb_historico[".googleLikeFields"][] = "pacID";
$tdatatb_historico[".googleLikeFields"][] = "Resp_Anterior";
$tdatatb_historico[".googleLikeFields"][] = "Novo_Responsavel";
$tdatatb_historico[".googleLikeFields"][] = "Data_alteracao";
$tdatatb_historico[".googleLikeFields"][] = "vigente";
$tdatatb_historico[".googleLikeFields"][] = "observacoes";



$tdatatb_historico[".tableType"] = "list";

$tdatatb_historico[".printerPageOrientation"] = 0;
$tdatatb_historico[".nPrinterPageScale"] = 100;

$tdatatb_historico[".nPrinterSplitRecords"] = 40;

$tdatatb_historico[".geocodingEnabled"] = false;










$tdatatb_historico[".pageSize"] = 20;

$tdatatb_historico[".warnLeavingPages"] = true;



$tstrOrderBy = "";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatatb_historico[".strOrderBy"] = $tstrOrderBy;

$tdatatb_historico[".orderindexes"] = array();

$tdatatb_historico[".sqlHead"] = "SELECT hstID,  	pacID,  	Resp_Anterior,  	Novo_Responsavel,  	Data_alteracao,  	vigente,  	observacoes";
$tdatatb_historico[".sqlFrom"] = "FROM tb_historico";
$tdatatb_historico[".sqlWhereExpr"] = "";
$tdatatb_historico[".sqlTail"] = "";










//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatatb_historico[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatatb_historico[".arrGroupsPerPage"] = $arrGPP;

$tdatatb_historico[".highlightSearchResults"] = true;

$tableKeystb_historico = array();
$tableKeystb_historico[] = "hstID";
$tdatatb_historico[".Keys"] = $tableKeystb_historico;


$tdatatb_historico[".hideMobileList"] = array();




//	hstID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "hstID";
	$fdata["GoodName"] = "hstID";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","hstID");
	$fdata["FieldType"] = 3;

	
		$fdata["AutoInc"] = true;

	
			

		$fdata["strField"] = "hstID";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "hstID";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["hstID"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "hstID";
//	pacID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "pacID";
	$fdata["GoodName"] = "pacID";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","pacID");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "pacID";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "pacID";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["pacID"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "pacID";
//	Resp_Anterior
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Resp_Anterior";
	$fdata["GoodName"] = "Resp_Anterior";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","Resp_Anterior");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "Resp_Anterior";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Resp_Anterior";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["Resp_Anterior"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "Resp_Anterior";
//	Novo_Responsavel
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Novo_Responsavel";
	$fdata["GoodName"] = "Novo_Responsavel";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","Novo_Responsavel");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "Novo_Responsavel";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Novo_Responsavel";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["Novo_Responsavel"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "Novo_Responsavel";
//	Data_alteracao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Data_alteracao";
	$fdata["GoodName"] = "Data_alteracao";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","Data_alteracao");
	$fdata["FieldType"] = 7;

	
	
	
			

		$fdata["strField"] = "Data_alteracao";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Data_alteracao";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Date");

	
		$edata["weekdayMessage"] = array("message" => "Invalid week day", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Equals";

			// the default search options list
				$fdata["searchOptionsList"] = array("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, NOT_EMPTY );
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["Data_alteracao"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "Data_alteracao";
//	vigente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "vigente";
	$fdata["GoodName"] = "vigente";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","vigente");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "vigente";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "vigente";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Checkbox");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Checkbox");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
							
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Equals";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["vigente"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "vigente";
//	observacoes
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "observacoes";
	$fdata["GoodName"] = "observacoes";
	$fdata["ownerTable"] = "tb_historico";
	$fdata["Label"] = GetFieldLabel("tb_historico","observacoes");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "observacoes";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "observacoes";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text area");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
				$edata["nRows"] = 100;
			$edata["nCols"] = 200;

	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_historico["observacoes"] = $fdata;
		$tdatatb_historico[".searchableFields"][] = "observacoes";


$tables_data["tb_historico"]=&$tdatatb_historico;
$field_labels["tb_historico"] = &$fieldLabelstb_historico;
$fieldToolTips["tb_historico"] = &$fieldToolTipstb_historico;
$placeHolders["tb_historico"] = &$placeHolderstb_historico;
$page_titles["tb_historico"] = &$pageTitlestb_historico;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["tb_historico"] = array();

// tables which are master tables for current table (detail)
$masterTablesData["tb_historico"] = array();



	
				$strOriginalDetailsTable="tb_paciente";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="tb_paciente";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "tb_paciente";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["tb_historico"][0] = $masterParams;
				$masterTablesData["tb_historico"][0]["masterKeys"] = array();
	$masterTablesData["tb_historico"][0]["masterKeys"][]="pacienteID";
				$masterTablesData["tb_historico"][0]["detailKeys"] = array();
	$masterTablesData["tb_historico"][0]["detailKeys"][]="pacID";
		
// -----------------end  prepare master-details data arrays ------------------------------//


require_once(getabspath("classes/sql.php"));










function createSqlQuery_tb_historico()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "hstID,  	pacID,  	Resp_Anterior,  	Novo_Responsavel,  	Data_alteracao,  	vigente,  	observacoes";
$proto0["m_strFrom"] = "FROM tb_historico";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto2["m_column"]=$obj;
$proto2["m_contained"] = array();
$proto2["m_strCase"] = "";
$proto2["m_havingmode"] = false;
$proto2["m_inBrackets"] = false;
$proto2["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto2);

$proto0["m_where"] = $obj;
$proto4=array();
$proto4["m_sql"] = "";
$proto4["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto4["m_column"]=$obj;
$proto4["m_contained"] = array();
$proto4["m_strCase"] = "";
$proto4["m_havingmode"] = false;
$proto4["m_inBrackets"] = false;
$proto4["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto4);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "hstID",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto6["m_sql"] = "hstID";
$proto6["m_srcTableName"] = "tb_historico";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "pacID",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto8["m_sql"] = "pacID";
$proto8["m_srcTableName"] = "tb_historico";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "Resp_Anterior",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto10["m_sql"] = "Resp_Anterior";
$proto10["m_srcTableName"] = "tb_historico";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "Novo_Responsavel",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto12["m_sql"] = "Novo_Responsavel";
$proto12["m_srcTableName"] = "tb_historico";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "Data_alteracao",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto14["m_sql"] = "Data_alteracao";
$proto14["m_srcTableName"] = "tb_historico";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "vigente",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto16["m_sql"] = "vigente";
$proto16["m_srcTableName"] = "tb_historico";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "observacoes",
	"m_strTable" => "tb_historico",
	"m_srcTableName" => "tb_historico"
));

$proto18["m_sql"] = "observacoes";
$proto18["m_srcTableName"] = "tb_historico";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto20=array();
$proto20["m_link"] = "SQLL_MAIN";
			$proto21=array();
$proto21["m_strName"] = "tb_historico";
$proto21["m_srcTableName"] = "tb_historico";
$proto21["m_columns"] = array();
$proto21["m_columns"][] = "hstID";
$proto21["m_columns"][] = "pacID";
$proto21["m_columns"][] = "Resp_Anterior";
$proto21["m_columns"][] = "Novo_Responsavel";
$proto21["m_columns"][] = "Data_alteracao";
$proto21["m_columns"][] = "vigente";
$proto21["m_columns"][] = "observacoes";
$obj = new SQLTable($proto21);

$proto20["m_table"] = $obj;
$proto20["m_sql"] = "tb_historico";
$proto20["m_alias"] = "";
$proto20["m_srcTableName"] = "tb_historico";
$proto22=array();
$proto22["m_sql"] = "";
$proto22["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto22["m_column"]=$obj;
$proto22["m_contained"] = array();
$proto22["m_strCase"] = "";
$proto22["m_havingmode"] = false;
$proto22["m_inBrackets"] = false;
$proto22["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto22);

$proto20["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto20);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$proto0["m_srcTableName"]="tb_historico";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_tb_historico = createSqlQuery_tb_historico();


	
		;

							

$tdatatb_historico[".sqlquery"] = $queryData_tb_historico;

$tableEvents["tb_historico"] = new eventsBase;
$tdatatb_historico[".hasEvents"] = false;

?>