?> " /> <span class="red">*</span> <a target="_blank" href="http://passport.haodf.com/user/register">需要先注册</a> </td> </tr> <tr> <th>真实姓名:</th> <td><input name="name" value="<?php echo $projectOperator->name; ?> " /> <span class="red">*</span></td> </tr> <tr> <th>所属机构:</th> <td><?php echo HtmlControl::getSelectCtrImp(ProjectOrg::entitys2array4htmlCtr($projectOrgs), 'projectOrgId', $projectOperator->projectOrg->id); ?> </td> </tr> <tr> <th>角色:</th> <td><?php echo HtmlControl::getRadioCtrImp(ProjectRole::getArray4htmlCtr(), 'role', $projectOperator->role, ' '); ?> </td> </tr> <tr> <th>状态:</th> <td><?php echo HtmlControl::getRadioCtrImp(array(1 => '有效', 0 => '无效'), 'status', $projectOperator->status, ' ');
/** * Create * * @param array $data * @return ProjectOrg $rec */ protected function air_create($data) { $this->require_data($data, array('org_uuid', 'user_uuid')); // validate $o = AIR2_Record::find('Organization', $data['org_uuid']); if (!$o) { throw new Rframe_Exception(Rframe::BAD_DATA, 'Invalid org_uuid'); } $u = AIR2_Record::find('User', $data['user_uuid']); if (!$u) { throw new Rframe_Exception(Rframe::BAD_DATA, 'Invalid user_uuid'); } // unique org foreach ($this->parent_rec->ProjectOrg as $porg) { if ($porg->porg_org_id == $o->org_id) { throw new Rframe_Exception(Rframe::BAD_DATA, 'Organization already in Project'); } } // user in org, and has W/M role $org_and_parents = Organization::get_org_parents($o->org_id); $org_and_parents[] = $o->org_id; $in_org = false; foreach ($u->UserOrg as $uo) { $r = $uo->AdminRole->ar_code; if (in_array($uo->uo_org_id, $org_and_parents)) { if ($r == 'W' || $r == 'M') { $in_org = true; break; } } } if (!$in_org) { throw new Rframe_Exception(Rframe::BAD_DATA, 'ContactUser not Writer/Manager for organization'); } // create! $rec = new ProjectOrg(); $rec->porg_prj_id = $this->parent_rec->prj_id; $rec->porg_org_id = $o->org_id; $rec->porg_contact_user_id = $u->user_id; $rec->mapValue('org_uuid', $o->org_uuid); return $rec; }
/** * Change the side from which this table is accessed. For instance, to * access from "Project->ProjectOrg", you would call change_uuid_col(false). * To access from "Organization->ProjectOrg", pass in true. * * @param boolean $is_org_side */ public static function change_uuid_col($is_org_side) { if ($is_org_side) { ProjectOrg::$UUID_COL = 'Project:prj_uuid'; } else { ProjectOrg::$UUID_COL = 'Organization:org_uuid'; } }
?> <a href="/projectcustomermgr/add" target="_blank" class="f14">新增患者</a> <?php } ?> </div> <div class="mt10"> <form action="/projectcustomermgr/listofcond" method="get" > 用户姓名: <input type="text" name="customerName" value="<?php echo isset($customerName) ? $customerName : ""; ?> " /> <?php if (false == $myProjectOperator->isDoctorRole()) { echo HtmlControl::getSelectCtrImp(ProjectOrg::entitys2array4htmlCtr($projectOrgs), 'projectOrgId', isset($projectOrgId) ? $projectOrgId : 0); } ?> <input type="submit" value="搜索" /> </form> </div> <div class="mt10"> <table class="thintop"> <tr> <th>患者ID</th> <th>筛选号</th> <th>患者姓名</th> <th>患者姓名拼音</th> <th>所属机构</th> <th>创建时间</th>