本文整理汇总了PHP中CPatient::random方法的典型用法代码示例。如果您正苦于以下问题:PHP CPatient::random方法的具体用法?PHP CPatient::random怎么用?PHP CPatient::random使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPatient
的用法示例。
在下文中一共展示了CPatient::random方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CPatient
/**
* Test A28 - Create patient with full demographic data
*
* @param CCnStep $step Step
*
* @throws CMbException
*
* @return void
*/
static function testA28(CCnStep $step)
{
// PDS-PAM_Identification_Mgt_Merge
$patient = new CPatient();
// Random sur les champs du patient
$patient->random();
$test = $step->_ref_test;
$partner = $test->_ref_partner;
// On sélectionne le nom du patient en fonction du partenaire, du test et de l'étape
$patient->nom = "{$partner->name}_{$test->_id}_{$step->number}";
self::storeObject($patient);
}
示例2: loadPatientPES
/**
* Load patient PES
*
* @param CCnStep $step Step
* @param int $step_number Step number
*
* @throws CMbException
*
* @return CPatient $patient
*/
static function loadPatientPES(CCnStep $step, $step_number)
{
// PES-PAM_Encounter_Management_Basic
$test = $step->_ref_test;
$partner = $test->_ref_partner;
$name = null;
switch ($step_number) {
case 10:
$name = "ONE";
break;
case 20:
$name = "TWO";
break;
case 30:
$name = "THREE";
break;
case 40:
$name = "FOUR";
break;
case 50:
if ($step->number == 80) {
$name = "UPDATE";
} else {
$name = "FIVE";
}
break;
}
$name = "PAM{$name}";
$patient = new CPatient();
$where = array();
$where["nom"] = " = '{$name}_{$partner->name}_{$test->_id}'";
$patient->loadObject($where);
if (!$patient->_id) {
$patient->random();
$patient->nom = "{$name}_{$partner->name}_{$test->_id}";
if ($msg = $patient->store()) {
throw new CMbException($msg);
}
}
return $patient;
}