* $Id$
 *  
 * @category PMSI
 * @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
 */
CCanDo::checkEdit();
$sejour_id = CValue::get("sejour_id");
$sejour = new CSejour();
$sejour->load($sejour_id);
$sejour->loadExtDiagnostics();
$sejour->loadDiagnosticsAssocies();
$sejour->loadRelPatient();
$sejour->_ref_patient->loadRefDossierMedical();
$rss = null;
$cim_das = array();
$cim_das_patient = array();
if (CModule::getActive("atih") && CAppUI::conf("dPpmsi use_cim_pmsi")) {
    $rss = new CRSS();
    $rss->sejour_id = $sejour_id;
    $rss->loadMatchingObject();
    $rss->loadRefDiagnostics();
    $cim_dp = CCIM10::get($sejour->DP);
    $cim_dr = CCIM10::get($sejour->DR);
    $code = null;
    foreach ($sejour->_diagnostics_associes as $_da) {
        $code = CCIM10::get($_da);
        if ($code->type != 3) {
 /**
  * Get the patient_id of CMbobject
  *
  * @return CPatient
  */
 function getIndexablePatient()
 {
     $this->loadRefSejour();
     $this->_ref_sejour->loadRelPatient();
     return $this->_ref_sejour->_ref_patient;
 }