本文整理汇总了PHP中CIdSante400类的典型用法代码示例。如果您正苦于以下问题:PHP CIdSante400类的具体用法?PHP CIdSante400怎么用?PHP CIdSante400使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CIdSante400类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: build
/**
* Build ZBE segement
*
* @param CHL7v2Event $event Event
*
* @return null
*/
function build(CHL7v2Event $event)
{
parent::build($event);
$receiver = $event->_receiver;
$sejour = $this->sejour;
$movement = $this->movement;
$affectation = $this->curr_affectation;
if ($this->other_affectation) {
$affectation = $this->other_affectation;
}
$action_movement = null;
if ($sejour->_cancel_hospitalization) {
$action_movement = "CANCEL";
} else {
foreach (self::$actions as $action => $events) {
if (in_array($event->code, $events)) {
$action_movement = $action;
}
}
}
// ZBE-1: Movement ID (EI) (optional)
$identifiers[] = array($movement->_view, CAppUI::conf("hl7 assigning_authority_namespace_id"), CAppUI::conf("hl7 assigning_authority_universal_id"), CAppUI::conf("hl7 assigning_authority_universal_type_id"));
$idexMovement = CIdSante400::getMatch("CMovement", $receiver->_tag_movement, null, $movement->_id);
if ($idexMovement->_id) {
$configs = $receiver->_configs;
$identifiers[] = array($idexMovement->id400, $configs["assigning_authority_namespace_id"], $configs["assigning_authority_universal_id"], $configs["assigning_authority_universal_type_id"]);
}
$data[] = $identifiers;
// ZBE-2: Start of Movement Date/Time (TS)
$start_of_movement = $action_movement == "CANCEL" ? $movement->last_update : $movement->start_of_movement;
$data[] = $start_of_movement > $sejour->sortie ? $sejour->sortie : $start_of_movement;
// ZBE-3: End of Movement Date/Time (TS) (optional)
// Forbidden (IHE France)
$data[] = null;
// ZBE-4: Action on the Movement (ID)
$data[] = $action_movement;
// ZBE-5: Indicator "Historical Movement" (ID)
$data[] = $movement->_current ? "N" : "Y";
// ZBE-6: Original trigger event code (ID) (optional)
$data[] = $action_movement == "UPDATE" || $action_movement == "CANCEL" ? $movement->original_trigger_code : null;
$ufs = $sejour->getUFs(null, $affectation->_id);
// ZBE-7: Ward of medical responsibility in the period starting with this movement (XON) (optional)
$uf_type = $receiver->_configs["build_ZBE_7"];
$uf_medicale = isset($ufs[$uf_type]) ? $ufs[$uf_type] : null;
if (isset($uf_medicale->_id)) {
$data[] = array(array($uf_medicale->libelle, null, null, null, null, $this->getAssigningAuthority("mediboard"), "UF", null, null, $uf_medicale->code));
} else {
$data[] = null;
}
// Traitement des segments spécifiques extension PAM
$this->fillOtherSegments($data, $ufs, $event);
$this->fill($data);
}
开发者ID:fbone,项目名称:mediboard4,代码行数:60,代码来源:CHL7v2SegmentZBE.class.php
示例2: syncPatient
function syncPatient($update = true)
{
$medecin_id = $this->consume("medecin_id");
// Gestion des id400
$tag = "medecin-patient";
$idex = new CIdSante400();
$idex->object_class = "CPatient";
$idex->id400 = $medecin_id;
$idex->tag = $tag;
// Identité
$patient = new CPatient();
$patient->nom = $this->consume("nom");
$patient->prenom = CValue::first($this->consume("prenom"), $patient->nom);
// Simulation de l'âge
$year = 1980 - strlen($patient->nom);
$month = '01';
$day = str_pad(strlen($patient->prenom) % 30, 2, '0', STR_PAD_LEFT);
$patient->naissance = "{$year}-{$month}-{$day}";
// Binding
$this->trace($patient->getProperties(true), "Patient à enregistrer");
$idex->bindObject($patient);
$this->markStatus(self::STATUS_PATIENT);
}
开发者ID:fbone,项目名称:mediboard4,代码行数:23,代码来源:CMouvMedecinPatient.class.php
示例3: storeIdExt
/**
* @see parent::storeIdExt()
*/
protected function storeIdExt(CMbObject $object, $map_to)
{
if ($object instanceof CIdSante400) {
return;
}
// Rattachement d'un ID externe
$idex = CIdSante400::getMatchFor($object, "migration");
if (!$idex->_id) {
$idex->id400 = $map_to;
$idex->last_update = CMbDT::dateTime();
$idex->store();
CAppUI::stepAjax("Idex '%s' créé sur '%s'", UI_MSG_OK, $idex->id400, $object);
}
}
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:CGroupsImport.class.php
示例4: loadIdex
/**
* Charge l'idex de l'établissement
*
* @return string|null
*/
function loadIdex()
{
$tag_group = $this->getTagGroup();
if (!$this->_id || !$tag_group) {
return null;
}
// Récupération du premier idex créé
$order = "id400 ASC";
// Recuperation de la valeur de l'id400
$idex = new CIdSante400();
$idex->setObject($this);
$idex->tag = $tag_group;
$idex->loadMatchingObject($order);
return $idex->id400;
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:20,代码来源:CGroups.class.php
示例5: merge
/**
* Merge an array of objects
*
* @param self[] $objects An array of CMbObject to merge
* @param bool $fast Tell wether to use SQL (fast) or PHP (slow but checked and logged) algorithm
*
* @return string|null
*/
function merge($objects, $fast = false)
{
$alternative_mode = $this->_id != null;
// Modes and object count check
if ($alternative_mode && count($objects) > 1) {
return "mergeAlternativeTooManyObjects";
}
if (!$alternative_mode && count($objects) < 2) {
return "mergeTooFewObjects";
}
// Trigger before event
$this->notify("BeforeMerge");
if (!$this->_id && ($msg = $this->store())) {
$this->notify("MergeFailure");
return $msg;
}
foreach ($objects as $object) {
$this->_merging[$object->_id] = $object;
}
foreach ($objects as &$object) {
$msg = $fast ? $this->fastTransferBackRefsFrom($object) : $this->transferBackRefsFrom($object);
if ($msg) {
$this->notify("MergeFailure");
return $msg;
}
$object_id = $object->_id;
$object->_mergeDeletion = true;
if ($msg = $object->delete()) {
return $msg;
}
// If external IDs are available, we save old objects' id as external IDs
if (CModule::getInstalled("dPsante400")) {
$idex = new CIdSante400();
$idex->setObject($this);
$idex->tag = "merged";
$idex->id400 = $object_id;
$idex->last_update = CMbDT::dateTime();
$idex->store();
}
}
// Trigger after event
$this->notify("AfterMerge");
return $this->store();
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:52,代码来源:CStoredObject.class.php
示例6: CMovement
}
$mov = new CMovement();
$query = $request->makeSelect();
$list = $mov->_spec->ds->loadList($query);
if (!$do_it) {
CAppUI::setMsg(count($list) . " doublons à traiter");
} else {
foreach ($list as $_mvt) {
$ids = explode(",", $_mvt["ids"]);
sort($ids);
// IMPORTANT, must use the first movement created as a reference
$first = new CMovement();
$first->load($ids[0]);
$second = new CMovement();
$second->load($ids[1]);
$tag = CIdSante400::getMatch($second->_class, $second->getTagMovement(), null, $second->_id);
if ($tag->_id) {
$tag->tag = "trash_{$tag->tag}";
$tag->last_update = CMbDT::dateTime();
$tag->store();
} else {
CAppUI::setMsg("Aucun tag sur mouvement #{$second->_id}");
}
$msg = $first->merge(array($second->_id => $second));
if ($msg) {
CAppUI::setMsg($msg, UI_MSG_WARNING);
} else {
CAppUI::setMsg("Mouvements fusionnés");
}
}
if ($auto && count($list)) {
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:do_remove_movement_duplicates.php
示例7: CIdSante400
$results[$i]["error"] = $msg;
$results[$i]["username"] = "";
$results[$i]["password"] = "";
continue;
}
CAppUI::setMsg("Utilisateur créé", UI_MSG_OK);
$mediuser->insFunctionPermission();
$mediuser->insGroupPermission();
$results[$i]["result"] = 0;
$results[$i]["username"] = $mediuser->_user_username;
$results[$i]["password"] = $mediuser->_user_password;
$number_idex = $results[$i]["idex"];
if (!$number_idex) {
continue;
}
$idex = new CIdSante400();
$idex->tag = CMediusers::getTagMediusers($group_id);
$idex->id400 = $number_idex;
if ($idex->loadMatchingObject()) {
$unfound["idex"][$number_idex] = true;
CAppUI::setMsg("Identifiant déjà existant", UI_MSG_WARNING);
continue;
}
$idex->setObject($mediuser);
$msg = $idex->store();
if ($msg) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
}
fclose($fp);
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:user_import_csv.php
示例8: CSpecCPAM
// Récupération des spécialités CPAM
$spec_cpam = new CSpecCPAM();
$spec_cpam = $spec_cpam->loadList(null, 'spec_cpam_id ASC');
// Récupération des profils
$profile = new CUser();
$profile->template = 1;
/** @var CUser[] $profiles */
$profiles = $profile->loadMatchingList();
// Creation du tableau de profil en fonction du type
$tabProfil = array();
foreach ($profiles as $profil) {
$tabProfil[$profil->user_type][] = $profil->_id;
}
$tag = false;
if ($object->_id) {
$tag = CIdSante400::getMatch($object->_class, CMediusers::getTagSoftware(), null, $object->_id)->id400;
}
$password_info = CAppUI::$user->_specs['_user_password']->minLength > 4 ? "Le mot de passe doit être composé d'au moins 6 caractères, comprenant des lettres et au moins un chiffre." : "Le mot de passe doit être composé d'au moins 4 caractères.";
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("tabProfil", $tabProfil);
$smarty->assign("utypes", CUser::$types);
$smarty->assign("ps_types", CUser::$ps_types);
$smarty->assign("banques", $banques);
$smarty->assign("object", $object);
$smarty->assign("profiles", $profiles);
$smarty->assign("functions", $functions);
$smarty->assign("disciplines", $disciplines);
$smarty->assign("spec_cpam", $spec_cpam);
$smarty->assign("tag_mediuser", CMediusers::getTagMediusers($group->_id));
$smarty->assign("is_admin", CAppUI::$user->isAdmin());
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_edit_mediuser.php
示例9: onMergeFailure
/**
* Trigger when merge failed
*
* @param CMbObject $mbObject Object
*
* @return bool
*/
function onMergeFailure(CMbObject $mbObject)
{
if (!$this->isHandled($mbObject)) {
return false;
}
// On va réatribuer les idexs en cas de problème dans la fusion
foreach ($mbObject->_fusion as $group_id => $infos_fus) {
if (!$infos_fus || !array_key_exists("idexs_changed", $infos_fus)) {
return false;
}
foreach ($infos_fus["idexs_changed"] as $idex_id => $tag_name) {
$idex = new CIdSante400();
$idex->load($idex_id);
if (!$idex->_id) {
continue;
}
// Réattribution sur l'objet non supprimé
$sejour_elimine = $infos_fus["sejourElimine"];
$idex->object_id = $sejour_elimine->_id;
$idex->tag = $tag_name;
$idex->last_update = CMbDT::dateTime();
$idex->store();
}
}
}
开发者ID:fbone,项目名称:mediboard4,代码行数:32,代码来源:CITI31DelegatedHandler.class.php
示例10: CPrescriptionLabo
$verouillee = CValue::post("verouillee");
// Si la prescription est verouillée, un id externe est créé pour identifier la prescription
if ($verouillee) {
$tagCatalogue = CAppUI::conf('dPlabo CCatalogueLabo remote_name');
$prescription_labo_id = CValue::post("prescription_labo_id");
$prescription = new CPrescriptionLabo();
$prescription->load($prescription_labo_id);
if (!$prescription->verouillee) {
$prescription->loadRefsFwd();
// Chargement de l'id400 "labo code4" du praticien
$prat =& $prescription->_ref_praticien;
$tagCode4 = "labo code4";
$idSantePratCode4 = new CIdSante400();
$idSantePratCode4->loadLatestFor($prat, $tagCode4);
// creation de l'id400 de la prescription
$idPresc = new CIdSante400();
//Paramétrage de l'id 400
$idPresc->tag = "{$tagCatalogue} Prat:" . str_pad($idSantePratCode4->id400, 4, '0', STR_PAD_LEFT);
// tag LABO Prat: 0017
$idPresc->object_class = "CPrescriptionLabo";
// Chargement du dernier id externe de prescription du praticien s'il existe
$idPresc->loadMatchingObject("id400 DESC");
// Incrementation de l'id400
$idPresc->id400++;
$idPresc->id400 = str_pad($idPresc->id400, 4, '0', STR_PAD_LEFT);
$idPresc->_id = null;
$idPresc->last_update = CMbDT::dateTime();
$idPresc->object_id = $prescription->_id;
$idPresc->store();
}
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_prescription_aed.php
示例11: getMatchFor
/**
* Static shortcut to to idex for a given object
*
* @param CMbObject $mbObject Object
* @param string $tag Tag
*
* @return CIdSante400
*/
static function getMatchFor(CMbObject $mbObject, $tag = null)
{
$idex = new CIdSante400();
$idex->loadLatestFor($mbObject, $tag);
return $idex;
}
开发者ID:fbone,项目名称:mediboard4,代码行数:14,代码来源:CIdSante400.class.php
示例12: venuePatient
/**
* Record admit
*
* @param CHPrimXMLAcquittementsPatients $dom_acq Acquittement
* @param CPatient $newPatient Patient
* @param array $data Data
* @param CSejour &$newVenue Admit
*
* @return CHPrimXMLAcquittementsPatients $msgAcq
**/
function venuePatient(CHPrimXMLAcquittementsPatients $dom_acq, CPatient $newPatient, $data, &$newVenue = null)
{
$echg_hprim = $this->_ref_echange_hprim;
// Cas 1 : Traitement du patient
$domEnregistrementPatient = new CHPrimXMLEnregistrementPatient();
$domEnregistrementPatient->_ref_echange_hprim = $echg_hprim;
$msgAcq = $domEnregistrementPatient->enregistrementPatient($dom_acq, $newPatient, $data);
if ($echg_hprim->statut_acquittement != "OK") {
return $msgAcq;
}
// Cas 2 : Traitement de la venue
$dom_acq = new CHPrimXMLAcquittementsPatients();
$dom_acq->_identifiant_acquitte = $data['identifiantMessage'];
$dom_acq->_sous_type_evt = $this->sous_type;
$dom_acq->_ref_echange_hprim = $echg_hprim;
// Traitement du message des erreurs
$avertissement = $msgID400 = $msgVenue = $msgNDA = "";
$_code_Venue = $_code_NumDos = $_num_dos_create = $_modif_venue = false;
$sender = $echg_hprim->_ref_sender;
$sender->loadConfigValues();
$this->_ref_sender = $sender;
$idSourceVenue = $data['idSourceVenue'];
$idCibleVenue = $data['idCibleVenue'];
if (!$newVenue) {
$newVenue = new CSejour();
}
// Cas d'une annulation
$cancel = false;
if ($data['action'] == "suppression") {
$cancel = true;
}
// Affectation du patient
$newVenue->patient_id = $newPatient->_id;
// Affectation de l'établissement
$newVenue->group_id = $sender->group_id;
$commentaire = "";
$codes = array();
// Si CIP
if (!CAppUI::conf('smp server')) {
// Acquittement d'erreur : identifiants source et cible non fournis pour le patient / venue
if (!$idSourceVenue && !$idCibleVenue) {
return $echg_hprim->setAckError($dom_acq, "E100", $commentaire, $newVenue);
}
$nda = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $idSourceVenue);
// idSource non connu
if (!$nda->_id) {
// idCible fourni
if ($idCibleVenue) {
if ($newVenue->load($idCibleVenue)) {
// Dans le cas d'une annulation de la venue
if ($cancel) {
if ($msgAcq = $this->doNotCancelVenue($newVenue, $dom_acq, $echg_hprim)) {
return $msgAcq;
}
}
// Recherche d'un num dossier déjà existant pour cette venue
// Mise en trash du numéro de dossier reçu
$newVenue->loadNDA();
if ($this->trashNDA($newVenue, $sender)) {
$nda->_trash = true;
} else {
// Mapping du séjour si pas de numéro de dossier
$newVenue = $this->mappingVenue($data['venue'], $newVenue, $cancel);
$msgVenue = CEAISejour::storeSejour($newVenue, $sender);
$commentaire = CEAISejour::getComment($newVenue);
$_code_NumDos = "I121";
$_code_Venue = true;
}
} else {
$_code_NumDos = "I120";
}
} else {
$_code_NumDos = "I122";
}
if (!$newVenue->_id) {
// Mapping du séjour
$newVenue->_NDA = $nda->id400;
$newVenue = $this->mappingVenue($data['venue'], $newVenue, $cancel);
// Séjour retrouvé
if (CAppUI::conf("hprimxml strictSejourMatch")) {
if ($newVenue->loadMatchingSejour(null, true, $sender->_configs["use_sortie_matching"])) {
// Dans le cas d'une annulation de la venue
if ($cancel) {
if ($msgAcq = $this->doNotCancelVenue($newVenue, $dom_acq, $echg_hprim)) {
return $msgAcq;
}
}
// Recherche d'un num dossier déjà existant pour cette venue
// Mise en trash du numéro de dossier reçu
$newVenue->loadNDA();
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:CHPrimXMLVenuePatient.class.php
示例13: importCatalogue
/**
* Catalogue import
*/
function importCatalogue($cat, $parent_id = null)
{
global $remote_name;
CApp::setTimeLimit(180);
// On rend toutes les analyses du catalogue obsoletes
$idAnalyse = new CIdSante400();
$idAnalyse->tag = $remote_name;
$idAnalyse->object_class = "CExamenLabo";
$idAnalyses = $idAnalyse->loadMatchingList();
foreach ($idAnalyses as $_id_analyse) {
$examenLabo = new CExamenLabo();
$examenLabo->identifiant = $_id_analyse->id400;
$examenLabo->loadMatchingObject();
if ($examenLabo->_id) {
$examenLabo->obsolete = 1;
$examenLabo->store();
}
}
$idCatalogue = new CIdSante400();
$idCatalogue->tag = $remote_name;
$idCatalogue->object_class = "CCatalogueLabo";
$idCatalogues = $idCatalogue->loadMatchingList();
foreach ($idCatalogues as $_id_catalogue) {
$catalogueLabo = new CCatalogueLabo();
$catalogueLabo->identifiant = $_id_catalogue->id400;
$catalogueLabo->loadMatchingObject();
if ($catalogueLabo->_id) {
$catalogueLabo->obsolete = 1;
$catalogueLabo->store();
}
}
$compteur["analyses"] = 0;
$compteur["chapitres"] = 0;
$compteur["sousChapitre"] = 0;
$catalogues = array();
// Creation du catalogue global LABO
$catal = new CCatalogueLabo();
$catalogue = new CCatalogueLabo();
$catal->identifiant = substr(hash('md5', $remote_name), 0, 4);
// libelle modifié par hash
$catal->libelle = $remote_name;
$catal->pere_id = $parent_id;
// creation de son id400
$idCat = new CIdSante400();
$idCat->tag = $remote_name;
$idCat->id400 = $remote_name;
$catal->obsolete = 0;
$idCat->bindObject($catal);
//CAppUI::stepAjax("Catalogue '$catal->libelle' importé", UI_MSG_OK);
$path = $remote_name;
// on met a jour $catalogues
$catalogues[$path] = $catal;
//Parcours des analyses
foreach ($cat->analyse as $_analyse) {
$chapitre = (string) $_analyse->chapitre;
$path = "{$remote_name}/{$chapitre}/";
if (!$chapitre) {
$path = $remote_name;
}
$catChapitre = new CCatalogueLabo();
// si le catalogue n'existe pas deja
if (!array_key_exists($path, $catalogues)) {
// creation du catalogue
$catChapitre->identifiant = substr(hash('md5', $chapitre), 0, 4);
// libelle modifié par hash;
$catChapitre->libelle = $chapitre;
$catChapitre->pere_id = $catal->_id;
$catChapitre->decodeUtfStrings();
//creation de l'id400
$idCatChapitre = new CIdSante400();
$idCatChapitre->tag = $remote_name;
$idCatChapitre->id400 = substr(hash('md5', $chapitre), 0, 4);
$catChapitre->obsolete = 0;
$idCatChapitre->bindObject($catChapitre);
//CAppUI::stepAjax("Catalogue '$catChapitre->libelle' importé", UI_MSG_OK);
$compteur["chapitres"]++;
// on met a jour $catalogues
$catalogues[$path] = $catChapitre;
}
$catChapitre = $catalogues[$path];
$catalogue = $catChapitre;
// si il y a un sous chapitre a creer==> le pere du sous chapitre est $catalogue->_id;
$sschapitre = (string) $_analyse->sschapitre;
if ($sschapitre) {
// modification du path
$path .= $sschapitre;
$catssChapitre = new CCatalogueLabo();
if (!array_key_exists($path, $catalogues)) {
// creation du catalogue
$catssChapitre->identifiant = substr(hash('md5', $sschapitre), 0, 4);
// libelle modifié par hash;
$catssChapitre->libelle = $sschapitre;
$catssChapitre->pere_id = $catChapitre->_id;
$catssChapitre->decodeUtfStrings();
//creation de l'id400
$idCatssChapitre = new CIdSante400();
$idCatssChapitre->tag = $remote_name;
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:httpreq_import_catalogue.php
示例14: getDoctor
/**
* Return the Object with the information of the medecin in the message
*
* @param DOMNode $node Node
* @param CMbObject $object object
*
* @return int|null|string
*/
function getDoctor(DOMNode $node, CMbObject $object)
{
$type_id = $this->queryTextNode("XCN.13", $node);
$id = $this->queryTextNode("XCN.1", $node);
$last_name = $this->queryTextNode("XCN.2/FN.1", $node);
$first_name = $this->queryTextNode("XCN.3", $node);
switch ($type_id) {
case "RPPS":
$object->rpps = $id;
break;
case "ADELI":
$object->adeli = $id;
break;
case "RI":
// Notre propre RI
if ($this->queryTextNode("XCN.9/HD.2", $node) == CAppUI::conf("hl7 assigning_authority_universal_id")) {
return $id;
}
default:
// Recherche du praticien par son idex
$idex = CIdSante400::getMatch($object->_class, $this->_ref_sender->_tag_mediuser, $id);
if ($idex->_id) {
return $idex->object_id;
}
if ($object instanceof CMediusers) {
$object->_user_first_name = $first_name;
$object->_user_last_name = $last_name;
}
if ($object instanceof CMedecin) {
$object->prenom = $first_name;
$object->nom = $last_name;
}
break;
}
// Cas où l'on a aucune information sur le médecin
if (!$object->rpps && !$object->adeli && !$object->_id && ($object instanceof CMediusers && !$object->_user_last_name || $object instanceof CMedecin && !$object->nom)) {
return null;
}
if ($object instanceof CMedecin && $object->loadMatchingObjectEsc()) {
return $object->_id;
}
$sender = $this->_ref_sender;
$ds = $object->getDS();
if ($object instanceof CMediusers) {
$ljoin = array();
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
if ($object->rpps || $object->adeli) {
if ($object->rpps) {
$where[] = $ds->prepare("rpps = %", $object->rpps);
}
if ($object->adeli) {
$where[] = $ds->prepare("adeli = %", $object->adeli);
}
// Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
if ($object->countList($where, null, $ljoin) > 1) {
$ljoin["users"] = "users_mediboard.user_id = users.user_id";
$where[] = $ds->prepare("users.user_last_name = %", $last_name);
}
$object->loadObject($where, null, null, $ljoin);
if ($object->_id) {
return $object->_id;
}
}
$user = new CUser();
$ljoin = array();
$ljoin["users_mediboard"] = "users.user_id = users_mediboard.user_id";
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
$where[] = $ds->prepare("users.user_first_name = %", $first_name);
$where[] = $ds->prepare("users.user_last_name = %", $last_name);
$order = "users.user_id ASC";
if ($user->loadObject($where, $order, null, $ljoin)) {
return $user->_id;
}
$object->_user_first_name = $first_name;
$object->_user_last_name = $last_name;
return $this->createDoctor($object);
}
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:90,代码来源:CHL7v2MessageXML.class.php
示例15: CGroups
<?php
/**
* $Id$
*
* @category CDA
* @package Mediboard
* @author SARL OpenXtrem <[email protected]>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
$group_type = CValue::post("group_type");
$group_id = CValue::post("group_id");
$group = new CGroups();
$group->load($group_id);
$idex = new CIdSante400();
$idex->tag = "cda_association_code";
$idex->setObject($group);
$idex->loadMatchingObject();
$idex->last_update = CMbDT::dateTime();
$idex->id400 = $group_type;
if ($group_type && ($msg = $idex->store())) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
CAppUI::setMsg("Configuration effectué");
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:do_cda_association_aed.php
示例16: build
/**
* Build SCH segement
*
* @param CHL7v2Event $event Event
*
* @return null
*/
function build(CHL7v2Event $event)
{
parent::build($event);
$receiver = $event->_receiver;
$appointment = $this->appointment;
$data = array();
// SCH-1: Placer Appointment ID (EI) (optional)
$data[] = null;
// SCH-2: Filler Appointment ID (EI) (optional)
$identifiers[] = array($appointment->_id, CAppUI::conf("hl7 assigning_authority_namespace_id"), CAppUI::conf("hl7 assigning_authority_universal_id"), CAppUI::conf("hl7 assigning_authority_universal_type_id"));
$idex = CIdSante400::getMatch("CConsultation", $receiver->_tag_consultation, null, $appointment->_id);
if ($idex->_id) {
$configs = $receiver->_configs;
$identifiers[] = array($idex->id400, $configs["assigning_authority_namespace_id"], $configs["assigning_authority_universal_id"], $configs["assigning_authority_universal_type_id"]);
}
$data[] = $identifiers;
// SCH-3: Occurrence Number (NM) (optional)
$data[] = null;
// SCH-4: Placer Group Number (EI) (optional)
$data[] = null;
// SCH-5: Schedule ID (CE) (optional)
$data[] = null;
// SCH-6: Event Reason (CE)
/* @todo Voir comment améliorer */
$data[] = array(array(1, "CConsultation"));
// SCH-7: Appointment Reason (CE) (optional)
$data[] = array(array($appointment->_id, $appointment->motif));
// SCH-8: Appointment Type (CE) (optional)
$data[] = null;
// SCH-9: Appointment Duration (NM) (optional)
$data[] = null;
// SCH-10: Appointment Duration Units (CE) (optional)
$data[] = null;
// SCH-11: Appointment Timing Quantity (TQ) (optional repeating)
$data[] = array(array(null, null, "M" . $appointment->_duree, $appointment->_datetime, $appointment->_date_fin));
// SCH-12: Placer Contact Person (XCN) (optional repeating)
$data[] = $this->getXCN($appointment->_ref_praticien, $receiver);
// SCH-13: Placer Contact Phone Number (XTN) (optional)
$data[] = null;
// SCH-14: Placer Contact Address (XAD) (optional repeating)
$data[] = null;
// SCH-15: Placer Contact Location (PL) (optional)
$data[] = null;
// SCH-16: Filler Contact Person (XCN) ( repeating)
$first_log = $appointment->loadFirstLog();
$mediuser = $first_log->loadRefUser()->loadRefMediuser();
$data[] = $this->getXCN($mediuser, $receiver);
// SCH-17: Filler Contact Phone Number (XTN) (optional)
$data[] = null;
// SCH-18: Filler Contact Address (XAD) (optional repeating)
$data[] = null;
// SCH-19: Filler Contact Location (PL) (optional)
$data[] = null;
// SCH-20: Entered By Person (XCN) ( repeating)
$data[] = $this->getXCN($mediuser, $receiver);
// SCH-21: Entered By Phone Number (XTN) (optional repeating)
$data[] = null;
// SCH-22: Entered By Location (PL) (optional)
$data[] = null;
// SCH-23: Parent Placer Appointment ID (EI) (optional)
$data[] = null;
// SCH-24: Parent Filler Appointment ID (EI) (optional)
$data[] = null;
// SCH-25: Filler Status Code (CE) (optional)
$data[] = $this->getFillerStatutsCode($appointment);
// SCH-26: Placer Order Number (EI) (optional repeating)
$data[] = null;
// SCH-27: Filler Order Number (EI) (optional repeating)
$data[] = null;
$this->fill($data);
}
开发者ID:fbone,项目名称:mediboard4,代码行数:78,代码来源:CHL7v2SegmentSCH.class.php
示例17: trashNDA
/**
* Passage en trash du NDA
*
* @param CSejour $venue Venue
* @param CInteropSender $sender Expéditeur
*
* @return bool
*/
function trashNDA(CSejour $venue, CInteropSender $sender)
{
if (isset($sender->_configs["type_sej_pa"])) {
if ($venue->_NDA && preg_match($sender->_configs["type_sej_pa"], $venue->_NDA)) {
// Passage en pa_ de l'id externe
$num_pa = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $venue->_NDA);
if ($num_pa->_id) {
$num_pa->tag = CAppUI::conf('dPplanningOp CSejour tag_dossier_pa') . $sender->_tag_sejour;
$num_pa->last_update = CMbDT::dateTime();
$num_pa->store();
}
return false;
}
}
if ($venue->_NDA) {
return true;
}
return false;
}
开发者ID:fbone,项目名称:mediboard4,代码行数:27,代码来源:CHPrimXMLEvenementsPatients.class.php
示例18: intval
<?php
/* $Id: view_identifiants.php 28748 2015-06-27 09:01:22Z lryo $ */
/**
* @package Mediboard
* @subpackage sante400
* @version $Revision: 28748 $
* @author SARL OpenXtrem
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
*/
CCanDo::checkRead();
$canSante400 = CModule::getCanDo("dPsante400");
$dialog = CValue::get("dialog");
$page = intval(CValue::get('page', 0));
// Chargement du filtre
$filter = new CIdSante400();
$filter->object_id = CValue::get("object_id");
$filter->object_class = CValue::get("object_class");
$filter->tag = CValue::get("tag");
$filter->id400 = CValue::get("id400");
$filter->nullifyEmptyFields();
// Récupération de la liste des classes disponibles
if ($filter->object_class && $filter->object_id) {
$listClasses = array($filter->object_class);
} else {
$listClasses = CApp::getInstalledClasses();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("page", $page);
$smarty->assign("filter", $filter);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:view_identifiants.php
示例19: mapAndStorePayment
function mapAndStorePayment(DOMNode $node, CFactureCabinet $facture, CIdSante400 $idex)
{
$reglement = new CReglement();
$reglement->load($idex->object_id);
// Recherche du règlement si pas retrouvé par son idex
$reglement->setObject($facture);
$reglement->date = $this->getDatePayment($node) . " 00:00:00";
$amount_paid = $this->getAmountPaid($node);
$reglement->montant = $amount_paid;
$direction = $this->getDirection($node);
if ($direction == "-") {
$reglement->montant = $reglement->montant * -1;
}
$reglement->emetteur = "tiers";
$reglement->mode = "autre";
$reglement->loadOldObject();
if ($reglement->_old && round($reglement->montant, 3) == round($reglement->_old->montant, 3)) {
return $reglement;
}
// Mise à jour du montant (du_tiers) de la facture
$value = $reglement->_old ? $reglement->montant - $reglement->_old->montant : $reglement->montant;
// Acquittement de la facture associée ?
if ($msg = $reglement->store()) {
return $msg;
}
// Gestion de l'idex
if (!$idex->object_id) {
$idex->object_id = $reglement->_id;
}
$idex->last_update = CMbDT::dateTime();
if ($msg = $idex->store()) {
return $msg;
}
if ($direction != "+") {
return $reglement;
}
return $reglement;
}
开发者ID:fbone,项目名称:mediboard4,代码行数:38,代码来源:CHprim21RecordPayment.class.php
示例20: handleA29
/**
* Handle A29 event - Delete person information
*
* @param CHL7Acknowledgment $ack Acknowledgement
* @param CPatient $newPatient Person
* @param array $data Nodes data
*
* @return null|string
*/
function handleA29(CHL7Acknowledgment $ack, CPatient $newPatient, $data)
{
// Traitement du message des erreurs
$comment = $warning = "";
$exchange_hl7v2 = $this->_ref_exchange_hl7v2;
$sender = $this->_ref_sender;
$patientPI = CValue::read($data['personIdentifiers'], "PI");
$IPP = new CIdSante400();
if ($patientPI) {
$IPP = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
}
if (!$patientPI || !$IPP->_id) {
return $exchange_hl7v2->setAckAR($ack, "E150", null, $newPatient);
}
$newPatient->load($IPP->object_id);
// Passage en trash de l'IPP du patient
if ($msg = $newPatient->trashIPP($IPP)) {
return $exchange_hl7v2->setAckAR($ack, "E151", $msg, $newPatient);
}
// Annulation de tous les séjours du patient qui n'ont pas d'entrée réelle
$where = array();
$where['entree_reelle'] = "IS NULL";
$where['group_id'] = " = '{$sender->group_
|
请发表评论