<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg12.php" ?>
<?php include_once ((EW_USE_ADODB) ? "adodb5/adodb.inc.php" : "ewmysql12.php") ?>
<?php include_once "phpfn12.php" ?>
<?php include_once "registroinfo.php" ?>
<?php include_once "ficha_usuarioinfo.php" ?>
<?php include_once "seguimiento_individual3gridcls.php" ?>
<?php include_once "seguimiento_maternogridcls.php" ?>
<?php include_once "userfn12.php" ?>
<?php

//
// Page class
//

$registro_edit = NULL; // Initialize page object first

class cregistro_edit extends cregistro {

	// Page ID
	var $PageID = 'edit';

	// Project ID
	var $ProjectID = "{43FC4B6C-8131-46B1-916C-14DB52B1691D}";

	// Table name
	var $TableName = 'registro';

	// Page object name
	var $PageObjName = 'registro_edit';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Methods to clear message
	function ClearMessage() {
		$_SESSION[EW_SESSION_MESSAGE] = "";
	}

	function ClearFailureMessage() {
		$_SESSION[EW_SESSION_FAILURE_MESSAGE] = "";
	}

	function ClearSuccessMessage() {
		$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = "";
	}

	function ClearWarningMessage() {
		$_SESSION[EW_SESSION_WARNING_MESSAGE] = "";
	}

	function ClearMessages() {
		$_SESSION[EW_SESSION_MESSAGE] = "";
		$_SESSION[EW_SESSION_FAILURE_MESSAGE] = "";
		$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = "";
		$_SESSION[EW_SESSION_WARNING_MESSAGE] = "";
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-info ewInfo\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-danger ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}
	var $Token = "";
	var $TokenTimeout = 0;
	var $CheckToken = EW_CHECK_TOKEN;
	var $CheckTokenFn = "ew_CheckToken";
	var $CreateTokenFn = "ew_CreateToken";

	// Valid Post
	function ValidPost() {
		if (!$this->CheckToken || !ew_IsHttpPost())
			return TRUE;
		if (!isset($_POST[EW_TOKEN_NAME]))
			return FALSE;
		$fn = $this->CheckTokenFn;
		if (is_callable($fn))
			return $fn($_POST[EW_TOKEN_NAME], $this->TokenTimeout);
		return FALSE;
	}

	// Create Token
	function CreateToken() {
		global $gsToken;
		if ($this->CheckToken) {
			$fn = $this->CreateTokenFn;
			if ($this->Token == "" && is_callable($fn)) // Create token
				$this->Token = $fn();
			$gsToken = $this->Token; // Save to global variable
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		global $UserTable, $UserTableConn;
		$GLOBALS["Page"] = &$this;
		$this->TokenTimeout = ew_SessionTimeoutTime();

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (registro)
		if (!isset($GLOBALS["registro"]) || get_class($GLOBALS["registro"]) == "cregistro") {
			$GLOBALS["registro"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["registro"];
		}

		// Table object (ficha_usuario)
		if (!isset($GLOBALS['ficha_usuario'])) $GLOBALS['ficha_usuario'] = new cficha_usuario();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'edit', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'registro', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect($this->DBID);

		// User table object (ficha_usuario)
		if (!isset($UserTable)) {
			$UserTable = new cficha_usuario();
			$UserTableConn = Conn($UserTable->DBID);
		}
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if ($Security->IsLoggedIn()) $Security->TablePermission_Loading();
		$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
		if ($Security->IsLoggedIn()) $Security->TablePermission_Loaded();
		if (!$Security->CanEdit()) {
			$Security->SaveLastUrl();
			$this->setFailureMessage(ew_DeniedMsg()); // Set no permission
			if ($Security->CanList())
				$this->Page_Terminate(ew_GetUrl("registrolist.php"));
			else
				$this->Page_Terminate(ew_GetUrl("login.php"));
		}
		if ($Security->IsLoggedIn()) {
			$Security->UserID_Loading();
			$Security->LoadUserID();
			$Security->UserID_Loaded();
			if (strval($Security->CurrentUserID()) == "") {
				$this->setFailureMessage(ew_DeniedMsg()); // Set no permission
				$this->Page_Terminate(ew_GetUrl("registrolist.php"));
			}
		}

		// Create form object
		$objForm = new cFormObj();
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up current action
		$this->Consecutivo->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();

		// Set up multi page object
		$this->SetupMultiPages();

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();

		// Check token
		if (!$this->ValidPost()) {
			echo $Language->Phrase("InvalidPostRequest");
			$this->Page_Terminate();
			exit();
		}

		// Process auto fill
		if (@$_POST["ajax"] == "autofill") {

			// Process auto fill for detail table 'seguimiento_individual3'
			if (@$_POST["grid"] == "fseguimiento_individual3grid") {
				if (!isset($GLOBALS["seguimiento_individual3_grid"])) $GLOBALS["seguimiento_individual3_grid"] = new cseguimiento_individual3_grid;
				$GLOBALS["seguimiento_individual3_grid"]->Page_Init();
				$this->Page_Terminate();
				exit();
			}

			// Process auto fill for detail table 'seguimiento_materno'
			if (@$_POST["grid"] == "fseguimiento_maternogrid") {
				if (!isset($GLOBALS["seguimiento_materno_grid"])) $GLOBALS["seguimiento_materno_grid"] = new cseguimiento_materno_grid;
				$GLOBALS["seguimiento_materno_grid"]->Page_Init();
				$this->Page_Terminate();
				exit();
			}
			$results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
			if ($results) {

				// Clean output buffer
				if (!EW_DEBUG_ENABLED && ob_get_length())
					ob_end_clean();
				echo $results;
				$this->Page_Terminate();
				exit();
			}
		}

		// Create Token
		$this->CreateToken();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $gsExportFile, $gTmpImages;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();

		// Export
		global $EW_EXPORT, $registro;
		if ($this->CustomExport <> "" && $this->CustomExport == $this->Export && array_key_exists($this->CustomExport, $EW_EXPORT)) {
				$sContent = ob_get_contents();
			if ($gsExportFile == "") $gsExportFile = $this->TableVar;
			$class = $EW_EXPORT[$this->CustomExport];
			if (class_exists($class)) {
				$doc = new $class($registro);
				$doc->Text = $sContent;
				if ($this->Export == "email")
					echo $this->ExportEmail($doc->Text);
				else
					$doc->Export();
				ew_DeleteTmpImages(); // Delete temp images
				exit();
			}
		}
		$this->Page_Redirecting($url);

		 // Close connection
		ew_CloseConn();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $FormClassName = "form-horizontal ewForm ewEditForm";
	var $DbMasterFilter;
	var $DbDetailFilter;
	var $DisplayRecs = 1;
	var $StartRec;
	var $StopRec;
	var $TotalRecs = 0;
	var $RecRange = 10;
	var $Pager;
	var $RecCnt;
	var $RecKey = array();
	var $Recordset;
	var $MultiPages; // Multi pages object

	// 
	// Page main
	//
	function Page_Main() {
		global $objForm, $Language, $gsFormError;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;

		// Load key from QueryString
		if (@$_GET["Consecutivo"] <> "") {
			$this->Consecutivo->setQueryStringValue($_GET["Consecutivo"]);
			$this->RecKey["Consecutivo"] = $this->Consecutivo->QueryStringValue;
		} else {
			$bLoadCurrentRecord = TRUE;
		}

		// Set up Breadcrumb
		$this->SetupBreadcrumb();

		// Load recordset
		$this->StartRec = 1; // Initialize start position
		if ($this->Recordset = $this->LoadRecordset()) // Load records
			$this->TotalRecs = $this->Recordset->RecordCount(); // Get record count
		if ($this->TotalRecs <= 0) { // No record found
			if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "")
				$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
			$this->Page_Terminate("registrolist.php"); // Return to list page
		} elseif ($bLoadCurrentRecord) { // Load current record position
			$this->SetUpStartRec(); // Set up start record position

			// Point to current record
			if (intval($this->StartRec) <= intval($this->TotalRecs)) {
				$bMatchRecord = TRUE;
				$this->Recordset->Move($this->StartRec-1);
			}
		} else { // Match key values
			while (!$this->Recordset->EOF) {
				if (strval($this->Consecutivo->CurrentValue) == strval($this->Recordset->fields('Consecutivo'))) {
					$this->setStartRecordNumber($this->StartRec); // Save record position
					$bMatchRecord = TRUE;
					break;
				} else {
					$this->StartRec++;
					$this->Recordset->MoveNext();
				}
			}
		}

		// Process form if post back
		if (@$_POST["a_edit"] <> "") {
			$this->CurrentAction = $_POST["a_edit"]; // Get action code
			$this->LoadFormValues(); // Get form values

			// Set up detail parameters
			$this->SetUpDetailParms();
		} else {
			$this->CurrentAction = "I"; // Default action is display
		}

		// Validate form if post back
		if (@$_POST["a_edit"] <> "") {
			if (!$this->ValidateForm()) {
				$this->CurrentAction = ""; // Form error, reset action
				$this->setFailureMessage($gsFormError);
				$this->EventCancelled = TRUE; // Event cancelled
				$this->RestoreFormValues();
			}
		}
		switch ($this->CurrentAction) {
			case "I": // Get a record to display
				if (!$bMatchRecord) {
					if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "")
						$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
					$this->Page_Terminate("registrolist.php"); // Return to list page
				} else {
					$this->LoadRowValues($this->Recordset); // Load row values
				}

				// Set up detail parameters
				$this->SetUpDetailParms();
				break;
			Case "U": // Update
				if ($this->getCurrentDetailTable() <> "") // Master/detail edit
					$sReturnUrl = $this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $this->getCurrentDetailTable()); // Master/Detail view page
				else
					$sReturnUrl = $this->getReturnUrl();
				if (ew_GetPageName($sReturnUrl) == "registrolist.php")
					$sReturnUrl = $this->AddMasterUrl($sReturnUrl); // List page, return to list page with correct master key if necessary
				$this->SendEmail = TRUE; // Send email on update success
				if ($this->EditRow()) { // Update record based on key
					if ($this->getSuccessMessage() == "")
						$this->setSuccessMessage($Language->Phrase("UpdateSuccess")); // Update success
					$this->Page_Terminate($sReturnUrl); // Return to caller
				} elseif ($this->getFailureMessage() == $Language->Phrase("NoRecord")) {
					$this->Page_Terminate($sReturnUrl); // Return to caller
				} else {
					$this->EventCancelled = TRUE; // Event cancelled
					$this->RestoreFormValues(); // Restore form values if update failed

					// Set up detail parameters
					$this->SetUpDetailParms();
				}
		}

		// Render the record
		$this->RowType = EW_ROWTYPE_EDIT; // Render as Edit
		$this->ResetAttrs();
		$this->RenderRow();
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		if ($this->DisplayRecs == 0)
			return;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
				$this->StartRec = $_GET[EW_TABLE_START_REC];
				$this->setStartRecordNumber($this->StartRec);
			} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
				$PageNo = $_GET[EW_TABLE_PAGE_NO];
				if (is_numeric($PageNo)) {
					$this->StartRec = ($PageNo-1)*$this->DisplayRecs+1;
					if ($this->StartRec <= 0) {
						$this->StartRec = 1;
					} elseif ($this->StartRec >= intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1) {
						$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1;
					}
					$this->setStartRecordNumber($this->StartRec);
				}
			}
		}
		$this->StartRec = $this->getStartRecordNumber();

		// Check if correct start record counter
		if (!is_numeric($this->StartRec) || $this->StartRec == "") { // Avoid invalid start record counter
			$this->StartRec = 1; // Reset start record counter
			$this->setStartRecordNumber($this->StartRec);
		} elseif (intval($this->StartRec) > intval($this->TotalRecs)) { // Avoid starting record > total records
			$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to last page first record
			$this->setStartRecordNumber($this->StartRec);
		} elseif (($this->StartRec-1) % $this->DisplayRecs <> 0) {
			$this->StartRec = intval(($this->StartRec-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to page boundary
			$this->setStartRecordNumber($this->StartRec);
		}
	}

	// Get upload files
	function GetUploadFiles() {
		global $objForm, $Language;

		// Get upload data
	}

	// Load form values
	function LoadFormValues() {

		// Load from form
		global $objForm;
		if (!$this->Consecutivo->FldIsDetailKey)
			$this->Consecutivo->setFormValue($objForm->GetValue("x_Consecutivo"));
		if (!$this->Seguimiento->FldIsDetailKey) {
			$this->Seguimiento->setFormValue($objForm->GetValue("x_Seguimiento"));
		}
		if (!$this->Condicion_Final->FldIsDetailKey) {
			$this->Condicion_Final->setFormValue($objForm->GetValue("x_Condicion_Final"));
		}
		if (!$this->Codigo_centro->FldIsDetailKey) {
			$this->Codigo_centro->setFormValue($objForm->GetValue("x_Codigo_centro"));
		}
		if (!$this->Codigo_UPGD->FldIsDetailKey) {
			$this->Codigo_UPGD->setFormValue($objForm->GetValue("x_Codigo_UPGD"));
		}
		if (!$this->Cod_Evento->FldIsDetailKey) {
			$this->Cod_Evento->setFormValue($objForm->GetValue("x_Cod_Evento"));
		}
		if (!$this->Embarazo_Actual->FldIsDetailKey) {
			$this->Embarazo_Actual->setFormValue($objForm->GetValue("x_Embarazo_Actual"));
		}
		if (!$this->Fecha_Notificacion->FldIsDetailKey) {
			$this->Fecha_Notificacion->setFormValue($objForm->GetValue("x_Fecha_Notificacion"));
			$this->Fecha_Notificacion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Notificacion->CurrentValue, 5);
		}
		if (!$this->Semana->FldIsDetailKey) {
			$this->Semana->setFormValue($objForm->GetValue("x_Semana"));
		}
		if (!$this->Periodo_Epidemiologico->FldIsDetailKey) {
			$this->Periodo_Epidemiologico->setFormValue($objForm->GetValue("x_Periodo_Epidemiologico"));
		}
		if (!$this->Periodo_Sivigila->FldIsDetailKey) {
			$this->Periodo_Sivigila->setFormValue($objForm->GetValue("x_Periodo_Sivigila"));
		}
		if (!$this->Primer_Nombre->FldIsDetailKey) {
			$this->Primer_Nombre->setFormValue($objForm->GetValue("x_Primer_Nombre"));
		}
		if (!$this->Segundo_Nombre->FldIsDetailKey) {
			$this->Segundo_Nombre->setFormValue($objForm->GetValue("x_Segundo_Nombre"));
		}
		if (!$this->Primer_Apellido->FldIsDetailKey) {
			$this->Primer_Apellido->setFormValue($objForm->GetValue("x_Primer_Apellido"));
		}
		if (!$this->Segundo_Apellido->FldIsDetailKey) {
			$this->Segundo_Apellido->setFormValue($objForm->GetValue("x_Segundo_Apellido"));
		}
		if (!$this->Tipo_Id->FldIsDetailKey) {
			$this->Tipo_Id->setFormValue($objForm->GetValue("x_Tipo_Id"));
		}
		if (!$this->Numero_Identificacion->FldIsDetailKey) {
			$this->Numero_Identificacion->setFormValue($objForm->GetValue("x_Numero_Identificacion"));
		}
		if (!$this->Edad->FldIsDetailKey) {
			$this->Edad->setFormValue($objForm->GetValue("x_Edad"));
		}
		if (!$this->Unidad_Edad->FldIsDetailKey) {
			$this->Unidad_Edad->setFormValue($objForm->GetValue("x_Unidad_Edad"));
		}
		if (!$this->Sexo->FldIsDetailKey) {
			$this->Sexo->setFormValue($objForm->GetValue("x_Sexo"));
		}
		if (!$this->Pais_Ocurrencia->FldIsDetailKey) {
			$this->Pais_Ocurrencia->setFormValue($objForm->GetValue("x_Pais_Ocurrencia"));
		}
		if (!$this->Depto_Ocurrencia->FldIsDetailKey) {
			$this->Depto_Ocurrencia->setFormValue($objForm->GetValue("x_Depto_Ocurrencia"));
		}
		if (!$this->Municipio_Ocurrencia->FldIsDetailKey) {
			$this->Municipio_Ocurrencia->setFormValue($objForm->GetValue("x_Municipio_Ocurrencia"));
		}
		if (!$this->Area_Ocurrencia->FldIsDetailKey) {
			$this->Area_Ocurrencia->setFormValue($objForm->GetValue("x_Area_Ocurrencia"));
		}
		if (!$this->Localidad->FldIsDetailKey) {
			$this->Localidad->setFormValue($objForm->GetValue("x_Localidad"));
		}
		if (!$this->Barrio->FldIsDetailKey) {
			$this->Barrio->setFormValue($objForm->GetValue("x_Barrio"));
		}
		if (!$this->Direccion_Residencia->FldIsDetailKey) {
			$this->Direccion_Residencia->setFormValue($objForm->GetValue("x_Direccion_Residencia"));
		}
		if (!$this->Ocupacion->FldIsDetailKey) {
			$this->Ocupacion->setFormValue($objForm->GetValue("x_Ocupacion"));
		}
		if (!$this->Tipo_Regimen_Salud->FldIsDetailKey) {
			$this->Tipo_Regimen_Salud->setFormValue($objForm->GetValue("x_Tipo_Regimen_Salud"));
		}
		if (!$this->Cod_Administradora->FldIsDetailKey) {
			$this->Cod_Administradora->setFormValue($objForm->GetValue("x_Cod_Administradora"));
		}
		if (!$this->gp_discapa->FldIsDetailKey) {
			$this->gp_discapa->setFormValue($objForm->GetValue("x_gp_discapa"));
		}
		if (!$this->gp_desplaz->FldIsDetailKey) {
			$this->gp_desplaz->setFormValue($objForm->GetValue("x_gp_desplaz"));
		}
		if (!$this->gp_migrant->FldIsDetailKey) {
			$this->gp_migrant->setFormValue($objForm->GetValue("x_gp_migrant"));
		}
		if (!$this->gp_carcela->FldIsDetailKey) {
			$this->gp_carcela->setFormValue($objForm->GetValue("x_gp_carcela"));
		}
		if (!$this->gp_gestan->FldIsDetailKey) {
			$this->gp_gestan->setFormValue($objForm->GetValue("x_gp_gestan"));
		}
		if (!$this->gp_indigen->FldIsDetailKey) {
			$this->gp_indigen->setFormValue($objForm->GetValue("x_gp_indigen"));
		}
		if (!$this->gp_pobicbf->FldIsDetailKey) {
			$this->gp_pobicbf->setFormValue($objForm->GetValue("x_gp_pobicbf"));
		}
		if (!$this->gp_mad_com->FldIsDetailKey) {
			$this->gp_mad_com->setFormValue($objForm->GetValue("x_gp_mad_com"));
		}
		if (!$this->gp_desmovi->FldIsDetailKey) {
			$this->gp_desmovi->setFormValue($objForm->GetValue("x_gp_desmovi"));
		}
		if (!$this->gp_psiquia->FldIsDetailKey) {
			$this->gp_psiquia->setFormValue($objForm->GetValue("x_gp_psiquia"));
		}
		if (!$this->gp_vic_vio->FldIsDetailKey) {
			$this->gp_vic_vio->setFormValue($objForm->GetValue("x_gp_vic_vio"));
		}
		if (!$this->gp_otros->FldIsDetailKey) {
			$this->gp_otros->setFormValue($objForm->GetValue("x_gp_otros"));
		}
		if (!$this->Depto_Residencia->FldIsDetailKey) {
			$this->Depto_Residencia->setFormValue($objForm->GetValue("x_Depto_Residencia"));
		}
		if (!$this->Municipio_Residencia->FldIsDetailKey) {
			$this->Municipio_Residencia->setFormValue($objForm->GetValue("x_Municipio_Residencia"));
		}
		if (!$this->Fecha_Consulta->FldIsDetailKey) {
			$this->Fecha_Consulta->setFormValue($objForm->GetValue("x_Fecha_Consulta"));
			$this->Fecha_Consulta->CurrentValue = ew_UnFormatDateTime($this->Fecha_Consulta->CurrentValue, 5);
		}
		if (!$this->Fecha_Inicio_Sintomas->FldIsDetailKey) {
			$this->Fecha_Inicio_Sintomas->setFormValue($objForm->GetValue("x_Fecha_Inicio_Sintomas"));
			$this->Fecha_Inicio_Sintomas->CurrentValue = ew_UnFormatDateTime($this->Fecha_Inicio_Sintomas->CurrentValue, 5);
		}
		if (!$this->Hospitalizado->FldIsDetailKey) {
			$this->Hospitalizado->setFormValue($objForm->GetValue("x_Hospitalizado"));
		}
		if (!$this->Fecha_Defuncion->FldIsDetailKey) {
			$this->Fecha_Defuncion->setFormValue($objForm->GetValue("x_Fecha_Defuncion"));
			$this->Fecha_Defuncion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Defuncion->CurrentValue, 5);
		}
		if (!$this->Numero_Certificado_Defuncion->FldIsDetailKey) {
			$this->Numero_Certificado_Defuncion->setFormValue($objForm->GetValue("x_Numero_Certificado_Defuncion"));
		}
		if (!$this->Causa_Basica_Muerte_CIEX->FldIsDetailKey) {
			$this->Causa_Basica_Muerte_CIEX->setFormValue($objForm->GetValue("x_Causa_Basica_Muerte_CIEX"));
		}
		if (!$this->Entidad_fallecimiento->FldIsDetailKey) {
			$this->Entidad_fallecimiento->setFormValue($objForm->GetValue("x_Entidad_fallecimiento"));
		}
		if (!$this->Telefono->FldIsDetailKey) {
			$this->Telefono->setFormValue($objForm->GetValue("x_Telefono"));
		}
		if (!$this->Fecha_Nacimiento->FldIsDetailKey) {
			$this->Fecha_Nacimiento->setFormValue($objForm->GetValue("x_Fecha_Nacimiento"));
			$this->Fecha_Nacimiento->CurrentValue = ew_UnFormatDateTime($this->Fecha_Nacimiento->CurrentValue, 5);
		}
		if (!$this->Nombre_Profesional_Diligencia->FldIsDetailKey) {
			$this->Nombre_Profesional_Diligencia->setFormValue($objForm->GetValue("x_Nombre_Profesional_Diligencia"));
		}
		if (!$this->Telefono_Profesional_Diligencia->FldIsDetailKey) {
			$this->Telefono_Profesional_Diligencia->setFormValue($objForm->GetValue("x_Telefono_Profesional_Diligencia"));
		}
		if (!$this->Mecanismo_Probable_Transmision->FldIsDetailKey) {
			$this->Mecanismo_Probable_Transmision->setFormValue($objForm->GetValue("x_Mecanismo_Probable_Transmision"));
		}
		if (!$this->Nombre_Madre->FldIsDetailKey) {
			$this->Nombre_Madre->setFormValue($objForm->GetValue("x_Nombre_Madre"));
		}
		if (!$this->Tipo_Id_Madre->FldIsDetailKey) {
			$this->Tipo_Id_Madre->setFormValue($objForm->GetValue("x_Tipo_Id_Madre"));
		}
		if (!$this->Numero_Identificacion_Madre->FldIsDetailKey) {
			$this->Numero_Identificacion_Madre->setFormValue($objForm->GetValue("x_Numero_Identificacion_Madre"));
		}
		if (!$this->Indentidad_Genero->FldIsDetailKey) {
			$this->Indentidad_Genero->setFormValue($objForm->GetValue("x_Indentidad_Genero"));
		}
		if (!$this->Donador_Sangre_Ultimos_12_Meses->FldIsDetailKey) {
			$this->Donador_Sangre_Ultimos_12_Meses->setFormValue($objForm->GetValue("x_Donador_Sangre_Ultimos_12_Meses"));
		}
		if (!$this->Fecha_Donacion->FldIsDetailKey) {
			$this->Fecha_Donacion->setFormValue($objForm->GetValue("x_Fecha_Donacion"));
			$this->Fecha_Donacion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Donacion->CurrentValue, 5);
		}
		if (!$this->Nombre_Institucion_Donacion->FldIsDetailKey) {
			$this->Nombre_Institucion_Donacion->setFormValue($objForm->GetValue("x_Nombre_Institucion_Donacion"));
		}
		if (!$this->Poblacion_clave->FldIsDetailKey) {
			$this->Poblacion_clave->setFormValue($objForm->GetValue("x_Poblacion_clave"));
		}
		if (!$this->Recibio_Asesoria_Pre_Prueba->FldIsDetailKey) {
			$this->Recibio_Asesoria_Pre_Prueba->setFormValue($objForm->GetValue("x_Recibio_Asesoria_Pre_Prueba"));
		}
		if (!$this->Recibio_Asesoria_Post_Prueba->FldIsDetailKey) {
			$this->Recibio_Asesoria_Post_Prueba->setFormValue($objForm->GetValue("x_Recibio_Asesoria_Post_Prueba"));
		}
		if (!$this->Tipo_Prueba->FldIsDetailKey) {
			$this->Tipo_Prueba->setFormValue($objForm->GetValue("x_Tipo_Prueba"));
		}
		if (!$this->Fecha_Resultado_Confirmatorio->FldIsDetailKey) {
			$this->Fecha_Resultado_Confirmatorio->setFormValue($objForm->GetValue("x_Fecha_Resultado_Confirmatorio"));
			$this->Fecha_Resultado_Confirmatorio->CurrentValue = ew_UnFormatDateTime($this->Fecha_Resultado_Confirmatorio->CurrentValue, 5);
		}
		if (!$this->Valor_Carga_Viral->FldIsDetailKey) {
			$this->Valor_Carga_Viral->setFormValue($objForm->GetValue("x_Valor_Carga_Viral"));
		}
		if (!$this->Estado_Clinico_Notificacion->FldIsDetailKey) {
			$this->Estado_Clinico_Notificacion->setFormValue($objForm->GetValue("x_Estado_Clinico_Notificacion"));
		}
		if (!$this->Hijos_Mujeres_Menores_5->FldIsDetailKey) {
			$this->Hijos_Mujeres_Menores_5->setFormValue($objForm->GetValue("x_Hijos_Mujeres_Menores_5"));
		}
		if (!$this->Hijos_Hombres_Menores_5->FldIsDetailKey) {
			$this->Hijos_Hombres_Menores_5->setFormValue($objForm->GetValue("x_Hijos_Hombres_Menores_5"));
		}
		if (!$this->Numero_Semanas_Embarazo->FldIsDetailKey) {
			$this->Numero_Semanas_Embarazo->setFormValue($objForm->GetValue("x_Numero_Semanas_Embarazo"));
		}
		if (!$this->Antecedentes_Embarazo->FldIsDetailKey) {
			$this->Antecedentes_Embarazo->setFormValue($objForm->GetValue("x_Antecedentes_Embarazo"));
		}
		if (!$this->Candidiasis_esofagica->FldIsDetailKey) {
			$this->Candidiasis_esofagica->setFormValue($objForm->GetValue("x_Candidiasis_esofagica"));
		}
		if (!$this->Candidiasis_vias_aereas->FldIsDetailKey) {
			$this->Candidiasis_vias_aereas->setFormValue($objForm->GetValue("x_Candidiasis_vias_aereas"));
		}
		if (!$this->Tuberculosis_pulmonar->FldIsDetailKey) {
			$this->Tuberculosis_pulmonar->setFormValue($objForm->GetValue("x_Tuberculosis_pulmonar"));
		}
		if (!$this->Cancer_cervical->FldIsDetailKey) {
			$this->Cancer_cervical->setFormValue($objForm->GetValue("x_Cancer_cervical"));
		}
		if (!$this->Tuberculosis_extrapulmonar->FldIsDetailKey) {
			$this->Tuberculosis_extrapulmonar->setFormValue($objForm->GetValue("x_Tuberculosis_extrapulmonar"));
		}
		if (!$this->Coccidiomicosis->FldIsDetailKey) {
			$this->Coccidiomicosis->setFormValue($objForm->GetValue("x_Coccidiomicosis"));
		}
		if (!$this->Citomegalovirosis->FldIsDetailKey) {
			$this->Citomegalovirosis->setFormValue($objForm->GetValue("x_Citomegalovirosis"));
		}
		if (!$this->Retinitis_citomegalovirosis->FldIsDetailKey) {
			$this->Retinitis_citomegalovirosis->setFormValue($objForm->GetValue("x_Retinitis_citomegalovirosis"));
		}
		if (!$this->Sindrome_Emanciacion->FldIsDetailKey) {
			$this->Sindrome_Emanciacion->setFormValue($objForm->GetValue("x_Sindrome_Emanciacion"));
		}
		if (!$this->Encefalopatia->FldIsDetailKey) {
			$this->Encefalopatia->setFormValue($objForm->GetValue("x_Encefalopatia"));
		}
		if (!$this->Otras_micobacterias->FldIsDetailKey) {
			$this->Otras_micobacterias->setFormValue($objForm->GetValue("x_Otras_micobacterias"));
		}
		if (!$this->Histoplasmosis_Extrapulmonar->FldIsDetailKey) {
			$this->Histoplasmosis_Extrapulmonar->setFormValue($objForm->GetValue("x_Histoplasmosis_Extrapulmonar"));
		}
		if (!$this->isosporidiasis_cronica->FldIsDetailKey) {
			$this->isosporidiasis_cronica->setFormValue($objForm->GetValue("x_isosporidiasis_cronica"));
		}
		if (!$this->herpes_zoster->FldIsDetailKey) {
			$this->herpes_zoster->setFormValue($objForm->GetValue("x_herpes_zoster"));
		}
		if (!$this->Histoplasmosis_diseminada->FldIsDetailKey) {
			$this->Histoplasmosis_diseminada->setFormValue($objForm->GetValue("x_Histoplasmosis_diseminada"));
		}
		if (!$this->Linfoma_Burkitt->FldIsDetailKey) {
			$this->Linfoma_Burkitt->setFormValue($objForm->GetValue("x_Linfoma_Burkitt"));
		}
		if (!$this->Neumonia_Pneumocystis->FldIsDetailKey) {
			$this->Neumonia_Pneumocystis->setFormValue($objForm->GetValue("x_Neumonia_Pneumocystis"));
		}
		if (!$this->Neumonia_Recurrente->FldIsDetailKey) {
			$this->Neumonia_Recurrente->setFormValue($objForm->GetValue("x_Neumonia_Recurrente"));
		}
		if (!$this->Linfoma_Inmunoblastico->FldIsDetailKey) {
			$this->Linfoma_Inmunoblastico->setFormValue($objForm->GetValue("x_Linfoma_Inmunoblastico"));
		}
		if (!$this->Criptosporidiasis_cronica->FldIsDetailKey) {
			$this->Criptosporidiasis_cronica->setFormValue($objForm->GetValue("x_Criptosporidiasis_cronica"));
		}
		if (!$this->Criptococosis_Extrapulmonar->FldIsDetailKey) {
			$this->Criptococosis_Extrapulmonar->setFormValue($objForm->GetValue("x_Criptococosis_Extrapulmonar"));
		}
		if (!$this->Sarcoma_Kaposi->FldIsDetailKey) {
			$this->Sarcoma_Kaposi->setFormValue($objForm->GetValue("x_Sarcoma_Kaposi"));
		}
		if (!$this->Leucoencefalopatia_Multifocal->FldIsDetailKey) {
			$this->Leucoencefalopatia_Multifocal->setFormValue($objForm->GetValue("x_Leucoencefalopatia_Multifocal"));
		}
		if (!$this->Septicemia_recurrente->FldIsDetailKey) {
			$this->Septicemia_recurrente->setFormValue($objForm->GetValue("x_Septicemia_recurrente"));
		}
		if (!$this->Toxoplasmosis_cerebral->FldIsDetailKey) {
			$this->Toxoplasmosis_cerebral->setFormValue($objForm->GetValue("x_Toxoplasmosis_cerebral"));
		}
		if (!$this->HepatitisB->FldIsDetailKey) {
			$this->HepatitisB->setFormValue($objForm->GetValue("x_HepatitisB"));
		}
		if (!$this->HepatitisC->FldIsDetailKey) {
			$this->HepatitisC->setFormValue($objForm->GetValue("x_HepatitisC"));
		}
		if (!$this->Meningitis->FldIsDetailKey) {
			$this->Meningitis->setFormValue($objForm->GetValue("x_Meningitis"));
		}
		if (!$this->RecuentoCD4->FldIsDetailKey) {
			$this->RecuentoCD4->setFormValue($objForm->GetValue("x_RecuentoCD4"));
		}
		if (!$this->Localidad_residencia->FldIsDetailKey) {
			$this->Localidad_residencia->setFormValue($objForm->GetValue("x_Localidad_residencia"));
		}
		if (!$this->Barrio_residencia->FldIsDetailKey) {
			$this->Barrio_residencia->setFormValue($objForm->GetValue("x_Barrio_residencia"));
		}
		if (!$this->Fecha_ingreso_app->FldIsDetailKey) {
			$this->Fecha_ingreso_app->setFormValue($objForm->GetValue("x_Fecha_ingreso_app"));
			$this->Fecha_ingreso_app->CurrentValue = ew_UnFormatDateTime($this->Fecha_ingreso_app->CurrentValue, 5);
		}
		if (!$this->Actualizado_por->FldIsDetailKey) {
			$this->Actualizado_por->setFormValue($objForm->GetValue("x_Actualizado_por"));
		}
		if (!$this->Fecha_actualizacion_app->FldIsDetailKey) {
			$this->Fecha_actualizacion_app->setFormValue($objForm->GetValue("x_Fecha_actualizacion_app"));
			$this->Fecha_actualizacion_app->CurrentValue = ew_UnFormatDateTime($this->Fecha_actualizacion_app->CurrentValue, 5);
		}
	}

	// Restore form values
	function RestoreFormValues() {
		global $objForm;
		$this->LoadRow();
		$this->Consecutivo->CurrentValue = $this->Consecutivo->FormValue;
		$this->Seguimiento->CurrentValue = $this->Seguimiento->FormValue;
		$this->Condicion_Final->CurrentValue = $this->Condicion_Final->FormValue;
		$this->Codigo_centro->CurrentValue = $this->Codigo_centro->FormValue;
		$this->Codigo_UPGD->CurrentValue = $this->Codigo_UPGD->FormValue;
		$this->Cod_Evento->CurrentValue = $this->Cod_Evento->FormValue;
		$this->Embarazo_Actual->CurrentValue = $this->Embarazo_Actual->FormValue;
		$this->Fecha_Notificacion->CurrentValue = $this->Fecha_Notificacion->FormValue;
		$this->Fecha_Notificacion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Notificacion->CurrentValue, 5);
		$this->Semana->CurrentValue = $this->Semana->FormValue;
		$this->Periodo_Epidemiologico->CurrentValue = $this->Periodo_Epidemiologico->FormValue;
		$this->Periodo_Sivigila->CurrentValue = $this->Periodo_Sivigila->FormValue;
		$this->Primer_Nombre->CurrentValue = $this->Primer_Nombre->FormValue;
		$this->Segundo_Nombre->CurrentValue = $this->Segundo_Nombre->FormValue;
		$this->Primer_Apellido->CurrentValue = $this->Primer_Apellido->FormValue;
		$this->Segundo_Apellido->CurrentValue = $this->Segundo_Apellido->FormValue;
		$this->Tipo_Id->CurrentValue = $this->Tipo_Id->FormValue;
		$this->Numero_Identificacion->CurrentValue = $this->Numero_Identificacion->FormValue;
		$this->Edad->CurrentValue = $this->Edad->FormValue;
		$this->Unidad_Edad->CurrentValue = $this->Unidad_Edad->FormValue;
		$this->Sexo->CurrentValue = $this->Sexo->FormValue;
		$this->Pais_Ocurrencia->CurrentValue = $this->Pais_Ocurrencia->FormValue;
		$this->Depto_Ocurrencia->CurrentValue = $this->Depto_Ocurrencia->FormValue;
		$this->Municipio_Ocurrencia->CurrentValue = $this->Municipio_Ocurrencia->FormValue;
		$this->Area_Ocurrencia->CurrentValue = $this->Area_Ocurrencia->FormValue;
		$this->Localidad->CurrentValue = $this->Localidad->FormValue;
		$this->Barrio->CurrentValue = $this->Barrio->FormValue;
		$this->Direccion_Residencia->CurrentValue = $this->Direccion_Residencia->FormValue;
		$this->Ocupacion->CurrentValue = $this->Ocupacion->FormValue;
		$this->Tipo_Regimen_Salud->CurrentValue = $this->Tipo_Regimen_Salud->FormValue;
		$this->Cod_Administradora->CurrentValue = $this->Cod_Administradora->FormValue;
		$this->gp_discapa->CurrentValue = $this->gp_discapa->FormValue;
		$this->gp_desplaz->CurrentValue = $this->gp_desplaz->FormValue;
		$this->gp_migrant->CurrentValue = $this->gp_migrant->FormValue;
		$this->gp_carcela->CurrentValue = $this->gp_carcela->FormValue;
		$this->gp_gestan->CurrentValue = $this->gp_gestan->FormValue;
		$this->gp_indigen->CurrentValue = $this->gp_indigen->FormValue;
		$this->gp_pobicbf->CurrentValue = $this->gp_pobicbf->FormValue;
		$this->gp_mad_com->CurrentValue = $this->gp_mad_com->FormValue;
		$this->gp_desmovi->CurrentValue = $this->gp_desmovi->FormValue;
		$this->gp_psiquia->CurrentValue = $this->gp_psiquia->FormValue;
		$this->gp_vic_vio->CurrentValue = $this->gp_vic_vio->FormValue;
		$this->gp_otros->CurrentValue = $this->gp_otros->FormValue;
		$this->Depto_Residencia->CurrentValue = $this->Depto_Residencia->FormValue;
		$this->Municipio_Residencia->CurrentValue = $this->Municipio_Residencia->FormValue;
		$this->Fecha_Consulta->CurrentValue = $this->Fecha_Consulta->FormValue;
		$this->Fecha_Consulta->CurrentValue = ew_UnFormatDateTime($this->Fecha_Consulta->CurrentValue, 5);
		$this->Fecha_Inicio_Sintomas->CurrentValue = $this->Fecha_Inicio_Sintomas->FormValue;
		$this->Fecha_Inicio_Sintomas->CurrentValue = ew_UnFormatDateTime($this->Fecha_Inicio_Sintomas->CurrentValue, 5);
		$this->Hospitalizado->CurrentValue = $this->Hospitalizado->FormValue;
		$this->Fecha_Defuncion->CurrentValue = $this->Fecha_Defuncion->FormValue;
		$this->Fecha_Defuncion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Defuncion->CurrentValue, 5);
		$this->Numero_Certificado_Defuncion->CurrentValue = $this->Numero_Certificado_Defuncion->FormValue;
		$this->Causa_Basica_Muerte_CIEX->CurrentValue = $this->Causa_Basica_Muerte_CIEX->FormValue;
		$this->Entidad_fallecimiento->CurrentValue = $this->Entidad_fallecimiento->FormValue;
		$this->Telefono->CurrentValue = $this->Telefono->FormValue;
		$this->Fecha_Nacimiento->CurrentValue = $this->Fecha_Nacimiento->FormValue;
		$this->Fecha_Nacimiento->CurrentValue = ew_UnFormatDateTime($this->Fecha_Nacimiento->CurrentValue, 5);
		$this->Nombre_Profesional_Diligencia->CurrentValue = $this->Nombre_Profesional_Diligencia->FormValue;
		$this->Telefono_Profesional_Diligencia->CurrentValue = $this->Telefono_Profesional_Diligencia->FormValue;
		$this->Mecanismo_Probable_Transmision->CurrentValue = $this->Mecanismo_Probable_Transmision->FormValue;
		$this->Nombre_Madre->CurrentValue = $this->Nombre_Madre->FormValue;
		$this->Tipo_Id_Madre->CurrentValue = $this->Tipo_Id_Madre->FormValue;
		$this->Numero_Identificacion_Madre->CurrentValue = $this->Numero_Identificacion_Madre->FormValue;
		$this->Indentidad_Genero->CurrentValue = $this->Indentidad_Genero->FormValue;
		$this->Donador_Sangre_Ultimos_12_Meses->CurrentValue = $this->Donador_Sangre_Ultimos_12_Meses->FormValue;
		$this->Fecha_Donacion->CurrentValue = $this->Fecha_Donacion->FormValue;
		$this->Fecha_Donacion->CurrentValue = ew_UnFormatDateTime($this->Fecha_Donacion->CurrentValue, 5);
		$this->Nombre_Institucion_Donacion->CurrentValue = $this->Nombre_Institucion_Donacion->FormValue;
		$this->Poblacion_clave->CurrentValue = $this->Poblacion_clave->FormValue;
		$this->Recibio_Asesoria_Pre_Prueba->CurrentValue = $this->Recibio_Asesoria_Pre_Prueba->FormValue;
		$this->Recibio_Asesoria_Post_Prueba->CurrentValue = $this->Recibio_Asesoria_Post_Prueba->FormValue;
		$this->Tipo_Prueba->CurrentValue = $this->Tipo_Prueba->FormValue;
		$this->Fecha_Resultado_Confirmatorio->CurrentValue = $this->Fecha_Resultado_Confirmatorio->FormValue;
		$this->Fecha_Resultado_Confirmatorio->CurrentValue = ew_UnFormatDateTime($this->Fecha_Resultado_Confirmatorio->CurrentValue, 5);
		$this->Valor_Carga_Viral->CurrentValue = $this->Valor_Carga_Viral->FormValue;
		$this->Estado_Clinico_Notificacion->CurrentValue = $this->Estado_Clinico_Notificacion->FormValue;
		$this->Hijos_Mujeres_Menores_5->CurrentValue = $this->Hijos_Mujeres_Menores_5->FormValue;
		$this->Hijos_Hombres_Menores_5->CurrentValue = $this->Hijos_Hombres_Menores_5->FormValue;
		$this->Numero_Semanas_Embarazo->CurrentValue = $this->Numero_Semanas_Embarazo->FormValue;
		$this->Antecedentes_Embarazo->CurrentValue = $this->Antecedentes_Embarazo->FormValue;
		$this->Candidiasis_esofagica->CurrentValue = $this->Candidiasis_esofagica->FormValue;
		$this->Candidiasis_vias_aereas->CurrentValue = $this->Candidiasis_vias_aereas->FormValue;
		$this->Tuberculosis_pulmonar->CurrentValue = $this->Tuberculosis_pulmonar->FormValue;
		$this->Cancer_cervical->CurrentValue = $this->Cancer_cervical->FormValue;
		$this->Tuberculosis_extrapulmonar->CurrentValue = $this->Tuberculosis_extrapulmonar->FormValue;
		$this->Coccidiomicosis->CurrentValue = $this->Coccidiomicosis->FormValue;
		$this->Citomegalovirosis->CurrentValue = $this->Citomegalovirosis->FormValue;
		$this->Retinitis_citomegalovirosis->CurrentValue = $this->Retinitis_citomegalovirosis->FormValue;
		$this->Sindrome_Emanciacion->CurrentValue = $this->Sindrome_Emanciacion->FormValue;
		$this->Encefalopatia->CurrentValue = $this->Encefalopatia->FormValue;
		$this->Otras_micobacterias->CurrentValue = $this->Otras_micobacterias->FormValue;
		$this->Histoplasmosis_Extrapulmonar->CurrentValue = $this->Histoplasmosis_Extrapulmonar->FormValue;
		$this->isosporidiasis_cronica->CurrentValue = $this->isosporidiasis_cronica->FormValue;
		$this->herpes_zoster->CurrentValue = $this->herpes_zoster->FormValue;
		$this->Histoplasmosis_diseminada->CurrentValue = $this->Histoplasmosis_diseminada->FormValue;
		$this->Linfoma_Burkitt->CurrentValue = $this->Linfoma_Burkitt->FormValue;
		$this->Neumonia_Pneumocystis->CurrentValue = $this->Neumonia_Pneumocystis->FormValue;
		$this->Neumonia_Recurrente->CurrentValue = $this->Neumonia_Recurrente->FormValue;
		$this->Linfoma_Inmunoblastico->CurrentValue = $this->Linfoma_Inmunoblastico->FormValue;
		$this->Criptosporidiasis_cronica->CurrentValue = $this->Criptosporidiasis_cronica->FormValue;
		$this->Criptococosis_Extrapulmonar->CurrentValue = $this->Criptococosis_Extrapulmonar->FormValue;
		$this->Sarcoma_Kaposi->CurrentValue = $this->Sarcoma_Kaposi->FormValue;
		$this->Leucoencefalopatia_Multifocal->CurrentValue = $this->Leucoencefalopatia_Multifocal->FormValue;
		$this->Septicemia_recurrente->CurrentValue = $this->Septicemia_recurrente->FormValue;
		$this->Toxoplasmosis_cerebral->CurrentValue = $this->Toxoplasmosis_cerebral->FormValue;
		$this->HepatitisB->CurrentValue = $this->HepatitisB->FormValue;
		$this->HepatitisC->CurrentValue = $this->HepatitisC->FormValue;
		$this->Meningitis->CurrentValue = $this->Meningitis->FormValue;
		$this->RecuentoCD4->CurrentValue = $this->RecuentoCD4->FormValue;
		$this->Localidad_residencia->CurrentValue = $this->Localidad_residencia->FormValue;
		$this->Barrio_residencia->CurrentValue = $this->Barrio_residencia->FormValue;
		$this->Fecha_ingreso_app->CurrentValue = $this->Fecha_ingreso_app->FormValue;
		$this->Fecha_ingreso_app->CurrentValue = ew_UnFormatDateTime($this->Fecha_ingreso_app->CurrentValue, 5);
		$this->Actualizado_por->CurrentValue = $this->Actualizado_por->FormValue;
		$this->Fecha_actualizacion_app->CurrentValue = $this->Fecha_actualizacion_app->FormValue;
		$this->Fecha_actualizacion_app->CurrentValue = ew_UnFormatDateTime($this->Fecha_actualizacion_app->CurrentValue, 5);
	}

	// Load recordset
	function LoadRecordset($offset = -1, $rowcnt = -1) {

		// Load List page SQL
		$sSql = $this->SelectSQL();
		$conn = &$this->Connection();

		// Load recordset
		$dbtype = ew_GetConnectionType($this->DBID);
		if ($this->UseSelectLimit) {
			$conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
			if ($dbtype == "MSSQL") {
				$rs = $conn->SelectLimit($sSql, $rowcnt, $offset, array("_hasOrderBy" => trim($this->getOrderBy()) || trim($this->getSessionOrderBy())));
			} else {
				$rs = $conn->SelectLimit($sSql, $rowcnt, $offset);
			}
			$conn->raiseErrorFn = '';
		} else {
			$rs = ew_LoadRecordset($sSql, $conn);
		}

		// Call Recordset Selected event
		$this->Recordset_Selected($rs);
		return $rs;
	}

	// Load row based on key values
	function LoadRow() {
		global $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$conn = &$this->Connection();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql, $conn);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}

		// Check if valid user id
		if ($res) {
			$res = $this->ShowOptionLink('edit');
			if (!$res) {
				$sUserIdMsg = ew_DeniedMsg();
				$this->setFailureMessage($sUserIdMsg);
			}
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->Consecutivo->setDbValue($rs->fields('Consecutivo'));
		$this->Seguimiento->setDbValue($rs->fields('Seguimiento'));
		$this->Condicion_Final->setDbValue($rs->fields('Condicion_Final'));
		$this->Codigo_centro->setDbValue($rs->fields('Codigo_centro'));
		$this->Codigo_UPGD->setDbValue($rs->fields('Codigo_UPGD'));
		$this->Cod_Evento->setDbValue($rs->fields('Cod_Evento'));
		$this->Embarazo_Actual->setDbValue($rs->fields('Embarazo_Actual'));
		$this->Fecha_Notificacion->setDbValue($rs->fields('Fecha_Notificacion'));
		$this->Semana->setDbValue($rs->fields('Semana'));
		$this->Periodo_Epidemiologico->setDbValue($rs->fields('Periodo_Epidemiologico'));
		$this->Periodo_Sivigila->setDbValue($rs->fields('Periodo_Sivigila'));
		$this->Primer_Nombre->setDbValue($rs->fields('Primer_Nombre'));
		$this->Segundo_Nombre->setDbValue($rs->fields('Segundo_Nombre'));
		$this->Primer_Apellido->setDbValue($rs->fields('Primer_Apellido'));
		$this->Segundo_Apellido->setDbValue($rs->fields('Segundo_Apellido'));
		$this->Tipo_Id->setDbValue($rs->fields('Tipo_Id'));
		$this->Numero_Identificacion->setDbValue($rs->fields('Numero_Identificacion'));
		$this->Edad->setDbValue($rs->fields('Edad'));
		$this->Unidad_Edad->setDbValue($rs->fields('Unidad_Edad'));
		$this->Sexo->setDbValue($rs->fields('Sexo'));
		$this->Pais_Ocurrencia->setDbValue($rs->fields('Pais_Ocurrencia'));
		$this->Depto_Ocurrencia->setDbValue($rs->fields('Depto_Ocurrencia'));
		$this->Municipio_Ocurrencia->setDbValue($rs->fields('Municipio_Ocurrencia'));
		$this->Area_Ocurrencia->setDbValue($rs->fields('Area_Ocurrencia'));
		$this->Localidad->setDbValue($rs->fields('Localidad'));
		$this->Barrio->setDbValue($rs->fields('Barrio'));
		$this->Direccion_Residencia->setDbValue($rs->fields('Direccion_Residencia'));
		$this->Ocupacion->setDbValue($rs->fields('Ocupacion'));
		$this->Tipo_Regimen_Salud->setDbValue($rs->fields('Tipo_Regimen_Salud'));
		$this->Cod_Administradora->setDbValue($rs->fields('Cod_Administradora'));
		$this->gp_discapa->setDbValue($rs->fields('gp_discapa'));
		$this->gp_desplaz->setDbValue($rs->fields('gp_desplaz'));
		$this->gp_migrant->setDbValue($rs->fields('gp_migrant'));
		$this->gp_carcela->setDbValue($rs->fields('gp_carcela'));
		$this->gp_gestan->setDbValue($rs->fields('gp_gestan'));
		$this->gp_indigen->setDbValue($rs->fields('gp_indigen'));
		$this->gp_pobicbf->setDbValue($rs->fields('gp_pobicbf'));
		$this->gp_mad_com->setDbValue($rs->fields('gp_mad_com'));
		$this->gp_desmovi->setDbValue($rs->fields('gp_desmovi'));
		$this->gp_psiquia->setDbValue($rs->fields('gp_psiquia'));
		$this->gp_vic_vio->setDbValue($rs->fields('gp_vic_vio'));
		$this->gp_otros->setDbValue($rs->fields('gp_otros'));
		$this->Depto_Residencia->setDbValue($rs->fields('Depto_Residencia'));
		$this->Municipio_Residencia->setDbValue($rs->fields('Municipio_Residencia'));
		$this->Fecha_Consulta->setDbValue($rs->fields('Fecha_Consulta'));
		$this->Fecha_Inicio_Sintomas->setDbValue($rs->fields('Fecha_Inicio_Sintomas'));
		$this->Hospitalizado->setDbValue($rs->fields('Hospitalizado'));
		$this->Fecha_Defuncion->setDbValue($rs->fields('Fecha_Defuncion'));
		$this->Numero_Certificado_Defuncion->setDbValue($rs->fields('Numero_Certificado_Defuncion'));
		$this->Causa_Basica_Muerte_CIEX->setDbValue($rs->fields('Causa_Basica_Muerte_CIEX'));
		$this->Entidad_fallecimiento->setDbValue($rs->fields('Entidad_fallecimiento'));
		$this->Telefono->setDbValue($rs->fields('Telefono'));
		$this->Fecha_Nacimiento->setDbValue($rs->fields('Fecha_Nacimiento'));
		$this->Nombre_Profesional_Diligencia->setDbValue($rs->fields('Nombre_Profesional_Diligencia'));
		$this->Telefono_Profesional_Diligencia->setDbValue($rs->fields('Telefono_Profesional_Diligencia'));
		$this->Mecanismo_Probable_Transmision->setDbValue($rs->fields('Mecanismo_Probable_Transmision'));
		$this->Nombre_Madre->setDbValue($rs->fields('Nombre_Madre'));
		$this->Tipo_Id_Madre->setDbValue($rs->fields('Tipo_Id_Madre'));
		$this->Numero_Identificacion_Madre->setDbValue($rs->fields('Numero_Identificacion_Madre'));
		$this->Indentidad_Genero->setDbValue($rs->fields('Indentidad_Genero'));
		$this->Donador_Sangre_Ultimos_12_Meses->setDbValue($rs->fields('Donador_Sangre_Ultimos_12_Meses'));
		$this->Fecha_Donacion->setDbValue($rs->fields('Fecha_Donacion'));
		$this->Nombre_Institucion_Donacion->setDbValue($rs->fields('Nombre_Institucion_Donacion'));
		$this->Poblacion_clave->setDbValue($rs->fields('Poblacion_clave'));
		$this->Recibio_Asesoria_Pre_Prueba->setDbValue($rs->fields('Recibio_Asesoria_Pre_Prueba'));
		$this->Recibio_Asesoria_Post_Prueba->setDbValue($rs->fields('Recibio_Asesoria_Post_Prueba'));
		$this->Tipo_Prueba->setDbValue($rs->fields('Tipo_Prueba'));
		$this->Fecha_Resultado_Confirmatorio->setDbValue($rs->fields('Fecha_Resultado_Confirmatorio'));
		$this->Valor_Carga_Viral->setDbValue($rs->fields('Valor_Carga_Viral'));
		$this->Estado_Clinico_Notificacion->setDbValue($rs->fields('Estado_Clinico_Notificacion'));
		$this->Hijos_Mujeres_Menores_5->setDbValue($rs->fields('Hijos_Mujeres_Menores_5'));
		$this->Hijos_Hombres_Menores_5->setDbValue($rs->fields('Hijos_Hombres_Menores_5'));
		$this->Numero_Semanas_Embarazo->setDbValue($rs->fields('Numero_Semanas_Embarazo'));
		$this->Antecedentes_Embarazo->setDbValue($rs->fields('Antecedentes_Embarazo'));
		$this->Candidiasis_esofagica->setDbValue($rs->fields('Candidiasis_esofagica'));
		$this->Candidiasis_vias_aereas->setDbValue($rs->fields('Candidiasis_vias_aereas'));
		$this->Tuberculosis_pulmonar->setDbValue($rs->fields('Tuberculosis_pulmonar'));
		$this->Cancer_cervical->setDbValue($rs->fields('Cancer_cervical'));
		$this->Tuberculosis_extrapulmonar->setDbValue($rs->fields('Tuberculosis_extrapulmonar'));
		$this->Coccidiomicosis->setDbValue($rs->fields('Coccidiomicosis'));
		$this->Citomegalovirosis->setDbValue($rs->fields('Citomegalovirosis'));
		$this->Retinitis_citomegalovirosis->setDbValue($rs->fields('Retinitis_citomegalovirosis'));
		$this->Sindrome_Emanciacion->setDbValue($rs->fields('Sindrome_Emanciacion'));
		$this->Encefalopatia->setDbValue($rs->fields('Encefalopatia'));
		$this->Otras_micobacterias->setDbValue($rs->fields('Otras_micobacterias'));
		$this->Histoplasmosis_Extrapulmonar->setDbValue($rs->fields('Histoplasmosis_Extrapulmonar'));
		$this->isosporidiasis_cronica->setDbValue($rs->fields('isosporidiasis_cronica'));
		$this->herpes_zoster->setDbValue($rs->fields('herpes_zoster'));
		$this->Histoplasmosis_diseminada->setDbValue($rs->fields('Histoplasmosis_diseminada'));
		$this->Linfoma_Burkitt->setDbValue($rs->fields('Linfoma_Burkitt'));
		$this->Neumonia_Pneumocystis->setDbValue($rs->fields('Neumonia_Pneumocystis'));
		$this->Neumonia_Recurrente->setDbValue($rs->fields('Neumonia_Recurrente'));
		$this->Linfoma_Inmunoblastico->setDbValue($rs->fields('Linfoma_Inmunoblastico'));
		$this->Criptosporidiasis_cronica->setDbValue($rs->fields('Criptosporidiasis_cronica'));
		$this->Criptococosis_Extrapulmonar->setDbValue($rs->fields('Criptococosis_Extrapulmonar'));
		$this->Sarcoma_Kaposi->setDbValue($rs->fields('Sarcoma_Kaposi'));
		$this->Leucoencefalopatia_Multifocal->setDbValue($rs->fields('Leucoencefalopatia_Multifocal'));
		$this->Septicemia_recurrente->setDbValue($rs->fields('Septicemia_recurrente'));
		$this->Toxoplasmosis_cerebral->setDbValue($rs->fields('Toxoplasmosis_cerebral'));
		$this->HepatitisB->setDbValue($rs->fields('HepatitisB'));
		$this->HepatitisC->setDbValue($rs->fields('HepatitisC'));
		$this->Meningitis->setDbValue($rs->fields('Meningitis'));
		$this->RecuentoCD4->setDbValue($rs->fields('RecuentoCD4'));
		$this->Registrado_Por->setDbValue($rs->fields('Registrado_Por'));
		$this->Centro_Poblado->setDbValue($rs->fields('Centro_Poblado'));
		$this->Vereda->setDbValue($rs->fields('Vereda'));
		$this->Pertenencia_Etnica->setDbValue($rs->fields('Pertenencia_Etnica'));
		$this->Grupo_Poblacional->setDbValue($rs->fields('Grupo_Poblacional'));
		$this->Clasificacion_Inicial->setDbValue($rs->fields('Clasificacion_Inicial'));
		$this->Fecha_Hospitalizacion->setDbValue($rs->fields('Fecha_Hospitalizacion'));
		$this->Seguimiento_Clasificacion_Final->setDbValue($rs->fields('Seguimiento_Clasificacion_Final'));
		$this->Fecha_Ajuste->setDbValue($rs->fields('Fecha_Ajuste'));
		$this->Nombre_Evento->setDbValue($rs->fields('Nombre_Evento'));
		$this->Localidad_residencia->setDbValue($rs->fields('Localidad_residencia'));
		$this->Barrio_residencia->setDbValue($rs->fields('Barrio_residencia'));
		$this->Fecha_ingreso_app->setDbValue($rs->fields('Fecha_ingreso_app'));
		$this->Actualizado_por->setDbValue($rs->fields('Actualizado_por'));
		$this->Fecha_actualizacion_app->setDbValue($rs->fields('Fecha_actualizacion_app'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->Consecutivo->DbValue = $row['Consecutivo'];
		$this->Seguimiento->DbValue = $row['Seguimiento'];
		$this->Condicion_Final->DbValue = $row['Condicion_Final'];
		$this->Codigo_centro->DbValue = $row['Codigo_centro'];
		$this->Codigo_UPGD->DbValue = $row['Codigo_UPGD'];
		$this->Cod_Evento->DbValue = $row['Cod_Evento'];
		$this->Embarazo_Actual->DbValue = $row['Embarazo_Actual'];
		$this->Fecha_Notificacion->DbValue = $row['Fecha_Notificacion'];
		$this->Semana->DbValue = $row['Semana'];
		$this->Periodo_Epidemiologico->DbValue = $row['Periodo_Epidemiologico'];
		$this->Periodo_Sivigila->DbValue = $row['Periodo_Sivigila'];
		$this->Primer_Nombre->DbValue = $row['Primer_Nombre'];
		$this->Segundo_Nombre->DbValue = $row['Segundo_Nombre'];
		$this->Primer_Apellido->DbValue = $row['Primer_Apellido'];
		$this->Segundo_Apellido->DbValue = $row['Segundo_Apellido'];
		$this->Tipo_Id->DbValue = $row['Tipo_Id'];
		$this->Numero_Identificacion->DbValue = $row['Numero_Identificacion'];
		$this->Edad->DbValue = $row['Edad'];
		$this->Unidad_Edad->DbValue = $row['Unidad_Edad'];
		$this->Sexo->DbValue = $row['Sexo'];
		$this->Pais_Ocurrencia->DbValue = $row['Pais_Ocurrencia'];
		$this->Depto_Ocurrencia->DbValue = $row['Depto_Ocurrencia'];
		$this->Municipio_Ocurrencia->DbValue = $row['Municipio_Ocurrencia'];
		$this->Area_Ocurrencia->DbValue = $row['Area_Ocurrencia'];
		$this->Localidad->DbValue = $row['Localidad'];
		$this->Barrio->DbValue = $row['Barrio'];
		$this->Direccion_Residencia->DbValue = $row['Direccion_Residencia'];
		$this->Ocupacion->DbValue = $row['Ocupacion'];
		$this->Tipo_Regimen_Salud->DbValue = $row['Tipo_Regimen_Salud'];
		$this->Cod_Administradora->DbValue = $row['Cod_Administradora'];
		$this->gp_discapa->DbValue = $row['gp_discapa'];
		$this->gp_desplaz->DbValue = $row['gp_desplaz'];
		$this->gp_migrant->DbValue = $row['gp_migrant'];
		$this->gp_carcela->DbValue = $row['gp_carcela'];
		$this->gp_gestan->DbValue = $row['gp_gestan'];
		$this->gp_indigen->DbValue = $row['gp_indigen'];
		$this->gp_pobicbf->DbValue = $row['gp_pobicbf'];
		$this->gp_mad_com->DbValue = $row['gp_mad_com'];
		$this->gp_desmovi->DbValue = $row['gp_desmovi'];
		$this->gp_psiquia->DbValue = $row['gp_psiquia'];
		$this->gp_vic_vio->DbValue = $row['gp_vic_vio'];
		$this->gp_otros->DbValue = $row['gp_otros'];
		$this->Depto_Residencia->DbValue = $row['Depto_Residencia'];
		$this->Municipio_Residencia->DbValue = $row['Municipio_Residencia'];
		$this->Fecha_Consulta->DbValue = $row['Fecha_Consulta'];
		$this->Fecha_Inicio_Sintomas->DbValue = $row['Fecha_Inicio_Sintomas'];
		$this->Hospitalizado->DbValue = $row['Hospitalizado'];
		$this->Fecha_Defuncion->DbValue = $row['Fecha_Defuncion'];
		$this->Numero_Certificado_Defuncion->DbValue = $row['Numero_Certificado_Defuncion'];
		$this->Causa_Basica_Muerte_CIEX->DbValue = $row['Causa_Basica_Muerte_CIEX'];
		$this->Entidad_fallecimiento->DbValue = $row['Entidad_fallecimiento'];
		$this->Telefono->DbValue = $row['Telefono'];
		$this->Fecha_Nacimiento->DbValue = $row['Fecha_Nacimiento'];
		$this->Nombre_Profesional_Diligencia->DbValue = $row['Nombre_Profesional_Diligencia'];
		$this->Telefono_Profesional_Diligencia->DbValue = $row['Telefono_Profesional_Diligencia'];
		$this->Mecanismo_Probable_Transmision->DbValue = $row['Mecanismo_Probable_Transmision'];
		$this->Nombre_Madre->DbValue = $row['Nombre_Madre'];
		$this->Tipo_Id_Madre->DbValue = $row['Tipo_Id_Madre'];
		$this->Numero_Identificacion_Madre->DbValue = $row['Numero_Identificacion_Madre'];
		$this->Indentidad_Genero->DbValue = $row['Indentidad_Genero'];
		$this->Donador_Sangre_Ultimos_12_Meses->DbValue = $row['Donador_Sangre_Ultimos_12_Meses'];
		$this->Fecha_Donacion->DbValue = $row['Fecha_Donacion'];
		$this->Nombre_Institucion_Donacion->DbValue = $row['Nombre_Institucion_Donacion'];
		$this->Poblacion_clave->DbValue = $row['Poblacion_clave'];
		$this->Recibio_Asesoria_Pre_Prueba->DbValue = $row['Recibio_Asesoria_Pre_Prueba'];
		$this->Recibio_Asesoria_Post_Prueba->DbValue = $row['Recibio_Asesoria_Post_Prueba'];
		$this->Tipo_Prueba->DbValue = $row['Tipo_Prueba'];
		$this->Fecha_Resultado_Confirmatorio->DbValue = $row['Fecha_Resultado_Confirmatorio'];
		$this->Valor_Carga_Viral->DbValue = $row['Valor_Carga_Viral'];
		$this->Estado_Clinico_Notificacion->DbValue = $row['Estado_Clinico_Notificacion'];
		$this->Hijos_Mujeres_Menores_5->DbValue = $row['Hijos_Mujeres_Menores_5'];
		$this->Hijos_Hombres_Menores_5->DbValue = $row['Hijos_Hombres_Menores_5'];
		$this->Numero_Semanas_Embarazo->DbValue = $row['Numero_Semanas_Embarazo'];
		$this->Antecedentes_Embarazo->DbValue = $row['Antecedentes_Embarazo'];
		$this->Candidiasis_esofagica->DbValue = $row['Candidiasis_esofagica'];
		$this->Candidiasis_vias_aereas->DbValue = $row['Candidiasis_vias_aereas'];
		$this->Tuberculosis_pulmonar->DbValue = $row['Tuberculosis_pulmonar'];
		$this->Cancer_cervical->DbValue = $row['Cancer_cervical'];
		$this->Tuberculosis_extrapulmonar->DbValue = $row['Tuberculosis_extrapulmonar'];
		$this->Coccidiomicosis->DbValue = $row['Coccidiomicosis'];
		$this->Citomegalovirosis->DbValue = $row['Citomegalovirosis'];
		$this->Retinitis_citomegalovirosis->DbValue = $row['Retinitis_citomegalovirosis'];
		$this->Sindrome_Emanciacion->DbValue = $row['Sindrome_Emanciacion'];
		$this->Encefalopatia->DbValue = $row['Encefalopatia'];
		$this->Otras_micobacterias->DbValue = $row['Otras_micobacterias'];
		$this->Histoplasmosis_Extrapulmonar->DbValue = $row['Histoplasmosis_Extrapulmonar'];
		$this->isosporidiasis_cronica->DbValue = $row['isosporidiasis_cronica'];
		$this->herpes_zoster->DbValue = $row['herpes_zoster'];
		$this->Histoplasmosis_diseminada->DbValue = $row['Histoplasmosis_diseminada'];
		$this->Linfoma_Burkitt->DbValue = $row['Linfoma_Burkitt'];
		$this->Neumonia_Pneumocystis->DbValue = $row['Neumonia_Pneumocystis'];
		$this->Neumonia_Recurrente->DbValue = $row['Neumonia_Recurrente'];
		$this->Linfoma_Inmunoblastico->DbValue = $row['Linfoma_Inmunoblastico'];
		$this->Criptosporidiasis_cronica->DbValue = $row['Criptosporidiasis_cronica'];
		$this->Criptococosis_Extrapulmonar->DbValue = $row['Criptococosis_Extrapulmonar'];
		$this->Sarcoma_Kaposi->DbValue = $row['Sarcoma_Kaposi'];
		$this->Leucoencefalopatia_Multifocal->DbValue = $row['Leucoencefalopatia_Multifocal'];
		$this->Septicemia_recurrente->DbValue = $row['Septicemia_recurrente'];
		$this->Toxoplasmosis_cerebral->DbValue = $row['Toxoplasmosis_cerebral'];
		$this->HepatitisB->DbValue = $row['HepatitisB'];
		$this->HepatitisC->DbValue = $row['HepatitisC'];
		$this->Meningitis->DbValue = $row['Meningitis'];
		$this->RecuentoCD4->DbValue = $row['RecuentoCD4'];
		$this->Registrado_Por->DbValue = $row['Registrado_Por'];
		$this->Centro_Poblado->DbValue = $row['Centro_Poblado'];
		$this->Vereda->DbValue = $row['Vereda'];
		$this->Pertenencia_Etnica->DbValue = $row['Pertenencia_Etnica'];
		$this->Grupo_Poblacional->DbValue = $row['Grupo_Poblacional'];
		$this->Clasificacion_Inicial->DbValue = $row['Clasificacion_Inicial'];
		$this->Fecha_Hospitalizacion->DbValue = $row['Fecha_Hospitalizacion'];
		$this->Seguimiento_Clasificacion_Final->DbValue = $row['Seguimiento_Clasificacion_Final'];
		$this->Fecha_Ajuste->DbValue = $row['Fecha_Ajuste'];
		$this->Nombre_Evento->DbValue = $row['Nombre_Evento'];
		$this->Localidad_residencia->DbValue = $row['Localidad_residencia'];
		$this->Barrio_residencia->DbValue = $row['Barrio_residencia'];
		$this->Fecha_ingreso_app->DbValue = $row['Fecha_ingreso_app'];
		$this->Actualizado_por->DbValue = $row['Actualizado_por'];
		$this->Fecha_actualizacion_app->DbValue = $row['Fecha_actualizacion_app'];
	}

	// Render row values based on field settings
	function RenderRow() {
		global $Security, $Language, $gsLanguage;

		// Initialize URLs
		// Call Row_Rendering event

		$this->Row_Rendering();

		// Common render codes for all row types
		// Consecutivo
		// Seguimiento
		// Condicion_Final
		// Codigo_centro
		// Codigo_UPGD
		// Cod_Evento
		// Embarazo_Actual
		// Fecha_Notificacion
		// Semana
		// Periodo_Epidemiologico
		// Periodo_Sivigila
		// Primer_Nombre
		// Segundo_Nombre
		// Primer_Apellido
		// Segundo_Apellido
		// Tipo_Id
		// Numero_Identificacion
		// Edad
		// Unidad_Edad
		// Sexo
		// Pais_Ocurrencia
		// Depto_Ocurrencia
		// Municipio_Ocurrencia
		// Area_Ocurrencia
		// Localidad
		// Barrio
		// Direccion_Residencia
		// Ocupacion
		// Tipo_Regimen_Salud
		// Cod_Administradora
		// gp_discapa
		// gp_desplaz
		// gp_migrant
		// gp_carcela
		// gp_gestan
		// gp_indigen
		// gp_pobicbf
		// gp_mad_com
		// gp_desmovi
		// gp_psiquia
		// gp_vic_vio
		// gp_otros
		// Depto_Residencia
		// Municipio_Residencia
		// Fecha_Consulta
		// Fecha_Inicio_Sintomas
		// Hospitalizado
		// Fecha_Defuncion
		// Numero_Certificado_Defuncion
		// Causa_Basica_Muerte_CIEX
		// Entidad_fallecimiento
		// Telefono
		// Fecha_Nacimiento
		// Nombre_Profesional_Diligencia
		// Telefono_Profesional_Diligencia
		// Mecanismo_Probable_Transmision
		// Nombre_Madre
		// Tipo_Id_Madre
		// Numero_Identificacion_Madre
		// Indentidad_Genero
		// Donador_Sangre_Ultimos_12_Meses
		// Fecha_Donacion
		// Nombre_Institucion_Donacion
		// Poblacion_clave
		// Recibio_Asesoria_Pre_Prueba
		// Recibio_Asesoria_Post_Prueba
		// Tipo_Prueba
		// Fecha_Resultado_Confirmatorio
		// Valor_Carga_Viral
		// Estado_Clinico_Notificacion
		// Hijos_Mujeres_Menores_5
		// Hijos_Hombres_Menores_5
		// Numero_Semanas_Embarazo
		// Antecedentes_Embarazo
		// Candidiasis_esofagica
		// Candidiasis_vias_aereas
		// Tuberculosis_pulmonar
		// Cancer_cervical
		// Tuberculosis_extrapulmonar
		// Coccidiomicosis
		// Citomegalovirosis
		// Retinitis_citomegalovirosis
		// Sindrome_Emanciacion
		// Encefalopatia
		// Otras_micobacterias
		// Histoplasmosis_Extrapulmonar
		// isosporidiasis_cronica
		// herpes_zoster
		// Histoplasmosis_diseminada
		// Linfoma_Burkitt
		// Neumonia_Pneumocystis
		// Neumonia_Recurrente
		// Linfoma_Inmunoblastico
		// Criptosporidiasis_cronica
		// Criptococosis_Extrapulmonar
		// Sarcoma_Kaposi
		// Leucoencefalopatia_Multifocal
		// Septicemia_recurrente
		// Toxoplasmosis_cerebral
		// HepatitisB
		// HepatitisC
		// Meningitis
		// RecuentoCD4
		// Registrado_Por
		// Centro_Poblado
		// Vereda
		// Pertenencia_Etnica
		// Grupo_Poblacional
		// Clasificacion_Inicial
		// Fecha_Hospitalizacion
		// Seguimiento_Clasificacion_Final
		// Fecha_Ajuste
		// Nombre_Evento
		// Localidad_residencia
		// Barrio_residencia
		// Fecha_ingreso_app
		// Actualizado_por
		// Fecha_actualizacion_app

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

		// Consecutivo
		$this->Consecutivo->ViewValue = $this->Consecutivo->CurrentValue;
		$this->Consecutivo->ViewCustomAttributes = "";

		// Seguimiento
		if (strval($this->Seguimiento->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Seguimiento->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Seguimiento, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Seguimiento->ViewValue = $this->Seguimiento->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Seguimiento->ViewValue = $this->Seguimiento->CurrentValue;
			}
		} else {
			$this->Seguimiento->ViewValue = NULL;
		}
		$this->Seguimiento->ViewCustomAttributes = "";

		// Condicion_Final
		if (strval($this->Condicion_Final->CurrentValue) <> "") {
			$sFilterWrk = "`No.Condicion_Final`" . ew_SearchString("=", $this->Condicion_Final->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `No.Condicion_Final`, `Condicion_Final` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `condicion_final`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Condicion_Final, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Condicion_Final->ViewValue = $this->Condicion_Final->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Condicion_Final->ViewValue = $this->Condicion_Final->CurrentValue;
			}
		} else {
			$this->Condicion_Final->ViewValue = NULL;
		}
		$this->Condicion_Final->ViewCustomAttributes = "";

		// Codigo_centro
		if (strval($this->Codigo_centro->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Codigo_centro->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_Upgd`, `Upgd` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Codigo_centro, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Codigo_centro->ViewValue = $this->Codigo_centro->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Codigo_centro->ViewValue = $this->Codigo_centro->CurrentValue;
			}
		} else {
			$this->Codigo_centro->ViewValue = NULL;
		}
		$this->Codigo_centro->ViewCustomAttributes = "";

		// Codigo_UPGD
		$this->Codigo_UPGD->ViewValue = $this->Codigo_UPGD->CurrentValue;
		if (strval($this->Codigo_UPGD->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Codigo_UPGD->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Codigo_UPGD, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$arwrk[2] = $rswrk->fields('Disp2Fld');
				$this->Codigo_UPGD->ViewValue = $this->Codigo_UPGD->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Codigo_UPGD->ViewValue = $this->Codigo_UPGD->CurrentValue;
			}
		} else {
			$this->Codigo_UPGD->ViewValue = NULL;
		}
		$this->Codigo_UPGD->ViewCustomAttributes = "";

		// Cod_Evento
		$this->Cod_Evento->ViewValue = $this->Cod_Evento->CurrentValue;
		$this->Cod_Evento->ViewCustomAttributes = "";

		// Embarazo_Actual
		if (strval($this->Embarazo_Actual->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Embarazo_Actual->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Embarazo_Actual, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Embarazo_Actual->ViewValue = $this->Embarazo_Actual->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Embarazo_Actual->ViewValue = $this->Embarazo_Actual->CurrentValue;
			}
		} else {
			$this->Embarazo_Actual->ViewValue = NULL;
		}
		$this->Embarazo_Actual->ViewCustomAttributes = "";

		// Fecha_Notificacion
		$this->Fecha_Notificacion->ViewValue = $this->Fecha_Notificacion->CurrentValue;
		$this->Fecha_Notificacion->ViewValue = ew_FormatDateTime($this->Fecha_Notificacion->ViewValue, 5);
		$this->Fecha_Notificacion->ViewCustomAttributes = "";

		// Semana
		if (strval($this->Semana->CurrentValue) <> "") {
			$sFilterWrk = "`Semana`" . ew_SearchString("=", $this->Semana->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Semana`, `Semana` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `semana_epidemiologica`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Semana, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Semana->ViewValue = $this->Semana->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Semana->ViewValue = $this->Semana->CurrentValue;
			}
		} else {
			$this->Semana->ViewValue = NULL;
		}
		$this->Semana->ViewCustomAttributes = "";

		// Periodo_Epidemiologico
		if (strval($this->Periodo_Epidemiologico->CurrentValue) <> "") {
			$sFilterWrk = "`Periodo_epidemiologico`" . ew_SearchString("=", $this->Periodo_Epidemiologico->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Periodo_epidemiologico`, `Periodo_epidemiologico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `periodo_epidemiologico`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Periodo_Epidemiologico, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Periodo_Epidemiologico->ViewValue = $this->Periodo_Epidemiologico->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Periodo_Epidemiologico->ViewValue = $this->Periodo_Epidemiologico->CurrentValue;
			}
		} else {
			$this->Periodo_Epidemiologico->ViewValue = NULL;
		}
		$this->Periodo_Epidemiologico->ViewCustomAttributes = "";

		// Periodo_Sivigila
		if (strval($this->Periodo_Sivigila->CurrentValue) <> "") {
			$sFilterWrk = "`Periodo`" . ew_SearchString("=", $this->Periodo_Sivigila->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Periodo`, `Periodo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `periodo`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Periodo_Sivigila, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Periodo_Sivigila->ViewValue = $this->Periodo_Sivigila->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Periodo_Sivigila->ViewValue = $this->Periodo_Sivigila->CurrentValue;
			}
		} else {
			$this->Periodo_Sivigila->ViewValue = NULL;
		}
		$this->Periodo_Sivigila->ViewCustomAttributes = "";

		// Primer_Nombre
		$this->Primer_Nombre->ViewValue = $this->Primer_Nombre->CurrentValue;
		$this->Primer_Nombre->ViewCustomAttributes = "";

		// Segundo_Nombre
		$this->Segundo_Nombre->ViewValue = $this->Segundo_Nombre->CurrentValue;
		$this->Segundo_Nombre->ViewCustomAttributes = "";

		// Primer_Apellido
		$this->Primer_Apellido->ViewValue = $this->Primer_Apellido->CurrentValue;
		$this->Primer_Apellido->ViewCustomAttributes = "";

		// Segundo_Apellido
		$this->Segundo_Apellido->ViewValue = $this->Segundo_Apellido->CurrentValue;
		$this->Segundo_Apellido->ViewCustomAttributes = "";

		// Tipo_Id
		if (strval($this->Tipo_Id->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Documento`" . ew_SearchString("=", $this->Tipo_Id->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_documento`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tipo_Id, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tipo_Id->ViewValue = $this->Tipo_Id->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tipo_Id->ViewValue = $this->Tipo_Id->CurrentValue;
			}
		} else {
			$this->Tipo_Id->ViewValue = NULL;
		}
		$this->Tipo_Id->ViewCustomAttributes = "";

		// Numero_Identificacion
		$this->Numero_Identificacion->ViewValue = $this->Numero_Identificacion->CurrentValue;
		$this->Numero_Identificacion->ViewCustomAttributes = "";

		// Edad
		$this->Edad->ViewValue = $this->Edad->CurrentValue;
		$this->Edad->ViewCustomAttributes = "";

		// Unidad_Edad
		if (strval($this->Unidad_Edad->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Unidad_Edad->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Unidad_Edad` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `unidad_medida_edad`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Unidad_Edad, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Unidad_Edad->ViewValue = $this->Unidad_Edad->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Unidad_Edad->ViewValue = $this->Unidad_Edad->CurrentValue;
			}
		} else {
			$this->Unidad_Edad->ViewValue = NULL;
		}
		$this->Unidad_Edad->ViewCustomAttributes = "";

		// Sexo
		if (strval($this->Sexo->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_Sexo`" . ew_SearchString("=", $this->Sexo->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_Sexo`, `Sexo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Sexo, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Sexo->ViewValue = $this->Sexo->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Sexo->ViewValue = $this->Sexo->CurrentValue;
			}
		} else {
			$this->Sexo->ViewValue = NULL;
		}
		$this->Sexo->ViewCustomAttributes = "";

		// Pais_Ocurrencia
		if (strval($this->Pais_Ocurrencia->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Pais`" . ew_SearchString("=", $this->Pais_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Pais`, `Pais` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `pais`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Pais_Ocurrencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Pais_Ocurrencia->ViewValue = $this->Pais_Ocurrencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Pais_Ocurrencia->ViewValue = $this->Pais_Ocurrencia->CurrentValue;
			}
		} else {
			$this->Pais_Ocurrencia->ViewValue = NULL;
		}
		$this->Pais_Ocurrencia->ViewCustomAttributes = "";

		// Depto_Ocurrencia
		if (strval($this->Depto_Ocurrencia->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Departamento`" . ew_SearchString("=", $this->Depto_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Depto_Ocurrencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Depto_Ocurrencia->ViewValue = $this->Depto_Ocurrencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Depto_Ocurrencia->ViewValue = $this->Depto_Ocurrencia->CurrentValue;
			}
		} else {
			$this->Depto_Ocurrencia->ViewValue = NULL;
		}
		$this->Depto_Ocurrencia->ViewCustomAttributes = "";

		// Municipio_Ocurrencia
		if (strval($this->Municipio_Ocurrencia->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Municipio`" . ew_SearchString("=", $this->Municipio_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Municipio_Ocurrencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Municipio_Ocurrencia->ViewValue = $this->Municipio_Ocurrencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Municipio_Ocurrencia->ViewValue = $this->Municipio_Ocurrencia->CurrentValue;
			}
		} else {
			$this->Municipio_Ocurrencia->ViewValue = NULL;
		}
		$this->Municipio_Ocurrencia->ViewCustomAttributes = "";

		// Area_Ocurrencia
		if (strval($this->Area_Ocurrencia->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Area_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Area_Ocurrencia` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `area_ocurrencia`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Area_Ocurrencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Area_Ocurrencia->ViewValue = $this->Area_Ocurrencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Area_Ocurrencia->ViewValue = $this->Area_Ocurrencia->CurrentValue;
			}
		} else {
			$this->Area_Ocurrencia->ViewValue = NULL;
		}
		$this->Area_Ocurrencia->ViewCustomAttributes = "";

		// Localidad
		if (strval($this->Localidad->CurrentValue) <> "") {
			$sFilterWrk = "`consecutivo`" . ew_SearchString("=", $this->Localidad->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidad`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Localidad, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Localidad->ViewValue = $this->Localidad->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Localidad->ViewValue = $this->Localidad->CurrentValue;
			}
		} else {
			$this->Localidad->ViewValue = NULL;
		}
		$this->Localidad->ViewCustomAttributes = "";

		// Barrio
		if (strval($this->Barrio->CurrentValue) <> "") {
			$sFilterWrk = "`cod_barrio_vereda`" . ew_SearchString("=", $this->Barrio->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `barrios_veredas`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Barrio, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Barrio->ViewValue = $this->Barrio->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Barrio->ViewValue = $this->Barrio->CurrentValue;
			}
		} else {
			$this->Barrio->ViewValue = NULL;
		}
		$this->Barrio->ViewCustomAttributes = "";

		// Direccion_Residencia
		$this->Direccion_Residencia->ViewValue = $this->Direccion_Residencia->CurrentValue;
		$this->Direccion_Residencia->ViewCustomAttributes = "";

		// Ocupacion
		if (strval($this->Ocupacion->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Ocupacion`" . ew_SearchString("=", $this->Ocupacion->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Ocupacion`, `Cod_Ocupacion` AS `DispFld`, `Ocupacion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ocupacion`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Ocupacion, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$arwrk[2] = $rswrk->fields('Disp2Fld');
				$this->Ocupacion->ViewValue = $this->Ocupacion->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Ocupacion->ViewValue = $this->Ocupacion->CurrentValue;
			}
		} else {
			$this->Ocupacion->ViewValue = NULL;
		}
		$this->Ocupacion->ViewCustomAttributes = "";

		// Tipo_Regimen_Salud
		if (strval($this->Tipo_Regimen_Salud->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_Regimen`" . ew_SearchString("=", $this->Tipo_Regimen_Salud->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_Regimen`, `Codigo_Regimen` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_regimen_salud`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tipo_Regimen_Salud, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tipo_Regimen_Salud->ViewValue = $this->Tipo_Regimen_Salud->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tipo_Regimen_Salud->ViewValue = $this->Tipo_Regimen_Salud->CurrentValue;
			}
		} else {
			$this->Tipo_Regimen_Salud->ViewValue = NULL;
		}
		$this->Tipo_Regimen_Salud->ViewCustomAttributes = "";

		// Cod_Administradora
		if (strval($this->Cod_Administradora->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo`" . ew_SearchString("=", $this->Cod_Administradora->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo`, `Codigo` AS `DispFld`, `Administradora_Salud` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `administradora_salud`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Cod_Administradora, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$arwrk[2] = $rswrk->fields('Disp2Fld');
				$this->Cod_Administradora->ViewValue = $this->Cod_Administradora->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Cod_Administradora->ViewValue = $this->Cod_Administradora->CurrentValue;
			}
		} else {
			$this->Cod_Administradora->ViewValue = NULL;
		}
		$this->Cod_Administradora->ViewCustomAttributes = "";

		// gp_discapa
		if (strval($this->gp_discapa->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_discapa->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_discapa, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_discapa->ViewValue = $this->gp_discapa->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_discapa->ViewValue = $this->gp_discapa->CurrentValue;
			}
		} else {
			$this->gp_discapa->ViewValue = NULL;
		}
		$this->gp_discapa->ViewCustomAttributes = "";

		// gp_desplaz
		if (strval($this->gp_desplaz->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_desplaz->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_desplaz, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_desplaz->ViewValue = $this->gp_desplaz->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_desplaz->ViewValue = $this->gp_desplaz->CurrentValue;
			}
		} else {
			$this->gp_desplaz->ViewValue = NULL;
		}
		$this->gp_desplaz->ViewCustomAttributes = "";

		// gp_migrant
		if (strval($this->gp_migrant->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_migrant->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_migrant, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_migrant->ViewValue = $this->gp_migrant->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_migrant->ViewValue = $this->gp_migrant->CurrentValue;
			}
		} else {
			$this->gp_migrant->ViewValue = NULL;
		}
		$this->gp_migrant->ViewCustomAttributes = "";

		// gp_carcela
		if (strval($this->gp_carcela->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_carcela->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_carcela, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_carcela->ViewValue = $this->gp_carcela->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_carcela->ViewValue = $this->gp_carcela->CurrentValue;
			}
		} else {
			$this->gp_carcela->ViewValue = NULL;
		}
		$this->gp_carcela->ViewCustomAttributes = "";

		// gp_gestan
		if (strval($this->gp_gestan->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_gestan->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_gestan, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_gestan->ViewValue = $this->gp_gestan->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_gestan->ViewValue = $this->gp_gestan->CurrentValue;
			}
		} else {
			$this->gp_gestan->ViewValue = NULL;
		}
		$this->gp_gestan->ViewCustomAttributes = "";

		// gp_indigen
		if (strval($this->gp_indigen->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_indigen->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_indigen, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_indigen->ViewValue = $this->gp_indigen->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_indigen->ViewValue = $this->gp_indigen->CurrentValue;
			}
		} else {
			$this->gp_indigen->ViewValue = NULL;
		}
		$this->gp_indigen->ViewCustomAttributes = "";

		// gp_pobicbf
		if (strval($this->gp_pobicbf->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_pobicbf->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_pobicbf, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_pobicbf->ViewValue = $this->gp_pobicbf->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_pobicbf->ViewValue = $this->gp_pobicbf->CurrentValue;
			}
		} else {
			$this->gp_pobicbf->ViewValue = NULL;
		}
		$this->gp_pobicbf->ViewCustomAttributes = "";

		// gp_mad_com
		if (strval($this->gp_mad_com->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_mad_com->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_mad_com, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_mad_com->ViewValue = $this->gp_mad_com->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_mad_com->ViewValue = $this->gp_mad_com->CurrentValue;
			}
		} else {
			$this->gp_mad_com->ViewValue = NULL;
		}
		$this->gp_mad_com->ViewCustomAttributes = "";

		// gp_desmovi
		if (strval($this->gp_desmovi->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_desmovi->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_desmovi, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_desmovi->ViewValue = $this->gp_desmovi->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_desmovi->ViewValue = $this->gp_desmovi->CurrentValue;
			}
		} else {
			$this->gp_desmovi->ViewValue = NULL;
		}
		$this->gp_desmovi->ViewCustomAttributes = "";

		// gp_psiquia
		if (strval($this->gp_psiquia->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_psiquia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_psiquia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_psiquia->ViewValue = $this->gp_psiquia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_psiquia->ViewValue = $this->gp_psiquia->CurrentValue;
			}
		} else {
			$this->gp_psiquia->ViewValue = NULL;
		}
		$this->gp_psiquia->ViewCustomAttributes = "";

		// gp_vic_vio
		if (strval($this->gp_vic_vio->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_vic_vio->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_vic_vio, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_vic_vio->ViewValue = $this->gp_vic_vio->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_vic_vio->ViewValue = $this->gp_vic_vio->CurrentValue;
			}
		} else {
			$this->gp_vic_vio->ViewValue = NULL;
		}
		$this->gp_vic_vio->ViewCustomAttributes = "";

		// gp_otros
		if (strval($this->gp_otros->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_otros->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->gp_otros, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->gp_otros->ViewValue = $this->gp_otros->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->gp_otros->ViewValue = $this->gp_otros->CurrentValue;
			}
		} else {
			$this->gp_otros->ViewValue = NULL;
		}
		$this->gp_otros->ViewCustomAttributes = "";

		// Depto_Residencia
		if (strval($this->Depto_Residencia->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Departamento`" . ew_SearchString("=", $this->Depto_Residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Depto_Residencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Depto_Residencia->ViewValue = $this->Depto_Residencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Depto_Residencia->ViewValue = $this->Depto_Residencia->CurrentValue;
			}
		} else {
			$this->Depto_Residencia->ViewValue = NULL;
		}
		$this->Depto_Residencia->ViewCustomAttributes = "";

		// Municipio_Residencia
		if (strval($this->Municipio_Residencia->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Municipio`" . ew_SearchString("=", $this->Municipio_Residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Municipio_Residencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Municipio_Residencia->ViewValue = $this->Municipio_Residencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Municipio_Residencia->ViewValue = $this->Municipio_Residencia->CurrentValue;
			}
		} else {
			$this->Municipio_Residencia->ViewValue = NULL;
		}
		$this->Municipio_Residencia->ViewCustomAttributes = "";

		// Fecha_Consulta
		$this->Fecha_Consulta->ViewValue = $this->Fecha_Consulta->CurrentValue;
		$this->Fecha_Consulta->ViewValue = ew_FormatDateTime($this->Fecha_Consulta->ViewValue, 5);
		$this->Fecha_Consulta->ViewCustomAttributes = "";

		// Fecha_Inicio_Sintomas
		$this->Fecha_Inicio_Sintomas->ViewValue = $this->Fecha_Inicio_Sintomas->CurrentValue;
		$this->Fecha_Inicio_Sintomas->ViewValue = ew_FormatDateTime($this->Fecha_Inicio_Sintomas->ViewValue, 5);
		$this->Fecha_Inicio_Sintomas->ViewCustomAttributes = "";

		// Hospitalizado
		if (strval($this->Hospitalizado->CurrentValue) <> "") {
			$arwrk = explode(",", $this->Hospitalizado->CurrentValue);
			$sFilterWrk = "";
			foreach ($arwrk as $wrk) {
				if ($sFilterWrk <> "") $sFilterWrk .= " OR ";
				$sFilterWrk .= "`Consecutivo`" . ew_SearchString("=", trim($wrk), EW_DATATYPE_NUMBER, "");
			}
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Hospitalizado, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$this->Hospitalizado->ViewValue = "";
				$ari = 0;
				while (!$rswrk->EOF) {
					$arwrk = array();
					$arwrk[1] = $rswrk->fields('DispFld');
					$this->Hospitalizado->ViewValue .= $this->Hospitalizado->DisplayValue($arwrk);
					$rswrk->MoveNext();
					if (!$rswrk->EOF) $this->Hospitalizado->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options
					$ari++;
				}
				$rswrk->Close();
			} else {
				$this->Hospitalizado->ViewValue = $this->Hospitalizado->CurrentValue;
			}
		} else {
			$this->Hospitalizado->ViewValue = NULL;
		}
		$this->Hospitalizado->ViewCustomAttributes = "";

		// Fecha_Defuncion
		$this->Fecha_Defuncion->ViewValue = $this->Fecha_Defuncion->CurrentValue;
		$this->Fecha_Defuncion->ViewValue = ew_FormatDateTime($this->Fecha_Defuncion->ViewValue, 5);
		$this->Fecha_Defuncion->ViewCustomAttributes = "";

		// Numero_Certificado_Defuncion
		$this->Numero_Certificado_Defuncion->ViewValue = $this->Numero_Certificado_Defuncion->CurrentValue;
		$this->Numero_Certificado_Defuncion->ViewCustomAttributes = "";

		// Causa_Basica_Muerte_CIEX
		$this->Causa_Basica_Muerte_CIEX->ViewValue = $this->Causa_Basica_Muerte_CIEX->CurrentValue;
		$this->Causa_Basica_Muerte_CIEX->ViewCustomAttributes = "";

		// Entidad_fallecimiento
		$this->Entidad_fallecimiento->ViewValue = $this->Entidad_fallecimiento->CurrentValue;
		if (strval($this->Entidad_fallecimiento->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Entidad_fallecimiento->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Entidad_fallecimiento, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$arwrk[2] = $rswrk->fields('Disp2Fld');
				$this->Entidad_fallecimiento->ViewValue = $this->Entidad_fallecimiento->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Entidad_fallecimiento->ViewValue = $this->Entidad_fallecimiento->CurrentValue;
			}
		} else {
			$this->Entidad_fallecimiento->ViewValue = NULL;
		}
		$this->Entidad_fallecimiento->ViewCustomAttributes = "";

		// Telefono
		$this->Telefono->ViewValue = $this->Telefono->CurrentValue;
		$this->Telefono->ViewCustomAttributes = "";

		// Fecha_Nacimiento
		$this->Fecha_Nacimiento->ViewValue = $this->Fecha_Nacimiento->CurrentValue;
		$this->Fecha_Nacimiento->ViewValue = ew_FormatDateTime($this->Fecha_Nacimiento->ViewValue, 5);
		$this->Fecha_Nacimiento->ViewCustomAttributes = "";

		// Nombre_Profesional_Diligencia
		$this->Nombre_Profesional_Diligencia->ViewValue = $this->Nombre_Profesional_Diligencia->CurrentValue;
		$this->Nombre_Profesional_Diligencia->ViewCustomAttributes = "";

		// Telefono_Profesional_Diligencia
		$this->Telefono_Profesional_Diligencia->ViewValue = $this->Telefono_Profesional_Diligencia->CurrentValue;
		$this->Telefono_Profesional_Diligencia->ViewCustomAttributes = "";

		// Mecanismo_Probable_Transmision
		if (strval($this->Mecanismo_Probable_Transmision->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Mecanismo_Probable_Transmision->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Mecanismo_Probable` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `mecanismo_probable_transmision`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Mecanismo_Probable_Transmision, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Mecanismo_Probable_Transmision->ViewValue = $this->Mecanismo_Probable_Transmision->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Mecanismo_Probable_Transmision->ViewValue = $this->Mecanismo_Probable_Transmision->CurrentValue;
			}
		} else {
			$this->Mecanismo_Probable_Transmision->ViewValue = NULL;
		}
		$this->Mecanismo_Probable_Transmision->ViewCustomAttributes = "";

		// Nombre_Madre
		$this->Nombre_Madre->ViewValue = $this->Nombre_Madre->CurrentValue;
		$this->Nombre_Madre->ViewCustomAttributes = "";

		// Tipo_Id_Madre
		if (strval($this->Tipo_Id_Madre->CurrentValue) <> "") {
			$sFilterWrk = "`Cod_Documento`" . ew_SearchString("=", $this->Tipo_Id_Madre->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_documento`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tipo_Id_Madre, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tipo_Id_Madre->ViewValue = $this->Tipo_Id_Madre->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tipo_Id_Madre->ViewValue = $this->Tipo_Id_Madre->CurrentValue;
			}
		} else {
			$this->Tipo_Id_Madre->ViewValue = NULL;
		}
		$this->Tipo_Id_Madre->ViewCustomAttributes = "";

		// Numero_Identificacion_Madre
		$this->Numero_Identificacion_Madre->ViewValue = $this->Numero_Identificacion_Madre->CurrentValue;
		$this->Numero_Identificacion_Madre->ViewCustomAttributes = "";

		// Indentidad_Genero
		if (strval($this->Indentidad_Genero->CurrentValue) <> "") {
			$sFilterWrk = "`Codigo_identidad`" . ew_SearchString("=", $this->Indentidad_Genero->CurrentValue, EW_DATATYPE_STRING, "");
		$sSqlWrk = "SELECT `Codigo_identidad`, `Identidad_genero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `identidad_genero`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Indentidad_Genero, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Indentidad_Genero->ViewValue = $this->Indentidad_Genero->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Indentidad_Genero->ViewValue = $this->Indentidad_Genero->CurrentValue;
			}
		} else {
			$this->Indentidad_Genero->ViewValue = NULL;
		}
		$this->Indentidad_Genero->ViewCustomAttributes = "";

		// Donador_Sangre_Ultimos_12_Meses
		if (strval($this->Donador_Sangre_Ultimos_12_Meses->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Donador_Sangre_Ultimos_12_Meses->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Donador_Sangre_Ultimos_12_Meses, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Donador_Sangre_Ultimos_12_Meses->ViewValue = $this->Donador_Sangre_Ultimos_12_Meses->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Donador_Sangre_Ultimos_12_Meses->ViewValue = $this->Donador_Sangre_Ultimos_12_Meses->CurrentValue;
			}
		} else {
			$this->Donador_Sangre_Ultimos_12_Meses->ViewValue = NULL;
		}
		$this->Donador_Sangre_Ultimos_12_Meses->ViewCustomAttributes = "";

		// Fecha_Donacion
		$this->Fecha_Donacion->ViewValue = $this->Fecha_Donacion->CurrentValue;
		$this->Fecha_Donacion->ViewValue = ew_FormatDateTime($this->Fecha_Donacion->ViewValue, 5);
		$this->Fecha_Donacion->ViewCustomAttributes = "";

		// Nombre_Institucion_Donacion
		$this->Nombre_Institucion_Donacion->ViewValue = $this->Nombre_Institucion_Donacion->CurrentValue;
		$this->Nombre_Institucion_Donacion->ViewCustomAttributes = "";

		// Poblacion_clave
		if (strval($this->Poblacion_clave->CurrentValue) <> "") {
			$sFilterWrk = "`Id`" . ew_SearchString("=", $this->Poblacion_clave->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Id`, `Poblacion_clave` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `poblacion_clave`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Poblacion_clave, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Poblacion_clave->ViewValue = $this->Poblacion_clave->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Poblacion_clave->ViewValue = $this->Poblacion_clave->CurrentValue;
			}
		} else {
			$this->Poblacion_clave->ViewValue = NULL;
		}
		$this->Poblacion_clave->ViewCustomAttributes = "";

		// Recibio_Asesoria_Pre_Prueba
		if (strval($this->Recibio_Asesoria_Pre_Prueba->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Recibio_Asesoria_Pre_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Recibio_Asesoria_Pre_Prueba, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Recibio_Asesoria_Pre_Prueba->ViewValue = $this->Recibio_Asesoria_Pre_Prueba->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Recibio_Asesoria_Pre_Prueba->ViewValue = $this->Recibio_Asesoria_Pre_Prueba->CurrentValue;
			}
		} else {
			$this->Recibio_Asesoria_Pre_Prueba->ViewValue = NULL;
		}
		$this->Recibio_Asesoria_Pre_Prueba->ViewCustomAttributes = "";

		// Recibio_Asesoria_Post_Prueba
		if (strval($this->Recibio_Asesoria_Post_Prueba->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Recibio_Asesoria_Post_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Recibio_Asesoria_Post_Prueba, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Recibio_Asesoria_Post_Prueba->ViewValue = $this->Recibio_Asesoria_Post_Prueba->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Recibio_Asesoria_Post_Prueba->ViewValue = $this->Recibio_Asesoria_Post_Prueba->CurrentValue;
			}
		} else {
			$this->Recibio_Asesoria_Post_Prueba->ViewValue = NULL;
		}
		$this->Recibio_Asesoria_Post_Prueba->ViewCustomAttributes = "";

		// Tipo_Prueba
		if (strval($this->Tipo_Prueba->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tipo_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Tipo_Prueba` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_prueba`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tipo_Prueba, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tipo_Prueba->ViewValue = $this->Tipo_Prueba->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tipo_Prueba->ViewValue = $this->Tipo_Prueba->CurrentValue;
			}
		} else {
			$this->Tipo_Prueba->ViewValue = NULL;
		}
		$this->Tipo_Prueba->ViewCustomAttributes = "";

		// Fecha_Resultado_Confirmatorio
		$this->Fecha_Resultado_Confirmatorio->ViewValue = $this->Fecha_Resultado_Confirmatorio->CurrentValue;
		$this->Fecha_Resultado_Confirmatorio->ViewValue = ew_FormatDateTime($this->Fecha_Resultado_Confirmatorio->ViewValue, 5);
		$this->Fecha_Resultado_Confirmatorio->ViewCustomAttributes = "";

		// Valor_Carga_Viral
		$this->Valor_Carga_Viral->ViewValue = $this->Valor_Carga_Viral->CurrentValue;
		$this->Valor_Carga_Viral->ViewCustomAttributes = "";

		// Estado_Clinico_Notificacion
		if (strval($this->Estado_Clinico_Notificacion->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Estado_Clinico_Notificacion->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Estado_Clinico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_clinico_paciente`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Estado_Clinico_Notificacion, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Estado_Clinico_Notificacion->ViewValue = $this->Estado_Clinico_Notificacion->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Estado_Clinico_Notificacion->ViewValue = $this->Estado_Clinico_Notificacion->CurrentValue;
			}
		} else {
			$this->Estado_Clinico_Notificacion->ViewValue = NULL;
		}
		$this->Estado_Clinico_Notificacion->ViewCustomAttributes = "";

		// Hijos_Mujeres_Menores_5
		$this->Hijos_Mujeres_Menores_5->ViewValue = $this->Hijos_Mujeres_Menores_5->CurrentValue;
		$this->Hijos_Mujeres_Menores_5->ViewCustomAttributes = "";

		// Hijos_Hombres_Menores_5
		$this->Hijos_Hombres_Menores_5->ViewValue = $this->Hijos_Hombres_Menores_5->CurrentValue;
		$this->Hijos_Hombres_Menores_5->ViewCustomAttributes = "";

		// Numero_Semanas_Embarazo
		$this->Numero_Semanas_Embarazo->ViewValue = $this->Numero_Semanas_Embarazo->CurrentValue;
		$this->Numero_Semanas_Embarazo->ViewCustomAttributes = "";

		// Antecedentes_Embarazo
		if (strval($this->Antecedentes_Embarazo->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Antecedentes_Embarazo->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Antecedentes_Embarazo, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Antecedentes_Embarazo->ViewValue = $this->Antecedentes_Embarazo->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Antecedentes_Embarazo->ViewValue = $this->Antecedentes_Embarazo->CurrentValue;
			}
		} else {
			$this->Antecedentes_Embarazo->ViewValue = NULL;
		}
		$this->Antecedentes_Embarazo->ViewCustomAttributes = "";

		// Candidiasis_esofagica
		if (strval($this->Candidiasis_esofagica->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Candidiasis_esofagica->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Candidiasis_esofagica, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Candidiasis_esofagica->ViewValue = $this->Candidiasis_esofagica->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Candidiasis_esofagica->ViewValue = $this->Candidiasis_esofagica->CurrentValue;
			}
		} else {
			$this->Candidiasis_esofagica->ViewValue = NULL;
		}
		$this->Candidiasis_esofagica->ViewCustomAttributes = "";

		// Candidiasis_vias_aereas
		if (strval($this->Candidiasis_vias_aereas->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Candidiasis_vias_aereas->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Candidiasis_vias_aereas, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Candidiasis_vias_aereas->ViewValue = $this->Candidiasis_vias_aereas->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Candidiasis_vias_aereas->ViewValue = $this->Candidiasis_vias_aereas->CurrentValue;
			}
		} else {
			$this->Candidiasis_vias_aereas->ViewValue = NULL;
		}
		$this->Candidiasis_vias_aereas->ViewCustomAttributes = "";

		// Tuberculosis_pulmonar
		if (strval($this->Tuberculosis_pulmonar->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tuberculosis_pulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tuberculosis_pulmonar, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tuberculosis_pulmonar->ViewValue = $this->Tuberculosis_pulmonar->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tuberculosis_pulmonar->ViewValue = $this->Tuberculosis_pulmonar->CurrentValue;
			}
		} else {
			$this->Tuberculosis_pulmonar->ViewValue = NULL;
		}
		$this->Tuberculosis_pulmonar->ViewCustomAttributes = "";

		// Cancer_cervical
		if (strval($this->Cancer_cervical->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Cancer_cervical->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Cancer_cervical, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Cancer_cervical->ViewValue = $this->Cancer_cervical->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Cancer_cervical->ViewValue = $this->Cancer_cervical->CurrentValue;
			}
		} else {
			$this->Cancer_cervical->ViewValue = NULL;
		}
		$this->Cancer_cervical->ViewCustomAttributes = "";

		// Tuberculosis_extrapulmonar
		if (strval($this->Tuberculosis_extrapulmonar->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tuberculosis_extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Tuberculosis_extrapulmonar, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Tuberculosis_extrapulmonar->ViewValue = $this->Tuberculosis_extrapulmonar->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Tuberculosis_extrapulmonar->ViewValue = $this->Tuberculosis_extrapulmonar->CurrentValue;
			}
		} else {
			$this->Tuberculosis_extrapulmonar->ViewValue = NULL;
		}
		$this->Tuberculosis_extrapulmonar->ViewCustomAttributes = "";

		// Coccidiomicosis
		if (strval($this->Coccidiomicosis->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Coccidiomicosis->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Coccidiomicosis, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Coccidiomicosis->ViewValue = $this->Coccidiomicosis->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Coccidiomicosis->ViewValue = $this->Coccidiomicosis->CurrentValue;
			}
		} else {
			$this->Coccidiomicosis->ViewValue = NULL;
		}
		$this->Coccidiomicosis->ViewCustomAttributes = "";

		// Citomegalovirosis
		if (strval($this->Citomegalovirosis->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Citomegalovirosis->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Citomegalovirosis, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Citomegalovirosis->ViewValue = $this->Citomegalovirosis->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Citomegalovirosis->ViewValue = $this->Citomegalovirosis->CurrentValue;
			}
		} else {
			$this->Citomegalovirosis->ViewValue = NULL;
		}
		$this->Citomegalovirosis->ViewCustomAttributes = "";

		// Retinitis_citomegalovirosis
		if (strval($this->Retinitis_citomegalovirosis->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Retinitis_citomegalovirosis->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Retinitis_citomegalovirosis, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Retinitis_citomegalovirosis->ViewValue = $this->Retinitis_citomegalovirosis->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Retinitis_citomegalovirosis->ViewValue = $this->Retinitis_citomegalovirosis->CurrentValue;
			}
		} else {
			$this->Retinitis_citomegalovirosis->ViewValue = NULL;
		}
		$this->Retinitis_citomegalovirosis->ViewCustomAttributes = "";

		// Sindrome_Emanciacion
		if (strval($this->Sindrome_Emanciacion->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Sindrome_Emanciacion->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Sindrome_Emanciacion, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Sindrome_Emanciacion->ViewValue = $this->Sindrome_Emanciacion->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Sindrome_Emanciacion->ViewValue = $this->Sindrome_Emanciacion->CurrentValue;
			}
		} else {
			$this->Sindrome_Emanciacion->ViewValue = NULL;
		}
		$this->Sindrome_Emanciacion->ViewCustomAttributes = "";

		// Encefalopatia
		if (strval($this->Encefalopatia->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Encefalopatia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Encefalopatia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Encefalopatia->ViewValue = $this->Encefalopatia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Encefalopatia->ViewValue = $this->Encefalopatia->CurrentValue;
			}
		} else {
			$this->Encefalopatia->ViewValue = NULL;
		}
		$this->Encefalopatia->ViewCustomAttributes = "";

		// Otras_micobacterias
		if (strval($this->Otras_micobacterias->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Otras_micobacterias->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Otras_micobacterias, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Otras_micobacterias->ViewValue = $this->Otras_micobacterias->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Otras_micobacterias->ViewValue = $this->Otras_micobacterias->CurrentValue;
			}
		} else {
			$this->Otras_micobacterias->ViewValue = NULL;
		}
		$this->Otras_micobacterias->ViewCustomAttributes = "";

		// Histoplasmosis_Extrapulmonar
		if (strval($this->Histoplasmosis_Extrapulmonar->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Histoplasmosis_Extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Histoplasmosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Histoplasmosis_Extrapulmonar->ViewValue = $this->Histoplasmosis_Extrapulmonar->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Histoplasmosis_Extrapulmonar->ViewValue = $this->Histoplasmosis_Extrapulmonar->CurrentValue;
			}
		} else {
			$this->Histoplasmosis_Extrapulmonar->ViewValue = NULL;
		}
		$this->Histoplasmosis_Extrapulmonar->ViewCustomAttributes = "";

		// isosporidiasis_cronica
		if (strval($this->isosporidiasis_cronica->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->isosporidiasis_cronica->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->isosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->isosporidiasis_cronica->ViewValue = $this->isosporidiasis_cronica->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->isosporidiasis_cronica->ViewValue = $this->isosporidiasis_cronica->CurrentValue;
			}
		} else {
			$this->isosporidiasis_cronica->ViewValue = NULL;
		}
		$this->isosporidiasis_cronica->ViewCustomAttributes = "";

		// herpes_zoster
		if (strval($this->herpes_zoster->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->herpes_zoster->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->herpes_zoster, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->herpes_zoster->ViewValue = $this->herpes_zoster->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->herpes_zoster->ViewValue = $this->herpes_zoster->CurrentValue;
			}
		} else {
			$this->herpes_zoster->ViewValue = NULL;
		}
		$this->herpes_zoster->ViewCustomAttributes = "";

		// Histoplasmosis_diseminada
		if (strval($this->Histoplasmosis_diseminada->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Histoplasmosis_diseminada->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Histoplasmosis_diseminada, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Histoplasmosis_diseminada->ViewValue = $this->Histoplasmosis_diseminada->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Histoplasmosis_diseminada->ViewValue = $this->Histoplasmosis_diseminada->CurrentValue;
			}
		} else {
			$this->Histoplasmosis_diseminada->ViewValue = NULL;
		}
		$this->Histoplasmosis_diseminada->ViewCustomAttributes = "";

		// Linfoma_Burkitt
		if (strval($this->Linfoma_Burkitt->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Linfoma_Burkitt->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Linfoma_Burkitt, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Linfoma_Burkitt->ViewValue = $this->Linfoma_Burkitt->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Linfoma_Burkitt->ViewValue = $this->Linfoma_Burkitt->CurrentValue;
			}
		} else {
			$this->Linfoma_Burkitt->ViewValue = NULL;
		}
		$this->Linfoma_Burkitt->ViewCustomAttributes = "";

		// Neumonia_Pneumocystis
		if (strval($this->Neumonia_Pneumocystis->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Neumonia_Pneumocystis->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Neumonia_Pneumocystis, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Neumonia_Pneumocystis->ViewValue = $this->Neumonia_Pneumocystis->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Neumonia_Pneumocystis->ViewValue = $this->Neumonia_Pneumocystis->CurrentValue;
			}
		} else {
			$this->Neumonia_Pneumocystis->ViewValue = NULL;
		}
		$this->Neumonia_Pneumocystis->ViewCustomAttributes = "";

		// Neumonia_Recurrente
		if (strval($this->Neumonia_Recurrente->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Neumonia_Recurrente->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Neumonia_Recurrente, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Neumonia_Recurrente->ViewValue = $this->Neumonia_Recurrente->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Neumonia_Recurrente->ViewValue = $this->Neumonia_Recurrente->CurrentValue;
			}
		} else {
			$this->Neumonia_Recurrente->ViewValue = NULL;
		}
		$this->Neumonia_Recurrente->ViewCustomAttributes = "";

		// Linfoma_Inmunoblastico
		if (strval($this->Linfoma_Inmunoblastico->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Linfoma_Inmunoblastico->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Linfoma_Inmunoblastico, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Linfoma_Inmunoblastico->ViewValue = $this->Linfoma_Inmunoblastico->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Linfoma_Inmunoblastico->ViewValue = $this->Linfoma_Inmunoblastico->CurrentValue;
			}
		} else {
			$this->Linfoma_Inmunoblastico->ViewValue = NULL;
		}
		$this->Linfoma_Inmunoblastico->ViewCustomAttributes = "";

		// Criptosporidiasis_cronica
		if (strval($this->Criptosporidiasis_cronica->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Criptosporidiasis_cronica->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Criptosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Criptosporidiasis_cronica->ViewValue = $this->Criptosporidiasis_cronica->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Criptosporidiasis_cronica->ViewValue = $this->Criptosporidiasis_cronica->CurrentValue;
			}
		} else {
			$this->Criptosporidiasis_cronica->ViewValue = NULL;
		}
		$this->Criptosporidiasis_cronica->ViewCustomAttributes = "";

		// Criptococosis_Extrapulmonar
		if (strval($this->Criptococosis_Extrapulmonar->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Criptococosis_Extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Criptococosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Criptococosis_Extrapulmonar->ViewValue = $this->Criptococosis_Extrapulmonar->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Criptococosis_Extrapulmonar->ViewValue = $this->Criptococosis_Extrapulmonar->CurrentValue;
			}
		} else {
			$this->Criptococosis_Extrapulmonar->ViewValue = NULL;
		}
		$this->Criptococosis_Extrapulmonar->ViewCustomAttributes = "";

		// Sarcoma_Kaposi
		if (strval($this->Sarcoma_Kaposi->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Sarcoma_Kaposi->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Sarcoma_Kaposi, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Sarcoma_Kaposi->ViewValue = $this->Sarcoma_Kaposi->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Sarcoma_Kaposi->ViewValue = $this->Sarcoma_Kaposi->CurrentValue;
			}
		} else {
			$this->Sarcoma_Kaposi->ViewValue = NULL;
		}
		$this->Sarcoma_Kaposi->ViewCustomAttributes = "";

		// Leucoencefalopatia_Multifocal
		if (strval($this->Leucoencefalopatia_Multifocal->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Leucoencefalopatia_Multifocal->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Leucoencefalopatia_Multifocal, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Leucoencefalopatia_Multifocal->ViewValue = $this->Leucoencefalopatia_Multifocal->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Leucoencefalopatia_Multifocal->ViewValue = $this->Leucoencefalopatia_Multifocal->CurrentValue;
			}
		} else {
			$this->Leucoencefalopatia_Multifocal->ViewValue = NULL;
		}
		$this->Leucoencefalopatia_Multifocal->ViewCustomAttributes = "";

		// Septicemia_recurrente
		if (strval($this->Septicemia_recurrente->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Septicemia_recurrente->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Septicemia_recurrente, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Septicemia_recurrente->ViewValue = $this->Septicemia_recurrente->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Septicemia_recurrente->ViewValue = $this->Septicemia_recurrente->CurrentValue;
			}
		} else {
			$this->Septicemia_recurrente->ViewValue = NULL;
		}
		$this->Septicemia_recurrente->ViewCustomAttributes = "";

		// Toxoplasmosis_cerebral
		if (strval($this->Toxoplasmosis_cerebral->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Toxoplasmosis_cerebral->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Toxoplasmosis_cerebral, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Toxoplasmosis_cerebral->ViewValue = $this->Toxoplasmosis_cerebral->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Toxoplasmosis_cerebral->ViewValue = $this->Toxoplasmosis_cerebral->CurrentValue;
			}
		} else {
			$this->Toxoplasmosis_cerebral->ViewValue = NULL;
		}
		$this->Toxoplasmosis_cerebral->ViewCustomAttributes = "";

		// HepatitisB
		if (strval($this->HepatitisB->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->HepatitisB->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->HepatitisB, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->HepatitisB->ViewValue = $this->HepatitisB->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->HepatitisB->ViewValue = $this->HepatitisB->CurrentValue;
			}
		} else {
			$this->HepatitisB->ViewValue = NULL;
		}
		$this->HepatitisB->ViewCustomAttributes = "";

		// HepatitisC
		if (strval($this->HepatitisC->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->HepatitisC->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->HepatitisC, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->HepatitisC->ViewValue = $this->HepatitisC->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->HepatitisC->ViewValue = $this->HepatitisC->CurrentValue;
			}
		} else {
			$this->HepatitisC->ViewValue = NULL;
		}
		$this->HepatitisC->ViewCustomAttributes = "";

		// Meningitis
		if (strval($this->Meningitis->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Meningitis->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Meningitis, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Meningitis->ViewValue = $this->Meningitis->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Meningitis->ViewValue = $this->Meningitis->CurrentValue;
			}
		} else {
			$this->Meningitis->ViewValue = NULL;
		}
		$this->Meningitis->ViewCustomAttributes = "";

		// RecuentoCD4
		if (strval($this->RecuentoCD4->CurrentValue) <> "") {
			$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->RecuentoCD4->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->RecuentoCD4, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->RecuentoCD4->ViewValue = $this->RecuentoCD4->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->RecuentoCD4->ViewValue = $this->RecuentoCD4->CurrentValue;
			}
		} else {
			$this->RecuentoCD4->ViewValue = NULL;
		}
		$this->RecuentoCD4->ViewCustomAttributes = "";

		// Registrado_Por
		$this->Registrado_Por->ViewValue = $this->Registrado_Por->CurrentValue;
		$this->Registrado_Por->ViewCustomAttributes = "";

		// Localidad_residencia
		if (strval($this->Localidad_residencia->CurrentValue) <> "") {
			$sFilterWrk = "`consecutivo`" . ew_SearchString("=", $this->Localidad_residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidad`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Localidad_residencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Localidad_residencia->ViewValue = $this->Localidad_residencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Localidad_residencia->ViewValue = $this->Localidad_residencia->CurrentValue;
			}
		} else {
			$this->Localidad_residencia->ViewValue = NULL;
		}
		$this->Localidad_residencia->ViewCustomAttributes = "";

		// Barrio_residencia
		if (strval($this->Barrio_residencia->CurrentValue) <> "") {
			$sFilterWrk = "`cod_barrio_vereda`" . ew_SearchString("=", $this->Barrio_residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
		$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `barrios_veredas`";
		$sWhereWrk = "";
		ew_AddFilter($sWhereWrk, $sFilterWrk);
		$this->Lookup_Selecting($this->Barrio_residencia, $sWhereWrk); // Call Lookup selecting
		if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			if ($rswrk && !$rswrk->EOF) { // Lookup values found
				$arwrk = array();
				$arwrk[1] = $rswrk->fields('DispFld');
				$this->Barrio_residencia->ViewValue = $this->Barrio_residencia->DisplayValue($arwrk);
				$rswrk->Close();
			} else {
				$this->Barrio_residencia->ViewValue = $this->Barrio_residencia->CurrentValue;
			}
		} else {
			$this->Barrio_residencia->ViewValue = NULL;
		}
		$this->Barrio_residencia->ViewCustomAttributes = "";

		// Fecha_ingreso_app
		$this->Fecha_ingreso_app->ViewValue = $this->Fecha_ingreso_app->CurrentValue;
		$this->Fecha_ingreso_app->ViewValue = ew_FormatDateTime($this->Fecha_ingreso_app->ViewValue, 5);
		$this->Fecha_ingreso_app->ViewCustomAttributes = "";

		// Actualizado_por
		$this->Actualizado_por->ViewValue = $this->Actualizado_por->CurrentValue;
		$this->Actualizado_por->ViewCustomAttributes = "";

		// Fecha_actualizacion_app
		$this->Fecha_actualizacion_app->ViewValue = $this->Fecha_actualizacion_app->CurrentValue;
		$this->Fecha_actualizacion_app->ViewValue = ew_FormatDateTime($this->Fecha_actualizacion_app->ViewValue, 5);
		$this->Fecha_actualizacion_app->ViewCustomAttributes = "";

			// Consecutivo
			$this->Consecutivo->LinkCustomAttributes = "";
			$this->Consecutivo->HrefValue = "";
			$this->Consecutivo->TooltipValue = "";

			// Seguimiento
			$this->Seguimiento->LinkCustomAttributes = "";
			$this->Seguimiento->HrefValue = "";
			$this->Seguimiento->TooltipValue = "";

			// Condicion_Final
			$this->Condicion_Final->LinkCustomAttributes = "";
			$this->Condicion_Final->HrefValue = "";
			$this->Condicion_Final->TooltipValue = "";

			// Codigo_centro
			$this->Codigo_centro->LinkCustomAttributes = "";
			$this->Codigo_centro->HrefValue = "";
			$this->Codigo_centro->TooltipValue = "";

			// Codigo_UPGD
			$this->Codigo_UPGD->LinkCustomAttributes = "";
			$this->Codigo_UPGD->HrefValue = "";
			$this->Codigo_UPGD->TooltipValue = "";

			// Cod_Evento
			$this->Cod_Evento->LinkCustomAttributes = "";
			$this->Cod_Evento->HrefValue = "";
			$this->Cod_Evento->TooltipValue = "";

			// Embarazo_Actual
			$this->Embarazo_Actual->LinkCustomAttributes = "";
			$this->Embarazo_Actual->HrefValue = "";
			$this->Embarazo_Actual->TooltipValue = "";

			// Fecha_Notificacion
			$this->Fecha_Notificacion->LinkCustomAttributes = "";
			$this->Fecha_Notificacion->HrefValue = "";
			$this->Fecha_Notificacion->TooltipValue = "";

			// Semana
			$this->Semana->LinkCustomAttributes = "";
			$this->Semana->HrefValue = "";
			$this->Semana->TooltipValue = "";

			// Periodo_Epidemiologico
			$this->Periodo_Epidemiologico->LinkCustomAttributes = "";
			$this->Periodo_Epidemiologico->HrefValue = "";
			$this->Periodo_Epidemiologico->TooltipValue = "";

			// Periodo_Sivigila
			$this->Periodo_Sivigila->LinkCustomAttributes = "";
			$this->Periodo_Sivigila->HrefValue = "";
			$this->Periodo_Sivigila->TooltipValue = "";

			// Primer_Nombre
			$this->Primer_Nombre->LinkCustomAttributes = "";
			$this->Primer_Nombre->HrefValue = "";
			$this->Primer_Nombre->TooltipValue = "";

			// Segundo_Nombre
			$this->Segundo_Nombre->LinkCustomAttributes = "";
			$this->Segundo_Nombre->HrefValue = "";
			$this->Segundo_Nombre->TooltipValue = "";

			// Primer_Apellido
			$this->Primer_Apellido->LinkCustomAttributes = "";
			$this->Primer_Apellido->HrefValue = "";
			$this->Primer_Apellido->TooltipValue = "";

			// Segundo_Apellido
			$this->Segundo_Apellido->LinkCustomAttributes = "";
			$this->Segundo_Apellido->HrefValue = "";
			$this->Segundo_Apellido->TooltipValue = "";

			// Tipo_Id
			$this->Tipo_Id->LinkCustomAttributes = "";
			$this->Tipo_Id->HrefValue = "";
			$this->Tipo_Id->TooltipValue = "";

			// Numero_Identificacion
			$this->Numero_Identificacion->LinkCustomAttributes = "";
			$this->Numero_Identificacion->HrefValue = "";
			$this->Numero_Identificacion->TooltipValue = "";

			// Edad
			$this->Edad->LinkCustomAttributes = "";
			$this->Edad->HrefValue = "";
			$this->Edad->TooltipValue = "";

			// Unidad_Edad
			$this->Unidad_Edad->LinkCustomAttributes = "";
			$this->Unidad_Edad->HrefValue = "";
			$this->Unidad_Edad->TooltipValue = "";

			// Sexo
			$this->Sexo->LinkCustomAttributes = "";
			$this->Sexo->HrefValue = "";
			$this->Sexo->TooltipValue = "";

			// Pais_Ocurrencia
			$this->Pais_Ocurrencia->LinkCustomAttributes = "";
			$this->Pais_Ocurrencia->HrefValue = "";
			$this->Pais_Ocurrencia->TooltipValue = "";

			// Depto_Ocurrencia
			$this->Depto_Ocurrencia->LinkCustomAttributes = "";
			$this->Depto_Ocurrencia->HrefValue = "";
			$this->Depto_Ocurrencia->TooltipValue = "";

			// Municipio_Ocurrencia
			$this->Municipio_Ocurrencia->LinkCustomAttributes = "";
			$this->Municipio_Ocurrencia->HrefValue = "";
			$this->Municipio_Ocurrencia->TooltipValue = "";

			// Area_Ocurrencia
			$this->Area_Ocurrencia->LinkCustomAttributes = "";
			$this->Area_Ocurrencia->HrefValue = "";
			$this->Area_Ocurrencia->TooltipValue = "";

			// Localidad
			$this->Localidad->LinkCustomAttributes = "";
			$this->Localidad->HrefValue = "";
			$this->Localidad->TooltipValue = "";

			// Barrio
			$this->Barrio->LinkCustomAttributes = "";
			$this->Barrio->HrefValue = "";
			$this->Barrio->TooltipValue = "";

			// Direccion_Residencia
			$this->Direccion_Residencia->LinkCustomAttributes = "";
			$this->Direccion_Residencia->HrefValue = "";
			$this->Direccion_Residencia->TooltipValue = "";

			// Ocupacion
			$this->Ocupacion->LinkCustomAttributes = "";
			$this->Ocupacion->HrefValue = "";
			$this->Ocupacion->TooltipValue = "";

			// Tipo_Regimen_Salud
			$this->Tipo_Regimen_Salud->LinkCustomAttributes = "";
			$this->Tipo_Regimen_Salud->HrefValue = "";
			$this->Tipo_Regimen_Salud->TooltipValue = "";

			// Cod_Administradora
			$this->Cod_Administradora->LinkCustomAttributes = "";
			$this->Cod_Administradora->HrefValue = "";
			$this->Cod_Administradora->TooltipValue = "";

			// gp_discapa
			$this->gp_discapa->LinkCustomAttributes = "";
			$this->gp_discapa->HrefValue = "";
			$this->gp_discapa->TooltipValue = "";

			// gp_desplaz
			$this->gp_desplaz->LinkCustomAttributes = "";
			$this->gp_desplaz->HrefValue = "";
			$this->gp_desplaz->TooltipValue = "";

			// gp_migrant
			$this->gp_migrant->LinkCustomAttributes = "";
			$this->gp_migrant->HrefValue = "";
			$this->gp_migrant->TooltipValue = "";

			// gp_carcela
			$this->gp_carcela->LinkCustomAttributes = "";
			$this->gp_carcela->HrefValue = "";
			$this->gp_carcela->TooltipValue = "";

			// gp_gestan
			$this->gp_gestan->LinkCustomAttributes = "";
			$this->gp_gestan->HrefValue = "";
			$this->gp_gestan->TooltipValue = "";

			// gp_indigen
			$this->gp_indigen->LinkCustomAttributes = "";
			$this->gp_indigen->HrefValue = "";
			$this->gp_indigen->TooltipValue = "";

			// gp_pobicbf
			$this->gp_pobicbf->LinkCustomAttributes = "";
			$this->gp_pobicbf->HrefValue = "";
			$this->gp_pobicbf->TooltipValue = "";

			// gp_mad_com
			$this->gp_mad_com->LinkCustomAttributes = "";
			$this->gp_mad_com->HrefValue = "";
			$this->gp_mad_com->TooltipValue = "";

			// gp_desmovi
			$this->gp_desmovi->LinkCustomAttributes = "";
			$this->gp_desmovi->HrefValue = "";
			$this->gp_desmovi->TooltipValue = "";

			// gp_psiquia
			$this->gp_psiquia->LinkCustomAttributes = "";
			$this->gp_psiquia->HrefValue = "";
			$this->gp_psiquia->TooltipValue = "";

			// gp_vic_vio
			$this->gp_vic_vio->LinkCustomAttributes = "";
			$this->gp_vic_vio->HrefValue = "";
			$this->gp_vic_vio->TooltipValue = "";

			// gp_otros
			$this->gp_otros->LinkCustomAttributes = "";
			$this->gp_otros->HrefValue = "";
			$this->gp_otros->TooltipValue = "";

			// Depto_Residencia
			$this->Depto_Residencia->LinkCustomAttributes = "";
			$this->Depto_Residencia->HrefValue = "";
			$this->Depto_Residencia->TooltipValue = "";

			// Municipio_Residencia
			$this->Municipio_Residencia->LinkCustomAttributes = "";
			$this->Municipio_Residencia->HrefValue = "";
			$this->Municipio_Residencia->TooltipValue = "";

			// Fecha_Consulta
			$this->Fecha_Consulta->LinkCustomAttributes = "";
			$this->Fecha_Consulta->HrefValue = "";
			$this->Fecha_Consulta->TooltipValue = "";

			// Fecha_Inicio_Sintomas
			$this->Fecha_Inicio_Sintomas->LinkCustomAttributes = "";
			$this->Fecha_Inicio_Sintomas->HrefValue = "";
			$this->Fecha_Inicio_Sintomas->TooltipValue = "";

			// Hospitalizado
			$this->Hospitalizado->LinkCustomAttributes = "";
			$this->Hospitalizado->HrefValue = "";
			$this->Hospitalizado->TooltipValue = "";

			// Fecha_Defuncion
			$this->Fecha_Defuncion->LinkCustomAttributes = "";
			$this->Fecha_Defuncion->HrefValue = "";
			$this->Fecha_Defuncion->TooltipValue = "";

			// Numero_Certificado_Defuncion
			$this->Numero_Certificado_Defuncion->LinkCustomAttributes = "";
			$this->Numero_Certificado_Defuncion->HrefValue = "";
			$this->Numero_Certificado_Defuncion->TooltipValue = "";

			// Causa_Basica_Muerte_CIEX
			$this->Causa_Basica_Muerte_CIEX->LinkCustomAttributes = "";
			$this->Causa_Basica_Muerte_CIEX->HrefValue = "";
			$this->Causa_Basica_Muerte_CIEX->TooltipValue = "";

			// Entidad_fallecimiento
			$this->Entidad_fallecimiento->LinkCustomAttributes = "";
			$this->Entidad_fallecimiento->HrefValue = "";
			$this->Entidad_fallecimiento->TooltipValue = "";

			// Telefono
			$this->Telefono->LinkCustomAttributes = "";
			$this->Telefono->HrefValue = "";
			$this->Telefono->TooltipValue = "";

			// Fecha_Nacimiento
			$this->Fecha_Nacimiento->LinkCustomAttributes = "";
			$this->Fecha_Nacimiento->HrefValue = "";
			$this->Fecha_Nacimiento->TooltipValue = "";

			// Nombre_Profesional_Diligencia
			$this->Nombre_Profesional_Diligencia->LinkCustomAttributes = "";
			$this->Nombre_Profesional_Diligencia->HrefValue = "";
			$this->Nombre_Profesional_Diligencia->TooltipValue = "";

			// Telefono_Profesional_Diligencia
			$this->Telefono_Profesional_Diligencia->LinkCustomAttributes = "";
			$this->Telefono_Profesional_Diligencia->HrefValue = "";
			$this->Telefono_Profesional_Diligencia->TooltipValue = "";

			// Mecanismo_Probable_Transmision
			$this->Mecanismo_Probable_Transmision->LinkCustomAttributes = "";
			$this->Mecanismo_Probable_Transmision->HrefValue = "";
			$this->Mecanismo_Probable_Transmision->TooltipValue = "";

			// Nombre_Madre
			$this->Nombre_Madre->LinkCustomAttributes = "";
			$this->Nombre_Madre->HrefValue = "";
			$this->Nombre_Madre->TooltipValue = "";

			// Tipo_Id_Madre
			$this->Tipo_Id_Madre->LinkCustomAttributes = "";
			$this->Tipo_Id_Madre->HrefValue = "";
			$this->Tipo_Id_Madre->TooltipValue = "";

			// Numero_Identificacion_Madre
			$this->Numero_Identificacion_Madre->LinkCustomAttributes = "";
			$this->Numero_Identificacion_Madre->HrefValue = "";
			$this->Numero_Identificacion_Madre->TooltipValue = "";

			// Indentidad_Genero
			$this->Indentidad_Genero->LinkCustomAttributes = "";
			$this->Indentidad_Genero->HrefValue = "";
			$this->Indentidad_Genero->TooltipValue = "";

			// Donador_Sangre_Ultimos_12_Meses
			$this->Donador_Sangre_Ultimos_12_Meses->LinkCustomAttributes = "";
			$this->Donador_Sangre_Ultimos_12_Meses->HrefValue = "";
			$this->Donador_Sangre_Ultimos_12_Meses->TooltipValue = "";

			// Fecha_Donacion
			$this->Fecha_Donacion->LinkCustomAttributes = "";
			$this->Fecha_Donacion->HrefValue = "";
			$this->Fecha_Donacion->TooltipValue = "";

			// Nombre_Institucion_Donacion
			$this->Nombre_Institucion_Donacion->LinkCustomAttributes = "";
			$this->Nombre_Institucion_Donacion->HrefValue = "";
			$this->Nombre_Institucion_Donacion->TooltipValue = "";

			// Poblacion_clave
			$this->Poblacion_clave->LinkCustomAttributes = "";
			$this->Poblacion_clave->HrefValue = "";
			$this->Poblacion_clave->TooltipValue = "";

			// Recibio_Asesoria_Pre_Prueba
			$this->Recibio_Asesoria_Pre_Prueba->LinkCustomAttributes = "";
			$this->Recibio_Asesoria_Pre_Prueba->HrefValue = "";
			$this->Recibio_Asesoria_Pre_Prueba->TooltipValue = "";

			// Recibio_Asesoria_Post_Prueba
			$this->Recibio_Asesoria_Post_Prueba->LinkCustomAttributes = "";
			$this->Recibio_Asesoria_Post_Prueba->HrefValue = "";
			$this->Recibio_Asesoria_Post_Prueba->TooltipValue = "";

			// Tipo_Prueba
			$this->Tipo_Prueba->LinkCustomAttributes = "";
			$this->Tipo_Prueba->HrefValue = "";
			$this->Tipo_Prueba->TooltipValue = "";

			// Fecha_Resultado_Confirmatorio
			$this->Fecha_Resultado_Confirmatorio->LinkCustomAttributes = "";
			$this->Fecha_Resultado_Confirmatorio->HrefValue = "";
			$this->Fecha_Resultado_Confirmatorio->TooltipValue = "";

			// Valor_Carga_Viral
			$this->Valor_Carga_Viral->LinkCustomAttributes = "";
			$this->Valor_Carga_Viral->HrefValue = "";
			$this->Valor_Carga_Viral->TooltipValue = "";

			// Estado_Clinico_Notificacion
			$this->Estado_Clinico_Notificacion->LinkCustomAttributes = "";
			$this->Estado_Clinico_Notificacion->HrefValue = "";
			$this->Estado_Clinico_Notificacion->TooltipValue = "";

			// Hijos_Mujeres_Menores_5
			$this->Hijos_Mujeres_Menores_5->LinkCustomAttributes = "";
			$this->Hijos_Mujeres_Menores_5->HrefValue = "";
			$this->Hijos_Mujeres_Menores_5->TooltipValue = "";

			// Hijos_Hombres_Menores_5
			$this->Hijos_Hombres_Menores_5->LinkCustomAttributes = "";
			$this->Hijos_Hombres_Menores_5->HrefValue = "";
			$this->Hijos_Hombres_Menores_5->TooltipValue = "";

			// Numero_Semanas_Embarazo
			$this->Numero_Semanas_Embarazo->LinkCustomAttributes = "";
			$this->Numero_Semanas_Embarazo->HrefValue = "";
			$this->Numero_Semanas_Embarazo->TooltipValue = "";

			// Antecedentes_Embarazo
			$this->Antecedentes_Embarazo->LinkCustomAttributes = "";
			$this->Antecedentes_Embarazo->HrefValue = "";
			$this->Antecedentes_Embarazo->TooltipValue = "";

			// Candidiasis_esofagica
			$this->Candidiasis_esofagica->LinkCustomAttributes = "";
			$this->Candidiasis_esofagica->HrefValue = "";
			$this->Candidiasis_esofagica->TooltipValue = "";

			// Candidiasis_vias_aereas
			$this->Candidiasis_vias_aereas->LinkCustomAttributes = "";
			$this->Candidiasis_vias_aereas->HrefValue = "";
			$this->Candidiasis_vias_aereas->TooltipValue = "";

			// Tuberculosis_pulmonar
			$this->Tuberculosis_pulmonar->LinkCustomAttributes = "";
			$this->Tuberculosis_pulmonar->HrefValue = "";
			$this->Tuberculosis_pulmonar->TooltipValue = "";

			// Cancer_cervical
			$this->Cancer_cervical->LinkCustomAttributes = "";
			$this->Cancer_cervical->HrefValue = "";
			$this->Cancer_cervical->TooltipValue = "";

			// Tuberculosis_extrapulmonar
			$this->Tuberculosis_extrapulmonar->LinkCustomAttributes = "";
			$this->Tuberculosis_extrapulmonar->HrefValue = "";
			$this->Tuberculosis_extrapulmonar->TooltipValue = "";

			// Coccidiomicosis
			$this->Coccidiomicosis->LinkCustomAttributes = "";
			$this->Coccidiomicosis->HrefValue = "";
			$this->Coccidiomicosis->TooltipValue = "";

			// Citomegalovirosis
			$this->Citomegalovirosis->LinkCustomAttributes = "";
			$this->Citomegalovirosis->HrefValue = "";
			$this->Citomegalovirosis->TooltipValue = "";

			// Retinitis_citomegalovirosis
			$this->Retinitis_citomegalovirosis->LinkCustomAttributes = "";
			$this->Retinitis_citomegalovirosis->HrefValue = "";
			$this->Retinitis_citomegalovirosis->TooltipValue = "";

			// Sindrome_Emanciacion
			$this->Sindrome_Emanciacion->LinkCustomAttributes = "";
			$this->Sindrome_Emanciacion->HrefValue = "";
			$this->Sindrome_Emanciacion->TooltipValue = "";

			// Encefalopatia
			$this->Encefalopatia->LinkCustomAttributes = "";
			$this->Encefalopatia->HrefValue = "";
			$this->Encefalopatia->TooltipValue = "";

			// Otras_micobacterias
			$this->Otras_micobacterias->LinkCustomAttributes = "";
			$this->Otras_micobacterias->HrefValue = "";
			$this->Otras_micobacterias->TooltipValue = "";

			// Histoplasmosis_Extrapulmonar
			$this->Histoplasmosis_Extrapulmonar->LinkCustomAttributes = "";
			$this->Histoplasmosis_Extrapulmonar->HrefValue = "";
			$this->Histoplasmosis_Extrapulmonar->TooltipValue = "";

			// isosporidiasis_cronica
			$this->isosporidiasis_cronica->LinkCustomAttributes = "";
			$this->isosporidiasis_cronica->HrefValue = "";
			$this->isosporidiasis_cronica->TooltipValue = "";

			// herpes_zoster
			$this->herpes_zoster->LinkCustomAttributes = "";
			$this->herpes_zoster->HrefValue = "";
			$this->herpes_zoster->TooltipValue = "";

			// Histoplasmosis_diseminada
			$this->Histoplasmosis_diseminada->LinkCustomAttributes = "";
			$this->Histoplasmosis_diseminada->HrefValue = "";
			$this->Histoplasmosis_diseminada->TooltipValue = "";

			// Linfoma_Burkitt
			$this->Linfoma_Burkitt->LinkCustomAttributes = "";
			$this->Linfoma_Burkitt->HrefValue = "";
			$this->Linfoma_Burkitt->TooltipValue = "";

			// Neumonia_Pneumocystis
			$this->Neumonia_Pneumocystis->LinkCustomAttributes = "";
			$this->Neumonia_Pneumocystis->HrefValue = "";
			$this->Neumonia_Pneumocystis->TooltipValue = "";

			// Neumonia_Recurrente
			$this->Neumonia_Recurrente->LinkCustomAttributes = "";
			$this->Neumonia_Recurrente->HrefValue = "";
			$this->Neumonia_Recurrente->TooltipValue = "";

			// Linfoma_Inmunoblastico
			$this->Linfoma_Inmunoblastico->LinkCustomAttributes = "";
			$this->Linfoma_Inmunoblastico->HrefValue = "";
			$this->Linfoma_Inmunoblastico->TooltipValue = "";

			// Criptosporidiasis_cronica
			$this->Criptosporidiasis_cronica->LinkCustomAttributes = "";
			$this->Criptosporidiasis_cronica->HrefValue = "";
			$this->Criptosporidiasis_cronica->TooltipValue = "";

			// Criptococosis_Extrapulmonar
			$this->Criptococosis_Extrapulmonar->LinkCustomAttributes = "";
			$this->Criptococosis_Extrapulmonar->HrefValue = "";
			$this->Criptococosis_Extrapulmonar->TooltipValue = "";

			// Sarcoma_Kaposi
			$this->Sarcoma_Kaposi->LinkCustomAttributes = "";
			$this->Sarcoma_Kaposi->HrefValue = "";
			$this->Sarcoma_Kaposi->TooltipValue = "";

			// Leucoencefalopatia_Multifocal
			$this->Leucoencefalopatia_Multifocal->LinkCustomAttributes = "";
			$this->Leucoencefalopatia_Multifocal->HrefValue = "";
			$this->Leucoencefalopatia_Multifocal->TooltipValue = "";

			// Septicemia_recurrente
			$this->Septicemia_recurrente->LinkCustomAttributes = "";
			$this->Septicemia_recurrente->HrefValue = "";
			$this->Septicemia_recurrente->TooltipValue = "";

			// Toxoplasmosis_cerebral
			$this->Toxoplasmosis_cerebral->LinkCustomAttributes = "";
			$this->Toxoplasmosis_cerebral->HrefValue = "";
			$this->Toxoplasmosis_cerebral->TooltipValue = "";

			// HepatitisB
			$this->HepatitisB->LinkCustomAttributes = "";
			$this->HepatitisB->HrefValue = "";
			$this->HepatitisB->TooltipValue = "";

			// HepatitisC
			$this->HepatitisC->LinkCustomAttributes = "";
			$this->HepatitisC->HrefValue = "";
			$this->HepatitisC->TooltipValue = "";

			// Meningitis
			$this->Meningitis->LinkCustomAttributes = "";
			$this->Meningitis->HrefValue = "";
			$this->Meningitis->TooltipValue = "";

			// RecuentoCD4
			$this->RecuentoCD4->LinkCustomAttributes = "";
			$this->RecuentoCD4->HrefValue = "";
			$this->RecuentoCD4->TooltipValue = "";

			// Localidad_residencia
			$this->Localidad_residencia->LinkCustomAttributes = "";
			$this->Localidad_residencia->HrefValue = "";
			$this->Localidad_residencia->TooltipValue = "";

			// Barrio_residencia
			$this->Barrio_residencia->LinkCustomAttributes = "";
			$this->Barrio_residencia->HrefValue = "";
			$this->Barrio_residencia->TooltipValue = "";

			// Fecha_ingreso_app
			$this->Fecha_ingreso_app->LinkCustomAttributes = "";
			$this->Fecha_ingreso_app->HrefValue = "";
			$this->Fecha_ingreso_app->TooltipValue = "";

			// Actualizado_por
			$this->Actualizado_por->LinkCustomAttributes = "";
			$this->Actualizado_por->HrefValue = "";
			$this->Actualizado_por->TooltipValue = "";

			// Fecha_actualizacion_app
			$this->Fecha_actualizacion_app->LinkCustomAttributes = "";
			$this->Fecha_actualizacion_app->HrefValue = "";
			$this->Fecha_actualizacion_app->TooltipValue = "";
		} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row

			// Consecutivo
			$this->Consecutivo->EditAttrs["class"] = "form-control";
			$this->Consecutivo->EditCustomAttributes = "";
			$this->Consecutivo->EditValue = $this->Consecutivo->CurrentValue;
			$this->Consecutivo->ViewCustomAttributes = "";

			// Seguimiento
			$this->Seguimiento->EditCustomAttributes = "";
			if (trim(strval($this->Seguimiento->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Seguimiento->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Seguimiento, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Seguimiento->EditValue = $arwrk;

			// Condicion_Final
			$this->Condicion_Final->EditAttrs["class"] = "form-control";
			$this->Condicion_Final->EditCustomAttributes = "";
			if (trim(strval($this->Condicion_Final->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`No.Condicion_Final`" . ew_SearchString("=", $this->Condicion_Final->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `No.Condicion_Final`, `Condicion_Final` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `condicion_final`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Condicion_Final, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Condicion_Final->EditValue = $arwrk;

			// Codigo_centro
			$this->Codigo_centro->EditAttrs["class"] = "form-control";
			$this->Codigo_centro->EditCustomAttributes = "";
			if (!$Security->IsAdmin() && $Security->IsLoggedIn() && !$this->UserIDAllow("edit")) { // Non system admin
				$this->Codigo_centro->CurrentValue = CurrentUserID();
			if (strval($this->Codigo_centro->CurrentValue) <> "") {
				$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Codigo_centro->CurrentValue, EW_DATATYPE_STRING, "");
			$sSqlWrk = "SELECT `Codigo_Upgd`, `Upgd` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Codigo_centro, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = Conn()->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$arwrk = array();
					$arwrk[1] = $rswrk->fields('DispFld');
					$this->Codigo_centro->EditValue = $this->Codigo_centro->DisplayValue($arwrk);
					$rswrk->Close();
				} else {
					$this->Codigo_centro->EditValue = $this->Codigo_centro->CurrentValue;
				}
			} else {
				$this->Codigo_centro->EditValue = NULL;
			}
			$this->Codigo_centro->ViewCustomAttributes = "";
			} else {
			if (trim(strval($this->Codigo_centro->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Codigo_centro->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Codigo_Upgd`, `Upgd` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `entidad_upgd`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Codigo_centro, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Codigo_centro->EditValue = $arwrk;
			}

			// Codigo_UPGD
			$this->Codigo_UPGD->EditAttrs["class"] = "form-control";
			$this->Codigo_UPGD->EditCustomAttributes = "";
			$this->Codigo_UPGD->EditValue = ew_HtmlEncode($this->Codigo_UPGD->CurrentValue);
			if (strval($this->Codigo_UPGD->CurrentValue) <> "") {
				$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Codigo_UPGD->CurrentValue, EW_DATATYPE_STRING, "");
			$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Codigo_UPGD, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = Conn()->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$arwrk = array();
					$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));
					$arwrk[2] = ew_HtmlEncode($rswrk->fields('Disp2Fld'));
					$this->Codigo_UPGD->EditValue = $this->Codigo_UPGD->DisplayValue($arwrk);
					$rswrk->Close();
				} else {
					$this->Codigo_UPGD->EditValue = ew_HtmlEncode($this->Codigo_UPGD->CurrentValue);
				}
			} else {
				$this->Codigo_UPGD->EditValue = NULL;
			}
			$this->Codigo_UPGD->PlaceHolder = ew_RemoveHtml($this->Codigo_UPGD->FldCaption());

			// Cod_Evento
			$this->Cod_Evento->EditAttrs["class"] = "form-control";
			$this->Cod_Evento->EditCustomAttributes = "";
			$this->Cod_Evento->EditValue = ew_HtmlEncode($this->Cod_Evento->CurrentValue);
			$this->Cod_Evento->PlaceHolder = ew_RemoveHtml($this->Cod_Evento->FldCaption());

			// Embarazo_Actual
			$this->Embarazo_Actual->EditCustomAttributes = "";
			if (trim(strval($this->Embarazo_Actual->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Embarazo_Actual->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Embarazo_Actual, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Embarazo_Actual->EditValue = $arwrk;

			// Fecha_Notificacion
			$this->Fecha_Notificacion->EditAttrs["class"] = "form-control";
			$this->Fecha_Notificacion->EditCustomAttributes = "";
			$this->Fecha_Notificacion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Notificacion->CurrentValue, 5));
			$this->Fecha_Notificacion->PlaceHolder = ew_RemoveHtml($this->Fecha_Notificacion->FldCaption());

			// Semana
			$this->Semana->EditAttrs["class"] = "form-control";
			$this->Semana->EditCustomAttributes = "";
			if (trim(strval($this->Semana->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Semana`" . ew_SearchString("=", $this->Semana->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Semana`, `Semana` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `semana_epidemiologica`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Semana, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Semana->EditValue = $arwrk;

			// Periodo_Epidemiologico
			$this->Periodo_Epidemiologico->EditAttrs["class"] = "form-control";
			$this->Periodo_Epidemiologico->EditCustomAttributes = "";
			if (trim(strval($this->Periodo_Epidemiologico->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Periodo_epidemiologico`" . ew_SearchString("=", $this->Periodo_Epidemiologico->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Periodo_epidemiologico`, `Periodo_epidemiologico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `periodo_epidemiologico`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Periodo_Epidemiologico, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Periodo_Epidemiologico->EditValue = $arwrk;

			// Periodo_Sivigila
			$this->Periodo_Sivigila->EditAttrs["class"] = "form-control";
			$this->Periodo_Sivigila->EditCustomAttributes = "";
			if (trim(strval($this->Periodo_Sivigila->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Periodo`" . ew_SearchString("=", $this->Periodo_Sivigila->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Periodo`, `Periodo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `periodo`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Periodo_Sivigila, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Periodo_Sivigila->EditValue = $arwrk;

			// Primer_Nombre
			$this->Primer_Nombre->EditAttrs["class"] = "form-control";
			$this->Primer_Nombre->EditCustomAttributes = "";
			$this->Primer_Nombre->EditValue = ew_HtmlEncode($this->Primer_Nombre->CurrentValue);
			$this->Primer_Nombre->PlaceHolder = ew_RemoveHtml($this->Primer_Nombre->FldCaption());

			// Segundo_Nombre
			$this->Segundo_Nombre->EditAttrs["class"] = "form-control";
			$this->Segundo_Nombre->EditCustomAttributes = "";
			$this->Segundo_Nombre->EditValue = ew_HtmlEncode($this->Segundo_Nombre->CurrentValue);
			$this->Segundo_Nombre->PlaceHolder = ew_RemoveHtml($this->Segundo_Nombre->FldCaption());

			// Primer_Apellido
			$this->Primer_Apellido->EditAttrs["class"] = "form-control";
			$this->Primer_Apellido->EditCustomAttributes = "";
			$this->Primer_Apellido->EditValue = ew_HtmlEncode($this->Primer_Apellido->CurrentValue);
			$this->Primer_Apellido->PlaceHolder = ew_RemoveHtml($this->Primer_Apellido->FldCaption());

			// Segundo_Apellido
			$this->Segundo_Apellido->EditAttrs["class"] = "form-control";
			$this->Segundo_Apellido->EditCustomAttributes = "";
			$this->Segundo_Apellido->EditValue = ew_HtmlEncode($this->Segundo_Apellido->CurrentValue);
			$this->Segundo_Apellido->PlaceHolder = ew_RemoveHtml($this->Segundo_Apellido->FldCaption());

			// Tipo_Id
			$this->Tipo_Id->EditAttrs["class"] = "form-control";
			$this->Tipo_Id->EditCustomAttributes = "";
			if (trim(strval($this->Tipo_Id->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Documento`" . ew_SearchString("=", $this->Tipo_Id->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_documento`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tipo_Id, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Tipo_Id->EditValue = $arwrk;

			// Numero_Identificacion
			$this->Numero_Identificacion->EditAttrs["class"] = "form-control";
			$this->Numero_Identificacion->EditCustomAttributes = "";
			$this->Numero_Identificacion->EditValue = ew_HtmlEncode($this->Numero_Identificacion->CurrentValue);
			$this->Numero_Identificacion->PlaceHolder = ew_RemoveHtml($this->Numero_Identificacion->FldCaption());

			// Edad
			$this->Edad->EditAttrs["class"] = "form-control";
			$this->Edad->EditCustomAttributes = "";
			$this->Edad->EditValue = ew_HtmlEncode($this->Edad->CurrentValue);
			$this->Edad->PlaceHolder = ew_RemoveHtml($this->Edad->FldCaption());

			// Unidad_Edad
			$this->Unidad_Edad->EditAttrs["class"] = "form-control";
			$this->Unidad_Edad->EditCustomAttributes = "";
			if (trim(strval($this->Unidad_Edad->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Unidad_Edad->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Unidad_Edad` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `unidad_medida_edad`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Unidad_Edad, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Unidad_Edad->EditValue = $arwrk;

			// Sexo
			$this->Sexo->EditAttrs["class"] = "form-control";
			$this->Sexo->EditCustomAttributes = "";
			if (trim(strval($this->Sexo->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Codigo_Sexo`" . ew_SearchString("=", $this->Sexo->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Codigo_Sexo`, `Sexo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `sexo`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Sexo, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Sexo->EditValue = $arwrk;

			// Pais_Ocurrencia
			$this->Pais_Ocurrencia->EditAttrs["class"] = "form-control";
			$this->Pais_Ocurrencia->EditCustomAttributes = "";
			if (trim(strval($this->Pais_Ocurrencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Pais`" . ew_SearchString("=", $this->Pais_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Pais`, `Pais` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `pais`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Pais_Ocurrencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Pais_Ocurrencia->EditValue = $arwrk;

			// Depto_Ocurrencia
			$this->Depto_Ocurrencia->EditAttrs["class"] = "form-control";
			$this->Depto_Ocurrencia->EditCustomAttributes = "";
			if (trim(strval($this->Depto_Ocurrencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Departamento`" . ew_SearchString("=", $this->Depto_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `departamento`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Depto_Ocurrencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Depto_Ocurrencia->EditValue = $arwrk;

			// Municipio_Ocurrencia
			$this->Municipio_Ocurrencia->EditAttrs["class"] = "form-control";
			$this->Municipio_Ocurrencia->EditCustomAttributes = "";
			if (trim(strval($this->Municipio_Ocurrencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Municipio`" . ew_SearchString("=", $this->Municipio_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `municipio`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Municipio_Ocurrencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Municipio_Ocurrencia->EditValue = $arwrk;

			// Area_Ocurrencia
			$this->Area_Ocurrencia->EditAttrs["class"] = "form-control";
			$this->Area_Ocurrencia->EditCustomAttributes = "";
			if (trim(strval($this->Area_Ocurrencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Area_Ocurrencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Area_Ocurrencia` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `area_ocurrencia`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Area_Ocurrencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Area_Ocurrencia->EditValue = $arwrk;

			// Localidad
			$this->Localidad->EditAttrs["class"] = "form-control";
			$this->Localidad->EditCustomAttributes = "";
			if (trim(strval($this->Localidad->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`consecutivo`" . ew_SearchString("=", $this->Localidad->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `localidad`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Localidad, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Localidad->EditValue = $arwrk;

			// Barrio
			$this->Barrio->EditAttrs["class"] = "form-control";
			$this->Barrio->EditCustomAttributes = "";
			if (trim(strval($this->Barrio->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`cod_barrio_vereda`" . ew_SearchString("=", $this->Barrio->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `barrios_veredas`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Barrio, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Barrio->EditValue = $arwrk;

			// Direccion_Residencia
			$this->Direccion_Residencia->EditAttrs["class"] = "form-control";
			$this->Direccion_Residencia->EditCustomAttributes = "";
			$this->Direccion_Residencia->EditValue = ew_HtmlEncode($this->Direccion_Residencia->CurrentValue);
			$this->Direccion_Residencia->PlaceHolder = ew_RemoveHtml($this->Direccion_Residencia->FldCaption());

			// Ocupacion
			$this->Ocupacion->EditAttrs["class"] = "form-control";
			$this->Ocupacion->EditCustomAttributes = "";
			if (trim(strval($this->Ocupacion->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Ocupacion`" . ew_SearchString("=", $this->Ocupacion->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Ocupacion`, `Cod_Ocupacion` AS `DispFld`, `Ocupacion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `ocupacion`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Ocupacion, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Ocupacion->EditValue = $arwrk;

			// Tipo_Regimen_Salud
			$this->Tipo_Regimen_Salud->EditAttrs["class"] = "form-control";
			$this->Tipo_Regimen_Salud->EditCustomAttributes = "";
			if (trim(strval($this->Tipo_Regimen_Salud->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Codigo_Regimen`" . ew_SearchString("=", $this->Tipo_Regimen_Salud->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Codigo_Regimen`, `Codigo_Regimen` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_regimen_salud`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tipo_Regimen_Salud, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Tipo_Regimen_Salud->EditValue = $arwrk;

			// Cod_Administradora
			$this->Cod_Administradora->EditAttrs["class"] = "form-control";
			$this->Cod_Administradora->EditCustomAttributes = "";
			if (trim(strval($this->Cod_Administradora->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Codigo`" . ew_SearchString("=", $this->Cod_Administradora->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Codigo`, `Codigo` AS `DispFld`, `Administradora_Salud` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `administradora_salud`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Cod_Administradora, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Cod_Administradora->EditValue = $arwrk;

			// gp_discapa
			$this->gp_discapa->EditCustomAttributes = "";
			if (trim(strval($this->gp_discapa->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_discapa->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_discapa, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_discapa->EditValue = $arwrk;

			// gp_desplaz
			$this->gp_desplaz->EditCustomAttributes = "";
			if (trim(strval($this->gp_desplaz->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_desplaz->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_desplaz, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_desplaz->EditValue = $arwrk;

			// gp_migrant
			$this->gp_migrant->EditCustomAttributes = "";
			if (trim(strval($this->gp_migrant->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_migrant->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_migrant, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_migrant->EditValue = $arwrk;

			// gp_carcela
			$this->gp_carcela->EditCustomAttributes = "";
			if (trim(strval($this->gp_carcela->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_carcela->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_carcela, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_carcela->EditValue = $arwrk;

			// gp_gestan
			$this->gp_gestan->EditCustomAttributes = "";
			if (trim(strval($this->gp_gestan->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_gestan->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_gestan, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_gestan->EditValue = $arwrk;

			// gp_indigen
			$this->gp_indigen->EditCustomAttributes = "";
			if (trim(strval($this->gp_indigen->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_indigen->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_indigen, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_indigen->EditValue = $arwrk;

			// gp_pobicbf
			$this->gp_pobicbf->EditCustomAttributes = "";
			if (trim(strval($this->gp_pobicbf->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_pobicbf->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_pobicbf, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_pobicbf->EditValue = $arwrk;

			// gp_mad_com
			$this->gp_mad_com->EditCustomAttributes = "";
			if (trim(strval($this->gp_mad_com->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_mad_com->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_mad_com, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_mad_com->EditValue = $arwrk;

			// gp_desmovi
			$this->gp_desmovi->EditCustomAttributes = "";
			if (trim(strval($this->gp_desmovi->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_desmovi->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_desmovi, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_desmovi->EditValue = $arwrk;

			// gp_psiquia
			$this->gp_psiquia->EditCustomAttributes = "";
			if (trim(strval($this->gp_psiquia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_psiquia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_psiquia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_psiquia->EditValue = $arwrk;

			// gp_vic_vio
			$this->gp_vic_vio->EditCustomAttributes = "";
			if (trim(strval($this->gp_vic_vio->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_vic_vio->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_vic_vio, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_vic_vio->EditValue = $arwrk;

			// gp_otros
			$this->gp_otros->EditCustomAttributes = "";
			if (trim(strval($this->gp_otros->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->gp_otros->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->gp_otros, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->gp_otros->EditValue = $arwrk;

			// Depto_Residencia
			$this->Depto_Residencia->EditAttrs["class"] = "form-control";
			$this->Depto_Residencia->EditCustomAttributes = "";
			if (trim(strval($this->Depto_Residencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Departamento`" . ew_SearchString("=", $this->Depto_Residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `departamento`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Depto_Residencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Depto_Residencia->EditValue = $arwrk;

			// Municipio_Residencia
			$this->Municipio_Residencia->EditAttrs["class"] = "form-control";
			$this->Municipio_Residencia->EditCustomAttributes = "";
			if (trim(strval($this->Municipio_Residencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Municipio`" . ew_SearchString("=", $this->Municipio_Residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `municipio`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Municipio_Residencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Municipio_Residencia->EditValue = $arwrk;

			// Fecha_Consulta
			$this->Fecha_Consulta->EditAttrs["class"] = "form-control";
			$this->Fecha_Consulta->EditCustomAttributes = "";
			$this->Fecha_Consulta->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Consulta->CurrentValue, 5));
			$this->Fecha_Consulta->PlaceHolder = ew_RemoveHtml($this->Fecha_Consulta->FldCaption());

			// Fecha_Inicio_Sintomas
			$this->Fecha_Inicio_Sintomas->EditAttrs["class"] = "form-control";
			$this->Fecha_Inicio_Sintomas->EditCustomAttributes = "";
			$this->Fecha_Inicio_Sintomas->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Inicio_Sintomas->CurrentValue, 5));
			$this->Fecha_Inicio_Sintomas->PlaceHolder = ew_RemoveHtml($this->Fecha_Inicio_Sintomas->FldCaption());

			// Hospitalizado
			$this->Hospitalizado->EditCustomAttributes = "";
			if (trim(strval($this->Hospitalizado->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$arwrk = explode(",", $this->Hospitalizado->CurrentValue);
				$sFilterWrk = "";
				foreach ($arwrk as $wrk) {
					if ($sFilterWrk <> "") $sFilterWrk .= " OR ";
					$sFilterWrk .= "`Consecutivo`" . ew_SearchString("=", trim($wrk), EW_DATATYPE_NUMBER, "");
				}
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Hospitalizado, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Hospitalizado->EditValue = $arwrk;

			// Fecha_Defuncion
			$this->Fecha_Defuncion->EditAttrs["class"] = "form-control";
			$this->Fecha_Defuncion->EditCustomAttributes = "";
			$this->Fecha_Defuncion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Defuncion->CurrentValue, 5));
			$this->Fecha_Defuncion->PlaceHolder = ew_RemoveHtml($this->Fecha_Defuncion->FldCaption());

			// Numero_Certificado_Defuncion
			$this->Numero_Certificado_Defuncion->EditAttrs["class"] = "form-control";
			$this->Numero_Certificado_Defuncion->EditCustomAttributes = "";
			$this->Numero_Certificado_Defuncion->EditValue = ew_HtmlEncode($this->Numero_Certificado_Defuncion->CurrentValue);
			$this->Numero_Certificado_Defuncion->PlaceHolder = ew_RemoveHtml($this->Numero_Certificado_Defuncion->FldCaption());

			// Causa_Basica_Muerte_CIEX
			$this->Causa_Basica_Muerte_CIEX->EditAttrs["class"] = "form-control";
			$this->Causa_Basica_Muerte_CIEX->EditCustomAttributes = "";
			$this->Causa_Basica_Muerte_CIEX->EditValue = ew_HtmlEncode($this->Causa_Basica_Muerte_CIEX->CurrentValue);
			$this->Causa_Basica_Muerte_CIEX->PlaceHolder = ew_RemoveHtml($this->Causa_Basica_Muerte_CIEX->FldCaption());

			// Entidad_fallecimiento
			$this->Entidad_fallecimiento->EditAttrs["class"] = "form-control";
			$this->Entidad_fallecimiento->EditCustomAttributes = "";
			$this->Entidad_fallecimiento->EditValue = ew_HtmlEncode($this->Entidad_fallecimiento->CurrentValue);
			if (strval($this->Entidad_fallecimiento->CurrentValue) <> "") {
				$sFilterWrk = "`Codigo_Upgd`" . ew_SearchString("=", $this->Entidad_fallecimiento->CurrentValue, EW_DATATYPE_STRING, "");
			$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Entidad_fallecimiento, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = Conn()->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$arwrk = array();
					$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));
					$arwrk[2] = ew_HtmlEncode($rswrk->fields('Disp2Fld'));
					$this->Entidad_fallecimiento->EditValue = $this->Entidad_fallecimiento->DisplayValue($arwrk);
					$rswrk->Close();
				} else {
					$this->Entidad_fallecimiento->EditValue = ew_HtmlEncode($this->Entidad_fallecimiento->CurrentValue);
				}
			} else {
				$this->Entidad_fallecimiento->EditValue = NULL;
			}
			$this->Entidad_fallecimiento->PlaceHolder = ew_RemoveHtml($this->Entidad_fallecimiento->FldCaption());

			// Telefono
			$this->Telefono->EditAttrs["class"] = "form-control";
			$this->Telefono->EditCustomAttributes = "";
			$this->Telefono->EditValue = ew_HtmlEncode($this->Telefono->CurrentValue);
			$this->Telefono->PlaceHolder = ew_RemoveHtml($this->Telefono->FldCaption());

			// Fecha_Nacimiento
			$this->Fecha_Nacimiento->EditAttrs["class"] = "form-control";
			$this->Fecha_Nacimiento->EditCustomAttributes = "";
			$this->Fecha_Nacimiento->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Nacimiento->CurrentValue, 5));
			$this->Fecha_Nacimiento->PlaceHolder = ew_RemoveHtml($this->Fecha_Nacimiento->FldCaption());

			// Nombre_Profesional_Diligencia
			$this->Nombre_Profesional_Diligencia->EditAttrs["class"] = "form-control";
			$this->Nombre_Profesional_Diligencia->EditCustomAttributes = "";
			$this->Nombre_Profesional_Diligencia->EditValue = ew_HtmlEncode($this->Nombre_Profesional_Diligencia->CurrentValue);
			$this->Nombre_Profesional_Diligencia->PlaceHolder = ew_RemoveHtml($this->Nombre_Profesional_Diligencia->FldCaption());

			// Telefono_Profesional_Diligencia
			$this->Telefono_Profesional_Diligencia->EditAttrs["class"] = "form-control";
			$this->Telefono_Profesional_Diligencia->EditCustomAttributes = "";
			$this->Telefono_Profesional_Diligencia->EditValue = ew_HtmlEncode($this->Telefono_Profesional_Diligencia->CurrentValue);
			$this->Telefono_Profesional_Diligencia->PlaceHolder = ew_RemoveHtml($this->Telefono_Profesional_Diligencia->FldCaption());

			// Mecanismo_Probable_Transmision
			$this->Mecanismo_Probable_Transmision->EditAttrs["class"] = "form-control";
			$this->Mecanismo_Probable_Transmision->EditCustomAttributes = "";
			if (trim(strval($this->Mecanismo_Probable_Transmision->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Mecanismo_Probable_Transmision->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Mecanismo_Probable` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `mecanismo_probable_transmision`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Mecanismo_Probable_Transmision, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Mecanismo_Probable_Transmision->EditValue = $arwrk;

			// Nombre_Madre
			$this->Nombre_Madre->EditAttrs["class"] = "form-control";
			$this->Nombre_Madre->EditCustomAttributes = "";
			$this->Nombre_Madre->EditValue = ew_HtmlEncode($this->Nombre_Madre->CurrentValue);
			$this->Nombre_Madre->PlaceHolder = ew_RemoveHtml($this->Nombre_Madre->FldCaption());

			// Tipo_Id_Madre
			$this->Tipo_Id_Madre->EditAttrs["class"] = "form-control";
			$this->Tipo_Id_Madre->EditCustomAttributes = "";
			if (trim(strval($this->Tipo_Id_Madre->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Cod_Documento`" . ew_SearchString("=", $this->Tipo_Id_Madre->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_documento`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tipo_Id_Madre, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Tipo_Id_Madre->EditValue = $arwrk;

			// Numero_Identificacion_Madre
			$this->Numero_Identificacion_Madre->EditAttrs["class"] = "form-control";
			$this->Numero_Identificacion_Madre->EditCustomAttributes = "";
			$this->Numero_Identificacion_Madre->EditValue = ew_HtmlEncode($this->Numero_Identificacion_Madre->CurrentValue);
			$this->Numero_Identificacion_Madre->PlaceHolder = ew_RemoveHtml($this->Numero_Identificacion_Madre->FldCaption());

			// Indentidad_Genero
			$this->Indentidad_Genero->EditAttrs["class"] = "form-control";
			$this->Indentidad_Genero->EditCustomAttributes = "";
			if (trim(strval($this->Indentidad_Genero->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Codigo_identidad`" . ew_SearchString("=", $this->Indentidad_Genero->CurrentValue, EW_DATATYPE_STRING, "");
			}
			$sSqlWrk = "SELECT `Codigo_identidad`, `Identidad_genero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `identidad_genero`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Indentidad_Genero, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Indentidad_Genero->EditValue = $arwrk;

			// Donador_Sangre_Ultimos_12_Meses
			$this->Donador_Sangre_Ultimos_12_Meses->EditCustomAttributes = "";
			if (trim(strval($this->Donador_Sangre_Ultimos_12_Meses->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Donador_Sangre_Ultimos_12_Meses->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Donador_Sangre_Ultimos_12_Meses, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Donador_Sangre_Ultimos_12_Meses->EditValue = $arwrk;

			// Fecha_Donacion
			$this->Fecha_Donacion->EditAttrs["class"] = "form-control";
			$this->Fecha_Donacion->EditCustomAttributes = "";
			$this->Fecha_Donacion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Donacion->CurrentValue, 5));
			$this->Fecha_Donacion->PlaceHolder = ew_RemoveHtml($this->Fecha_Donacion->FldCaption());

			// Nombre_Institucion_Donacion
			$this->Nombre_Institucion_Donacion->EditAttrs["class"] = "form-control";
			$this->Nombre_Institucion_Donacion->EditCustomAttributes = "";
			$this->Nombre_Institucion_Donacion->EditValue = ew_HtmlEncode($this->Nombre_Institucion_Donacion->CurrentValue);
			$this->Nombre_Institucion_Donacion->PlaceHolder = ew_RemoveHtml($this->Nombre_Institucion_Donacion->FldCaption());

			// Poblacion_clave
			$this->Poblacion_clave->EditCustomAttributes = "";
			if (trim(strval($this->Poblacion_clave->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Id`" . ew_SearchString("=", $this->Poblacion_clave->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Id`, `Poblacion_clave` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `poblacion_clave`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Poblacion_clave, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Poblacion_clave->EditValue = $arwrk;

			// Recibio_Asesoria_Pre_Prueba
			$this->Recibio_Asesoria_Pre_Prueba->EditAttrs["class"] = "form-control";
			$this->Recibio_Asesoria_Pre_Prueba->EditCustomAttributes = "";
			if (trim(strval($this->Recibio_Asesoria_Pre_Prueba->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Recibio_Asesoria_Pre_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Recibio_Asesoria_Pre_Prueba, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Recibio_Asesoria_Pre_Prueba->EditValue = $arwrk;

			// Recibio_Asesoria_Post_Prueba
			$this->Recibio_Asesoria_Post_Prueba->EditAttrs["class"] = "form-control";
			$this->Recibio_Asesoria_Post_Prueba->EditCustomAttributes = "";
			if (trim(strval($this->Recibio_Asesoria_Post_Prueba->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Recibio_Asesoria_Post_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Recibio_Asesoria_Post_Prueba, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Recibio_Asesoria_Post_Prueba->EditValue = $arwrk;

			// Tipo_Prueba
			$this->Tipo_Prueba->EditAttrs["class"] = "form-control";
			$this->Tipo_Prueba->EditCustomAttributes = "";
			if (trim(strval($this->Tipo_Prueba->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tipo_Prueba->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Tipo_Prueba` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_prueba`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tipo_Prueba, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Tipo_Prueba->EditValue = $arwrk;

			// Fecha_Resultado_Confirmatorio
			$this->Fecha_Resultado_Confirmatorio->EditAttrs["class"] = "form-control";
			$this->Fecha_Resultado_Confirmatorio->EditCustomAttributes = "";
			$this->Fecha_Resultado_Confirmatorio->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Fecha_Resultado_Confirmatorio->CurrentValue, 5));
			$this->Fecha_Resultado_Confirmatorio->PlaceHolder = ew_RemoveHtml($this->Fecha_Resultado_Confirmatorio->FldCaption());

			// Valor_Carga_Viral
			$this->Valor_Carga_Viral->EditAttrs["class"] = "form-control";
			$this->Valor_Carga_Viral->EditCustomAttributes = "";
			$this->Valor_Carga_Viral->EditValue = ew_HtmlEncode($this->Valor_Carga_Viral->CurrentValue);
			$this->Valor_Carga_Viral->PlaceHolder = ew_RemoveHtml($this->Valor_Carga_Viral->FldCaption());

			// Estado_Clinico_Notificacion
			$this->Estado_Clinico_Notificacion->EditAttrs["class"] = "form-control";
			$this->Estado_Clinico_Notificacion->EditCustomAttributes = "";
			if (trim(strval($this->Estado_Clinico_Notificacion->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Estado_Clinico_Notificacion->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Estado_Clinico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `estado_clinico_paciente`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Estado_Clinico_Notificacion, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Estado_Clinico_Notificacion->EditValue = $arwrk;

			// Hijos_Mujeres_Menores_5
			$this->Hijos_Mujeres_Menores_5->EditAttrs["class"] = "form-control";
			$this->Hijos_Mujeres_Menores_5->EditCustomAttributes = "";
			$this->Hijos_Mujeres_Menores_5->EditValue = ew_HtmlEncode($this->Hijos_Mujeres_Menores_5->CurrentValue);
			$this->Hijos_Mujeres_Menores_5->PlaceHolder = ew_RemoveHtml($this->Hijos_Mujeres_Menores_5->FldCaption());

			// Hijos_Hombres_Menores_5
			$this->Hijos_Hombres_Menores_5->EditAttrs["class"] = "form-control";
			$this->Hijos_Hombres_Menores_5->EditCustomAttributes = "";
			$this->Hijos_Hombres_Menores_5->EditValue = ew_HtmlEncode($this->Hijos_Hombres_Menores_5->CurrentValue);
			$this->Hijos_Hombres_Menores_5->PlaceHolder = ew_RemoveHtml($this->Hijos_Hombres_Menores_5->FldCaption());

			// Numero_Semanas_Embarazo
			$this->Numero_Semanas_Embarazo->EditAttrs["class"] = "form-control";
			$this->Numero_Semanas_Embarazo->EditCustomAttributes = "";
			$this->Numero_Semanas_Embarazo->EditValue = ew_HtmlEncode($this->Numero_Semanas_Embarazo->CurrentValue);
			$this->Numero_Semanas_Embarazo->PlaceHolder = ew_RemoveHtml($this->Numero_Semanas_Embarazo->FldCaption());

			// Antecedentes_Embarazo
			$this->Antecedentes_Embarazo->EditCustomAttributes = "";
			if (trim(strval($this->Antecedentes_Embarazo->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Antecedentes_Embarazo->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Antecedentes_Embarazo, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Antecedentes_Embarazo->EditValue = $arwrk;

			// Candidiasis_esofagica
			$this->Candidiasis_esofagica->EditCustomAttributes = "";
			if (trim(strval($this->Candidiasis_esofagica->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Candidiasis_esofagica->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Candidiasis_esofagica, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Candidiasis_esofagica->EditValue = $arwrk;

			// Candidiasis_vias_aereas
			$this->Candidiasis_vias_aereas->EditCustomAttributes = "";
			if (trim(strval($this->Candidiasis_vias_aereas->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Candidiasis_vias_aereas->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Candidiasis_vias_aereas, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Candidiasis_vias_aereas->EditValue = $arwrk;

			// Tuberculosis_pulmonar
			$this->Tuberculosis_pulmonar->EditCustomAttributes = "";
			if (trim(strval($this->Tuberculosis_pulmonar->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tuberculosis_pulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tuberculosis_pulmonar, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Tuberculosis_pulmonar->EditValue = $arwrk;

			// Cancer_cervical
			$this->Cancer_cervical->EditCustomAttributes = "";
			if (trim(strval($this->Cancer_cervical->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Cancer_cervical->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Cancer_cervical, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Cancer_cervical->EditValue = $arwrk;

			// Tuberculosis_extrapulmonar
			$this->Tuberculosis_extrapulmonar->EditCustomAttributes = "";
			if (trim(strval($this->Tuberculosis_extrapulmonar->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Tuberculosis_extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Tuberculosis_extrapulmonar, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Tuberculosis_extrapulmonar->EditValue = $arwrk;

			// Coccidiomicosis
			$this->Coccidiomicosis->EditCustomAttributes = "";
			if (trim(strval($this->Coccidiomicosis->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Coccidiomicosis->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Coccidiomicosis, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Coccidiomicosis->EditValue = $arwrk;

			// Citomegalovirosis
			$this->Citomegalovirosis->EditCustomAttributes = "";
			if (trim(strval($this->Citomegalovirosis->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Citomegalovirosis->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Citomegalovirosis, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Citomegalovirosis->EditValue = $arwrk;

			// Retinitis_citomegalovirosis
			$this->Retinitis_citomegalovirosis->EditCustomAttributes = "";
			if (trim(strval($this->Retinitis_citomegalovirosis->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Retinitis_citomegalovirosis->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Retinitis_citomegalovirosis, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Retinitis_citomegalovirosis->EditValue = $arwrk;

			// Sindrome_Emanciacion
			$this->Sindrome_Emanciacion->EditCustomAttributes = "";
			if (trim(strval($this->Sindrome_Emanciacion->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Sindrome_Emanciacion->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Sindrome_Emanciacion, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Sindrome_Emanciacion->EditValue = $arwrk;

			// Encefalopatia
			$this->Encefalopatia->EditCustomAttributes = "";
			if (trim(strval($this->Encefalopatia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Encefalopatia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Encefalopatia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Encefalopatia->EditValue = $arwrk;

			// Otras_micobacterias
			$this->Otras_micobacterias->EditCustomAttributes = "";
			if (trim(strval($this->Otras_micobacterias->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Otras_micobacterias->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Otras_micobacterias, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Otras_micobacterias->EditValue = $arwrk;

			// Histoplasmosis_Extrapulmonar
			$this->Histoplasmosis_Extrapulmonar->EditCustomAttributes = "";
			if (trim(strval($this->Histoplasmosis_Extrapulmonar->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Histoplasmosis_Extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Histoplasmosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Histoplasmosis_Extrapulmonar->EditValue = $arwrk;

			// isosporidiasis_cronica
			$this->isosporidiasis_cronica->EditCustomAttributes = "";
			if (trim(strval($this->isosporidiasis_cronica->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->isosporidiasis_cronica->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->isosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->isosporidiasis_cronica->EditValue = $arwrk;

			// herpes_zoster
			$this->herpes_zoster->EditCustomAttributes = "";
			if (trim(strval($this->herpes_zoster->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->herpes_zoster->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->herpes_zoster, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->herpes_zoster->EditValue = $arwrk;

			// Histoplasmosis_diseminada
			$this->Histoplasmosis_diseminada->EditCustomAttributes = "";
			if (trim(strval($this->Histoplasmosis_diseminada->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Histoplasmosis_diseminada->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Histoplasmosis_diseminada, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Histoplasmosis_diseminada->EditValue = $arwrk;

			// Linfoma_Burkitt
			$this->Linfoma_Burkitt->EditCustomAttributes = "";
			if (trim(strval($this->Linfoma_Burkitt->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Linfoma_Burkitt->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Linfoma_Burkitt, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Linfoma_Burkitt->EditValue = $arwrk;

			// Neumonia_Pneumocystis
			$this->Neumonia_Pneumocystis->EditCustomAttributes = "";
			if (trim(strval($this->Neumonia_Pneumocystis->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Neumonia_Pneumocystis->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Neumonia_Pneumocystis, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Neumonia_Pneumocystis->EditValue = $arwrk;

			// Neumonia_Recurrente
			$this->Neumonia_Recurrente->EditCustomAttributes = "";
			if (trim(strval($this->Neumonia_Recurrente->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Neumonia_Recurrente->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Neumonia_Recurrente, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Neumonia_Recurrente->EditValue = $arwrk;

			// Linfoma_Inmunoblastico
			$this->Linfoma_Inmunoblastico->EditCustomAttributes = "";
			if (trim(strval($this->Linfoma_Inmunoblastico->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Linfoma_Inmunoblastico->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Linfoma_Inmunoblastico, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Linfoma_Inmunoblastico->EditValue = $arwrk;

			// Criptosporidiasis_cronica
			$this->Criptosporidiasis_cronica->EditCustomAttributes = "";
			if (trim(strval($this->Criptosporidiasis_cronica->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Criptosporidiasis_cronica->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Criptosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Criptosporidiasis_cronica->EditValue = $arwrk;

			// Criptococosis_Extrapulmonar
			$this->Criptococosis_Extrapulmonar->EditCustomAttributes = "";
			if (trim(strval($this->Criptococosis_Extrapulmonar->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Criptococosis_Extrapulmonar->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Criptococosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Criptococosis_Extrapulmonar->EditValue = $arwrk;

			// Sarcoma_Kaposi
			$this->Sarcoma_Kaposi->EditCustomAttributes = "";
			if (trim(strval($this->Sarcoma_Kaposi->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Sarcoma_Kaposi->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Sarcoma_Kaposi, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Sarcoma_Kaposi->EditValue = $arwrk;

			// Leucoencefalopatia_Multifocal
			$this->Leucoencefalopatia_Multifocal->EditCustomAttributes = "";
			if (trim(strval($this->Leucoencefalopatia_Multifocal->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Leucoencefalopatia_Multifocal->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Leucoencefalopatia_Multifocal, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Leucoencefalopatia_Multifocal->EditValue = $arwrk;

			// Septicemia_recurrente
			$this->Septicemia_recurrente->EditCustomAttributes = "";
			if (trim(strval($this->Septicemia_recurrente->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Septicemia_recurrente->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Septicemia_recurrente, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Septicemia_recurrente->EditValue = $arwrk;

			// Toxoplasmosis_cerebral
			$this->Toxoplasmosis_cerebral->EditCustomAttributes = "";
			if (trim(strval($this->Toxoplasmosis_cerebral->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Toxoplasmosis_cerebral->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Toxoplasmosis_cerebral, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Toxoplasmosis_cerebral->EditValue = $arwrk;

			// HepatitisB
			$this->HepatitisB->EditCustomAttributes = "";
			if (trim(strval($this->HepatitisB->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->HepatitisB->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->HepatitisB, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->HepatitisB->EditValue = $arwrk;

			// HepatitisC
			$this->HepatitisC->EditCustomAttributes = "";
			if (trim(strval($this->HepatitisC->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->HepatitisC->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->HepatitisC, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->HepatitisC->EditValue = $arwrk;

			// Meningitis
			$this->Meningitis->EditCustomAttributes = "";
			if (trim(strval($this->Meningitis->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->Meningitis->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Meningitis, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->Meningitis->EditValue = $arwrk;

			// RecuentoCD4
			$this->RecuentoCD4->EditCustomAttributes = "";
			if (trim(strval($this->RecuentoCD4->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`Consecutivo`" . ew_SearchString("=", $this->RecuentoCD4->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `si_no`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->RecuentoCD4, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			$this->RecuentoCD4->EditValue = $arwrk;

			// Localidad_residencia
			$this->Localidad_residencia->EditAttrs["class"] = "form-control";
			$this->Localidad_residencia->EditCustomAttributes = "";
			if (trim(strval($this->Localidad_residencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`consecutivo`" . ew_SearchString("=", $this->Localidad_residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `localidad`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Localidad_residencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Localidad_residencia->EditValue = $arwrk;

			// Barrio_residencia
			$this->Barrio_residencia->EditAttrs["class"] = "form-control";
			$this->Barrio_residencia->EditCustomAttributes = "";
			if (trim(strval($this->Barrio_residencia->CurrentValue)) == "") {
				$sFilterWrk = "0=1";
			} else {
				$sFilterWrk = "`cod_barrio_vereda`" . ew_SearchString("=", $this->Barrio_residencia->CurrentValue, EW_DATATYPE_NUMBER, "");
			}
			$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `barrios_veredas`";
			$sWhereWrk = "";
			ew_AddFilter($sWhereWrk, $sFilterWrk);
			$this->Lookup_Selecting($this->Barrio_residencia, $sWhereWrk); // Call Lookup selecting
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$rswrk = Conn()->Execute($sSqlWrk);
			$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
			if ($rswrk) $rswrk->Close();
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
			$this->Barrio_residencia->EditValue = $arwrk;

			// Fecha_ingreso_app
			// Actualizado_por
			// Fecha_actualizacion_app
			// Edit refer script
			// Consecutivo

			$this->Consecutivo->LinkCustomAttributes = "";
			$this->Consecutivo->HrefValue = "";

			// Seguimiento
			$this->Seguimiento->LinkCustomAttributes = "";
			$this->Seguimiento->HrefValue = "";

			// Condicion_Final
			$this->Condicion_Final->LinkCustomAttributes = "";
			$this->Condicion_Final->HrefValue = "";

			// Codigo_centro
			$this->Codigo_centro->LinkCustomAttributes = "";
			$this->Codigo_centro->HrefValue = "";

			// Codigo_UPGD
			$this->Codigo_UPGD->LinkCustomAttributes = "";
			$this->Codigo_UPGD->HrefValue = "";

			// Cod_Evento
			$this->Cod_Evento->LinkCustomAttributes = "";
			$this->Cod_Evento->HrefValue = "";

			// Embarazo_Actual
			$this->Embarazo_Actual->LinkCustomAttributes = "";
			$this->Embarazo_Actual->HrefValue = "";

			// Fecha_Notificacion
			$this->Fecha_Notificacion->LinkCustomAttributes = "";
			$this->Fecha_Notificacion->HrefValue = "";

			// Semana
			$this->Semana->LinkCustomAttributes = "";
			$this->Semana->HrefValue = "";

			// Periodo_Epidemiologico
			$this->Periodo_Epidemiologico->LinkCustomAttributes = "";
			$this->Periodo_Epidemiologico->HrefValue = "";

			// Periodo_Sivigila
			$this->Periodo_Sivigila->LinkCustomAttributes = "";
			$this->Periodo_Sivigila->HrefValue = "";

			// Primer_Nombre
			$this->Primer_Nombre->LinkCustomAttributes = "";
			$this->Primer_Nombre->HrefValue = "";

			// Segundo_Nombre
			$this->Segundo_Nombre->LinkCustomAttributes = "";
			$this->Segundo_Nombre->HrefValue = "";

			// Primer_Apellido
			$this->Primer_Apellido->LinkCustomAttributes = "";
			$this->Primer_Apellido->HrefValue = "";

			// Segundo_Apellido
			$this->Segundo_Apellido->LinkCustomAttributes = "";
			$this->Segundo_Apellido->HrefValue = "";

			// Tipo_Id
			$this->Tipo_Id->LinkCustomAttributes = "";
			$this->Tipo_Id->HrefValue = "";

			// Numero_Identificacion
			$this->Numero_Identificacion->LinkCustomAttributes = "";
			$this->Numero_Identificacion->HrefValue = "";

			// Edad
			$this->Edad->LinkCustomAttributes = "";
			$this->Edad->HrefValue = "";

			// Unidad_Edad
			$this->Unidad_Edad->LinkCustomAttributes = "";
			$this->Unidad_Edad->HrefValue = "";

			// Sexo
			$this->Sexo->LinkCustomAttributes = "";
			$this->Sexo->HrefValue = "";

			// Pais_Ocurrencia
			$this->Pais_Ocurrencia->LinkCustomAttributes = "";
			$this->Pais_Ocurrencia->HrefValue = "";

			// Depto_Ocurrencia
			$this->Depto_Ocurrencia->LinkCustomAttributes = "";
			$this->Depto_Ocurrencia->HrefValue = "";

			// Municipio_Ocurrencia
			$this->Municipio_Ocurrencia->LinkCustomAttributes = "";
			$this->Municipio_Ocurrencia->HrefValue = "";

			// Area_Ocurrencia
			$this->Area_Ocurrencia->LinkCustomAttributes = "";
			$this->Area_Ocurrencia->HrefValue = "";

			// Localidad
			$this->Localidad->LinkCustomAttributes = "";
			$this->Localidad->HrefValue = "";

			// Barrio
			$this->Barrio->LinkCustomAttributes = "";
			$this->Barrio->HrefValue = "";

			// Direccion_Residencia
			$this->Direccion_Residencia->LinkCustomAttributes = "";
			$this->Direccion_Residencia->HrefValue = "";

			// Ocupacion
			$this->Ocupacion->LinkCustomAttributes = "";
			$this->Ocupacion->HrefValue = "";

			// Tipo_Regimen_Salud
			$this->Tipo_Regimen_Salud->LinkCustomAttributes = "";
			$this->Tipo_Regimen_Salud->HrefValue = "";

			// Cod_Administradora
			$this->Cod_Administradora->LinkCustomAttributes = "";
			$this->Cod_Administradora->HrefValue = "";

			// gp_discapa
			$this->gp_discapa->LinkCustomAttributes = "";
			$this->gp_discapa->HrefValue = "";

			// gp_desplaz
			$this->gp_desplaz->LinkCustomAttributes = "";
			$this->gp_desplaz->HrefValue = "";

			// gp_migrant
			$this->gp_migrant->LinkCustomAttributes = "";
			$this->gp_migrant->HrefValue = "";

			// gp_carcela
			$this->gp_carcela->LinkCustomAttributes = "";
			$this->gp_carcela->HrefValue = "";

			// gp_gestan
			$this->gp_gestan->LinkCustomAttributes = "";
			$this->gp_gestan->HrefValue = "";

			// gp_indigen
			$this->gp_indigen->LinkCustomAttributes = "";
			$this->gp_indigen->HrefValue = "";

			// gp_pobicbf
			$this->gp_pobicbf->LinkCustomAttributes = "";
			$this->gp_pobicbf->HrefValue = "";

			// gp_mad_com
			$this->gp_mad_com->LinkCustomAttributes = "";
			$this->gp_mad_com->HrefValue = "";

			// gp_desmovi
			$this->gp_desmovi->LinkCustomAttributes = "";
			$this->gp_desmovi->HrefValue = "";

			// gp_psiquia
			$this->gp_psiquia->LinkCustomAttributes = "";
			$this->gp_psiquia->HrefValue = "";

			// gp_vic_vio
			$this->gp_vic_vio->LinkCustomAttributes = "";
			$this->gp_vic_vio->HrefValue = "";

			// gp_otros
			$this->gp_otros->LinkCustomAttributes = "";
			$this->gp_otros->HrefValue = "";

			// Depto_Residencia
			$this->Depto_Residencia->LinkCustomAttributes = "";
			$this->Depto_Residencia->HrefValue = "";

			// Municipio_Residencia
			$this->Municipio_Residencia->LinkCustomAttributes = "";
			$this->Municipio_Residencia->HrefValue = "";

			// Fecha_Consulta
			$this->Fecha_Consulta->LinkCustomAttributes = "";
			$this->Fecha_Consulta->HrefValue = "";

			// Fecha_Inicio_Sintomas
			$this->Fecha_Inicio_Sintomas->LinkCustomAttributes = "";
			$this->Fecha_Inicio_Sintomas->HrefValue = "";

			// Hospitalizado
			$this->Hospitalizado->LinkCustomAttributes = "";
			$this->Hospitalizado->HrefValue = "";

			// Fecha_Defuncion
			$this->Fecha_Defuncion->LinkCustomAttributes = "";
			$this->Fecha_Defuncion->HrefValue = "";

			// Numero_Certificado_Defuncion
			$this->Numero_Certificado_Defuncion->LinkCustomAttributes = "";
			$this->Numero_Certificado_Defuncion->HrefValue = "";

			// Causa_Basica_Muerte_CIEX
			$this->Causa_Basica_Muerte_CIEX->LinkCustomAttributes = "";
			$this->Causa_Basica_Muerte_CIEX->HrefValue = "";

			// Entidad_fallecimiento
			$this->Entidad_fallecimiento->LinkCustomAttributes = "";
			$this->Entidad_fallecimiento->HrefValue = "";

			// Telefono
			$this->Telefono->LinkCustomAttributes = "";
			$this->Telefono->HrefValue = "";

			// Fecha_Nacimiento
			$this->Fecha_Nacimiento->LinkCustomAttributes = "";
			$this->Fecha_Nacimiento->HrefValue = "";

			// Nombre_Profesional_Diligencia
			$this->Nombre_Profesional_Diligencia->LinkCustomAttributes = "";
			$this->Nombre_Profesional_Diligencia->HrefValue = "";

			// Telefono_Profesional_Diligencia
			$this->Telefono_Profesional_Diligencia->LinkCustomAttributes = "";
			$this->Telefono_Profesional_Diligencia->HrefValue = "";

			// Mecanismo_Probable_Transmision
			$this->Mecanismo_Probable_Transmision->LinkCustomAttributes = "";
			$this->Mecanismo_Probable_Transmision->HrefValue = "";

			// Nombre_Madre
			$this->Nombre_Madre->LinkCustomAttributes = "";
			$this->Nombre_Madre->HrefValue = "";

			// Tipo_Id_Madre
			$this->Tipo_Id_Madre->LinkCustomAttributes = "";
			$this->Tipo_Id_Madre->HrefValue = "";

			// Numero_Identificacion_Madre
			$this->Numero_Identificacion_Madre->LinkCustomAttributes = "";
			$this->Numero_Identificacion_Madre->HrefValue = "";

			// Indentidad_Genero
			$this->Indentidad_Genero->LinkCustomAttributes = "";
			$this->Indentidad_Genero->HrefValue = "";

			// Donador_Sangre_Ultimos_12_Meses
			$this->Donador_Sangre_Ultimos_12_Meses->LinkCustomAttributes = "";
			$this->Donador_Sangre_Ultimos_12_Meses->HrefValue = "";

			// Fecha_Donacion
			$this->Fecha_Donacion->LinkCustomAttributes = "";
			$this->Fecha_Donacion->HrefValue = "";

			// Nombre_Institucion_Donacion
			$this->Nombre_Institucion_Donacion->LinkCustomAttributes = "";
			$this->Nombre_Institucion_Donacion->HrefValue = "";

			// Poblacion_clave
			$this->Poblacion_clave->LinkCustomAttributes = "";
			$this->Poblacion_clave->HrefValue = "";

			// Recibio_Asesoria_Pre_Prueba
			$this->Recibio_Asesoria_Pre_Prueba->LinkCustomAttributes = "";
			$this->Recibio_Asesoria_Pre_Prueba->HrefValue = "";

			// Recibio_Asesoria_Post_Prueba
			$this->Recibio_Asesoria_Post_Prueba->LinkCustomAttributes = "";
			$this->Recibio_Asesoria_Post_Prueba->HrefValue = "";

			// Tipo_Prueba
			$this->Tipo_Prueba->LinkCustomAttributes = "";
			$this->Tipo_Prueba->HrefValue = "";

			// Fecha_Resultado_Confirmatorio
			$this->Fecha_Resultado_Confirmatorio->LinkCustomAttributes = "";
			$this->Fecha_Resultado_Confirmatorio->HrefValue = "";

			// Valor_Carga_Viral
			$this->Valor_Carga_Viral->LinkCustomAttributes = "";
			$this->Valor_Carga_Viral->HrefValue = "";

			// Estado_Clinico_Notificacion
			$this->Estado_Clinico_Notificacion->LinkCustomAttributes = "";
			$this->Estado_Clinico_Notificacion->HrefValue = "";

			// Hijos_Mujeres_Menores_5
			$this->Hijos_Mujeres_Menores_5->LinkCustomAttributes = "";
			$this->Hijos_Mujeres_Menores_5->HrefValue = "";

			// Hijos_Hombres_Menores_5
			$this->Hijos_Hombres_Menores_5->LinkCustomAttributes = "";
			$this->Hijos_Hombres_Menores_5->HrefValue = "";

			// Numero_Semanas_Embarazo
			$this->Numero_Semanas_Embarazo->LinkCustomAttributes = "";
			$this->Numero_Semanas_Embarazo->HrefValue = "";

			// Antecedentes_Embarazo
			$this->Antecedentes_Embarazo->LinkCustomAttributes = "";
			$this->Antecedentes_Embarazo->HrefValue = "";

			// Candidiasis_esofagica
			$this->Candidiasis_esofagica->LinkCustomAttributes = "";
			$this->Candidiasis_esofagica->HrefValue = "";

			// Candidiasis_vias_aereas
			$this->Candidiasis_vias_aereas->LinkCustomAttributes = "";
			$this->Candidiasis_vias_aereas->HrefValue = "";

			// Tuberculosis_pulmonar
			$this->Tuberculosis_pulmonar->LinkCustomAttributes = "";
			$this->Tuberculosis_pulmonar->HrefValue = "";

			// Cancer_cervical
			$this->Cancer_cervical->LinkCustomAttributes = "";
			$this->Cancer_cervical->HrefValue = "";

			// Tuberculosis_extrapulmonar
			$this->Tuberculosis_extrapulmonar->LinkCustomAttributes = "";
			$this->Tuberculosis_extrapulmonar->HrefValue = "";

			// Coccidiomicosis
			$this->Coccidiomicosis->LinkCustomAttributes = "";
			$this->Coccidiomicosis->HrefValue = "";

			// Citomegalovirosis
			$this->Citomegalovirosis->LinkCustomAttributes = "";
			$this->Citomegalovirosis->HrefValue = "";

			// Retinitis_citomegalovirosis
			$this->Retinitis_citomegalovirosis->LinkCustomAttributes = "";
			$this->Retinitis_citomegalovirosis->HrefValue = "";

			// Sindrome_Emanciacion
			$this->Sindrome_Emanciacion->LinkCustomAttributes = "";
			$this->Sindrome_Emanciacion->HrefValue = "";

			// Encefalopatia
			$this->Encefalopatia->LinkCustomAttributes = "";
			$this->Encefalopatia->HrefValue = "";

			// Otras_micobacterias
			$this->Otras_micobacterias->LinkCustomAttributes = "";
			$this->Otras_micobacterias->HrefValue = "";

			// Histoplasmosis_Extrapulmonar
			$this->Histoplasmosis_Extrapulmonar->LinkCustomAttributes = "";
			$this->Histoplasmosis_Extrapulmonar->HrefValue = "";

			// isosporidiasis_cronica
			$this->isosporidiasis_cronica->LinkCustomAttributes = "";
			$this->isosporidiasis_cronica->HrefValue = "";

			// herpes_zoster
			$this->herpes_zoster->LinkCustomAttributes = "";
			$this->herpes_zoster->HrefValue = "";

			// Histoplasmosis_diseminada
			$this->Histoplasmosis_diseminada->LinkCustomAttributes = "";
			$this->Histoplasmosis_diseminada->HrefValue = "";

			// Linfoma_Burkitt
			$this->Linfoma_Burkitt->LinkCustomAttributes = "";
			$this->Linfoma_Burkitt->HrefValue = "";

			// Neumonia_Pneumocystis
			$this->Neumonia_Pneumocystis->LinkCustomAttributes = "";
			$this->Neumonia_Pneumocystis->HrefValue = "";

			// Neumonia_Recurrente
			$this->Neumonia_Recurrente->LinkCustomAttributes = "";
			$this->Neumonia_Recurrente->HrefValue = "";

			// Linfoma_Inmunoblastico
			$this->Linfoma_Inmunoblastico->LinkCustomAttributes = "";
			$this->Linfoma_Inmunoblastico->HrefValue = "";

			// Criptosporidiasis_cronica
			$this->Criptosporidiasis_cronica->LinkCustomAttributes = "";
			$this->Criptosporidiasis_cronica->HrefValue = "";

			// Criptococosis_Extrapulmonar
			$this->Criptococosis_Extrapulmonar->LinkCustomAttributes = "";
			$this->Criptococosis_Extrapulmonar->HrefValue = "";

			// Sarcoma_Kaposi
			$this->Sarcoma_Kaposi->LinkCustomAttributes = "";
			$this->Sarcoma_Kaposi->HrefValue = "";

			// Leucoencefalopatia_Multifocal
			$this->Leucoencefalopatia_Multifocal->LinkCustomAttributes = "";
			$this->Leucoencefalopatia_Multifocal->HrefValue = "";

			// Septicemia_recurrente
			$this->Septicemia_recurrente->LinkCustomAttributes = "";
			$this->Septicemia_recurrente->HrefValue = "";

			// Toxoplasmosis_cerebral
			$this->Toxoplasmosis_cerebral->LinkCustomAttributes = "";
			$this->Toxoplasmosis_cerebral->HrefValue = "";

			// HepatitisB
			$this->HepatitisB->LinkCustomAttributes = "";
			$this->HepatitisB->HrefValue = "";

			// HepatitisC
			$this->HepatitisC->LinkCustomAttributes = "";
			$this->HepatitisC->HrefValue = "";

			// Meningitis
			$this->Meningitis->LinkCustomAttributes = "";
			$this->Meningitis->HrefValue = "";

			// RecuentoCD4
			$this->RecuentoCD4->LinkCustomAttributes = "";
			$this->RecuentoCD4->HrefValue = "";

			// Localidad_residencia
			$this->Localidad_residencia->LinkCustomAttributes = "";
			$this->Localidad_residencia->HrefValue = "";

			// Barrio_residencia
			$this->Barrio_residencia->LinkCustomAttributes = "";
			$this->Barrio_residencia->HrefValue = "";

			// Fecha_ingreso_app
			$this->Fecha_ingreso_app->LinkCustomAttributes = "";
			$this->Fecha_ingreso_app->HrefValue = "";

			// Actualizado_por
			$this->Actualizado_por->LinkCustomAttributes = "";
			$this->Actualizado_por->HrefValue = "";

			// Fecha_actualizacion_app
			$this->Fecha_actualizacion_app->LinkCustomAttributes = "";
			$this->Fecha_actualizacion_app->HrefValue = "";
		}
		if ($this->RowType == EW_ROWTYPE_ADD ||
			$this->RowType == EW_ROWTYPE_EDIT ||
			$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row
			$this->SetupFieldTitles();
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	// Validate form
	function ValidateForm() {
		global $Language, $gsFormError;

		// Initialize form error message
		$gsFormError = "";

		// Check if validation required
		if (!EW_SERVER_VALIDATE)
			return ($gsFormError == "");
		if ($this->Seguimiento->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Seguimiento->FldCaption(), $this->Seguimiento->ReqErrMsg));
		}
		if (!$this->Condicion_Final->FldIsDetailKey && !is_null($this->Condicion_Final->FormValue) && $this->Condicion_Final->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Condicion_Final->FldCaption(), $this->Condicion_Final->ReqErrMsg));
		}
		if (!$this->Codigo_UPGD->FldIsDetailKey && !is_null($this->Codigo_UPGD->FormValue) && $this->Codigo_UPGD->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Codigo_UPGD->FldCaption(), $this->Codigo_UPGD->ReqErrMsg));
		}
		if (!ew_CheckInteger($this->Codigo_UPGD->FormValue)) {
			ew_AddMessage($gsFormError, $this->Codigo_UPGD->FldErrMsg());
		}
		if (!$this->Cod_Evento->FldIsDetailKey && !is_null($this->Cod_Evento->FormValue) && $this->Cod_Evento->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Cod_Evento->FldCaption(), $this->Cod_Evento->ReqErrMsg));
		}
		if (!ew_CheckInteger($this->Cod_Evento->FormValue)) {
			ew_AddMessage($gsFormError, $this->Cod_Evento->FldErrMsg());
		}
		if (!$this->Fecha_Notificacion->FldIsDetailKey && !is_null($this->Fecha_Notificacion->FormValue) && $this->Fecha_Notificacion->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Fecha_Notificacion->FldCaption(), $this->Fecha_Notificacion->ReqErrMsg));
		}
		if (!ew_CheckDate($this->Fecha_Notificacion->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Notificacion->FldErrMsg());
		}
		if (!$this->Primer_Nombre->FldIsDetailKey && !is_null($this->Primer_Nombre->FormValue) && $this->Primer_Nombre->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Primer_Nombre->FldCaption(), $this->Primer_Nombre->ReqErrMsg));
		}
		if (!$this->Primer_Apellido->FldIsDetailKey && !is_null($this->Primer_Apellido->FormValue) && $this->Primer_Apellido->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Primer_Apellido->FldCaption(), $this->Primer_Apellido->ReqErrMsg));
		}
		if (!$this->Numero_Identificacion->FldIsDetailKey && !is_null($this->Numero_Identificacion->FormValue) && $this->Numero_Identificacion->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Numero_Identificacion->FldCaption(), $this->Numero_Identificacion->ReqErrMsg));
		}
		if (!ew_CheckInteger($this->Edad->FormValue)) {
			ew_AddMessage($gsFormError, $this->Edad->FldErrMsg());
		}
		if (!$this->Sexo->FldIsDetailKey && !is_null($this->Sexo->FormValue) && $this->Sexo->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Sexo->FldCaption(), $this->Sexo->ReqErrMsg));
		}
		if (!$this->Pais_Ocurrencia->FldIsDetailKey && !is_null($this->Pais_Ocurrencia->FormValue) && $this->Pais_Ocurrencia->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Pais_Ocurrencia->FldCaption(), $this->Pais_Ocurrencia->ReqErrMsg));
		}
		if (!$this->Depto_Ocurrencia->FldIsDetailKey && !is_null($this->Depto_Ocurrencia->FormValue) && $this->Depto_Ocurrencia->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Depto_Ocurrencia->FldCaption(), $this->Depto_Ocurrencia->ReqErrMsg));
		}
		if (!$this->Municipio_Ocurrencia->FldIsDetailKey && !is_null($this->Municipio_Ocurrencia->FormValue) && $this->Municipio_Ocurrencia->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Municipio_Ocurrencia->FldCaption(), $this->Municipio_Ocurrencia->ReqErrMsg));
		}
		if (!$this->Cod_Administradora->FldIsDetailKey && !is_null($this->Cod_Administradora->FormValue) && $this->Cod_Administradora->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Cod_Administradora->FldCaption(), $this->Cod_Administradora->ReqErrMsg));
		}
		if (!$this->Depto_Residencia->FldIsDetailKey && !is_null($this->Depto_Residencia->FormValue) && $this->Depto_Residencia->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Depto_Residencia->FldCaption(), $this->Depto_Residencia->ReqErrMsg));
		}
		if (!$this->Municipio_Residencia->FldIsDetailKey && !is_null($this->Municipio_Residencia->FormValue) && $this->Municipio_Residencia->FormValue == "") {
			ew_AddMessage($gsFormError, str_replace("%s", $this->Municipio_Residencia->FldCaption(), $this->Municipio_Residencia->ReqErrMsg));
		}
		if (!ew_CheckDate($this->Fecha_Consulta->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Consulta->FldErrMsg());
		}
		if (!ew_CheckDate($this->Fecha_Inicio_Sintomas->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Inicio_Sintomas->FldErrMsg());
		}
		if (!ew_CheckDate($this->Fecha_Defuncion->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Defuncion->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Numero_Certificado_Defuncion->FormValue)) {
			ew_AddMessage($gsFormError, $this->Numero_Certificado_Defuncion->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Telefono->FormValue)) {
			ew_AddMessage($gsFormError, $this->Telefono->FldErrMsg());
		}
		if (!ew_CheckDate($this->Fecha_Nacimiento->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Nacimiento->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Telefono_Profesional_Diligencia->FormValue)) {
			ew_AddMessage($gsFormError, $this->Telefono_Profesional_Diligencia->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Numero_Identificacion_Madre->FormValue)) {
			ew_AddMessage($gsFormError, $this->Numero_Identificacion_Madre->FldErrMsg());
		}
		if (!ew_CheckDate($this->Fecha_Donacion->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Donacion->FldErrMsg());
		}
		if (!ew_CheckDate($this->Fecha_Resultado_Confirmatorio->FormValue)) {
			ew_AddMessage($gsFormError, $this->Fecha_Resultado_Confirmatorio->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Hijos_Mujeres_Menores_5->FormValue)) {
			ew_AddMessage($gsFormError, $this->Hijos_Mujeres_Menores_5->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Hijos_Hombres_Menores_5->FormValue)) {
			ew_AddMessage($gsFormError, $this->Hijos_Hombres_Menores_5->FldErrMsg());
		}
		if (!ew_CheckInteger($this->Numero_Semanas_Embarazo->FormValue)) {
			ew_AddMessage($gsFormError, $this->Numero_Semanas_Embarazo->FldErrMsg());
		}

		// Validate detail grid
		$DetailTblVar = explode(",", $this->getCurrentDetailTable());
		if (in_array("seguimiento_individual3", $DetailTblVar) && $GLOBALS["seguimiento_individual3"]->DetailEdit) {
			if (!isset($GLOBALS["seguimiento_individual3_grid"])) $GLOBALS["seguimiento_individual3_grid"] = new cseguimiento_individual3_grid(); // get detail page object
			$GLOBALS["seguimiento_individual3_grid"]->ValidateGridForm();
		}
		if (in_array("seguimiento_materno", $DetailTblVar) && $GLOBALS["seguimiento_materno"]->DetailEdit) {
			if (!isset($GLOBALS["seguimiento_materno_grid"])) $GLOBALS["seguimiento_materno_grid"] = new cseguimiento_materno_grid(); // get detail page object
			$GLOBALS["seguimiento_materno_grid"]->ValidateGridForm();
		}

		// Return validate result
		$ValidateForm = ($gsFormError == "");

		// Call Form_CustomValidate event
		$sFormCustomError = "";
		$ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
		if ($sFormCustomError <> "") {
			ew_AddMessage($gsFormError, $sFormCustomError);
		}
		return $ValidateForm;
	}

	// Update record based on key values
	function EditRow() {
		global $Security, $Language;
		$sFilter = $this->KeyFilter();
		$sFilter = $this->ApplyUserIDFilters($sFilter);
		$conn = &$this->Connection();
		if ($this->Numero_Identificacion->CurrentValue <> "") { // Check field with unique index
			$sFilterChk = "(`Numero_Identificacion` = '" . ew_AdjustSql($this->Numero_Identificacion->CurrentValue, $this->DBID) . "')";
			$sFilterChk .= " AND NOT (" . $sFilter . ")";
			$this->CurrentFilter = $sFilterChk;
			$sSqlChk = $this->SQL();
			$conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
			$rsChk = $conn->Execute($sSqlChk);
			$conn->raiseErrorFn = '';
			if ($rsChk === FALSE) {
				return FALSE;
			} elseif (!$rsChk->EOF) {
				$sIdxErrMsg = str_replace("%f", $this->Numero_Identificacion->FldCaption(), $Language->Phrase("DupIndex"));
				$sIdxErrMsg = str_replace("%v", $this->Numero_Identificacion->CurrentValue, $sIdxErrMsg);
				$this->setFailureMessage($sIdxErrMsg);
				$rsChk->Close();
				return FALSE;
			}
			$rsChk->Close();
		}
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
		$rs = $conn->Execute($sSql);
		$conn->raiseErrorFn = '';
		if ($rs === FALSE)
			return FALSE;
		if ($rs->EOF) {
			$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
			$EditRow = FALSE; // Update Failed
		} else {

			// Begin transaction
			if ($this->getCurrentDetailTable() <> "")
				$conn->BeginTrans();

			// Save old values
			$rsold = &$rs->fields;
			$this->LoadDbValues($rsold);
			$rsnew = array();

			// Seguimiento
			$this->Seguimiento->SetDbValueDef($rsnew, $this->Seguimiento->CurrentValue, NULL, $this->Seguimiento->ReadOnly);

			// Condicion_Final
			$this->Condicion_Final->SetDbValueDef($rsnew, $this->Condicion_Final->CurrentValue, NULL, $this->Condicion_Final->ReadOnly);

			// Codigo_centro
			$this->Codigo_centro->SetDbValueDef($rsnew, $this->Codigo_centro->CurrentValue, NULL, $this->Codigo_centro->ReadOnly);

			// Codigo_UPGD
			$this->Codigo_UPGD->SetDbValueDef($rsnew, $this->Codigo_UPGD->CurrentValue, NULL, $this->Codigo_UPGD->ReadOnly);

			// Cod_Evento
			$this->Cod_Evento->SetDbValueDef($rsnew, $this->Cod_Evento->CurrentValue, NULL, $this->Cod_Evento->ReadOnly);

			// Embarazo_Actual
			$this->Embarazo_Actual->SetDbValueDef($rsnew, $this->Embarazo_Actual->CurrentValue, NULL, $this->Embarazo_Actual->ReadOnly);

			// Fecha_Notificacion
			$this->Fecha_Notificacion->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Notificacion->CurrentValue, 5), NULL, $this->Fecha_Notificacion->ReadOnly);

			// Semana
			$this->Semana->SetDbValueDef($rsnew, $this->Semana->CurrentValue, NULL, $this->Semana->ReadOnly);

			// Periodo_Epidemiologico
			$this->Periodo_Epidemiologico->SetDbValueDef($rsnew, $this->Periodo_Epidemiologico->CurrentValue, NULL, $this->Periodo_Epidemiologico->ReadOnly);

			// Periodo_Sivigila
			$this->Periodo_Sivigila->SetDbValueDef($rsnew, $this->Periodo_Sivigila->CurrentValue, NULL, $this->Periodo_Sivigila->ReadOnly);

			// Primer_Nombre
			$this->Primer_Nombre->SetDbValueDef($rsnew, $this->Primer_Nombre->CurrentValue, "", $this->Primer_Nombre->ReadOnly);

			// Segundo_Nombre
			$this->Segundo_Nombre->SetDbValueDef($rsnew, $this->Segundo_Nombre->CurrentValue, NULL, $this->Segundo_Nombre->ReadOnly);

			// Primer_Apellido
			$this->Primer_Apellido->SetDbValueDef($rsnew, $this->Primer_Apellido->CurrentValue, "", $this->Primer_Apellido->ReadOnly);

			// Segundo_Apellido
			$this->Segundo_Apellido->SetDbValueDef($rsnew, $this->Segundo_Apellido->CurrentValue, NULL, $this->Segundo_Apellido->ReadOnly);

			// Tipo_Id
			$this->Tipo_Id->SetDbValueDef($rsnew, $this->Tipo_Id->CurrentValue, NULL, $this->Tipo_Id->ReadOnly);

			// Numero_Identificacion
			$this->Numero_Identificacion->SetDbValueDef($rsnew, $this->Numero_Identificacion->CurrentValue, "", $this->Numero_Identificacion->ReadOnly);

			// Edad
			$this->Edad->SetDbValueDef($rsnew, $this->Edad->CurrentValue, NULL, $this->Edad->ReadOnly);

			// Unidad_Edad
			$this->Unidad_Edad->SetDbValueDef($rsnew, $this->Unidad_Edad->CurrentValue, NULL, $this->Unidad_Edad->ReadOnly);

			// Sexo
			$this->Sexo->SetDbValueDef($rsnew, $this->Sexo->CurrentValue, "", $this->Sexo->ReadOnly);

			// Pais_Ocurrencia
			$this->Pais_Ocurrencia->SetDbValueDef($rsnew, $this->Pais_Ocurrencia->CurrentValue, 0, $this->Pais_Ocurrencia->ReadOnly);

			// Depto_Ocurrencia
			$this->Depto_Ocurrencia->SetDbValueDef($rsnew, $this->Depto_Ocurrencia->CurrentValue, 0, $this->Depto_Ocurrencia->ReadOnly);

			// Municipio_Ocurrencia
			$this->Municipio_Ocurrencia->SetDbValueDef($rsnew, $this->Municipio_Ocurrencia->CurrentValue, 0, $this->Municipio_Ocurrencia->ReadOnly);

			// Area_Ocurrencia
			$this->Area_Ocurrencia->SetDbValueDef($rsnew, $this->Area_Ocurrencia->CurrentValue, NULL, $this->Area_Ocurrencia->ReadOnly);

			// Localidad
			$this->Localidad->SetDbValueDef($rsnew, $this->Localidad->CurrentValue, NULL, $this->Localidad->ReadOnly);

			// Barrio
			$this->Barrio->SetDbValueDef($rsnew, $this->Barrio->CurrentValue, NULL, $this->Barrio->ReadOnly);

			// Direccion_Residencia
			$this->Direccion_Residencia->SetDbValueDef($rsnew, $this->Direccion_Residencia->CurrentValue, NULL, $this->Direccion_Residencia->ReadOnly);

			// Ocupacion
			$this->Ocupacion->SetDbValueDef($rsnew, $this->Ocupacion->CurrentValue, NULL, $this->Ocupacion->ReadOnly);

			// Tipo_Regimen_Salud
			$this->Tipo_Regimen_Salud->SetDbValueDef($rsnew, $this->Tipo_Regimen_Salud->CurrentValue, NULL, $this->Tipo_Regimen_Salud->ReadOnly);

			// Cod_Administradora
			$this->Cod_Administradora->SetDbValueDef($rsnew, $this->Cod_Administradora->CurrentValue, NULL, $this->Cod_Administradora->ReadOnly);

			// gp_discapa
			$this->gp_discapa->SetDbValueDef($rsnew, $this->gp_discapa->CurrentValue, NULL, $this->gp_discapa->ReadOnly);

			// gp_desplaz
			$this->gp_desplaz->SetDbValueDef($rsnew, $this->gp_desplaz->CurrentValue, NULL, $this->gp_desplaz->ReadOnly);

			// gp_migrant
			$this->gp_migrant->SetDbValueDef($rsnew, $this->gp_migrant->CurrentValue, NULL, $this->gp_migrant->ReadOnly);

			// gp_carcela
			$this->gp_carcela->SetDbValueDef($rsnew, $this->gp_carcela->CurrentValue, NULL, $this->gp_carcela->ReadOnly);

			// gp_gestan
			$this->gp_gestan->SetDbValueDef($rsnew, $this->gp_gestan->CurrentValue, NULL, $this->gp_gestan->ReadOnly);

			// gp_indigen
			$this->gp_indigen->SetDbValueDef($rsnew, $this->gp_indigen->CurrentValue, NULL, $this->gp_indigen->ReadOnly);

			// gp_pobicbf
			$this->gp_pobicbf->SetDbValueDef($rsnew, $this->gp_pobicbf->CurrentValue, NULL, $this->gp_pobicbf->ReadOnly);

			// gp_mad_com
			$this->gp_mad_com->SetDbValueDef($rsnew, $this->gp_mad_com->CurrentValue, NULL, $this->gp_mad_com->ReadOnly);

			// gp_desmovi
			$this->gp_desmovi->SetDbValueDef($rsnew, $this->gp_desmovi->CurrentValue, NULL, $this->gp_desmovi->ReadOnly);

			// gp_psiquia
			$this->gp_psiquia->SetDbValueDef($rsnew, $this->gp_psiquia->CurrentValue, NULL, $this->gp_psiquia->ReadOnly);

			// gp_vic_vio
			$this->gp_vic_vio->SetDbValueDef($rsnew, $this->gp_vic_vio->CurrentValue, NULL, $this->gp_vic_vio->ReadOnly);

			// gp_otros
			$this->gp_otros->SetDbValueDef($rsnew, $this->gp_otros->CurrentValue, NULL, $this->gp_otros->ReadOnly);

			// Depto_Residencia
			$this->Depto_Residencia->SetDbValueDef($rsnew, $this->Depto_Residencia->CurrentValue, NULL, $this->Depto_Residencia->ReadOnly);

			// Municipio_Residencia
			$this->Municipio_Residencia->SetDbValueDef($rsnew, $this->Municipio_Residencia->CurrentValue, NULL, $this->Municipio_Residencia->ReadOnly);

			// Fecha_Consulta
			$this->Fecha_Consulta->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Consulta->CurrentValue, 5), NULL, $this->Fecha_Consulta->ReadOnly);

			// Fecha_Inicio_Sintomas
			$this->Fecha_Inicio_Sintomas->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Inicio_Sintomas->CurrentValue, 5), NULL, $this->Fecha_Inicio_Sintomas->ReadOnly);

			// Hospitalizado
			$this->Hospitalizado->SetDbValueDef($rsnew, $this->Hospitalizado->CurrentValue, NULL, $this->Hospitalizado->ReadOnly);

			// Fecha_Defuncion
			$this->Fecha_Defuncion->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Defuncion->CurrentValue, 5), NULL, $this->Fecha_Defuncion->ReadOnly);

			// Numero_Certificado_Defuncion
			$this->Numero_Certificado_Defuncion->SetDbValueDef($rsnew, $this->Numero_Certificado_Defuncion->CurrentValue, NULL, $this->Numero_Certificado_Defuncion->ReadOnly);

			// Causa_Basica_Muerte_CIEX
			$this->Causa_Basica_Muerte_CIEX->SetDbValueDef($rsnew, $this->Causa_Basica_Muerte_CIEX->CurrentValue, NULL, $this->Causa_Basica_Muerte_CIEX->ReadOnly);

			// Entidad_fallecimiento
			$this->Entidad_fallecimiento->SetDbValueDef($rsnew, $this->Entidad_fallecimiento->CurrentValue, NULL, $this->Entidad_fallecimiento->ReadOnly);

			// Telefono
			$this->Telefono->SetDbValueDef($rsnew, $this->Telefono->CurrentValue, NULL, $this->Telefono->ReadOnly);

			// Fecha_Nacimiento
			$this->Fecha_Nacimiento->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Nacimiento->CurrentValue, 5), NULL, $this->Fecha_Nacimiento->ReadOnly);

			// Nombre_Profesional_Diligencia
			$this->Nombre_Profesional_Diligencia->SetDbValueDef($rsnew, $this->Nombre_Profesional_Diligencia->CurrentValue, NULL, $this->Nombre_Profesional_Diligencia->ReadOnly);

			// Telefono_Profesional_Diligencia
			$this->Telefono_Profesional_Diligencia->SetDbValueDef($rsnew, $this->Telefono_Profesional_Diligencia->CurrentValue, NULL, $this->Telefono_Profesional_Diligencia->ReadOnly);

			// Mecanismo_Probable_Transmision
			$this->Mecanismo_Probable_Transmision->SetDbValueDef($rsnew, $this->Mecanismo_Probable_Transmision->CurrentValue, NULL, $this->Mecanismo_Probable_Transmision->ReadOnly);

			// Nombre_Madre
			$this->Nombre_Madre->SetDbValueDef($rsnew, $this->Nombre_Madre->CurrentValue, NULL, $this->Nombre_Madre->ReadOnly);

			// Tipo_Id_Madre
			$this->Tipo_Id_Madre->SetDbValueDef($rsnew, $this->Tipo_Id_Madre->CurrentValue, NULL, $this->Tipo_Id_Madre->ReadOnly);

			// Numero_Identificacion_Madre
			$this->Numero_Identificacion_Madre->SetDbValueDef($rsnew, $this->Numero_Identificacion_Madre->CurrentValue, NULL, $this->Numero_Identificacion_Madre->ReadOnly);

			// Indentidad_Genero
			$this->Indentidad_Genero->SetDbValueDef($rsnew, $this->Indentidad_Genero->CurrentValue, NULL, $this->Indentidad_Genero->ReadOnly);

			// Donador_Sangre_Ultimos_12_Meses
			$this->Donador_Sangre_Ultimos_12_Meses->SetDbValueDef($rsnew, $this->Donador_Sangre_Ultimos_12_Meses->CurrentValue, NULL, $this->Donador_Sangre_Ultimos_12_Meses->ReadOnly);

			// Fecha_Donacion
			$this->Fecha_Donacion->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Donacion->CurrentValue, 5), NULL, $this->Fecha_Donacion->ReadOnly);

			// Nombre_Institucion_Donacion
			$this->Nombre_Institucion_Donacion->SetDbValueDef($rsnew, $this->Nombre_Institucion_Donacion->CurrentValue, NULL, $this->Nombre_Institucion_Donacion->ReadOnly);

			// Poblacion_clave
			$this->Poblacion_clave->SetDbValueDef($rsnew, $this->Poblacion_clave->CurrentValue, NULL, $this->Poblacion_clave->ReadOnly);

			// Recibio_Asesoria_Pre_Prueba
			$this->Recibio_Asesoria_Pre_Prueba->SetDbValueDef($rsnew, $this->Recibio_Asesoria_Pre_Prueba->CurrentValue, NULL, $this->Recibio_Asesoria_Pre_Prueba->ReadOnly);

			// Recibio_Asesoria_Post_Prueba
			$this->Recibio_Asesoria_Post_Prueba->SetDbValueDef($rsnew, $this->Recibio_Asesoria_Post_Prueba->CurrentValue, NULL, $this->Recibio_Asesoria_Post_Prueba->ReadOnly);

			// Tipo_Prueba
			$this->Tipo_Prueba->SetDbValueDef($rsnew, $this->Tipo_Prueba->CurrentValue, NULL, $this->Tipo_Prueba->ReadOnly);

			// Fecha_Resultado_Confirmatorio
			$this->Fecha_Resultado_Confirmatorio->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Fecha_Resultado_Confirmatorio->CurrentValue, 5), NULL, $this->Fecha_Resultado_Confirmatorio->ReadOnly);

			// Valor_Carga_Viral
			$this->Valor_Carga_Viral->SetDbValueDef($rsnew, $this->Valor_Carga_Viral->CurrentValue, NULL, $this->Valor_Carga_Viral->ReadOnly);

			// Estado_Clinico_Notificacion
			$this->Estado_Clinico_Notificacion->SetDbValueDef($rsnew, $this->Estado_Clinico_Notificacion->CurrentValue, NULL, $this->Estado_Clinico_Notificacion->ReadOnly);

			// Hijos_Mujeres_Menores_5
			$this->Hijos_Mujeres_Menores_5->SetDbValueDef($rsnew, $this->Hijos_Mujeres_Menores_5->CurrentValue, NULL, $this->Hijos_Mujeres_Menores_5->ReadOnly);

			// Hijos_Hombres_Menores_5
			$this->Hijos_Hombres_Menores_5->SetDbValueDef($rsnew, $this->Hijos_Hombres_Menores_5->CurrentValue, NULL, $this->Hijos_Hombres_Menores_5->ReadOnly);

			// Numero_Semanas_Embarazo
			$this->Numero_Semanas_Embarazo->SetDbValueDef($rsnew, $this->Numero_Semanas_Embarazo->CurrentValue, NULL, $this->Numero_Semanas_Embarazo->ReadOnly);

			// Antecedentes_Embarazo
			$this->Antecedentes_Embarazo->SetDbValueDef($rsnew, $this->Antecedentes_Embarazo->CurrentValue, NULL, $this->Antecedentes_Embarazo->ReadOnly);

			// Candidiasis_esofagica
			$this->Candidiasis_esofagica->SetDbValueDef($rsnew, $this->Candidiasis_esofagica->CurrentValue, NULL, $this->Candidiasis_esofagica->ReadOnly);

			// Candidiasis_vias_aereas
			$this->Candidiasis_vias_aereas->SetDbValueDef($rsnew, $this->Candidiasis_vias_aereas->CurrentValue, NULL, $this->Candidiasis_vias_aereas->ReadOnly);

			// Tuberculosis_pulmonar
			$this->Tuberculosis_pulmonar->SetDbValueDef($rsnew, $this->Tuberculosis_pulmonar->CurrentValue, NULL, $this->Tuberculosis_pulmonar->ReadOnly);

			// Cancer_cervical
			$this->Cancer_cervical->SetDbValueDef($rsnew, $this->Cancer_cervical->CurrentValue, NULL, $this->Cancer_cervical->ReadOnly);

			// Tuberculosis_extrapulmonar
			$this->Tuberculosis_extrapulmonar->SetDbValueDef($rsnew, $this->Tuberculosis_extrapulmonar->CurrentValue, NULL, $this->Tuberculosis_extrapulmonar->ReadOnly);

			// Coccidiomicosis
			$this->Coccidiomicosis->SetDbValueDef($rsnew, $this->Coccidiomicosis->CurrentValue, NULL, $this->Coccidiomicosis->ReadOnly);

			// Citomegalovirosis
			$this->Citomegalovirosis->SetDbValueDef($rsnew, $this->Citomegalovirosis->CurrentValue, NULL, $this->Citomegalovirosis->ReadOnly);

			// Retinitis_citomegalovirosis
			$this->Retinitis_citomegalovirosis->SetDbValueDef($rsnew, $this->Retinitis_citomegalovirosis->CurrentValue, NULL, $this->Retinitis_citomegalovirosis->ReadOnly);

			// Sindrome_Emanciacion
			$this->Sindrome_Emanciacion->SetDbValueDef($rsnew, $this->Sindrome_Emanciacion->CurrentValue, NULL, $this->Sindrome_Emanciacion->ReadOnly);

			// Encefalopatia
			$this->Encefalopatia->SetDbValueDef($rsnew, $this->Encefalopatia->CurrentValue, NULL, $this->Encefalopatia->ReadOnly);

			// Otras_micobacterias
			$this->Otras_micobacterias->SetDbValueDef($rsnew, $this->Otras_micobacterias->CurrentValue, NULL, $this->Otras_micobacterias->ReadOnly);

			// Histoplasmosis_Extrapulmonar
			$this->Histoplasmosis_Extrapulmonar->SetDbValueDef($rsnew, $this->Histoplasmosis_Extrapulmonar->CurrentValue, NULL, $this->Histoplasmosis_Extrapulmonar->ReadOnly);

			// isosporidiasis_cronica
			$this->isosporidiasis_cronica->SetDbValueDef($rsnew, $this->isosporidiasis_cronica->CurrentValue, NULL, $this->isosporidiasis_cronica->ReadOnly);

			// herpes_zoster
			$this->herpes_zoster->SetDbValueDef($rsnew, $this->herpes_zoster->CurrentValue, NULL, $this->herpes_zoster->ReadOnly);

			// Histoplasmosis_diseminada
			$this->Histoplasmosis_diseminada->SetDbValueDef($rsnew, $this->Histoplasmosis_diseminada->CurrentValue, NULL, $this->Histoplasmosis_diseminada->ReadOnly);

			// Linfoma_Burkitt
			$this->Linfoma_Burkitt->SetDbValueDef($rsnew, $this->Linfoma_Burkitt->CurrentValue, NULL, $this->Linfoma_Burkitt->ReadOnly);

			// Neumonia_Pneumocystis
			$this->Neumonia_Pneumocystis->SetDbValueDef($rsnew, $this->Neumonia_Pneumocystis->CurrentValue, NULL, $this->Neumonia_Pneumocystis->ReadOnly);

			// Neumonia_Recurrente
			$this->Neumonia_Recurrente->SetDbValueDef($rsnew, $this->Neumonia_Recurrente->CurrentValue, NULL, $this->Neumonia_Recurrente->ReadOnly);

			// Linfoma_Inmunoblastico
			$this->Linfoma_Inmunoblastico->SetDbValueDef($rsnew, $this->Linfoma_Inmunoblastico->CurrentValue, NULL, $this->Linfoma_Inmunoblastico->ReadOnly);

			// Criptosporidiasis_cronica
			$this->Criptosporidiasis_cronica->SetDbValueDef($rsnew, $this->Criptosporidiasis_cronica->CurrentValue, NULL, $this->Criptosporidiasis_cronica->ReadOnly);

			// Criptococosis_Extrapulmonar
			$this->Criptococosis_Extrapulmonar->SetDbValueDef($rsnew, $this->Criptococosis_Extrapulmonar->CurrentValue, NULL, $this->Criptococosis_Extrapulmonar->ReadOnly);

			// Sarcoma_Kaposi
			$this->Sarcoma_Kaposi->SetDbValueDef($rsnew, $this->Sarcoma_Kaposi->CurrentValue, NULL, $this->Sarcoma_Kaposi->ReadOnly);

			// Leucoencefalopatia_Multifocal
			$this->Leucoencefalopatia_Multifocal->SetDbValueDef($rsnew, $this->Leucoencefalopatia_Multifocal->CurrentValue, NULL, $this->Leucoencefalopatia_Multifocal->ReadOnly);

			// Septicemia_recurrente
			$this->Septicemia_recurrente->SetDbValueDef($rsnew, $this->Septicemia_recurrente->CurrentValue, NULL, $this->Septicemia_recurrente->ReadOnly);

			// Toxoplasmosis_cerebral
			$this->Toxoplasmosis_cerebral->SetDbValueDef($rsnew, $this->Toxoplasmosis_cerebral->CurrentValue, NULL, $this->Toxoplasmosis_cerebral->ReadOnly);

			// HepatitisB
			$this->HepatitisB->SetDbValueDef($rsnew, $this->HepatitisB->CurrentValue, NULL, $this->HepatitisB->ReadOnly);

			// HepatitisC
			$this->HepatitisC->SetDbValueDef($rsnew, $this->HepatitisC->CurrentValue, NULL, $this->HepatitisC->ReadOnly);

			// Meningitis
			$this->Meningitis->SetDbValueDef($rsnew, $this->Meningitis->CurrentValue, NULL, $this->Meningitis->ReadOnly);

			// RecuentoCD4
			$this->RecuentoCD4->SetDbValueDef($rsnew, $this->RecuentoCD4->CurrentValue, NULL, $this->RecuentoCD4->ReadOnly);

			// Localidad_residencia
			$this->Localidad_residencia->SetDbValueDef($rsnew, $this->Localidad_residencia->CurrentValue, NULL, $this->Localidad_residencia->ReadOnly);

			// Barrio_residencia
			$this->Barrio_residencia->SetDbValueDef($rsnew, $this->Barrio_residencia->CurrentValue, NULL, $this->Barrio_residencia->ReadOnly);

			// Fecha_ingreso_app
			$this->Fecha_ingreso_app->SetDbValueDef($rsnew, ew_CurrentDate(), NULL);
			$rsnew['Fecha_ingreso_app'] = &$this->Fecha_ingreso_app->DbValue;

			// Actualizado_por
			$this->Actualizado_por->SetDbValueDef($rsnew, CurrentUserName(), NULL);
			$rsnew['Actualizado_por'] = &$this->Actualizado_por->DbValue;

			// Fecha_actualizacion_app
			$this->Fecha_actualizacion_app->SetDbValueDef($rsnew, ew_CurrentDate(), NULL);
			$rsnew['Fecha_actualizacion_app'] = &$this->Fecha_actualizacion_app->DbValue;

			// Call Row Updating event
			$bUpdateRow = $this->Row_Updating($rsold, $rsnew);
			if ($bUpdateRow) {
				$conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
				if (count($rsnew) > 0)
					$EditRow = $this->Update($rsnew, "", $rsold);
				else
					$EditRow = TRUE; // No field to update
				$conn->raiseErrorFn = '';
				if ($EditRow) {
				}

				// Update detail records
				$DetailTblVar = explode(",", $this->getCurrentDetailTable());
				if ($EditRow) {
					if (in_array("seguimiento_individual3", $DetailTblVar) && $GLOBALS["seguimiento_individual3"]->DetailEdit) {
						if (!isset($GLOBALS["seguimiento_individual3_grid"])) $GLOBALS["seguimiento_individual3_grid"] = new cseguimiento_individual3_grid(); // Get detail page object
						$EditRow = $GLOBALS["seguimiento_individual3_grid"]->GridUpdate();
					}
				}
				if ($EditRow) {
					if (in_array("seguimiento_materno", $DetailTblVar) && $GLOBALS["seguimiento_materno"]->DetailEdit) {
						if (!isset($GLOBALS["seguimiento_materno_grid"])) $GLOBALS["seguimiento_materno_grid"] = new cseguimiento_materno_grid(); // Get detail page object
						$EditRow = $GLOBALS["seguimiento_materno_grid"]->GridUpdate();
					}
				}

				// Commit/Rollback transaction
				if ($this->getCurrentDetailTable() <> "") {
					if ($EditRow) {
						$conn->CommitTrans(); // Commit transaction
					} else {
						$conn->RollbackTrans(); // Rollback transaction
					}
				}
			} else {
				if ($this->getSuccessMessage() <> "" || $this->getFailureMessage() <> "") {

					// Use the message, do nothing
				} elseif ($this->CancelMessage <> "") {
					$this->setFailureMessage($this->CancelMessage);
					$this->CancelMessage = "";
				} else {
					$this->setFailureMessage($Language->Phrase("UpdateCancelled"));
				}
				$EditRow = FALSE;
			}
		}

		// Call Row_Updated event
		if ($EditRow)
			$this->Row_Updated($rsold, $rsnew);
		$rs->Close();
		return $EditRow;
	}

	// Show link optionally based on User ID
	function ShowOptionLink($id = "") {
		global $Security;
		if ($Security->IsLoggedIn() && !$Security->IsAdmin() && !$this->UserIDAllow($id))
			return $Security->IsValidUserID($this->Codigo_centro->CurrentValue);
		return TRUE;
	}

	// Set up detail parms based on QueryString
	function SetUpDetailParms() {

		// Get the keys for master table
		if (isset($_GET[EW_TABLE_SHOW_DETAIL])) {
			$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];
			$this->setCurrentDetailTable($sDetailTblVar);
		} else {
			$sDetailTblVar = $this->getCurrentDetailTable();
		}
		if ($sDetailTblVar <> "") {
			$DetailTblVar = explode(",", $sDetailTblVar);
			if (in_array("seguimiento_individual3", $DetailTblVar)) {
				if (!isset($GLOBALS["seguimiento_individual3_grid"]))
					$GLOBALS["seguimiento_individual3_grid"] = new cseguimiento_individual3_grid;
				if ($GLOBALS["seguimiento_individual3_grid"]->DetailEdit) {
					$GLOBALS["seguimiento_individual3_grid"]->CurrentMode = "edit";
					$GLOBALS["seguimiento_individual3_grid"]->CurrentAction = "gridedit";

					// Save current master table to detail table
					$GLOBALS["seguimiento_individual3_grid"]->setCurrentMasterTable($this->TableVar);
					$GLOBALS["seguimiento_individual3_grid"]->setStartRecordNumber(1);
					$GLOBALS["seguimiento_individual3_grid"]->Id_Registro->FldIsDetailKey = TRUE;
					$GLOBALS["seguimiento_individual3_grid"]->Id_Registro->CurrentValue = $this->Consecutivo->CurrentValue;
					$GLOBALS["seguimiento_individual3_grid"]->Id_Registro->setSessionValue($GLOBALS["seguimiento_individual3_grid"]->Id_Registro->CurrentValue);
				}
			}
			if (in_array("seguimiento_materno", $DetailTblVar)) {
				if (!isset($GLOBALS["seguimiento_materno_grid"]))
					$GLOBALS["seguimiento_materno_grid"] = new cseguimiento_materno_grid;
				if ($GLOBALS["seguimiento_materno_grid"]->DetailEdit) {
					$GLOBALS["seguimiento_materno_grid"]->CurrentMode = "edit";
					$GLOBALS["seguimiento_materno_grid"]->CurrentAction = "gridedit";

					// Save current master table to detail table
					$GLOBALS["seguimiento_materno_grid"]->setCurrentMasterTable($this->TableVar);
					$GLOBALS["seguimiento_materno_grid"]->setStartRecordNumber(1);
					$GLOBALS["seguimiento_materno_grid"]->Id_Registro->FldIsDetailKey = TRUE;
					$GLOBALS["seguimiento_materno_grid"]->Id_Registro->CurrentValue = $this->Consecutivo->CurrentValue;
					$GLOBALS["seguimiento_materno_grid"]->Id_Registro->setSessionValue($GLOBALS["seguimiento_materno_grid"]->Id_Registro->CurrentValue);
				}
			}
		}
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$url = substr(ew_CurrentUrl(), strrpos(ew_CurrentUrl(), "/")+1);
		$Breadcrumb->Add("list", $this->TableVar, $this->AddMasterUrl("registrolist.php"), "", $this->TableVar, TRUE);
		$PageId = "edit";
		$Breadcrumb->Add("edit", $PageId, $url);
	}

	// Set up multi pages
	function SetupMultiPages() {
		$pages = new cSubPages();
		$pages->Style = "tabs";
		$pages->Add(0);
		$pages->Add(1);
		$pages->Add(2);
		$pages->Add(3);
		$pages->Add(4);
		$pages->Add(5);
		$pages->Add(6);
		$pages->Add(7);
		$pages->Add(8);
		$this->MultiPages = $pages;
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}

	// Form Custom Validate event
	function Form_CustomValidate(&$CustomError) {

		// Return error message in CustomError
		return TRUE;
	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($registro_edit)) $registro_edit = new cregistro_edit();

// Page init
$registro_edit->Page_Init();

// Page main
$registro_edit->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$registro_edit->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Form object
var CurrentPageID = EW_PAGE_ID = "edit";
var CurrentForm = fregistroedit = new ew_Form("fregistroedit", "edit");

// Validate form
fregistroedit.Validate = function() {
	if (!this.ValidateRequired)
		return true; // Ignore validation
	var $ = jQuery, fobj = this.GetForm(), $fobj = $(fobj);
	if ($fobj.find("#a_confirm").val() == "F")
		return true;
	var elm, felm, uelm, addcnt = 0;
	var $k = $fobj.find("#" + this.FormKeyCountName); // Get key_count
	var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
	var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
	var gridinsert = $fobj.find("#a_list").val() == "gridinsert";
	for (var i = startcnt; i <= rowcnt; i++) {
		var infix = ($k[0]) ? String(i) : "";
		$fobj.data("rowindex", infix);
			elm = this.GetElements("x" + infix + "_Seguimiento");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Seguimiento->FldCaption(), $registro->Seguimiento->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Condicion_Final");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Condicion_Final->FldCaption(), $registro->Condicion_Final->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Codigo_UPGD");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Codigo_UPGD->FldCaption(), $registro->Codigo_UPGD->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Codigo_UPGD");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Codigo_UPGD->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Cod_Evento");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Cod_Evento->FldCaption(), $registro->Cod_Evento->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Cod_Evento");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Cod_Evento->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Notificacion");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Fecha_Notificacion->FldCaption(), $registro->Fecha_Notificacion->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Notificacion");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Notificacion->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Primer_Nombre");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Primer_Nombre->FldCaption(), $registro->Primer_Nombre->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Primer_Apellido");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Primer_Apellido->FldCaption(), $registro->Primer_Apellido->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Numero_Identificacion");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Numero_Identificacion->FldCaption(), $registro->Numero_Identificacion->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Edad");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Edad->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Sexo");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Sexo->FldCaption(), $registro->Sexo->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Pais_Ocurrencia");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Pais_Ocurrencia->FldCaption(), $registro->Pais_Ocurrencia->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Depto_Ocurrencia");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Depto_Ocurrencia->FldCaption(), $registro->Depto_Ocurrencia->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Municipio_Ocurrencia");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Municipio_Ocurrencia->FldCaption(), $registro->Municipio_Ocurrencia->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Cod_Administradora");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Cod_Administradora->FldCaption(), $registro->Cod_Administradora->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Depto_Residencia");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Depto_Residencia->FldCaption(), $registro->Depto_Residencia->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Municipio_Residencia");
			if (elm && !ew_IsHidden(elm) && !ew_HasValue(elm))
				return this.OnError(elm, "<?php echo ew_JsEncode2(str_replace("%s", $registro->Municipio_Residencia->FldCaption(), $registro->Municipio_Residencia->ReqErrMsg)) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Consulta");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Consulta->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Inicio_Sintomas");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Inicio_Sintomas->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Defuncion");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Defuncion->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Numero_Certificado_Defuncion");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Numero_Certificado_Defuncion->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Telefono");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Telefono->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Nacimiento");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Nacimiento->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Telefono_Profesional_Diligencia");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Telefono_Profesional_Diligencia->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Numero_Identificacion_Madre");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Numero_Identificacion_Madre->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Donacion");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Donacion->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Fecha_Resultado_Confirmatorio");
			if (elm && !ew_CheckDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Fecha_Resultado_Confirmatorio->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Hijos_Mujeres_Menores_5");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Hijos_Mujeres_Menores_5->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Hijos_Hombres_Menores_5");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Hijos_Hombres_Menores_5->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_Numero_Semanas_Embarazo");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($registro->Numero_Semanas_Embarazo->FldErrMsg()) ?>");

			// Fire Form_CustomValidate event
			if (!this.Form_CustomValidate(fobj))
				return false;
	}

	// Process detail forms
	var dfs = $fobj.find("input[name='detailpage']").get();
	for (var i = 0; i < dfs.length; i++) {
		var df = dfs[i], val = df.value;
		if (val && ewForms[val])
			if (!ewForms[val].Validate())
				return false;
	}
	return true;
}

// Form_CustomValidate event
fregistroedit.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fregistroedit.ValidateRequired = true;
<?php } else { ?>
fregistroedit.ValidateRequired = false; 
<?php } ?>

// Multi-Page
fregistroedit.MultiPage = new ew_MultiPage("fregistroedit");

// Dynamic selection lists
fregistroedit.Lists["x_Seguimiento"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Condicion_Final"] = {"LinkField":"x_No_Condicion_Final","Ajax":true,"AutoFill":false,"DisplayFields":["x_Condicion_Final","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Codigo_centro"] = {"LinkField":"x_Codigo_Upgd","Ajax":true,"AutoFill":false,"DisplayFields":["x_Upgd","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Codigo_UPGD"] = {"LinkField":"x_Codigo_Upgd","Ajax":true,"AutoFill":false,"DisplayFields":["x_Codigo_Upgd","x_Upgd","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Embarazo_Actual"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Semana"] = {"LinkField":"x_Semana","Ajax":true,"AutoFill":false,"DisplayFields":["x_Semana","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Periodo_Epidemiologico"] = {"LinkField":"x_Periodo_epidemiologico","Ajax":true,"AutoFill":false,"DisplayFields":["x_Periodo_epidemiologico","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Periodo_Sivigila"] = {"LinkField":"x_Periodo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Periodo","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tipo_Id"] = {"LinkField":"x_Cod_Documento","Ajax":true,"AutoFill":false,"DisplayFields":["x_Tipo_Ide","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Unidad_Edad"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Unidad_Edad","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Sexo"] = {"LinkField":"x_Codigo_Sexo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Sexo","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Pais_Ocurrencia"] = {"LinkField":"x_Cod_Pais","Ajax":true,"AutoFill":false,"DisplayFields":["x_Pais","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Depto_Ocurrencia"] = {"LinkField":"x_Cod_Departamento","Ajax":true,"AutoFill":false,"DisplayFields":["x_Departamento","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Municipio_Ocurrencia"] = {"LinkField":"x_Cod_Municipio","Ajax":true,"AutoFill":false,"DisplayFields":["x_Municipio","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Area_Ocurrencia"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Area_Ocurrencia","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Localidad"] = {"LinkField":"x_consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Localidad_Comuna","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Barrio"] = {"LinkField":"x_cod_barrio_vereda","Ajax":true,"AutoFill":false,"DisplayFields":["x_Barrio_Vereda","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Ocupacion"] = {"LinkField":"x_Cod_Ocupacion","Ajax":true,"AutoFill":false,"DisplayFields":["x_Cod_Ocupacion","x_Ocupacion","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tipo_Regimen_Salud"] = {"LinkField":"x_Codigo_Regimen","Ajax":true,"AutoFill":false,"DisplayFields":["x_Codigo_Regimen","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Cod_Administradora"] = {"LinkField":"x_Codigo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Codigo","x_Administradora_Salud","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_discapa"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_desplaz"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_migrant"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_carcela"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_gestan"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_indigen"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_pobicbf"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_mad_com"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_desmovi"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_psiquia"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_vic_vio"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_gp_otros"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Depto_Residencia"] = {"LinkField":"x_Cod_Departamento","Ajax":true,"AutoFill":false,"DisplayFields":["x_Departamento","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Municipio_Residencia"] = {"LinkField":"x_Cod_Municipio","Ajax":true,"AutoFill":false,"DisplayFields":["x_Municipio","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Hospitalizado[]"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Entidad_fallecimiento"] = {"LinkField":"x_Codigo_Upgd","Ajax":true,"AutoFill":false,"DisplayFields":["x_Codigo_Upgd","x_Upgd","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Mecanismo_Probable_Transmision"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Mecanismo_Probable","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tipo_Id_Madre"] = {"LinkField":"x_Cod_Documento","Ajax":true,"AutoFill":false,"DisplayFields":["x_Tipo_Ide","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Indentidad_Genero"] = {"LinkField":"x_Codigo_identidad","Ajax":true,"AutoFill":false,"DisplayFields":["x_Identidad_genero","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Donador_Sangre_Ultimos_12_Meses"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Poblacion_clave"] = {"LinkField":"x_Id","Ajax":true,"AutoFill":false,"DisplayFields":["x_Poblacion_clave","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Recibio_Asesoria_Pre_Prueba"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Recibio_Asesoria_Post_Prueba"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tipo_Prueba"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Tipo_Prueba","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Estado_Clinico_Notificacion"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Estado_Clinico","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Antecedentes_Embarazo"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Candidiasis_esofagica"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Candidiasis_vias_aereas"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tuberculosis_pulmonar"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Cancer_cervical"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Tuberculosis_extrapulmonar"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Coccidiomicosis"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Citomegalovirosis"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Retinitis_citomegalovirosis"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Sindrome_Emanciacion"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Encefalopatia"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Otras_micobacterias"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Histoplasmosis_Extrapulmonar"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_isosporidiasis_cronica"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_herpes_zoster"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Histoplasmosis_diseminada"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Linfoma_Burkitt"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Neumonia_Pneumocystis"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Neumonia_Recurrente"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Linfoma_Inmunoblastico"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Criptosporidiasis_cronica"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Criptococosis_Extrapulmonar"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Sarcoma_Kaposi"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Leucoencefalopatia_Multifocal"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Septicemia_recurrente"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Toxoplasmosis_cerebral"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_HepatitisB"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_HepatitisC"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Meningitis"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_RecuentoCD4"] = {"LinkField":"x_Consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Si_No","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Localidad_residencia"] = {"LinkField":"x_consecutivo","Ajax":true,"AutoFill":false,"DisplayFields":["x_Localidad_Comuna","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};
fregistroedit.Lists["x_Barrio_residencia"] = {"LinkField":"x_cod_barrio_vereda","Ajax":true,"AutoFill":false,"DisplayFields":["x_Barrio_Vereda","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""};

// Form object for search
</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<div class="ewToolbar">
<?php $Breadcrumb->Render(); ?>
<?php echo $Language->SelectionForm(); ?>
<div class="clearfix"></div>
</div>
<?php $registro_edit->ShowPageHeader(); ?>
<?php
$registro_edit->ShowMessage();
?>
<form name="ewPagerForm" class="form-horizontal ewForm ewPagerForm" action="<?php echo ew_CurrentPage() ?>">
<?php if (!isset($registro_edit->Pager)) $registro_edit->Pager = new cPrevNextPager($registro_edit->StartRec, $registro_edit->DisplayRecs, $registro_edit->TotalRecs) ?>
<?php if ($registro_edit->Pager->RecordCount > 0) { ?>
<div class="ewPager">
<span><?php echo $Language->Phrase("Page") ?>&nbsp;</span>
<div class="ewPrevNext"><div class="input-group">
<div class="input-group-btn">
<!--first page button-->
	<?php if ($registro_edit->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default btn-sm" title="<?php echo $Language->Phrase("PagerFirst") ?>" href="<?php echo $registro_edit->PageUrl() ?>start=<?php echo $registro_edit->Pager->FirstButton->Start ?>"><span class="icon-first ewIcon"></span></a>
	<?php } else { ?>
	<a class="btn btn-default btn-sm disabled" title="<?php echo $Language->Phrase("PagerFirst") ?>"><span class="icon-first ewIcon"></span></a>
	<?php } ?>
<!--previous page button-->
	<?php if ($registro_edit->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default btn-sm" title="<?php echo $Language->Phrase("PagerPrevious") ?>" href="<?php echo $registro_edit->PageUrl() ?>start=<?php echo $registro_edit->Pager->PrevButton->Start ?>"><span class="icon-prev ewIcon"></span></a>
	<?php } else { ?>
	<a class="btn btn-default btn-sm disabled" title="<?php echo $Language->Phrase("PagerPrevious") ?>"><span class="icon-prev ewIcon"></span></a>
	<?php } ?>
</div>
<!--current page number-->
	<input class="form-control input-sm" type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $registro_edit->Pager->CurrentPage ?>">
<div class="input-group-btn">
<!--next page button-->
	<?php if ($registro_edit->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default btn-sm" title="<?php echo $Language->Phrase("PagerNext") ?>" href="<?php echo $registro_edit->PageUrl() ?>start=<?php echo $registro_edit->Pager->NextButton->Start ?>"><span class="icon-next ewIcon"></span></a>
	<?php } else { ?>
	<a class="btn btn-default btn-sm disabled" title="<?php echo $Language->Phrase("PagerNext") ?>"><span class="icon-next ewIcon"></span></a>
	<?php } ?>
<!--last page button-->
	<?php if ($registro_edit->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default btn-sm" title="<?php echo $Language->Phrase("PagerLast") ?>" href="<?php echo $registro_edit->PageUrl() ?>start=<?php echo $registro_edit->Pager->LastButton->Start ?>"><span class="icon-last ewIcon"></span></a>
	<?php } else { ?>
	<a class="btn btn-default btn-sm disabled" title="<?php echo $Language->Phrase("PagerLast") ?>"><span class="icon-last ewIcon"></span></a>
	<?php } ?>
</div>
</div>
</div>
<span>&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $registro_edit->Pager->PageCount ?></span>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<form name="fregistroedit" id="fregistroedit" class="<?php echo $registro_edit->FormClassName ?>" action="<?php echo ew_CurrentPage() ?>" method="post">
<?php if ($registro_edit->CheckToken) { ?>
<input type="hidden" name="<?php echo EW_TOKEN_NAME ?>" value="<?php echo $registro_edit->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="registro">
<input type="hidden" name="a_edit" id="a_edit" value="U">
<div class="ewMultiPage">
<div class="tabbable" id="registro_edit">
	<ul class="nav<?php echo $registro_edit->MultiPages->NavStyle() ?>">
		<li<?php echo $registro_edit->MultiPages->TabStyle("1") ?>><a href="#tab_registro1" data-toggle="tab"><?php echo $registro->PageCaption(1) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("2") ?>><a href="#tab_registro2" data-toggle="tab"><?php echo $registro->PageCaption(2) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("3") ?>><a href="#tab_registro3" data-toggle="tab"><?php echo $registro->PageCaption(3) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("4") ?>><a href="#tab_registro4" data-toggle="tab"><?php echo $registro->PageCaption(4) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("5") ?>><a href="#tab_registro5" data-toggle="tab"><?php echo $registro->PageCaption(5) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("6") ?>><a href="#tab_registro6" data-toggle="tab"><?php echo $registro->PageCaption(6) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("7") ?>><a href="#tab_registro7" data-toggle="tab"><?php echo $registro->PageCaption(7) ?></a></li>
		<li<?php echo $registro_edit->MultiPages->TabStyle("8") ?>><a href="#tab_registro8" data-toggle="tab"><?php echo $registro->PageCaption(8) ?></a></li>
	</ul>
	<div class="tab-content">
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("1") ?>" id="tab_registro1">
<div>
<?php if ($registro->Consecutivo->Visible) { // Consecutivo ?>
	<div id="r_Consecutivo" class="form-group">
		<label id="elh_registro_Consecutivo" class="col-sm-2 control-label ewLabel"><?php echo $registro->Consecutivo->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Consecutivo->CellAttributes() ?>>
<span id="el_registro_Consecutivo">
<span<?php echo $registro->Consecutivo->ViewAttributes() ?>>
<p class="form-control-static"><?php echo $registro->Consecutivo->EditValue ?></p></span>
</span>
<input type="hidden" data-table="registro" data-field="x_Consecutivo" data-page="1" name="x_Consecutivo" id="x_Consecutivo" value="<?php echo ew_HtmlEncode($registro->Consecutivo->CurrentValue) ?>">
<?php echo $registro->Consecutivo->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Seguimiento->Visible) { // Seguimiento ?>
	<div id="r_Seguimiento" class="form-group">
		<label id="elh_registro_Seguimiento" class="col-sm-2 control-label ewLabel"><?php echo $registro->Seguimiento->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Seguimiento->CellAttributes() ?>>
<span id="el_registro_Seguimiento">
<div id="tp_x_Seguimiento" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Seguimiento" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Seguimiento->DisplayValueSeparator) ? json_encode($registro->Seguimiento->DisplayValueSeparator) : $registro->Seguimiento->DisplayValueSeparator) ?>" name="x_Seguimiento" id="x_Seguimiento" value="{value}"<?php echo $registro->Seguimiento->EditAttributes() ?>></div>
<div id="dsl_x_Seguimiento" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Seguimiento->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Seguimiento->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Seguimiento" data-page="1" name="x_Seguimiento" id="x_Seguimiento_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Seguimiento->EditAttributes() ?>><?php echo $registro->Seguimiento->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Seguimiento->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Seguimiento" data-page="1" name="x_Seguimiento" id="x_Seguimiento_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Seguimiento->CurrentValue) ?>" checked<?php echo $registro->Seguimiento->EditAttributes() ?>><?php echo $registro->Seguimiento->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Seguimiento->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Seguimiento->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Seguimiento, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Seguimiento->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Seguimiento" id="s_x_Seguimiento" value="<?php echo $registro->Seguimiento->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Seguimiento->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Codigo_centro->Visible) { // Codigo_centro ?>
	<div id="r_Codigo_centro" class="form-group">
		<label id="elh_registro_Codigo_centro" for="x_Codigo_centro" class="col-sm-2 control-label ewLabel"><?php echo $registro->Codigo_centro->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Codigo_centro->CellAttributes() ?>>
<?php if (!$Security->IsAdmin() && $Security->IsLoggedIn() && !$registro->UserIDAllow("edit")) { // Non system admin ?>
<span id="el_registro_Codigo_centro">
<span<?php echo $registro->Codigo_centro->ViewAttributes() ?>>
<p class="form-control-static"><?php echo $registro->Codigo_centro->EditValue ?></p></span>
</span>
<input type="hidden" data-table="registro" data-field="x_Codigo_centro" data-page="1" name="x_Codigo_centro" id="x_Codigo_centro" value="<?php echo ew_HtmlEncode($registro->Codigo_centro->CurrentValue) ?>">
<?php } else { ?>
<span id="el_registro_Codigo_centro">
<select data-table="registro" data-field="x_Codigo_centro" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Codigo_centro->DisplayValueSeparator) ? json_encode($registro->Codigo_centro->DisplayValueSeparator) : $registro->Codigo_centro->DisplayValueSeparator) ?>" id="x_Codigo_centro" name="x_Codigo_centro"<?php echo $registro->Codigo_centro->EditAttributes() ?>>
<?php
if (is_array($registro->Codigo_centro->EditValue)) {
	$arwrk = $registro->Codigo_centro->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Codigo_centro->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Codigo_centro->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Codigo_centro->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Codigo_centro->CurrentValue) ?>" selected><?php echo $registro->Codigo_centro->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Codigo_Upgd`, `Upgd` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `entidad_upgd`";
$sWhereWrk = "";
$registro->Codigo_centro->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Codigo_centro->LookupFilters += array("f0" => "`Codigo_Upgd` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Codigo_centro, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Codigo_centro->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Codigo_centro" id="s_x_Codigo_centro" value="<?php echo $registro->Codigo_centro->LookupFilterQuery() ?>">
</span>
<?php } ?>
<?php echo $registro->Codigo_centro->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Codigo_UPGD->Visible) { // Codigo_UPGD ?>
	<div id="r_Codigo_UPGD" class="form-group">
		<label id="elh_registro_Codigo_UPGD" class="col-sm-2 control-label ewLabel"><?php echo $registro->Codigo_UPGD->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Codigo_UPGD->CellAttributes() ?>>
<span id="el_registro_Codigo_UPGD">
<?php
$wrkonchange = trim(" " . @$registro->Codigo_UPGD->EditAttrs["onchange"]);
if ($wrkonchange <> "") $wrkonchange = " onchange=\"" . ew_JsEncode2($wrkonchange) . "\"";
$registro->Codigo_UPGD->EditAttrs["onchange"] = "";
?>
<span id="as_x_Codigo_UPGD" style="white-space: nowrap; z-index: 8950">
	<input type="text" name="sv_x_Codigo_UPGD" id="sv_x_Codigo_UPGD" value="<?php echo $registro->Codigo_UPGD->EditValue ?>" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Codigo_UPGD->getPlaceHolder()) ?>" data-placeholder="<?php echo ew_HtmlEncode($registro->Codigo_UPGD->getPlaceHolder()) ?>"<?php echo $registro->Codigo_UPGD->EditAttributes() ?>>
</span>
<input type="hidden" data-table="registro" data-field="x_Codigo_UPGD" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Codigo_UPGD->DisplayValueSeparator) ? json_encode($registro->Codigo_UPGD->DisplayValueSeparator) : $registro->Codigo_UPGD->DisplayValueSeparator) ?>" name="x_Codigo_UPGD" id="x_Codigo_UPGD" value="<?php echo ew_HtmlEncode($registro->Codigo_UPGD->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<?php
$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld` FROM `entidad_upgd`";
$sWhereWrk = "`Codigo_Upgd` LIKE '%{query_value}%' OR `Upgd` LIKE '%{query_value}%' OR CONCAT(`Codigo_Upgd`,'" . ew_ValueSeparator(1, $Page->Codigo_UPGD) . "',`Upgd`) LIKE '{query_value}%'";
$registro->Lookup_Selecting($registro->Codigo_UPGD, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES;
?>
<input type="hidden" name="q_x_Codigo_UPGD" id="q_x_Codigo_UPGD" value="s=<?php echo ew_Encrypt($sSqlWrk) ?>&d=">
<script type="text/javascript">
fregistroedit.CreateAutoSuggest({"id":"x_Codigo_UPGD","forceSelect":true});
</script>
</span>
<?php echo $registro->Codigo_UPGD->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Cod_Evento->Visible) { // Cod_Evento ?>
	<div id="r_Cod_Evento" class="form-group">
		<label id="elh_registro_Cod_Evento" for="x_Cod_Evento" class="col-sm-2 control-label ewLabel"><?php echo $registro->Cod_Evento->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Cod_Evento->CellAttributes() ?>>
<span id="el_registro_Cod_Evento">
<input type="text" data-table="registro" data-field="x_Cod_Evento" data-page="1" name="x_Cod_Evento" id="x_Cod_Evento" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Cod_Evento->getPlaceHolder()) ?>" value="<?php echo $registro->Cod_Evento->EditValue ?>"<?php echo $registro->Cod_Evento->EditAttributes() ?>>
</span>
<?php echo $registro->Cod_Evento->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Notificacion->Visible) { // Fecha_Notificacion ?>
	<div id="r_Fecha_Notificacion" class="form-group">
		<label id="elh_registro_Fecha_Notificacion" for="x_Fecha_Notificacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Notificacion->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Notificacion->CellAttributes() ?>>
<span id="el_registro_Fecha_Notificacion">
<input type="text" data-table="registro" data-field="x_Fecha_Notificacion" data-page="1" data-format="5" name="x_Fecha_Notificacion" id="x_Fecha_Notificacion" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Notificacion->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Notificacion->EditValue ?>"<?php echo $registro->Fecha_Notificacion->EditAttributes() ?>>
<?php if (!$registro->Fecha_Notificacion->ReadOnly && !$registro->Fecha_Notificacion->Disabled && !isset($registro->Fecha_Notificacion->EditAttrs["readonly"]) && !isset($registro->Fecha_Notificacion->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Notificacion", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Notificacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Semana->Visible) { // Semana ?>
	<div id="r_Semana" class="form-group">
		<label id="elh_registro_Semana" for="x_Semana" class="col-sm-2 control-label ewLabel"><?php echo $registro->Semana->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Semana->CellAttributes() ?>>
<span id="el_registro_Semana">
<select data-table="registro" data-field="x_Semana" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Semana->DisplayValueSeparator) ? json_encode($registro->Semana->DisplayValueSeparator) : $registro->Semana->DisplayValueSeparator) ?>" id="x_Semana" name="x_Semana"<?php echo $registro->Semana->EditAttributes() ?>>
<?php
if (is_array($registro->Semana->EditValue)) {
	$arwrk = $registro->Semana->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Semana->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Semana->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Semana->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Semana->CurrentValue) ?>" selected><?php echo $registro->Semana->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Semana`, `Semana` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `semana_epidemiologica`";
$sWhereWrk = "";
$registro->Semana->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Semana->LookupFilters += array("f0" => "`Semana` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Semana, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Semana->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Semana" id="s_x_Semana" value="<?php echo $registro->Semana->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Semana->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Periodo_Epidemiologico->Visible) { // Periodo_Epidemiologico ?>
	<div id="r_Periodo_Epidemiologico" class="form-group">
		<label id="elh_registro_Periodo_Epidemiologico" for="x_Periodo_Epidemiologico" class="col-sm-2 control-label ewLabel"><?php echo $registro->Periodo_Epidemiologico->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Periodo_Epidemiologico->CellAttributes() ?>>
<span id="el_registro_Periodo_Epidemiologico">
<select data-table="registro" data-field="x_Periodo_Epidemiologico" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Periodo_Epidemiologico->DisplayValueSeparator) ? json_encode($registro->Periodo_Epidemiologico->DisplayValueSeparator) : $registro->Periodo_Epidemiologico->DisplayValueSeparator) ?>" id="x_Periodo_Epidemiologico" name="x_Periodo_Epidemiologico"<?php echo $registro->Periodo_Epidemiologico->EditAttributes() ?>>
<?php
if (is_array($registro->Periodo_Epidemiologico->EditValue)) {
	$arwrk = $registro->Periodo_Epidemiologico->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Periodo_Epidemiologico->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Periodo_Epidemiologico->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Periodo_Epidemiologico->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Periodo_Epidemiologico->CurrentValue) ?>" selected><?php echo $registro->Periodo_Epidemiologico->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Periodo_epidemiologico`, `Periodo_epidemiologico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `periodo_epidemiologico`";
$sWhereWrk = "";
$registro->Periodo_Epidemiologico->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Periodo_Epidemiologico->LookupFilters += array("f0" => "`Periodo_epidemiologico` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Periodo_Epidemiologico, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Periodo_Epidemiologico->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Periodo_Epidemiologico" id="s_x_Periodo_Epidemiologico" value="<?php echo $registro->Periodo_Epidemiologico->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Periodo_Epidemiologico->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Periodo_Sivigila->Visible) { // Periodo_Sivigila ?>
	<div id="r_Periodo_Sivigila" class="form-group">
		<label id="elh_registro_Periodo_Sivigila" for="x_Periodo_Sivigila" class="col-sm-2 control-label ewLabel"><?php echo $registro->Periodo_Sivigila->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Periodo_Sivigila->CellAttributes() ?>>
<span id="el_registro_Periodo_Sivigila">
<select data-table="registro" data-field="x_Periodo_Sivigila" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Periodo_Sivigila->DisplayValueSeparator) ? json_encode($registro->Periodo_Sivigila->DisplayValueSeparator) : $registro->Periodo_Sivigila->DisplayValueSeparator) ?>" id="x_Periodo_Sivigila" name="x_Periodo_Sivigila"<?php echo $registro->Periodo_Sivigila->EditAttributes() ?>>
<?php
if (is_array($registro->Periodo_Sivigila->EditValue)) {
	$arwrk = $registro->Periodo_Sivigila->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Periodo_Sivigila->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Periodo_Sivigila->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Periodo_Sivigila->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Periodo_Sivigila->CurrentValue) ?>" selected><?php echo $registro->Periodo_Sivigila->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Periodo`, `Periodo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `periodo`";
$sWhereWrk = "";
$registro->Periodo_Sivigila->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Periodo_Sivigila->LookupFilters += array("f0" => "`Periodo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Periodo_Sivigila, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Periodo_Sivigila->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Periodo_Sivigila" id="s_x_Periodo_Sivigila" value="<?php echo $registro->Periodo_Sivigila->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Periodo_Sivigila->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Localidad_residencia->Visible) { // Localidad_residencia ?>
	<div id="r_Localidad_residencia" class="form-group">
		<label id="elh_registro_Localidad_residencia" for="x_Localidad_residencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Localidad_residencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Localidad_residencia->CellAttributes() ?>>
<span id="el_registro_Localidad_residencia">
<select data-table="registro" data-field="x_Localidad_residencia" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Localidad_residencia->DisplayValueSeparator) ? json_encode($registro->Localidad_residencia->DisplayValueSeparator) : $registro->Localidad_residencia->DisplayValueSeparator) ?>" id="x_Localidad_residencia" name="x_Localidad_residencia"<?php echo $registro->Localidad_residencia->EditAttributes() ?>>
<?php
if (is_array($registro->Localidad_residencia->EditValue)) {
	$arwrk = $registro->Localidad_residencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Localidad_residencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Localidad_residencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Localidad_residencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Localidad_residencia->CurrentValue) ?>" selected><?php echo $registro->Localidad_residencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidad`";
$sWhereWrk = "";
$registro->Localidad_residencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Localidad_residencia->LookupFilters += array("f0" => "`consecutivo` = {filter_value}", "t0" => "19", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Localidad_residencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Localidad_residencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Localidad_residencia" id="s_x_Localidad_residencia" value="<?php echo $registro->Localidad_residencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Localidad_residencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Barrio_residencia->Visible) { // Barrio_residencia ?>
	<div id="r_Barrio_residencia" class="form-group">
		<label id="elh_registro_Barrio_residencia" for="x_Barrio_residencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Barrio_residencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Barrio_residencia->CellAttributes() ?>>
<span id="el_registro_Barrio_residencia">
<select data-table="registro" data-field="x_Barrio_residencia" data-page="1" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Barrio_residencia->DisplayValueSeparator) ? json_encode($registro->Barrio_residencia->DisplayValueSeparator) : $registro->Barrio_residencia->DisplayValueSeparator) ?>" id="x_Barrio_residencia" name="x_Barrio_residencia"<?php echo $registro->Barrio_residencia->EditAttributes() ?>>
<?php
if (is_array($registro->Barrio_residencia->EditValue)) {
	$arwrk = $registro->Barrio_residencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Barrio_residencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Barrio_residencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Barrio_residencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Barrio_residencia->CurrentValue) ?>" selected><?php echo $registro->Barrio_residencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `barrios_veredas`";
$sWhereWrk = "";
$registro->Barrio_residencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Barrio_residencia->LookupFilters += array("f0" => "`cod_barrio_vereda` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Barrio_residencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Barrio_residencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Barrio_residencia" id="s_x_Barrio_residencia" value="<?php echo $registro->Barrio_residencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Barrio_residencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("2") ?>" id="tab_registro2">
<div>
<?php if ($registro->Primer_Nombre->Visible) { // Primer_Nombre ?>
	<div id="r_Primer_Nombre" class="form-group">
		<label id="elh_registro_Primer_Nombre" for="x_Primer_Nombre" class="col-sm-2 control-label ewLabel"><?php echo $registro->Primer_Nombre->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Primer_Nombre->CellAttributes() ?>>
<span id="el_registro_Primer_Nombre">
<input type="text" data-table="registro" data-field="x_Primer_Nombre" data-page="2" name="x_Primer_Nombre" id="x_Primer_Nombre" size="30" maxlength="50" placeholder="<?php echo ew_HtmlEncode($registro->Primer_Nombre->getPlaceHolder()) ?>" value="<?php echo $registro->Primer_Nombre->EditValue ?>"<?php echo $registro->Primer_Nombre->EditAttributes() ?>>
</span>
<?php echo $registro->Primer_Nombre->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Segundo_Nombre->Visible) { // Segundo_Nombre ?>
	<div id="r_Segundo_Nombre" class="form-group">
		<label id="elh_registro_Segundo_Nombre" for="x_Segundo_Nombre" class="col-sm-2 control-label ewLabel"><?php echo $registro->Segundo_Nombre->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Segundo_Nombre->CellAttributes() ?>>
<span id="el_registro_Segundo_Nombre">
<input type="text" data-table="registro" data-field="x_Segundo_Nombre" data-page="2" name="x_Segundo_Nombre" id="x_Segundo_Nombre" size="30" maxlength="50" placeholder="<?php echo ew_HtmlEncode($registro->Segundo_Nombre->getPlaceHolder()) ?>" value="<?php echo $registro->Segundo_Nombre->EditValue ?>"<?php echo $registro->Segundo_Nombre->EditAttributes() ?>>
</span>
<?php echo $registro->Segundo_Nombre->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Primer_Apellido->Visible) { // Primer_Apellido ?>
	<div id="r_Primer_Apellido" class="form-group">
		<label id="elh_registro_Primer_Apellido" for="x_Primer_Apellido" class="col-sm-2 control-label ewLabel"><?php echo $registro->Primer_Apellido->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Primer_Apellido->CellAttributes() ?>>
<span id="el_registro_Primer_Apellido">
<input type="text" data-table="registro" data-field="x_Primer_Apellido" data-page="2" name="x_Primer_Apellido" id="x_Primer_Apellido" size="30" maxlength="50" placeholder="<?php echo ew_HtmlEncode($registro->Primer_Apellido->getPlaceHolder()) ?>" value="<?php echo $registro->Primer_Apellido->EditValue ?>"<?php echo $registro->Primer_Apellido->EditAttributes() ?>>
</span>
<?php echo $registro->Primer_Apellido->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Segundo_Apellido->Visible) { // Segundo_Apellido ?>
	<div id="r_Segundo_Apellido" class="form-group">
		<label id="elh_registro_Segundo_Apellido" for="x_Segundo_Apellido" class="col-sm-2 control-label ewLabel"><?php echo $registro->Segundo_Apellido->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Segundo_Apellido->CellAttributes() ?>>
<span id="el_registro_Segundo_Apellido">
<input type="text" data-table="registro" data-field="x_Segundo_Apellido" data-page="2" name="x_Segundo_Apellido" id="x_Segundo_Apellido" size="30" maxlength="50" placeholder="<?php echo ew_HtmlEncode($registro->Segundo_Apellido->getPlaceHolder()) ?>" value="<?php echo $registro->Segundo_Apellido->EditValue ?>"<?php echo $registro->Segundo_Apellido->EditAttributes() ?>>
</span>
<?php echo $registro->Segundo_Apellido->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tipo_Id->Visible) { // Tipo_Id ?>
	<div id="r_Tipo_Id" class="form-group">
		<label id="elh_registro_Tipo_Id" for="x_Tipo_Id" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tipo_Id->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tipo_Id->CellAttributes() ?>>
<span id="el_registro_Tipo_Id">
<select data-table="registro" data-field="x_Tipo_Id" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tipo_Id->DisplayValueSeparator) ? json_encode($registro->Tipo_Id->DisplayValueSeparator) : $registro->Tipo_Id->DisplayValueSeparator) ?>" id="x_Tipo_Id" name="x_Tipo_Id"<?php echo $registro->Tipo_Id->EditAttributes() ?>>
<?php
if (is_array($registro->Tipo_Id->EditValue)) {
	$arwrk = $registro->Tipo_Id->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Tipo_Id->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Tipo_Id->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Tipo_Id->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Tipo_Id->CurrentValue) ?>" selected><?php echo $registro->Tipo_Id->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_documento`";
$sWhereWrk = "";
$registro->Tipo_Id->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tipo_Id->LookupFilters += array("f0" => "`Cod_Documento` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tipo_Id, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tipo_Id->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tipo_Id" id="s_x_Tipo_Id" value="<?php echo $registro->Tipo_Id->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tipo_Id->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Numero_Identificacion->Visible) { // Numero_Identificacion ?>
	<div id="r_Numero_Identificacion" class="form-group">
		<label id="elh_registro_Numero_Identificacion" for="x_Numero_Identificacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Numero_Identificacion->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Numero_Identificacion->CellAttributes() ?>>
<span id="el_registro_Numero_Identificacion">
<input type="text" data-table="registro" data-field="x_Numero_Identificacion" data-page="2" name="x_Numero_Identificacion" id="x_Numero_Identificacion" size="30" maxlength="100" placeholder="<?php echo ew_HtmlEncode($registro->Numero_Identificacion->getPlaceHolder()) ?>" value="<?php echo $registro->Numero_Identificacion->EditValue ?>"<?php echo $registro->Numero_Identificacion->EditAttributes() ?>>
</span>
<?php echo $registro->Numero_Identificacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Edad->Visible) { // Edad ?>
	<div id="r_Edad" class="form-group">
		<label id="elh_registro_Edad" for="x_Edad" class="col-sm-2 control-label ewLabel"><?php echo $registro->Edad->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Edad->CellAttributes() ?>>
<span id="el_registro_Edad">
<input type="text" data-table="registro" data-field="x_Edad" data-page="2" name="x_Edad" id="x_Edad" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Edad->getPlaceHolder()) ?>" value="<?php echo $registro->Edad->EditValue ?>"<?php echo $registro->Edad->EditAttributes() ?>>
</span>
<?php echo $registro->Edad->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Unidad_Edad->Visible) { // Unidad_Edad ?>
	<div id="r_Unidad_Edad" class="form-group">
		<label id="elh_registro_Unidad_Edad" for="x_Unidad_Edad" class="col-sm-2 control-label ewLabel"><?php echo $registro->Unidad_Edad->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Unidad_Edad->CellAttributes() ?>>
<span id="el_registro_Unidad_Edad">
<select data-table="registro" data-field="x_Unidad_Edad" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Unidad_Edad->DisplayValueSeparator) ? json_encode($registro->Unidad_Edad->DisplayValueSeparator) : $registro->Unidad_Edad->DisplayValueSeparator) ?>" id="x_Unidad_Edad" name="x_Unidad_Edad"<?php echo $registro->Unidad_Edad->EditAttributes() ?>>
<?php
if (is_array($registro->Unidad_Edad->EditValue)) {
	$arwrk = $registro->Unidad_Edad->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Unidad_Edad->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Unidad_Edad->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Unidad_Edad->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Unidad_Edad->CurrentValue) ?>" selected><?php echo $registro->Unidad_Edad->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Unidad_Edad` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `unidad_medida_edad`";
$sWhereWrk = "";
$registro->Unidad_Edad->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Unidad_Edad->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Unidad_Edad, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Unidad_Edad->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Unidad_Edad" id="s_x_Unidad_Edad" value="<?php echo $registro->Unidad_Edad->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Unidad_Edad->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Sexo->Visible) { // Sexo ?>
	<div id="r_Sexo" class="form-group">
		<label id="elh_registro_Sexo" for="x_Sexo" class="col-sm-2 control-label ewLabel"><?php echo $registro->Sexo->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Sexo->CellAttributes() ?>>
<span id="el_registro_Sexo">
<select data-table="registro" data-field="x_Sexo" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Sexo->DisplayValueSeparator) ? json_encode($registro->Sexo->DisplayValueSeparator) : $registro->Sexo->DisplayValueSeparator) ?>" id="x_Sexo" name="x_Sexo"<?php echo $registro->Sexo->EditAttributes() ?>>
<?php
if (is_array($registro->Sexo->EditValue)) {
	$arwrk = $registro->Sexo->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Sexo->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Sexo->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Sexo->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Sexo->CurrentValue) ?>" selected><?php echo $registro->Sexo->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Codigo_Sexo`, `Sexo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo`";
$sWhereWrk = "";
$registro->Sexo->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Sexo->LookupFilters += array("f0" => "`Codigo_Sexo` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Sexo, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Sexo->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Sexo" id="s_x_Sexo" value="<?php echo $registro->Sexo->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Sexo->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Pais_Ocurrencia->Visible) { // Pais_Ocurrencia ?>
	<div id="r_Pais_Ocurrencia" class="form-group">
		<label id="elh_registro_Pais_Ocurrencia" for="x_Pais_Ocurrencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Pais_Ocurrencia->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Pais_Ocurrencia->CellAttributes() ?>>
<span id="el_registro_Pais_Ocurrencia">
<select data-table="registro" data-field="x_Pais_Ocurrencia" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Pais_Ocurrencia->DisplayValueSeparator) ? json_encode($registro->Pais_Ocurrencia->DisplayValueSeparator) : $registro->Pais_Ocurrencia->DisplayValueSeparator) ?>" id="x_Pais_Ocurrencia" name="x_Pais_Ocurrencia"<?php echo $registro->Pais_Ocurrencia->EditAttributes() ?>>
<?php
if (is_array($registro->Pais_Ocurrencia->EditValue)) {
	$arwrk = $registro->Pais_Ocurrencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Pais_Ocurrencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Pais_Ocurrencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Pais_Ocurrencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Pais_Ocurrencia->CurrentValue) ?>" selected><?php echo $registro->Pais_Ocurrencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Pais`, `Pais` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `pais`";
$sWhereWrk = "";
$registro->Pais_Ocurrencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Pais_Ocurrencia->LookupFilters += array("f0" => "`Cod_Pais` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Pais_Ocurrencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Pais_Ocurrencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Pais_Ocurrencia" id="s_x_Pais_Ocurrencia" value="<?php echo $registro->Pais_Ocurrencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Pais_Ocurrencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Depto_Ocurrencia->Visible) { // Depto_Ocurrencia ?>
	<div id="r_Depto_Ocurrencia" class="form-group">
		<label id="elh_registro_Depto_Ocurrencia" for="x_Depto_Ocurrencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Depto_Ocurrencia->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Depto_Ocurrencia->CellAttributes() ?>>
<span id="el_registro_Depto_Ocurrencia">
<select data-table="registro" data-field="x_Depto_Ocurrencia" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Depto_Ocurrencia->DisplayValueSeparator) ? json_encode($registro->Depto_Ocurrencia->DisplayValueSeparator) : $registro->Depto_Ocurrencia->DisplayValueSeparator) ?>" id="x_Depto_Ocurrencia" name="x_Depto_Ocurrencia"<?php echo $registro->Depto_Ocurrencia->EditAttributes() ?>>
<?php
if (is_array($registro->Depto_Ocurrencia->EditValue)) {
	$arwrk = $registro->Depto_Ocurrencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Depto_Ocurrencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Depto_Ocurrencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Depto_Ocurrencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Depto_Ocurrencia->CurrentValue) ?>" selected><?php echo $registro->Depto_Ocurrencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`";
$sWhereWrk = "";
$registro->Depto_Ocurrencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Depto_Ocurrencia->LookupFilters += array("f0" => "`Cod_Departamento` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Depto_Ocurrencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Depto_Ocurrencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Depto_Ocurrencia" id="s_x_Depto_Ocurrencia" value="<?php echo $registro->Depto_Ocurrencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Depto_Ocurrencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Municipio_Ocurrencia->Visible) { // Municipio_Ocurrencia ?>
	<div id="r_Municipio_Ocurrencia" class="form-group">
		<label id="elh_registro_Municipio_Ocurrencia" for="x_Municipio_Ocurrencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Municipio_Ocurrencia->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Municipio_Ocurrencia->CellAttributes() ?>>
<span id="el_registro_Municipio_Ocurrencia">
<select data-table="registro" data-field="x_Municipio_Ocurrencia" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Municipio_Ocurrencia->DisplayValueSeparator) ? json_encode($registro->Municipio_Ocurrencia->DisplayValueSeparator) : $registro->Municipio_Ocurrencia->DisplayValueSeparator) ?>" id="x_Municipio_Ocurrencia" name="x_Municipio_Ocurrencia"<?php echo $registro->Municipio_Ocurrencia->EditAttributes() ?>>
<?php
if (is_array($registro->Municipio_Ocurrencia->EditValue)) {
	$arwrk = $registro->Municipio_Ocurrencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Municipio_Ocurrencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Municipio_Ocurrencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Municipio_Ocurrencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Municipio_Ocurrencia->CurrentValue) ?>" selected><?php echo $registro->Municipio_Ocurrencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`";
$sWhereWrk = "";
$registro->Municipio_Ocurrencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Municipio_Ocurrencia->LookupFilters += array("f0" => "`Cod_Municipio` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Municipio_Ocurrencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Municipio_Ocurrencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Municipio_Ocurrencia" id="s_x_Municipio_Ocurrencia" value="<?php echo $registro->Municipio_Ocurrencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Municipio_Ocurrencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Area_Ocurrencia->Visible) { // Area_Ocurrencia ?>
	<div id="r_Area_Ocurrencia" class="form-group">
		<label id="elh_registro_Area_Ocurrencia" for="x_Area_Ocurrencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Area_Ocurrencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Area_Ocurrencia->CellAttributes() ?>>
<span id="el_registro_Area_Ocurrencia">
<select data-table="registro" data-field="x_Area_Ocurrencia" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Area_Ocurrencia->DisplayValueSeparator) ? json_encode($registro->Area_Ocurrencia->DisplayValueSeparator) : $registro->Area_Ocurrencia->DisplayValueSeparator) ?>" id="x_Area_Ocurrencia" name="x_Area_Ocurrencia"<?php echo $registro->Area_Ocurrencia->EditAttributes() ?>>
<?php
if (is_array($registro->Area_Ocurrencia->EditValue)) {
	$arwrk = $registro->Area_Ocurrencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Area_Ocurrencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Area_Ocurrencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Area_Ocurrencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Area_Ocurrencia->CurrentValue) ?>" selected><?php echo $registro->Area_Ocurrencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Area_Ocurrencia` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `area_ocurrencia`";
$sWhereWrk = "";
$registro->Area_Ocurrencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Area_Ocurrencia->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Area_Ocurrencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Area_Ocurrencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Area_Ocurrencia" id="s_x_Area_Ocurrencia" value="<?php echo $registro->Area_Ocurrencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Area_Ocurrencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Localidad->Visible) { // Localidad ?>
	<div id="r_Localidad" class="form-group">
		<label id="elh_registro_Localidad" for="x_Localidad" class="col-sm-2 control-label ewLabel"><?php echo $registro->Localidad->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Localidad->CellAttributes() ?>>
<span id="el_registro_Localidad">
<select data-table="registro" data-field="x_Localidad" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Localidad->DisplayValueSeparator) ? json_encode($registro->Localidad->DisplayValueSeparator) : $registro->Localidad->DisplayValueSeparator) ?>" id="x_Localidad" name="x_Localidad"<?php echo $registro->Localidad->EditAttributes() ?>>
<?php
if (is_array($registro->Localidad->EditValue)) {
	$arwrk = $registro->Localidad->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Localidad->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Localidad->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Localidad->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Localidad->CurrentValue) ?>" selected><?php echo $registro->Localidad->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `consecutivo`, `Localidad_Comuna` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidad`";
$sWhereWrk = "";
$registro->Localidad->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Localidad->LookupFilters += array("f0" => "`consecutivo` = {filter_value}", "t0" => "19", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Localidad, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Localidad->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Localidad" id="s_x_Localidad" value="<?php echo $registro->Localidad->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Localidad->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Barrio->Visible) { // Barrio ?>
	<div id="r_Barrio" class="form-group">
		<label id="elh_registro_Barrio" for="x_Barrio" class="col-sm-2 control-label ewLabel"><?php echo $registro->Barrio->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Barrio->CellAttributes() ?>>
<span id="el_registro_Barrio">
<select data-table="registro" data-field="x_Barrio" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Barrio->DisplayValueSeparator) ? json_encode($registro->Barrio->DisplayValueSeparator) : $registro->Barrio->DisplayValueSeparator) ?>" id="x_Barrio" name="x_Barrio"<?php echo $registro->Barrio->EditAttributes() ?>>
<?php
if (is_array($registro->Barrio->EditValue)) {
	$arwrk = $registro->Barrio->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Barrio->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Barrio->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Barrio->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Barrio->CurrentValue) ?>" selected><?php echo $registro->Barrio->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `cod_barrio_vereda`, `Barrio_Vereda` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `barrios_veredas`";
$sWhereWrk = "";
$registro->Barrio->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Barrio->LookupFilters += array("f0" => "`cod_barrio_vereda` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Barrio, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Barrio->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Barrio" id="s_x_Barrio" value="<?php echo $registro->Barrio->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Barrio->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Direccion_Residencia->Visible) { // Direccion_Residencia ?>
	<div id="r_Direccion_Residencia" class="form-group">
		<label id="elh_registro_Direccion_Residencia" for="x_Direccion_Residencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Direccion_Residencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Direccion_Residencia->CellAttributes() ?>>
<span id="el_registro_Direccion_Residencia">
<input type="text" data-table="registro" data-field="x_Direccion_Residencia" data-page="2" name="x_Direccion_Residencia" id="x_Direccion_Residencia" size="30" maxlength="100" placeholder="<?php echo ew_HtmlEncode($registro->Direccion_Residencia->getPlaceHolder()) ?>" value="<?php echo $registro->Direccion_Residencia->EditValue ?>"<?php echo $registro->Direccion_Residencia->EditAttributes() ?>>
</span>
<?php echo $registro->Direccion_Residencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Ocupacion->Visible) { // Ocupacion ?>
	<div id="r_Ocupacion" class="form-group">
		<label id="elh_registro_Ocupacion" for="x_Ocupacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Ocupacion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Ocupacion->CellAttributes() ?>>
<span id="el_registro_Ocupacion">
<select data-table="registro" data-field="x_Ocupacion" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Ocupacion->DisplayValueSeparator) ? json_encode($registro->Ocupacion->DisplayValueSeparator) : $registro->Ocupacion->DisplayValueSeparator) ?>" id="x_Ocupacion" name="x_Ocupacion"<?php echo $registro->Ocupacion->EditAttributes() ?>>
<?php
if (is_array($registro->Ocupacion->EditValue)) {
	$arwrk = $registro->Ocupacion->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Ocupacion->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Ocupacion->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Ocupacion->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Ocupacion->CurrentValue) ?>" selected><?php echo $registro->Ocupacion->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Ocupacion`, `Cod_Ocupacion` AS `DispFld`, `Ocupacion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ocupacion`";
$sWhereWrk = "";
$registro->Ocupacion->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Ocupacion->LookupFilters += array("f0" => "`Cod_Ocupacion` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Ocupacion, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Ocupacion->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Ocupacion" id="s_x_Ocupacion" value="<?php echo $registro->Ocupacion->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Ocupacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tipo_Regimen_Salud->Visible) { // Tipo_Regimen_Salud ?>
	<div id="r_Tipo_Regimen_Salud" class="form-group">
		<label id="elh_registro_Tipo_Regimen_Salud" for="x_Tipo_Regimen_Salud" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tipo_Regimen_Salud->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tipo_Regimen_Salud->CellAttributes() ?>>
<span id="el_registro_Tipo_Regimen_Salud">
<select data-table="registro" data-field="x_Tipo_Regimen_Salud" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tipo_Regimen_Salud->DisplayValueSeparator) ? json_encode($registro->Tipo_Regimen_Salud->DisplayValueSeparator) : $registro->Tipo_Regimen_Salud->DisplayValueSeparator) ?>" id="x_Tipo_Regimen_Salud" name="x_Tipo_Regimen_Salud"<?php echo $registro->Tipo_Regimen_Salud->EditAttributes() ?>>
<?php
if (is_array($registro->Tipo_Regimen_Salud->EditValue)) {
	$arwrk = $registro->Tipo_Regimen_Salud->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Tipo_Regimen_Salud->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Tipo_Regimen_Salud->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Tipo_Regimen_Salud->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Tipo_Regimen_Salud->CurrentValue) ?>" selected><?php echo $registro->Tipo_Regimen_Salud->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Codigo_Regimen`, `Codigo_Regimen` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_regimen_salud`";
$sWhereWrk = "";
$registro->Tipo_Regimen_Salud->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tipo_Regimen_Salud->LookupFilters += array("f0" => "`Codigo_Regimen` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tipo_Regimen_Salud, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tipo_Regimen_Salud->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tipo_Regimen_Salud" id="s_x_Tipo_Regimen_Salud" value="<?php echo $registro->Tipo_Regimen_Salud->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tipo_Regimen_Salud->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Cod_Administradora->Visible) { // Cod_Administradora ?>
	<div id="r_Cod_Administradora" class="form-group">
		<label id="elh_registro_Cod_Administradora" for="x_Cod_Administradora" class="col-sm-2 control-label ewLabel"><?php echo $registro->Cod_Administradora->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Cod_Administradora->CellAttributes() ?>>
<span id="el_registro_Cod_Administradora">
<select data-table="registro" data-field="x_Cod_Administradora" data-page="2" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Cod_Administradora->DisplayValueSeparator) ? json_encode($registro->Cod_Administradora->DisplayValueSeparator) : $registro->Cod_Administradora->DisplayValueSeparator) ?>" id="x_Cod_Administradora" name="x_Cod_Administradora"<?php echo $registro->Cod_Administradora->EditAttributes() ?>>
<?php
if (is_array($registro->Cod_Administradora->EditValue)) {
	$arwrk = $registro->Cod_Administradora->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Cod_Administradora->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Cod_Administradora->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Cod_Administradora->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Cod_Administradora->CurrentValue) ?>" selected><?php echo $registro->Cod_Administradora->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Codigo`, `Codigo` AS `DispFld`, `Administradora_Salud` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `administradora_salud`";
$sWhereWrk = "";
$registro->Cod_Administradora->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Cod_Administradora->LookupFilters += array("f0" => "`Codigo` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Cod_Administradora, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Cod_Administradora->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Cod_Administradora" id="s_x_Cod_Administradora" value="<?php echo $registro->Cod_Administradora->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Cod_Administradora->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Telefono->Visible) { // Telefono ?>
	<div id="r_Telefono" class="form-group">
		<label id="elh_registro_Telefono" for="x_Telefono" class="col-sm-2 control-label ewLabel"><?php echo $registro->Telefono->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Telefono->CellAttributes() ?>>
<span id="el_registro_Telefono">
<input type="text" data-table="registro" data-field="x_Telefono" data-page="2" name="x_Telefono" id="x_Telefono" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Telefono->getPlaceHolder()) ?>" value="<?php echo $registro->Telefono->EditValue ?>"<?php echo $registro->Telefono->EditAttributes() ?>>
</span>
<?php echo $registro->Telefono->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Nacimiento->Visible) { // Fecha_Nacimiento ?>
	<div id="r_Fecha_Nacimiento" class="form-group">
		<label id="elh_registro_Fecha_Nacimiento" for="x_Fecha_Nacimiento" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Nacimiento->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Nacimiento->CellAttributes() ?>>
<span id="el_registro_Fecha_Nacimiento">
<input type="text" data-table="registro" data-field="x_Fecha_Nacimiento" data-page="2" data-format="5" name="x_Fecha_Nacimiento" id="x_Fecha_Nacimiento" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Nacimiento->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Nacimiento->EditValue ?>"<?php echo $registro->Fecha_Nacimiento->EditAttributes() ?>>
<?php if (!$registro->Fecha_Nacimiento->ReadOnly && !$registro->Fecha_Nacimiento->Disabled && !isset($registro->Fecha_Nacimiento->EditAttrs["readonly"]) && !isset($registro->Fecha_Nacimiento->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Nacimiento", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Nacimiento->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("3") ?>" id="tab_registro3">
<div>
<?php if ($registro->gp_discapa->Visible) { // gp_discapa ?>
	<div id="r_gp_discapa" class="form-group">
		<label id="elh_registro_gp_discapa" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_discapa->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_discapa->CellAttributes() ?>>
<span id="el_registro_gp_discapa">
<div id="tp_x_gp_discapa" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_discapa" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_discapa->DisplayValueSeparator) ? json_encode($registro->gp_discapa->DisplayValueSeparator) : $registro->gp_discapa->DisplayValueSeparator) ?>" name="x_gp_discapa" id="x_gp_discapa" value="{value}"<?php echo $registro->gp_discapa->EditAttributes() ?>></div>
<div id="dsl_x_gp_discapa" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_discapa->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_discapa->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_discapa" data-page="3" name="x_gp_discapa" id="x_gp_discapa_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_discapa->EditAttributes() ?>><?php echo $registro->gp_discapa->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_discapa->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_discapa" data-page="3" name="x_gp_discapa" id="x_gp_discapa_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_discapa->CurrentValue) ?>" checked<?php echo $registro->gp_discapa->EditAttributes() ?>><?php echo $registro->gp_discapa->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_discapa->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_discapa->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_discapa, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_discapa->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_discapa" id="s_x_gp_discapa" value="<?php echo $registro->gp_discapa->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_discapa->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_desplaz->Visible) { // gp_desplaz ?>
	<div id="r_gp_desplaz" class="form-group">
		<label id="elh_registro_gp_desplaz" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_desplaz->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_desplaz->CellAttributes() ?>>
<span id="el_registro_gp_desplaz">
<div id="tp_x_gp_desplaz" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_desplaz" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_desplaz->DisplayValueSeparator) ? json_encode($registro->gp_desplaz->DisplayValueSeparator) : $registro->gp_desplaz->DisplayValueSeparator) ?>" name="x_gp_desplaz" id="x_gp_desplaz" value="{value}"<?php echo $registro->gp_desplaz->EditAttributes() ?>></div>
<div id="dsl_x_gp_desplaz" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_desplaz->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_desplaz->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_desplaz" data-page="3" name="x_gp_desplaz" id="x_gp_desplaz_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_desplaz->EditAttributes() ?>><?php echo $registro->gp_desplaz->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_desplaz->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_desplaz" data-page="3" name="x_gp_desplaz" id="x_gp_desplaz_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_desplaz->CurrentValue) ?>" checked<?php echo $registro->gp_desplaz->EditAttributes() ?>><?php echo $registro->gp_desplaz->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_desplaz->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_desplaz->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_desplaz, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_desplaz->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_desplaz" id="s_x_gp_desplaz" value="<?php echo $registro->gp_desplaz->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_desplaz->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_migrant->Visible) { // gp_migrant ?>
	<div id="r_gp_migrant" class="form-group">
		<label id="elh_registro_gp_migrant" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_migrant->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_migrant->CellAttributes() ?>>
<span id="el_registro_gp_migrant">
<div id="tp_x_gp_migrant" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_migrant" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_migrant->DisplayValueSeparator) ? json_encode($registro->gp_migrant->DisplayValueSeparator) : $registro->gp_migrant->DisplayValueSeparator) ?>" name="x_gp_migrant" id="x_gp_migrant" value="{value}"<?php echo $registro->gp_migrant->EditAttributes() ?>></div>
<div id="dsl_x_gp_migrant" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_migrant->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_migrant->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_migrant" data-page="3" name="x_gp_migrant" id="x_gp_migrant_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_migrant->EditAttributes() ?>><?php echo $registro->gp_migrant->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_migrant->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_migrant" data-page="3" name="x_gp_migrant" id="x_gp_migrant_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_migrant->CurrentValue) ?>" checked<?php echo $registro->gp_migrant->EditAttributes() ?>><?php echo $registro->gp_migrant->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_migrant->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_migrant->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_migrant, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_migrant->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_migrant" id="s_x_gp_migrant" value="<?php echo $registro->gp_migrant->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_migrant->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_carcela->Visible) { // gp_carcela ?>
	<div id="r_gp_carcela" class="form-group">
		<label id="elh_registro_gp_carcela" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_carcela->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_carcela->CellAttributes() ?>>
<span id="el_registro_gp_carcela">
<div id="tp_x_gp_carcela" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_carcela" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_carcela->DisplayValueSeparator) ? json_encode($registro->gp_carcela->DisplayValueSeparator) : $registro->gp_carcela->DisplayValueSeparator) ?>" name="x_gp_carcela" id="x_gp_carcela" value="{value}"<?php echo $registro->gp_carcela->EditAttributes() ?>></div>
<div id="dsl_x_gp_carcela" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_carcela->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_carcela->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_carcela" data-page="3" name="x_gp_carcela" id="x_gp_carcela_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_carcela->EditAttributes() ?>><?php echo $registro->gp_carcela->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_carcela->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_carcela" data-page="3" name="x_gp_carcela" id="x_gp_carcela_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_carcela->CurrentValue) ?>" checked<?php echo $registro->gp_carcela->EditAttributes() ?>><?php echo $registro->gp_carcela->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_carcela->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_carcela->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_carcela, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_carcela->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_carcela" id="s_x_gp_carcela" value="<?php echo $registro->gp_carcela->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_carcela->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_gestan->Visible) { // gp_gestan ?>
	<div id="r_gp_gestan" class="form-group">
		<label id="elh_registro_gp_gestan" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_gestan->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_gestan->CellAttributes() ?>>
<span id="el_registro_gp_gestan">
<div id="tp_x_gp_gestan" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_gestan" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_gestan->DisplayValueSeparator) ? json_encode($registro->gp_gestan->DisplayValueSeparator) : $registro->gp_gestan->DisplayValueSeparator) ?>" name="x_gp_gestan" id="x_gp_gestan" value="{value}"<?php echo $registro->gp_gestan->EditAttributes() ?>></div>
<div id="dsl_x_gp_gestan" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_gestan->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_gestan->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_gestan" data-page="3" name="x_gp_gestan" id="x_gp_gestan_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_gestan->EditAttributes() ?>><?php echo $registro->gp_gestan->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_gestan->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_gestan" data-page="3" name="x_gp_gestan" id="x_gp_gestan_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_gestan->CurrentValue) ?>" checked<?php echo $registro->gp_gestan->EditAttributes() ?>><?php echo $registro->gp_gestan->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_gestan->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_gestan->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_gestan, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_gestan->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_gestan" id="s_x_gp_gestan" value="<?php echo $registro->gp_gestan->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_gestan->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_indigen->Visible) { // gp_indigen ?>
	<div id="r_gp_indigen" class="form-group">
		<label id="elh_registro_gp_indigen" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_indigen->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_indigen->CellAttributes() ?>>
<span id="el_registro_gp_indigen">
<div id="tp_x_gp_indigen" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_indigen" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_indigen->DisplayValueSeparator) ? json_encode($registro->gp_indigen->DisplayValueSeparator) : $registro->gp_indigen->DisplayValueSeparator) ?>" name="x_gp_indigen" id="x_gp_indigen" value="{value}"<?php echo $registro->gp_indigen->EditAttributes() ?>></div>
<div id="dsl_x_gp_indigen" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_indigen->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_indigen->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_indigen" data-page="3" name="x_gp_indigen" id="x_gp_indigen_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_indigen->EditAttributes() ?>><?php echo $registro->gp_indigen->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_indigen->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_indigen" data-page="3" name="x_gp_indigen" id="x_gp_indigen_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_indigen->CurrentValue) ?>" checked<?php echo $registro->gp_indigen->EditAttributes() ?>><?php echo $registro->gp_indigen->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_indigen->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_indigen->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_indigen, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_indigen->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_indigen" id="s_x_gp_indigen" value="<?php echo $registro->gp_indigen->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_indigen->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_pobicbf->Visible) { // gp_pobicbf ?>
	<div id="r_gp_pobicbf" class="form-group">
		<label id="elh_registro_gp_pobicbf" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_pobicbf->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_pobicbf->CellAttributes() ?>>
<span id="el_registro_gp_pobicbf">
<div id="tp_x_gp_pobicbf" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_pobicbf" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_pobicbf->DisplayValueSeparator) ? json_encode($registro->gp_pobicbf->DisplayValueSeparator) : $registro->gp_pobicbf->DisplayValueSeparator) ?>" name="x_gp_pobicbf" id="x_gp_pobicbf" value="{value}"<?php echo $registro->gp_pobicbf->EditAttributes() ?>></div>
<div id="dsl_x_gp_pobicbf" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_pobicbf->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_pobicbf->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_pobicbf" data-page="3" name="x_gp_pobicbf" id="x_gp_pobicbf_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_pobicbf->EditAttributes() ?>><?php echo $registro->gp_pobicbf->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_pobicbf->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_pobicbf" data-page="3" name="x_gp_pobicbf" id="x_gp_pobicbf_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_pobicbf->CurrentValue) ?>" checked<?php echo $registro->gp_pobicbf->EditAttributes() ?>><?php echo $registro->gp_pobicbf->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_pobicbf->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_pobicbf->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_pobicbf, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_pobicbf->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_pobicbf" id="s_x_gp_pobicbf" value="<?php echo $registro->gp_pobicbf->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_pobicbf->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_mad_com->Visible) { // gp_mad_com ?>
	<div id="r_gp_mad_com" class="form-group">
		<label id="elh_registro_gp_mad_com" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_mad_com->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_mad_com->CellAttributes() ?>>
<span id="el_registro_gp_mad_com">
<div id="tp_x_gp_mad_com" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_mad_com" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_mad_com->DisplayValueSeparator) ? json_encode($registro->gp_mad_com->DisplayValueSeparator) : $registro->gp_mad_com->DisplayValueSeparator) ?>" name="x_gp_mad_com" id="x_gp_mad_com" value="{value}"<?php echo $registro->gp_mad_com->EditAttributes() ?>></div>
<div id="dsl_x_gp_mad_com" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_mad_com->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_mad_com->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_mad_com" data-page="3" name="x_gp_mad_com" id="x_gp_mad_com_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_mad_com->EditAttributes() ?>><?php echo $registro->gp_mad_com->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_mad_com->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_mad_com" data-page="3" name="x_gp_mad_com" id="x_gp_mad_com_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_mad_com->CurrentValue) ?>" checked<?php echo $registro->gp_mad_com->EditAttributes() ?>><?php echo $registro->gp_mad_com->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_mad_com->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_mad_com->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_mad_com, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_mad_com->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_mad_com" id="s_x_gp_mad_com" value="<?php echo $registro->gp_mad_com->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_mad_com->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_desmovi->Visible) { // gp_desmovi ?>
	<div id="r_gp_desmovi" class="form-group">
		<label id="elh_registro_gp_desmovi" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_desmovi->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_desmovi->CellAttributes() ?>>
<span id="el_registro_gp_desmovi">
<div id="tp_x_gp_desmovi" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_desmovi" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_desmovi->DisplayValueSeparator) ? json_encode($registro->gp_desmovi->DisplayValueSeparator) : $registro->gp_desmovi->DisplayValueSeparator) ?>" name="x_gp_desmovi" id="x_gp_desmovi" value="{value}"<?php echo $registro->gp_desmovi->EditAttributes() ?>></div>
<div id="dsl_x_gp_desmovi" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_desmovi->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_desmovi->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_desmovi" data-page="3" name="x_gp_desmovi" id="x_gp_desmovi_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_desmovi->EditAttributes() ?>><?php echo $registro->gp_desmovi->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_desmovi->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_desmovi" data-page="3" name="x_gp_desmovi" id="x_gp_desmovi_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_desmovi->CurrentValue) ?>" checked<?php echo $registro->gp_desmovi->EditAttributes() ?>><?php echo $registro->gp_desmovi->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_desmovi->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_desmovi->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_desmovi, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_desmovi->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_desmovi" id="s_x_gp_desmovi" value="<?php echo $registro->gp_desmovi->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_desmovi->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_psiquia->Visible) { // gp_psiquia ?>
	<div id="r_gp_psiquia" class="form-group">
		<label id="elh_registro_gp_psiquia" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_psiquia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_psiquia->CellAttributes() ?>>
<span id="el_registro_gp_psiquia">
<div id="tp_x_gp_psiquia" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_psiquia" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_psiquia->DisplayValueSeparator) ? json_encode($registro->gp_psiquia->DisplayValueSeparator) : $registro->gp_psiquia->DisplayValueSeparator) ?>" name="x_gp_psiquia" id="x_gp_psiquia" value="{value}"<?php echo $registro->gp_psiquia->EditAttributes() ?>></div>
<div id="dsl_x_gp_psiquia" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_psiquia->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_psiquia->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_psiquia" data-page="3" name="x_gp_psiquia" id="x_gp_psiquia_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_psiquia->EditAttributes() ?>><?php echo $registro->gp_psiquia->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_psiquia->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_psiquia" data-page="3" name="x_gp_psiquia" id="x_gp_psiquia_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_psiquia->CurrentValue) ?>" checked<?php echo $registro->gp_psiquia->EditAttributes() ?>><?php echo $registro->gp_psiquia->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_psiquia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_psiquia->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_psiquia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_psiquia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_psiquia" id="s_x_gp_psiquia" value="<?php echo $registro->gp_psiquia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_psiquia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_vic_vio->Visible) { // gp_vic_vio ?>
	<div id="r_gp_vic_vio" class="form-group">
		<label id="elh_registro_gp_vic_vio" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_vic_vio->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_vic_vio->CellAttributes() ?>>
<span id="el_registro_gp_vic_vio">
<div id="tp_x_gp_vic_vio" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_vic_vio" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_vic_vio->DisplayValueSeparator) ? json_encode($registro->gp_vic_vio->DisplayValueSeparator) : $registro->gp_vic_vio->DisplayValueSeparator) ?>" name="x_gp_vic_vio" id="x_gp_vic_vio" value="{value}"<?php echo $registro->gp_vic_vio->EditAttributes() ?>></div>
<div id="dsl_x_gp_vic_vio" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_vic_vio->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_vic_vio->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_vic_vio" data-page="3" name="x_gp_vic_vio" id="x_gp_vic_vio_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_vic_vio->EditAttributes() ?>><?php echo $registro->gp_vic_vio->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_vic_vio->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_vic_vio" data-page="3" name="x_gp_vic_vio" id="x_gp_vic_vio_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_vic_vio->CurrentValue) ?>" checked<?php echo $registro->gp_vic_vio->EditAttributes() ?>><?php echo $registro->gp_vic_vio->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_vic_vio->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_vic_vio->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_vic_vio, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_vic_vio->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_vic_vio" id="s_x_gp_vic_vio" value="<?php echo $registro->gp_vic_vio->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_vic_vio->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->gp_otros->Visible) { // gp_otros ?>
	<div id="r_gp_otros" class="form-group">
		<label id="elh_registro_gp_otros" class="col-sm-2 control-label ewLabel"><?php echo $registro->gp_otros->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->gp_otros->CellAttributes() ?>>
<span id="el_registro_gp_otros">
<div id="tp_x_gp_otros" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_gp_otros" data-page="3" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->gp_otros->DisplayValueSeparator) ? json_encode($registro->gp_otros->DisplayValueSeparator) : $registro->gp_otros->DisplayValueSeparator) ?>" name="x_gp_otros" id="x_gp_otros" value="{value}"<?php echo $registro->gp_otros->EditAttributes() ?>></div>
<div id="dsl_x_gp_otros" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->gp_otros->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->gp_otros->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_otros" data-page="3" name="x_gp_otros" id="x_gp_otros_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->gp_otros->EditAttributes() ?>><?php echo $registro->gp_otros->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->gp_otros->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_gp_otros" data-page="3" name="x_gp_otros" id="x_gp_otros_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->gp_otros->CurrentValue) ?>" checked<?php echo $registro->gp_otros->EditAttributes() ?>><?php echo $registro->gp_otros->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->gp_otros->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->gp_otros->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->gp_otros, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->gp_otros->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_gp_otros" id="s_x_gp_otros" value="<?php echo $registro->gp_otros->LookupFilterQuery() ?>">
</span>
<?php echo $registro->gp_otros->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("4") ?>" id="tab_registro4">
<div>
<?php if ($registro->Condicion_Final->Visible) { // Condicion_Final ?>
	<div id="r_Condicion_Final" class="form-group">
		<label id="elh_registro_Condicion_Final" for="x_Condicion_Final" class="col-sm-2 control-label ewLabel"><?php echo $registro->Condicion_Final->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Condicion_Final->CellAttributes() ?>>
<span id="el_registro_Condicion_Final">
<select data-table="registro" data-field="x_Condicion_Final" data-page="4" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Condicion_Final->DisplayValueSeparator) ? json_encode($registro->Condicion_Final->DisplayValueSeparator) : $registro->Condicion_Final->DisplayValueSeparator) ?>" id="x_Condicion_Final" name="x_Condicion_Final"<?php echo $registro->Condicion_Final->EditAttributes() ?>>
<?php
if (is_array($registro->Condicion_Final->EditValue)) {
	$arwrk = $registro->Condicion_Final->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Condicion_Final->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Condicion_Final->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Condicion_Final->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Condicion_Final->CurrentValue) ?>" selected><?php echo $registro->Condicion_Final->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `No.Condicion_Final`, `Condicion_Final` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `condicion_final`";
$sWhereWrk = "";
$registro->Condicion_Final->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Condicion_Final->LookupFilters += array("f0" => "`No.Condicion_Final` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Condicion_Final, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Condicion_Final->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Condicion_Final" id="s_x_Condicion_Final" value="<?php echo $registro->Condicion_Final->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Condicion_Final->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Depto_Residencia->Visible) { // Depto_Residencia ?>
	<div id="r_Depto_Residencia" class="form-group">
		<label id="elh_registro_Depto_Residencia" for="x_Depto_Residencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Depto_Residencia->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Depto_Residencia->CellAttributes() ?>>
<span id="el_registro_Depto_Residencia">
<select data-table="registro" data-field="x_Depto_Residencia" data-page="4" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Depto_Residencia->DisplayValueSeparator) ? json_encode($registro->Depto_Residencia->DisplayValueSeparator) : $registro->Depto_Residencia->DisplayValueSeparator) ?>" id="x_Depto_Residencia" name="x_Depto_Residencia"<?php echo $registro->Depto_Residencia->EditAttributes() ?>>
<?php
if (is_array($registro->Depto_Residencia->EditValue)) {
	$arwrk = $registro->Depto_Residencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Depto_Residencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Depto_Residencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Depto_Residencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Depto_Residencia->CurrentValue) ?>" selected><?php echo $registro->Depto_Residencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Departamento`, `Departamento` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`";
$sWhereWrk = "";
$registro->Depto_Residencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Depto_Residencia->LookupFilters += array("f0" => "`Cod_Departamento` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Depto_Residencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Depto_Residencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Depto_Residencia" id="s_x_Depto_Residencia" value="<?php echo $registro->Depto_Residencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Depto_Residencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Municipio_Residencia->Visible) { // Municipio_Residencia ?>
	<div id="r_Municipio_Residencia" class="form-group">
		<label id="elh_registro_Municipio_Residencia" for="x_Municipio_Residencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Municipio_Residencia->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Municipio_Residencia->CellAttributes() ?>>
<span id="el_registro_Municipio_Residencia">
<select data-table="registro" data-field="x_Municipio_Residencia" data-page="4" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Municipio_Residencia->DisplayValueSeparator) ? json_encode($registro->Municipio_Residencia->DisplayValueSeparator) : $registro->Municipio_Residencia->DisplayValueSeparator) ?>" id="x_Municipio_Residencia" name="x_Municipio_Residencia"<?php echo $registro->Municipio_Residencia->EditAttributes() ?>>
<?php
if (is_array($registro->Municipio_Residencia->EditValue)) {
	$arwrk = $registro->Municipio_Residencia->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Municipio_Residencia->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Municipio_Residencia->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Municipio_Residencia->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Municipio_Residencia->CurrentValue) ?>" selected><?php echo $registro->Municipio_Residencia->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Municipio`, `Municipio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`";
$sWhereWrk = "";
$registro->Municipio_Residencia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Municipio_Residencia->LookupFilters += array("f0" => "`Cod_Municipio` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Municipio_Residencia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Municipio_Residencia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Municipio_Residencia" id="s_x_Municipio_Residencia" value="<?php echo $registro->Municipio_Residencia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Municipio_Residencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Consulta->Visible) { // Fecha_Consulta ?>
	<div id="r_Fecha_Consulta" class="form-group">
		<label id="elh_registro_Fecha_Consulta" for="x_Fecha_Consulta" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Consulta->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Consulta->CellAttributes() ?>>
<span id="el_registro_Fecha_Consulta">
<input type="text" data-table="registro" data-field="x_Fecha_Consulta" data-page="4" data-format="5" name="x_Fecha_Consulta" id="x_Fecha_Consulta" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Consulta->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Consulta->EditValue ?>"<?php echo $registro->Fecha_Consulta->EditAttributes() ?>>
<?php if (!$registro->Fecha_Consulta->ReadOnly && !$registro->Fecha_Consulta->Disabled && !isset($registro->Fecha_Consulta->EditAttrs["readonly"]) && !isset($registro->Fecha_Consulta->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Consulta", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Consulta->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Inicio_Sintomas->Visible) { // Fecha_Inicio_Sintomas ?>
	<div id="r_Fecha_Inicio_Sintomas" class="form-group">
		<label id="elh_registro_Fecha_Inicio_Sintomas" for="x_Fecha_Inicio_Sintomas" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Inicio_Sintomas->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Inicio_Sintomas->CellAttributes() ?>>
<span id="el_registro_Fecha_Inicio_Sintomas">
<input type="text" data-table="registro" data-field="x_Fecha_Inicio_Sintomas" data-page="4" data-format="5" name="x_Fecha_Inicio_Sintomas" id="x_Fecha_Inicio_Sintomas" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Inicio_Sintomas->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Inicio_Sintomas->EditValue ?>"<?php echo $registro->Fecha_Inicio_Sintomas->EditAttributes() ?>>
<?php if (!$registro->Fecha_Inicio_Sintomas->ReadOnly && !$registro->Fecha_Inicio_Sintomas->Disabled && !isset($registro->Fecha_Inicio_Sintomas->EditAttrs["readonly"]) && !isset($registro->Fecha_Inicio_Sintomas->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Inicio_Sintomas", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Inicio_Sintomas->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Hospitalizado->Visible) { // Hospitalizado ?>
	<div id="r_Hospitalizado" class="form-group">
		<label id="elh_registro_Hospitalizado" class="col-sm-2 control-label ewLabel"><?php echo $registro->Hospitalizado->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Hospitalizado->CellAttributes() ?>>
<span id="el_registro_Hospitalizado">
<div id="tp_x_Hospitalizado" class="ewTemplate"><input type="checkbox" data-table="registro" data-field="x_Hospitalizado" data-page="4" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Hospitalizado->DisplayValueSeparator) ? json_encode($registro->Hospitalizado->DisplayValueSeparator) : $registro->Hospitalizado->DisplayValueSeparator) ?>" name="x_Hospitalizado[]" id="x_Hospitalizado[]" value="{value}"<?php echo $registro->Hospitalizado->EditAttributes() ?>></div>
<div id="dsl_x_Hospitalizado" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Hospitalizado->EditValue;
if (is_array($arwrk)) {
	$armultiwrk = (strval($registro->Hospitalizado->CurrentValue) <> "") ? explode(",", strval($registro->Hospitalizado->CurrentValue)) : array();
	$cnt = count($armultiwrk);
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = "";
		for ($ari = 0; $ari < $cnt; $ari++) {
			if (ew_SameStr($arwrk[$rowcntwrk][0], $armultiwrk[$ari]) && !is_null($armultiwrk[$ari])) {
				$armultiwrk[$ari] = NULL; // Marked for removal
				$selwrk = " checked";
				if ($selwrk <> "") $emptywrk = FALSE;
				break;
			}
		}
		if ($selwrk <> "") {
?>
<label class="checkbox-inline"><input type="checkbox" data-table="registro" data-field="x_Hospitalizado" data-page="4" name="x_Hospitalizado[]" id="x_Hospitalizado_<?php echo $rowcntwrk ?>[]" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Hospitalizado->EditAttributes() ?>><?php echo $registro->Hospitalizado->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	for ($ari = 0; $ari < $cnt; $ari++) {
		if (!is_null($armultiwrk[$ari])) {
?>
<label class="checkbox-inline"><input type="checkbox" data-table="registro" data-field="x_Hospitalizado" data-page="4" name="x_Hospitalizado[]" value="<?php echo ew_HtmlEncode($armultiwrk[$ari]) ?>" checked<?php echo $registro->Hospitalizado->EditAttributes() ?>><?php echo $armultiwrk[$ari] ?></label>
<?php
		}
	}
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Hospitalizado->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Hospitalizado->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Hospitalizado, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Hospitalizado->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Hospitalizado" id="s_x_Hospitalizado" value="<?php echo $registro->Hospitalizado->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Hospitalizado->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Defuncion->Visible) { // Fecha_Defuncion ?>
	<div id="r_Fecha_Defuncion" class="form-group">
		<label id="elh_registro_Fecha_Defuncion" for="x_Fecha_Defuncion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Defuncion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Defuncion->CellAttributes() ?>>
<span id="el_registro_Fecha_Defuncion">
<input type="text" data-table="registro" data-field="x_Fecha_Defuncion" data-page="4" data-format="5" name="x_Fecha_Defuncion" id="x_Fecha_Defuncion" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Defuncion->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Defuncion->EditValue ?>"<?php echo $registro->Fecha_Defuncion->EditAttributes() ?>>
<?php if (!$registro->Fecha_Defuncion->ReadOnly && !$registro->Fecha_Defuncion->Disabled && !isset($registro->Fecha_Defuncion->EditAttrs["readonly"]) && !isset($registro->Fecha_Defuncion->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Defuncion", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Defuncion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Numero_Certificado_Defuncion->Visible) { // Numero_Certificado_Defuncion ?>
	<div id="r_Numero_Certificado_Defuncion" class="form-group">
		<label id="elh_registro_Numero_Certificado_Defuncion" for="x_Numero_Certificado_Defuncion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Numero_Certificado_Defuncion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Numero_Certificado_Defuncion->CellAttributes() ?>>
<span id="el_registro_Numero_Certificado_Defuncion">
<input type="text" data-table="registro" data-field="x_Numero_Certificado_Defuncion" data-page="4" name="x_Numero_Certificado_Defuncion" id="x_Numero_Certificado_Defuncion" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Numero_Certificado_Defuncion->getPlaceHolder()) ?>" value="<?php echo $registro->Numero_Certificado_Defuncion->EditValue ?>"<?php echo $registro->Numero_Certificado_Defuncion->EditAttributes() ?>>
</span>
<?php echo $registro->Numero_Certificado_Defuncion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Causa_Basica_Muerte_CIEX->Visible) { // Causa_Basica_Muerte_CIEX ?>
	<div id="r_Causa_Basica_Muerte_CIEX" class="form-group">
		<label id="elh_registro_Causa_Basica_Muerte_CIEX" for="x_Causa_Basica_Muerte_CIEX" class="col-sm-2 control-label ewLabel"><?php echo $registro->Causa_Basica_Muerte_CIEX->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Causa_Basica_Muerte_CIEX->CellAttributes() ?>>
<span id="el_registro_Causa_Basica_Muerte_CIEX">
<input type="text" data-table="registro" data-field="x_Causa_Basica_Muerte_CIEX" data-page="4" name="x_Causa_Basica_Muerte_CIEX" id="x_Causa_Basica_Muerte_CIEX" size="30" maxlength="50" placeholder="<?php echo ew_HtmlEncode($registro->Causa_Basica_Muerte_CIEX->getPlaceHolder()) ?>" value="<?php echo $registro->Causa_Basica_Muerte_CIEX->EditValue ?>"<?php echo $registro->Causa_Basica_Muerte_CIEX->EditAttributes() ?>>
</span>
<?php echo $registro->Causa_Basica_Muerte_CIEX->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Entidad_fallecimiento->Visible) { // Entidad_fallecimiento ?>
	<div id="r_Entidad_fallecimiento" class="form-group">
		<label id="elh_registro_Entidad_fallecimiento" class="col-sm-2 control-label ewLabel"><?php echo $registro->Entidad_fallecimiento->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Entidad_fallecimiento->CellAttributes() ?>>
<span id="el_registro_Entidad_fallecimiento">
<?php
$wrkonchange = trim(" " . @$registro->Entidad_fallecimiento->EditAttrs["onchange"]);
if ($wrkonchange <> "") $wrkonchange = " onchange=\"" . ew_JsEncode2($wrkonchange) . "\"";
$registro->Entidad_fallecimiento->EditAttrs["onchange"] = "";
?>
<span id="as_x_Entidad_fallecimiento" style="white-space: nowrap; z-index: 8490">
	<input type="text" name="sv_x_Entidad_fallecimiento" id="sv_x_Entidad_fallecimiento" value="<?php echo $registro->Entidad_fallecimiento->EditValue ?>" size="30" maxlength="20" placeholder="<?php echo ew_HtmlEncode($registro->Entidad_fallecimiento->getPlaceHolder()) ?>" data-placeholder="<?php echo ew_HtmlEncode($registro->Entidad_fallecimiento->getPlaceHolder()) ?>"<?php echo $registro->Entidad_fallecimiento->EditAttributes() ?>>
</span>
<input type="hidden" data-table="registro" data-field="x_Entidad_fallecimiento" data-page="4" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Entidad_fallecimiento->DisplayValueSeparator) ? json_encode($registro->Entidad_fallecimiento->DisplayValueSeparator) : $registro->Entidad_fallecimiento->DisplayValueSeparator) ?>" name="x_Entidad_fallecimiento" id="x_Entidad_fallecimiento" value="<?php echo ew_HtmlEncode($registro->Entidad_fallecimiento->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<?php
$sSqlWrk = "SELECT `Codigo_Upgd`, `Codigo_Upgd` AS `DispFld`, `Upgd` AS `Disp2Fld` FROM `entidad_upgd`";
$sWhereWrk = "`Codigo_Upgd` LIKE '%{query_value}%' OR `Upgd` LIKE '%{query_value}%' OR CONCAT(`Codigo_Upgd`,'" . ew_ValueSeparator(1, $Page->Entidad_fallecimiento) . "',`Upgd`) LIKE '{query_value}%'";
$registro->Lookup_Selecting($registro->Entidad_fallecimiento, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES;
?>
<input type="hidden" name="q_x_Entidad_fallecimiento" id="q_x_Entidad_fallecimiento" value="s=<?php echo ew_Encrypt($sSqlWrk) ?>&d=">
<script type="text/javascript">
fregistroedit.CreateAutoSuggest({"id":"x_Entidad_fallecimiento","forceSelect":true});
</script>
</span>
<?php echo $registro->Entidad_fallecimiento->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Nombre_Profesional_Diligencia->Visible) { // Nombre_Profesional_Diligencia ?>
	<div id="r_Nombre_Profesional_Diligencia" class="form-group">
		<label id="elh_registro_Nombre_Profesional_Diligencia" for="x_Nombre_Profesional_Diligencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Nombre_Profesional_Diligencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Nombre_Profesional_Diligencia->CellAttributes() ?>>
<span id="el_registro_Nombre_Profesional_Diligencia">
<input type="text" data-table="registro" data-field="x_Nombre_Profesional_Diligencia" data-page="4" name="x_Nombre_Profesional_Diligencia" id="x_Nombre_Profesional_Diligencia" size="30" maxlength="200" placeholder="<?php echo ew_HtmlEncode($registro->Nombre_Profesional_Diligencia->getPlaceHolder()) ?>" value="<?php echo $registro->Nombre_Profesional_Diligencia->EditValue ?>"<?php echo $registro->Nombre_Profesional_Diligencia->EditAttributes() ?>>
</span>
<?php echo $registro->Nombre_Profesional_Diligencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Telefono_Profesional_Diligencia->Visible) { // Telefono_Profesional_Diligencia ?>
	<div id="r_Telefono_Profesional_Diligencia" class="form-group">
		<label id="elh_registro_Telefono_Profesional_Diligencia" for="x_Telefono_Profesional_Diligencia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Telefono_Profesional_Diligencia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Telefono_Profesional_Diligencia->CellAttributes() ?>>
<span id="el_registro_Telefono_Profesional_Diligencia">
<input type="text" data-table="registro" data-field="x_Telefono_Profesional_Diligencia" data-page="4" name="x_Telefono_Profesional_Diligencia" id="x_Telefono_Profesional_Diligencia" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Telefono_Profesional_Diligencia->getPlaceHolder()) ?>" value="<?php echo $registro->Telefono_Profesional_Diligencia->EditValue ?>"<?php echo $registro->Telefono_Profesional_Diligencia->EditAttributes() ?>>
</span>
<?php echo $registro->Telefono_Profesional_Diligencia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Valor_Carga_Viral->Visible) { // Valor_Carga_Viral ?>
	<div id="r_Valor_Carga_Viral" class="form-group">
		<label id="elh_registro_Valor_Carga_Viral" for="x_Valor_Carga_Viral" class="col-sm-2 control-label ewLabel"><?php echo $registro->Valor_Carga_Viral->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Valor_Carga_Viral->CellAttributes() ?>>
<span id="el_registro_Valor_Carga_Viral">
<input type="text" data-table="registro" data-field="x_Valor_Carga_Viral" data-page="4" name="x_Valor_Carga_Viral" id="x_Valor_Carga_Viral" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Valor_Carga_Viral->getPlaceHolder()) ?>" value="<?php echo $registro->Valor_Carga_Viral->EditValue ?>"<?php echo $registro->Valor_Carga_Viral->EditAttributes() ?>>
</span>
<?php echo $registro->Valor_Carga_Viral->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("5") ?>" id="tab_registro5">
<div>
<?php if ($registro->Mecanismo_Probable_Transmision->Visible) { // Mecanismo_Probable_Transmision ?>
	<div id="r_Mecanismo_Probable_Transmision" class="form-group">
		<label id="elh_registro_Mecanismo_Probable_Transmision" for="x_Mecanismo_Probable_Transmision" class="col-sm-2 control-label ewLabel"><?php echo $registro->Mecanismo_Probable_Transmision->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Mecanismo_Probable_Transmision->CellAttributes() ?>>
<span id="el_registro_Mecanismo_Probable_Transmision">
<select data-table="registro" data-field="x_Mecanismo_Probable_Transmision" data-page="5" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Mecanismo_Probable_Transmision->DisplayValueSeparator) ? json_encode($registro->Mecanismo_Probable_Transmision->DisplayValueSeparator) : $registro->Mecanismo_Probable_Transmision->DisplayValueSeparator) ?>" id="x_Mecanismo_Probable_Transmision" name="x_Mecanismo_Probable_Transmision"<?php echo $registro->Mecanismo_Probable_Transmision->EditAttributes() ?>>
<?php
if (is_array($registro->Mecanismo_Probable_Transmision->EditValue)) {
	$arwrk = $registro->Mecanismo_Probable_Transmision->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Mecanismo_Probable_Transmision->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Mecanismo_Probable_Transmision->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Mecanismo_Probable_Transmision->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Mecanismo_Probable_Transmision->CurrentValue) ?>" selected><?php echo $registro->Mecanismo_Probable_Transmision->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Mecanismo_Probable` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `mecanismo_probable_transmision`";
$sWhereWrk = "";
$registro->Mecanismo_Probable_Transmision->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Mecanismo_Probable_Transmision->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Mecanismo_Probable_Transmision, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Mecanismo_Probable_Transmision->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Mecanismo_Probable_Transmision" id="s_x_Mecanismo_Probable_Transmision" value="<?php echo $registro->Mecanismo_Probable_Transmision->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Mecanismo_Probable_Transmision->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Nombre_Madre->Visible) { // Nombre_Madre ?>
	<div id="r_Nombre_Madre" class="form-group">
		<label id="elh_registro_Nombre_Madre" for="x_Nombre_Madre" class="col-sm-2 control-label ewLabel"><?php echo $registro->Nombre_Madre->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Nombre_Madre->CellAttributes() ?>>
<span id="el_registro_Nombre_Madre">
<input type="text" data-table="registro" data-field="x_Nombre_Madre" data-page="5" name="x_Nombre_Madre" id="x_Nombre_Madre" size="30" maxlength="200" placeholder="<?php echo ew_HtmlEncode($registro->Nombre_Madre->getPlaceHolder()) ?>" value="<?php echo $registro->Nombre_Madre->EditValue ?>"<?php echo $registro->Nombre_Madre->EditAttributes() ?>>
</span>
<?php echo $registro->Nombre_Madre->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tipo_Id_Madre->Visible) { // Tipo_Id_Madre ?>
	<div id="r_Tipo_Id_Madre" class="form-group">
		<label id="elh_registro_Tipo_Id_Madre" for="x_Tipo_Id_Madre" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tipo_Id_Madre->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tipo_Id_Madre->CellAttributes() ?>>
<span id="el_registro_Tipo_Id_Madre">
<select data-table="registro" data-field="x_Tipo_Id_Madre" data-page="5" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tipo_Id_Madre->DisplayValueSeparator) ? json_encode($registro->Tipo_Id_Madre->DisplayValueSeparator) : $registro->Tipo_Id_Madre->DisplayValueSeparator) ?>" id="x_Tipo_Id_Madre" name="x_Tipo_Id_Madre"<?php echo $registro->Tipo_Id_Madre->EditAttributes() ?>>
<?php
if (is_array($registro->Tipo_Id_Madre->EditValue)) {
	$arwrk = $registro->Tipo_Id_Madre->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Tipo_Id_Madre->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Tipo_Id_Madre->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Tipo_Id_Madre->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Tipo_Id_Madre->CurrentValue) ?>" selected><?php echo $registro->Tipo_Id_Madre->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Cod_Documento`, `Tipo_Ide` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_documento`";
$sWhereWrk = "";
$registro->Tipo_Id_Madre->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tipo_Id_Madre->LookupFilters += array("f0" => "`Cod_Documento` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tipo_Id_Madre, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tipo_Id_Madre->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tipo_Id_Madre" id="s_x_Tipo_Id_Madre" value="<?php echo $registro->Tipo_Id_Madre->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tipo_Id_Madre->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Numero_Identificacion_Madre->Visible) { // Numero_Identificacion_Madre ?>
	<div id="r_Numero_Identificacion_Madre" class="form-group">
		<label id="elh_registro_Numero_Identificacion_Madre" for="x_Numero_Identificacion_Madre" class="col-sm-2 control-label ewLabel"><?php echo $registro->Numero_Identificacion_Madre->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Numero_Identificacion_Madre->CellAttributes() ?>>
<span id="el_registro_Numero_Identificacion_Madre">
<input type="text" data-table="registro" data-field="x_Numero_Identificacion_Madre" data-page="5" name="x_Numero_Identificacion_Madre" id="x_Numero_Identificacion_Madre" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Numero_Identificacion_Madre->getPlaceHolder()) ?>" value="<?php echo $registro->Numero_Identificacion_Madre->EditValue ?>"<?php echo $registro->Numero_Identificacion_Madre->EditAttributes() ?>>
</span>
<?php echo $registro->Numero_Identificacion_Madre->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Indentidad_Genero->Visible) { // Indentidad_Genero ?>
	<div id="r_Indentidad_Genero" class="form-group">
		<label id="elh_registro_Indentidad_Genero" for="x_Indentidad_Genero" class="col-sm-2 control-label ewLabel"><?php echo $registro->Indentidad_Genero->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Indentidad_Genero->CellAttributes() ?>>
<span id="el_registro_Indentidad_Genero">
<select data-table="registro" data-field="x_Indentidad_Genero" data-page="5" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Indentidad_Genero->DisplayValueSeparator) ? json_encode($registro->Indentidad_Genero->DisplayValueSeparator) : $registro->Indentidad_Genero->DisplayValueSeparator) ?>" id="x_Indentidad_Genero" name="x_Indentidad_Genero"<?php echo $registro->Indentidad_Genero->EditAttributes() ?>>
<?php
if (is_array($registro->Indentidad_Genero->EditValue)) {
	$arwrk = $registro->Indentidad_Genero->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Indentidad_Genero->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Indentidad_Genero->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Indentidad_Genero->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Indentidad_Genero->CurrentValue) ?>" selected><?php echo $registro->Indentidad_Genero->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Codigo_identidad`, `Identidad_genero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `identidad_genero`";
$sWhereWrk = "";
$registro->Indentidad_Genero->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Indentidad_Genero->LookupFilters += array("f0" => "`Codigo_identidad` = {filter_value}", "t0" => "200", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Indentidad_Genero, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Indentidad_Genero->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Indentidad_Genero" id="s_x_Indentidad_Genero" value="<?php echo $registro->Indentidad_Genero->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Indentidad_Genero->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Donador_Sangre_Ultimos_12_Meses->Visible) { // Donador_Sangre_Ultimos_12_Meses ?>
	<div id="r_Donador_Sangre_Ultimos_12_Meses" class="form-group">
		<label id="elh_registro_Donador_Sangre_Ultimos_12_Meses" class="col-sm-2 control-label ewLabel"><?php echo $registro->Donador_Sangre_Ultimos_12_Meses->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Donador_Sangre_Ultimos_12_Meses->CellAttributes() ?>>
<span id="el_registro_Donador_Sangre_Ultimos_12_Meses">
<div id="tp_x_Donador_Sangre_Ultimos_12_Meses" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Donador_Sangre_Ultimos_12_Meses" data-page="5" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Donador_Sangre_Ultimos_12_Meses->DisplayValueSeparator) ? json_encode($registro->Donador_Sangre_Ultimos_12_Meses->DisplayValueSeparator) : $registro->Donador_Sangre_Ultimos_12_Meses->DisplayValueSeparator) ?>" name="x_Donador_Sangre_Ultimos_12_Meses" id="x_Donador_Sangre_Ultimos_12_Meses" value="{value}"<?php echo $registro->Donador_Sangre_Ultimos_12_Meses->EditAttributes() ?>></div>
<div id="dsl_x_Donador_Sangre_Ultimos_12_Meses" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Donador_Sangre_Ultimos_12_Meses->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Donador_Sangre_Ultimos_12_Meses->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Donador_Sangre_Ultimos_12_Meses" data-page="5" name="x_Donador_Sangre_Ultimos_12_Meses" id="x_Donador_Sangre_Ultimos_12_Meses_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Donador_Sangre_Ultimos_12_Meses->EditAttributes() ?>><?php echo $registro->Donador_Sangre_Ultimos_12_Meses->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Donador_Sangre_Ultimos_12_Meses->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Donador_Sangre_Ultimos_12_Meses" data-page="5" name="x_Donador_Sangre_Ultimos_12_Meses" id="x_Donador_Sangre_Ultimos_12_Meses_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Donador_Sangre_Ultimos_12_Meses->CurrentValue) ?>" checked<?php echo $registro->Donador_Sangre_Ultimos_12_Meses->EditAttributes() ?>><?php echo $registro->Donador_Sangre_Ultimos_12_Meses->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Donador_Sangre_Ultimos_12_Meses->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Donador_Sangre_Ultimos_12_Meses->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Donador_Sangre_Ultimos_12_Meses, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Donador_Sangre_Ultimos_12_Meses->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Donador_Sangre_Ultimos_12_Meses" id="s_x_Donador_Sangre_Ultimos_12_Meses" value="<?php echo $registro->Donador_Sangre_Ultimos_12_Meses->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Donador_Sangre_Ultimos_12_Meses->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Donacion->Visible) { // Fecha_Donacion ?>
	<div id="r_Fecha_Donacion" class="form-group">
		<label id="elh_registro_Fecha_Donacion" for="x_Fecha_Donacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Donacion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Donacion->CellAttributes() ?>>
<span id="el_registro_Fecha_Donacion">
<input type="text" data-table="registro" data-field="x_Fecha_Donacion" data-page="5" data-format="5" name="x_Fecha_Donacion" id="x_Fecha_Donacion" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Donacion->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Donacion->EditValue ?>"<?php echo $registro->Fecha_Donacion->EditAttributes() ?>>
<?php if (!$registro->Fecha_Donacion->ReadOnly && !$registro->Fecha_Donacion->Disabled && !isset($registro->Fecha_Donacion->EditAttrs["readonly"]) && !isset($registro->Fecha_Donacion->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Donacion", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Donacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Nombre_Institucion_Donacion->Visible) { // Nombre_Institucion_Donacion ?>
	<div id="r_Nombre_Institucion_Donacion" class="form-group">
		<label id="elh_registro_Nombre_Institucion_Donacion" for="x_Nombre_Institucion_Donacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Nombre_Institucion_Donacion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Nombre_Institucion_Donacion->CellAttributes() ?>>
<span id="el_registro_Nombre_Institucion_Donacion">
<input type="text" data-table="registro" data-field="x_Nombre_Institucion_Donacion" data-page="5" name="x_Nombre_Institucion_Donacion" id="x_Nombre_Institucion_Donacion" size="30" maxlength="100" placeholder="<?php echo ew_HtmlEncode($registro->Nombre_Institucion_Donacion->getPlaceHolder()) ?>" value="<?php echo $registro->Nombre_Institucion_Donacion->EditValue ?>"<?php echo $registro->Nombre_Institucion_Donacion->EditAttributes() ?>>
</span>
<?php echo $registro->Nombre_Institucion_Donacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Poblacion_clave->Visible) { // Poblacion_clave ?>
	<div id="r_Poblacion_clave" class="form-group">
		<label id="elh_registro_Poblacion_clave" class="col-sm-2 control-label ewLabel"><?php echo $registro->Poblacion_clave->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Poblacion_clave->CellAttributes() ?>>
<span id="el_registro_Poblacion_clave">
<div id="tp_x_Poblacion_clave" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Poblacion_clave" data-page="5" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Poblacion_clave->DisplayValueSeparator) ? json_encode($registro->Poblacion_clave->DisplayValueSeparator) : $registro->Poblacion_clave->DisplayValueSeparator) ?>" name="x_Poblacion_clave" id="x_Poblacion_clave" value="{value}"<?php echo $registro->Poblacion_clave->EditAttributes() ?>></div>
<div id="dsl_x_Poblacion_clave" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Poblacion_clave->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Poblacion_clave->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Poblacion_clave" data-page="5" name="x_Poblacion_clave" id="x_Poblacion_clave_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Poblacion_clave->EditAttributes() ?>><?php echo $registro->Poblacion_clave->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Poblacion_clave->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Poblacion_clave" data-page="5" name="x_Poblacion_clave" id="x_Poblacion_clave_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Poblacion_clave->CurrentValue) ?>" checked<?php echo $registro->Poblacion_clave->EditAttributes() ?>><?php echo $registro->Poblacion_clave->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Id`, `Poblacion_clave` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `poblacion_clave`";
$sWhereWrk = "";
$registro->Poblacion_clave->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Poblacion_clave->LookupFilters += array("f0" => "`Id` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Poblacion_clave, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Poblacion_clave->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Poblacion_clave" id="s_x_Poblacion_clave" value="<?php echo $registro->Poblacion_clave->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Poblacion_clave->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("6") ?>" id="tab_registro6">
<div>
<?php if ($registro->Recibio_Asesoria_Pre_Prueba->Visible) { // Recibio_Asesoria_Pre_Prueba ?>
	<div id="r_Recibio_Asesoria_Pre_Prueba" class="form-group">
		<label id="elh_registro_Recibio_Asesoria_Pre_Prueba" for="x_Recibio_Asesoria_Pre_Prueba" class="col-sm-2 control-label ewLabel"><?php echo $registro->Recibio_Asesoria_Pre_Prueba->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Recibio_Asesoria_Pre_Prueba->CellAttributes() ?>>
<span id="el_registro_Recibio_Asesoria_Pre_Prueba">
<select data-table="registro" data-field="x_Recibio_Asesoria_Pre_Prueba" data-page="6" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Recibio_Asesoria_Pre_Prueba->DisplayValueSeparator) ? json_encode($registro->Recibio_Asesoria_Pre_Prueba->DisplayValueSeparator) : $registro->Recibio_Asesoria_Pre_Prueba->DisplayValueSeparator) ?>" id="x_Recibio_Asesoria_Pre_Prueba" name="x_Recibio_Asesoria_Pre_Prueba"<?php echo $registro->Recibio_Asesoria_Pre_Prueba->EditAttributes() ?>>
<?php
if (is_array($registro->Recibio_Asesoria_Pre_Prueba->EditValue)) {
	$arwrk = $registro->Recibio_Asesoria_Pre_Prueba->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Recibio_Asesoria_Pre_Prueba->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Recibio_Asesoria_Pre_Prueba->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Recibio_Asesoria_Pre_Prueba->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Recibio_Asesoria_Pre_Prueba->CurrentValue) ?>" selected><?php echo $registro->Recibio_Asesoria_Pre_Prueba->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Recibio_Asesoria_Pre_Prueba->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Recibio_Asesoria_Pre_Prueba->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Recibio_Asesoria_Pre_Prueba, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Recibio_Asesoria_Pre_Prueba->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Recibio_Asesoria_Pre_Prueba" id="s_x_Recibio_Asesoria_Pre_Prueba" value="<?php echo $registro->Recibio_Asesoria_Pre_Prueba->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Recibio_Asesoria_Pre_Prueba->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Recibio_Asesoria_Post_Prueba->Visible) { // Recibio_Asesoria_Post_Prueba ?>
	<div id="r_Recibio_Asesoria_Post_Prueba" class="form-group">
		<label id="elh_registro_Recibio_Asesoria_Post_Prueba" for="x_Recibio_Asesoria_Post_Prueba" class="col-sm-2 control-label ewLabel"><?php echo $registro->Recibio_Asesoria_Post_Prueba->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Recibio_Asesoria_Post_Prueba->CellAttributes() ?>>
<span id="el_registro_Recibio_Asesoria_Post_Prueba">
<select data-table="registro" data-field="x_Recibio_Asesoria_Post_Prueba" data-page="6" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Recibio_Asesoria_Post_Prueba->DisplayValueSeparator) ? json_encode($registro->Recibio_Asesoria_Post_Prueba->DisplayValueSeparator) : $registro->Recibio_Asesoria_Post_Prueba->DisplayValueSeparator) ?>" id="x_Recibio_Asesoria_Post_Prueba" name="x_Recibio_Asesoria_Post_Prueba"<?php echo $registro->Recibio_Asesoria_Post_Prueba->EditAttributes() ?>>
<?php
if (is_array($registro->Recibio_Asesoria_Post_Prueba->EditValue)) {
	$arwrk = $registro->Recibio_Asesoria_Post_Prueba->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Recibio_Asesoria_Post_Prueba->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Recibio_Asesoria_Post_Prueba->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Recibio_Asesoria_Post_Prueba->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Recibio_Asesoria_Post_Prueba->CurrentValue) ?>" selected><?php echo $registro->Recibio_Asesoria_Post_Prueba->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Recibio_Asesoria_Post_Prueba->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Recibio_Asesoria_Post_Prueba->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Recibio_Asesoria_Post_Prueba, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Recibio_Asesoria_Post_Prueba->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Recibio_Asesoria_Post_Prueba" id="s_x_Recibio_Asesoria_Post_Prueba" value="<?php echo $registro->Recibio_Asesoria_Post_Prueba->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Recibio_Asesoria_Post_Prueba->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tipo_Prueba->Visible) { // Tipo_Prueba ?>
	<div id="r_Tipo_Prueba" class="form-group">
		<label id="elh_registro_Tipo_Prueba" for="x_Tipo_Prueba" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tipo_Prueba->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tipo_Prueba->CellAttributes() ?>>
<span id="el_registro_Tipo_Prueba">
<select data-table="registro" data-field="x_Tipo_Prueba" data-page="6" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tipo_Prueba->DisplayValueSeparator) ? json_encode($registro->Tipo_Prueba->DisplayValueSeparator) : $registro->Tipo_Prueba->DisplayValueSeparator) ?>" id="x_Tipo_Prueba" name="x_Tipo_Prueba"<?php echo $registro->Tipo_Prueba->EditAttributes() ?>>
<?php
if (is_array($registro->Tipo_Prueba->EditValue)) {
	$arwrk = $registro->Tipo_Prueba->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Tipo_Prueba->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Tipo_Prueba->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Tipo_Prueba->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Tipo_Prueba->CurrentValue) ?>" selected><?php echo $registro->Tipo_Prueba->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Tipo_Prueba` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_prueba`";
$sWhereWrk = "";
$registro->Tipo_Prueba->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tipo_Prueba->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tipo_Prueba, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tipo_Prueba->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tipo_Prueba" id="s_x_Tipo_Prueba" value="<?php echo $registro->Tipo_Prueba->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tipo_Prueba->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Fecha_Resultado_Confirmatorio->Visible) { // Fecha_Resultado_Confirmatorio ?>
	<div id="r_Fecha_Resultado_Confirmatorio" class="form-group">
		<label id="elh_registro_Fecha_Resultado_Confirmatorio" for="x_Fecha_Resultado_Confirmatorio" class="col-sm-2 control-label ewLabel"><?php echo $registro->Fecha_Resultado_Confirmatorio->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Fecha_Resultado_Confirmatorio->CellAttributes() ?>>
<span id="el_registro_Fecha_Resultado_Confirmatorio">
<input type="text" data-table="registro" data-field="x_Fecha_Resultado_Confirmatorio" data-page="6" data-format="5" name="x_Fecha_Resultado_Confirmatorio" id="x_Fecha_Resultado_Confirmatorio" placeholder="<?php echo ew_HtmlEncode($registro->Fecha_Resultado_Confirmatorio->getPlaceHolder()) ?>" value="<?php echo $registro->Fecha_Resultado_Confirmatorio->EditValue ?>"<?php echo $registro->Fecha_Resultado_Confirmatorio->EditAttributes() ?>>
<?php if (!$registro->Fecha_Resultado_Confirmatorio->ReadOnly && !$registro->Fecha_Resultado_Confirmatorio->Disabled && !isset($registro->Fecha_Resultado_Confirmatorio->EditAttrs["readonly"]) && !isset($registro->Fecha_Resultado_Confirmatorio->EditAttrs["disabled"])) { ?>
<script type="text/javascript">
ew_CreateCalendar("fregistroedit", "x_Fecha_Resultado_Confirmatorio", "%Y/%m/%d");
</script>
<?php } ?>
</span>
<?php echo $registro->Fecha_Resultado_Confirmatorio->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Estado_Clinico_Notificacion->Visible) { // Estado_Clinico_Notificacion ?>
	<div id="r_Estado_Clinico_Notificacion" class="form-group">
		<label id="elh_registro_Estado_Clinico_Notificacion" for="x_Estado_Clinico_Notificacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Estado_Clinico_Notificacion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Estado_Clinico_Notificacion->CellAttributes() ?>>
<span id="el_registro_Estado_Clinico_Notificacion">
<select data-table="registro" data-field="x_Estado_Clinico_Notificacion" data-page="6" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Estado_Clinico_Notificacion->DisplayValueSeparator) ? json_encode($registro->Estado_Clinico_Notificacion->DisplayValueSeparator) : $registro->Estado_Clinico_Notificacion->DisplayValueSeparator) ?>" id="x_Estado_Clinico_Notificacion" name="x_Estado_Clinico_Notificacion"<?php echo $registro->Estado_Clinico_Notificacion->EditAttributes() ?>>
<?php
if (is_array($registro->Estado_Clinico_Notificacion->EditValue)) {
	$arwrk = $registro->Estado_Clinico_Notificacion->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = ew_SameStr($registro->Estado_Clinico_Notificacion->CurrentValue, $arwrk[$rowcntwrk][0]) ? " selected" : "";
		if ($selwrk <> "") $emptywrk = FALSE;		
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $registro->Estado_Clinico_Notificacion->DisplayValue($arwrk[$rowcntwrk]) ?>
</option>
<?php
	}
	if ($emptywrk && strval($registro->Estado_Clinico_Notificacion->CurrentValue) <> "") {
?>
<option value="<?php echo ew_HtmlEncode($registro->Estado_Clinico_Notificacion->CurrentValue) ?>" selected><?php echo $registro->Estado_Clinico_Notificacion->CurrentValue ?></option>
<?php
    }
}
?>
</select>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Estado_Clinico` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_clinico_paciente`";
$sWhereWrk = "";
$registro->Estado_Clinico_Notificacion->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Estado_Clinico_Notificacion->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Estado_Clinico_Notificacion, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Estado_Clinico_Notificacion->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Estado_Clinico_Notificacion" id="s_x_Estado_Clinico_Notificacion" value="<?php echo $registro->Estado_Clinico_Notificacion->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Estado_Clinico_Notificacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("7") ?>" id="tab_registro7">
<div>
<?php if ($registro->Embarazo_Actual->Visible) { // Embarazo_Actual ?>
	<div id="r_Embarazo_Actual" class="form-group">
		<label id="elh_registro_Embarazo_Actual" class="col-sm-2 control-label ewLabel"><?php echo $registro->Embarazo_Actual->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Embarazo_Actual->CellAttributes() ?>>
<span id="el_registro_Embarazo_Actual">
<div id="tp_x_Embarazo_Actual" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Embarazo_Actual" data-page="7" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Embarazo_Actual->DisplayValueSeparator) ? json_encode($registro->Embarazo_Actual->DisplayValueSeparator) : $registro->Embarazo_Actual->DisplayValueSeparator) ?>" name="x_Embarazo_Actual" id="x_Embarazo_Actual" value="{value}"<?php echo $registro->Embarazo_Actual->EditAttributes() ?>></div>
<div id="dsl_x_Embarazo_Actual" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Embarazo_Actual->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Embarazo_Actual->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Embarazo_Actual" data-page="7" name="x_Embarazo_Actual" id="x_Embarazo_Actual_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Embarazo_Actual->EditAttributes() ?>><?php echo $registro->Embarazo_Actual->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Embarazo_Actual->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Embarazo_Actual" data-page="7" name="x_Embarazo_Actual" id="x_Embarazo_Actual_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Embarazo_Actual->CurrentValue) ?>" checked<?php echo $registro->Embarazo_Actual->EditAttributes() ?>><?php echo $registro->Embarazo_Actual->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Embarazo_Actual->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Embarazo_Actual->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Embarazo_Actual, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Embarazo_Actual->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Embarazo_Actual" id="s_x_Embarazo_Actual" value="<?php echo $registro->Embarazo_Actual->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Embarazo_Actual->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Hijos_Mujeres_Menores_5->Visible) { // Hijos_Mujeres_Menores_5 ?>
	<div id="r_Hijos_Mujeres_Menores_5" class="form-group">
		<label id="elh_registro_Hijos_Mujeres_Menores_5" for="x_Hijos_Mujeres_Menores_5" class="col-sm-2 control-label ewLabel"><?php echo $registro->Hijos_Mujeres_Menores_5->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Hijos_Mujeres_Menores_5->CellAttributes() ?>>
<span id="el_registro_Hijos_Mujeres_Menores_5">
<input type="text" data-table="registro" data-field="x_Hijos_Mujeres_Menores_5" data-page="7" name="x_Hijos_Mujeres_Menores_5" id="x_Hijos_Mujeres_Menores_5" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Hijos_Mujeres_Menores_5->getPlaceHolder()) ?>" value="<?php echo $registro->Hijos_Mujeres_Menores_5->EditValue ?>"<?php echo $registro->Hijos_Mujeres_Menores_5->EditAttributes() ?>>
</span>
<?php echo $registro->Hijos_Mujeres_Menores_5->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Hijos_Hombres_Menores_5->Visible) { // Hijos_Hombres_Menores_5 ?>
	<div id="r_Hijos_Hombres_Menores_5" class="form-group">
		<label id="elh_registro_Hijos_Hombres_Menores_5" for="x_Hijos_Hombres_Menores_5" class="col-sm-2 control-label ewLabel"><?php echo $registro->Hijos_Hombres_Menores_5->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Hijos_Hombres_Menores_5->CellAttributes() ?>>
<span id="el_registro_Hijos_Hombres_Menores_5">
<input type="text" data-table="registro" data-field="x_Hijos_Hombres_Menores_5" data-page="7" name="x_Hijos_Hombres_Menores_5" id="x_Hijos_Hombres_Menores_5" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Hijos_Hombres_Menores_5->getPlaceHolder()) ?>" value="<?php echo $registro->Hijos_Hombres_Menores_5->EditValue ?>"<?php echo $registro->Hijos_Hombres_Menores_5->EditAttributes() ?>>
</span>
<?php echo $registro->Hijos_Hombres_Menores_5->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Numero_Semanas_Embarazo->Visible) { // Numero_Semanas_Embarazo ?>
	<div id="r_Numero_Semanas_Embarazo" class="form-group">
		<label id="elh_registro_Numero_Semanas_Embarazo" for="x_Numero_Semanas_Embarazo" class="col-sm-2 control-label ewLabel"><?php echo $registro->Numero_Semanas_Embarazo->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Numero_Semanas_Embarazo->CellAttributes() ?>>
<span id="el_registro_Numero_Semanas_Embarazo">
<input type="text" data-table="registro" data-field="x_Numero_Semanas_Embarazo" data-page="7" name="x_Numero_Semanas_Embarazo" id="x_Numero_Semanas_Embarazo" size="30" placeholder="<?php echo ew_HtmlEncode($registro->Numero_Semanas_Embarazo->getPlaceHolder()) ?>" value="<?php echo $registro->Numero_Semanas_Embarazo->EditValue ?>"<?php echo $registro->Numero_Semanas_Embarazo->EditAttributes() ?>>
</span>
<?php echo $registro->Numero_Semanas_Embarazo->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Antecedentes_Embarazo->Visible) { // Antecedentes_Embarazo ?>
	<div id="r_Antecedentes_Embarazo" class="form-group">
		<label id="elh_registro_Antecedentes_Embarazo" class="col-sm-2 control-label ewLabel"><?php echo $registro->Antecedentes_Embarazo->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Antecedentes_Embarazo->CellAttributes() ?>>
<span id="el_registro_Antecedentes_Embarazo">
<div id="tp_x_Antecedentes_Embarazo" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Antecedentes_Embarazo" data-page="7" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Antecedentes_Embarazo->DisplayValueSeparator) ? json_encode($registro->Antecedentes_Embarazo->DisplayValueSeparator) : $registro->Antecedentes_Embarazo->DisplayValueSeparator) ?>" name="x_Antecedentes_Embarazo" id="x_Antecedentes_Embarazo" value="{value}"<?php echo $registro->Antecedentes_Embarazo->EditAttributes() ?>></div>
<div id="dsl_x_Antecedentes_Embarazo" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Antecedentes_Embarazo->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Antecedentes_Embarazo->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Antecedentes_Embarazo" data-page="7" name="x_Antecedentes_Embarazo" id="x_Antecedentes_Embarazo_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Antecedentes_Embarazo->EditAttributes() ?>><?php echo $registro->Antecedentes_Embarazo->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Antecedentes_Embarazo->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Antecedentes_Embarazo" data-page="7" name="x_Antecedentes_Embarazo" id="x_Antecedentes_Embarazo_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Antecedentes_Embarazo->CurrentValue) ?>" checked<?php echo $registro->Antecedentes_Embarazo->EditAttributes() ?>><?php echo $registro->Antecedentes_Embarazo->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Antecedentes_Embarazo->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Antecedentes_Embarazo->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Antecedentes_Embarazo, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Antecedentes_Embarazo->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Antecedentes_Embarazo" id="s_x_Antecedentes_Embarazo" value="<?php echo $registro->Antecedentes_Embarazo->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Antecedentes_Embarazo->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
		<div class="tab-pane<?php echo $registro_edit->MultiPages->PageStyle("8") ?>" id="tab_registro8">
<div>
<?php if ($registro->Candidiasis_esofagica->Visible) { // Candidiasis_esofagica ?>
	<div id="r_Candidiasis_esofagica" class="form-group">
		<label id="elh_registro_Candidiasis_esofagica" class="col-sm-2 control-label ewLabel"><?php echo $registro->Candidiasis_esofagica->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Candidiasis_esofagica->CellAttributes() ?>>
<span id="el_registro_Candidiasis_esofagica">
<div id="tp_x_Candidiasis_esofagica" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Candidiasis_esofagica" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Candidiasis_esofagica->DisplayValueSeparator) ? json_encode($registro->Candidiasis_esofagica->DisplayValueSeparator) : $registro->Candidiasis_esofagica->DisplayValueSeparator) ?>" name="x_Candidiasis_esofagica" id="x_Candidiasis_esofagica" value="{value}"<?php echo $registro->Candidiasis_esofagica->EditAttributes() ?>></div>
<div id="dsl_x_Candidiasis_esofagica" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Candidiasis_esofagica->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Candidiasis_esofagica->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Candidiasis_esofagica" data-page="8" name="x_Candidiasis_esofagica" id="x_Candidiasis_esofagica_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Candidiasis_esofagica->EditAttributes() ?>><?php echo $registro->Candidiasis_esofagica->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Candidiasis_esofagica->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Candidiasis_esofagica" data-page="8" name="x_Candidiasis_esofagica" id="x_Candidiasis_esofagica_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Candidiasis_esofagica->CurrentValue) ?>" checked<?php echo $registro->Candidiasis_esofagica->EditAttributes() ?>><?php echo $registro->Candidiasis_esofagica->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Candidiasis_esofagica->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Candidiasis_esofagica->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Candidiasis_esofagica, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Candidiasis_esofagica->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Candidiasis_esofagica" id="s_x_Candidiasis_esofagica" value="<?php echo $registro->Candidiasis_esofagica->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Candidiasis_esofagica->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Candidiasis_vias_aereas->Visible) { // Candidiasis_vias_aereas ?>
	<div id="r_Candidiasis_vias_aereas" class="form-group">
		<label id="elh_registro_Candidiasis_vias_aereas" class="col-sm-2 control-label ewLabel"><?php echo $registro->Candidiasis_vias_aereas->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Candidiasis_vias_aereas->CellAttributes() ?>>
<span id="el_registro_Candidiasis_vias_aereas">
<div id="tp_x_Candidiasis_vias_aereas" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Candidiasis_vias_aereas" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Candidiasis_vias_aereas->DisplayValueSeparator) ? json_encode($registro->Candidiasis_vias_aereas->DisplayValueSeparator) : $registro->Candidiasis_vias_aereas->DisplayValueSeparator) ?>" name="x_Candidiasis_vias_aereas" id="x_Candidiasis_vias_aereas" value="{value}"<?php echo $registro->Candidiasis_vias_aereas->EditAttributes() ?>></div>
<div id="dsl_x_Candidiasis_vias_aereas" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Candidiasis_vias_aereas->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Candidiasis_vias_aereas->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Candidiasis_vias_aereas" data-page="8" name="x_Candidiasis_vias_aereas" id="x_Candidiasis_vias_aereas_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Candidiasis_vias_aereas->EditAttributes() ?>><?php echo $registro->Candidiasis_vias_aereas->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Candidiasis_vias_aereas->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Candidiasis_vias_aereas" data-page="8" name="x_Candidiasis_vias_aereas" id="x_Candidiasis_vias_aereas_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Candidiasis_vias_aereas->CurrentValue) ?>" checked<?php echo $registro->Candidiasis_vias_aereas->EditAttributes() ?>><?php echo $registro->Candidiasis_vias_aereas->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Candidiasis_vias_aereas->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Candidiasis_vias_aereas->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Candidiasis_vias_aereas, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Candidiasis_vias_aereas->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Candidiasis_vias_aereas" id="s_x_Candidiasis_vias_aereas" value="<?php echo $registro->Candidiasis_vias_aereas->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Candidiasis_vias_aereas->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tuberculosis_pulmonar->Visible) { // Tuberculosis_pulmonar ?>
	<div id="r_Tuberculosis_pulmonar" class="form-group">
		<label id="elh_registro_Tuberculosis_pulmonar" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tuberculosis_pulmonar->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tuberculosis_pulmonar->CellAttributes() ?>>
<span id="el_registro_Tuberculosis_pulmonar">
<div id="tp_x_Tuberculosis_pulmonar" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Tuberculosis_pulmonar" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tuberculosis_pulmonar->DisplayValueSeparator) ? json_encode($registro->Tuberculosis_pulmonar->DisplayValueSeparator) : $registro->Tuberculosis_pulmonar->DisplayValueSeparator) ?>" name="x_Tuberculosis_pulmonar" id="x_Tuberculosis_pulmonar" value="{value}"<?php echo $registro->Tuberculosis_pulmonar->EditAttributes() ?>></div>
<div id="dsl_x_Tuberculosis_pulmonar" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Tuberculosis_pulmonar->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Tuberculosis_pulmonar->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Tuberculosis_pulmonar" data-page="8" name="x_Tuberculosis_pulmonar" id="x_Tuberculosis_pulmonar_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Tuberculosis_pulmonar->EditAttributes() ?>><?php echo $registro->Tuberculosis_pulmonar->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Tuberculosis_pulmonar->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Tuberculosis_pulmonar" data-page="8" name="x_Tuberculosis_pulmonar" id="x_Tuberculosis_pulmonar_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Tuberculosis_pulmonar->CurrentValue) ?>" checked<?php echo $registro->Tuberculosis_pulmonar->EditAttributes() ?>><?php echo $registro->Tuberculosis_pulmonar->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Tuberculosis_pulmonar->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tuberculosis_pulmonar->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tuberculosis_pulmonar, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tuberculosis_pulmonar->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tuberculosis_pulmonar" id="s_x_Tuberculosis_pulmonar" value="<?php echo $registro->Tuberculosis_pulmonar->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tuberculosis_pulmonar->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Cancer_cervical->Visible) { // Cancer_cervical ?>
	<div id="r_Cancer_cervical" class="form-group">
		<label id="elh_registro_Cancer_cervical" class="col-sm-2 control-label ewLabel"><?php echo $registro->Cancer_cervical->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Cancer_cervical->CellAttributes() ?>>
<span id="el_registro_Cancer_cervical">
<div id="tp_x_Cancer_cervical" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Cancer_cervical" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Cancer_cervical->DisplayValueSeparator) ? json_encode($registro->Cancer_cervical->DisplayValueSeparator) : $registro->Cancer_cervical->DisplayValueSeparator) ?>" name="x_Cancer_cervical" id="x_Cancer_cervical" value="{value}"<?php echo $registro->Cancer_cervical->EditAttributes() ?>></div>
<div id="dsl_x_Cancer_cervical" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Cancer_cervical->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Cancer_cervical->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Cancer_cervical" data-page="8" name="x_Cancer_cervical" id="x_Cancer_cervical_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Cancer_cervical->EditAttributes() ?>><?php echo $registro->Cancer_cervical->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Cancer_cervical->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Cancer_cervical" data-page="8" name="x_Cancer_cervical" id="x_Cancer_cervical_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Cancer_cervical->CurrentValue) ?>" checked<?php echo $registro->Cancer_cervical->EditAttributes() ?>><?php echo $registro->Cancer_cervical->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Cancer_cervical->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Cancer_cervical->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Cancer_cervical, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Cancer_cervical->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Cancer_cervical" id="s_x_Cancer_cervical" value="<?php echo $registro->Cancer_cervical->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Cancer_cervical->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Tuberculosis_extrapulmonar->Visible) { // Tuberculosis_extrapulmonar ?>
	<div id="r_Tuberculosis_extrapulmonar" class="form-group">
		<label id="elh_registro_Tuberculosis_extrapulmonar" class="col-sm-2 control-label ewLabel"><?php echo $registro->Tuberculosis_extrapulmonar->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Tuberculosis_extrapulmonar->CellAttributes() ?>>
<span id="el_registro_Tuberculosis_extrapulmonar">
<div id="tp_x_Tuberculosis_extrapulmonar" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Tuberculosis_extrapulmonar" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Tuberculosis_extrapulmonar->DisplayValueSeparator) ? json_encode($registro->Tuberculosis_extrapulmonar->DisplayValueSeparator) : $registro->Tuberculosis_extrapulmonar->DisplayValueSeparator) ?>" name="x_Tuberculosis_extrapulmonar" id="x_Tuberculosis_extrapulmonar" value="{value}"<?php echo $registro->Tuberculosis_extrapulmonar->EditAttributes() ?>></div>
<div id="dsl_x_Tuberculosis_extrapulmonar" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Tuberculosis_extrapulmonar->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Tuberculosis_extrapulmonar->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Tuberculosis_extrapulmonar" data-page="8" name="x_Tuberculosis_extrapulmonar" id="x_Tuberculosis_extrapulmonar_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Tuberculosis_extrapulmonar->EditAttributes() ?>><?php echo $registro->Tuberculosis_extrapulmonar->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Tuberculosis_extrapulmonar->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Tuberculosis_extrapulmonar" data-page="8" name="x_Tuberculosis_extrapulmonar" id="x_Tuberculosis_extrapulmonar_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Tuberculosis_extrapulmonar->CurrentValue) ?>" checked<?php echo $registro->Tuberculosis_extrapulmonar->EditAttributes() ?>><?php echo $registro->Tuberculosis_extrapulmonar->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Tuberculosis_extrapulmonar->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Tuberculosis_extrapulmonar->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Tuberculosis_extrapulmonar, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Tuberculosis_extrapulmonar->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Tuberculosis_extrapulmonar" id="s_x_Tuberculosis_extrapulmonar" value="<?php echo $registro->Tuberculosis_extrapulmonar->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Tuberculosis_extrapulmonar->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Coccidiomicosis->Visible) { // Coccidiomicosis ?>
	<div id="r_Coccidiomicosis" class="form-group">
		<label id="elh_registro_Coccidiomicosis" class="col-sm-2 control-label ewLabel"><?php echo $registro->Coccidiomicosis->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Coccidiomicosis->CellAttributes() ?>>
<span id="el_registro_Coccidiomicosis">
<div id="tp_x_Coccidiomicosis" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Coccidiomicosis" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Coccidiomicosis->DisplayValueSeparator) ? json_encode($registro->Coccidiomicosis->DisplayValueSeparator) : $registro->Coccidiomicosis->DisplayValueSeparator) ?>" name="x_Coccidiomicosis" id="x_Coccidiomicosis" value="{value}"<?php echo $registro->Coccidiomicosis->EditAttributes() ?>></div>
<div id="dsl_x_Coccidiomicosis" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Coccidiomicosis->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Coccidiomicosis->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Coccidiomicosis" data-page="8" name="x_Coccidiomicosis" id="x_Coccidiomicosis_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Coccidiomicosis->EditAttributes() ?>><?php echo $registro->Coccidiomicosis->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Coccidiomicosis->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Coccidiomicosis" data-page="8" name="x_Coccidiomicosis" id="x_Coccidiomicosis_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Coccidiomicosis->CurrentValue) ?>" checked<?php echo $registro->Coccidiomicosis->EditAttributes() ?>><?php echo $registro->Coccidiomicosis->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Coccidiomicosis->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Coccidiomicosis->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Coccidiomicosis, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Coccidiomicosis->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Coccidiomicosis" id="s_x_Coccidiomicosis" value="<?php echo $registro->Coccidiomicosis->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Coccidiomicosis->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Citomegalovirosis->Visible) { // Citomegalovirosis ?>
	<div id="r_Citomegalovirosis" class="form-group">
		<label id="elh_registro_Citomegalovirosis" class="col-sm-2 control-label ewLabel"><?php echo $registro->Citomegalovirosis->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Citomegalovirosis->CellAttributes() ?>>
<span id="el_registro_Citomegalovirosis">
<div id="tp_x_Citomegalovirosis" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Citomegalovirosis" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Citomegalovirosis->DisplayValueSeparator) ? json_encode($registro->Citomegalovirosis->DisplayValueSeparator) : $registro->Citomegalovirosis->DisplayValueSeparator) ?>" name="x_Citomegalovirosis" id="x_Citomegalovirosis" value="{value}"<?php echo $registro->Citomegalovirosis->EditAttributes() ?>></div>
<div id="dsl_x_Citomegalovirosis" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Citomegalovirosis->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Citomegalovirosis->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Citomegalovirosis" data-page="8" name="x_Citomegalovirosis" id="x_Citomegalovirosis_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Citomegalovirosis->EditAttributes() ?>><?php echo $registro->Citomegalovirosis->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Citomegalovirosis->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Citomegalovirosis" data-page="8" name="x_Citomegalovirosis" id="x_Citomegalovirosis_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Citomegalovirosis->CurrentValue) ?>" checked<?php echo $registro->Citomegalovirosis->EditAttributes() ?>><?php echo $registro->Citomegalovirosis->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Citomegalovirosis->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Citomegalovirosis->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Citomegalovirosis, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Citomegalovirosis->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Citomegalovirosis" id="s_x_Citomegalovirosis" value="<?php echo $registro->Citomegalovirosis->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Citomegalovirosis->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Retinitis_citomegalovirosis->Visible) { // Retinitis_citomegalovirosis ?>
	<div id="r_Retinitis_citomegalovirosis" class="form-group">
		<label id="elh_registro_Retinitis_citomegalovirosis" class="col-sm-2 control-label ewLabel"><?php echo $registro->Retinitis_citomegalovirosis->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Retinitis_citomegalovirosis->CellAttributes() ?>>
<span id="el_registro_Retinitis_citomegalovirosis">
<div id="tp_x_Retinitis_citomegalovirosis" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Retinitis_citomegalovirosis" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Retinitis_citomegalovirosis->DisplayValueSeparator) ? json_encode($registro->Retinitis_citomegalovirosis->DisplayValueSeparator) : $registro->Retinitis_citomegalovirosis->DisplayValueSeparator) ?>" name="x_Retinitis_citomegalovirosis" id="x_Retinitis_citomegalovirosis" value="{value}"<?php echo $registro->Retinitis_citomegalovirosis->EditAttributes() ?>></div>
<div id="dsl_x_Retinitis_citomegalovirosis" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Retinitis_citomegalovirosis->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Retinitis_citomegalovirosis->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Retinitis_citomegalovirosis" data-page="8" name="x_Retinitis_citomegalovirosis" id="x_Retinitis_citomegalovirosis_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Retinitis_citomegalovirosis->EditAttributes() ?>><?php echo $registro->Retinitis_citomegalovirosis->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Retinitis_citomegalovirosis->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Retinitis_citomegalovirosis" data-page="8" name="x_Retinitis_citomegalovirosis" id="x_Retinitis_citomegalovirosis_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Retinitis_citomegalovirosis->CurrentValue) ?>" checked<?php echo $registro->Retinitis_citomegalovirosis->EditAttributes() ?>><?php echo $registro->Retinitis_citomegalovirosis->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Retinitis_citomegalovirosis->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Retinitis_citomegalovirosis->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Retinitis_citomegalovirosis, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Retinitis_citomegalovirosis->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Retinitis_citomegalovirosis" id="s_x_Retinitis_citomegalovirosis" value="<?php echo $registro->Retinitis_citomegalovirosis->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Retinitis_citomegalovirosis->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Sindrome_Emanciacion->Visible) { // Sindrome_Emanciacion ?>
	<div id="r_Sindrome_Emanciacion" class="form-group">
		<label id="elh_registro_Sindrome_Emanciacion" class="col-sm-2 control-label ewLabel"><?php echo $registro->Sindrome_Emanciacion->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Sindrome_Emanciacion->CellAttributes() ?>>
<span id="el_registro_Sindrome_Emanciacion">
<div id="tp_x_Sindrome_Emanciacion" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Sindrome_Emanciacion" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Sindrome_Emanciacion->DisplayValueSeparator) ? json_encode($registro->Sindrome_Emanciacion->DisplayValueSeparator) : $registro->Sindrome_Emanciacion->DisplayValueSeparator) ?>" name="x_Sindrome_Emanciacion" id="x_Sindrome_Emanciacion" value="{value}"<?php echo $registro->Sindrome_Emanciacion->EditAttributes() ?>></div>
<div id="dsl_x_Sindrome_Emanciacion" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Sindrome_Emanciacion->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Sindrome_Emanciacion->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Sindrome_Emanciacion" data-page="8" name="x_Sindrome_Emanciacion" id="x_Sindrome_Emanciacion_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Sindrome_Emanciacion->EditAttributes() ?>><?php echo $registro->Sindrome_Emanciacion->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Sindrome_Emanciacion->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Sindrome_Emanciacion" data-page="8" name="x_Sindrome_Emanciacion" id="x_Sindrome_Emanciacion_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Sindrome_Emanciacion->CurrentValue) ?>" checked<?php echo $registro->Sindrome_Emanciacion->EditAttributes() ?>><?php echo $registro->Sindrome_Emanciacion->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Sindrome_Emanciacion->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Sindrome_Emanciacion->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Sindrome_Emanciacion, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Sindrome_Emanciacion->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Sindrome_Emanciacion" id="s_x_Sindrome_Emanciacion" value="<?php echo $registro->Sindrome_Emanciacion->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Sindrome_Emanciacion->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Encefalopatia->Visible) { // Encefalopatia ?>
	<div id="r_Encefalopatia" class="form-group">
		<label id="elh_registro_Encefalopatia" class="col-sm-2 control-label ewLabel"><?php echo $registro->Encefalopatia->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Encefalopatia->CellAttributes() ?>>
<span id="el_registro_Encefalopatia">
<div id="tp_x_Encefalopatia" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Encefalopatia" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Encefalopatia->DisplayValueSeparator) ? json_encode($registro->Encefalopatia->DisplayValueSeparator) : $registro->Encefalopatia->DisplayValueSeparator) ?>" name="x_Encefalopatia" id="x_Encefalopatia" value="{value}"<?php echo $registro->Encefalopatia->EditAttributes() ?>></div>
<div id="dsl_x_Encefalopatia" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Encefalopatia->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Encefalopatia->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Encefalopatia" data-page="8" name="x_Encefalopatia" id="x_Encefalopatia_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Encefalopatia->EditAttributes() ?>><?php echo $registro->Encefalopatia->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Encefalopatia->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Encefalopatia" data-page="8" name="x_Encefalopatia" id="x_Encefalopatia_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Encefalopatia->CurrentValue) ?>" checked<?php echo $registro->Encefalopatia->EditAttributes() ?>><?php echo $registro->Encefalopatia->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Encefalopatia->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Encefalopatia->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Encefalopatia, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Encefalopatia->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Encefalopatia" id="s_x_Encefalopatia" value="<?php echo $registro->Encefalopatia->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Encefalopatia->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Otras_micobacterias->Visible) { // Otras_micobacterias ?>
	<div id="r_Otras_micobacterias" class="form-group">
		<label id="elh_registro_Otras_micobacterias" class="col-sm-2 control-label ewLabel"><?php echo $registro->Otras_micobacterias->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Otras_micobacterias->CellAttributes() ?>>
<span id="el_registro_Otras_micobacterias">
<div id="tp_x_Otras_micobacterias" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Otras_micobacterias" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Otras_micobacterias->DisplayValueSeparator) ? json_encode($registro->Otras_micobacterias->DisplayValueSeparator) : $registro->Otras_micobacterias->DisplayValueSeparator) ?>" name="x_Otras_micobacterias" id="x_Otras_micobacterias" value="{value}"<?php echo $registro->Otras_micobacterias->EditAttributes() ?>></div>
<div id="dsl_x_Otras_micobacterias" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Otras_micobacterias->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Otras_micobacterias->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Otras_micobacterias" data-page="8" name="x_Otras_micobacterias" id="x_Otras_micobacterias_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Otras_micobacterias->EditAttributes() ?>><?php echo $registro->Otras_micobacterias->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Otras_micobacterias->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Otras_micobacterias" data-page="8" name="x_Otras_micobacterias" id="x_Otras_micobacterias_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Otras_micobacterias->CurrentValue) ?>" checked<?php echo $registro->Otras_micobacterias->EditAttributes() ?>><?php echo $registro->Otras_micobacterias->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Otras_micobacterias->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Otras_micobacterias->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Otras_micobacterias, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Otras_micobacterias->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Otras_micobacterias" id="s_x_Otras_micobacterias" value="<?php echo $registro->Otras_micobacterias->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Otras_micobacterias->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Histoplasmosis_Extrapulmonar->Visible) { // Histoplasmosis_Extrapulmonar ?>
	<div id="r_Histoplasmosis_Extrapulmonar" class="form-group">
		<label id="elh_registro_Histoplasmosis_Extrapulmonar" class="col-sm-2 control-label ewLabel"><?php echo $registro->Histoplasmosis_Extrapulmonar->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Histoplasmosis_Extrapulmonar->CellAttributes() ?>>
<span id="el_registro_Histoplasmosis_Extrapulmonar">
<div id="tp_x_Histoplasmosis_Extrapulmonar" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_Extrapulmonar" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Histoplasmosis_Extrapulmonar->DisplayValueSeparator) ? json_encode($registro->Histoplasmosis_Extrapulmonar->DisplayValueSeparator) : $registro->Histoplasmosis_Extrapulmonar->DisplayValueSeparator) ?>" name="x_Histoplasmosis_Extrapulmonar" id="x_Histoplasmosis_Extrapulmonar" value="{value}"<?php echo $registro->Histoplasmosis_Extrapulmonar->EditAttributes() ?>></div>
<div id="dsl_x_Histoplasmosis_Extrapulmonar" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Histoplasmosis_Extrapulmonar->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Histoplasmosis_Extrapulmonar->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_Extrapulmonar" data-page="8" name="x_Histoplasmosis_Extrapulmonar" id="x_Histoplasmosis_Extrapulmonar_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Histoplasmosis_Extrapulmonar->EditAttributes() ?>><?php echo $registro->Histoplasmosis_Extrapulmonar->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Histoplasmosis_Extrapulmonar->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_Extrapulmonar" data-page="8" name="x_Histoplasmosis_Extrapulmonar" id="x_Histoplasmosis_Extrapulmonar_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Histoplasmosis_Extrapulmonar->CurrentValue) ?>" checked<?php echo $registro->Histoplasmosis_Extrapulmonar->EditAttributes() ?>><?php echo $registro->Histoplasmosis_Extrapulmonar->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Histoplasmosis_Extrapulmonar->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Histoplasmosis_Extrapulmonar->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Histoplasmosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Histoplasmosis_Extrapulmonar->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Histoplasmosis_Extrapulmonar" id="s_x_Histoplasmosis_Extrapulmonar" value="<?php echo $registro->Histoplasmosis_Extrapulmonar->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Histoplasmosis_Extrapulmonar->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->isosporidiasis_cronica->Visible) { // isosporidiasis_cronica ?>
	<div id="r_isosporidiasis_cronica" class="form-group">
		<label id="elh_registro_isosporidiasis_cronica" class="col-sm-2 control-label ewLabel"><?php echo $registro->isosporidiasis_cronica->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->isosporidiasis_cronica->CellAttributes() ?>>
<span id="el_registro_isosporidiasis_cronica">
<div id="tp_x_isosporidiasis_cronica" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_isosporidiasis_cronica" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->isosporidiasis_cronica->DisplayValueSeparator) ? json_encode($registro->isosporidiasis_cronica->DisplayValueSeparator) : $registro->isosporidiasis_cronica->DisplayValueSeparator) ?>" name="x_isosporidiasis_cronica" id="x_isosporidiasis_cronica" value="{value}"<?php echo $registro->isosporidiasis_cronica->EditAttributes() ?>></div>
<div id="dsl_x_isosporidiasis_cronica" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->isosporidiasis_cronica->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->isosporidiasis_cronica->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_isosporidiasis_cronica" data-page="8" name="x_isosporidiasis_cronica" id="x_isosporidiasis_cronica_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->isosporidiasis_cronica->EditAttributes() ?>><?php echo $registro->isosporidiasis_cronica->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->isosporidiasis_cronica->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_isosporidiasis_cronica" data-page="8" name="x_isosporidiasis_cronica" id="x_isosporidiasis_cronica_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->isosporidiasis_cronica->CurrentValue) ?>" checked<?php echo $registro->isosporidiasis_cronica->EditAttributes() ?>><?php echo $registro->isosporidiasis_cronica->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->isosporidiasis_cronica->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->isosporidiasis_cronica->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->isosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->isosporidiasis_cronica->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_isosporidiasis_cronica" id="s_x_isosporidiasis_cronica" value="<?php echo $registro->isosporidiasis_cronica->LookupFilterQuery() ?>">
</span>
<?php echo $registro->isosporidiasis_cronica->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->herpes_zoster->Visible) { // herpes_zoster ?>
	<div id="r_herpes_zoster" class="form-group">
		<label id="elh_registro_herpes_zoster" class="col-sm-2 control-label ewLabel"><?php echo $registro->herpes_zoster->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->herpes_zoster->CellAttributes() ?>>
<span id="el_registro_herpes_zoster">
<div id="tp_x_herpes_zoster" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_herpes_zoster" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->herpes_zoster->DisplayValueSeparator) ? json_encode($registro->herpes_zoster->DisplayValueSeparator) : $registro->herpes_zoster->DisplayValueSeparator) ?>" name="x_herpes_zoster" id="x_herpes_zoster" value="{value}"<?php echo $registro->herpes_zoster->EditAttributes() ?>></div>
<div id="dsl_x_herpes_zoster" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->herpes_zoster->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->herpes_zoster->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_herpes_zoster" data-page="8" name="x_herpes_zoster" id="x_herpes_zoster_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->herpes_zoster->EditAttributes() ?>><?php echo $registro->herpes_zoster->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->herpes_zoster->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_herpes_zoster" data-page="8" name="x_herpes_zoster" id="x_herpes_zoster_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->herpes_zoster->CurrentValue) ?>" checked<?php echo $registro->herpes_zoster->EditAttributes() ?>><?php echo $registro->herpes_zoster->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->herpes_zoster->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->herpes_zoster->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->herpes_zoster, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->herpes_zoster->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_herpes_zoster" id="s_x_herpes_zoster" value="<?php echo $registro->herpes_zoster->LookupFilterQuery() ?>">
</span>
<?php echo $registro->herpes_zoster->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Histoplasmosis_diseminada->Visible) { // Histoplasmosis_diseminada ?>
	<div id="r_Histoplasmosis_diseminada" class="form-group">
		<label id="elh_registro_Histoplasmosis_diseminada" class="col-sm-2 control-label ewLabel"><?php echo $registro->Histoplasmosis_diseminada->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Histoplasmosis_diseminada->CellAttributes() ?>>
<span id="el_registro_Histoplasmosis_diseminada">
<div id="tp_x_Histoplasmosis_diseminada" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_diseminada" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Histoplasmosis_diseminada->DisplayValueSeparator) ? json_encode($registro->Histoplasmosis_diseminada->DisplayValueSeparator) : $registro->Histoplasmosis_diseminada->DisplayValueSeparator) ?>" name="x_Histoplasmosis_diseminada" id="x_Histoplasmosis_diseminada" value="{value}"<?php echo $registro->Histoplasmosis_diseminada->EditAttributes() ?>></div>
<div id="dsl_x_Histoplasmosis_diseminada" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Histoplasmosis_diseminada->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Histoplasmosis_diseminada->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_diseminada" data-page="8" name="x_Histoplasmosis_diseminada" id="x_Histoplasmosis_diseminada_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Histoplasmosis_diseminada->EditAttributes() ?>><?php echo $registro->Histoplasmosis_diseminada->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Histoplasmosis_diseminada->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Histoplasmosis_diseminada" data-page="8" name="x_Histoplasmosis_diseminada" id="x_Histoplasmosis_diseminada_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Histoplasmosis_diseminada->CurrentValue) ?>" checked<?php echo $registro->Histoplasmosis_diseminada->EditAttributes() ?>><?php echo $registro->Histoplasmosis_diseminada->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Histoplasmosis_diseminada->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Histoplasmosis_diseminada->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Histoplasmosis_diseminada, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Histoplasmosis_diseminada->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Histoplasmosis_diseminada" id="s_x_Histoplasmosis_diseminada" value="<?php echo $registro->Histoplasmosis_diseminada->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Histoplasmosis_diseminada->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Linfoma_Burkitt->Visible) { // Linfoma_Burkitt ?>
	<div id="r_Linfoma_Burkitt" class="form-group">
		<label id="elh_registro_Linfoma_Burkitt" class="col-sm-2 control-label ewLabel"><?php echo $registro->Linfoma_Burkitt->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Linfoma_Burkitt->CellAttributes() ?>>
<span id="el_registro_Linfoma_Burkitt">
<div id="tp_x_Linfoma_Burkitt" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Linfoma_Burkitt" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Linfoma_Burkitt->DisplayValueSeparator) ? json_encode($registro->Linfoma_Burkitt->DisplayValueSeparator) : $registro->Linfoma_Burkitt->DisplayValueSeparator) ?>" name="x_Linfoma_Burkitt" id="x_Linfoma_Burkitt" value="{value}"<?php echo $registro->Linfoma_Burkitt->EditAttributes() ?>></div>
<div id="dsl_x_Linfoma_Burkitt" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Linfoma_Burkitt->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Linfoma_Burkitt->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Linfoma_Burkitt" data-page="8" name="x_Linfoma_Burkitt" id="x_Linfoma_Burkitt_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Linfoma_Burkitt->EditAttributes() ?>><?php echo $registro->Linfoma_Burkitt->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Linfoma_Burkitt->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Linfoma_Burkitt" data-page="8" name="x_Linfoma_Burkitt" id="x_Linfoma_Burkitt_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Linfoma_Burkitt->CurrentValue) ?>" checked<?php echo $registro->Linfoma_Burkitt->EditAttributes() ?>><?php echo $registro->Linfoma_Burkitt->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Linfoma_Burkitt->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Linfoma_Burkitt->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Linfoma_Burkitt, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Linfoma_Burkitt->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Linfoma_Burkitt" id="s_x_Linfoma_Burkitt" value="<?php echo $registro->Linfoma_Burkitt->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Linfoma_Burkitt->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Neumonia_Pneumocystis->Visible) { // Neumonia_Pneumocystis ?>
	<div id="r_Neumonia_Pneumocystis" class="form-group">
		<label id="elh_registro_Neumonia_Pneumocystis" class="col-sm-2 control-label ewLabel"><?php echo $registro->Neumonia_Pneumocystis->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Neumonia_Pneumocystis->CellAttributes() ?>>
<span id="el_registro_Neumonia_Pneumocystis">
<div id="tp_x_Neumonia_Pneumocystis" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Neumonia_Pneumocystis" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Neumonia_Pneumocystis->DisplayValueSeparator) ? json_encode($registro->Neumonia_Pneumocystis->DisplayValueSeparator) : $registro->Neumonia_Pneumocystis->DisplayValueSeparator) ?>" name="x_Neumonia_Pneumocystis" id="x_Neumonia_Pneumocystis" value="{value}"<?php echo $registro->Neumonia_Pneumocystis->EditAttributes() ?>></div>
<div id="dsl_x_Neumonia_Pneumocystis" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Neumonia_Pneumocystis->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Neumonia_Pneumocystis->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Neumonia_Pneumocystis" data-page="8" name="x_Neumonia_Pneumocystis" id="x_Neumonia_Pneumocystis_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Neumonia_Pneumocystis->EditAttributes() ?>><?php echo $registro->Neumonia_Pneumocystis->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Neumonia_Pneumocystis->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Neumonia_Pneumocystis" data-page="8" name="x_Neumonia_Pneumocystis" id="x_Neumonia_Pneumocystis_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Neumonia_Pneumocystis->CurrentValue) ?>" checked<?php echo $registro->Neumonia_Pneumocystis->EditAttributes() ?>><?php echo $registro->Neumonia_Pneumocystis->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Neumonia_Pneumocystis->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Neumonia_Pneumocystis->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Neumonia_Pneumocystis, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Neumonia_Pneumocystis->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Neumonia_Pneumocystis" id="s_x_Neumonia_Pneumocystis" value="<?php echo $registro->Neumonia_Pneumocystis->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Neumonia_Pneumocystis->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Neumonia_Recurrente->Visible) { // Neumonia_Recurrente ?>
	<div id="r_Neumonia_Recurrente" class="form-group">
		<label id="elh_registro_Neumonia_Recurrente" class="col-sm-2 control-label ewLabel"><?php echo $registro->Neumonia_Recurrente->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Neumonia_Recurrente->CellAttributes() ?>>
<span id="el_registro_Neumonia_Recurrente">
<div id="tp_x_Neumonia_Recurrente" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Neumonia_Recurrente" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Neumonia_Recurrente->DisplayValueSeparator) ? json_encode($registro->Neumonia_Recurrente->DisplayValueSeparator) : $registro->Neumonia_Recurrente->DisplayValueSeparator) ?>" name="x_Neumonia_Recurrente" id="x_Neumonia_Recurrente" value="{value}"<?php echo $registro->Neumonia_Recurrente->EditAttributes() ?>></div>
<div id="dsl_x_Neumonia_Recurrente" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Neumonia_Recurrente->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Neumonia_Recurrente->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Neumonia_Recurrente" data-page="8" name="x_Neumonia_Recurrente" id="x_Neumonia_Recurrente_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Neumonia_Recurrente->EditAttributes() ?>><?php echo $registro->Neumonia_Recurrente->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Neumonia_Recurrente->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Neumonia_Recurrente" data-page="8" name="x_Neumonia_Recurrente" id="x_Neumonia_Recurrente_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Neumonia_Recurrente->CurrentValue) ?>" checked<?php echo $registro->Neumonia_Recurrente->EditAttributes() ?>><?php echo $registro->Neumonia_Recurrente->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Neumonia_Recurrente->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Neumonia_Recurrente->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Neumonia_Recurrente, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Neumonia_Recurrente->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Neumonia_Recurrente" id="s_x_Neumonia_Recurrente" value="<?php echo $registro->Neumonia_Recurrente->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Neumonia_Recurrente->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Linfoma_Inmunoblastico->Visible) { // Linfoma_Inmunoblastico ?>
	<div id="r_Linfoma_Inmunoblastico" class="form-group">
		<label id="elh_registro_Linfoma_Inmunoblastico" class="col-sm-2 control-label ewLabel"><?php echo $registro->Linfoma_Inmunoblastico->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Linfoma_Inmunoblastico->CellAttributes() ?>>
<span id="el_registro_Linfoma_Inmunoblastico">
<div id="tp_x_Linfoma_Inmunoblastico" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Linfoma_Inmunoblastico" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Linfoma_Inmunoblastico->DisplayValueSeparator) ? json_encode($registro->Linfoma_Inmunoblastico->DisplayValueSeparator) : $registro->Linfoma_Inmunoblastico->DisplayValueSeparator) ?>" name="x_Linfoma_Inmunoblastico" id="x_Linfoma_Inmunoblastico" value="{value}"<?php echo $registro->Linfoma_Inmunoblastico->EditAttributes() ?>></div>
<div id="dsl_x_Linfoma_Inmunoblastico" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Linfoma_Inmunoblastico->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Linfoma_Inmunoblastico->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Linfoma_Inmunoblastico" data-page="8" name="x_Linfoma_Inmunoblastico" id="x_Linfoma_Inmunoblastico_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Linfoma_Inmunoblastico->EditAttributes() ?>><?php echo $registro->Linfoma_Inmunoblastico->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Linfoma_Inmunoblastico->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Linfoma_Inmunoblastico" data-page="8" name="x_Linfoma_Inmunoblastico" id="x_Linfoma_Inmunoblastico_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Linfoma_Inmunoblastico->CurrentValue) ?>" checked<?php echo $registro->Linfoma_Inmunoblastico->EditAttributes() ?>><?php echo $registro->Linfoma_Inmunoblastico->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Linfoma_Inmunoblastico->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Linfoma_Inmunoblastico->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Linfoma_Inmunoblastico, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Linfoma_Inmunoblastico->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Linfoma_Inmunoblastico" id="s_x_Linfoma_Inmunoblastico" value="<?php echo $registro->Linfoma_Inmunoblastico->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Linfoma_Inmunoblastico->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Criptosporidiasis_cronica->Visible) { // Criptosporidiasis_cronica ?>
	<div id="r_Criptosporidiasis_cronica" class="form-group">
		<label id="elh_registro_Criptosporidiasis_cronica" class="col-sm-2 control-label ewLabel"><?php echo $registro->Criptosporidiasis_cronica->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Criptosporidiasis_cronica->CellAttributes() ?>>
<span id="el_registro_Criptosporidiasis_cronica">
<div id="tp_x_Criptosporidiasis_cronica" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Criptosporidiasis_cronica" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Criptosporidiasis_cronica->DisplayValueSeparator) ? json_encode($registro->Criptosporidiasis_cronica->DisplayValueSeparator) : $registro->Criptosporidiasis_cronica->DisplayValueSeparator) ?>" name="x_Criptosporidiasis_cronica" id="x_Criptosporidiasis_cronica" value="{value}"<?php echo $registro->Criptosporidiasis_cronica->EditAttributes() ?>></div>
<div id="dsl_x_Criptosporidiasis_cronica" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Criptosporidiasis_cronica->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Criptosporidiasis_cronica->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Criptosporidiasis_cronica" data-page="8" name="x_Criptosporidiasis_cronica" id="x_Criptosporidiasis_cronica_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Criptosporidiasis_cronica->EditAttributes() ?>><?php echo $registro->Criptosporidiasis_cronica->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Criptosporidiasis_cronica->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Criptosporidiasis_cronica" data-page="8" name="x_Criptosporidiasis_cronica" id="x_Criptosporidiasis_cronica_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Criptosporidiasis_cronica->CurrentValue) ?>" checked<?php echo $registro->Criptosporidiasis_cronica->EditAttributes() ?>><?php echo $registro->Criptosporidiasis_cronica->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Criptosporidiasis_cronica->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Criptosporidiasis_cronica->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Criptosporidiasis_cronica, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Criptosporidiasis_cronica->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Criptosporidiasis_cronica" id="s_x_Criptosporidiasis_cronica" value="<?php echo $registro->Criptosporidiasis_cronica->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Criptosporidiasis_cronica->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Criptococosis_Extrapulmonar->Visible) { // Criptococosis_Extrapulmonar ?>
	<div id="r_Criptococosis_Extrapulmonar" class="form-group">
		<label id="elh_registro_Criptococosis_Extrapulmonar" class="col-sm-2 control-label ewLabel"><?php echo $registro->Criptococosis_Extrapulmonar->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Criptococosis_Extrapulmonar->CellAttributes() ?>>
<span id="el_registro_Criptococosis_Extrapulmonar">
<div id="tp_x_Criptococosis_Extrapulmonar" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Criptococosis_Extrapulmonar" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Criptococosis_Extrapulmonar->DisplayValueSeparator) ? json_encode($registro->Criptococosis_Extrapulmonar->DisplayValueSeparator) : $registro->Criptococosis_Extrapulmonar->DisplayValueSeparator) ?>" name="x_Criptococosis_Extrapulmonar" id="x_Criptococosis_Extrapulmonar" value="{value}"<?php echo $registro->Criptococosis_Extrapulmonar->EditAttributes() ?>></div>
<div id="dsl_x_Criptococosis_Extrapulmonar" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Criptococosis_Extrapulmonar->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Criptococosis_Extrapulmonar->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Criptococosis_Extrapulmonar" data-page="8" name="x_Criptococosis_Extrapulmonar" id="x_Criptococosis_Extrapulmonar_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Criptococosis_Extrapulmonar->EditAttributes() ?>><?php echo $registro->Criptococosis_Extrapulmonar->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Criptococosis_Extrapulmonar->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Criptococosis_Extrapulmonar" data-page="8" name="x_Criptococosis_Extrapulmonar" id="x_Criptococosis_Extrapulmonar_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Criptococosis_Extrapulmonar->CurrentValue) ?>" checked<?php echo $registro->Criptococosis_Extrapulmonar->EditAttributes() ?>><?php echo $registro->Criptococosis_Extrapulmonar->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Criptococosis_Extrapulmonar->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Criptococosis_Extrapulmonar->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Criptococosis_Extrapulmonar, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Criptococosis_Extrapulmonar->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Criptococosis_Extrapulmonar" id="s_x_Criptococosis_Extrapulmonar" value="<?php echo $registro->Criptococosis_Extrapulmonar->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Criptococosis_Extrapulmonar->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Sarcoma_Kaposi->Visible) { // Sarcoma_Kaposi ?>
	<div id="r_Sarcoma_Kaposi" class="form-group">
		<label id="elh_registro_Sarcoma_Kaposi" class="col-sm-2 control-label ewLabel"><?php echo $registro->Sarcoma_Kaposi->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Sarcoma_Kaposi->CellAttributes() ?>>
<span id="el_registro_Sarcoma_Kaposi">
<div id="tp_x_Sarcoma_Kaposi" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Sarcoma_Kaposi" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Sarcoma_Kaposi->DisplayValueSeparator) ? json_encode($registro->Sarcoma_Kaposi->DisplayValueSeparator) : $registro->Sarcoma_Kaposi->DisplayValueSeparator) ?>" name="x_Sarcoma_Kaposi" id="x_Sarcoma_Kaposi" value="{value}"<?php echo $registro->Sarcoma_Kaposi->EditAttributes() ?>></div>
<div id="dsl_x_Sarcoma_Kaposi" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Sarcoma_Kaposi->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Sarcoma_Kaposi->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Sarcoma_Kaposi" data-page="8" name="x_Sarcoma_Kaposi" id="x_Sarcoma_Kaposi_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Sarcoma_Kaposi->EditAttributes() ?>><?php echo $registro->Sarcoma_Kaposi->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Sarcoma_Kaposi->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Sarcoma_Kaposi" data-page="8" name="x_Sarcoma_Kaposi" id="x_Sarcoma_Kaposi_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Sarcoma_Kaposi->CurrentValue) ?>" checked<?php echo $registro->Sarcoma_Kaposi->EditAttributes() ?>><?php echo $registro->Sarcoma_Kaposi->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Sarcoma_Kaposi->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Sarcoma_Kaposi->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Sarcoma_Kaposi, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Sarcoma_Kaposi->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Sarcoma_Kaposi" id="s_x_Sarcoma_Kaposi" value="<?php echo $registro->Sarcoma_Kaposi->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Sarcoma_Kaposi->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Leucoencefalopatia_Multifocal->Visible) { // Leucoencefalopatia_Multifocal ?>
	<div id="r_Leucoencefalopatia_Multifocal" class="form-group">
		<label id="elh_registro_Leucoencefalopatia_Multifocal" class="col-sm-2 control-label ewLabel"><?php echo $registro->Leucoencefalopatia_Multifocal->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Leucoencefalopatia_Multifocal->CellAttributes() ?>>
<span id="el_registro_Leucoencefalopatia_Multifocal">
<div id="tp_x_Leucoencefalopatia_Multifocal" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Leucoencefalopatia_Multifocal" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Leucoencefalopatia_Multifocal->DisplayValueSeparator) ? json_encode($registro->Leucoencefalopatia_Multifocal->DisplayValueSeparator) : $registro->Leucoencefalopatia_Multifocal->DisplayValueSeparator) ?>" name="x_Leucoencefalopatia_Multifocal" id="x_Leucoencefalopatia_Multifocal" value="{value}"<?php echo $registro->Leucoencefalopatia_Multifocal->EditAttributes() ?>></div>
<div id="dsl_x_Leucoencefalopatia_Multifocal" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Leucoencefalopatia_Multifocal->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Leucoencefalopatia_Multifocal->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Leucoencefalopatia_Multifocal" data-page="8" name="x_Leucoencefalopatia_Multifocal" id="x_Leucoencefalopatia_Multifocal_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Leucoencefalopatia_Multifocal->EditAttributes() ?>><?php echo $registro->Leucoencefalopatia_Multifocal->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Leucoencefalopatia_Multifocal->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Leucoencefalopatia_Multifocal" data-page="8" name="x_Leucoencefalopatia_Multifocal" id="x_Leucoencefalopatia_Multifocal_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Leucoencefalopatia_Multifocal->CurrentValue) ?>" checked<?php echo $registro->Leucoencefalopatia_Multifocal->EditAttributes() ?>><?php echo $registro->Leucoencefalopatia_Multifocal->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Leucoencefalopatia_Multifocal->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Leucoencefalopatia_Multifocal->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Leucoencefalopatia_Multifocal, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Leucoencefalopatia_Multifocal->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Leucoencefalopatia_Multifocal" id="s_x_Leucoencefalopatia_Multifocal" value="<?php echo $registro->Leucoencefalopatia_Multifocal->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Leucoencefalopatia_Multifocal->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Septicemia_recurrente->Visible) { // Septicemia_recurrente ?>
	<div id="r_Septicemia_recurrente" class="form-group">
		<label id="elh_registro_Septicemia_recurrente" class="col-sm-2 control-label ewLabel"><?php echo $registro->Septicemia_recurrente->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Septicemia_recurrente->CellAttributes() ?>>
<span id="el_registro_Septicemia_recurrente">
<div id="tp_x_Septicemia_recurrente" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Septicemia_recurrente" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Septicemia_recurrente->DisplayValueSeparator) ? json_encode($registro->Septicemia_recurrente->DisplayValueSeparator) : $registro->Septicemia_recurrente->DisplayValueSeparator) ?>" name="x_Septicemia_recurrente" id="x_Septicemia_recurrente" value="{value}"<?php echo $registro->Septicemia_recurrente->EditAttributes() ?>></div>
<div id="dsl_x_Septicemia_recurrente" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Septicemia_recurrente->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Septicemia_recurrente->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Septicemia_recurrente" data-page="8" name="x_Septicemia_recurrente" id="x_Septicemia_recurrente_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Septicemia_recurrente->EditAttributes() ?>><?php echo $registro->Septicemia_recurrente->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Septicemia_recurrente->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Septicemia_recurrente" data-page="8" name="x_Septicemia_recurrente" id="x_Septicemia_recurrente_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Septicemia_recurrente->CurrentValue) ?>" checked<?php echo $registro->Septicemia_recurrente->EditAttributes() ?>><?php echo $registro->Septicemia_recurrente->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Septicemia_recurrente->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Septicemia_recurrente->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Septicemia_recurrente, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Septicemia_recurrente->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Septicemia_recurrente" id="s_x_Septicemia_recurrente" value="<?php echo $registro->Septicemia_recurrente->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Septicemia_recurrente->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Toxoplasmosis_cerebral->Visible) { // Toxoplasmosis_cerebral ?>
	<div id="r_Toxoplasmosis_cerebral" class="form-group">
		<label id="elh_registro_Toxoplasmosis_cerebral" class="col-sm-2 control-label ewLabel"><?php echo $registro->Toxoplasmosis_cerebral->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Toxoplasmosis_cerebral->CellAttributes() ?>>
<span id="el_registro_Toxoplasmosis_cerebral">
<div id="tp_x_Toxoplasmosis_cerebral" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Toxoplasmosis_cerebral" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Toxoplasmosis_cerebral->DisplayValueSeparator) ? json_encode($registro->Toxoplasmosis_cerebral->DisplayValueSeparator) : $registro->Toxoplasmosis_cerebral->DisplayValueSeparator) ?>" name="x_Toxoplasmosis_cerebral" id="x_Toxoplasmosis_cerebral" value="{value}"<?php echo $registro->Toxoplasmosis_cerebral->EditAttributes() ?>></div>
<div id="dsl_x_Toxoplasmosis_cerebral" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Toxoplasmosis_cerebral->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Toxoplasmosis_cerebral->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Toxoplasmosis_cerebral" data-page="8" name="x_Toxoplasmosis_cerebral" id="x_Toxoplasmosis_cerebral_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Toxoplasmosis_cerebral->EditAttributes() ?>><?php echo $registro->Toxoplasmosis_cerebral->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Toxoplasmosis_cerebral->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Toxoplasmosis_cerebral" data-page="8" name="x_Toxoplasmosis_cerebral" id="x_Toxoplasmosis_cerebral_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Toxoplasmosis_cerebral->CurrentValue) ?>" checked<?php echo $registro->Toxoplasmosis_cerebral->EditAttributes() ?>><?php echo $registro->Toxoplasmosis_cerebral->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Toxoplasmosis_cerebral->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Toxoplasmosis_cerebral->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Toxoplasmosis_cerebral, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Toxoplasmosis_cerebral->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Toxoplasmosis_cerebral" id="s_x_Toxoplasmosis_cerebral" value="<?php echo $registro->Toxoplasmosis_cerebral->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Toxoplasmosis_cerebral->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->HepatitisB->Visible) { // HepatitisB ?>
	<div id="r_HepatitisB" class="form-group">
		<label id="elh_registro_HepatitisB" class="col-sm-2 control-label ewLabel"><?php echo $registro->HepatitisB->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->HepatitisB->CellAttributes() ?>>
<span id="el_registro_HepatitisB">
<div id="tp_x_HepatitisB" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_HepatitisB" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->HepatitisB->DisplayValueSeparator) ? json_encode($registro->HepatitisB->DisplayValueSeparator) : $registro->HepatitisB->DisplayValueSeparator) ?>" name="x_HepatitisB" id="x_HepatitisB" value="{value}"<?php echo $registro->HepatitisB->EditAttributes() ?>></div>
<div id="dsl_x_HepatitisB" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->HepatitisB->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->HepatitisB->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_HepatitisB" data-page="8" name="x_HepatitisB" id="x_HepatitisB_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->HepatitisB->EditAttributes() ?>><?php echo $registro->HepatitisB->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->HepatitisB->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_HepatitisB" data-page="8" name="x_HepatitisB" id="x_HepatitisB_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->HepatitisB->CurrentValue) ?>" checked<?php echo $registro->HepatitisB->EditAttributes() ?>><?php echo $registro->HepatitisB->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->HepatitisB->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->HepatitisB->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->HepatitisB, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->HepatitisB->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_HepatitisB" id="s_x_HepatitisB" value="<?php echo $registro->HepatitisB->LookupFilterQuery() ?>">
</span>
<?php echo $registro->HepatitisB->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->HepatitisC->Visible) { // HepatitisC ?>
	<div id="r_HepatitisC" class="form-group">
		<label id="elh_registro_HepatitisC" class="col-sm-2 control-label ewLabel"><?php echo $registro->HepatitisC->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->HepatitisC->CellAttributes() ?>>
<span id="el_registro_HepatitisC">
<div id="tp_x_HepatitisC" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_HepatitisC" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->HepatitisC->DisplayValueSeparator) ? json_encode($registro->HepatitisC->DisplayValueSeparator) : $registro->HepatitisC->DisplayValueSeparator) ?>" name="x_HepatitisC" id="x_HepatitisC" value="{value}"<?php echo $registro->HepatitisC->EditAttributes() ?>></div>
<div id="dsl_x_HepatitisC" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->HepatitisC->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->HepatitisC->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_HepatitisC" data-page="8" name="x_HepatitisC" id="x_HepatitisC_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->HepatitisC->EditAttributes() ?>><?php echo $registro->HepatitisC->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->HepatitisC->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_HepatitisC" data-page="8" name="x_HepatitisC" id="x_HepatitisC_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->HepatitisC->CurrentValue) ?>" checked<?php echo $registro->HepatitisC->EditAttributes() ?>><?php echo $registro->HepatitisC->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->HepatitisC->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->HepatitisC->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->HepatitisC, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->HepatitisC->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_HepatitisC" id="s_x_HepatitisC" value="<?php echo $registro->HepatitisC->LookupFilterQuery() ?>">
</span>
<?php echo $registro->HepatitisC->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->Meningitis->Visible) { // Meningitis ?>
	<div id="r_Meningitis" class="form-group">
		<label id="elh_registro_Meningitis" class="col-sm-2 control-label ewLabel"><?php echo $registro->Meningitis->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->Meningitis->CellAttributes() ?>>
<span id="el_registro_Meningitis">
<div id="tp_x_Meningitis" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_Meningitis" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->Meningitis->DisplayValueSeparator) ? json_encode($registro->Meningitis->DisplayValueSeparator) : $registro->Meningitis->DisplayValueSeparator) ?>" name="x_Meningitis" id="x_Meningitis" value="{value}"<?php echo $registro->Meningitis->EditAttributes() ?>></div>
<div id="dsl_x_Meningitis" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->Meningitis->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->Meningitis->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Meningitis" data-page="8" name="x_Meningitis" id="x_Meningitis_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->Meningitis->EditAttributes() ?>><?php echo $registro->Meningitis->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->Meningitis->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_Meningitis" data-page="8" name="x_Meningitis" id="x_Meningitis_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->Meningitis->CurrentValue) ?>" checked<?php echo $registro->Meningitis->EditAttributes() ?>><?php echo $registro->Meningitis->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->Meningitis->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->Meningitis->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->Meningitis, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->Meningitis->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_Meningitis" id="s_x_Meningitis" value="<?php echo $registro->Meningitis->LookupFilterQuery() ?>">
</span>
<?php echo $registro->Meningitis->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($registro->RecuentoCD4->Visible) { // RecuentoCD4 ?>
	<div id="r_RecuentoCD4" class="form-group">
		<label id="elh_registro_RecuentoCD4" class="col-sm-2 control-label ewLabel"><?php echo $registro->RecuentoCD4->FldCaption() ?></label>
		<div class="col-sm-10"><div<?php echo $registro->RecuentoCD4->CellAttributes() ?>>
<span id="el_registro_RecuentoCD4">
<div id="tp_x_RecuentoCD4" class="ewTemplate"><input type="radio" data-table="registro" data-field="x_RecuentoCD4" data-page="8" data-value-separator="<?php echo ew_HtmlEncode(is_array($registro->RecuentoCD4->DisplayValueSeparator) ? json_encode($registro->RecuentoCD4->DisplayValueSeparator) : $registro->RecuentoCD4->DisplayValueSeparator) ?>" name="x_RecuentoCD4" id="x_RecuentoCD4" value="{value}"<?php echo $registro->RecuentoCD4->EditAttributes() ?>></div>
<div id="dsl_x_RecuentoCD4" data-repeatcolumn="5" class="ewItemList" style="display: none;"><div>
<?php
$arwrk = $registro->RecuentoCD4->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($registro->RecuentoCD4->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked" : "";
		if ($selwrk <> "") {
			$emptywrk = FALSE;
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_RecuentoCD4" data-page="8" name="x_RecuentoCD4" id="x_RecuentoCD4_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $registro->RecuentoCD4->EditAttributes() ?>><?php echo $registro->RecuentoCD4->DisplayValue($arwrk[$rowcntwrk]) ?></label>
<?php
		}
	}
	if ($emptywrk && strval($registro->RecuentoCD4->CurrentValue) <> "") {
?>
<label class="radio-inline"><input type="radio" data-table="registro" data-field="x_RecuentoCD4" data-page="8" name="x_RecuentoCD4" id="x_RecuentoCD4_<?php echo $rowswrk ?>" value="<?php echo ew_HtmlEncode($registro->RecuentoCD4->CurrentValue) ?>" checked<?php echo $registro->RecuentoCD4->EditAttributes() ?>><?php echo $registro->RecuentoCD4->CurrentValue ?></label>
<?php
    }
}
?>
</div></div>
<?php
$sSqlWrk = "SELECT `Consecutivo`, `Si_No` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `si_no`";
$sWhereWrk = "";
$registro->RecuentoCD4->LookupFilters = array("s" => $sSqlWrk, "d" => "");
$registro->RecuentoCD4->LookupFilters += array("f0" => "`Consecutivo` = {filter_value}", "t0" => "3", "fn0" => "");
$sSqlWrk = "";
$registro->Lookup_Selecting($registro->RecuentoCD4, $sWhereWrk); // Call Lookup selecting
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
if ($sSqlWrk <> "") $registro->RecuentoCD4->LookupFilters["s"] .= $sSqlWrk;
?>
<input type="hidden" name="s_x_RecuentoCD4" id="s_x_RecuentoCD4" value="<?php echo $registro->RecuentoCD4->LookupFilterQuery() ?>">
</span>
<?php echo $registro->RecuentoCD4->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div>
		</div>
	</div>
</div>
</div>
<?php
	if (in_array("seguimiento_individual3", explode(",", $registro->getCurrentDetailTable())) && $seguimiento_individual3->DetailEdit) {
?>
<?php if ($registro->getCurrentDetailTable() <> "") { ?>
<h4 class="ewDetailCaption"><?php echo $Language->TablePhrase("seguimiento_individual3", "TblCaption") ?></h4>
<?php } ?>
<?php include_once "seguimiento_individual3grid.php" ?>
<?php } ?>
<?php
	if (in_array("seguimiento_materno", explode(",", $registro->getCurrentDetailTable())) && $seguimiento_materno->DetailEdit) {
?>
<?php if ($registro->getCurrentDetailTable() <> "") { ?>
<h4 class="ewDetailCaption"><?php echo $Language->TablePhrase("seguimiento_materno", "TblCaption") ?></h4>
<?php } ?>
<?php include_once "seguimiento_maternogrid.php" ?>
<?php } ?>
<div class="form-group">
	<div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php echo $Language->Phrase("SaveBtn") ?></button>
<button class="btn btn-default ewButton" name="btnCancel" id="btnCancel" type="button" data-href="<?php echo $registro_edit->getReturnUrl() ?>"><?php echo $Language->Phrase("CancelBtn") ?></button>
	</div>
</div>
</form>
<script type="text/javascript">
fregistroedit.Init();
</script>
<?php
$registro_edit->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$registro_edit->Page_Terminate();
?>
