Exemplo n.º 1
0
/**
 * $Id: ajax_list_assurances.php 19840 2013-07-09 19:36:14Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19840 $
 */
CCanDo::checkRead();
$sejour_id = CValue::get("sejour_id");
$patient_id = CValue::get("patient_id");
// Chargement du patient
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefsCorrespondantsPatient();
// On récupére le séjour
$sejour = new CSejour();
if ($sejour_id) {
    $sejour->load($sejour_id);
    // On vérifie que l'utilisateur a les droits sur le sejour
    if (!$sejour->_canRead) {
        global $m, $tab;
        CAppUI::setMsg("Vous n'avez pas accés à ce séjour", UI_MSG_WARNING);
        CAppUI::redirect("m={$m}&tab={$tab}&sejour_id=0");
    }
    $patient = $sejour->_ref_patient;
} else {
    $sejour->patient_id = $patient->_id;
    $sejour->_ref_patient = $patient;
}
Exemplo n.º 2
0
 /**
  * Chargement du patient concerné par la facture
  *
  * @param bool $cache cache
  *
  * @return CPatient
  **/
 function loadRefPatient($cache = 1)
 {
     if (!$this->_ref_patient) {
         $this->_ref_patient = $this->loadFwdRef("patient_id", $cache);
         $this->_ref_patient->loadRefsCorrespondantsPatient();
     }
     return $this->_ref_patient;
 }
 /**
  * Represents an HL7 NK1 message segment (Next of Kin / Associated Parties)
  *
  * @param CPatient $patient Patient
  *
  * @return void
  */
 function addNK1s(CPatient $patient)
 {
     $i = 1;
     foreach ($patient->loadRefsCorrespondantsPatient() as $_correspondant) {
         /** @var CHL7v2SegmentNK1 $NK1 */
         $NK1 = CHL7v2Segment::create("NK1", $this->message);
         $NK1->set_id = $i;
         $NK1->correspondant = $_correspondant;
         $NK1->build($this);
         $i++;
     }
 }
Exemplo n.º 4
0
 *
 * @package    Mediboard
 * @subpackage dPfacturation
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 * @version    $Revision: 26880 $
 */
CCanDo::checkEdit();
$facture_id = CValue::get("facture_id");
$facture_class = CValue::get("facture_class");
$patient_id = CValue::get("patient_id");
$order = "date_debut DESC, date_fin DESC";
//Patient sélectionné
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefsCorrespondantsPatient($order);
$facture = new $facture_class();
$facture->load($facture_id);
$facture->loadRefPatient();
$facture->_ref_patient->loadRefsCorrespondantsPatient($order);
$facture->loadRefPraticien();
$facture->loadRefAssurance();
$facture->loadRefsObjects();
$facture->loadRefsReglements();
$facture->loadRefsRelances();
$facture->loadRefsNotes();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("patient", $patient);
$smarty->assign("facture", $facture);
$smarty->display("inc_vw_assurances.tpl");