<?php



$tdatahospitals = array();
$tdatahospitals[".searchableFields"] = array();
$tdatahospitals[".ShortName"] = "hospitals";
$tdatahospitals[".OwnerID"] = "";
$tdatahospitals[".OriginalTable"] = "hospitals";


$defaultPages = my_json_decode( "{\"add\":\"add\",\"search\":\"search\"}" );

$tdatahospitals[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"search\":[\"search\"]}" );
$tdatahospitals[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"search\":[\"search\"]}" ) );
$tdatahospitals[".defaultPages"] = $defaultPages;

//	field labels
$fieldLabelshospitals = array();
$fieldToolTipshospitals = array();
$pageTitleshospitals = array();
$placeHoldershospitals = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelshospitals["English"] = array();
	$fieldToolTipshospitals["English"] = array();
	$placeHoldershospitals["English"] = array();
	$pageTitleshospitals["English"] = array();
	$fieldLabelshospitals["English"]["BirthPlace"] = "Birth Place";
	$fieldToolTipshospitals["English"]["BirthPlace"] = "";
	$placeHoldershospitals["English"]["BirthPlace"] = "";
	$fieldLabelshospitals["English"]["BirthDistrict"] = "Birth District";
	$fieldToolTipshospitals["English"]["BirthDistrict"] = "";
	$placeHoldershospitals["English"]["BirthDistrict"] = "";
	$fieldLabelshospitals["English"]["BirthProvince"] = "Birth Province";
	$fieldToolTipshospitals["English"]["BirthProvince"] = "";
	$placeHoldershospitals["English"]["BirthProvince"] = "";
	if (count($fieldToolTipshospitals["English"]))
		$tdatahospitals[".isUseToolTips"] = true;
}


	$tdatahospitals[".NCSearch"] = true;



$tdatahospitals[".shortTableName"] = "hospitals";
$tdatahospitals[".nSecOptions"] = 0;

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

$tdatahospitals[".strOriginalTableName"] = "hospitals";

	



$tdatahospitals[".showAddInPopup"] = false;

$tdatahospitals[".showEditInPopup"] = false;

$tdatahospitals[".showViewInPopup"] = false;

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


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

	$tdatahospitals[".audit"] = false;

	$tdatahospitals[".locking"] = false;


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

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

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

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

$tdatahospitals[".updateSelected"] = true;


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




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

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

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

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



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

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

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

$tdatahospitals[".isUseAjaxSuggest"] = true;

$tdatahospitals[".rowHighlite"] = true;



						

$tdatahospitals[".ajaxCodeSnippetAdded"] = false;

$tdatahospitals[".buttonsAdded"] = false;

$tdatahospitals[".addPageEvents"] = false;

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




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

$tdatahospitals[".googleLikeFields"] = array();
$tdatahospitals[".googleLikeFields"][] = "BirthPlace";
$tdatahospitals[".googleLikeFields"][] = "BirthDistrict";
$tdatahospitals[".googleLikeFields"][] = "BirthProvince";



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

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

$tdatahospitals[".nPrinterSplitRecords"] = 40;

$tdatahospitals[".geocodingEnabled"] = false;










$tdatahospitals[".pageSize"] = 20;

$tdatahospitals[".warnLeavingPages"] = true;



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

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

$tdatahospitals[".sqlHead"] = "SELECT BirthPlace,  	BirthDistrict,  	BirthProvince";
$tdatahospitals[".sqlFrom"] = "FROM hospitals";
$tdatahospitals[".sqlWhereExpr"] = "";
$tdatahospitals[".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;
$tdatahospitals[".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;
$tdatahospitals[".arrGroupsPerPage"] = $arrGPP;

$tdatahospitals[".highlightSearchResults"] = true;

$tableKeyshospitals = array();
$tdatahospitals[".Keys"] = $tableKeyshospitals;


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




//	BirthPlace
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "BirthPlace";
	$fdata["GoodName"] = "BirthPlace";
	$fdata["ownerTable"] = "hospitals";
	$fdata["Label"] = GetFieldLabel("hospitals","BirthPlace");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdatahospitals["BirthPlace"] = $fdata;
		$tdatahospitals[".searchableFields"][] = "BirthPlace";
//	BirthDistrict
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "BirthDistrict";
	$fdata["GoodName"] = "BirthDistrict";
	$fdata["ownerTable"] = "hospitals";
	$fdata["Label"] = GetFieldLabel("hospitals","BirthDistrict");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "llg";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "District";
	$edata["LinkFieldType"] = 200;
	$edata["DisplayField"] = "District";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


	
	
	
	
			$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


	$tdatahospitals["BirthDistrict"] = $fdata;
		$tdatahospitals[".searchableFields"][] = "BirthDistrict";
//	BirthProvince
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "BirthProvince";
	$fdata["GoodName"] = "BirthProvince";
	$fdata["ownerTable"] = "hospitals";
	$fdata["Label"] = GetFieldLabel("hospitals","BirthProvince");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "llg";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "Province";
	$edata["LinkFieldType"] = 200;
	$edata["DisplayField"] = "Province";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


	
	
	
	
			$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


	$tdatahospitals["BirthProvince"] = $fdata;
		$tdatahospitals[".searchableFields"][] = "BirthProvince";


$tables_data["hospitals"]=&$tdatahospitals;
$field_labels["hospitals"] = &$fieldLabelshospitals;
$fieldToolTips["hospitals"] = &$fieldToolTipshospitals;
$placeHolders["hospitals"] = &$placeHoldershospitals;
$page_titles["hospitals"] = &$pageTitleshospitals;

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

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



// -----------------end  prepare master-details data arrays ------------------------------//


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










function createSqlQuery_hospitals()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "BirthPlace,  	BirthDistrict,  	BirthProvince";
$proto0["m_strFrom"] = "FROM hospitals";
$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" => "BirthPlace",
	"m_strTable" => "hospitals",
	"m_srcTableName" => "hospitals"
));

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto12=array();
$proto12["m_link"] = "SQLL_MAIN";
			$proto13=array();
$proto13["m_strName"] = "hospitals";
$proto13["m_srcTableName"] = "hospitals";
$proto13["m_columns"] = array();
$proto13["m_columns"][] = "BirthPlace";
$proto13["m_columns"][] = "BirthDistrict";
$proto13["m_columns"][] = "BirthProvince";
$obj = new SQLTable($proto13);

$proto12["m_table"] = $obj;
$proto12["m_sql"] = "hospitals";
$proto12["m_alias"] = "";
$proto12["m_srcTableName"] = "hospitals";
$proto14=array();
$proto14["m_sql"] = "";
$proto14["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_hospitals = createSqlQuery_hospitals();


	
		;

			

$tdatahospitals[".sqlquery"] = $queryData_hospitals;

$tableEvents["hospitals"] = new eventsBase;
$tdatahospitals[".hasEvents"] = false;

?>