コード例 #1
0
/**
 * $Id$
 *  
 * @category Patients
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
$class = CValue::post("target_class");
$reset = CValue::post("reset", 0);
$callback = CValue::post("callback", 0);
$limit = 500;
$use_callback = true;
if (!CFirstNameAssociativeSex::countData()) {
    CAppUI::stepAjax("CFirstNameAssociativeSex-msg-no_data_in_db", UI_MSG_WARNING);
    CApp::rip();
}
if (is_subclass_of($class, 'CPerson')) {
    /** @var CPerson $_class */
    $_class = new $class();
    $field_sex = $_class->getSexFieldName();
    if (!$field_sex) {
        CAppUI::stepAjax("class %s does not contain sex field", UI_MSG_ERROR, $class);
    }
    $idex = new CIdSante400();
    $idex->object_class = $class;
    $idex->tag = "sex_guess_last_id";
    $idex->loadMatchingObject();
    $idex->id400 = CMbDT::dateTime();