<?php



$tdataexames = array();
$tdataexames[".searchableFields"] = array();
$tdataexames[".ShortName"] = "exames";
$tdataexames[".OwnerID"] = "";
$tdataexames[".OriginalTable"] = "exames";


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

//	field labels
$fieldLabelsexames = array();
$fieldToolTipsexames = array();
$pageTitlesexames = array();
$placeHoldersexames = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsexames["English"] = array();
	$fieldToolTipsexames["English"] = array();
	$placeHoldersexames["English"] = array();
	$pageTitlesexames["English"] = array();
	$fieldLabelsexames["English"]["exameID"] = "ID";
	$fieldToolTipsexames["English"]["exameID"] = "";
	$placeHoldersexames["English"]["exameID"] = "";
	$fieldLabelsexames["English"]["consultaID"] = "Consulta ID";
	$fieldToolTipsexames["English"]["consultaID"] = "";
	$placeHoldersexames["English"]["consultaID"] = "";
	$fieldLabelsexames["English"]["tipo"] = "Tipo";
	$fieldToolTipsexames["English"]["tipo"] = "";
	$placeHoldersexames["English"]["tipo"] = "";
	$fieldLabelsexames["English"]["descricao"] = "Descrição ";
	$fieldToolTipsexames["English"]["descricao"] = "";
	$placeHoldersexames["English"]["descricao"] = "";
	$fieldLabelsexames["English"]["status"] = "Status";
	$fieldToolTipsexames["English"]["status"] = "";
	$placeHoldersexames["English"]["status"] = "";
	$fieldLabelsexames["English"]["copia_pdf"] = "Copia Pdf";
	$fieldToolTipsexames["English"]["copia_pdf"] = "";
	$placeHoldersexames["English"]["copia_pdf"] = "";
	$fieldLabelsexames["English"]["data"] = "Data";
	$fieldToolTipsexames["English"]["data"] = "";
	$placeHoldersexames["English"]["data"] = "";
	$fieldLabelsexames["English"]["horario"] = "Horário ";
	$fieldToolTipsexames["English"]["horario"] = "";
	$placeHoldersexames["English"]["horario"] = "";
	if (count($fieldToolTipsexames["English"]))
		$tdataexames[".isUseToolTips"] = true;
}


	$tdataexames[".NCSearch"] = true;



$tdataexames[".shortTableName"] = "exames";
$tdataexames[".nSecOptions"] = 0;

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

$tdataexames[".strOriginalTableName"] = "exames";

	



$tdataexames[".showAddInPopup"] = false;

$tdataexames[".showEditInPopup"] = false;

$tdataexames[".showViewInPopup"] = false;

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


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

	$tdataexames[".audit"] = false;

	$tdataexames[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataexames[".isUseAjaxSuggest"] = true;

$tdataexames[".rowHighlite"] = true;





$tdataexames[".ajaxCodeSnippetAdded"] = false;

$tdataexames[".buttonsAdded"] = false;

$tdataexames[".addPageEvents"] = false;

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


$tdataexames[".badgeColor"] = "dc143c";


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

$tdataexames[".googleLikeFields"] = array();
$tdataexames[".googleLikeFields"][] = "exameID";
$tdataexames[".googleLikeFields"][] = "consultaID";
$tdataexames[".googleLikeFields"][] = "tipo";
$tdataexames[".googleLikeFields"][] = "descricao";
$tdataexames[".googleLikeFields"][] = "status";
$tdataexames[".googleLikeFields"][] = "copia_pdf";
$tdataexames[".googleLikeFields"][] = "data";
$tdataexames[".googleLikeFields"][] = "horario";



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

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

$tdataexames[".nPrinterSplitRecords"] = 40;

$tdataexames[".geocodingEnabled"] = false;










$tdataexames[".pageSize"] = 20;

$tdataexames[".warnLeavingPages"] = true;



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

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

$tdataexames[".sqlHead"] = "SELECT exameID,  	consultaID,  	tipo,  	descricao,  	status,  	copia_pdf,  	`data`,  	horario";
$tdataexames[".sqlFrom"] = "FROM exames";
$tdataexames[".sqlWhereExpr"] = "";
$tdataexames[".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;
$tdataexames[".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;
$tdataexames[".arrGroupsPerPage"] = $arrGPP;

$tdataexames[".highlightSearchResults"] = true;

$tableKeysexames = array();
$tableKeysexames[] = "exameID";
$tdataexames[".Keys"] = $tableKeysexames;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

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

	
	
				$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


	$tdataexames["exameID"] = $fdata;
		$tdataexames[".searchableFields"][] = "exameID";
//	consultaID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "consultaID";
	$fdata["GoodName"] = "consultaID";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","consultaID");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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


	$tdataexames["consultaID"] = $fdata;
		$tdataexames[".searchableFields"][] = "consultaID";
//	tipo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "tipo";
	$fdata["GoodName"] = "tipo";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","tipo");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "tipos_exames";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "exameID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "tipo_exame";

	

	
	$edata["LookupOrderBy"] = "tipo_exame";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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("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


	$tdataexames["tipo"] = $fdata;
		$tdataexames[".searchableFields"][] = "tipo";
//	descricao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "descricao";
	$fdata["GoodName"] = "descricao";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","descricao");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataexames["descricao"] = $fdata;
		$tdataexames[".searchableFields"][] = "descricao";
//	status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "status";
	$fdata["GoodName"] = "status";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","status");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
		$edata["LookupType"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Solicitado";
	$edata["LookupValues"][] = "Agendar";
	$edata["LookupValues"][] = "Agendado";
	$edata["LookupValues"][] = "Re-Agendado";
	$edata["LookupValues"][] = "Realizado";
	$edata["LookupValues"][] = "Cancelado";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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("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


	$tdataexames["status"] = $fdata;
		$tdataexames[".searchableFields"][] = "status";
//	copia_pdf
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "copia_pdf";
	$fdata["GoodName"] = "copia_pdf";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","copia_pdf");
	$fdata["FieldType"] = 201;

	
	
	
			

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

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

	
	
				$fdata["UploadFolder"] = "uploads\\exames";

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

	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ShowThumbnail"] = true;
	$vdata["ThumbWidth"] = 200;
	$vdata["ThumbHeight"] = 150;
	$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 1;
	$vdata["maxImages"] = 0;

			$vdata["showGallery"] = true;
	$vdata["galleryMode"] = 2;
	$vdata["captionMode"] = 2;
	$vdata["captionField"] = "";

	$vdata["imageBorder"] = 1;
	$vdata["imageFullWidth"] = 1;


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

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

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

	$edata = array("EditFormat" => "Document upload");

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


	
	



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

		$edata["maxNumberOfFiles"] = 0;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

		$edata["CreateThumbnail"] = true;
	$edata["StrThumbnail"] = "th";
			$edata["ThumbnailSize"] = 600;

			
	
	
	
	$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


	$tdataexames["copia_pdf"] = $fdata;
		$tdataexames[".searchableFields"][] = "copia_pdf";
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","data");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`data`";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

	
	
	
		$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("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


	$tdataexames["data"] = $fdata;
		$tdataexames[".searchableFields"][] = "data";
//	horario
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "horario";
	$fdata["GoodName"] = "horario";
	$fdata["ownerTable"] = "exames";
	$fdata["Label"] = GetFieldLabel("exames","horario");
	$fdata["FieldType"] = 134;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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" => "Time");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

	
			
				$hours = 24;
	$edata["FormatTimeAttrs"] = array("useTimePicker" => 0,
									  "hours" => $hours,
									  "minutes" => 1,
									  "showSeconds" => 0);

	
	
	$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


	$tdataexames["horario"] = $fdata;
		$tdataexames[".searchableFields"][] = "horario";


$tables_data["exames"]=&$tdataexames;
$field_labels["exames"] = &$fieldLabelsexames;
$fieldToolTips["exames"] = &$fieldToolTipsexames;
$placeHolders["exames"] = &$placeHoldersexames;
$page_titles["exames"] = &$pageTitlesexames;

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

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="tb_agenda_exame";
		$detailsParam["dOriginalTable"] = "tb_agenda_exame";



				$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "tb_agenda_exame";
	$detailsParam["dCaptionTable"] = GetTableCaption("tb_agenda_exame");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["exames"][$dIndex] = $detailsParam;

	
		$detailsTablesData["exames"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["exames"][$dIndex]["masterKeys"][]="exameID";

				$detailsTablesData["exames"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["exames"][$dIndex]["detailKeys"][]="exameID";

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



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

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


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










function createSqlQuery_exames()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "exameID,  	consultaID,  	tipo,  	descricao,  	status,  	copia_pdf,  	`data`,  	horario";
$proto0["m_strFrom"] = "FROM exames";
$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" => "exameID",
	"m_strTable" => "exames",
	"m_srcTableName" => "exames"
));

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

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

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

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

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

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

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

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

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

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

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

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

$proto18["m_sql"] = "`data`";
$proto18["m_srcTableName"] = "exames";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "horario",
	"m_strTable" => "exames",
	"m_srcTableName" => "exames"
));

$proto20["m_sql"] = "horario";
$proto20["m_srcTableName"] = "exames";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto22=array();
$proto22["m_link"] = "SQLL_MAIN";
			$proto23=array();
$proto23["m_strName"] = "exames";
$proto23["m_srcTableName"] = "exames";
$proto23["m_columns"] = array();
$proto23["m_columns"][] = "exameID";
$proto23["m_columns"][] = "consultaID";
$proto23["m_columns"][] = "tipo";
$proto23["m_columns"][] = "descricao";
$proto23["m_columns"][] = "status";
$proto23["m_columns"][] = "copia_pdf";
$proto23["m_columns"][] = "data";
$proto23["m_columns"][] = "horario";
$obj = new SQLTable($proto23);

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

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

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

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

	return $obj;
}
$queryData_exames = createSqlQuery_exames();


	
		;

								

$tdataexames[".sqlquery"] = $queryData_exames;

$tableEvents["exames"] = new eventsBase;
$tdataexames[".hasEvents"] = false;

?>